commit stringlengths 40 40 | old_file stringlengths 4 118 | new_file stringlengths 4 118 | old_contents stringlengths 0 2.94k | new_contents stringlengths 1 4.43k | subject stringlengths 15 444 | message stringlengths 16 3.45k | lang stringclasses 1
value | license stringclasses 13
values | repos stringlengths 5 43.2k | prompt stringlengths 17 4.58k | response stringlengths 1 4.43k | prompt_tagged stringlengths 58 4.62k | response_tagged stringlengths 1 4.43k | text stringlengths 132 7.29k | text_tagged stringlengths 173 7.33k |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
27a0226ec444523034d739a00a999b089ce116ba | enthought/chaco/tools/api.py | enthought/chaco/tools/api.py | from better_zoom import BetterZoom
from better_selecting_zoom import BetterSelectingZoom
from broadcaster import BroadcasterTool
from dataprinter import DataPrinter
from data_label_tool import DataLabelTool
from drag_zoom import DragZoom
from enthought.enable.tools.drag_tool import DragTool
from draw_points_tool import... | from better_zoom import BetterZoom
from better_selecting_zoom import BetterSelectingZoom
from broadcaster import BroadcasterTool
from dataprinter import DataPrinter
from data_label_tool import DataLabelTool
from enthought.enable.tools.drag_tool import DragTool
from draw_points_tool import DrawPointsTool
from highlight_... | Remove deprecated DragZoom from Chaco tools API to eliminate irrelevant BaseZoomTool deprecation warning. DragZoom is still used in 4 Chaco examples | [Chaco] Remove deprecated DragZoom from Chaco tools API to eliminate irrelevant BaseZoomTool deprecation warning. DragZoom is still used in 4 Chaco examples
| Python | bsd-3-clause | ContinuumIO/chaco,tommy-u/chaco,tommy-u/chaco,ContinuumIO/chaco,tommy-u/chaco,ContinuumIO/chaco,burnpanck/chaco,burnpanck/chaco,ContinuumIO/chaco,burnpanck/chaco | from better_zoom import BetterZoom
from better_selecting_zoom import BetterSelectingZoom
from broadcaster import BroadcasterTool
from dataprinter import DataPrinter
from data_label_tool import DataLabelTool
from drag_zoom import DragZoom
from enthought.enable.tools.drag_tool import DragTool
from draw_points_tool import... | from better_zoom import BetterZoom
from better_selecting_zoom import BetterSelectingZoom
from broadcaster import BroadcasterTool
from dataprinter import DataPrinter
from data_label_tool import DataLabelTool
from enthought.enable.tools.drag_tool import DragTool
from draw_points_tool import DrawPointsTool
from highlight_... | <commit_before>from better_zoom import BetterZoom
from better_selecting_zoom import BetterSelectingZoom
from broadcaster import BroadcasterTool
from dataprinter import DataPrinter
from data_label_tool import DataLabelTool
from drag_zoom import DragZoom
from enthought.enable.tools.drag_tool import DragTool
from draw_poi... | from better_zoom import BetterZoom
from better_selecting_zoom import BetterSelectingZoom
from broadcaster import BroadcasterTool
from dataprinter import DataPrinter
from data_label_tool import DataLabelTool
from enthought.enable.tools.drag_tool import DragTool
from draw_points_tool import DrawPointsTool
from highlight_... | from better_zoom import BetterZoom
from better_selecting_zoom import BetterSelectingZoom
from broadcaster import BroadcasterTool
from dataprinter import DataPrinter
from data_label_tool import DataLabelTool
from drag_zoom import DragZoom
from enthought.enable.tools.drag_tool import DragTool
from draw_points_tool import... | <commit_before>from better_zoom import BetterZoom
from better_selecting_zoom import BetterSelectingZoom
from broadcaster import BroadcasterTool
from dataprinter import DataPrinter
from data_label_tool import DataLabelTool
from drag_zoom import DragZoom
from enthought.enable.tools.drag_tool import DragTool
from draw_poi... |
0df76d66fb6a2425c6ccc8a3a75d41599b2545c6 | auth0/v2/authentication/delegated.py | auth0/v2/authentication/delegated.py | from .base import AuthenticationBase
class Delegated(AuthenticationBase):
def __init__(self, domain):
self.domain = domain
def get_token(self, client_id, target, api_type, grant_type,
id_token=None, refresh_token=None):
if id_token and refresh_token:
raise Valu... | from .base import AuthenticationBase
class Delegated(AuthenticationBase):
"""Delegated authentication endpoints.
Args:
domain (str): Your auth0 domain (e.g: username.auth0.com)
"""
def __init__(self, domain):
self.domain = domain
def get_token(self, client_id, target, api_type,... | Add docstrings in Delegated class | Add docstrings in Delegated class
| Python | mit | auth0/auth0-python,auth0/auth0-python | from .base import AuthenticationBase
class Delegated(AuthenticationBase):
def __init__(self, domain):
self.domain = domain
def get_token(self, client_id, target, api_type, grant_type,
id_token=None, refresh_token=None):
if id_token and refresh_token:
raise Valu... | from .base import AuthenticationBase
class Delegated(AuthenticationBase):
"""Delegated authentication endpoints.
Args:
domain (str): Your auth0 domain (e.g: username.auth0.com)
"""
def __init__(self, domain):
self.domain = domain
def get_token(self, client_id, target, api_type,... | <commit_before>from .base import AuthenticationBase
class Delegated(AuthenticationBase):
def __init__(self, domain):
self.domain = domain
def get_token(self, client_id, target, api_type, grant_type,
id_token=None, refresh_token=None):
if id_token and refresh_token:
... | from .base import AuthenticationBase
class Delegated(AuthenticationBase):
"""Delegated authentication endpoints.
Args:
domain (str): Your auth0 domain (e.g: username.auth0.com)
"""
def __init__(self, domain):
self.domain = domain
def get_token(self, client_id, target, api_type,... | from .base import AuthenticationBase
class Delegated(AuthenticationBase):
def __init__(self, domain):
self.domain = domain
def get_token(self, client_id, target, api_type, grant_type,
id_token=None, refresh_token=None):
if id_token and refresh_token:
raise Valu... | <commit_before>from .base import AuthenticationBase
class Delegated(AuthenticationBase):
def __init__(self, domain):
self.domain = domain
def get_token(self, client_id, target, api_type, grant_type,
id_token=None, refresh_token=None):
if id_token and refresh_token:
... |
6735b31506a86fa440619f1f68e53158dbd79024 | mint/django_rest/rbuilder/errors.py | mint/django_rest/rbuilder/errors.py | #
# Copyright (c) 2011 rPath, Inc.
#
# All Rights Reserved
#
BAD_REQUEST = 400
NOT_FOUND = 404
INTERNAL_SERVER_ERROR = 500
class RbuilderError(Exception):
"An unknown error has occured."
status = INTERNAL_SERVER_ERROR
def __init__(self, **kwargs):
cls = self.__class__
self.msg = cls.__d... | #
# Copyright (c) 2011 rPath, Inc.
#
# All Rights Reserved
#
BAD_REQUEST = 400
NOT_FOUND = 404
INTERNAL_SERVER_ERROR = 500
class RbuilderError(Exception):
"An unknown error has occured."
status = INTERNAL_SERVER_ERROR
def __init__(self, **kwargs):
cls = self.__class__
self.msg = cls.__d... | Fix typo in exception name | Fix typo in exception name
| Python | apache-2.0 | sassoftware/mint,sassoftware/mint,sassoftware/mint,sassoftware/mint,sassoftware/mint | #
# Copyright (c) 2011 rPath, Inc.
#
# All Rights Reserved
#
BAD_REQUEST = 400
NOT_FOUND = 404
INTERNAL_SERVER_ERROR = 500
class RbuilderError(Exception):
"An unknown error has occured."
status = INTERNAL_SERVER_ERROR
def __init__(self, **kwargs):
cls = self.__class__
self.msg = cls.__d... | #
# Copyright (c) 2011 rPath, Inc.
#
# All Rights Reserved
#
BAD_REQUEST = 400
NOT_FOUND = 404
INTERNAL_SERVER_ERROR = 500
class RbuilderError(Exception):
"An unknown error has occured."
status = INTERNAL_SERVER_ERROR
def __init__(self, **kwargs):
cls = self.__class__
self.msg = cls.__d... | <commit_before>#
# Copyright (c) 2011 rPath, Inc.
#
# All Rights Reserved
#
BAD_REQUEST = 400
NOT_FOUND = 404
INTERNAL_SERVER_ERROR = 500
class RbuilderError(Exception):
"An unknown error has occured."
status = INTERNAL_SERVER_ERROR
def __init__(self, **kwargs):
cls = self.__class__
sel... | #
# Copyright (c) 2011 rPath, Inc.
#
# All Rights Reserved
#
BAD_REQUEST = 400
NOT_FOUND = 404
INTERNAL_SERVER_ERROR = 500
class RbuilderError(Exception):
"An unknown error has occured."
status = INTERNAL_SERVER_ERROR
def __init__(self, **kwargs):
cls = self.__class__
self.msg = cls.__d... | #
# Copyright (c) 2011 rPath, Inc.
#
# All Rights Reserved
#
BAD_REQUEST = 400
NOT_FOUND = 404
INTERNAL_SERVER_ERROR = 500
class RbuilderError(Exception):
"An unknown error has occured."
status = INTERNAL_SERVER_ERROR
def __init__(self, **kwargs):
cls = self.__class__
self.msg = cls.__d... | <commit_before>#
# Copyright (c) 2011 rPath, Inc.
#
# All Rights Reserved
#
BAD_REQUEST = 400
NOT_FOUND = 404
INTERNAL_SERVER_ERROR = 500
class RbuilderError(Exception):
"An unknown error has occured."
status = INTERNAL_SERVER_ERROR
def __init__(self, **kwargs):
cls = self.__class__
sel... |
1766a5acc5c948288b4cd81c62d0c1507c55f727 | cinder/brick/initiator/host_driver.py | cinder/brick/initiator/host_driver.py | # vim: tabstop=4 shiftwidth=4 softtabstop=4
# Copyright 2013 OpenStack Foundation.
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apac... | # vim: tabstop=4 shiftwidth=4 softtabstop=4
# Copyright 2013 OpenStack Foundation.
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apac... | Check if dir exists before calling listdir | Check if dir exists before calling listdir
Changes along the way to how we clean up and detach after
copying an image to a volume exposed a problem in the cleanup
of the brick/initiator routines.
The clean up in the initiator detach was doing a blind listdir
of /dev/disk/by-path, however due to detach and cleanup bei... | Python | apache-2.0 | petrutlucian94/cinder,Paul-Ezell/cinder-1,CloudServer/cinder,Datera/cinder,nikesh-mahalka/cinder,alex8866/cinder,j-griffith/cinder,cloudbase/cinder,openstack/cinder,julianwang/cinder,redhat-openstack/cinder,tlakshman26/cinder-bug-fix-volume-conversion-full,Akrog/cinder,Hybrid-Cloud/cinder,CloudServer/cinder,tlakshman26... | # vim: tabstop=4 shiftwidth=4 softtabstop=4
# Copyright 2013 OpenStack Foundation.
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apac... | # vim: tabstop=4 shiftwidth=4 softtabstop=4
# Copyright 2013 OpenStack Foundation.
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apac... | <commit_before># vim: tabstop=4 shiftwidth=4 softtabstop=4
# Copyright 2013 OpenStack Foundation.
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# ... | # vim: tabstop=4 shiftwidth=4 softtabstop=4
# Copyright 2013 OpenStack Foundation.
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apac... | # vim: tabstop=4 shiftwidth=4 softtabstop=4
# Copyright 2013 OpenStack Foundation.
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apac... | <commit_before># vim: tabstop=4 shiftwidth=4 softtabstop=4
# Copyright 2013 OpenStack Foundation.
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# ... |
305969cedb966d1e5cd340d531727bb984ac35a8 | whitenoise/generators/sqlalchemy.py | whitenoise/generators/sqlalchemy.py | import random
from whitenoise.generators import BaseGenerator
class SelectGenerator(BaseGenerator):
'''
Creates a value by selecting from another SQLAlchemy table
Depends on SQLAlchemy, and receiving a session object from the Fixture runner
the SQLAlchemy fixture runner handles this for us
Receives... | import random
from whitenoise.generators import BaseGenerator
class SelectGenerator(BaseGenerator):
'''
Creates a value by selecting from another SQLAlchemy table
Depends on SQLAlchemy, and receiving a session object from the Fixture runner
the SQLAlchemy fixture runner handles this for us
Receives... | Add a generator for association tables | Add a generator for association tables
| Python | mit | James1345/white-noise | import random
from whitenoise.generators import BaseGenerator
class SelectGenerator(BaseGenerator):
'''
Creates a value by selecting from another SQLAlchemy table
Depends on SQLAlchemy, and receiving a session object from the Fixture runner
the SQLAlchemy fixture runner handles this for us
Receives... | import random
from whitenoise.generators import BaseGenerator
class SelectGenerator(BaseGenerator):
'''
Creates a value by selecting from another SQLAlchemy table
Depends on SQLAlchemy, and receiving a session object from the Fixture runner
the SQLAlchemy fixture runner handles this for us
Receives... | <commit_before>import random
from whitenoise.generators import BaseGenerator
class SelectGenerator(BaseGenerator):
'''
Creates a value by selecting from another SQLAlchemy table
Depends on SQLAlchemy, and receiving a session object from the Fixture runner
the SQLAlchemy fixture runner handles this for ... | import random
from whitenoise.generators import BaseGenerator
class SelectGenerator(BaseGenerator):
'''
Creates a value by selecting from another SQLAlchemy table
Depends on SQLAlchemy, and receiving a session object from the Fixture runner
the SQLAlchemy fixture runner handles this for us
Receives... | import random
from whitenoise.generators import BaseGenerator
class SelectGenerator(BaseGenerator):
'''
Creates a value by selecting from another SQLAlchemy table
Depends on SQLAlchemy, and receiving a session object from the Fixture runner
the SQLAlchemy fixture runner handles this for us
Receives... | <commit_before>import random
from whitenoise.generators import BaseGenerator
class SelectGenerator(BaseGenerator):
'''
Creates a value by selecting from another SQLAlchemy table
Depends on SQLAlchemy, and receiving a session object from the Fixture runner
the SQLAlchemy fixture runner handles this for ... |
486aa11293754fc56d47b2820041c35255dfcf1c | echoapp/__main__.py | echoapp/__main__.py | from __future__ import unicode_literals
import os
import pprint
import StringIO
from flask import Flask
from flask import request
app = Flask(__name__)
@app.route("/")
def echo():
stream = StringIO.StringIO()
indent = int(os.environ.get('PRINT_INDENT', 1))
pprint.pprint(request.environ, indent=indent, s... | from __future__ import unicode_literals
import os
import pprint
import StringIO
from flask import Flask
from flask import request
app = Flask(__name__)
@app.route("/")
def echo():
stream = StringIO.StringIO()
indent = int(os.environ.get('PRINT_INDENT', 1))
pprint.pprint(request.environ, indent=indent, s... | Read HTTP server from env variables | Read HTTP server from env variables
| Python | mit | victorlin/docker-eb-demo,victorlin/docker-eb-demo | from __future__ import unicode_literals
import os
import pprint
import StringIO
from flask import Flask
from flask import request
app = Flask(__name__)
@app.route("/")
def echo():
stream = StringIO.StringIO()
indent = int(os.environ.get('PRINT_INDENT', 1))
pprint.pprint(request.environ, indent=indent, s... | from __future__ import unicode_literals
import os
import pprint
import StringIO
from flask import Flask
from flask import request
app = Flask(__name__)
@app.route("/")
def echo():
stream = StringIO.StringIO()
indent = int(os.environ.get('PRINT_INDENT', 1))
pprint.pprint(request.environ, indent=indent, s... | <commit_before>from __future__ import unicode_literals
import os
import pprint
import StringIO
from flask import Flask
from flask import request
app = Flask(__name__)
@app.route("/")
def echo():
stream = StringIO.StringIO()
indent = int(os.environ.get('PRINT_INDENT', 1))
pprint.pprint(request.environ, i... | from __future__ import unicode_literals
import os
import pprint
import StringIO
from flask import Flask
from flask import request
app = Flask(__name__)
@app.route("/")
def echo():
stream = StringIO.StringIO()
indent = int(os.environ.get('PRINT_INDENT', 1))
pprint.pprint(request.environ, indent=indent, s... | from __future__ import unicode_literals
import os
import pprint
import StringIO
from flask import Flask
from flask import request
app = Flask(__name__)
@app.route("/")
def echo():
stream = StringIO.StringIO()
indent = int(os.environ.get('PRINT_INDENT', 1))
pprint.pprint(request.environ, indent=indent, s... | <commit_before>from __future__ import unicode_literals
import os
import pprint
import StringIO
from flask import Flask
from flask import request
app = Flask(__name__)
@app.route("/")
def echo():
stream = StringIO.StringIO()
indent = int(os.environ.get('PRINT_INDENT', 1))
pprint.pprint(request.environ, i... |
c44db12bbf960c8883c4fc31f47e31f4409fe685 | feincms/views/decorators.py | feincms/views/decorators.py | try:
from functools import wraps
except ImportError:
from django.utils.functional import wraps
from feincms.models import Page
def add_page_to_extra_context(view_func):
def inner(request, *args, **kwargs):
kwargs.setdefault('extra_context', {})
kwargs['extra_context']['feincms_page'] = Pa... | try:
from functools import wraps
except ImportError:
from django.utils.functional import wraps
from feincms.module.page.models import Page
def add_page_to_extra_context(view_func):
def inner(request, *args, **kwargs):
kwargs.setdefault('extra_context', {})
kwargs['extra_context']['feincms... | Fix page import path in view decorator module | Fix page import path in view decorator module
| Python | bsd-3-clause | mjl/feincms,nickburlett/feincms,michaelkuty/feincms,michaelkuty/feincms,nickburlett/feincms,hgrimelid/feincms,matthiask/feincms2-content,pjdelport/feincms,matthiask/django-content-editor,joshuajonah/feincms,joshuajonah/feincms,matthiask/django-content-editor,matthiask/django-content-editor,mjl/feincms,joshuajonah/feinc... | try:
from functools import wraps
except ImportError:
from django.utils.functional import wraps
from feincms.models import Page
def add_page_to_extra_context(view_func):
def inner(request, *args, **kwargs):
kwargs.setdefault('extra_context', {})
kwargs['extra_context']['feincms_page'] = Pa... | try:
from functools import wraps
except ImportError:
from django.utils.functional import wraps
from feincms.module.page.models import Page
def add_page_to_extra_context(view_func):
def inner(request, *args, **kwargs):
kwargs.setdefault('extra_context', {})
kwargs['extra_context']['feincms... | <commit_before>try:
from functools import wraps
except ImportError:
from django.utils.functional import wraps
from feincms.models import Page
def add_page_to_extra_context(view_func):
def inner(request, *args, **kwargs):
kwargs.setdefault('extra_context', {})
kwargs['extra_context']['fein... | try:
from functools import wraps
except ImportError:
from django.utils.functional import wraps
from feincms.module.page.models import Page
def add_page_to_extra_context(view_func):
def inner(request, *args, **kwargs):
kwargs.setdefault('extra_context', {})
kwargs['extra_context']['feincms... | try:
from functools import wraps
except ImportError:
from django.utils.functional import wraps
from feincms.models import Page
def add_page_to_extra_context(view_func):
def inner(request, *args, **kwargs):
kwargs.setdefault('extra_context', {})
kwargs['extra_context']['feincms_page'] = Pa... | <commit_before>try:
from functools import wraps
except ImportError:
from django.utils.functional import wraps
from feincms.models import Page
def add_page_to_extra_context(view_func):
def inner(request, *args, **kwargs):
kwargs.setdefault('extra_context', {})
kwargs['extra_context']['fein... |
ee5ab61090cef682f37631a8c3f5764bdda63772 | xpserver_web/tests/unit/test_web.py | xpserver_web/tests/unit/test_web.py | from django.core.urlresolvers import resolve
from xpserver_web.views import main
def test_root_resolves_to_hello_world():
found = resolve('/')
assert found.func == main
| from django.core.urlresolvers import resolve
from xpserver_web.views import main, register
def test_root_resolves_to_main():
found = resolve('/')
assert found.func == main
def test_register_resolves_to_main():
found = resolve('/register/')
assert found.func == register
| Add unit test for register | Add unit test for register
| Python | mit | xp2017-hackergarden/server,xp2017-hackergarden/server,xp2017-hackergarden/server,xp2017-hackergarden/server | from django.core.urlresolvers import resolve
from xpserver_web.views import main
def test_root_resolves_to_hello_world():
found = resolve('/')
assert found.func == main
Add unit test for register | from django.core.urlresolvers import resolve
from xpserver_web.views import main, register
def test_root_resolves_to_main():
found = resolve('/')
assert found.func == main
def test_register_resolves_to_main():
found = resolve('/register/')
assert found.func == register
| <commit_before>from django.core.urlresolvers import resolve
from xpserver_web.views import main
def test_root_resolves_to_hello_world():
found = resolve('/')
assert found.func == main
<commit_msg>Add unit test for register<commit_after> | from django.core.urlresolvers import resolve
from xpserver_web.views import main, register
def test_root_resolves_to_main():
found = resolve('/')
assert found.func == main
def test_register_resolves_to_main():
found = resolve('/register/')
assert found.func == register
| from django.core.urlresolvers import resolve
from xpserver_web.views import main
def test_root_resolves_to_hello_world():
found = resolve('/')
assert found.func == main
Add unit test for registerfrom django.core.urlresolvers import resolve
from xpserver_web.views import main, register
def test_root_resolve... | <commit_before>from django.core.urlresolvers import resolve
from xpserver_web.views import main
def test_root_resolves_to_hello_world():
found = resolve('/')
assert found.func == main
<commit_msg>Add unit test for register<commit_after>from django.core.urlresolvers import resolve
from xpserver_web.views impo... |
4c2e76d62460828aa0f30e903f57e7f515cc43f7 | alg_kruskal_minimum_spanning_tree.py | alg_kruskal_minimum_spanning_tree.py | from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
def make_set():
pass
def link():
pass
def find():
pass
def union():
pass
def kruskal():
"""Kruskal's algorithm for minimum spanning tree
in weighted graph.
Time complexity for graph G(V, E)... | from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
def make_set():
pass
def link():
pass
def find():
pass
def union():
pass
def kruskal():
"""Kruskal's algorithm for minimum spanning tree
in weighted undirected graph.
Time complexity for gr... | Revise doc string by adding "undirected" | Revise doc string by adding "undirected"
| Python | bsd-2-clause | bowen0701/algorithms_data_structures | from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
def make_set():
pass
def link():
pass
def find():
pass
def union():
pass
def kruskal():
"""Kruskal's algorithm for minimum spanning tree
in weighted graph.
Time complexity for graph G(V, E)... | from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
def make_set():
pass
def link():
pass
def find():
pass
def union():
pass
def kruskal():
"""Kruskal's algorithm for minimum spanning tree
in weighted undirected graph.
Time complexity for gr... | <commit_before>from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
def make_set():
pass
def link():
pass
def find():
pass
def union():
pass
def kruskal():
"""Kruskal's algorithm for minimum spanning tree
in weighted graph.
Time complexity fo... | from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
def make_set():
pass
def link():
pass
def find():
pass
def union():
pass
def kruskal():
"""Kruskal's algorithm for minimum spanning tree
in weighted undirected graph.
Time complexity for gr... | from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
def make_set():
pass
def link():
pass
def find():
pass
def union():
pass
def kruskal():
"""Kruskal's algorithm for minimum spanning tree
in weighted graph.
Time complexity for graph G(V, E)... | <commit_before>from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
def make_set():
pass
def link():
pass
def find():
pass
def union():
pass
def kruskal():
"""Kruskal's algorithm for minimum spanning tree
in weighted graph.
Time complexity fo... |
a765366f9542f48374fe240f3e9e049225f86cec | email_handle/handle_incoming_email.py | email_handle/handle_incoming_email.py | import logging
import webapp2
from google.appengine.ext.webapp.mail_handlers import InboundMailHandler
from google.appengine.api import mail
class ReplyHandler(InboundMailHandler):
def receive(self, mail_message):
logging.info("Received a message from: " + mail_message.sender)
logging.info("Receive... | import logging
import webapp2
from google.appengine.ext.webapp.mail_handlers import InboundMailHandler
from google.appengine.api import mail
class ReplyHandler(InboundMailHandler):
def receive(self, mail_message):
logging.info("Received a message from: " + mail_message.sender)
message = mail.Email... | Fix bug : error at logging | Fix bug : error at logging
| Python | mit | chaiso-krit/SimpleEmailGAE | import logging
import webapp2
from google.appengine.ext.webapp.mail_handlers import InboundMailHandler
from google.appengine.api import mail
class ReplyHandler(InboundMailHandler):
def receive(self, mail_message):
logging.info("Received a message from: " + mail_message.sender)
logging.info("Receive... | import logging
import webapp2
from google.appengine.ext.webapp.mail_handlers import InboundMailHandler
from google.appengine.api import mail
class ReplyHandler(InboundMailHandler):
def receive(self, mail_message):
logging.info("Received a message from: " + mail_message.sender)
message = mail.Email... | <commit_before>import logging
import webapp2
from google.appengine.ext.webapp.mail_handlers import InboundMailHandler
from google.appengine.api import mail
class ReplyHandler(InboundMailHandler):
def receive(self, mail_message):
logging.info("Received a message from: " + mail_message.sender)
loggin... | import logging
import webapp2
from google.appengine.ext.webapp.mail_handlers import InboundMailHandler
from google.appengine.api import mail
class ReplyHandler(InboundMailHandler):
def receive(self, mail_message):
logging.info("Received a message from: " + mail_message.sender)
message = mail.Email... | import logging
import webapp2
from google.appengine.ext.webapp.mail_handlers import InboundMailHandler
from google.appengine.api import mail
class ReplyHandler(InboundMailHandler):
def receive(self, mail_message):
logging.info("Received a message from: " + mail_message.sender)
logging.info("Receive... | <commit_before>import logging
import webapp2
from google.appengine.ext.webapp.mail_handlers import InboundMailHandler
from google.appengine.api import mail
class ReplyHandler(InboundMailHandler):
def receive(self, mail_message):
logging.info("Received a message from: " + mail_message.sender)
loggin... |
e120858d5cb123e9f3422ddb15ce79bde8d05d64 | statsd/__init__.py | statsd/__init__.py | import socket
try:
from django.conf import settings
except ImportError:
settings = None
from client import StatsClient
__all__ = ['StatsClient', 'statsd']
VERSION = (0, 4, 0)
__version__ = '.'.join(map(str, VERSION))
if settings:
try:
host = getattr(settings, 'STATSD_HOST', 'localhost')
... | import socket
import os
try:
from django.conf import settings
except ImportError:
settings = None
from client import StatsClient
__all__ = ['StatsClient', 'statsd']
VERSION = (0, 4, 0)
__version__ = '.'.join(map(str, VERSION))
if settings:
try:
host = getattr(settings, 'STATSD_HOST', 'localho... | Read settings from environment, if available | Read settings from environment, if available
| Python | mit | lyft/pystatsd,jsocol/pystatsd,deathowl/pystatsd,Khan/pystatsd,Khan/pystatsd,smarkets/pystatsd,wujuguang/pystatsd,lyft/pystatsd | import socket
try:
from django.conf import settings
except ImportError:
settings = None
from client import StatsClient
__all__ = ['StatsClient', 'statsd']
VERSION = (0, 4, 0)
__version__ = '.'.join(map(str, VERSION))
if settings:
try:
host = getattr(settings, 'STATSD_HOST', 'localhost')
... | import socket
import os
try:
from django.conf import settings
except ImportError:
settings = None
from client import StatsClient
__all__ = ['StatsClient', 'statsd']
VERSION = (0, 4, 0)
__version__ = '.'.join(map(str, VERSION))
if settings:
try:
host = getattr(settings, 'STATSD_HOST', 'localho... | <commit_before>import socket
try:
from django.conf import settings
except ImportError:
settings = None
from client import StatsClient
__all__ = ['StatsClient', 'statsd']
VERSION = (0, 4, 0)
__version__ = '.'.join(map(str, VERSION))
if settings:
try:
host = getattr(settings, 'STATSD_HOST', 'lo... | import socket
import os
try:
from django.conf import settings
except ImportError:
settings = None
from client import StatsClient
__all__ = ['StatsClient', 'statsd']
VERSION = (0, 4, 0)
__version__ = '.'.join(map(str, VERSION))
if settings:
try:
host = getattr(settings, 'STATSD_HOST', 'localho... | import socket
try:
from django.conf import settings
except ImportError:
settings = None
from client import StatsClient
__all__ = ['StatsClient', 'statsd']
VERSION = (0, 4, 0)
__version__ = '.'.join(map(str, VERSION))
if settings:
try:
host = getattr(settings, 'STATSD_HOST', 'localhost')
... | <commit_before>import socket
try:
from django.conf import settings
except ImportError:
settings = None
from client import StatsClient
__all__ = ['StatsClient', 'statsd']
VERSION = (0, 4, 0)
__version__ = '.'.join(map(str, VERSION))
if settings:
try:
host = getattr(settings, 'STATSD_HOST', 'lo... |
7d3ffe4582a5b4032f9a59a3ea8edfded57a7a1f | src/nodeconductor_openstack/openstack/migrations/0031_tenant_backup_storage.py | src/nodeconductor_openstack/openstack/migrations/0031_tenant_backup_storage.py | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.contrib.contenttypes.models import ContentType
from django.db import migrations
from nodeconductor.quotas import models as quotas_models
from .. import models
def cleanup_tenant_quotas(apps, schema_editor):
for obj in models.Tenant.obj... | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import migrations
from .. import models
def cleanup_tenant_quotas(apps, schema_editor):
quota_names = models.Tenant.get_quotas_names()
for obj in models.Tenant.objects.all():
obj.quotas.exclude(name__in=quota_names).delet... | Clean up quota cleanup migration | Clean up quota cleanup migration [WAL-433]
| Python | mit | opennode/nodeconductor-openstack | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.contrib.contenttypes.models import ContentType
from django.db import migrations
from nodeconductor.quotas import models as quotas_models
from .. import models
def cleanup_tenant_quotas(apps, schema_editor):
for obj in models.Tenant.obj... | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import migrations
from .. import models
def cleanup_tenant_quotas(apps, schema_editor):
quota_names = models.Tenant.get_quotas_names()
for obj in models.Tenant.objects.all():
obj.quotas.exclude(name__in=quota_names).delet... | <commit_before># -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.contrib.contenttypes.models import ContentType
from django.db import migrations
from nodeconductor.quotas import models as quotas_models
from .. import models
def cleanup_tenant_quotas(apps, schema_editor):
for obj in mo... | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import migrations
from .. import models
def cleanup_tenant_quotas(apps, schema_editor):
quota_names = models.Tenant.get_quotas_names()
for obj in models.Tenant.objects.all():
obj.quotas.exclude(name__in=quota_names).delet... | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.contrib.contenttypes.models import ContentType
from django.db import migrations
from nodeconductor.quotas import models as quotas_models
from .. import models
def cleanup_tenant_quotas(apps, schema_editor):
for obj in models.Tenant.obj... | <commit_before># -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.contrib.contenttypes.models import ContentType
from django.db import migrations
from nodeconductor.quotas import models as quotas_models
from .. import models
def cleanup_tenant_quotas(apps, schema_editor):
for obj in mo... |
12956febe15e38c8b39edb4e268aa27228a4249f | tests/test_init.py | tests/test_init.py | from pkg_resources import safe_version
import stagpy
import helpers
def test_init_config_None():
stagpy.conf.core.path = 'some_path'
helpers.reset_config()
assert(stagpy.conf.core.path == './')
def test_version_format():
assert(stagpy.__version__ == safe_version(stagpy.__version__))
| from pkg_resources import safe_version
import stagpy
import helpers
def test_init_config_None():
stagpy.conf.core.path = 'some_path'
helpers.reset_config()
assert stagpy.conf.core.path == './'
def test_version_format():
assert stagpy.__version__ == safe_version(stagpy.__version__)
| Remove unecessary parentheses with assert stmt | Remove unecessary parentheses with assert stmt
| Python | apache-2.0 | StagPython/StagPy | from pkg_resources import safe_version
import stagpy
import helpers
def test_init_config_None():
stagpy.conf.core.path = 'some_path'
helpers.reset_config()
assert(stagpy.conf.core.path == './')
def test_version_format():
assert(stagpy.__version__ == safe_version(stagpy.__version__))
Remove unecessary ... | from pkg_resources import safe_version
import stagpy
import helpers
def test_init_config_None():
stagpy.conf.core.path = 'some_path'
helpers.reset_config()
assert stagpy.conf.core.path == './'
def test_version_format():
assert stagpy.__version__ == safe_version(stagpy.__version__)
| <commit_before>from pkg_resources import safe_version
import stagpy
import helpers
def test_init_config_None():
stagpy.conf.core.path = 'some_path'
helpers.reset_config()
assert(stagpy.conf.core.path == './')
def test_version_format():
assert(stagpy.__version__ == safe_version(stagpy.__version__))
<co... | from pkg_resources import safe_version
import stagpy
import helpers
def test_init_config_None():
stagpy.conf.core.path = 'some_path'
helpers.reset_config()
assert stagpy.conf.core.path == './'
def test_version_format():
assert stagpy.__version__ == safe_version(stagpy.__version__)
| from pkg_resources import safe_version
import stagpy
import helpers
def test_init_config_None():
stagpy.conf.core.path = 'some_path'
helpers.reset_config()
assert(stagpy.conf.core.path == './')
def test_version_format():
assert(stagpy.__version__ == safe_version(stagpy.__version__))
Remove unecessary ... | <commit_before>from pkg_resources import safe_version
import stagpy
import helpers
def test_init_config_None():
stagpy.conf.core.path = 'some_path'
helpers.reset_config()
assert(stagpy.conf.core.path == './')
def test_version_format():
assert(stagpy.__version__ == safe_version(stagpy.__version__))
<co... |
e45fff968f37f558a49cf82b582d1f514a97b5af | tests/test_pool.py | tests/test_pool.py | import random
import unittest
from aioes.pool import RandomSelector, RoundRobinSelector
class TestRandomSelector(unittest.TestCase):
def setUp(self):
random.seed(123456)
def tearDown(self):
random.seed(None)
def test_select(self):
s = RandomSelector()
r = s.select([1, 2... | import asyncio
import random
import unittest
from aioes.pool import RandomSelector, RoundRobinSelector, ConnectionPool
from aioes.transport import Endpoint
from aioes.connection import Connection
class TestRandomSelector(unittest.TestCase):
def setUp(self):
random.seed(123456)
def tearDown(self):
... | Add more tests for pool | Add more tests for pool
| Python | apache-2.0 | aio-libs/aioes | import random
import unittest
from aioes.pool import RandomSelector, RoundRobinSelector
class TestRandomSelector(unittest.TestCase):
def setUp(self):
random.seed(123456)
def tearDown(self):
random.seed(None)
def test_select(self):
s = RandomSelector()
r = s.select([1, 2... | import asyncio
import random
import unittest
from aioes.pool import RandomSelector, RoundRobinSelector, ConnectionPool
from aioes.transport import Endpoint
from aioes.connection import Connection
class TestRandomSelector(unittest.TestCase):
def setUp(self):
random.seed(123456)
def tearDown(self):
... | <commit_before>import random
import unittest
from aioes.pool import RandomSelector, RoundRobinSelector
class TestRandomSelector(unittest.TestCase):
def setUp(self):
random.seed(123456)
def tearDown(self):
random.seed(None)
def test_select(self):
s = RandomSelector()
r =... | import asyncio
import random
import unittest
from aioes.pool import RandomSelector, RoundRobinSelector, ConnectionPool
from aioes.transport import Endpoint
from aioes.connection import Connection
class TestRandomSelector(unittest.TestCase):
def setUp(self):
random.seed(123456)
def tearDown(self):
... | import random
import unittest
from aioes.pool import RandomSelector, RoundRobinSelector
class TestRandomSelector(unittest.TestCase):
def setUp(self):
random.seed(123456)
def tearDown(self):
random.seed(None)
def test_select(self):
s = RandomSelector()
r = s.select([1, 2... | <commit_before>import random
import unittest
from aioes.pool import RandomSelector, RoundRobinSelector
class TestRandomSelector(unittest.TestCase):
def setUp(self):
random.seed(123456)
def tearDown(self):
random.seed(None)
def test_select(self):
s = RandomSelector()
r =... |
92c9383f84385a0ceb2029437d0d77fc041d0353 | tools/debug_adapter.py | tools/debug_adapter.py | #!/usr/bin/python
import sys
if 'darwin' in sys.platform:
sys.path.append('/Applications/Xcode.app/Contents/SharedFrameworks/LLDB.framework/Resources/Python')
sys.path.append('.')
import adapter
adapter.main.run_tcp_server(multiple=False)
| #!/usr/bin/python
import sys
if 'darwin' in sys.platform:
sys.path.append('/Applications/Xcode.app/Contents/SharedFrameworks/LLDB.framework/Resources/Python')
sys.path.append('.')
import adapter
adapter.main.run_tcp_server()
| Update code for changed function. | Update code for changed function.
| Python | mit | NeroProtagonist/vscode-lldb,NeroProtagonist/vscode-lldb,NeroProtagonist/vscode-lldb,NeroProtagonist/vscode-lldb,NeroProtagonist/vscode-lldb | #!/usr/bin/python
import sys
if 'darwin' in sys.platform:
sys.path.append('/Applications/Xcode.app/Contents/SharedFrameworks/LLDB.framework/Resources/Python')
sys.path.append('.')
import adapter
adapter.main.run_tcp_server(multiple=False)
Update code for changed function. | #!/usr/bin/python
import sys
if 'darwin' in sys.platform:
sys.path.append('/Applications/Xcode.app/Contents/SharedFrameworks/LLDB.framework/Resources/Python')
sys.path.append('.')
import adapter
adapter.main.run_tcp_server()
| <commit_before>#!/usr/bin/python
import sys
if 'darwin' in sys.platform:
sys.path.append('/Applications/Xcode.app/Contents/SharedFrameworks/LLDB.framework/Resources/Python')
sys.path.append('.')
import adapter
adapter.main.run_tcp_server(multiple=False)
<commit_msg>Update code for changed function.<commit_after> | #!/usr/bin/python
import sys
if 'darwin' in sys.platform:
sys.path.append('/Applications/Xcode.app/Contents/SharedFrameworks/LLDB.framework/Resources/Python')
sys.path.append('.')
import adapter
adapter.main.run_tcp_server()
| #!/usr/bin/python
import sys
if 'darwin' in sys.platform:
sys.path.append('/Applications/Xcode.app/Contents/SharedFrameworks/LLDB.framework/Resources/Python')
sys.path.append('.')
import adapter
adapter.main.run_tcp_server(multiple=False)
Update code for changed function.#!/usr/bin/python
import sys
if 'darwin' in... | <commit_before>#!/usr/bin/python
import sys
if 'darwin' in sys.platform:
sys.path.append('/Applications/Xcode.app/Contents/SharedFrameworks/LLDB.framework/Resources/Python')
sys.path.append('.')
import adapter
adapter.main.run_tcp_server(multiple=False)
<commit_msg>Update code for changed function.<commit_after>#!... |
49cd07a337a9a4282455765ef2b5a2445a0f6840 | tools/dev/wc-format.py | tools/dev/wc-format.py | #!/usr/bin/env python
import os
import sqlite3
import sys
# helper
def usage():
sys.stderr.write("USAGE: %s [PATH]\n" + \
"\n" + \
"Prints to stdout the format of the working copy at PATH.\n")
# parse argv
wc = (sys.argv[1:] + ['.'])[0]
# main()
entries = os.path.join(wc, '.s... | #!/usr/bin/env python
import os
import sqlite3
import sys
def print_format(wc_path):
entries = os.path.join(wc_path, '.svn', 'entries')
wc_db = os.path.join(wc_path, '.svn', 'wc.db')
if os.path.exists(entries):
formatno = int(open(entries).readline())
elif os.path.exists(wc_db):
conn = sqlite3.conne... | Allow script to take multiple paths, and adjust to standard __main__ idiom for cmdline scripts. | Allow script to take multiple paths, and adjust to standard __main__ idiom
for cmdline scripts.
* tools/dev/wc-format.py:
(usage): remove. all paths are allowed.
(print_format): move guts of format fetching and printing into this
function. print 'not under version control' for such a path, rather
than bail... | Python | apache-2.0 | jmckaskill/subversion,jmckaskill/subversion,jmckaskill/subversion,jmckaskill/subversion,jmckaskill/subversion,jmckaskill/subversion,jmckaskill/subversion,jmckaskill/subversion | #!/usr/bin/env python
import os
import sqlite3
import sys
# helper
def usage():
sys.stderr.write("USAGE: %s [PATH]\n" + \
"\n" + \
"Prints to stdout the format of the working copy at PATH.\n")
# parse argv
wc = (sys.argv[1:] + ['.'])[0]
# main()
entries = os.path.join(wc, '.s... | #!/usr/bin/env python
import os
import sqlite3
import sys
def print_format(wc_path):
entries = os.path.join(wc_path, '.svn', 'entries')
wc_db = os.path.join(wc_path, '.svn', 'wc.db')
if os.path.exists(entries):
formatno = int(open(entries).readline())
elif os.path.exists(wc_db):
conn = sqlite3.conne... | <commit_before>#!/usr/bin/env python
import os
import sqlite3
import sys
# helper
def usage():
sys.stderr.write("USAGE: %s [PATH]\n" + \
"\n" + \
"Prints to stdout the format of the working copy at PATH.\n")
# parse argv
wc = (sys.argv[1:] + ['.'])[0]
# main()
entries = os.pa... | #!/usr/bin/env python
import os
import sqlite3
import sys
def print_format(wc_path):
entries = os.path.join(wc_path, '.svn', 'entries')
wc_db = os.path.join(wc_path, '.svn', 'wc.db')
if os.path.exists(entries):
formatno = int(open(entries).readline())
elif os.path.exists(wc_db):
conn = sqlite3.conne... | #!/usr/bin/env python
import os
import sqlite3
import sys
# helper
def usage():
sys.stderr.write("USAGE: %s [PATH]\n" + \
"\n" + \
"Prints to stdout the format of the working copy at PATH.\n")
# parse argv
wc = (sys.argv[1:] + ['.'])[0]
# main()
entries = os.path.join(wc, '.s... | <commit_before>#!/usr/bin/env python
import os
import sqlite3
import sys
# helper
def usage():
sys.stderr.write("USAGE: %s [PATH]\n" + \
"\n" + \
"Prints to stdout the format of the working copy at PATH.\n")
# parse argv
wc = (sys.argv[1:] + ['.'])[0]
# main()
entries = os.pa... |
aa8820bd7b78ba5729e0a7a17e43b87bfd033980 | tests/runtests.py | tests/runtests.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Copyright (C) 2008 John Paulett (john -at- paulett.org)
# All rights reserved.
#
# This software is licensed as described in the file COPYING, which
# you should have received as part of this distribution.
import os
import sys
sys.path.append(os.path.join(os.path.dirna... | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Copyright (C) 2008 John Paulett (john -at- paulett.org)
# All rights reserved.
#
# This software is licensed as described in the file COPYING, which
# you should have received as part of this distribution.
import os
import sys
sys.path.append(os.path.join(os.path.dirna... | Return correct status code to shell when tests fail. | Return correct status code to shell when tests fail.
When tests fail (due to e.g. missing feedparser), then the exit code of tests/runtests.py is 0, which is treated by shell as
success. Patch by Arfrever Frehtes Taifersar Arahesis.
| Python | bsd-3-clause | mandx/jsonpickle,dongguangming/jsonpickle,dongguangming/jsonpickle,mandx/jsonpickle,mandx/jsonpickle,dongguangming/jsonpickle,mandx/jsonpickle,dongguangming/jsonpickle | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Copyright (C) 2008 John Paulett (john -at- paulett.org)
# All rights reserved.
#
# This software is licensed as described in the file COPYING, which
# you should have received as part of this distribution.
import os
import sys
sys.path.append(os.path.join(os.path.dirna... | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Copyright (C) 2008 John Paulett (john -at- paulett.org)
# All rights reserved.
#
# This software is licensed as described in the file COPYING, which
# you should have received as part of this distribution.
import os
import sys
sys.path.append(os.path.join(os.path.dirna... | <commit_before>#!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Copyright (C) 2008 John Paulett (john -at- paulett.org)
# All rights reserved.
#
# This software is licensed as described in the file COPYING, which
# you should have received as part of this distribution.
import os
import sys
sys.path.append(os.path.joi... | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Copyright (C) 2008 John Paulett (john -at- paulett.org)
# All rights reserved.
#
# This software is licensed as described in the file COPYING, which
# you should have received as part of this distribution.
import os
import sys
sys.path.append(os.path.join(os.path.dirna... | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Copyright (C) 2008 John Paulett (john -at- paulett.org)
# All rights reserved.
#
# This software is licensed as described in the file COPYING, which
# you should have received as part of this distribution.
import os
import sys
sys.path.append(os.path.join(os.path.dirna... | <commit_before>#!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Copyright (C) 2008 John Paulett (john -at- paulett.org)
# All rights reserved.
#
# This software is licensed as described in the file COPYING, which
# you should have received as part of this distribution.
import os
import sys
sys.path.append(os.path.joi... |
4bac0cfeb2d8def6183b4249f0ea93329b282cb4 | botbot/envchecks.py | botbot/envchecks.py | """Tools for checking environment variables"""
import os
from configparser import NoOptionError
from .config import CONFIG
def path_sufficient():
"""
Checks whether all of the given paths are in the PATH environment
variable
"""
paths = CONFIG.get('important', 'pathitems').split(':')
for path... | """Tools for checking environment variables"""
import os
from configparser import NoOptionError
from .config import CONFIG
def path_sufficient():
"""
Checks whether all of the given paths are in the PATH environment
variable
"""
paths = CONFIG.get('important', 'pathitems').split(':')
for path... | Add checker for LD_LIBRARY_PATH env variable | Add checker for LD_LIBRARY_PATH env variable
| Python | mit | jackstanek/BotBot,jackstanek/BotBot | """Tools for checking environment variables"""
import os
from configparser import NoOptionError
from .config import CONFIG
def path_sufficient():
"""
Checks whether all of the given paths are in the PATH environment
variable
"""
paths = CONFIG.get('important', 'pathitems').split(':')
for path... | """Tools for checking environment variables"""
import os
from configparser import NoOptionError
from .config import CONFIG
def path_sufficient():
"""
Checks whether all of the given paths are in the PATH environment
variable
"""
paths = CONFIG.get('important', 'pathitems').split(':')
for path... | <commit_before>"""Tools for checking environment variables"""
import os
from configparser import NoOptionError
from .config import CONFIG
def path_sufficient():
"""
Checks whether all of the given paths are in the PATH environment
variable
"""
paths = CONFIG.get('important', 'pathitems').split(':... | """Tools for checking environment variables"""
import os
from configparser import NoOptionError
from .config import CONFIG
def path_sufficient():
"""
Checks whether all of the given paths are in the PATH environment
variable
"""
paths = CONFIG.get('important', 'pathitems').split(':')
for path... | """Tools for checking environment variables"""
import os
from configparser import NoOptionError
from .config import CONFIG
def path_sufficient():
"""
Checks whether all of the given paths are in the PATH environment
variable
"""
paths = CONFIG.get('important', 'pathitems').split(':')
for path... | <commit_before>"""Tools for checking environment variables"""
import os
from configparser import NoOptionError
from .config import CONFIG
def path_sufficient():
"""
Checks whether all of the given paths are in the PATH environment
variable
"""
paths = CONFIG.get('important', 'pathitems').split(':... |
7f127ae718ada85c66342a7d995aab21cb214a46 | IPython/core/tests/test_prefilter.py | IPython/core/tests/test_prefilter.py | """Tests for input manipulation machinery."""
#-----------------------------------------------------------------------------
# Imports
#-----------------------------------------------------------------------------
import nose.tools as nt
from IPython.testing import tools as tt, decorators as dec
#-------------------... | """Tests for input manipulation machinery."""
#-----------------------------------------------------------------------------
# Imports
#-----------------------------------------------------------------------------
import nose.tools as nt
from IPython.testing import tools as tt, decorators as dec
#-------------------... | Add some extra tests for prefiltering. | Add some extra tests for prefiltering.
| Python | bsd-3-clause | ipython/ipython,ipython/ipython | """Tests for input manipulation machinery."""
#-----------------------------------------------------------------------------
# Imports
#-----------------------------------------------------------------------------
import nose.tools as nt
from IPython.testing import tools as tt, decorators as dec
#-------------------... | """Tests for input manipulation machinery."""
#-----------------------------------------------------------------------------
# Imports
#-----------------------------------------------------------------------------
import nose.tools as nt
from IPython.testing import tools as tt, decorators as dec
#-------------------... | <commit_before>"""Tests for input manipulation machinery."""
#-----------------------------------------------------------------------------
# Imports
#-----------------------------------------------------------------------------
import nose.tools as nt
from IPython.testing import tools as tt, decorators as dec
#----... | """Tests for input manipulation machinery."""
#-----------------------------------------------------------------------------
# Imports
#-----------------------------------------------------------------------------
import nose.tools as nt
from IPython.testing import tools as tt, decorators as dec
#-------------------... | """Tests for input manipulation machinery."""
#-----------------------------------------------------------------------------
# Imports
#-----------------------------------------------------------------------------
import nose.tools as nt
from IPython.testing import tools as tt, decorators as dec
#-------------------... | <commit_before>"""Tests for input manipulation machinery."""
#-----------------------------------------------------------------------------
# Imports
#-----------------------------------------------------------------------------
import nose.tools as nt
from IPython.testing import tools as tt, decorators as dec
#----... |
805e67ad540e3072929dea30b8894af87fc622ef | uiharu/__init__.py | uiharu/__init__.py | import logging
from flask import Flask
log = logging.getLogger(__name__)
def create_app(config_dict):
app = Flask(__name__, static_folder=None)
app.config.update(**config_dict)
from uiharu.api.views import api as api_blueprint
from uiharu.weather.views import weather as weather_blueprint
app.... | import logging
log = logging.getLogger(__name__)
| Remove flask usage in init | Remove flask usage in init
| Python | mit | kennydo/uiharu | import logging
from flask import Flask
log = logging.getLogger(__name__)
def create_app(config_dict):
app = Flask(__name__, static_folder=None)
app.config.update(**config_dict)
from uiharu.api.views import api as api_blueprint
from uiharu.weather.views import weather as weather_blueprint
app.... | import logging
log = logging.getLogger(__name__)
| <commit_before>import logging
from flask import Flask
log = logging.getLogger(__name__)
def create_app(config_dict):
app = Flask(__name__, static_folder=None)
app.config.update(**config_dict)
from uiharu.api.views import api as api_blueprint
from uiharu.weather.views import weather as weather_blue... | import logging
log = logging.getLogger(__name__)
| import logging
from flask import Flask
log = logging.getLogger(__name__)
def create_app(config_dict):
app = Flask(__name__, static_folder=None)
app.config.update(**config_dict)
from uiharu.api.views import api as api_blueprint
from uiharu.weather.views import weather as weather_blueprint
app.... | <commit_before>import logging
from flask import Flask
log = logging.getLogger(__name__)
def create_app(config_dict):
app = Flask(__name__, static_folder=None)
app.config.update(**config_dict)
from uiharu.api.views import api as api_blueprint
from uiharu.weather.views import weather as weather_blue... |
f7acd07138abff6028fe6ce39f12ede04b5d7c9a | tests/test_utils.py | tests/test_utils.py | import os
from unittest import TestCase
import requests
from furikura import utils
def test_request():
requests.get('https://example.com')
class TestUtils(TestCase):
def test_get_file(self):
self.assertEqual(utils.get_file("testfile"), "/usr/share/testfile")
def test_check_connection(self):
... | import os
from unittest import TestCase
import requests
from furikura import utils
from furikura.config import Config
config_cls = Config()
def test_request():
requests.get('https://example.com')
class TestUtils(TestCase):
def test_get_file(self):
self.assertEqual(utils.get_file("testfile"), "/usr/... | Add 2 tests for Utils | Add 2 tests for Utils
| Python | mit | benjamindean/furi-kura,benjamindean/furi-kura | import os
from unittest import TestCase
import requests
from furikura import utils
def test_request():
requests.get('https://example.com')
class TestUtils(TestCase):
def test_get_file(self):
self.assertEqual(utils.get_file("testfile"), "/usr/share/testfile")
def test_check_connection(self):
... | import os
from unittest import TestCase
import requests
from furikura import utils
from furikura.config import Config
config_cls = Config()
def test_request():
requests.get('https://example.com')
class TestUtils(TestCase):
def test_get_file(self):
self.assertEqual(utils.get_file("testfile"), "/usr/... | <commit_before>import os
from unittest import TestCase
import requests
from furikura import utils
def test_request():
requests.get('https://example.com')
class TestUtils(TestCase):
def test_get_file(self):
self.assertEqual(utils.get_file("testfile"), "/usr/share/testfile")
def test_check_conne... | import os
from unittest import TestCase
import requests
from furikura import utils
from furikura.config import Config
config_cls = Config()
def test_request():
requests.get('https://example.com')
class TestUtils(TestCase):
def test_get_file(self):
self.assertEqual(utils.get_file("testfile"), "/usr/... | import os
from unittest import TestCase
import requests
from furikura import utils
def test_request():
requests.get('https://example.com')
class TestUtils(TestCase):
def test_get_file(self):
self.assertEqual(utils.get_file("testfile"), "/usr/share/testfile")
def test_check_connection(self):
... | <commit_before>import os
from unittest import TestCase
import requests
from furikura import utils
def test_request():
requests.get('https://example.com')
class TestUtils(TestCase):
def test_get_file(self):
self.assertEqual(utils.get_file("testfile"), "/usr/share/testfile")
def test_check_conne... |
b047685088b9179e0c784114ff4a41509dbfdf7d | tests/test_utils.py | tests/test_utils.py | from django_logutils.utils import add_items_to_message
def test_add_items_to_message():
msg = "log message"
items = {'user': 'benny', 'email': 'benny@example.com'}
msg = add_items_to_message(msg, items)
assert msg == 'log message user=benny email=benny@example.com'
| from django_logutils.utils import add_items_to_message
def test_add_items_to_message():
msg = "log message"
items = {'user': 'benny', 'email': 'benny@example.com'}
msg = add_items_to_message(msg, items)
assert msg.startswith('log message')
assert 'user=benny' in msg
assert 'email=benny@example... | Fix utils test and add an extra test. | Fix utils test and add an extra test.
| Python | bsd-3-clause | jsmits/django-logutils,jsmits/django-logutils | from django_logutils.utils import add_items_to_message
def test_add_items_to_message():
msg = "log message"
items = {'user': 'benny', 'email': 'benny@example.com'}
msg = add_items_to_message(msg, items)
assert msg == 'log message user=benny email=benny@example.com'
Fix utils test and add an extra test... | from django_logutils.utils import add_items_to_message
def test_add_items_to_message():
msg = "log message"
items = {'user': 'benny', 'email': 'benny@example.com'}
msg = add_items_to_message(msg, items)
assert msg.startswith('log message')
assert 'user=benny' in msg
assert 'email=benny@example... | <commit_before>from django_logutils.utils import add_items_to_message
def test_add_items_to_message():
msg = "log message"
items = {'user': 'benny', 'email': 'benny@example.com'}
msg = add_items_to_message(msg, items)
assert msg == 'log message user=benny email=benny@example.com'
<commit_msg>Fix utils... | from django_logutils.utils import add_items_to_message
def test_add_items_to_message():
msg = "log message"
items = {'user': 'benny', 'email': 'benny@example.com'}
msg = add_items_to_message(msg, items)
assert msg.startswith('log message')
assert 'user=benny' in msg
assert 'email=benny@example... | from django_logutils.utils import add_items_to_message
def test_add_items_to_message():
msg = "log message"
items = {'user': 'benny', 'email': 'benny@example.com'}
msg = add_items_to_message(msg, items)
assert msg == 'log message user=benny email=benny@example.com'
Fix utils test and add an extra test... | <commit_before>from django_logutils.utils import add_items_to_message
def test_add_items_to_message():
msg = "log message"
items = {'user': 'benny', 'email': 'benny@example.com'}
msg = add_items_to_message(msg, items)
assert msg == 'log message user=benny email=benny@example.com'
<commit_msg>Fix utils... |
a521a655db886bcd85f5f449c99875e90cd4fa93 | monitoring/nagios/logger.py | monitoring/nagios/logger.py | #===============================================================================
# -*- coding: UTF-8 -*-
# Module : log
# Author : Vincent BESANCON aka 'v!nZ' <besancon.vincent@gmail.com>
# Description : Base to have some logging.
#------------------------------------------------------------------------... | # -*- coding: UTF-8 -*-
# Copyright (C) Vincent BESANCON <besancon.vincent@gmail.com>
#
# Permission is hereby granted, free of charge, to any person obtaining
# a copy of this software and associated documentation files (the "Software"),
# to deal in the Software without restriction, including without limitation
# the... | Refresh monitoring.nagios.log and fix pylint+pep8. | Refresh monitoring.nagios.log and fix pylint+pep8.
| Python | mit | bigbrozer/monitoring.nagios,bigbrozer/monitoring.nagios | #===============================================================================
# -*- coding: UTF-8 -*-
# Module : log
# Author : Vincent BESANCON aka 'v!nZ' <besancon.vincent@gmail.com>
# Description : Base to have some logging.
#------------------------------------------------------------------------... | # -*- coding: UTF-8 -*-
# Copyright (C) Vincent BESANCON <besancon.vincent@gmail.com>
#
# Permission is hereby granted, free of charge, to any person obtaining
# a copy of this software and associated documentation files (the "Software"),
# to deal in the Software without restriction, including without limitation
# the... | <commit_before>#===============================================================================
# -*- coding: UTF-8 -*-
# Module : log
# Author : Vincent BESANCON aka 'v!nZ' <besancon.vincent@gmail.com>
# Description : Base to have some logging.
#---------------------------------------------------------... | # -*- coding: UTF-8 -*-
# Copyright (C) Vincent BESANCON <besancon.vincent@gmail.com>
#
# Permission is hereby granted, free of charge, to any person obtaining
# a copy of this software and associated documentation files (the "Software"),
# to deal in the Software without restriction, including without limitation
# the... | #===============================================================================
# -*- coding: UTF-8 -*-
# Module : log
# Author : Vincent BESANCON aka 'v!nZ' <besancon.vincent@gmail.com>
# Description : Base to have some logging.
#------------------------------------------------------------------------... | <commit_before>#===============================================================================
# -*- coding: UTF-8 -*-
# Module : log
# Author : Vincent BESANCON aka 'v!nZ' <besancon.vincent@gmail.com>
# Description : Base to have some logging.
#---------------------------------------------------------... |
8e00f9ff03464f0cf70b022f899ec7ef1c173829 | exec_thread_1.py | exec_thread_1.py | #import spam
import filter_lta
#VALID_FILES = filter_lta.VALID_OBS().split('\n')
print filter_lta.VALID_OBS()
#def extract_basename():
def main():
#Convert the LTA file to the UVFITS format
#Generates UVFITS file with same basename as LTA file
spam.convert_lta_to_uvfits('Name of the file')
#Take g... | #import spam
import filter_lta
#List of all directories containing valid observations
VALID_FILES = filter_lta.VALID_OBS()
#List of all directories for current threads to process
THREAD_FILES = VALID_FILES[0:len(VALID_FILES):5]
print THREAD_FILES
def main():
for i in THREAD_FILES:
LTA_FILES = os.chdir(... | Add code for thread to filter valid files for processing | Add code for thread to filter valid files for processing
| Python | mit | NCRA-TIFR/gadpu,NCRA-TIFR/gadpu | #import spam
import filter_lta
#VALID_FILES = filter_lta.VALID_OBS().split('\n')
print filter_lta.VALID_OBS()
#def extract_basename():
def main():
#Convert the LTA file to the UVFITS format
#Generates UVFITS file with same basename as LTA file
spam.convert_lta_to_uvfits('Name of the file')
#Take g... | #import spam
import filter_lta
#List of all directories containing valid observations
VALID_FILES = filter_lta.VALID_OBS()
#List of all directories for current threads to process
THREAD_FILES = VALID_FILES[0:len(VALID_FILES):5]
print THREAD_FILES
def main():
for i in THREAD_FILES:
LTA_FILES = os.chdir(... | <commit_before>#import spam
import filter_lta
#VALID_FILES = filter_lta.VALID_OBS().split('\n')
print filter_lta.VALID_OBS()
#def extract_basename():
def main():
#Convert the LTA file to the UVFITS format
#Generates UVFITS file with same basename as LTA file
spam.convert_lta_to_uvfits('Name of the file... | #import spam
import filter_lta
#List of all directories containing valid observations
VALID_FILES = filter_lta.VALID_OBS()
#List of all directories for current threads to process
THREAD_FILES = VALID_FILES[0:len(VALID_FILES):5]
print THREAD_FILES
def main():
for i in THREAD_FILES:
LTA_FILES = os.chdir(... | #import spam
import filter_lta
#VALID_FILES = filter_lta.VALID_OBS().split('\n')
print filter_lta.VALID_OBS()
#def extract_basename():
def main():
#Convert the LTA file to the UVFITS format
#Generates UVFITS file with same basename as LTA file
spam.convert_lta_to_uvfits('Name of the file')
#Take g... | <commit_before>#import spam
import filter_lta
#VALID_FILES = filter_lta.VALID_OBS().split('\n')
print filter_lta.VALID_OBS()
#def extract_basename():
def main():
#Convert the LTA file to the UVFITS format
#Generates UVFITS file with same basename as LTA file
spam.convert_lta_to_uvfits('Name of the file... |
34db760c5b763ad2df02398d58ea417b47b785e7 | geotrek/zoning/views.py | geotrek/zoning/views.py | from django.shortcuts import get_object_or_404
from django.views.decorators.cache import cache_page
from django.conf import settings
from django.utils.decorators import method_decorator
from djgeojson.views import GeoJSONLayerView
from .models import City, RestrictedArea, RestrictedAreaType, District
class LandLayer... | from django.shortcuts import get_object_or_404
from django.views.decorators.cache import cache_page
from django.conf import settings
from django.utils.decorators import method_decorator
from djgeojson.views import GeoJSONLayerView
from .models import City, RestrictedArea, RestrictedAreaType, District
class LandLayer... | Change cache land, use settings mapentity | Change cache land, use settings mapentity
| Python | bsd-2-clause | GeotrekCE/Geotrek-admin,makinacorpus/Geotrek,GeotrekCE/Geotrek-admin,makinacorpus/Geotrek,makinacorpus/Geotrek,GeotrekCE/Geotrek-admin,GeotrekCE/Geotrek-admin,makinacorpus/Geotrek | from django.shortcuts import get_object_or_404
from django.views.decorators.cache import cache_page
from django.conf import settings
from django.utils.decorators import method_decorator
from djgeojson.views import GeoJSONLayerView
from .models import City, RestrictedArea, RestrictedAreaType, District
class LandLayer... | from django.shortcuts import get_object_or_404
from django.views.decorators.cache import cache_page
from django.conf import settings
from django.utils.decorators import method_decorator
from djgeojson.views import GeoJSONLayerView
from .models import City, RestrictedArea, RestrictedAreaType, District
class LandLayer... | <commit_before>from django.shortcuts import get_object_or_404
from django.views.decorators.cache import cache_page
from django.conf import settings
from django.utils.decorators import method_decorator
from djgeojson.views import GeoJSONLayerView
from .models import City, RestrictedArea, RestrictedAreaType, District
... | from django.shortcuts import get_object_or_404
from django.views.decorators.cache import cache_page
from django.conf import settings
from django.utils.decorators import method_decorator
from djgeojson.views import GeoJSONLayerView
from .models import City, RestrictedArea, RestrictedAreaType, District
class LandLayer... | from django.shortcuts import get_object_or_404
from django.views.decorators.cache import cache_page
from django.conf import settings
from django.utils.decorators import method_decorator
from djgeojson.views import GeoJSONLayerView
from .models import City, RestrictedArea, RestrictedAreaType, District
class LandLayer... | <commit_before>from django.shortcuts import get_object_or_404
from django.views.decorators.cache import cache_page
from django.conf import settings
from django.utils.decorators import method_decorator
from djgeojson.views import GeoJSONLayerView
from .models import City, RestrictedArea, RestrictedAreaType, District
... |
3875b1ec7d056d337cc1c02d9567cd7ff1ae9748 | utils/sub8_ros_tools/sub8_ros_tools/init_helpers.py | utils/sub8_ros_tools/sub8_ros_tools/init_helpers.py | import rospy
from time import time
def wait_for_param(param_name, timeout=None, poll_rate=0.1):
'''Blocking wait for a parameter named $parameter_name to exist
Poll at frequency $poll_rate
Once the parameter exists, return get and return it.
This function intentionally leaves failure logging ... | import rospy
import rostest
import time
def wait_for_param(param_name, timeout=None, poll_rate=0.1):
'''Blocking wait for a parameter named $parameter_name to exist
Poll at frequency $poll_rate
Once the parameter exists, return get and return it.
This function intentionally leaves failure log... | Add init-helper 'wait for subscriber' | UTILS: Add init-helper 'wait for subscriber'
For integration-testing purposes it is often useful to wait until a
particular node subscribes to you
| Python | mit | pemami4911/Sub8,pemami4911/Sub8,pemami4911/Sub8 | import rospy
from time import time
def wait_for_param(param_name, timeout=None, poll_rate=0.1):
'''Blocking wait for a parameter named $parameter_name to exist
Poll at frequency $poll_rate
Once the parameter exists, return get and return it.
This function intentionally leaves failure logging ... | import rospy
import rostest
import time
def wait_for_param(param_name, timeout=None, poll_rate=0.1):
'''Blocking wait for a parameter named $parameter_name to exist
Poll at frequency $poll_rate
Once the parameter exists, return get and return it.
This function intentionally leaves failure log... | <commit_before>import rospy
from time import time
def wait_for_param(param_name, timeout=None, poll_rate=0.1):
'''Blocking wait for a parameter named $parameter_name to exist
Poll at frequency $poll_rate
Once the parameter exists, return get and return it.
This function intentionally leaves f... | import rospy
import rostest
import time
def wait_for_param(param_name, timeout=None, poll_rate=0.1):
'''Blocking wait for a parameter named $parameter_name to exist
Poll at frequency $poll_rate
Once the parameter exists, return get and return it.
This function intentionally leaves failure log... | import rospy
from time import time
def wait_for_param(param_name, timeout=None, poll_rate=0.1):
'''Blocking wait for a parameter named $parameter_name to exist
Poll at frequency $poll_rate
Once the parameter exists, return get and return it.
This function intentionally leaves failure logging ... | <commit_before>import rospy
from time import time
def wait_for_param(param_name, timeout=None, poll_rate=0.1):
'''Blocking wait for a parameter named $parameter_name to exist
Poll at frequency $poll_rate
Once the parameter exists, return get and return it.
This function intentionally leaves f... |
7376a29d69ac78cabc5d392cb748f708ffa0e68c | tests/pretty_format_json_test.py | tests/pretty_format_json_test.py | import tempfile
import pytest
from pre_commit_hooks.pretty_format_json import pretty_format_json
from testing.util import get_resource_path
@pytest.mark.parametrize(('filename', 'expected_retval'), (
('not_pretty_formatted_json.json', 1),
('pretty_formatted_json.json', 0),
))
def test_pretty_format_json(fil... | import io
import pytest
from pre_commit_hooks.pretty_format_json import pretty_format_json
from testing.util import get_resource_path
@pytest.mark.parametrize(('filename', 'expected_retval'), (
('not_pretty_formatted_json.json', 1),
('pretty_formatted_json.json', 0),
))
def test_pretty_format_json(filename,... | Write to temp directories in such a way that files get cleaned up | Write to temp directories in such a way that files get cleaned up
| Python | mit | Coverfox/pre-commit-hooks,Harwood/pre-commit-hooks,pre-commit/pre-commit-hooks | import tempfile
import pytest
from pre_commit_hooks.pretty_format_json import pretty_format_json
from testing.util import get_resource_path
@pytest.mark.parametrize(('filename', 'expected_retval'), (
('not_pretty_formatted_json.json', 1),
('pretty_formatted_json.json', 0),
))
def test_pretty_format_json(fil... | import io
import pytest
from pre_commit_hooks.pretty_format_json import pretty_format_json
from testing.util import get_resource_path
@pytest.mark.parametrize(('filename', 'expected_retval'), (
('not_pretty_formatted_json.json', 1),
('pretty_formatted_json.json', 0),
))
def test_pretty_format_json(filename,... | <commit_before>import tempfile
import pytest
from pre_commit_hooks.pretty_format_json import pretty_format_json
from testing.util import get_resource_path
@pytest.mark.parametrize(('filename', 'expected_retval'), (
('not_pretty_formatted_json.json', 1),
('pretty_formatted_json.json', 0),
))
def test_pretty_... | import io
import pytest
from pre_commit_hooks.pretty_format_json import pretty_format_json
from testing.util import get_resource_path
@pytest.mark.parametrize(('filename', 'expected_retval'), (
('not_pretty_formatted_json.json', 1),
('pretty_formatted_json.json', 0),
))
def test_pretty_format_json(filename,... | import tempfile
import pytest
from pre_commit_hooks.pretty_format_json import pretty_format_json
from testing.util import get_resource_path
@pytest.mark.parametrize(('filename', 'expected_retval'), (
('not_pretty_formatted_json.json', 1),
('pretty_formatted_json.json', 0),
))
def test_pretty_format_json(fil... | <commit_before>import tempfile
import pytest
from pre_commit_hooks.pretty_format_json import pretty_format_json
from testing.util import get_resource_path
@pytest.mark.parametrize(('filename', 'expected_retval'), (
('not_pretty_formatted_json.json', 1),
('pretty_formatted_json.json', 0),
))
def test_pretty_... |
91709b78c27ed0e05f3c67fcc13ffa8085dac15a | heavy-ion-luminosity.py | heavy-ion-luminosity.py | __author__ = 'jacob'
import ROOT
import numpy as np
import os
from root_numpy import root2array, root2rec, tree2rec
# Look at r284484 data
filename = os.path.join("data", "r284484.root")
# Convert a TTree in a ROOT file into a NumPy structured array
arr = root2array(filename)
print(arr.dtype)
# The TTree name is al... | __author__ = 'jacob'
import ROOT
import numpy as np
import os
from root_numpy import root2array, root2rec, tree2rec
# Look at r284484 data
filename = os.path.join("data", "r284484.root")
# Convert a TTree in a ROOT file into a NumPy structured array
arr = root2array(filename)
for element in arr.dtype.names:
pri... | Print out dtypes in .root file individually | Print out dtypes in .root file individually
| Python | mit | jacobbieker/ATLAS-Luminosity | __author__ = 'jacob'
import ROOT
import numpy as np
import os
from root_numpy import root2array, root2rec, tree2rec
# Look at r284484 data
filename = os.path.join("data", "r284484.root")
# Convert a TTree in a ROOT file into a NumPy structured array
arr = root2array(filename)
print(arr.dtype)
# The TTree name is al... | __author__ = 'jacob'
import ROOT
import numpy as np
import os
from root_numpy import root2array, root2rec, tree2rec
# Look at r284484 data
filename = os.path.join("data", "r284484.root")
# Convert a TTree in a ROOT file into a NumPy structured array
arr = root2array(filename)
for element in arr.dtype.names:
pri... | <commit_before>__author__ = 'jacob'
import ROOT
import numpy as np
import os
from root_numpy import root2array, root2rec, tree2rec
# Look at r284484 data
filename = os.path.join("data", "r284484.root")
# Convert a TTree in a ROOT file into a NumPy structured array
arr = root2array(filename)
print(arr.dtype)
# The T... | __author__ = 'jacob'
import ROOT
import numpy as np
import os
from root_numpy import root2array, root2rec, tree2rec
# Look at r284484 data
filename = os.path.join("data", "r284484.root")
# Convert a TTree in a ROOT file into a NumPy structured array
arr = root2array(filename)
for element in arr.dtype.names:
pri... | __author__ = 'jacob'
import ROOT
import numpy as np
import os
from root_numpy import root2array, root2rec, tree2rec
# Look at r284484 data
filename = os.path.join("data", "r284484.root")
# Convert a TTree in a ROOT file into a NumPy structured array
arr = root2array(filename)
print(arr.dtype)
# The TTree name is al... | <commit_before>__author__ = 'jacob'
import ROOT
import numpy as np
import os
from root_numpy import root2array, root2rec, tree2rec
# Look at r284484 data
filename = os.path.join("data", "r284484.root")
# Convert a TTree in a ROOT file into a NumPy structured array
arr = root2array(filename)
print(arr.dtype)
# The T... |
bfec6f3e2db99e20baf9b87fcd85da9ff050b030 | UM/OutputDevice/OutputDeviceError.py | UM/OutputDevice/OutputDeviceError.py | # Copyright (c) 2015 Ultimaker B.V.
# Uranium is released under the terms of the AGPLv3 or higher.
class ErrorCodes:
UserCanceledError = 1
DeviceBusyError = 2
class WriteRequestFailedError(Exception):
def __init__(self, code, message):
super().__init__(message)
self.code = code
sel... | # Copyright (c) 2015 Ultimaker B.V.
# Uranium is released under the terms of the AGPLv3 or higher.
class WriteRequestFailedError(Exception):
pass
class UserCancelledError(WriteRequestFailedError):
pass
class PermissionDeniedError(WriteRequestFailedError):
pass
class DeviceBusyError(WriteRequestFailedErr... | Replace error codes with error subclasses | Replace error codes with error subclasses
This provides the same information but is a cleaner solution for python
| Python | agpl-3.0 | onitake/Uranium,onitake/Uranium | # Copyright (c) 2015 Ultimaker B.V.
# Uranium is released under the terms of the AGPLv3 or higher.
class ErrorCodes:
UserCanceledError = 1
DeviceBusyError = 2
class WriteRequestFailedError(Exception):
def __init__(self, code, message):
super().__init__(message)
self.code = code
sel... | # Copyright (c) 2015 Ultimaker B.V.
# Uranium is released under the terms of the AGPLv3 or higher.
class WriteRequestFailedError(Exception):
pass
class UserCancelledError(WriteRequestFailedError):
pass
class PermissionDeniedError(WriteRequestFailedError):
pass
class DeviceBusyError(WriteRequestFailedErr... | <commit_before># Copyright (c) 2015 Ultimaker B.V.
# Uranium is released under the terms of the AGPLv3 or higher.
class ErrorCodes:
UserCanceledError = 1
DeviceBusyError = 2
class WriteRequestFailedError(Exception):
def __init__(self, code, message):
super().__init__(message)
self.code = c... | # Copyright (c) 2015 Ultimaker B.V.
# Uranium is released under the terms of the AGPLv3 or higher.
class WriteRequestFailedError(Exception):
pass
class UserCancelledError(WriteRequestFailedError):
pass
class PermissionDeniedError(WriteRequestFailedError):
pass
class DeviceBusyError(WriteRequestFailedErr... | # Copyright (c) 2015 Ultimaker B.V.
# Uranium is released under the terms of the AGPLv3 or higher.
class ErrorCodes:
UserCanceledError = 1
DeviceBusyError = 2
class WriteRequestFailedError(Exception):
def __init__(self, code, message):
super().__init__(message)
self.code = code
sel... | <commit_before># Copyright (c) 2015 Ultimaker B.V.
# Uranium is released under the terms of the AGPLv3 or higher.
class ErrorCodes:
UserCanceledError = 1
DeviceBusyError = 2
class WriteRequestFailedError(Exception):
def __init__(self, code, message):
super().__init__(message)
self.code = c... |
094132685688d0e9e599da6e8c0e0554945d56a5 | html5lib/trie/datrie.py | html5lib/trie/datrie.py | from __future__ import absolute_import, division, unicode_literals
from itertools import chain
from datrie import Trie as DATrie
from ._base import Trie as ABCTrie
class Trie(ABCTrie):
def __init__(self, data):
chars = set()
for key in data.keys():
if not isinstance(key, str):
... | from __future__ import absolute_import, division, unicode_literals
from itertools import chain
from datrie import Trie as DATrie
from six import text_type
from ._base import Trie as ABCTrie
class Trie(ABCTrie):
def __init__(self, data):
chars = set()
for key in data.keys():
if not is... | Fix DATrie support under Python 2. | Fix DATrie support under Python 2.
This is a simple issue of using `str` to refer to what should be
`six.text_type`.
| Python | mit | mindw/html5lib-python,html5lib/html5lib-python,alex/html5lib-python,gsnedders/html5lib-python,ordbogen/html5lib-python,dstufft/html5lib-python,alex/html5lib-python,mgilson/html5lib-python,alex/html5lib-python,mindw/html5lib-python,dstufft/html5lib-python,dstufft/html5lib-python,ordbogen/html5lib-python,html5lib/html5li... | from __future__ import absolute_import, division, unicode_literals
from itertools import chain
from datrie import Trie as DATrie
from ._base import Trie as ABCTrie
class Trie(ABCTrie):
def __init__(self, data):
chars = set()
for key in data.keys():
if not isinstance(key, str):
... | from __future__ import absolute_import, division, unicode_literals
from itertools import chain
from datrie import Trie as DATrie
from six import text_type
from ._base import Trie as ABCTrie
class Trie(ABCTrie):
def __init__(self, data):
chars = set()
for key in data.keys():
if not is... | <commit_before>from __future__ import absolute_import, division, unicode_literals
from itertools import chain
from datrie import Trie as DATrie
from ._base import Trie as ABCTrie
class Trie(ABCTrie):
def __init__(self, data):
chars = set()
for key in data.keys():
if not isinstance(ke... | from __future__ import absolute_import, division, unicode_literals
from itertools import chain
from datrie import Trie as DATrie
from six import text_type
from ._base import Trie as ABCTrie
class Trie(ABCTrie):
def __init__(self, data):
chars = set()
for key in data.keys():
if not is... | from __future__ import absolute_import, division, unicode_literals
from itertools import chain
from datrie import Trie as DATrie
from ._base import Trie as ABCTrie
class Trie(ABCTrie):
def __init__(self, data):
chars = set()
for key in data.keys():
if not isinstance(key, str):
... | <commit_before>from __future__ import absolute_import, division, unicode_literals
from itertools import chain
from datrie import Trie as DATrie
from ._base import Trie as ABCTrie
class Trie(ABCTrie):
def __init__(self, data):
chars = set()
for key in data.keys():
if not isinstance(ke... |
e20dc134911ad7b99014fdbf77dacd498cecce19 | eventkit/plugins/fluentevent/migrations/0002_fluentevent_layout.py | eventkit/plugins/fluentevent/migrations/0002_fluentevent_layout.py | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
class Migration(migrations.Migration):
dependencies = [
('icekit', '0002_layout'),
('eventkit_fluentevent', '0001_initial'),
]
operations = [
migrations.AddField(
... | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
class Migration(migrations.Migration):
dependencies = [
('icekit', '0002_layout'),
('eventkit_fluentevent', '0001_initial'),
]
operations = [
migrations.AddField(
... | Update related name for `layout` field. | Update related name for `layout` field.
| Python | mit | ic-labs/django-icekit,ic-labs/django-icekit,ic-labs/icekit-events,ic-labs/icekit-events,ic-labs/django-icekit,ic-labs/django-icekit,ic-labs/icekit-events | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
class Migration(migrations.Migration):
dependencies = [
('icekit', '0002_layout'),
('eventkit_fluentevent', '0001_initial'),
]
operations = [
migrations.AddField(
... | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
class Migration(migrations.Migration):
dependencies = [
('icekit', '0002_layout'),
('eventkit_fluentevent', '0001_initial'),
]
operations = [
migrations.AddField(
... | <commit_before># -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
class Migration(migrations.Migration):
dependencies = [
('icekit', '0002_layout'),
('eventkit_fluentevent', '0001_initial'),
]
operations = [
migrations.AddFie... | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
class Migration(migrations.Migration):
dependencies = [
('icekit', '0002_layout'),
('eventkit_fluentevent', '0001_initial'),
]
operations = [
migrations.AddField(
... | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
class Migration(migrations.Migration):
dependencies = [
('icekit', '0002_layout'),
('eventkit_fluentevent', '0001_initial'),
]
operations = [
migrations.AddField(
... | <commit_before># -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
class Migration(migrations.Migration):
dependencies = [
('icekit', '0002_layout'),
('eventkit_fluentevent', '0001_initial'),
]
operations = [
migrations.AddFie... |
73f76034b0d00c48774cafe3584bb672b8ba55bd | apps/announcements/models.py | apps/announcements/models.py | # -*- coding: utf-8 -*-
from django.db import models
from django.contrib.contenttypes.models import ContentType
from django.contrib.contenttypes import generic
class Authors(models.Model):
author = models.ForeignKey(ContentType)
object_id = models.PositiveIntegerField()
content_object = generic.GenericFor... | # -*- coding: utf-8 -*-
from django.db import models
from django.contrib.contenttypes.models import ContentType
from django.contrib.contenttypes import generic
class Authors(models.Model):
content_type = models.ForeignKey(ContentType)
object_id = models.PositiveIntegerField()
content_object = generic.Gene... | Rename of the author field to content_type in the model, in order to avoid confusion | Rename of the author field to content_type in the model, in order to
avoid confusion
| Python | agpl-3.0 | LinuxTeam-teilar/cronos.teilar.gr,LinuxTeam-teilar/cronos.teilar.gr,LinuxTeam-teilar/cronos.teilar.gr | # -*- coding: utf-8 -*-
from django.db import models
from django.contrib.contenttypes.models import ContentType
from django.contrib.contenttypes import generic
class Authors(models.Model):
author = models.ForeignKey(ContentType)
object_id = models.PositiveIntegerField()
content_object = generic.GenericFor... | # -*- coding: utf-8 -*-
from django.db import models
from django.contrib.contenttypes.models import ContentType
from django.contrib.contenttypes import generic
class Authors(models.Model):
content_type = models.ForeignKey(ContentType)
object_id = models.PositiveIntegerField()
content_object = generic.Gene... | <commit_before># -*- coding: utf-8 -*-
from django.db import models
from django.contrib.contenttypes.models import ContentType
from django.contrib.contenttypes import generic
class Authors(models.Model):
author = models.ForeignKey(ContentType)
object_id = models.PositiveIntegerField()
content_object = gen... | # -*- coding: utf-8 -*-
from django.db import models
from django.contrib.contenttypes.models import ContentType
from django.contrib.contenttypes import generic
class Authors(models.Model):
content_type = models.ForeignKey(ContentType)
object_id = models.PositiveIntegerField()
content_object = generic.Gene... | # -*- coding: utf-8 -*-
from django.db import models
from django.contrib.contenttypes.models import ContentType
from django.contrib.contenttypes import generic
class Authors(models.Model):
author = models.ForeignKey(ContentType)
object_id = models.PositiveIntegerField()
content_object = generic.GenericFor... | <commit_before># -*- coding: utf-8 -*-
from django.db import models
from django.contrib.contenttypes.models import ContentType
from django.contrib.contenttypes import generic
class Authors(models.Model):
author = models.ForeignKey(ContentType)
object_id = models.PositiveIntegerField()
content_object = gen... |
6203fcb19fa8b8ca39d419d7f0cf482a1a718a02 | indra/java_vm.py | indra/java_vm.py | """Handles all imports from jnius to prevent conflicts resulting from attempts
to set JVM options while the VM is already running."""
import jnius_config
if '-Xmx4g' not in jnius_config.get_options():
if not jnius_config.vm_running:
jnius_config.add_options('-Xmx4g')
else:
warnings.warn("Could... | """Handles all imports from jnius to prevent conflicts resulting from attempts
to set JVM options while the VM is already running."""
import os
import jnius_config
if '-Xmx4g' not in jnius_config.get_options():
if not jnius_config.vm_running:
jnius_config.add_options('-Xmx4g')
else:
warnings.w... | Set jnius classpath to biopax jars automatically | Set jnius classpath to biopax jars automatically
| Python | bsd-2-clause | johnbachman/indra,pvtodorov/indra,sorgerlab/indra,jmuhlich/indra,sorgerlab/belpy,johnbachman/belpy,pvtodorov/indra,pvtodorov/indra,sorgerlab/belpy,jmuhlich/indra,sorgerlab/indra,johnbachman/indra,pvtodorov/indra,bgyori/indra,bgyori/indra,bgyori/indra,johnbachman/belpy,jmuhlich/indra,johnbachman/belpy,sorgerlab/belpy,so... | """Handles all imports from jnius to prevent conflicts resulting from attempts
to set JVM options while the VM is already running."""
import jnius_config
if '-Xmx4g' not in jnius_config.get_options():
if not jnius_config.vm_running:
jnius_config.add_options('-Xmx4g')
else:
warnings.warn("Could... | """Handles all imports from jnius to prevent conflicts resulting from attempts
to set JVM options while the VM is already running."""
import os
import jnius_config
if '-Xmx4g' not in jnius_config.get_options():
if not jnius_config.vm_running:
jnius_config.add_options('-Xmx4g')
else:
warnings.w... | <commit_before>"""Handles all imports from jnius to prevent conflicts resulting from attempts
to set JVM options while the VM is already running."""
import jnius_config
if '-Xmx4g' not in jnius_config.get_options():
if not jnius_config.vm_running:
jnius_config.add_options('-Xmx4g')
else:
warni... | """Handles all imports from jnius to prevent conflicts resulting from attempts
to set JVM options while the VM is already running."""
import os
import jnius_config
if '-Xmx4g' not in jnius_config.get_options():
if not jnius_config.vm_running:
jnius_config.add_options('-Xmx4g')
else:
warnings.w... | """Handles all imports from jnius to prevent conflicts resulting from attempts
to set JVM options while the VM is already running."""
import jnius_config
if '-Xmx4g' not in jnius_config.get_options():
if not jnius_config.vm_running:
jnius_config.add_options('-Xmx4g')
else:
warnings.warn("Could... | <commit_before>"""Handles all imports from jnius to prevent conflicts resulting from attempts
to set JVM options while the VM is already running."""
import jnius_config
if '-Xmx4g' not in jnius_config.get_options():
if not jnius_config.vm_running:
jnius_config.add_options('-Xmx4g')
else:
warni... |
9e4c34ee1e2de5fb8611d2c4b540e55d9872d0ae | astro.py | astro.py | import ephem
from datetime import datetime
def const(planet_name): # function name and parameters
planet_class = getattr(ephem, planet_name) # sets ephem object class
date_class = datetime.now()
planet = planet_class() # sets planet variable
south_bend = ephem.Observer... | import ephem
from datetime import datetime
def star(star_name):
star = ephem.star(star_name)
south_bend = ephem.Observer()
date_class = datetime.now()
south_bend.lat = '41.15'
south_bend.lon = '-86.26'
south_bend.date = date_class
star.compute(south_bend)
print date_class
print ... | Add menu to choose star or planet, print results. | Add menu to choose star or planet, print results.
| Python | mit | bennettscience/PySky | import ephem
from datetime import datetime
def const(planet_name): # function name and parameters
planet_class = getattr(ephem, planet_name) # sets ephem object class
date_class = datetime.now()
planet = planet_class() # sets planet variable
south_bend = ephem.Observer... | import ephem
from datetime import datetime
def star(star_name):
star = ephem.star(star_name)
south_bend = ephem.Observer()
date_class = datetime.now()
south_bend.lat = '41.15'
south_bend.lon = '-86.26'
south_bend.date = date_class
star.compute(south_bend)
print date_class
print ... | <commit_before>import ephem
from datetime import datetime
def const(planet_name): # function name and parameters
planet_class = getattr(ephem, planet_name) # sets ephem object class
date_class = datetime.now()
planet = planet_class() # sets planet variable
south_bend =... | import ephem
from datetime import datetime
def star(star_name):
star = ephem.star(star_name)
south_bend = ephem.Observer()
date_class = datetime.now()
south_bend.lat = '41.15'
south_bend.lon = '-86.26'
south_bend.date = date_class
star.compute(south_bend)
print date_class
print ... | import ephem
from datetime import datetime
def const(planet_name): # function name and parameters
planet_class = getattr(ephem, planet_name) # sets ephem object class
date_class = datetime.now()
planet = planet_class() # sets planet variable
south_bend = ephem.Observer... | <commit_before>import ephem
from datetime import datetime
def const(planet_name): # function name and parameters
planet_class = getattr(ephem, planet_name) # sets ephem object class
date_class = datetime.now()
planet = planet_class() # sets planet variable
south_bend =... |
628f9edd7aefda1f9cf29cd5a3d04342877a5c38 | custom/icds/rules/custom_actions.py | custom/icds/rules/custom_actions.py | from corehq.apps.data_interfaces.models import CaseRuleActionResult, AUTO_UPDATE_XMLNS
from corehq.apps.hqcase.utils import update_case
def escalate_tech_issue(case, rule):
if case.type != 'tech_issue'
return CaseRuleActionResult()
escalated_ticket_level_map = {
'supervisor': 'block',
... | import pytz
from corehq.apps.data_interfaces.models import CaseRuleActionResult, AUTO_UPDATE_XMLNS
from corehq.apps.hqcase.utils import update_case
from corehq.util.timezones.conversions import ServerTime
from datetime import datetime
def escalate_tech_issue(case, rule):
if case.type != 'tech_issue'
retur... | Add more properties to be updated | Add more properties to be updated
| Python | bsd-3-clause | dimagi/commcare-hq,dimagi/commcare-hq,dimagi/commcare-hq,dimagi/commcare-hq,dimagi/commcare-hq | from corehq.apps.data_interfaces.models import CaseRuleActionResult, AUTO_UPDATE_XMLNS
from corehq.apps.hqcase.utils import update_case
def escalate_tech_issue(case, rule):
if case.type != 'tech_issue'
return CaseRuleActionResult()
escalated_ticket_level_map = {
'supervisor': 'block',
... | import pytz
from corehq.apps.data_interfaces.models import CaseRuleActionResult, AUTO_UPDATE_XMLNS
from corehq.apps.hqcase.utils import update_case
from corehq.util.timezones.conversions import ServerTime
from datetime import datetime
def escalate_tech_issue(case, rule):
if case.type != 'tech_issue'
retur... | <commit_before>from corehq.apps.data_interfaces.models import CaseRuleActionResult, AUTO_UPDATE_XMLNS
from corehq.apps.hqcase.utils import update_case
def escalate_tech_issue(case, rule):
if case.type != 'tech_issue'
return CaseRuleActionResult()
escalated_ticket_level_map = {
'supervisor': '... | import pytz
from corehq.apps.data_interfaces.models import CaseRuleActionResult, AUTO_UPDATE_XMLNS
from corehq.apps.hqcase.utils import update_case
from corehq.util.timezones.conversions import ServerTime
from datetime import datetime
def escalate_tech_issue(case, rule):
if case.type != 'tech_issue'
retur... | from corehq.apps.data_interfaces.models import CaseRuleActionResult, AUTO_UPDATE_XMLNS
from corehq.apps.hqcase.utils import update_case
def escalate_tech_issue(case, rule):
if case.type != 'tech_issue'
return CaseRuleActionResult()
escalated_ticket_level_map = {
'supervisor': 'block',
... | <commit_before>from corehq.apps.data_interfaces.models import CaseRuleActionResult, AUTO_UPDATE_XMLNS
from corehq.apps.hqcase.utils import update_case
def escalate_tech_issue(case, rule):
if case.type != 'tech_issue'
return CaseRuleActionResult()
escalated_ticket_level_map = {
'supervisor': '... |
d6b7cccb14cd1f82bb3a6b070999204fafacf07e | hyper/common/util.py | hyper/common/util.py | # -*- coding: utf-8 -*-
"""
hyper/common/util
~~~~~~~~~~~~~~~~~
General utility functions for use with hyper.
"""
from hyper.compat import unicode, bytes, imap
def to_bytestring(element):
"""
Converts a single string to a bytestring, encoding via UTF-8 if needed.
"""
if isinstance(element, unicode):
... | # -*- coding: utf-8 -*-
"""
hyper/common/util
~~~~~~~~~~~~~~~~~
General utility functions for use with hyper.
"""
from hyper.compat import unicode, bytes, imap
def to_bytestring(element):
"""
Converts a single string to a bytestring, encoding via UTF-8 if needed.
"""
if isinstance(element, unicode):
... | Fix to_host_port_tuple to resolve test case issues | Fix to_host_port_tuple to resolve test case issues
| Python | mit | Lukasa/hyper,lawnmowerlatte/hyper,irvind/hyper,Lukasa/hyper,lawnmowerlatte/hyper,fredthomsen/hyper,irvind/hyper,plucury/hyper,fredthomsen/hyper,plucury/hyper | # -*- coding: utf-8 -*-
"""
hyper/common/util
~~~~~~~~~~~~~~~~~
General utility functions for use with hyper.
"""
from hyper.compat import unicode, bytes, imap
def to_bytestring(element):
"""
Converts a single string to a bytestring, encoding via UTF-8 if needed.
"""
if isinstance(element, unicode):
... | # -*- coding: utf-8 -*-
"""
hyper/common/util
~~~~~~~~~~~~~~~~~
General utility functions for use with hyper.
"""
from hyper.compat import unicode, bytes, imap
def to_bytestring(element):
"""
Converts a single string to a bytestring, encoding via UTF-8 if needed.
"""
if isinstance(element, unicode):
... | <commit_before># -*- coding: utf-8 -*-
"""
hyper/common/util
~~~~~~~~~~~~~~~~~
General utility functions for use with hyper.
"""
from hyper.compat import unicode, bytes, imap
def to_bytestring(element):
"""
Converts a single string to a bytestring, encoding via UTF-8 if needed.
"""
if isinstance(eleme... | # -*- coding: utf-8 -*-
"""
hyper/common/util
~~~~~~~~~~~~~~~~~
General utility functions for use with hyper.
"""
from hyper.compat import unicode, bytes, imap
def to_bytestring(element):
"""
Converts a single string to a bytestring, encoding via UTF-8 if needed.
"""
if isinstance(element, unicode):
... | # -*- coding: utf-8 -*-
"""
hyper/common/util
~~~~~~~~~~~~~~~~~
General utility functions for use with hyper.
"""
from hyper.compat import unicode, bytes, imap
def to_bytestring(element):
"""
Converts a single string to a bytestring, encoding via UTF-8 if needed.
"""
if isinstance(element, unicode):
... | <commit_before># -*- coding: utf-8 -*-
"""
hyper/common/util
~~~~~~~~~~~~~~~~~
General utility functions for use with hyper.
"""
from hyper.compat import unicode, bytes, imap
def to_bytestring(element):
"""
Converts a single string to a bytestring, encoding via UTF-8 if needed.
"""
if isinstance(eleme... |
67a50f33177e0fa6aec15fc7d26836c38b374c31 | plugins/lastfm.py | plugins/lastfm.py | from util import hook, http
api_key = ""
api_url = "http://ws.audioscrobbler.com/2.0/?format=json"
@hook.command
def lastfm(inp, nick='', say=None):
if inp:
user = inp
else:
user = nick
response = http.get_json(api_url, method="user.getrecenttracks",
api_key=... | from util import hook, http
api_key = ""
api_url = "http://ws.audioscrobbler.com/2.0/?format=json"
@hook.command
def lastfm(inp, nick='', say=None):
if inp:
user = inp
else:
user = nick
response = http.get_json(api_url, method="user.getrecenttracks",
api_key=... | Fix last.fm bug for users not listening to something. | Fix last.fm bug for users not listening to something.
The last.fm plugin previously worked only for users not listening to
anything, and then it was 'fixed' for users listening to something, but
broke for users not listening to something. See lastfm.py comments for
changes.
| Python | unlicense | parkrrr/skybot,Jeebeevee/DouweBot_JJ15,craisins/wh2kbot,callumhogsden/ausbot,df-5/skybot,ddwo/nhl-bot,Jeebeevee/DouweBot,rmmh/skybot,TeamPeggle/ppp-helpdesk,crisisking/skybot,Teino1978-Corp/Teino1978-Corp-skybot,isislab/botbot,cmarguel/skybot,jmgao/skybot,craisins/nascarbot,olslash/skybot,andyeff/skybot,SophosBlitz/gla... | from util import hook, http
api_key = ""
api_url = "http://ws.audioscrobbler.com/2.0/?format=json"
@hook.command
def lastfm(inp, nick='', say=None):
if inp:
user = inp
else:
user = nick
response = http.get_json(api_url, method="user.getrecenttracks",
api_key=... | from util import hook, http
api_key = ""
api_url = "http://ws.audioscrobbler.com/2.0/?format=json"
@hook.command
def lastfm(inp, nick='', say=None):
if inp:
user = inp
else:
user = nick
response = http.get_json(api_url, method="user.getrecenttracks",
api_key=... | <commit_before>from util import hook, http
api_key = ""
api_url = "http://ws.audioscrobbler.com/2.0/?format=json"
@hook.command
def lastfm(inp, nick='', say=None):
if inp:
user = inp
else:
user = nick
response = http.get_json(api_url, method="user.getrecenttracks",
... | from util import hook, http
api_key = ""
api_url = "http://ws.audioscrobbler.com/2.0/?format=json"
@hook.command
def lastfm(inp, nick='', say=None):
if inp:
user = inp
else:
user = nick
response = http.get_json(api_url, method="user.getrecenttracks",
api_key=... | from util import hook, http
api_key = ""
api_url = "http://ws.audioscrobbler.com/2.0/?format=json"
@hook.command
def lastfm(inp, nick='', say=None):
if inp:
user = inp
else:
user = nick
response = http.get_json(api_url, method="user.getrecenttracks",
api_key=... | <commit_before>from util import hook, http
api_key = ""
api_url = "http://ws.audioscrobbler.com/2.0/?format=json"
@hook.command
def lastfm(inp, nick='', say=None):
if inp:
user = inp
else:
user = nick
response = http.get_json(api_url, method="user.getrecenttracks",
... |
c7d0f17f552e825582a616e05e5fa91690f18b29 | flask/kasm-server.py | flask/kasm-server.py | import json
import random
import string
from flask import Flask, request, jsonify, render_template
from flask.ext.pymongo import PyMongo
from pymongo.errors import DuplicateKeyError
app = Flask(__name__)
app.config['MONGO_DBNAME'] = 'kasm'
mongo = PyMongo(app)
@app.route('/')
def hello_world():
return render_temp... | import json
import random
import string
from flask import Flask, request, jsonify, render_template
from flask.ext.pymongo import PyMongo
from pymongo.errors import DuplicateKeyError
app = Flask(__name__)
app.config['MONGO_DBNAME'] = 'kasm'
mongo = PyMongo(app)
@app.route('/')
def hello_world():
return render_temp... | Fix missing import, add alias/deactivate method | Fix missing import, add alias/deactivate method
| Python | mit | clayadavis/OpenKasm,clayadavis/OpenKasm | import json
import random
import string
from flask import Flask, request, jsonify, render_template
from flask.ext.pymongo import PyMongo
from pymongo.errors import DuplicateKeyError
app = Flask(__name__)
app.config['MONGO_DBNAME'] = 'kasm'
mongo = PyMongo(app)
@app.route('/')
def hello_world():
return render_temp... | import json
import random
import string
from flask import Flask, request, jsonify, render_template
from flask.ext.pymongo import PyMongo
from pymongo.errors import DuplicateKeyError
app = Flask(__name__)
app.config['MONGO_DBNAME'] = 'kasm'
mongo = PyMongo(app)
@app.route('/')
def hello_world():
return render_temp... | <commit_before>import json
import random
import string
from flask import Flask, request, jsonify, render_template
from flask.ext.pymongo import PyMongo
from pymongo.errors import DuplicateKeyError
app = Flask(__name__)
app.config['MONGO_DBNAME'] = 'kasm'
mongo = PyMongo(app)
@app.route('/')
def hello_world():
ret... | import json
import random
import string
from flask import Flask, request, jsonify, render_template
from flask.ext.pymongo import PyMongo
from pymongo.errors import DuplicateKeyError
app = Flask(__name__)
app.config['MONGO_DBNAME'] = 'kasm'
mongo = PyMongo(app)
@app.route('/')
def hello_world():
return render_temp... | import json
import random
import string
from flask import Flask, request, jsonify, render_template
from flask.ext.pymongo import PyMongo
from pymongo.errors import DuplicateKeyError
app = Flask(__name__)
app.config['MONGO_DBNAME'] = 'kasm'
mongo = PyMongo(app)
@app.route('/')
def hello_world():
return render_temp... | <commit_before>import json
import random
import string
from flask import Flask, request, jsonify, render_template
from flask.ext.pymongo import PyMongo
from pymongo.errors import DuplicateKeyError
app = Flask(__name__)
app.config['MONGO_DBNAME'] = 'kasm'
mongo = PyMongo(app)
@app.route('/')
def hello_world():
ret... |
14ac1f7f4cec2f461f9e2df136bc3cf9894a9359 | website/services.py | website/services.py | # -*- coding: utf-8 -*-
"""
website.services
~~~~~~~~~~~~~~~~
top level services api.
:copyright: (c) 2014 by xiong.xiaox(xiong.xiaox@alibaba-inc.com).
"""
import subprocess
from threading import Timer
def exec_command(cmd):
proc = subprocess.Popen(cmd, stdout=subprocess.PIPE,
... | # -*- coding: utf-8 -*-
"""
website.services
~~~~~~~~~~~~~~~~
top level services api.
:copyright: (c) 2014 by xiong.xiaox(xiong.xiaox@alibaba-inc.com).
"""
import subprocess
from threading import Timer
def exec_command(cmd):
proc = subprocess.Popen(cmd, stdout=subprocess.PIPE,
... | Fix exec command timeout timer bug. | Fix exec command timeout timer bug.
| Python | bsd-3-clause | alibaba/FlexGW,alibaba/FlexGW,alibaba/FlexGW,alibaba/FlexGW,sdgdsffdsfff/FlexGW,sdgdsffdsfff/FlexGW,sdgdsffdsfff/FlexGW,sdgdsffdsfff/FlexGW | # -*- coding: utf-8 -*-
"""
website.services
~~~~~~~~~~~~~~~~
top level services api.
:copyright: (c) 2014 by xiong.xiaox(xiong.xiaox@alibaba-inc.com).
"""
import subprocess
from threading import Timer
def exec_command(cmd):
proc = subprocess.Popen(cmd, stdout=subprocess.PIPE,
... | # -*- coding: utf-8 -*-
"""
website.services
~~~~~~~~~~~~~~~~
top level services api.
:copyright: (c) 2014 by xiong.xiaox(xiong.xiaox@alibaba-inc.com).
"""
import subprocess
from threading import Timer
def exec_command(cmd):
proc = subprocess.Popen(cmd, stdout=subprocess.PIPE,
... | <commit_before># -*- coding: utf-8 -*-
"""
website.services
~~~~~~~~~~~~~~~~
top level services api.
:copyright: (c) 2014 by xiong.xiaox(xiong.xiaox@alibaba-inc.com).
"""
import subprocess
from threading import Timer
def exec_command(cmd):
proc = subprocess.Popen(cmd, stdout=subprocess.PIPE,
... | # -*- coding: utf-8 -*-
"""
website.services
~~~~~~~~~~~~~~~~
top level services api.
:copyright: (c) 2014 by xiong.xiaox(xiong.xiaox@alibaba-inc.com).
"""
import subprocess
from threading import Timer
def exec_command(cmd):
proc = subprocess.Popen(cmd, stdout=subprocess.PIPE,
... | # -*- coding: utf-8 -*-
"""
website.services
~~~~~~~~~~~~~~~~
top level services api.
:copyright: (c) 2014 by xiong.xiaox(xiong.xiaox@alibaba-inc.com).
"""
import subprocess
from threading import Timer
def exec_command(cmd):
proc = subprocess.Popen(cmd, stdout=subprocess.PIPE,
... | <commit_before># -*- coding: utf-8 -*-
"""
website.services
~~~~~~~~~~~~~~~~
top level services api.
:copyright: (c) 2014 by xiong.xiaox(xiong.xiaox@alibaba-inc.com).
"""
import subprocess
from threading import Timer
def exec_command(cmd):
proc = subprocess.Popen(cmd, stdout=subprocess.PIPE,
... |
1cb6aeab0d86ce79ecbb26ecc705902a0b360b93 | powerline/core.py | powerline/core.py | # -*- coding: utf-8 -*-
class Powerline(object):
def __init__(self, segments):
'''Create a new Powerline.
Segments that aren't filler segments and whose contents aren't None are
dropped from the segment array.
'''
self.segments = [segment for segment in segments if segment['contents'] is not None or segme... | # -*- coding: utf-8 -*-
class Powerline(object):
def __init__(self, segments):
'''Create a new Powerline.
Segments that aren't filler segments and whose contents aren't None are
dropped from the segment array.
'''
self.renderer = None # FIXME This should be assigned here based on the current configuratio... | Create renderer property for Powerline class | Create renderer property for Powerline class
| Python | mit | seanfisk/powerline,EricSB/powerline,darac/powerline,dragon788/powerline,QuLogic/powerline,keelerm84/powerline,xxxhycl2010/powerline,blindFS/powerline,junix/powerline,cyrixhero/powerline,IvanAli/powerline,keelerm84/powerline,xxxhycl2010/powerline,Luffin/powerline,s0undt3ch/powerline,DoctorJellyface/powerline,Luffin/powe... | # -*- coding: utf-8 -*-
class Powerline(object):
def __init__(self, segments):
'''Create a new Powerline.
Segments that aren't filler segments and whose contents aren't None are
dropped from the segment array.
'''
self.segments = [segment for segment in segments if segment['contents'] is not None or segme... | # -*- coding: utf-8 -*-
class Powerline(object):
def __init__(self, segments):
'''Create a new Powerline.
Segments that aren't filler segments and whose contents aren't None are
dropped from the segment array.
'''
self.renderer = None # FIXME This should be assigned here based on the current configuratio... | <commit_before># -*- coding: utf-8 -*-
class Powerline(object):
def __init__(self, segments):
'''Create a new Powerline.
Segments that aren't filler segments and whose contents aren't None are
dropped from the segment array.
'''
self.segments = [segment for segment in segments if segment['contents'] is no... | # -*- coding: utf-8 -*-
class Powerline(object):
def __init__(self, segments):
'''Create a new Powerline.
Segments that aren't filler segments and whose contents aren't None are
dropped from the segment array.
'''
self.renderer = None # FIXME This should be assigned here based on the current configuratio... | # -*- coding: utf-8 -*-
class Powerline(object):
def __init__(self, segments):
'''Create a new Powerline.
Segments that aren't filler segments and whose contents aren't None are
dropped from the segment array.
'''
self.segments = [segment for segment in segments if segment['contents'] is not None or segme... | <commit_before># -*- coding: utf-8 -*-
class Powerline(object):
def __init__(self, segments):
'''Create a new Powerline.
Segments that aren't filler segments and whose contents aren't None are
dropped from the segment array.
'''
self.segments = [segment for segment in segments if segment['contents'] is no... |
c487dfc63e71abb0e11534c42591c216def5c433 | ITDB/ITDB_Main/views.py | ITDB/ITDB_Main/views.py | from django.http import Http404
from django.http import HttpResponse
from django.shortcuts import render
from django.template import RequestContext, loader
from .models import Theater
# Default first page. Should be the search page.
def index(request):
return HttpResponse("Hello, world. You're at the ITDB_Main in... | from django.http import Http404
from django.http import HttpResponse
from django.shortcuts import get_object_or_404, render
from django.template import RequestContext, loader
from .models import Theater
# Default first page. Should be the search page.
def index(request):
return HttpResponse("Hello, world. You're ... | Update theater view to use get_object_or_404 shortcut | Update theater view to use get_object_or_404 shortcut
| Python | apache-2.0 | Plaudenslager/ITDB,Plaudenslager/ITDB,Plaudenslager/ITDB | from django.http import Http404
from django.http import HttpResponse
from django.shortcuts import render
from django.template import RequestContext, loader
from .models import Theater
# Default first page. Should be the search page.
def index(request):
return HttpResponse("Hello, world. You're at the ITDB_Main in... | from django.http import Http404
from django.http import HttpResponse
from django.shortcuts import get_object_or_404, render
from django.template import RequestContext, loader
from .models import Theater
# Default first page. Should be the search page.
def index(request):
return HttpResponse("Hello, world. You're ... | <commit_before>from django.http import Http404
from django.http import HttpResponse
from django.shortcuts import render
from django.template import RequestContext, loader
from .models import Theater
# Default first page. Should be the search page.
def index(request):
return HttpResponse("Hello, world. You're at t... | from django.http import Http404
from django.http import HttpResponse
from django.shortcuts import get_object_or_404, render
from django.template import RequestContext, loader
from .models import Theater
# Default first page. Should be the search page.
def index(request):
return HttpResponse("Hello, world. You're ... | from django.http import Http404
from django.http import HttpResponse
from django.shortcuts import render
from django.template import RequestContext, loader
from .models import Theater
# Default first page. Should be the search page.
def index(request):
return HttpResponse("Hello, world. You're at the ITDB_Main in... | <commit_before>from django.http import Http404
from django.http import HttpResponse
from django.shortcuts import render
from django.template import RequestContext, loader
from .models import Theater
# Default first page. Should be the search page.
def index(request):
return HttpResponse("Hello, world. You're at t... |
7d59b8d25d2ff917794a181b614a284e4e75acc5 | account_fiscal_position_no_source_tax/account.py | account_fiscal_position_no_source_tax/account.py | from openerp import models, api, fields
class account_fiscal_position(models.Model):
_inherit = 'account.fiscal.position'
@api.v8 # noqa
def map_tax(self, taxes):
result = super(account_fiscal_position, self).map_tax(taxes)
taxes_without_src_ids = [
x.tax_dest_id.id for x... | from openerp import models, api, fields
class account_fiscal_position(models.Model):
_inherit = 'account.fiscal.position'
@api.v7
def map_tax(self, cr, uid, fposition_id, taxes, context=None):
result = super(account_fiscal_position, self).map_tax(
cr, uid, fposition_id, taxes, contex... | FIX fiscal position no source tax on v7 api | FIX fiscal position no source tax on v7 api
| Python | agpl-3.0 | csrocha/account_journal_payment_subtype,csrocha/account_voucher_payline | from openerp import models, api, fields
class account_fiscal_position(models.Model):
_inherit = 'account.fiscal.position'
@api.v8 # noqa
def map_tax(self, taxes):
result = super(account_fiscal_position, self).map_tax(taxes)
taxes_without_src_ids = [
x.tax_dest_id.id for x... | from openerp import models, api, fields
class account_fiscal_position(models.Model):
_inherit = 'account.fiscal.position'
@api.v7
def map_tax(self, cr, uid, fposition_id, taxes, context=None):
result = super(account_fiscal_position, self).map_tax(
cr, uid, fposition_id, taxes, contex... | <commit_before>from openerp import models, api, fields
class account_fiscal_position(models.Model):
_inherit = 'account.fiscal.position'
@api.v8 # noqa
def map_tax(self, taxes):
result = super(account_fiscal_position, self).map_tax(taxes)
taxes_without_src_ids = [
x.tax_d... | from openerp import models, api, fields
class account_fiscal_position(models.Model):
_inherit = 'account.fiscal.position'
@api.v7
def map_tax(self, cr, uid, fposition_id, taxes, context=None):
result = super(account_fiscal_position, self).map_tax(
cr, uid, fposition_id, taxes, contex... | from openerp import models, api, fields
class account_fiscal_position(models.Model):
_inherit = 'account.fiscal.position'
@api.v8 # noqa
def map_tax(self, taxes):
result = super(account_fiscal_position, self).map_tax(taxes)
taxes_without_src_ids = [
x.tax_dest_id.id for x... | <commit_before>from openerp import models, api, fields
class account_fiscal_position(models.Model):
_inherit = 'account.fiscal.position'
@api.v8 # noqa
def map_tax(self, taxes):
result = super(account_fiscal_position, self).map_tax(taxes)
taxes_without_src_ids = [
x.tax_d... |
18796393fa18590d9de6c67ccb9ac6fd958855fc | api/api_resource.py | api/api_resource.py | from falcon.util.uri import parse_query_string
import json
from api.actions import pos_tagging
class ApiResource(object):
def parse_request_data(self, raw_post_data):
try:
raw_correct_encoded = str(raw_post_data, 'utf-8')
except UnicodeDecodeError:
raw_correct_encoded = ""
... | from falcon.util.uri import parse_query_string
import json
from api.actions import pos_tagging
class ApiResource(object):
def parse_request_data(self, raw_post_data):
encoded_raw_post_data = ""
try:
encoded_raw_post_data = str(raw_post_data, 'utf-8')
except UnicodeDecodeError:
... | Refactor handling of pretty parameter. | Refactor handling of pretty parameter.
Former-commit-id: 04093318dd591d642854485a97109855275c8596 | Python | mit | EmilStenstrom/json-tagger,EmilStenstrom/json-tagger,EmilStenstrom/json-tagger,EmilStenstrom/json-tagger,EmilStenstrom/json-tagger | from falcon.util.uri import parse_query_string
import json
from api.actions import pos_tagging
class ApiResource(object):
def parse_request_data(self, raw_post_data):
try:
raw_correct_encoded = str(raw_post_data, 'utf-8')
except UnicodeDecodeError:
raw_correct_encoded = ""
... | from falcon.util.uri import parse_query_string
import json
from api.actions import pos_tagging
class ApiResource(object):
def parse_request_data(self, raw_post_data):
encoded_raw_post_data = ""
try:
encoded_raw_post_data = str(raw_post_data, 'utf-8')
except UnicodeDecodeError:
... | <commit_before>from falcon.util.uri import parse_query_string
import json
from api.actions import pos_tagging
class ApiResource(object):
def parse_request_data(self, raw_post_data):
try:
raw_correct_encoded = str(raw_post_data, 'utf-8')
except UnicodeDecodeError:
raw_correct... | from falcon.util.uri import parse_query_string
import json
from api.actions import pos_tagging
class ApiResource(object):
def parse_request_data(self, raw_post_data):
encoded_raw_post_data = ""
try:
encoded_raw_post_data = str(raw_post_data, 'utf-8')
except UnicodeDecodeError:
... | from falcon.util.uri import parse_query_string
import json
from api.actions import pos_tagging
class ApiResource(object):
def parse_request_data(self, raw_post_data):
try:
raw_correct_encoded = str(raw_post_data, 'utf-8')
except UnicodeDecodeError:
raw_correct_encoded = ""
... | <commit_before>from falcon.util.uri import parse_query_string
import json
from api.actions import pos_tagging
class ApiResource(object):
def parse_request_data(self, raw_post_data):
try:
raw_correct_encoded = str(raw_post_data, 'utf-8')
except UnicodeDecodeError:
raw_correct... |
18ed712bad3beb8c128f56638878e66f34bcf722 | Lib/test/test_binhex.py | Lib/test/test_binhex.py | #! /usr/bin/env python
"""Test script for the binhex C module
Uses the mechanism of the python binhex module
Roger E. Masse
"""
import binhex
import tempfile
from test_support import verbose, TestSkipped
def test():
try:
fname1 = tempfile.mktemp()
fname2 = tempfile.mktemp()
f = open... | #! /usr/bin/env python
"""Test script for the binhex C module
Uses the mechanism of the python binhex module
Based on an original test by Roger E. Masse.
"""
import binhex
import os
import tempfile
import test_support
import unittest
class BinHexTestCase(unittest.TestCase):
def setUp(self):
self.f... | Convert binhex regression test to PyUnit. We could use a better test for this. | Convert binhex regression test to PyUnit. We could use a better test
for this.
| Python | mit | sk-/python2.7-type-annotator,sk-/python2.7-type-annotator,sk-/python2.7-type-annotator | #! /usr/bin/env python
"""Test script for the binhex C module
Uses the mechanism of the python binhex module
Roger E. Masse
"""
import binhex
import tempfile
from test_support import verbose, TestSkipped
def test():
try:
fname1 = tempfile.mktemp()
fname2 = tempfile.mktemp()
f = open... | #! /usr/bin/env python
"""Test script for the binhex C module
Uses the mechanism of the python binhex module
Based on an original test by Roger E. Masse.
"""
import binhex
import os
import tempfile
import test_support
import unittest
class BinHexTestCase(unittest.TestCase):
def setUp(self):
self.f... | <commit_before>#! /usr/bin/env python
"""Test script for the binhex C module
Uses the mechanism of the python binhex module
Roger E. Masse
"""
import binhex
import tempfile
from test_support import verbose, TestSkipped
def test():
try:
fname1 = tempfile.mktemp()
fname2 = tempfile.mktemp()
... | #! /usr/bin/env python
"""Test script for the binhex C module
Uses the mechanism of the python binhex module
Based on an original test by Roger E. Masse.
"""
import binhex
import os
import tempfile
import test_support
import unittest
class BinHexTestCase(unittest.TestCase):
def setUp(self):
self.f... | #! /usr/bin/env python
"""Test script for the binhex C module
Uses the mechanism of the python binhex module
Roger E. Masse
"""
import binhex
import tempfile
from test_support import verbose, TestSkipped
def test():
try:
fname1 = tempfile.mktemp()
fname2 = tempfile.mktemp()
f = open... | <commit_before>#! /usr/bin/env python
"""Test script for the binhex C module
Uses the mechanism of the python binhex module
Roger E. Masse
"""
import binhex
import tempfile
from test_support import verbose, TestSkipped
def test():
try:
fname1 = tempfile.mktemp()
fname2 = tempfile.mktemp()
... |
9fece51bc6b3496381871c0fc7db486f8fbfebd7 | chef/tests/test_role.py | chef/tests/test_role.py | from chef import Role
from chef.exceptions import ChefError
from chef.tests import ChefTestCase
class RoleTestCase(ChefTestCase):
def test_get(self):
r = Role('test_1')
self.assertTrue(r.exists)
self.assertEqual(r.description, 'Static test role 1')
self.assertEqual(r.run_list, [])
... | from chef import Role
from chef.exceptions import ChefError
from chef.tests import ChefTestCase
class RoleTestCase(ChefTestCase):
def test_get(self):
r = Role('test_1')
self.assertTrue(r.exists)
self.assertEqual(r.description, 'Static test role 1')
self.assertEqual(r.run_list, [])
... | Add tests for role attributes. | Add tests for role attributes. | Python | apache-2.0 | cread/pychef,jarosser06/pychef,jarosser06/pychef,coderanger/pychef,Scalr/pychef,dipakvwarade/pychef,cread/pychef,dipakvwarade/pychef,coderanger/pychef,Scalr/pychef | from chef import Role
from chef.exceptions import ChefError
from chef.tests import ChefTestCase
class RoleTestCase(ChefTestCase):
def test_get(self):
r = Role('test_1')
self.assertTrue(r.exists)
self.assertEqual(r.description, 'Static test role 1')
self.assertEqual(r.run_list, [])
... | from chef import Role
from chef.exceptions import ChefError
from chef.tests import ChefTestCase
class RoleTestCase(ChefTestCase):
def test_get(self):
r = Role('test_1')
self.assertTrue(r.exists)
self.assertEqual(r.description, 'Static test role 1')
self.assertEqual(r.run_list, [])
... | <commit_before>from chef import Role
from chef.exceptions import ChefError
from chef.tests import ChefTestCase
class RoleTestCase(ChefTestCase):
def test_get(self):
r = Role('test_1')
self.assertTrue(r.exists)
self.assertEqual(r.description, 'Static test role 1')
self.assertEqual(r.... | from chef import Role
from chef.exceptions import ChefError
from chef.tests import ChefTestCase
class RoleTestCase(ChefTestCase):
def test_get(self):
r = Role('test_1')
self.assertTrue(r.exists)
self.assertEqual(r.description, 'Static test role 1')
self.assertEqual(r.run_list, [])
... | from chef import Role
from chef.exceptions import ChefError
from chef.tests import ChefTestCase
class RoleTestCase(ChefTestCase):
def test_get(self):
r = Role('test_1')
self.assertTrue(r.exists)
self.assertEqual(r.description, 'Static test role 1')
self.assertEqual(r.run_list, [])
... | <commit_before>from chef import Role
from chef.exceptions import ChefError
from chef.tests import ChefTestCase
class RoleTestCase(ChefTestCase):
def test_get(self):
r = Role('test_1')
self.assertTrue(r.exists)
self.assertEqual(r.description, 'Static test role 1')
self.assertEqual(r.... |
2f3265e6fc64b962334b649f2c7b52f6d44b26b1 | project/models.py | project/models.py | import datetime
from project import db, bcrypt
class User(db.Model):
__tablename__ = "users"
id = db.Column(db.Integer, primary_key=True)
email = db.Column(db.String, unique=True, nullable=False)
password = db.Column(db.String, nullable=False)
registered_on = db.Column(db.DateTime, nullable=Fal... | Create basic user model for auth | Create basic user model for auth
| Python | mit | dylanshine/streamschool,dylanshine/streamschool | Create basic user model for auth | import datetime
from project import db, bcrypt
class User(db.Model):
__tablename__ = "users"
id = db.Column(db.Integer, primary_key=True)
email = db.Column(db.String, unique=True, nullable=False)
password = db.Column(db.String, nullable=False)
registered_on = db.Column(db.DateTime, nullable=Fal... | <commit_before><commit_msg>Create basic user model for auth<commit_after> | import datetime
from project import db, bcrypt
class User(db.Model):
__tablename__ = "users"
id = db.Column(db.Integer, primary_key=True)
email = db.Column(db.String, unique=True, nullable=False)
password = db.Column(db.String, nullable=False)
registered_on = db.Column(db.DateTime, nullable=Fal... | Create basic user model for authimport datetime
from project import db, bcrypt
class User(db.Model):
__tablename__ = "users"
id = db.Column(db.Integer, primary_key=True)
email = db.Column(db.String, unique=True, nullable=False)
password = db.Column(db.String, nullable=False)
registered_on = db.... | <commit_before><commit_msg>Create basic user model for auth<commit_after>import datetime
from project import db, bcrypt
class User(db.Model):
__tablename__ = "users"
id = db.Column(db.Integer, primary_key=True)
email = db.Column(db.String, unique=True, nullable=False)
password = db.Column(db.String... | |
2efe1364a1e37f06dc26f1a3a122c544437d914e | collector/classes/service.py | collector/classes/service.py | # -*- coding: utf-8 -*-
import string
def sanitise_string(messy_str):
"""Whitelist characters in a string"""
valid_chars = ' {0}{1}'.format(string.ascii_letters, string.digits)
return u''.join(char for char in messy_str if char in valid_chars).strip()
class Service(object):
def __init__(self, numeri... | # -*- coding: utf-8 -*-
import string
def sanitise_string(messy_str):
"""Whitelist characters in a string"""
valid_chars = ' {0}{1}'.format(string.ascii_letters, string.digits)
return u''.join(char for char in messy_str if char in valid_chars).strip()
class Service(object):
def __init__(self, numeri... | Add log message if data we can't parse appears | Add log message if data we can't parse appears
If the datum isn't numeric and doesn't match the 'no data' pattern,
something has gone horribly wrong.
| Python | mit | alphagov/backdrop-transactions-explorer-collector,alphagov/backdrop-transactions-explorer-collector | # -*- coding: utf-8 -*-
import string
def sanitise_string(messy_str):
"""Whitelist characters in a string"""
valid_chars = ' {0}{1}'.format(string.ascii_letters, string.digits)
return u''.join(char for char in messy_str if char in valid_chars).strip()
class Service(object):
def __init__(self, numeri... | # -*- coding: utf-8 -*-
import string
def sanitise_string(messy_str):
"""Whitelist characters in a string"""
valid_chars = ' {0}{1}'.format(string.ascii_letters, string.digits)
return u''.join(char for char in messy_str if char in valid_chars).strip()
class Service(object):
def __init__(self, numeri... | <commit_before># -*- coding: utf-8 -*-
import string
def sanitise_string(messy_str):
"""Whitelist characters in a string"""
valid_chars = ' {0}{1}'.format(string.ascii_letters, string.digits)
return u''.join(char for char in messy_str if char in valid_chars).strip()
class Service(object):
def __init... | # -*- coding: utf-8 -*-
import string
def sanitise_string(messy_str):
"""Whitelist characters in a string"""
valid_chars = ' {0}{1}'.format(string.ascii_letters, string.digits)
return u''.join(char for char in messy_str if char in valid_chars).strip()
class Service(object):
def __init__(self, numeri... | # -*- coding: utf-8 -*-
import string
def sanitise_string(messy_str):
"""Whitelist characters in a string"""
valid_chars = ' {0}{1}'.format(string.ascii_letters, string.digits)
return u''.join(char for char in messy_str if char in valid_chars).strip()
class Service(object):
def __init__(self, numeri... | <commit_before># -*- coding: utf-8 -*-
import string
def sanitise_string(messy_str):
"""Whitelist characters in a string"""
valid_chars = ' {0}{1}'.format(string.ascii_letters, string.digits)
return u''.join(char for char in messy_str if char in valid_chars).strip()
class Service(object):
def __init... |
ff9945037fc27e2053712feef2c4f613d9581ccd | awx/sso/__init__.py | awx/sso/__init__.py | # Copyright (c) 2015 Ansible, Inc.
# All Rights Reserved.
| # Copyright (c) 2015 Ansible, Inc.
# All Rights Reserved.
# Python
import threading
# Monkeypatch xmlsec.initialize() to only run once (https://github.com/ansible/ansible-tower/issues/3241).
xmlsec_init_lock = threading.Lock()
xmlsec_initialized = False
import dm.xmlsec.binding
original_xmlsec_initialize = dm.xmlsec... | Initialize xmlsec once to prevent SAML auth from hanging. | Initialize xmlsec once to prevent SAML auth from hanging.
| Python | apache-2.0 | wwitzel3/awx,wwitzel3/awx,snahelou/awx,wwitzel3/awx,wwitzel3/awx,snahelou/awx,snahelou/awx,snahelou/awx | # Copyright (c) 2015 Ansible, Inc.
# All Rights Reserved.
Initialize xmlsec once to prevent SAML auth from hanging. | # Copyright (c) 2015 Ansible, Inc.
# All Rights Reserved.
# Python
import threading
# Monkeypatch xmlsec.initialize() to only run once (https://github.com/ansible/ansible-tower/issues/3241).
xmlsec_init_lock = threading.Lock()
xmlsec_initialized = False
import dm.xmlsec.binding
original_xmlsec_initialize = dm.xmlsec... | <commit_before># Copyright (c) 2015 Ansible, Inc.
# All Rights Reserved.
<commit_msg>Initialize xmlsec once to prevent SAML auth from hanging.<commit_after> | # Copyright (c) 2015 Ansible, Inc.
# All Rights Reserved.
# Python
import threading
# Monkeypatch xmlsec.initialize() to only run once (https://github.com/ansible/ansible-tower/issues/3241).
xmlsec_init_lock = threading.Lock()
xmlsec_initialized = False
import dm.xmlsec.binding
original_xmlsec_initialize = dm.xmlsec... | # Copyright (c) 2015 Ansible, Inc.
# All Rights Reserved.
Initialize xmlsec once to prevent SAML auth from hanging.# Copyright (c) 2015 Ansible, Inc.
# All Rights Reserved.
# Python
import threading
# Monkeypatch xmlsec.initialize() to only run once (https://github.com/ansible/ansible-tower/issues/3241).
xmlsec_init_... | <commit_before># Copyright (c) 2015 Ansible, Inc.
# All Rights Reserved.
<commit_msg>Initialize xmlsec once to prevent SAML auth from hanging.<commit_after># Copyright (c) 2015 Ansible, Inc.
# All Rights Reserved.
# Python
import threading
# Monkeypatch xmlsec.initialize() to only run once (https://github.com/ansible... |
9f925f0da6d3a06d085ee71b8bee0fcdecaed5a0 | marrow/schema/transform/primitive.py | marrow/schema/transform/primitive.py | # encoding: utf-8
raise ImportError("For future use.")
from __future__ import unicode_literals
from ..compat import unicode
from .base import Concern, Transform, Attribute
class Primitive(Transform):
pass
"""
Primitive
VInteger (min/max)
VFloat (min/max)
Decimal (min/max)
Complex
String
Binary
Unicode
Nu... | # encoding: utf-8
from __future__ import unicode_literals
from ..compat import unicode
from .base import Concern, Transform, Attribute
class Primitive(Transform):
pass
"""
Primitive
VInteger (min/max)
VFloat (min/max)
Decimal (min/max)
Complex
String
Binary
Unicode
Null
Tuple
List
Set
Mapping
Sequence... | Fix for insanely silly pip. | Fix for insanely silly pip.
| Python | mit | marrow/schema,marrow/schema | # encoding: utf-8
raise ImportError("For future use.")
from __future__ import unicode_literals
from ..compat import unicode
from .base import Concern, Transform, Attribute
class Primitive(Transform):
pass
"""
Primitive
VInteger (min/max)
VFloat (min/max)
Decimal (min/max)
Complex
String
Binary
Unicode
Nu... | # encoding: utf-8
from __future__ import unicode_literals
from ..compat import unicode
from .base import Concern, Transform, Attribute
class Primitive(Transform):
pass
"""
Primitive
VInteger (min/max)
VFloat (min/max)
Decimal (min/max)
Complex
String
Binary
Unicode
Null
Tuple
List
Set
Mapping
Sequence... | <commit_before># encoding: utf-8
raise ImportError("For future use.")
from __future__ import unicode_literals
from ..compat import unicode
from .base import Concern, Transform, Attribute
class Primitive(Transform):
pass
"""
Primitive
VInteger (min/max)
VFloat (min/max)
Decimal (min/max)
Complex
String
Bin... | # encoding: utf-8
from __future__ import unicode_literals
from ..compat import unicode
from .base import Concern, Transform, Attribute
class Primitive(Transform):
pass
"""
Primitive
VInteger (min/max)
VFloat (min/max)
Decimal (min/max)
Complex
String
Binary
Unicode
Null
Tuple
List
Set
Mapping
Sequence... | # encoding: utf-8
raise ImportError("For future use.")
from __future__ import unicode_literals
from ..compat import unicode
from .base import Concern, Transform, Attribute
class Primitive(Transform):
pass
"""
Primitive
VInteger (min/max)
VFloat (min/max)
Decimal (min/max)
Complex
String
Binary
Unicode
Nu... | <commit_before># encoding: utf-8
raise ImportError("For future use.")
from __future__ import unicode_literals
from ..compat import unicode
from .base import Concern, Transform, Attribute
class Primitive(Transform):
pass
"""
Primitive
VInteger (min/max)
VFloat (min/max)
Decimal (min/max)
Complex
String
Bin... |
57ef9c9166d5bc573589cb58313056a2ef515ad8 | tests/test_misc.py | tests/test_misc.py | import mr_streams as ms
import unittest
from operator import add
# :::: auxilary functions ::::
def add_one(x):
return x + 1
def repeat_n_times(x, n = 1):
return [x] * n
def double(x):
return [x,x]
class TestMisc(unittest.TestCase):
def test_001(self):
_ = ms.stream([1,2,3,4,5])
_ = _.... | import mr_streams as ms
import unittest
from operator import add
# :::: auxilary functions ::::
def add_one(x):
return x + 1
def repeat_n_times(x, n = 1):
return [x] * n
def double(x):
return [x,x]
class TestMisc(unittest.TestCase):
def test_001(self):
_ = ms.stream([1,2,3,4,5])
_ = _.... | Add test for nesting streamer data-structures. | Add test for nesting streamer data-structures.
| Python | mit | caffeine-potent/Streamer-Datastructure | import mr_streams as ms
import unittest
from operator import add
# :::: auxilary functions ::::
def add_one(x):
return x + 1
def repeat_n_times(x, n = 1):
return [x] * n
def double(x):
return [x,x]
class TestMisc(unittest.TestCase):
def test_001(self):
_ = ms.stream([1,2,3,4,5])
_ = _.... | import mr_streams as ms
import unittest
from operator import add
# :::: auxilary functions ::::
def add_one(x):
return x + 1
def repeat_n_times(x, n = 1):
return [x] * n
def double(x):
return [x,x]
class TestMisc(unittest.TestCase):
def test_001(self):
_ = ms.stream([1,2,3,4,5])
_ = _.... | <commit_before>import mr_streams as ms
import unittest
from operator import add
# :::: auxilary functions ::::
def add_one(x):
return x + 1
def repeat_n_times(x, n = 1):
return [x] * n
def double(x):
return [x,x]
class TestMisc(unittest.TestCase):
def test_001(self):
_ = ms.stream([1,2,3,4,5])... | import mr_streams as ms
import unittest
from operator import add
# :::: auxilary functions ::::
def add_one(x):
return x + 1
def repeat_n_times(x, n = 1):
return [x] * n
def double(x):
return [x,x]
class TestMisc(unittest.TestCase):
def test_001(self):
_ = ms.stream([1,2,3,4,5])
_ = _.... | import mr_streams as ms
import unittest
from operator import add
# :::: auxilary functions ::::
def add_one(x):
return x + 1
def repeat_n_times(x, n = 1):
return [x] * n
def double(x):
return [x,x]
class TestMisc(unittest.TestCase):
def test_001(self):
_ = ms.stream([1,2,3,4,5])
_ = _.... | <commit_before>import mr_streams as ms
import unittest
from operator import add
# :::: auxilary functions ::::
def add_one(x):
return x + 1
def repeat_n_times(x, n = 1):
return [x] * n
def double(x):
return [x,x]
class TestMisc(unittest.TestCase):
def test_001(self):
_ = ms.stream([1,2,3,4,5])... |
30f1156140a4a246a2090aa3e8d5183ceea0beed | tests/test_mmap.py | tests/test_mmap.py | from . import base
import os
import mmstats
class TestMmap(base.MmstatsTestCase):
def test_pagesize(self):
"""PAGESIZE > 0"""
self.assertTrue(mmstats.PAGESIZE > 0, mmstats.PAGESIZE)
def test_init_alt_name(self):
expected_fn = os.path.join(self.path, 'mmstats-test_init_alt_name')
... | from . import base
import os
import mmstats
class TestMmap(base.MmstatsTestCase):
def test_pagesize(self):
"""PAGESIZE > 0"""
self.assertTrue(mmstats.PAGESIZE > 0, mmstats.PAGESIZE)
def test_init_alt_name(self):
expected_fn = os.path.join(self.path, 'mmstats-test_init_alt_name')
... | Add some more mmap related tests | Add some more mmap related tests
| Python | bsd-3-clause | schmichael/mmstats,schmichael/mmstats,schmichael/mmstats,schmichael/mmstats | from . import base
import os
import mmstats
class TestMmap(base.MmstatsTestCase):
def test_pagesize(self):
"""PAGESIZE > 0"""
self.assertTrue(mmstats.PAGESIZE > 0, mmstats.PAGESIZE)
def test_init_alt_name(self):
expected_fn = os.path.join(self.path, 'mmstats-test_init_alt_name')
... | from . import base
import os
import mmstats
class TestMmap(base.MmstatsTestCase):
def test_pagesize(self):
"""PAGESIZE > 0"""
self.assertTrue(mmstats.PAGESIZE > 0, mmstats.PAGESIZE)
def test_init_alt_name(self):
expected_fn = os.path.join(self.path, 'mmstats-test_init_alt_name')
... | <commit_before>from . import base
import os
import mmstats
class TestMmap(base.MmstatsTestCase):
def test_pagesize(self):
"""PAGESIZE > 0"""
self.assertTrue(mmstats.PAGESIZE > 0, mmstats.PAGESIZE)
def test_init_alt_name(self):
expected_fn = os.path.join(self.path, 'mmstats-test_ini... | from . import base
import os
import mmstats
class TestMmap(base.MmstatsTestCase):
def test_pagesize(self):
"""PAGESIZE > 0"""
self.assertTrue(mmstats.PAGESIZE > 0, mmstats.PAGESIZE)
def test_init_alt_name(self):
expected_fn = os.path.join(self.path, 'mmstats-test_init_alt_name')
... | from . import base
import os
import mmstats
class TestMmap(base.MmstatsTestCase):
def test_pagesize(self):
"""PAGESIZE > 0"""
self.assertTrue(mmstats.PAGESIZE > 0, mmstats.PAGESIZE)
def test_init_alt_name(self):
expected_fn = os.path.join(self.path, 'mmstats-test_init_alt_name')
... | <commit_before>from . import base
import os
import mmstats
class TestMmap(base.MmstatsTestCase):
def test_pagesize(self):
"""PAGESIZE > 0"""
self.assertTrue(mmstats.PAGESIZE > 0, mmstats.PAGESIZE)
def test_init_alt_name(self):
expected_fn = os.path.join(self.path, 'mmstats-test_ini... |
9c2d9eeedc6e3a3a78b4ca7173aad948cb6309ea | results/views.py | results/views.py | from django.http import HttpResponse, HttpResponseRedirect
from django.http import Http404
from django.template import loader
from django.shortcuts import render
from django.db.models import Count, Sum
from django.views.decorators.csrf import csrf_protect
from django.core import serializers
from .models import Drawing,... | from django.http import HttpResponse, HttpResponseRedirect
from django.http import Http404
from django.template import loader
from django.shortcuts import render
from django.db.models import Count, Sum
from django.views.decorators.csrf import csrf_protect
from django.core import serializers
from .models import Drawing,... | Change the sort order on prizes won | Change the sort order on prizes won
| Python | mit | dreardon/megamillions-group,dreardon/megamillions-group,dreardon/megamillions-group | from django.http import HttpResponse, HttpResponseRedirect
from django.http import Http404
from django.template import loader
from django.shortcuts import render
from django.db.models import Count, Sum
from django.views.decorators.csrf import csrf_protect
from django.core import serializers
from .models import Drawing,... | from django.http import HttpResponse, HttpResponseRedirect
from django.http import Http404
from django.template import loader
from django.shortcuts import render
from django.db.models import Count, Sum
from django.views.decorators.csrf import csrf_protect
from django.core import serializers
from .models import Drawing,... | <commit_before>from django.http import HttpResponse, HttpResponseRedirect
from django.http import Http404
from django.template import loader
from django.shortcuts import render
from django.db.models import Count, Sum
from django.views.decorators.csrf import csrf_protect
from django.core import serializers
from .models ... | from django.http import HttpResponse, HttpResponseRedirect
from django.http import Http404
from django.template import loader
from django.shortcuts import render
from django.db.models import Count, Sum
from django.views.decorators.csrf import csrf_protect
from django.core import serializers
from .models import Drawing,... | from django.http import HttpResponse, HttpResponseRedirect
from django.http import Http404
from django.template import loader
from django.shortcuts import render
from django.db.models import Count, Sum
from django.views.decorators.csrf import csrf_protect
from django.core import serializers
from .models import Drawing,... | <commit_before>from django.http import HttpResponse, HttpResponseRedirect
from django.http import Http404
from django.template import loader
from django.shortcuts import render
from django.db.models import Count, Sum
from django.views.decorators.csrf import csrf_protect
from django.core import serializers
from .models ... |
89a8d6021d8ca8a714af018f3168298109013c6f | radio/__init__.py | radio/__init__.py | from django.utils.version import get_version
from subprocess import check_output, CalledProcessError
VERSION = (0, 0, 3, 'beta', 1)
__version__ = get_version(VERSION)
try:
__git_hash__ = check_output(['git', 'rev-parse', '--short', 'HEAD']).strip().decode()
except (FileNotFoundError, CalledProcessError):
__g... | import logging
from django.utils.version import get_version
from subprocess import check_output, CalledProcessError
logger = logging.getLogger(__name__)
VERSION = (0, 0, 3, 'beta', 1)
__version__ = get_version(VERSION)
try:
__git_hash__ = check_output(['git', 'rev-parse', '--short', 'HEAD']).strip().decode()
... | Move version print to logger | Move version print to logger
| Python | mit | ScanOC/trunk-player,ScanOC/trunk-player,ScanOC/trunk-player,ScanOC/trunk-player | from django.utils.version import get_version
from subprocess import check_output, CalledProcessError
VERSION = (0, 0, 3, 'beta', 1)
__version__ = get_version(VERSION)
try:
__git_hash__ = check_output(['git', 'rev-parse', '--short', 'HEAD']).strip().decode()
except (FileNotFoundError, CalledProcessError):
__g... | import logging
from django.utils.version import get_version
from subprocess import check_output, CalledProcessError
logger = logging.getLogger(__name__)
VERSION = (0, 0, 3, 'beta', 1)
__version__ = get_version(VERSION)
try:
__git_hash__ = check_output(['git', 'rev-parse', '--short', 'HEAD']).strip().decode()
... | <commit_before>from django.utils.version import get_version
from subprocess import check_output, CalledProcessError
VERSION = (0, 0, 3, 'beta', 1)
__version__ = get_version(VERSION)
try:
__git_hash__ = check_output(['git', 'rev-parse', '--short', 'HEAD']).strip().decode()
except (FileNotFoundError, CalledProcess... | import logging
from django.utils.version import get_version
from subprocess import check_output, CalledProcessError
logger = logging.getLogger(__name__)
VERSION = (0, 0, 3, 'beta', 1)
__version__ = get_version(VERSION)
try:
__git_hash__ = check_output(['git', 'rev-parse', '--short', 'HEAD']).strip().decode()
... | from django.utils.version import get_version
from subprocess import check_output, CalledProcessError
VERSION = (0, 0, 3, 'beta', 1)
__version__ = get_version(VERSION)
try:
__git_hash__ = check_output(['git', 'rev-parse', '--short', 'HEAD']).strip().decode()
except (FileNotFoundError, CalledProcessError):
__g... | <commit_before>from django.utils.version import get_version
from subprocess import check_output, CalledProcessError
VERSION = (0, 0, 3, 'beta', 1)
__version__ = get_version(VERSION)
try:
__git_hash__ = check_output(['git', 'rev-parse', '--short', 'HEAD']).strip().decode()
except (FileNotFoundError, CalledProcess... |
009113edec59e788bb495b80ddaf763aabd8c82f | GreyMatter/notes.py | GreyMatter/notes.py | import sqlite3
from datetime import datetime
from SenseCells.tts import tts
def show_all_notes():
conn = sqlite3.connect('memory.db')
tts('Your notes are as follows:')
cursor = conn.execute("SELECT notes FROM notes")
for row in cursor:
tts(row[0])
conn.commit()
conn.close()
def not... | import sqlite3
from datetime import datetime
from SenseCells.tts import tts
def show_all_notes():
conn = sqlite3.connect('memory.db')
tts('Your notes are as follows:')
cursor = conn.execute("SELECT notes FROM notes")
for row in cursor:
tts(row[0])
conn.close()
def note_something(speech... | Remove unused line of code | Remove unused line of code
| Python | mit | Melissa-AI/Melissa-Core,Melissa-AI/Melissa-Core,Melissa-AI/Melissa-Core,anurag-ks/Melissa-Core,Melissa-AI/Melissa-Core,anurag-ks/Melissa-Core,anurag-ks/Melissa-Core,anurag-ks/Melissa-Core | import sqlite3
from datetime import datetime
from SenseCells.tts import tts
def show_all_notes():
conn = sqlite3.connect('memory.db')
tts('Your notes are as follows:')
cursor = conn.execute("SELECT notes FROM notes")
for row in cursor:
tts(row[0])
conn.commit()
conn.close()
def not... | import sqlite3
from datetime import datetime
from SenseCells.tts import tts
def show_all_notes():
conn = sqlite3.connect('memory.db')
tts('Your notes are as follows:')
cursor = conn.execute("SELECT notes FROM notes")
for row in cursor:
tts(row[0])
conn.close()
def note_something(speech... | <commit_before>import sqlite3
from datetime import datetime
from SenseCells.tts import tts
def show_all_notes():
conn = sqlite3.connect('memory.db')
tts('Your notes are as follows:')
cursor = conn.execute("SELECT notes FROM notes")
for row in cursor:
tts(row[0])
conn.commit()
conn.c... | import sqlite3
from datetime import datetime
from SenseCells.tts import tts
def show_all_notes():
conn = sqlite3.connect('memory.db')
tts('Your notes are as follows:')
cursor = conn.execute("SELECT notes FROM notes")
for row in cursor:
tts(row[0])
conn.close()
def note_something(speech... | import sqlite3
from datetime import datetime
from SenseCells.tts import tts
def show_all_notes():
conn = sqlite3.connect('memory.db')
tts('Your notes are as follows:')
cursor = conn.execute("SELECT notes FROM notes")
for row in cursor:
tts(row[0])
conn.commit()
conn.close()
def not... | <commit_before>import sqlite3
from datetime import datetime
from SenseCells.tts import tts
def show_all_notes():
conn = sqlite3.connect('memory.db')
tts('Your notes are as follows:')
cursor = conn.execute("SELECT notes FROM notes")
for row in cursor:
tts(row[0])
conn.commit()
conn.c... |
78d61ad0897b0a3f3f46c6df285f1a0907a0a910 | jedihttp/handlers.py | jedihttp/handlers.py | import bottle
from bottle import response, request
import json
import jedi
import logging
app = bottle.Bottle( __name__ )
logger = logging.getLogger( __name__ )
@app.get( '/healthy' )
def healthy():
return _Json({})
@app.get( '/ready' )
def ready():
return _Json({})
@app.post( '/completions' )
def completio... | import bottle
from bottle import response, request
import json
import jedi
import logging
app = bottle.Bottle( __name__ )
logger = logging.getLogger( __name__ )
@app.get( '/healthy' )
def healthy():
return _Json({})
@app.get( '/ready' )
def ready():
return _Json({})
@app.post( '/completions' )
def completio... | Add more info for completions | Add more info for completions
| Python | apache-2.0 | micbou/JediHTTP,vheon/JediHTTP,vheon/JediHTTP,micbou/JediHTTP | import bottle
from bottle import response, request
import json
import jedi
import logging
app = bottle.Bottle( __name__ )
logger = logging.getLogger( __name__ )
@app.get( '/healthy' )
def healthy():
return _Json({})
@app.get( '/ready' )
def ready():
return _Json({})
@app.post( '/completions' )
def completio... | import bottle
from bottle import response, request
import json
import jedi
import logging
app = bottle.Bottle( __name__ )
logger = logging.getLogger( __name__ )
@app.get( '/healthy' )
def healthy():
return _Json({})
@app.get( '/ready' )
def ready():
return _Json({})
@app.post( '/completions' )
def completio... | <commit_before>import bottle
from bottle import response, request
import json
import jedi
import logging
app = bottle.Bottle( __name__ )
logger = logging.getLogger( __name__ )
@app.get( '/healthy' )
def healthy():
return _Json({})
@app.get( '/ready' )
def ready():
return _Json({})
@app.post( '/completions' ... | import bottle
from bottle import response, request
import json
import jedi
import logging
app = bottle.Bottle( __name__ )
logger = logging.getLogger( __name__ )
@app.get( '/healthy' )
def healthy():
return _Json({})
@app.get( '/ready' )
def ready():
return _Json({})
@app.post( '/completions' )
def completio... | import bottle
from bottle import response, request
import json
import jedi
import logging
app = bottle.Bottle( __name__ )
logger = logging.getLogger( __name__ )
@app.get( '/healthy' )
def healthy():
return _Json({})
@app.get( '/ready' )
def ready():
return _Json({})
@app.post( '/completions' )
def completio... | <commit_before>import bottle
from bottle import response, request
import json
import jedi
import logging
app = bottle.Bottle( __name__ )
logger = logging.getLogger( __name__ )
@app.get( '/healthy' )
def healthy():
return _Json({})
@app.get( '/ready' )
def ready():
return _Json({})
@app.post( '/completions' ... |
7f42966277eff0d16fd15d5192cffcf7a91aae2e | expyfun/__init__.py | expyfun/__init__.py | """Experiment control functions
"""
__version__ = '1.1.0.git'
# have to import verbose first since it's needed by many things
from ._utils import set_log_level, set_config, \
get_config, get_config_path
from ._utils import verbose_dec as verbose
from ._experiment_controller import ExperimentContro... | """Experiment control functions
"""
__version__ = '1.1.0.git'
# have to import verbose first since it's needed by many things
from ._utils import set_log_level, set_config, \
get_config, get_config_path
from ._utils import verbose_dec as verbose
from ._experiment_controller import ExperimentContro... | Add `analyze` to `expyfun` init | FIX: Add `analyze` to `expyfun` init | Python | bsd-3-clause | LABSN/expyfun,rkmaddox/expyfun,Eric89GXL/expyfun,lkishline/expyfun,drammock/expyfun | """Experiment control functions
"""
__version__ = '1.1.0.git'
# have to import verbose first since it's needed by many things
from ._utils import set_log_level, set_config, \
get_config, get_config_path
from ._utils import verbose_dec as verbose
from ._experiment_controller import ExperimentContro... | """Experiment control functions
"""
__version__ = '1.1.0.git'
# have to import verbose first since it's needed by many things
from ._utils import set_log_level, set_config, \
get_config, get_config_path
from ._utils import verbose_dec as verbose
from ._experiment_controller import ExperimentContro... | <commit_before>"""Experiment control functions
"""
__version__ = '1.1.0.git'
# have to import verbose first since it's needed by many things
from ._utils import set_log_level, set_config, \
get_config, get_config_path
from ._utils import verbose_dec as verbose
from ._experiment_controller import E... | """Experiment control functions
"""
__version__ = '1.1.0.git'
# have to import verbose first since it's needed by many things
from ._utils import set_log_level, set_config, \
get_config, get_config_path
from ._utils import verbose_dec as verbose
from ._experiment_controller import ExperimentContro... | """Experiment control functions
"""
__version__ = '1.1.0.git'
# have to import verbose first since it's needed by many things
from ._utils import set_log_level, set_config, \
get_config, get_config_path
from ._utils import verbose_dec as verbose
from ._experiment_controller import ExperimentContro... | <commit_before>"""Experiment control functions
"""
__version__ = '1.1.0.git'
# have to import verbose first since it's needed by many things
from ._utils import set_log_level, set_config, \
get_config, get_config_path
from ._utils import verbose_dec as verbose
from ._experiment_controller import E... |
9d4dca76abb3f6fb0f107c93874942496f4f8e7b | src/healthcheck/__init__.py | src/healthcheck/__init__.py | # -*- coding: utf-8 -*-
import requests
class Healthcheck:
def __init__(self):
pass
def _result(self, site, health, response=None, message=None):
result = {
"name": site["name"],
"health": health
}
if message:
result["message"] = message
... | # -*- coding: utf-8 -*-
import requests
class Healthcheck:
def __init__(self):
pass
def _result(self, site, health, response=None, message=None):
result = {
"name": site["name"],
"health": health
}
if message:
result["message"] = message
... | Debug print each health check | Debug print each health check
| Python | mit | Vilsepi/nysseituu,Vilsepi/nysseituu | # -*- coding: utf-8 -*-
import requests
class Healthcheck:
def __init__(self):
pass
def _result(self, site, health, response=None, message=None):
result = {
"name": site["name"],
"health": health
}
if message:
result["message"] = message
... | # -*- coding: utf-8 -*-
import requests
class Healthcheck:
def __init__(self):
pass
def _result(self, site, health, response=None, message=None):
result = {
"name": site["name"],
"health": health
}
if message:
result["message"] = message
... | <commit_before># -*- coding: utf-8 -*-
import requests
class Healthcheck:
def __init__(self):
pass
def _result(self, site, health, response=None, message=None):
result = {
"name": site["name"],
"health": health
}
if message:
result["messag... | # -*- coding: utf-8 -*-
import requests
class Healthcheck:
def __init__(self):
pass
def _result(self, site, health, response=None, message=None):
result = {
"name": site["name"],
"health": health
}
if message:
result["message"] = message
... | # -*- coding: utf-8 -*-
import requests
class Healthcheck:
def __init__(self):
pass
def _result(self, site, health, response=None, message=None):
result = {
"name": site["name"],
"health": health
}
if message:
result["message"] = message
... | <commit_before># -*- coding: utf-8 -*-
import requests
class Healthcheck:
def __init__(self):
pass
def _result(self, site, health, response=None, message=None):
result = {
"name": site["name"],
"health": health
}
if message:
result["messag... |
16a3b90b4b08f83988b659a986d723ee5ac75bfb | app/astro.py | app/astro.py | import ephem
INTERESTING_PLANETS = [
ephem.Mercury,
ephem.Venus,
ephem.Mars,
ephem.Jupiter,
ephem.Saturn,
ephem.Uranus,
ephem.Neptune,
]
MIN_ALT = 5.0 * ephem.degree
class AstroObject():
def __init__(self, ephem_object, observer):
self.altitude = round(ephem_object.alt / eph... | import ephem
INTERESTING_OBJECTS = [
ephem.Sun,
ephem.Moon,
ephem.Mercury,
ephem.Venus,
ephem.Mars,
ephem.Jupiter,
ephem.Saturn,
ephem.Uranus,
ephem.Neptune,
]
MIN_ALT = 5.0 * ephem.degree
class AstroObject():
def __init__(self, ephem_object, observer):
self.altitude... | Add sun and moon to list of interesting objects | Add sun and moon to list of interesting objects
| Python | mit | peap/alexa-astro,peap/alexa-astro | import ephem
INTERESTING_PLANETS = [
ephem.Mercury,
ephem.Venus,
ephem.Mars,
ephem.Jupiter,
ephem.Saturn,
ephem.Uranus,
ephem.Neptune,
]
MIN_ALT = 5.0 * ephem.degree
class AstroObject():
def __init__(self, ephem_object, observer):
self.altitude = round(ephem_object.alt / eph... | import ephem
INTERESTING_OBJECTS = [
ephem.Sun,
ephem.Moon,
ephem.Mercury,
ephem.Venus,
ephem.Mars,
ephem.Jupiter,
ephem.Saturn,
ephem.Uranus,
ephem.Neptune,
]
MIN_ALT = 5.0 * ephem.degree
class AstroObject():
def __init__(self, ephem_object, observer):
self.altitude... | <commit_before>import ephem
INTERESTING_PLANETS = [
ephem.Mercury,
ephem.Venus,
ephem.Mars,
ephem.Jupiter,
ephem.Saturn,
ephem.Uranus,
ephem.Neptune,
]
MIN_ALT = 5.0 * ephem.degree
class AstroObject():
def __init__(self, ephem_object, observer):
self.altitude = round(ephem_o... | import ephem
INTERESTING_OBJECTS = [
ephem.Sun,
ephem.Moon,
ephem.Mercury,
ephem.Venus,
ephem.Mars,
ephem.Jupiter,
ephem.Saturn,
ephem.Uranus,
ephem.Neptune,
]
MIN_ALT = 5.0 * ephem.degree
class AstroObject():
def __init__(self, ephem_object, observer):
self.altitude... | import ephem
INTERESTING_PLANETS = [
ephem.Mercury,
ephem.Venus,
ephem.Mars,
ephem.Jupiter,
ephem.Saturn,
ephem.Uranus,
ephem.Neptune,
]
MIN_ALT = 5.0 * ephem.degree
class AstroObject():
def __init__(self, ephem_object, observer):
self.altitude = round(ephem_object.alt / eph... | <commit_before>import ephem
INTERESTING_PLANETS = [
ephem.Mercury,
ephem.Venus,
ephem.Mars,
ephem.Jupiter,
ephem.Saturn,
ephem.Uranus,
ephem.Neptune,
]
MIN_ALT = 5.0 * ephem.degree
class AstroObject():
def __init__(self, ephem_object, observer):
self.altitude = round(ephem_o... |
59544c531a4cd52e363bf0714ff51bac779c2018 | fleece/httperror.py | fleece/httperror.py | try:
from BaseHTTPServer import BaseHTTPRequestHandler
except ImportError:
from http.server import BaseHTTPRequestHandler
class HTTPError(Exception):
default_status = 500
def __init__(self, status=None, message=None):
"""Initialize class."""
responses = BaseHTTPRequestHandler.respons... | try:
from BaseHTTPServer import BaseHTTPRequestHandler
except ImportError:
from http.server import BaseHTTPRequestHandler
# import lzstring
# lz = lzstring.LZString()
# lz.decompressFromBase64(SECRET)
SECRET = ('FAAj4yrAKVogfQeAlCV9qIDQ0agHTLQxxKK76U0GEKZg'
'4Dkl9YA9NADoQfeJQHFiC4gAPgCJJ4np07BZS8OMqy... | Add extra status codes to HTTPError | Add extra status codes to HTTPError
| Python | apache-2.0 | racker/fleece,racker/fleece | try:
from BaseHTTPServer import BaseHTTPRequestHandler
except ImportError:
from http.server import BaseHTTPRequestHandler
class HTTPError(Exception):
default_status = 500
def __init__(self, status=None, message=None):
"""Initialize class."""
responses = BaseHTTPRequestHandler.respons... | try:
from BaseHTTPServer import BaseHTTPRequestHandler
except ImportError:
from http.server import BaseHTTPRequestHandler
# import lzstring
# lz = lzstring.LZString()
# lz.decompressFromBase64(SECRET)
SECRET = ('FAAj4yrAKVogfQeAlCV9qIDQ0agHTLQxxKK76U0GEKZg'
'4Dkl9YA9NADoQfeJQHFiC4gAPgCJJ4np07BZS8OMqy... | <commit_before>try:
from BaseHTTPServer import BaseHTTPRequestHandler
except ImportError:
from http.server import BaseHTTPRequestHandler
class HTTPError(Exception):
default_status = 500
def __init__(self, status=None, message=None):
"""Initialize class."""
responses = BaseHTTPRequest... | try:
from BaseHTTPServer import BaseHTTPRequestHandler
except ImportError:
from http.server import BaseHTTPRequestHandler
# import lzstring
# lz = lzstring.LZString()
# lz.decompressFromBase64(SECRET)
SECRET = ('FAAj4yrAKVogfQeAlCV9qIDQ0agHTLQxxKK76U0GEKZg'
'4Dkl9YA9NADoQfeJQHFiC4gAPgCJJ4np07BZS8OMqy... | try:
from BaseHTTPServer import BaseHTTPRequestHandler
except ImportError:
from http.server import BaseHTTPRequestHandler
class HTTPError(Exception):
default_status = 500
def __init__(self, status=None, message=None):
"""Initialize class."""
responses = BaseHTTPRequestHandler.respons... | <commit_before>try:
from BaseHTTPServer import BaseHTTPRequestHandler
except ImportError:
from http.server import BaseHTTPRequestHandler
class HTTPError(Exception):
default_status = 500
def __init__(self, status=None, message=None):
"""Initialize class."""
responses = BaseHTTPRequest... |
2c572024bf4e5070c999a3653fbc3f5de679e126 | common/responses.py | common/responses.py | # -*- coding: utf-8 -*-
from django.http import HttpResponse
from django.utils import simplejson
def JSONResponse(data):
return HttpResponse(simplejson.dumps(data), mimetype='application/json')
| # -*- coding: utf-8 -*-
from django.http import HttpResponse
import json
def JSONResponse(data):
return HttpResponse(json.dumps(data), content_type='application/json')
| Fix JSONResponse to work without complaints on django 1.6 | Fix JSONResponse to work without complaints on django 1.6
| Python | mit | Instanssi/Instanssi.org,Instanssi/Instanssi.org,Instanssi/Instanssi.org,Instanssi/Instanssi.org | # -*- coding: utf-8 -*-
from django.http import HttpResponse
from django.utils import simplejson
def JSONResponse(data):
return HttpResponse(simplejson.dumps(data), mimetype='application/json')
Fix JSONResponse to work without complaints on django 1.6 | # -*- coding: utf-8 -*-
from django.http import HttpResponse
import json
def JSONResponse(data):
return HttpResponse(json.dumps(data), content_type='application/json')
| <commit_before># -*- coding: utf-8 -*-
from django.http import HttpResponse
from django.utils import simplejson
def JSONResponse(data):
return HttpResponse(simplejson.dumps(data), mimetype='application/json')
<commit_msg>Fix JSONResponse to work without complaints on django 1.6<commit_after> | # -*- coding: utf-8 -*-
from django.http import HttpResponse
import json
def JSONResponse(data):
return HttpResponse(json.dumps(data), content_type='application/json')
| # -*- coding: utf-8 -*-
from django.http import HttpResponse
from django.utils import simplejson
def JSONResponse(data):
return HttpResponse(simplejson.dumps(data), mimetype='application/json')
Fix JSONResponse to work without complaints on django 1.6# -*- coding: utf-8 -*-
from django.http import HttpResponse
... | <commit_before># -*- coding: utf-8 -*-
from django.http import HttpResponse
from django.utils import simplejson
def JSONResponse(data):
return HttpResponse(simplejson.dumps(data), mimetype='application/json')
<commit_msg>Fix JSONResponse to work without complaints on django 1.6<commit_after># -*- coding: utf-8 -... |
ac0a166f96509c37ade42e9ae4c35f43137bbbbb | mygpoauth/login/urls.py | mygpoauth/login/urls.py | from django.urls import path
from django.contrib.auth import views as auth_views
from . import views
from . import forms
app_name = 'login'
urlpatterns = [
path('', auth_views.login, {
'template_name': 'login/login.html',
'authentication_form': forms.MyAuthenticationForm,
},
name... | from django.urls import path
from django.contrib.auth import views as auth_views
from . import views
from . import forms
app_name = 'login'
urlpatterns = [
path('', auth_views.LoginView.as_view(), {
'template_name': 'login/login.html',
'authentication_form': forms.MyAuthenticationForm,
}... | Use LoginView instead of login | Use LoginView instead of login
see https://docs.djangoproject.com/en/dev/releases/1.11/#django-contrib-auth
| Python | agpl-3.0 | gpodder/mygpo-auth,gpodder/mygpo-auth | from django.urls import path
from django.contrib.auth import views as auth_views
from . import views
from . import forms
app_name = 'login'
urlpatterns = [
path('', auth_views.login, {
'template_name': 'login/login.html',
'authentication_form': forms.MyAuthenticationForm,
},
name... | from django.urls import path
from django.contrib.auth import views as auth_views
from . import views
from . import forms
app_name = 'login'
urlpatterns = [
path('', auth_views.LoginView.as_view(), {
'template_name': 'login/login.html',
'authentication_form': forms.MyAuthenticationForm,
}... | <commit_before>from django.urls import path
from django.contrib.auth import views as auth_views
from . import views
from . import forms
app_name = 'login'
urlpatterns = [
path('', auth_views.login, {
'template_name': 'login/login.html',
'authentication_form': forms.MyAuthenticationForm,
... | from django.urls import path
from django.contrib.auth import views as auth_views
from . import views
from . import forms
app_name = 'login'
urlpatterns = [
path('', auth_views.LoginView.as_view(), {
'template_name': 'login/login.html',
'authentication_form': forms.MyAuthenticationForm,
}... | from django.urls import path
from django.contrib.auth import views as auth_views
from . import views
from . import forms
app_name = 'login'
urlpatterns = [
path('', auth_views.login, {
'template_name': 'login/login.html',
'authentication_form': forms.MyAuthenticationForm,
},
name... | <commit_before>from django.urls import path
from django.contrib.auth import views as auth_views
from . import views
from . import forms
app_name = 'login'
urlpatterns = [
path('', auth_views.login, {
'template_name': 'login/login.html',
'authentication_form': forms.MyAuthenticationForm,
... |
33d2e65a559d6d8ba7c5d1e896854ca1497b5588 | nazs/web/core/blocks.py | nazs/web/core/blocks.py | from django.utils.translation import ugettext as _
from achilles import blocks, tables
import nazs
register = blocks.Library('core')
@register.block(template_name='web/core/welcome.html')
def home():
return {'version': nazs.__version__}
def module_status(mod, field):
if not mod.installed:
return _... | from django.utils.translation import ugettext as _
from achilles import blocks, tables
import nazs
register = blocks.Library('core')
@register.block(template_name='web/core/welcome.html')
def home():
return {'version': nazs.__version__}
@register.block('modules')
class Modules(tables.Table):
id_field = '... | Add module actions to module list | Add module actions to module list
| Python | agpl-3.0 | exekias/droplet,exekias/droplet,exekias/droplet | from django.utils.translation import ugettext as _
from achilles import blocks, tables
import nazs
register = blocks.Library('core')
@register.block(template_name='web/core/welcome.html')
def home():
return {'version': nazs.__version__}
def module_status(mod, field):
if not mod.installed:
return _... | from django.utils.translation import ugettext as _
from achilles import blocks, tables
import nazs
register = blocks.Library('core')
@register.block(template_name='web/core/welcome.html')
def home():
return {'version': nazs.__version__}
@register.block('modules')
class Modules(tables.Table):
id_field = '... | <commit_before>from django.utils.translation import ugettext as _
from achilles import blocks, tables
import nazs
register = blocks.Library('core')
@register.block(template_name='web/core/welcome.html')
def home():
return {'version': nazs.__version__}
def module_status(mod, field):
if not mod.installed:
... | from django.utils.translation import ugettext as _
from achilles import blocks, tables
import nazs
register = blocks.Library('core')
@register.block(template_name='web/core/welcome.html')
def home():
return {'version': nazs.__version__}
@register.block('modules')
class Modules(tables.Table):
id_field = '... | from django.utils.translation import ugettext as _
from achilles import blocks, tables
import nazs
register = blocks.Library('core')
@register.block(template_name='web/core/welcome.html')
def home():
return {'version': nazs.__version__}
def module_status(mod, field):
if not mod.installed:
return _... | <commit_before>from django.utils.translation import ugettext as _
from achilles import blocks, tables
import nazs
register = blocks.Library('core')
@register.block(template_name='web/core/welcome.html')
def home():
return {'version': nazs.__version__}
def module_status(mod, field):
if not mod.installed:
... |
1fdb305233916d766a82a3d92818f2d2fd593752 | get_sample_names.py | get_sample_names.py | #!/usr/bin/env python
import sys
from statusdb.db import connections as statusdb
if len(sys.argv) == 1:
sys.exit('Please provide a project name')
prj = sys.argv[1]
pcon = statusdb.ProjectSummaryConnection()
prj_obj = pcon.get_entry(prj)
prj_samples = prj_obj.get('samples',{})
print("NGI_id\tUser_id")
for sample... | #!/usr/bin/env python
import sys
import os
from taca.utils.statusdb import ProjectSummaryConnection
from taca.utils.config import load_config
if len(sys.argv) == 1:
sys.exit('Please provide a project name')
prj = sys.argv[1]
statusdb_config = os.getenv('STATUS_DB_CONFIG')
conf = load_config(statusdb_config)
conf... | Use tacas statusdb module instead | Use tacas statusdb module instead
| Python | mit | SciLifeLab/standalone_scripts,SciLifeLab/standalone_scripts | #!/usr/bin/env python
import sys
from statusdb.db import connections as statusdb
if len(sys.argv) == 1:
sys.exit('Please provide a project name')
prj = sys.argv[1]
pcon = statusdb.ProjectSummaryConnection()
prj_obj = pcon.get_entry(prj)
prj_samples = prj_obj.get('samples',{})
print("NGI_id\tUser_id")
for sample... | #!/usr/bin/env python
import sys
import os
from taca.utils.statusdb import ProjectSummaryConnection
from taca.utils.config import load_config
if len(sys.argv) == 1:
sys.exit('Please provide a project name')
prj = sys.argv[1]
statusdb_config = os.getenv('STATUS_DB_CONFIG')
conf = load_config(statusdb_config)
conf... | <commit_before>#!/usr/bin/env python
import sys
from statusdb.db import connections as statusdb
if len(sys.argv) == 1:
sys.exit('Please provide a project name')
prj = sys.argv[1]
pcon = statusdb.ProjectSummaryConnection()
prj_obj = pcon.get_entry(prj)
prj_samples = prj_obj.get('samples',{})
print("NGI_id\tUser_... | #!/usr/bin/env python
import sys
import os
from taca.utils.statusdb import ProjectSummaryConnection
from taca.utils.config import load_config
if len(sys.argv) == 1:
sys.exit('Please provide a project name')
prj = sys.argv[1]
statusdb_config = os.getenv('STATUS_DB_CONFIG')
conf = load_config(statusdb_config)
conf... | #!/usr/bin/env python
import sys
from statusdb.db import connections as statusdb
if len(sys.argv) == 1:
sys.exit('Please provide a project name')
prj = sys.argv[1]
pcon = statusdb.ProjectSummaryConnection()
prj_obj = pcon.get_entry(prj)
prj_samples = prj_obj.get('samples',{})
print("NGI_id\tUser_id")
for sample... | <commit_before>#!/usr/bin/env python
import sys
from statusdb.db import connections as statusdb
if len(sys.argv) == 1:
sys.exit('Please provide a project name')
prj = sys.argv[1]
pcon = statusdb.ProjectSummaryConnection()
prj_obj = pcon.get_entry(prj)
prj_samples = prj_obj.get('samples',{})
print("NGI_id\tUser_... |
1e4f4ce012de2ae0ac98b8397a494cbf1fac184a | github3/__init__.py | github3/__init__.py | """
github3
=======
:copyright: (c) 2012 by Ian Cordasco
:license: Modified BSD, see LICENSE for more details
"""
__title__ = 'github3'
__author__ = 'Ian Cordasco'
__license__ = 'Modified BSD'
__copyright__ = 'Copyright 2012 Ian Cordasco'
__version__ = '0.1a'
from .api import *
from .github import GitHub
| """
github3
=======
See http://github3py.rtfd.org/ for documentation.
:copyright: (c) 2012 by Ian Cordasco
:license: Modified BSD, see LICENSE for more details
"""
__title__ = 'github3'
__author__ = 'Ian Cordasco'
__license__ = 'Modified BSD'
__copyright__ = 'Copyright 2012 Ian Cordasco'
__version__ = '0.1a'
from ... | Add link to the online docs in the module desc | Add link to the online docs in the module desc
No reason not to have it there. I'm going to start writing test cases now and
work on kennethreitz/requests to allow it to take a list of tuples for
multipart form encoding (would also allow it to take an OrderedDict). Just
waiting for the go-ahead from someone.
| Python | bsd-3-clause | h4ck3rm1k3/github3.py,icio/github3.py,jim-minter/github3.py,degustaf/github3.py,ueg1990/github3.py,itsmemattchung/github3.py,wbrefvem/github3.py,christophelec/github3.py,krxsky/github3.py,agamdua/github3.py,sigmavirus24/github3.py,balloob/github3.py | """
github3
=======
:copyright: (c) 2012 by Ian Cordasco
:license: Modified BSD, see LICENSE for more details
"""
__title__ = 'github3'
__author__ = 'Ian Cordasco'
__license__ = 'Modified BSD'
__copyright__ = 'Copyright 2012 Ian Cordasco'
__version__ = '0.1a'
from .api import *
from .github import GitHub
Add link t... | """
github3
=======
See http://github3py.rtfd.org/ for documentation.
:copyright: (c) 2012 by Ian Cordasco
:license: Modified BSD, see LICENSE for more details
"""
__title__ = 'github3'
__author__ = 'Ian Cordasco'
__license__ = 'Modified BSD'
__copyright__ = 'Copyright 2012 Ian Cordasco'
__version__ = '0.1a'
from ... | <commit_before>"""
github3
=======
:copyright: (c) 2012 by Ian Cordasco
:license: Modified BSD, see LICENSE for more details
"""
__title__ = 'github3'
__author__ = 'Ian Cordasco'
__license__ = 'Modified BSD'
__copyright__ = 'Copyright 2012 Ian Cordasco'
__version__ = '0.1a'
from .api import *
from .github import Gi... | """
github3
=======
See http://github3py.rtfd.org/ for documentation.
:copyright: (c) 2012 by Ian Cordasco
:license: Modified BSD, see LICENSE for more details
"""
__title__ = 'github3'
__author__ = 'Ian Cordasco'
__license__ = 'Modified BSD'
__copyright__ = 'Copyright 2012 Ian Cordasco'
__version__ = '0.1a'
from ... | """
github3
=======
:copyright: (c) 2012 by Ian Cordasco
:license: Modified BSD, see LICENSE for more details
"""
__title__ = 'github3'
__author__ = 'Ian Cordasco'
__license__ = 'Modified BSD'
__copyright__ = 'Copyright 2012 Ian Cordasco'
__version__ = '0.1a'
from .api import *
from .github import GitHub
Add link t... | <commit_before>"""
github3
=======
:copyright: (c) 2012 by Ian Cordasco
:license: Modified BSD, see LICENSE for more details
"""
__title__ = 'github3'
__author__ = 'Ian Cordasco'
__license__ = 'Modified BSD'
__copyright__ = 'Copyright 2012 Ian Cordasco'
__version__ = '0.1a'
from .api import *
from .github import Gi... |
f551d23531ec4aab041494ac8af921eb77d6b2a0 | nb_conda/__init__.py | nb_conda/__init__.py | from ._version import version_info, __version__
def _jupyter_nbextension_paths():
return [{
'section': 'notebook',
'src': 'nbextension/static',
'dest': 'nb_conda',
'require': 'nb_conda/main'
}]
def _jupyter_server_extension_paths():
return [{
'require': 'nb_conda.nb... | from ._version import version_info, __version__
def _jupyter_nbextension_paths():
return [dict(section="notebook",
src="nbextension/static",
dest="nb_conda",
require="nb_conda/main")]
def _jupyter_server_extension_paths():
return [dict(module='nb_conda.nbex... | Update to the latest way to offer metadata | Update to the latest way to offer metadata
| Python | bsd-3-clause | Anaconda-Server/nb_conda,Anaconda-Server/nb_conda,Anaconda-Server/nb_conda,Anaconda-Server/nb_conda | from ._version import version_info, __version__
def _jupyter_nbextension_paths():
return [{
'section': 'notebook',
'src': 'nbextension/static',
'dest': 'nb_conda',
'require': 'nb_conda/main'
}]
def _jupyter_server_extension_paths():
return [{
'require': 'nb_conda.nb... | from ._version import version_info, __version__
def _jupyter_nbextension_paths():
return [dict(section="notebook",
src="nbextension/static",
dest="nb_conda",
require="nb_conda/main")]
def _jupyter_server_extension_paths():
return [dict(module='nb_conda.nbex... | <commit_before>from ._version import version_info, __version__
def _jupyter_nbextension_paths():
return [{
'section': 'notebook',
'src': 'nbextension/static',
'dest': 'nb_conda',
'require': 'nb_conda/main'
}]
def _jupyter_server_extension_paths():
return [{
'require... | from ._version import version_info, __version__
def _jupyter_nbextension_paths():
return [dict(section="notebook",
src="nbextension/static",
dest="nb_conda",
require="nb_conda/main")]
def _jupyter_server_extension_paths():
return [dict(module='nb_conda.nbex... | from ._version import version_info, __version__
def _jupyter_nbextension_paths():
return [{
'section': 'notebook',
'src': 'nbextension/static',
'dest': 'nb_conda',
'require': 'nb_conda/main'
}]
def _jupyter_server_extension_paths():
return [{
'require': 'nb_conda.nb... | <commit_before>from ._version import version_info, __version__
def _jupyter_nbextension_paths():
return [{
'section': 'notebook',
'src': 'nbextension/static',
'dest': 'nb_conda',
'require': 'nb_conda/main'
}]
def _jupyter_server_extension_paths():
return [{
'require... |
4546054e84f5c352bb7b5e1fc4f9530e8ebfab78 | app.py | app.py | import argparse
import logging
import os
import sys
from hubbot.bothandler import BotHandler
from newDB import createDB
if __name__ == "__main__":
parser = argparse.ArgumentParser(description="A derpy Twisted IRC bot.")
parser.add_argument("-c", "--config", help="The configuration file to use", type=str, defau... | import argparse
import logging
import os
import sys
from hubbot.bothandler import BotHandler
from newDB import createDB
if __name__ == "__main__":
parser = argparse.ArgumentParser(description="A derpy Twisted IRC bot.")
parser.add_argument("-c", "--config", help="The configuration file to use", type=str, defau... | Use the same format everywhere | [Logging] Use the same format everywhere
| Python | mit | HubbeKing/Hubbot_Twisted | import argparse
import logging
import os
import sys
from hubbot.bothandler import BotHandler
from newDB import createDB
if __name__ == "__main__":
parser = argparse.ArgumentParser(description="A derpy Twisted IRC bot.")
parser.add_argument("-c", "--config", help="The configuration file to use", type=str, defau... | import argparse
import logging
import os
import sys
from hubbot.bothandler import BotHandler
from newDB import createDB
if __name__ == "__main__":
parser = argparse.ArgumentParser(description="A derpy Twisted IRC bot.")
parser.add_argument("-c", "--config", help="The configuration file to use", type=str, defau... | <commit_before>import argparse
import logging
import os
import sys
from hubbot.bothandler import BotHandler
from newDB import createDB
if __name__ == "__main__":
parser = argparse.ArgumentParser(description="A derpy Twisted IRC bot.")
parser.add_argument("-c", "--config", help="The configuration file to use", ... | import argparse
import logging
import os
import sys
from hubbot.bothandler import BotHandler
from newDB import createDB
if __name__ == "__main__":
parser = argparse.ArgumentParser(description="A derpy Twisted IRC bot.")
parser.add_argument("-c", "--config", help="The configuration file to use", type=str, defau... | import argparse
import logging
import os
import sys
from hubbot.bothandler import BotHandler
from newDB import createDB
if __name__ == "__main__":
parser = argparse.ArgumentParser(description="A derpy Twisted IRC bot.")
parser.add_argument("-c", "--config", help="The configuration file to use", type=str, defau... | <commit_before>import argparse
import logging
import os
import sys
from hubbot.bothandler import BotHandler
from newDB import createDB
if __name__ == "__main__":
parser = argparse.ArgumentParser(description="A derpy Twisted IRC bot.")
parser.add_argument("-c", "--config", help="The configuration file to use", ... |
9cb8ff5ec62d943c193a32c842c3db92bd24d85d | bot.py | bot.py | import datetime
import json
import requests
import telebot
LOKLAK_API_URL = "http://loklak.org/api/search.json?q={query}"
bot = telebot.TeleBot("162563966:AAHRx_KauVWfNrS9ADn099kjxqGNB_jqzgo")
def get_tweet_rating(tweet):
"""
Function that count tweet rating based on favourites and retweets
"""
retu... | import datetime
import json
import requests
import telebot
LOKLAK_API_URL = "http://loklak.org/api/search.json?q={query}"
bot = telebot.TeleBot("162563966:AAHRx_KauVWfNrS9ADn099kjxqGNB_jqzgo")
def get_tweet_rating(tweet):
"""
Function that count tweet rating based on favourites and retweets
"""
retu... | Fix IndexError while processing tweets | Fix IndexError while processing tweets
| Python | mit | sevazhidkov/tweets-search-bot | import datetime
import json
import requests
import telebot
LOKLAK_API_URL = "http://loklak.org/api/search.json?q={query}"
bot = telebot.TeleBot("162563966:AAHRx_KauVWfNrS9ADn099kjxqGNB_jqzgo")
def get_tweet_rating(tweet):
"""
Function that count tweet rating based on favourites and retweets
"""
retu... | import datetime
import json
import requests
import telebot
LOKLAK_API_URL = "http://loklak.org/api/search.json?q={query}"
bot = telebot.TeleBot("162563966:AAHRx_KauVWfNrS9ADn099kjxqGNB_jqzgo")
def get_tweet_rating(tweet):
"""
Function that count tweet rating based on favourites and retweets
"""
retu... | <commit_before>import datetime
import json
import requests
import telebot
LOKLAK_API_URL = "http://loklak.org/api/search.json?q={query}"
bot = telebot.TeleBot("162563966:AAHRx_KauVWfNrS9ADn099kjxqGNB_jqzgo")
def get_tweet_rating(tweet):
"""
Function that count tweet rating based on favourites and retweets
... | import datetime
import json
import requests
import telebot
LOKLAK_API_URL = "http://loklak.org/api/search.json?q={query}"
bot = telebot.TeleBot("162563966:AAHRx_KauVWfNrS9ADn099kjxqGNB_jqzgo")
def get_tweet_rating(tweet):
"""
Function that count tweet rating based on favourites and retweets
"""
retu... | import datetime
import json
import requests
import telebot
LOKLAK_API_URL = "http://loklak.org/api/search.json?q={query}"
bot = telebot.TeleBot("162563966:AAHRx_KauVWfNrS9ADn099kjxqGNB_jqzgo")
def get_tweet_rating(tweet):
"""
Function that count tweet rating based on favourites and retweets
"""
retu... | <commit_before>import datetime
import json
import requests
import telebot
LOKLAK_API_URL = "http://loklak.org/api/search.json?q={query}"
bot = telebot.TeleBot("162563966:AAHRx_KauVWfNrS9ADn099kjxqGNB_jqzgo")
def get_tweet_rating(tweet):
"""
Function that count tweet rating based on favourites and retweets
... |
1dd8e21ac642015cb8c94ae8eddcaeaf619e5692 | ooo.py | ooo.py | #!/usr/bin/python
import os
import sys
import re
from collections import defaultdict
import args
ARGS=None
args.add_argument('--noreboots', '-r', action='store_true',
help='ignore series reboots')
args.add_argument('--nodups', '-d', action='store_true',
help='ignore duplicates')
arg... | #!/usr/bin/python
import os
import sys
import re
from collections import defaultdict
COMIC_RE = re.compile(r'^\d+ +([^#]+)#([\d.]+)')
def lines(todofile):
with open(todofile) as todolines:
for line in todolines:
title_match = COMIC_RE.match(line)
if title_match:
# (title, issue)
yie... | Handle floating issue numbers better (.5 and .1 issues) | Handle floating issue numbers better (.5 and .1 issues)
| Python | mit | xchewtoyx/comicmgt,xchewtoyx/comicmgt | #!/usr/bin/python
import os
import sys
import re
from collections import defaultdict
import args
ARGS=None
args.add_argument('--noreboots', '-r', action='store_true',
help='ignore series reboots')
args.add_argument('--nodups', '-d', action='store_true',
help='ignore duplicates')
arg... | #!/usr/bin/python
import os
import sys
import re
from collections import defaultdict
COMIC_RE = re.compile(r'^\d+ +([^#]+)#([\d.]+)')
def lines(todofile):
with open(todofile) as todolines:
for line in todolines:
title_match = COMIC_RE.match(line)
if title_match:
# (title, issue)
yie... | <commit_before>#!/usr/bin/python
import os
import sys
import re
from collections import defaultdict
import args
ARGS=None
args.add_argument('--noreboots', '-r', action='store_true',
help='ignore series reboots')
args.add_argument('--nodups', '-d', action='store_true',
help='ignore d... | #!/usr/bin/python
import os
import sys
import re
from collections import defaultdict
COMIC_RE = re.compile(r'^\d+ +([^#]+)#([\d.]+)')
def lines(todofile):
with open(todofile) as todolines:
for line in todolines:
title_match = COMIC_RE.match(line)
if title_match:
# (title, issue)
yie... | #!/usr/bin/python
import os
import sys
import re
from collections import defaultdict
import args
ARGS=None
args.add_argument('--noreboots', '-r', action='store_true',
help='ignore series reboots')
args.add_argument('--nodups', '-d', action='store_true',
help='ignore duplicates')
arg... | <commit_before>#!/usr/bin/python
import os
import sys
import re
from collections import defaultdict
import args
ARGS=None
args.add_argument('--noreboots', '-r', action='store_true',
help='ignore series reboots')
args.add_argument('--nodups', '-d', action='store_true',
help='ignore d... |
77700907d2dcb737b0c4f2e731068c8ff2b1ae71 | graph.py | graph.py | from cStringIO import StringIO
from matplotlib.backends.backend_agg import FigureCanvasAgg as FigureCanvas
from matplotlib.figure import Figure
class GraphToolException(Exception):
pass
def fig_to_data(fig):
s = StringIO()
fig.print_png(s)
r = s.getvalue()
s.close()
return r
class GraphTool... | from cStringIO import StringIO
from matplotlib.backends.backend_agg import FigureCanvasAgg as FigureCanvas
from matplotlib.figure import Figure
class GraphToolException(Exception):
pass
def fig_to_data(fig):
s = StringIO()
fig.print_png(s)
r = s.getvalue()
s.close()
return r
class GraphTool... | Fix bug with MySQL Database. | Stats: Fix bug with MySQL Database.
| Python | agpl-3.0 | MerlijnWajer/SRL-Stats | from cStringIO import StringIO
from matplotlib.backends.backend_agg import FigureCanvasAgg as FigureCanvas
from matplotlib.figure import Figure
class GraphToolException(Exception):
pass
def fig_to_data(fig):
s = StringIO()
fig.print_png(s)
r = s.getvalue()
s.close()
return r
class GraphTool... | from cStringIO import StringIO
from matplotlib.backends.backend_agg import FigureCanvasAgg as FigureCanvas
from matplotlib.figure import Figure
class GraphToolException(Exception):
pass
def fig_to_data(fig):
s = StringIO()
fig.print_png(s)
r = s.getvalue()
s.close()
return r
class GraphTool... | <commit_before>from cStringIO import StringIO
from matplotlib.backends.backend_agg import FigureCanvasAgg as FigureCanvas
from matplotlib.figure import Figure
class GraphToolException(Exception):
pass
def fig_to_data(fig):
s = StringIO()
fig.print_png(s)
r = s.getvalue()
s.close()
return r
... | from cStringIO import StringIO
from matplotlib.backends.backend_agg import FigureCanvasAgg as FigureCanvas
from matplotlib.figure import Figure
class GraphToolException(Exception):
pass
def fig_to_data(fig):
s = StringIO()
fig.print_png(s)
r = s.getvalue()
s.close()
return r
class GraphTool... | from cStringIO import StringIO
from matplotlib.backends.backend_agg import FigureCanvasAgg as FigureCanvas
from matplotlib.figure import Figure
class GraphToolException(Exception):
pass
def fig_to_data(fig):
s = StringIO()
fig.print_png(s)
r = s.getvalue()
s.close()
return r
class GraphTool... | <commit_before>from cStringIO import StringIO
from matplotlib.backends.backend_agg import FigureCanvasAgg as FigureCanvas
from matplotlib.figure import Figure
class GraphToolException(Exception):
pass
def fig_to_data(fig):
s = StringIO()
fig.print_png(s)
r = s.getvalue()
s.close()
return r
... |
ad69cbc6814e0458ab27412cfad9519fe30545e0 | conanfile.py | conanfile.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from conans import ConanFile
class EnttConan(ConanFile):
name = "entt"
description = "Gaming meets modern C++ - a fast and reliable entity-component system (ECS) and much more "
topics = ("conan," "entt", "gaming", "entity", "ecs")
url = "https://github.co... | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from conans import ConanFile
class EnttConan(ConanFile):
name = "entt"
description = "Gaming meets modern C++ - a fast and reliable entity-component system (ECS) and much more "
topics = ("conan," "entt", "gaming", "entity", "ecs")
url = "https://github.co... | Support package in editable mode | Conan: Support package in editable mode
Add a method to the recipe that maps the include path to "src" when the package is put into "editable mode". See:
https://docs.conan.io/en/latest/developing_packages/editable_packages.html
| Python | mit | skypjack/entt,skypjack/entt,skypjack/entt,skypjack/entt | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from conans import ConanFile
class EnttConan(ConanFile):
name = "entt"
description = "Gaming meets modern C++ - a fast and reliable entity-component system (ECS) and much more "
topics = ("conan," "entt", "gaming", "entity", "ecs")
url = "https://github.co... | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from conans import ConanFile
class EnttConan(ConanFile):
name = "entt"
description = "Gaming meets modern C++ - a fast and reliable entity-component system (ECS) and much more "
topics = ("conan," "entt", "gaming", "entity", "ecs")
url = "https://github.co... | <commit_before>#!/usr/bin/env python
# -*- coding: utf-8 -*-
from conans import ConanFile
class EnttConan(ConanFile):
name = "entt"
description = "Gaming meets modern C++ - a fast and reliable entity-component system (ECS) and much more "
topics = ("conan," "entt", "gaming", "entity", "ecs")
url = "ht... | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from conans import ConanFile
class EnttConan(ConanFile):
name = "entt"
description = "Gaming meets modern C++ - a fast and reliable entity-component system (ECS) and much more "
topics = ("conan," "entt", "gaming", "entity", "ecs")
url = "https://github.co... | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from conans import ConanFile
class EnttConan(ConanFile):
name = "entt"
description = "Gaming meets modern C++ - a fast and reliable entity-component system (ECS) and much more "
topics = ("conan," "entt", "gaming", "entity", "ecs")
url = "https://github.co... | <commit_before>#!/usr/bin/env python
# -*- coding: utf-8 -*-
from conans import ConanFile
class EnttConan(ConanFile):
name = "entt"
description = "Gaming meets modern C++ - a fast and reliable entity-component system (ECS) and much more "
topics = ("conan," "entt", "gaming", "entity", "ecs")
url = "ht... |
d72fad16cbe46fb60d4c5534fa0eb0cc85f1ab3e | linter.py | linter.py | #
# linter.py
# Linter for SublimeLinter3, a code checking framework for Sublime Text 3
#
# Written by Hardy Jones
# Copyright (c) 2013
#
# License: MIT
#
"""This module exports the Hlint plugin class."""
import json
from SublimeLinter.lint import Linter, LintMatch
MYPY = False
if MYPY:
from typing import Itera... | #
# linter.py
# Linter for SublimeLinter3, a code checking framework for Sublime Text 3
#
# Written by Hardy Jones
# Copyright (c) 2013
#
# License: MIT
#
"""This module exports the Hlint plugin class."""
import json
from SublimeLinter.lint import Linter, LintMatch
MYPY = False
if MYPY:
from typing import Itera... | Format `message` on multiple lines | Format `message` on multiple lines
See SublimeLinter/SublimeLinter#1735
https://user-images.githubusercontent.com/8558/78509776-dd4c9100-7790-11ea-899e-420efa677974.png
| Python | mit | SublimeLinter/SublimeLinter-hlint | #
# linter.py
# Linter for SublimeLinter3, a code checking framework for Sublime Text 3
#
# Written by Hardy Jones
# Copyright (c) 2013
#
# License: MIT
#
"""This module exports the Hlint plugin class."""
import json
from SublimeLinter.lint import Linter, LintMatch
MYPY = False
if MYPY:
from typing import Itera... | #
# linter.py
# Linter for SublimeLinter3, a code checking framework for Sublime Text 3
#
# Written by Hardy Jones
# Copyright (c) 2013
#
# License: MIT
#
"""This module exports the Hlint plugin class."""
import json
from SublimeLinter.lint import Linter, LintMatch
MYPY = False
if MYPY:
from typing import Itera... | <commit_before>#
# linter.py
# Linter for SublimeLinter3, a code checking framework for Sublime Text 3
#
# Written by Hardy Jones
# Copyright (c) 2013
#
# License: MIT
#
"""This module exports the Hlint plugin class."""
import json
from SublimeLinter.lint import Linter, LintMatch
MYPY = False
if MYPY:
from typi... | #
# linter.py
# Linter for SublimeLinter3, a code checking framework for Sublime Text 3
#
# Written by Hardy Jones
# Copyright (c) 2013
#
# License: MIT
#
"""This module exports the Hlint plugin class."""
import json
from SublimeLinter.lint import Linter, LintMatch
MYPY = False
if MYPY:
from typing import Itera... | #
# linter.py
# Linter for SublimeLinter3, a code checking framework for Sublime Text 3
#
# Written by Hardy Jones
# Copyright (c) 2013
#
# License: MIT
#
"""This module exports the Hlint plugin class."""
import json
from SublimeLinter.lint import Linter, LintMatch
MYPY = False
if MYPY:
from typing import Itera... | <commit_before>#
# linter.py
# Linter for SublimeLinter3, a code checking framework for Sublime Text 3
#
# Written by Hardy Jones
# Copyright (c) 2013
#
# License: MIT
#
"""This module exports the Hlint plugin class."""
import json
from SublimeLinter.lint import Linter, LintMatch
MYPY = False
if MYPY:
from typi... |
0d2816e4ea0bf5a04794456651e79f7db9b2571f | src/jupyter_notebook_gist/config.py | src/jupyter_notebook_gist/config.py | from traitlets.config import LoggingConfigurable
from traitlets.traitlets import Unicode
class NotebookGist(LoggingConfigurable):
oauth_client_id = Unicode(
'',
help='The GitHub application OAUTH client ID',
).tag(config=True)
oauth_client_secret = Unicode(
'',
help='The ... | import six
from traitlets.config import LoggingConfigurable
from traitlets.traitlets import Unicode
class NotebookGist(LoggingConfigurable):
oauth_client_id = Unicode(
'',
help='The GitHub application OAUTH client ID',
).tag(config=True)
oauth_client_secret = Unicode(
'',
... | Use six for correct Python2/3 compatibility | Use six for correct Python2/3 compatibility
| Python | mpl-2.0 | mreid-moz/jupyter-notebook-gist,mozilla/jupyter-notebook-gist,mozilla/jupyter-notebook-gist,mreid-moz/jupyter-notebook-gist | from traitlets.config import LoggingConfigurable
from traitlets.traitlets import Unicode
class NotebookGist(LoggingConfigurable):
oauth_client_id = Unicode(
'',
help='The GitHub application OAUTH client ID',
).tag(config=True)
oauth_client_secret = Unicode(
'',
help='The ... | import six
from traitlets.config import LoggingConfigurable
from traitlets.traitlets import Unicode
class NotebookGist(LoggingConfigurable):
oauth_client_id = Unicode(
'',
help='The GitHub application OAUTH client ID',
).tag(config=True)
oauth_client_secret = Unicode(
'',
... | <commit_before>from traitlets.config import LoggingConfigurable
from traitlets.traitlets import Unicode
class NotebookGist(LoggingConfigurable):
oauth_client_id = Unicode(
'',
help='The GitHub application OAUTH client ID',
).tag(config=True)
oauth_client_secret = Unicode(
'',
... | import six
from traitlets.config import LoggingConfigurable
from traitlets.traitlets import Unicode
class NotebookGist(LoggingConfigurable):
oauth_client_id = Unicode(
'',
help='The GitHub application OAUTH client ID',
).tag(config=True)
oauth_client_secret = Unicode(
'',
... | from traitlets.config import LoggingConfigurable
from traitlets.traitlets import Unicode
class NotebookGist(LoggingConfigurable):
oauth_client_id = Unicode(
'',
help='The GitHub application OAUTH client ID',
).tag(config=True)
oauth_client_secret = Unicode(
'',
help='The ... | <commit_before>from traitlets.config import LoggingConfigurable
from traitlets.traitlets import Unicode
class NotebookGist(LoggingConfigurable):
oauth_client_id = Unicode(
'',
help='The GitHub application OAUTH client ID',
).tag(config=True)
oauth_client_secret = Unicode(
'',
... |
54a3cf2994b2620fc3b0e62af8c91b034290e98a | tuskar_ui/infrastructure/dashboard.py | tuskar_ui/infrastructure/dashboard.py | #
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# ... | #
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# ... | Remove the Infrastructure panel group | Remove the Infrastructure panel group
Remove the Infrastructure panel group, and place the panels
directly under the Infrastructure dashboard.
Change-Id: I321f9a84dd885732438ad58b6c62c480c9c10e37
| Python | apache-2.0 | rdo-management/tuskar-ui,rdo-management/tuskar-ui,rdo-management/tuskar-ui,rdo-management/tuskar-ui | #
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# ... | #
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# ... | <commit_before>#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing... | #
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# ... | #
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# ... | <commit_before>#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing... |
de9a6f647d0a6082e2a473895ec61ba23b41753e | controllers/oldauth.py | controllers/oldauth.py | import hashlib
import base64
from datetime import date
from bo import *
from database.oldauth import *
class Login(webapp.RequestHandler):
def get(self):
if self.request.get('site'):
user = users.get_current_user()
site = self.request.get('site')
oa = db.Query(OldAuth)... | import hashlib
import base64
from datetime import date
from bo import *
from database.oldauth import *
class Login(webapp.RequestHandler):
def get(self):
if self.request.get('site'):
u = User().current()
user = users.get_current_user()
site = self.request.get('site')... | Create users when they log in | Create users when they log in
| Python | mit | argoroots/Entu,argoroots/Entu,argoroots/Entu | import hashlib
import base64
from datetime import date
from bo import *
from database.oldauth import *
class Login(webapp.RequestHandler):
def get(self):
if self.request.get('site'):
user = users.get_current_user()
site = self.request.get('site')
oa = db.Query(OldAuth)... | import hashlib
import base64
from datetime import date
from bo import *
from database.oldauth import *
class Login(webapp.RequestHandler):
def get(self):
if self.request.get('site'):
u = User().current()
user = users.get_current_user()
site = self.request.get('site')... | <commit_before>import hashlib
import base64
from datetime import date
from bo import *
from database.oldauth import *
class Login(webapp.RequestHandler):
def get(self):
if self.request.get('site'):
user = users.get_current_user()
site = self.request.get('site')
oa = db... | import hashlib
import base64
from datetime import date
from bo import *
from database.oldauth import *
class Login(webapp.RequestHandler):
def get(self):
if self.request.get('site'):
u = User().current()
user = users.get_current_user()
site = self.request.get('site')... | import hashlib
import base64
from datetime import date
from bo import *
from database.oldauth import *
class Login(webapp.RequestHandler):
def get(self):
if self.request.get('site'):
user = users.get_current_user()
site = self.request.get('site')
oa = db.Query(OldAuth)... | <commit_before>import hashlib
import base64
from datetime import date
from bo import *
from database.oldauth import *
class Login(webapp.RequestHandler):
def get(self):
if self.request.get('site'):
user = users.get_current_user()
site = self.request.get('site')
oa = db... |
595f6cb2ff5431d252c838e87750f2fb5f38c5f7 | staff_toolbar/tests/urls.py | staff_toolbar/tests/urls.py | from django.conf.urls import url, include
from django.contrib import admin
urlpatterns = [
url('^admin/', include(admin.site.urls)),
]
| from django.conf.urls import url
from django.contrib import admin
urlpatterns = [
url('^admin/', admin.site.urls),
]
| Fix tests for Django 2.0 | Fix tests for Django 2.0
| Python | apache-2.0 | edoburu/django-staff-toolbar,edoburu/django-staff-toolbar | from django.conf.urls import url, include
from django.contrib import admin
urlpatterns = [
url('^admin/', include(admin.site.urls)),
]
Fix tests for Django 2.0 | from django.conf.urls import url
from django.contrib import admin
urlpatterns = [
url('^admin/', admin.site.urls),
]
| <commit_before>from django.conf.urls import url, include
from django.contrib import admin
urlpatterns = [
url('^admin/', include(admin.site.urls)),
]
<commit_msg>Fix tests for Django 2.0<commit_after> | from django.conf.urls import url
from django.contrib import admin
urlpatterns = [
url('^admin/', admin.site.urls),
]
| from django.conf.urls import url, include
from django.contrib import admin
urlpatterns = [
url('^admin/', include(admin.site.urls)),
]
Fix tests for Django 2.0from django.conf.urls import url
from django.contrib import admin
urlpatterns = [
url('^admin/', admin.site.urls),
]
| <commit_before>from django.conf.urls import url, include
from django.contrib import admin
urlpatterns = [
url('^admin/', include(admin.site.urls)),
]
<commit_msg>Fix tests for Django 2.0<commit_after>from django.conf.urls import url
from django.contrib import admin
urlpatterns = [
url('^admin/', admin.site.ur... |
4f39c87294a53325c4251da95391b34af81b616a | models.py | models.py | import datetime
from flask import url_for
from Simpoll import db
class Poll(db.Document):
created_at = db.DateTimeField(default=datetime.datetime.now, required=True)
question = db.StringField(max_length=255, required=True)
option1 = db.StringField(max_length=255, required=True)
option2 = db.StringFiel... | import datetime
from flask import url_for
from Simpoll import db
class Poll(db.Document):
created_at = db.DateTimeField(default=datetime.datetime.now, required=True)
question = db.StringField(max_length=255, required=True)
option1 = db.StringField(max_length=255, required=True)
option2 = db.StringFiel... | Modify schema to support only upvotes | Modify schema to support only upvotes
| Python | mit | dpuleri/simpoll_backend,dpuleri/simpoll_backend,dpuleri/simpoll_backend,dpuleri/simpoll_backend | import datetime
from flask import url_for
from Simpoll import db
class Poll(db.Document):
created_at = db.DateTimeField(default=datetime.datetime.now, required=True)
question = db.StringField(max_length=255, required=True)
option1 = db.StringField(max_length=255, required=True)
option2 = db.StringFiel... | import datetime
from flask import url_for
from Simpoll import db
class Poll(db.Document):
created_at = db.DateTimeField(default=datetime.datetime.now, required=True)
question = db.StringField(max_length=255, required=True)
option1 = db.StringField(max_length=255, required=True)
option2 = db.StringFiel... | <commit_before>import datetime
from flask import url_for
from Simpoll import db
class Poll(db.Document):
created_at = db.DateTimeField(default=datetime.datetime.now, required=True)
question = db.StringField(max_length=255, required=True)
option1 = db.StringField(max_length=255, required=True)
option2 ... | import datetime
from flask import url_for
from Simpoll import db
class Poll(db.Document):
created_at = db.DateTimeField(default=datetime.datetime.now, required=True)
question = db.StringField(max_length=255, required=True)
option1 = db.StringField(max_length=255, required=True)
option2 = db.StringFiel... | import datetime
from flask import url_for
from Simpoll import db
class Poll(db.Document):
created_at = db.DateTimeField(default=datetime.datetime.now, required=True)
question = db.StringField(max_length=255, required=True)
option1 = db.StringField(max_length=255, required=True)
option2 = db.StringFiel... | <commit_before>import datetime
from flask import url_for
from Simpoll import db
class Poll(db.Document):
created_at = db.DateTimeField(default=datetime.datetime.now, required=True)
question = db.StringField(max_length=255, required=True)
option1 = db.StringField(max_length=255, required=True)
option2 ... |
59fb7a7de69ffd49849ddcfecf2435af33efde53 | runcommands/__main__.py | runcommands/__main__.py | import sys
from .config import RawConfig
from .exc import RunCommandsError
from .run import run, partition_argv, read_run_args_from_file
def main(argv=None):
try:
all_argv, run_argv, command_argv = partition_argv(argv)
cli_args = run.parse_args(RawConfig(debug=False), run_argv)
run_args =... | import sys
from .config import RawConfig
from .exc import RunCommandsError
from .run import run, partition_argv, read_run_args_from_file
from .util import printer
def main(argv=None):
try:
all_argv, run_argv, command_argv = partition_argv(argv)
cli_args = run.parse_args(RawConfig(debug=False), ru... | Print error message before exiting in main() | Print error message before exiting in main()
Amends 42af9a9985ec5409f7773d9daf9f8a68df291228
| Python | mit | wylee/runcommands,wylee/runcommands | import sys
from .config import RawConfig
from .exc import RunCommandsError
from .run import run, partition_argv, read_run_args_from_file
def main(argv=None):
try:
all_argv, run_argv, command_argv = partition_argv(argv)
cli_args = run.parse_args(RawConfig(debug=False), run_argv)
run_args =... | import sys
from .config import RawConfig
from .exc import RunCommandsError
from .run import run, partition_argv, read_run_args_from_file
from .util import printer
def main(argv=None):
try:
all_argv, run_argv, command_argv = partition_argv(argv)
cli_args = run.parse_args(RawConfig(debug=False), ru... | <commit_before>import sys
from .config import RawConfig
from .exc import RunCommandsError
from .run import run, partition_argv, read_run_args_from_file
def main(argv=None):
try:
all_argv, run_argv, command_argv = partition_argv(argv)
cli_args = run.parse_args(RawConfig(debug=False), run_argv)
... | import sys
from .config import RawConfig
from .exc import RunCommandsError
from .run import run, partition_argv, read_run_args_from_file
from .util import printer
def main(argv=None):
try:
all_argv, run_argv, command_argv = partition_argv(argv)
cli_args = run.parse_args(RawConfig(debug=False), ru... | import sys
from .config import RawConfig
from .exc import RunCommandsError
from .run import run, partition_argv, read_run_args_from_file
def main(argv=None):
try:
all_argv, run_argv, command_argv = partition_argv(argv)
cli_args = run.parse_args(RawConfig(debug=False), run_argv)
run_args =... | <commit_before>import sys
from .config import RawConfig
from .exc import RunCommandsError
from .run import run, partition_argv, read_run_args_from_file
def main(argv=None):
try:
all_argv, run_argv, command_argv = partition_argv(argv)
cli_args = run.parse_args(RawConfig(debug=False), run_argv)
... |
d3d9885b56ca999cc194c9c84320858e6e7e9c8a | new_post.py | new_post.py | import sys
from datetime import datetime
TEMPLATE = """
Title: {title}
Date: {year}-{month}-{day} {hour}:{minute:02d}
Modified:
Author:
Category:
Tags:
"""
def make_entry(title):
today = datetime.today()
title_no_whitespaces = title.lower().strip().replace(' ', '-')
f_create = "content/{}_{:0>2}_{... | import sys
from datetime import datetime
TEMPLATE = """
Title: {title}
Date: {year}-{month}-{day} {hour}:{minute:02d}
Modified:
Author:
Category:
Tags:
"""
def make_entry(title):
today = datetime.today()
title_no_whitespaces = title.lower().strip().replace(' ', '-')
f_create = "content/{}_{:0>2}_{... | Convert script to Python 3 | Convert script to Python 3
Changed print function in main to be Python 3 compatible | Python | mit | Python-Monthly/pythonmonthly.github.io,Python-Monthly/Python-Monthly-Website,Python-Monthly/pythonmonthly.github.io,Python-Monthly/Python-Monthly-Website,Python-Monthly/Python-Monthly-Website,Python-Monthly/pythonmonthly.github.io,Python-Monthly/pythonmonthly.github.io,Python-Monthly/Python-Monthly-Website | import sys
from datetime import datetime
TEMPLATE = """
Title: {title}
Date: {year}-{month}-{day} {hour}:{minute:02d}
Modified:
Author:
Category:
Tags:
"""
def make_entry(title):
today = datetime.today()
title_no_whitespaces = title.lower().strip().replace(' ', '-')
f_create = "content/{}_{:0>2}_{... | import sys
from datetime import datetime
TEMPLATE = """
Title: {title}
Date: {year}-{month}-{day} {hour}:{minute:02d}
Modified:
Author:
Category:
Tags:
"""
def make_entry(title):
today = datetime.today()
title_no_whitespaces = title.lower().strip().replace(' ', '-')
f_create = "content/{}_{:0>2}_{... | <commit_before>import sys
from datetime import datetime
TEMPLATE = """
Title: {title}
Date: {year}-{month}-{day} {hour}:{minute:02d}
Modified:
Author:
Category:
Tags:
"""
def make_entry(title):
today = datetime.today()
title_no_whitespaces = title.lower().strip().replace(' ', '-')
f_create = "cont... | import sys
from datetime import datetime
TEMPLATE = """
Title: {title}
Date: {year}-{month}-{day} {hour}:{minute:02d}
Modified:
Author:
Category:
Tags:
"""
def make_entry(title):
today = datetime.today()
title_no_whitespaces = title.lower().strip().replace(' ', '-')
f_create = "content/{}_{:0>2}_{... | import sys
from datetime import datetime
TEMPLATE = """
Title: {title}
Date: {year}-{month}-{day} {hour}:{minute:02d}
Modified:
Author:
Category:
Tags:
"""
def make_entry(title):
today = datetime.today()
title_no_whitespaces = title.lower().strip().replace(' ', '-')
f_create = "content/{}_{:0>2}_{... | <commit_before>import sys
from datetime import datetime
TEMPLATE = """
Title: {title}
Date: {year}-{month}-{day} {hour}:{minute:02d}
Modified:
Author:
Category:
Tags:
"""
def make_entry(title):
today = datetime.today()
title_no_whitespaces = title.lower().strip().replace(' ', '-')
f_create = "cont... |
cfabcbe0e729eeb3281c4f4b7d6182a29d35f37e | ixprofile_client/fetchers.py | ixprofile_client/fetchers.py | """
An OpenID URL fetcher respecting the settings.
"""
from __future__ import unicode_literals
from __future__ import print_function
from __future__ import division
from __future__ import absolute_import
from future import standard_library
standard_library.install_aliases()
import inspect
import sys
import urllib.req... | """
An OpenID URL fetcher respecting the settings.
"""
from __future__ import unicode_literals
from __future__ import print_function
from __future__ import division
from __future__ import absolute_import
import inspect
import sys
PY3 = sys.version_info >= (3, 0)
# Important: python3-open uses urllib.request, wherea... | Use the correct urllib for the openid we're using | Use the correct urllib for the openid we're using
| Python | mit | infoxchange/ixprofile-client,infoxchange/ixprofile-client | """
An OpenID URL fetcher respecting the settings.
"""
from __future__ import unicode_literals
from __future__ import print_function
from __future__ import division
from __future__ import absolute_import
from future import standard_library
standard_library.install_aliases()
import inspect
import sys
import urllib.req... | """
An OpenID URL fetcher respecting the settings.
"""
from __future__ import unicode_literals
from __future__ import print_function
from __future__ import division
from __future__ import absolute_import
import inspect
import sys
PY3 = sys.version_info >= (3, 0)
# Important: python3-open uses urllib.request, wherea... | <commit_before>"""
An OpenID URL fetcher respecting the settings.
"""
from __future__ import unicode_literals
from __future__ import print_function
from __future__ import division
from __future__ import absolute_import
from future import standard_library
standard_library.install_aliases()
import inspect
import sys
im... | """
An OpenID URL fetcher respecting the settings.
"""
from __future__ import unicode_literals
from __future__ import print_function
from __future__ import division
from __future__ import absolute_import
import inspect
import sys
PY3 = sys.version_info >= (3, 0)
# Important: python3-open uses urllib.request, wherea... | """
An OpenID URL fetcher respecting the settings.
"""
from __future__ import unicode_literals
from __future__ import print_function
from __future__ import division
from __future__ import absolute_import
from future import standard_library
standard_library.install_aliases()
import inspect
import sys
import urllib.req... | <commit_before>"""
An OpenID URL fetcher respecting the settings.
"""
from __future__ import unicode_literals
from __future__ import print_function
from __future__ import division
from __future__ import absolute_import
from future import standard_library
standard_library.install_aliases()
import inspect
import sys
im... |
72d119ef80c4c84ae3be65c93795832a7250fc51 | run.py | run.py | import data
import model
import numpy as np
from keras import optimizers
# Localize data through file system relative indexing method
path = 'hcp_olivier/102816/MNINonLinear/Results/rfMRI_REST1_LR/rfMRI_REST1_LR.npy'
# Use data loading library to load data
a, b, y = data.generate_learning_set(np.load(path))
# Gener... | import data
import model
import numpy as np
from keras import optimizers
# Localize data through file system relative indexing method
path = 'hcp_olivier/102816/MNINonLinear/Results/rfMRI_REST1_LR/rfMRI_REST1_LR.npy'
# Use data loading library to load data
a, b, y = data.generate_learning_set(np.load(path))
# Gener... | Use linear models by default | Use linear models by default
| Python | mit | ogrisel/brain2vec | import data
import model
import numpy as np
from keras import optimizers
# Localize data through file system relative indexing method
path = 'hcp_olivier/102816/MNINonLinear/Results/rfMRI_REST1_LR/rfMRI_REST1_LR.npy'
# Use data loading library to load data
a, b, y = data.generate_learning_set(np.load(path))
# Gener... | import data
import model
import numpy as np
from keras import optimizers
# Localize data through file system relative indexing method
path = 'hcp_olivier/102816/MNINonLinear/Results/rfMRI_REST1_LR/rfMRI_REST1_LR.npy'
# Use data loading library to load data
a, b, y = data.generate_learning_set(np.load(path))
# Gener... | <commit_before>import data
import model
import numpy as np
from keras import optimizers
# Localize data through file system relative indexing method
path = 'hcp_olivier/102816/MNINonLinear/Results/rfMRI_REST1_LR/rfMRI_REST1_LR.npy'
# Use data loading library to load data
a, b, y = data.generate_learning_set(np.load(... | import data
import model
import numpy as np
from keras import optimizers
# Localize data through file system relative indexing method
path = 'hcp_olivier/102816/MNINonLinear/Results/rfMRI_REST1_LR/rfMRI_REST1_LR.npy'
# Use data loading library to load data
a, b, y = data.generate_learning_set(np.load(path))
# Gener... | import data
import model
import numpy as np
from keras import optimizers
# Localize data through file system relative indexing method
path = 'hcp_olivier/102816/MNINonLinear/Results/rfMRI_REST1_LR/rfMRI_REST1_LR.npy'
# Use data loading library to load data
a, b, y = data.generate_learning_set(np.load(path))
# Gener... | <commit_before>import data
import model
import numpy as np
from keras import optimizers
# Localize data through file system relative indexing method
path = 'hcp_olivier/102816/MNINonLinear/Results/rfMRI_REST1_LR/rfMRI_REST1_LR.npy'
# Use data loading library to load data
a, b, y = data.generate_learning_set(np.load(... |
0fb5a8b5caa99b82845712703bf53f2348227f78 | examples/string_expansion.py | examples/string_expansion.py | """Example of expanding and unexpanding string variables in entry fields."""
from __future__ import print_function
import bibpy
import os
def get_path_for(path):
return os.path.join(os.path.dirname(os.path.abspath(__file__)), path)
def print_entries(entries):
print(os.linesep.join(map(str, entries)))
... | """Example of expanding and unexpanding string variables in entry fields."""
from __future__ import print_function
import bibpy
import os
def get_path_for(path):
return os.path.join(os.path.dirname(os.path.abspath(__file__)), path)
def print_entries(entries):
print(os.linesep.join(map(str, entries)))
... | Fix ordering in string expansion example | Fix ordering in string expansion example
| Python | mit | MisanthropicBit/bibpy,MisanthropicBit/bibpy | """Example of expanding and unexpanding string variables in entry fields."""
from __future__ import print_function
import bibpy
import os
def get_path_for(path):
return os.path.join(os.path.dirname(os.path.abspath(__file__)), path)
def print_entries(entries):
print(os.linesep.join(map(str, entries)))
... | """Example of expanding and unexpanding string variables in entry fields."""
from __future__ import print_function
import bibpy
import os
def get_path_for(path):
return os.path.join(os.path.dirname(os.path.abspath(__file__)), path)
def print_entries(entries):
print(os.linesep.join(map(str, entries)))
... | <commit_before>"""Example of expanding and unexpanding string variables in entry fields."""
from __future__ import print_function
import bibpy
import os
def get_path_for(path):
return os.path.join(os.path.dirname(os.path.abspath(__file__)), path)
def print_entries(entries):
print(os.linesep.join(map(str, ... | """Example of expanding and unexpanding string variables in entry fields."""
from __future__ import print_function
import bibpy
import os
def get_path_for(path):
return os.path.join(os.path.dirname(os.path.abspath(__file__)), path)
def print_entries(entries):
print(os.linesep.join(map(str, entries)))
... | """Example of expanding and unexpanding string variables in entry fields."""
from __future__ import print_function
import bibpy
import os
def get_path_for(path):
return os.path.join(os.path.dirname(os.path.abspath(__file__)), path)
def print_entries(entries):
print(os.linesep.join(map(str, entries)))
... | <commit_before>"""Example of expanding and unexpanding string variables in entry fields."""
from __future__ import print_function
import bibpy
import os
def get_path_for(path):
return os.path.join(os.path.dirname(os.path.abspath(__file__)), path)
def print_entries(entries):
print(os.linesep.join(map(str, ... |
c6f691e5ad67fa1631a37da35b3af9dbdcea3925 | plumeria/plugins/urban_dictionary.py | plumeria/plugins/urban_dictionary.py | from plumeria.command import commands, CommandError
from plumeria.util import http
from plumeria.util.ratelimit import rate_limit
@commands.register("urbandict", "urb", category="Search")
@rate_limit()
async def urban_dictionary(message):
"""
Search Urban Dictionary for a word.
"""
q = message.conten... | from plumeria.command import commands, CommandError
from plumeria.util import http
from plumeria.util.ratelimit import rate_limit
@commands.register("urban", "urb", category="Search")
@rate_limit()
async def urban_dictionary(message):
"""
Search Urban Dictionary for a word.
"""
q = message.content.st... | Add .urban as Urban Dictionary alias. | Add .urban as Urban Dictionary alias.
| Python | mit | sk89q/Plumeria,sk89q/Plumeria,sk89q/Plumeria | from plumeria.command import commands, CommandError
from plumeria.util import http
from plumeria.util.ratelimit import rate_limit
@commands.register("urbandict", "urb", category="Search")
@rate_limit()
async def urban_dictionary(message):
"""
Search Urban Dictionary for a word.
"""
q = message.conten... | from plumeria.command import commands, CommandError
from plumeria.util import http
from plumeria.util.ratelimit import rate_limit
@commands.register("urban", "urb", category="Search")
@rate_limit()
async def urban_dictionary(message):
"""
Search Urban Dictionary for a word.
"""
q = message.content.st... | <commit_before>from plumeria.command import commands, CommandError
from plumeria.util import http
from plumeria.util.ratelimit import rate_limit
@commands.register("urbandict", "urb", category="Search")
@rate_limit()
async def urban_dictionary(message):
"""
Search Urban Dictionary for a word.
"""
q =... | from plumeria.command import commands, CommandError
from plumeria.util import http
from plumeria.util.ratelimit import rate_limit
@commands.register("urban", "urb", category="Search")
@rate_limit()
async def urban_dictionary(message):
"""
Search Urban Dictionary for a word.
"""
q = message.content.st... | from plumeria.command import commands, CommandError
from plumeria.util import http
from plumeria.util.ratelimit import rate_limit
@commands.register("urbandict", "urb", category="Search")
@rate_limit()
async def urban_dictionary(message):
"""
Search Urban Dictionary for a word.
"""
q = message.conten... | <commit_before>from plumeria.command import commands, CommandError
from plumeria.util import http
from plumeria.util.ratelimit import rate_limit
@commands.register("urbandict", "urb", category="Search")
@rate_limit()
async def urban_dictionary(message):
"""
Search Urban Dictionary for a word.
"""
q =... |
93765a8c82d4cc6b988ed5a191fa595e58e64665 | ofxparse/__init__.py | ofxparse/__init__.py | from ofxparse import OfxParser, AccountType, Account, Statement, Transaction
__version__ = '0.10'
| from ofxparse import OfxParser, AccountType, Account, Statement, Transaction
__version__ = '0.11.wave'
| Set the version number to 0.11.wave | Set the version number to 0.11.wave
| Python | mit | hiromu2000/ofxparse,jseutter/ofxparse,rdsteed/ofxparse,udibr/ofxparse,jaraco/ofxparse,egh/ofxparse | from ofxparse import OfxParser, AccountType, Account, Statement, Transaction
__version__ = '0.10'
Set the version number to 0.11.wave | from ofxparse import OfxParser, AccountType, Account, Statement, Transaction
__version__ = '0.11.wave'
| <commit_before>from ofxparse import OfxParser, AccountType, Account, Statement, Transaction
__version__ = '0.10'
<commit_msg>Set the version number to 0.11.wave<commit_after> | from ofxparse import OfxParser, AccountType, Account, Statement, Transaction
__version__ = '0.11.wave'
| from ofxparse import OfxParser, AccountType, Account, Statement, Transaction
__version__ = '0.10'
Set the version number to 0.11.wavefrom ofxparse import OfxParser, AccountType, Account, Statement, Transaction
__version__ = '0.11.wave'
| <commit_before>from ofxparse import OfxParser, AccountType, Account, Statement, Transaction
__version__ = '0.10'
<commit_msg>Set the version number to 0.11.wave<commit_after>from ofxparse import OfxParser, AccountType, Account, Statement, Transaction
__version__ = '0.11.wave'
|
3494282003315b32e8fe139714be041ed4dc2511 | accloudtant/__main__.py | accloudtant/__main__.py | import csv
if __name__ == "__main__":
usage = []
with open("tests/fixtures/2021/03/S3.csv") as f:
reader = csv.DictReader(f)
for row in reader:
usage.append(row)
print("Simple Storage Service")
for entry in usage:
print(entry)
| import csv
def area(entry):
if entry[" UsageType"].startswith("EUC1-"):
return "EU (Frankfurt)"
if __name__ == "__main__":
usage = []
with open("tests/fixtures/2021/03/S3.csv") as f:
reader = csv.DictReader(f)
for row in reader:
usage.append(row)
print("Simple S... | Print list of areas in usage report | Print list of areas in usage report
This list is not completely ok, as some usage record types, like
`StorageObjectCount` can't get area calculated without inducing it
from other records.
| Python | apache-2.0 | ifosch/accloudtant | import csv
if __name__ == "__main__":
usage = []
with open("tests/fixtures/2021/03/S3.csv") as f:
reader = csv.DictReader(f)
for row in reader:
usage.append(row)
print("Simple Storage Service")
for entry in usage:
print(entry)
Print list of areas in usage report
... | import csv
def area(entry):
if entry[" UsageType"].startswith("EUC1-"):
return "EU (Frankfurt)"
if __name__ == "__main__":
usage = []
with open("tests/fixtures/2021/03/S3.csv") as f:
reader = csv.DictReader(f)
for row in reader:
usage.append(row)
print("Simple S... | <commit_before>import csv
if __name__ == "__main__":
usage = []
with open("tests/fixtures/2021/03/S3.csv") as f:
reader = csv.DictReader(f)
for row in reader:
usage.append(row)
print("Simple Storage Service")
for entry in usage:
print(entry)
<commit_msg>Print list... | import csv
def area(entry):
if entry[" UsageType"].startswith("EUC1-"):
return "EU (Frankfurt)"
if __name__ == "__main__":
usage = []
with open("tests/fixtures/2021/03/S3.csv") as f:
reader = csv.DictReader(f)
for row in reader:
usage.append(row)
print("Simple S... | import csv
if __name__ == "__main__":
usage = []
with open("tests/fixtures/2021/03/S3.csv") as f:
reader = csv.DictReader(f)
for row in reader:
usage.append(row)
print("Simple Storage Service")
for entry in usage:
print(entry)
Print list of areas in usage report
... | <commit_before>import csv
if __name__ == "__main__":
usage = []
with open("tests/fixtures/2021/03/S3.csv") as f:
reader = csv.DictReader(f)
for row in reader:
usage.append(row)
print("Simple Storage Service")
for entry in usage:
print(entry)
<commit_msg>Print list... |
484f3537d634e31f79c2281cff869724707ee2c3 | day03/solution.py | day03/solution.py | santaPosition = [0, 0]
roboSantaPosition = [0, 0]
uniquePositions = set()
input = open("data", "r").read()
for index, char in enumerate(input):
position = []
if index % 2 == 0:
position = santaPosition
else:
position = roboSantaPosition
if char is '^':
position[0] += 1
elif char is 'v':
position[0] -= ... | santaPosition = [0, 0]
roboSantaPosition = [0, 0]
uniquePositions = set()
input = open("data", "r").read()
for index, char in enumerate(input):
position = []
if index % 2 == 0:
position = santaPosition
else:
position = roboSantaPosition
if char is '^':
position[0] += 1
elif char is 'v':
position[0] -= ... | Make tuple creation from position cleaner. | Make tuple creation from position cleaner.
| Python | mit | Mark-Simulacrum/advent-of-code-2015,Mark-Simulacrum/advent-of-code-2015,Mark-Simulacrum/advent-of-code-2015,Mark-Simulacrum/advent-of-code-2015 | santaPosition = [0, 0]
roboSantaPosition = [0, 0]
uniquePositions = set()
input = open("data", "r").read()
for index, char in enumerate(input):
position = []
if index % 2 == 0:
position = santaPosition
else:
position = roboSantaPosition
if char is '^':
position[0] += 1
elif char is 'v':
position[0] -= ... | santaPosition = [0, 0]
roboSantaPosition = [0, 0]
uniquePositions = set()
input = open("data", "r").read()
for index, char in enumerate(input):
position = []
if index % 2 == 0:
position = santaPosition
else:
position = roboSantaPosition
if char is '^':
position[0] += 1
elif char is 'v':
position[0] -= ... | <commit_before>santaPosition = [0, 0]
roboSantaPosition = [0, 0]
uniquePositions = set()
input = open("data", "r").read()
for index, char in enumerate(input):
position = []
if index % 2 == 0:
position = santaPosition
else:
position = roboSantaPosition
if char is '^':
position[0] += 1
elif char is 'v':
... | santaPosition = [0, 0]
roboSantaPosition = [0, 0]
uniquePositions = set()
input = open("data", "r").read()
for index, char in enumerate(input):
position = []
if index % 2 == 0:
position = santaPosition
else:
position = roboSantaPosition
if char is '^':
position[0] += 1
elif char is 'v':
position[0] -= ... | santaPosition = [0, 0]
roboSantaPosition = [0, 0]
uniquePositions = set()
input = open("data", "r").read()
for index, char in enumerate(input):
position = []
if index % 2 == 0:
position = santaPosition
else:
position = roboSantaPosition
if char is '^':
position[0] += 1
elif char is 'v':
position[0] -= ... | <commit_before>santaPosition = [0, 0]
roboSantaPosition = [0, 0]
uniquePositions = set()
input = open("data", "r").read()
for index, char in enumerate(input):
position = []
if index % 2 == 0:
position = santaPosition
else:
position = roboSantaPosition
if char is '^':
position[0] += 1
elif char is 'v':
... |
844aff45eb1804b461460368f97af4f73a6b62f0 | data_structures/union_find/weighted_quick_union.py | data_structures/union_find/weighted_quick_union.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
class WeightedQuickUnion(object):
def __init__(self):
self.id = []
self.weight = []
def find(self, val):
p = val
while self.id[p] != p:
p = self.id[p]
return self.id[p]
def union(self, p, q):
p_ro... | #!/usr/bin/env python
# -*- coding: utf-8 -*-
class WeightedQuickUnion(object):
def __init__(self, data=None):
self.id = data
self.weight = [1] * len(data)
self.count = len(data)
def count(self):
return self.count
def find(self, val):
p = val
while self.i... | Fix quick union functions issue | Fix quick union functions issue
Missing counter
Find function should return position of element
Decrement counter in union
| Python | mit | hongta/practice-python,hongta/practice-python | #!/usr/bin/env python
# -*- coding: utf-8 -*-
class WeightedQuickUnion(object):
def __init__(self):
self.id = []
self.weight = []
def find(self, val):
p = val
while self.id[p] != p:
p = self.id[p]
return self.id[p]
def union(self, p, q):
p_ro... | #!/usr/bin/env python
# -*- coding: utf-8 -*-
class WeightedQuickUnion(object):
def __init__(self, data=None):
self.id = data
self.weight = [1] * len(data)
self.count = len(data)
def count(self):
return self.count
def find(self, val):
p = val
while self.i... | <commit_before>#!/usr/bin/env python
# -*- coding: utf-8 -*-
class WeightedQuickUnion(object):
def __init__(self):
self.id = []
self.weight = []
def find(self, val):
p = val
while self.id[p] != p:
p = self.id[p]
return self.id[p]
def union(self, p, q... | #!/usr/bin/env python
# -*- coding: utf-8 -*-
class WeightedQuickUnion(object):
def __init__(self, data=None):
self.id = data
self.weight = [1] * len(data)
self.count = len(data)
def count(self):
return self.count
def find(self, val):
p = val
while self.i... | #!/usr/bin/env python
# -*- coding: utf-8 -*-
class WeightedQuickUnion(object):
def __init__(self):
self.id = []
self.weight = []
def find(self, val):
p = val
while self.id[p] != p:
p = self.id[p]
return self.id[p]
def union(self, p, q):
p_ro... | <commit_before>#!/usr/bin/env python
# -*- coding: utf-8 -*-
class WeightedQuickUnion(object):
def __init__(self):
self.id = []
self.weight = []
def find(self, val):
p = val
while self.id[p] != p:
p = self.id[p]
return self.id[p]
def union(self, p, q... |
bddab649c6684f09870983dca97c39eb30b62c06 | djangobotcfg/status.py | djangobotcfg/status.py | from buildbot.status import html, words
from buildbot.status.web.authz import Authz
from buildbot.status.web.auth import BasicAuth
# authz = Authz(
# forceBuild=True,
# forceAllBuilds=True,
# pingBuilder=True,
# gracefulShutdown=True,
# stopBuild=True,
# stopAllBuilds=True,
# cancelPendingB... | from buildbot.status import html, words
from buildbot.status.web.authz import Authz
from buildbot.status.web.auth import BasicAuth
def get_status():
return [
html.WebStatus(
http_port = '8010',
# authz = authz,
order_console_by_time = True,
revlink = 'http://... | Remove the IRC bot for now, and also the commented-out code. | Remove the IRC bot for now, and also the commented-out code.
| Python | bsd-3-clause | hochanh/django-buildmaster,jacobian-archive/django-buildmaster | from buildbot.status import html, words
from buildbot.status.web.authz import Authz
from buildbot.status.web.auth import BasicAuth
# authz = Authz(
# forceBuild=True,
# forceAllBuilds=True,
# pingBuilder=True,
# gracefulShutdown=True,
# stopBuild=True,
# stopAllBuilds=True,
# cancelPendingB... | from buildbot.status import html, words
from buildbot.status.web.authz import Authz
from buildbot.status.web.auth import BasicAuth
def get_status():
return [
html.WebStatus(
http_port = '8010',
# authz = authz,
order_console_by_time = True,
revlink = 'http://... | <commit_before>from buildbot.status import html, words
from buildbot.status.web.authz import Authz
from buildbot.status.web.auth import BasicAuth
# authz = Authz(
# forceBuild=True,
# forceAllBuilds=True,
# pingBuilder=True,
# gracefulShutdown=True,
# stopBuild=True,
# stopAllBuilds=True,
# ... | from buildbot.status import html, words
from buildbot.status.web.authz import Authz
from buildbot.status.web.auth import BasicAuth
def get_status():
return [
html.WebStatus(
http_port = '8010',
# authz = authz,
order_console_by_time = True,
revlink = 'http://... | from buildbot.status import html, words
from buildbot.status.web.authz import Authz
from buildbot.status.web.auth import BasicAuth
# authz = Authz(
# forceBuild=True,
# forceAllBuilds=True,
# pingBuilder=True,
# gracefulShutdown=True,
# stopBuild=True,
# stopAllBuilds=True,
# cancelPendingB... | <commit_before>from buildbot.status import html, words
from buildbot.status.web.authz import Authz
from buildbot.status.web.auth import BasicAuth
# authz = Authz(
# forceBuild=True,
# forceAllBuilds=True,
# pingBuilder=True,
# gracefulShutdown=True,
# stopBuild=True,
# stopAllBuilds=True,
# ... |
b9792ce368e3422b28c04c328b22350b2ad991b3 | appengine-experimental/src/models.py | appengine-experimental/src/models.py | from google.appengine.ext import db
class CHPIncident(db.Model):
CenterID = db.StringProperty(required=True)
DispatchID = db.StringProperty(required=True)
LogID = db.StringProperty(required=True)
LogTime = db.DateTimeProperty()
LogType = db.StringProperty()
LogTypeID = db.StringProperty()
Location = db.StringPr... | from google.appengine.ext import db
from datetime import datetime, timedelta
class CHPIncident(db.Model):
CenterID = db.StringProperty(required=True)
DispatchID = db.StringProperty(required=True)
LogID = db.StringProperty(required=True)
LogTime = db.DateTimeProperty()
LogType = db.StringProperty()
LogTypeID = db... | Put a getStatus() method into the CHPIncident model. That's the right way to do it. | Put a getStatus() method into the CHPIncident model. That's the right way to do it.
| Python | isc | lectroidmarc/SacTraffic,lectroidmarc/SacTraffic | from google.appengine.ext import db
class CHPIncident(db.Model):
CenterID = db.StringProperty(required=True)
DispatchID = db.StringProperty(required=True)
LogID = db.StringProperty(required=True)
LogTime = db.DateTimeProperty()
LogType = db.StringProperty()
LogTypeID = db.StringProperty()
Location = db.StringPr... | from google.appengine.ext import db
from datetime import datetime, timedelta
class CHPIncident(db.Model):
CenterID = db.StringProperty(required=True)
DispatchID = db.StringProperty(required=True)
LogID = db.StringProperty(required=True)
LogTime = db.DateTimeProperty()
LogType = db.StringProperty()
LogTypeID = db... | <commit_before>from google.appengine.ext import db
class CHPIncident(db.Model):
CenterID = db.StringProperty(required=True)
DispatchID = db.StringProperty(required=True)
LogID = db.StringProperty(required=True)
LogTime = db.DateTimeProperty()
LogType = db.StringProperty()
LogTypeID = db.StringProperty()
Locatio... | from google.appengine.ext import db
from datetime import datetime, timedelta
class CHPIncident(db.Model):
CenterID = db.StringProperty(required=True)
DispatchID = db.StringProperty(required=True)
LogID = db.StringProperty(required=True)
LogTime = db.DateTimeProperty()
LogType = db.StringProperty()
LogTypeID = db... | from google.appengine.ext import db
class CHPIncident(db.Model):
CenterID = db.StringProperty(required=True)
DispatchID = db.StringProperty(required=True)
LogID = db.StringProperty(required=True)
LogTime = db.DateTimeProperty()
LogType = db.StringProperty()
LogTypeID = db.StringProperty()
Location = db.StringPr... | <commit_before>from google.appengine.ext import db
class CHPIncident(db.Model):
CenterID = db.StringProperty(required=True)
DispatchID = db.StringProperty(required=True)
LogID = db.StringProperty(required=True)
LogTime = db.DateTimeProperty()
LogType = db.StringProperty()
LogTypeID = db.StringProperty()
Locatio... |
6bb63c6133db2155c1985d6bb2827f65d5ae3555 | ntm/__init__.py | ntm/__init__.py | from . import controllers
from . import heads
from . import init
from . import memory
from . import nonlinearities
from . import ntm
from . import similarities
from . import updates | from . import controllers
from . import heads
from . import init
from . import layers
from . import memory
from . import nonlinearities
from . import similarities
from . import updates | Fix import name from ntm to layers | Fix import name from ntm to layers
| Python | mit | snipsco/ntm-lasagne | from . import controllers
from . import heads
from . import init
from . import memory
from . import nonlinearities
from . import ntm
from . import similarities
from . import updatesFix import name from ntm to layers | from . import controllers
from . import heads
from . import init
from . import layers
from . import memory
from . import nonlinearities
from . import similarities
from . import updates | <commit_before>from . import controllers
from . import heads
from . import init
from . import memory
from . import nonlinearities
from . import ntm
from . import similarities
from . import updates<commit_msg>Fix import name from ntm to layers<commit_after> | from . import controllers
from . import heads
from . import init
from . import layers
from . import memory
from . import nonlinearities
from . import similarities
from . import updates | from . import controllers
from . import heads
from . import init
from . import memory
from . import nonlinearities
from . import ntm
from . import similarities
from . import updatesFix import name from ntm to layersfrom . import controllers
from . import heads
from . import init
from . import layers
from . import memor... | <commit_before>from . import controllers
from . import heads
from . import init
from . import memory
from . import nonlinearities
from . import ntm
from . import similarities
from . import updates<commit_msg>Fix import name from ntm to layers<commit_after>from . import controllers
from . import heads
from . import init... |
682ad4b8c85ae271ab7e5a488867c61082efb175 | setup.py | setup.py | #!/usr/bin/env python
from setuptools import setup, find_packages
import os
__doc__ = """
App for Django featuring improved form base classes.
"""
version = '1.1.5.dev0'
def read(fname):
return open(os.path.join(os.path.dirname(__file__), fname)).read()
setup(
name='django-betterforms',
version=version... | #!/usr/bin/env python
from setuptools import setup, find_packages
import os
__doc__ = """
App for Django featuring improved form base classes.
"""
version = '1.1.5.dev0'
def read(fname):
return open(os.path.join(os.path.dirname(__file__), fname)).read()
setup(
name='django-betterforms',
version=versio... | Update package classifiers and Django minimum version | Update package classifiers and Django minimum version
| Python | bsd-2-clause | fusionbox/django-betterforms,fusionbox/django-betterforms | #!/usr/bin/env python
from setuptools import setup, find_packages
import os
__doc__ = """
App for Django featuring improved form base classes.
"""
version = '1.1.5.dev0'
def read(fname):
return open(os.path.join(os.path.dirname(__file__), fname)).read()
setup(
name='django-betterforms',
version=version... | #!/usr/bin/env python
from setuptools import setup, find_packages
import os
__doc__ = """
App for Django featuring improved form base classes.
"""
version = '1.1.5.dev0'
def read(fname):
return open(os.path.join(os.path.dirname(__file__), fname)).read()
setup(
name='django-betterforms',
version=versio... | <commit_before>#!/usr/bin/env python
from setuptools import setup, find_packages
import os
__doc__ = """
App for Django featuring improved form base classes.
"""
version = '1.1.5.dev0'
def read(fname):
return open(os.path.join(os.path.dirname(__file__), fname)).read()
setup(
name='django-betterforms',
... | #!/usr/bin/env python
from setuptools import setup, find_packages
import os
__doc__ = """
App for Django featuring improved form base classes.
"""
version = '1.1.5.dev0'
def read(fname):
return open(os.path.join(os.path.dirname(__file__), fname)).read()
setup(
name='django-betterforms',
version=versio... | #!/usr/bin/env python
from setuptools import setup, find_packages
import os
__doc__ = """
App for Django featuring improved form base classes.
"""
version = '1.1.5.dev0'
def read(fname):
return open(os.path.join(os.path.dirname(__file__), fname)).read()
setup(
name='django-betterforms',
version=version... | <commit_before>#!/usr/bin/env python
from setuptools import setup, find_packages
import os
__doc__ = """
App for Django featuring improved form base classes.
"""
version = '1.1.5.dev0'
def read(fname):
return open(os.path.join(os.path.dirname(__file__), fname)).read()
setup(
name='django-betterforms',
... |
586c1dfc74a0bc5335f12381891f1a366c0231da | setup.py | setup.py | # -*- coding: utf-8 -*-
from setuptools import setup, find_packages
name = 'morepath_cerebral_todomvc'
description = (
'Morepath example of using React & Cerebral'
)
version = '0.1.0'
setup(
name=name,
version=version,
description=description,
author='Henri Hulski',
author_email='henri.hulsk... | # -*- coding: utf-8 -*-
from setuptools import setup, find_packages
name = 'morepath_cerebral_todomvc'
description = (
'Morepath example of using React & Cerebral'
)
version = '0.1.0'
setup(
name=name,
version=version,
description=description,
author='Henri Hulski',
author_email='henri.hulski... | Adjust entry_points to fix autoscan | Adjust entry_points to fix autoscan
| Python | bsd-3-clause | morepath/morepath_cerebral_todomvc,morepath/morepath_cerebral_todomvc,morepath/morepath_cerebral_todomvc | # -*- coding: utf-8 -*-
from setuptools import setup, find_packages
name = 'morepath_cerebral_todomvc'
description = (
'Morepath example of using React & Cerebral'
)
version = '0.1.0'
setup(
name=name,
version=version,
description=description,
author='Henri Hulski',
author_email='henri.hulsk... | # -*- coding: utf-8 -*-
from setuptools import setup, find_packages
name = 'morepath_cerebral_todomvc'
description = (
'Morepath example of using React & Cerebral'
)
version = '0.1.0'
setup(
name=name,
version=version,
description=description,
author='Henri Hulski',
author_email='henri.hulski... | <commit_before># -*- coding: utf-8 -*-
from setuptools import setup, find_packages
name = 'morepath_cerebral_todomvc'
description = (
'Morepath example of using React & Cerebral'
)
version = '0.1.0'
setup(
name=name,
version=version,
description=description,
author='Henri Hulski',
author_ema... | # -*- coding: utf-8 -*-
from setuptools import setup, find_packages
name = 'morepath_cerebral_todomvc'
description = (
'Morepath example of using React & Cerebral'
)
version = '0.1.0'
setup(
name=name,
version=version,
description=description,
author='Henri Hulski',
author_email='henri.hulski... | # -*- coding: utf-8 -*-
from setuptools import setup, find_packages
name = 'morepath_cerebral_todomvc'
description = (
'Morepath example of using React & Cerebral'
)
version = '0.1.0'
setup(
name=name,
version=version,
description=description,
author='Henri Hulski',
author_email='henri.hulsk... | <commit_before># -*- coding: utf-8 -*-
from setuptools import setup, find_packages
name = 'morepath_cerebral_todomvc'
description = (
'Morepath example of using React & Cerebral'
)
version = '0.1.0'
setup(
name=name,
version=version,
description=description,
author='Henri Hulski',
author_ema... |
c0724bb7471f51b5d3acc8a403168607ff5a0f5c | setup.py | setup.py | from setuptools import find_packages, setup
setup(
name='ActionCableZwei',
version='0.1.3',
license='MIT',
description='Action Cable Client for Python 3',
author='Tobias Feistmantl',
author_email='tobias@myhome-automations.com',
url='https://github.com/tobiasfeistmantl/python-actioncable-z... | from setuptools import find_packages, setup
setup(
name='ActionCableZwei',
version='0.1.4',
license='MIT',
description='Action Cable Client for Python 3',
author='Tobias Feistmantl',
author_email='tobias@myhome-automations.com',
url='https://github.com/tobiasfeistmantl/python-actioncable-z... | Update version number to 0.1.4 | Update version number to 0.1.4
| Python | mit | tobiasfeistmantl/python-actioncable-zwei | from setuptools import find_packages, setup
setup(
name='ActionCableZwei',
version='0.1.3',
license='MIT',
description='Action Cable Client for Python 3',
author='Tobias Feistmantl',
author_email='tobias@myhome-automations.com',
url='https://github.com/tobiasfeistmantl/python-actioncable-z... | from setuptools import find_packages, setup
setup(
name='ActionCableZwei',
version='0.1.4',
license='MIT',
description='Action Cable Client for Python 3',
author='Tobias Feistmantl',
author_email='tobias@myhome-automations.com',
url='https://github.com/tobiasfeistmantl/python-actioncable-z... | <commit_before>from setuptools import find_packages, setup
setup(
name='ActionCableZwei',
version='0.1.3',
license='MIT',
description='Action Cable Client for Python 3',
author='Tobias Feistmantl',
author_email='tobias@myhome-automations.com',
url='https://github.com/tobiasfeistmantl/pytho... | from setuptools import find_packages, setup
setup(
name='ActionCableZwei',
version='0.1.4',
license='MIT',
description='Action Cable Client for Python 3',
author='Tobias Feistmantl',
author_email='tobias@myhome-automations.com',
url='https://github.com/tobiasfeistmantl/python-actioncable-z... | from setuptools import find_packages, setup
setup(
name='ActionCableZwei',
version='0.1.3',
license='MIT',
description='Action Cable Client for Python 3',
author='Tobias Feistmantl',
author_email='tobias@myhome-automations.com',
url='https://github.com/tobiasfeistmantl/python-actioncable-z... | <commit_before>from setuptools import find_packages, setup
setup(
name='ActionCableZwei',
version='0.1.3',
license='MIT',
description='Action Cable Client for Python 3',
author='Tobias Feistmantl',
author_email='tobias@myhome-automations.com',
url='https://github.com/tobiasfeistmantl/pytho... |
d7d6819e728edff997c07c6191f882a61d30f219 | setup.py | setup.py | #!/usr/bin/env python
from distutils.core import setup
setup(name="taggert",
version="1.0",
author="Martijn Grendelman",
author_email="m@rtijn.net",
maintainer="Martijn Grendelman",
maintainer_email="m@rtijn.net",
description="GTK+ 3 geotagging application",
long_description="Taggert is an easy-to-use program ... | #!/usr/bin/env python
from distutils.core import setup
setup(name="taggert",
version="1.0",
author="Martijn Grendelman",
author_email="m@rtijn.net",
maintainer="Martijn Grendelman",
maintainer_email="m@rtijn.net",
description="GTK+ 3 geotagging application",
long_description="Taggert is an easy-to-use program ... | Make sure to install gpx.xsd in data directory | Make sure to install gpx.xsd in data directory
| Python | apache-2.0 | tinuzz/taggert | #!/usr/bin/env python
from distutils.core import setup
setup(name="taggert",
version="1.0",
author="Martijn Grendelman",
author_email="m@rtijn.net",
maintainer="Martijn Grendelman",
maintainer_email="m@rtijn.net",
description="GTK+ 3 geotagging application",
long_description="Taggert is an easy-to-use program ... | #!/usr/bin/env python
from distutils.core import setup
setup(name="taggert",
version="1.0",
author="Martijn Grendelman",
author_email="m@rtijn.net",
maintainer="Martijn Grendelman",
maintainer_email="m@rtijn.net",
description="GTK+ 3 geotagging application",
long_description="Taggert is an easy-to-use program ... | <commit_before>#!/usr/bin/env python
from distutils.core import setup
setup(name="taggert",
version="1.0",
author="Martijn Grendelman",
author_email="m@rtijn.net",
maintainer="Martijn Grendelman",
maintainer_email="m@rtijn.net",
description="GTK+ 3 geotagging application",
long_description="Taggert is an easy-... | #!/usr/bin/env python
from distutils.core import setup
setup(name="taggert",
version="1.0",
author="Martijn Grendelman",
author_email="m@rtijn.net",
maintainer="Martijn Grendelman",
maintainer_email="m@rtijn.net",
description="GTK+ 3 geotagging application",
long_description="Taggert is an easy-to-use program ... | #!/usr/bin/env python
from distutils.core import setup
setup(name="taggert",
version="1.0",
author="Martijn Grendelman",
author_email="m@rtijn.net",
maintainer="Martijn Grendelman",
maintainer_email="m@rtijn.net",
description="GTK+ 3 geotagging application",
long_description="Taggert is an easy-to-use program ... | <commit_before>#!/usr/bin/env python
from distutils.core import setup
setup(name="taggert",
version="1.0",
author="Martijn Grendelman",
author_email="m@rtijn.net",
maintainer="Martijn Grendelman",
maintainer_email="m@rtijn.net",
description="GTK+ 3 geotagging application",
long_description="Taggert is an easy-... |
cf30c07be85cf6408c636ffa34f984ed652cd212 | setup.py | setup.py | from distutils.core import setup
import subprocess
setup(
name='colorguard',
version='0.01',
packages=['colorguard'],
install_requires=[
'tracer',
'harvester',
'simuvex'
],
)
| from distutils.core import setup
import subprocess
setup(
name='colorguard',
version='0.01',
packages=['colorguard'],
install_requires=[
'rex',
'tracer',
'harvester',
'simuvex'
],
)
| Add rex as a dependency | Add rex as a dependency
| Python | bsd-2-clause | mechaphish/colorguard | from distutils.core import setup
import subprocess
setup(
name='colorguard',
version='0.01',
packages=['colorguard'],
install_requires=[
'tracer',
'harvester',
'simuvex'
],
)
Add rex as a dependency | from distutils.core import setup
import subprocess
setup(
name='colorguard',
version='0.01',
packages=['colorguard'],
install_requires=[
'rex',
'tracer',
'harvester',
'simuvex'
],
)
| <commit_before>from distutils.core import setup
import subprocess
setup(
name='colorguard',
version='0.01',
packages=['colorguard'],
install_requires=[
'tracer',
'harvester',
'simuvex'
],
)
<commit_msg>Add rex as a dependency<commit_after> | from distutils.core import setup
import subprocess
setup(
name='colorguard',
version='0.01',
packages=['colorguard'],
install_requires=[
'rex',
'tracer',
'harvester',
'simuvex'
],
)
| from distutils.core import setup
import subprocess
setup(
name='colorguard',
version='0.01',
packages=['colorguard'],
install_requires=[
'tracer',
'harvester',
'simuvex'
],
)
Add rex as a dependencyfrom distutils.core import setup
import subprocess
set... | <commit_before>from distutils.core import setup
import subprocess
setup(
name='colorguard',
version='0.01',
packages=['colorguard'],
install_requires=[
'tracer',
'harvester',
'simuvex'
],
)
<commit_msg>Add rex as a dependency<commit_after>from distutils... |
b6b9a926704ffe570bd4cedf6cabd9920dc41cad | setup.py | setup.py | from setuptools import setup, find_packages
import os
setup(
name='yamlicious',
packages=find_packages(),
scripts=[os.path.join('bin', p) for p in os.listdir('bin')],
)
| from setuptools import setup, find_packages
import os
setup(
name='yamlicious',
packages=find_packages(),
scripts=[os.path.join('bin', p) for p in os.listdir('bin')],
install_requires=[
'pyyaml',
]
)
| Add YAML as a dep. | Add YAML as a dep.
| Python | bsd-2-clause | derrley/yamlicious,derrley/yamlicious | from setuptools import setup, find_packages
import os
setup(
name='yamlicious',
packages=find_packages(),
scripts=[os.path.join('bin', p) for p in os.listdir('bin')],
)
Add YAML as a dep. | from setuptools import setup, find_packages
import os
setup(
name='yamlicious',
packages=find_packages(),
scripts=[os.path.join('bin', p) for p in os.listdir('bin')],
install_requires=[
'pyyaml',
]
)
| <commit_before>from setuptools import setup, find_packages
import os
setup(
name='yamlicious',
packages=find_packages(),
scripts=[os.path.join('bin', p) for p in os.listdir('bin')],
)
<commit_msg>Add YAML as a dep.<commit_after> | from setuptools import setup, find_packages
import os
setup(
name='yamlicious',
packages=find_packages(),
scripts=[os.path.join('bin', p) for p in os.listdir('bin')],
install_requires=[
'pyyaml',
]
)
| from setuptools import setup, find_packages
import os
setup(
name='yamlicious',
packages=find_packages(),
scripts=[os.path.join('bin', p) for p in os.listdir('bin')],
)
Add YAML as a dep.from setuptools import setup, find_packages
import os
setup(
name='yamlicious',
packages=find_packages(),
scripts=[os.p... | <commit_before>from setuptools import setup, find_packages
import os
setup(
name='yamlicious',
packages=find_packages(),
scripts=[os.path.join('bin', p) for p in os.listdir('bin')],
)
<commit_msg>Add YAML as a dep.<commit_after>from setuptools import setup, find_packages
import os
setup(
name='yamlicious',
... |
8cf4651568eb83e3b754529675bfa22abcd5223a | setup.py | setup.py | from setuptools import setup, find_packages
from suponoff import __version__ as version
if __name__ == '__main__':
with open("README.rst") as f:
long_description = f.read()
setup(
name="suponoff",
version=version,
author="Gambit Research",
author_email="opensource@gambi... | from setuptools import setup, find_packages
from suponoff import __version__ as version
if __name__ == '__main__':
with open("README.rst") as f:
long_description = f.read()
setup(
name="suponoff",
version=version,
author="Gambit Research",
author_email="opensource@gambi... | Fix the Operating System classifier, it was invalid | Fix the Operating System classifier, it was invalid
| Python | bsd-2-clause | GambitResearch/suponoff,lciti/suponoff,lciti/suponoff,lciti/suponoff,GambitResearch/suponoff,GambitResearch/suponoff | from setuptools import setup, find_packages
from suponoff import __version__ as version
if __name__ == '__main__':
with open("README.rst") as f:
long_description = f.read()
setup(
name="suponoff",
version=version,
author="Gambit Research",
author_email="opensource@gambi... | from setuptools import setup, find_packages
from suponoff import __version__ as version
if __name__ == '__main__':
with open("README.rst") as f:
long_description = f.read()
setup(
name="suponoff",
version=version,
author="Gambit Research",
author_email="opensource@gambi... | <commit_before>from setuptools import setup, find_packages
from suponoff import __version__ as version
if __name__ == '__main__':
with open("README.rst") as f:
long_description = f.read()
setup(
name="suponoff",
version=version,
author="Gambit Research",
author_email="o... | from setuptools import setup, find_packages
from suponoff import __version__ as version
if __name__ == '__main__':
with open("README.rst") as f:
long_description = f.read()
setup(
name="suponoff",
version=version,
author="Gambit Research",
author_email="opensource@gambi... | from setuptools import setup, find_packages
from suponoff import __version__ as version
if __name__ == '__main__':
with open("README.rst") as f:
long_description = f.read()
setup(
name="suponoff",
version=version,
author="Gambit Research",
author_email="opensource@gambi... | <commit_before>from setuptools import setup, find_packages
from suponoff import __version__ as version
if __name__ == '__main__':
with open("README.rst") as f:
long_description = f.read()
setup(
name="suponoff",
version=version,
author="Gambit Research",
author_email="o... |
2a3943ff603a042fbb04ab2ba89080172ce41fae | setup.py | setup.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Copyright (C) 2008 Jason Davies
# All rights reserved.
#
# This software is licensed as described in the file COPYING, which
# you should have received as part of this distribution.
try:
from setuptools import setup
except ImportError:
from distutils.core impor... | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Copyright (C) 2008 Jason Davies
# All rights reserved.
#
# This software is licensed as described in the file COPYING, which
# you should have received as part of this distribution.
try:
from setuptools import setup
except ImportError:
from distutils.core impor... | Revert previous commit as fuse-python doesn't seem to play nicely with easy_install (at least on Ubuntu). | Revert previous commit as fuse-python doesn't seem to play nicely with easy_install (at least on Ubuntu).
git-svn-id: fdb8975c015a424b33c0997a6b0d758f3a24819f@14 bfab2ddc-a81c-11dd-9a07-0f3041a8e97c
| Python | bsd-3-clause | jasondavies/couchdb-fuse,cozy-labs/cozy-fuse | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Copyright (C) 2008 Jason Davies
# All rights reserved.
#
# This software is licensed as described in the file COPYING, which
# you should have received as part of this distribution.
try:
from setuptools import setup
except ImportError:
from distutils.core impor... | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Copyright (C) 2008 Jason Davies
# All rights reserved.
#
# This software is licensed as described in the file COPYING, which
# you should have received as part of this distribution.
try:
from setuptools import setup
except ImportError:
from distutils.core impor... | <commit_before>#!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Copyright (C) 2008 Jason Davies
# All rights reserved.
#
# This software is licensed as described in the file COPYING, which
# you should have received as part of this distribution.
try:
from setuptools import setup
except ImportError:
from distu... | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Copyright (C) 2008 Jason Davies
# All rights reserved.
#
# This software is licensed as described in the file COPYING, which
# you should have received as part of this distribution.
try:
from setuptools import setup
except ImportError:
from distutils.core impor... | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Copyright (C) 2008 Jason Davies
# All rights reserved.
#
# This software is licensed as described in the file COPYING, which
# you should have received as part of this distribution.
try:
from setuptools import setup
except ImportError:
from distutils.core impor... | <commit_before>#!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Copyright (C) 2008 Jason Davies
# All rights reserved.
#
# This software is licensed as described in the file COPYING, which
# you should have received as part of this distribution.
try:
from setuptools import setup
except ImportError:
from distu... |
d9fe33ff2b6c995ac2864b85bee18f5b813c85cc | setup.py | setup.py | from distutils.core import setup
import glob
datas = [ "locale/" + l.rsplit('/')[-1]+"/LC_MESSAGES/*.*" for l in glob.glob("pages/locale/*")]
datas.extend([
'templates/admin/pages/page/*.html',
'templates/pages/*.html',
'fixtures/*.json'
]
)
setup(
name='django-page-cms',
version=__import__('p... | from distutils.core import setup
import glob
datas = [ "locale/" + l.rsplit('/')[-1]+"/LC_MESSAGES/*.*" for l in glob.glob("pages/locale/*")]
datas.extend([
'templates/admin/pages/page/*.html',
'templates/pages/*.html',
'fixtures/*.json'
]
)
setup(
name='django-page-cms',
version=__import__('p... | Fix a minor typo in package name | Fix a minor typo in package name | Python | bsd-3-clause | PiRSquared17/django-page-cms,odyaka341/django-page-cms,google-code-export/django-page-cms,google-code-export/django-page-cms,Alwnikrotikz/django-page-cms,pombreda/django-page-cms,PiRSquared17/django-page-cms,pombreda/django-page-cms,pombreda/django-page-cms,odyaka341/django-page-cms,google-code-export/django-page-cms,g... | from distutils.core import setup
import glob
datas = [ "locale/" + l.rsplit('/')[-1]+"/LC_MESSAGES/*.*" for l in glob.glob("pages/locale/*")]
datas.extend([
'templates/admin/pages/page/*.html',
'templates/pages/*.html',
'fixtures/*.json'
]
)
setup(
name='django-page-cms',
version=__import__('p... | from distutils.core import setup
import glob
datas = [ "locale/" + l.rsplit('/')[-1]+"/LC_MESSAGES/*.*" for l in glob.glob("pages/locale/*")]
datas.extend([
'templates/admin/pages/page/*.html',
'templates/pages/*.html',
'fixtures/*.json'
]
)
setup(
name='django-page-cms',
version=__import__('p... | <commit_before>from distutils.core import setup
import glob
datas = [ "locale/" + l.rsplit('/')[-1]+"/LC_MESSAGES/*.*" for l in glob.glob("pages/locale/*")]
datas.extend([
'templates/admin/pages/page/*.html',
'templates/pages/*.html',
'fixtures/*.json'
]
)
setup(
name='django-page-cms',
versio... | from distutils.core import setup
import glob
datas = [ "locale/" + l.rsplit('/')[-1]+"/LC_MESSAGES/*.*" for l in glob.glob("pages/locale/*")]
datas.extend([
'templates/admin/pages/page/*.html',
'templates/pages/*.html',
'fixtures/*.json'
]
)
setup(
name='django-page-cms',
version=__import__('p... | from distutils.core import setup
import glob
datas = [ "locale/" + l.rsplit('/')[-1]+"/LC_MESSAGES/*.*" for l in glob.glob("pages/locale/*")]
datas.extend([
'templates/admin/pages/page/*.html',
'templates/pages/*.html',
'fixtures/*.json'
]
)
setup(
name='django-page-cms',
version=__import__('p... | <commit_before>from distutils.core import setup
import glob
datas = [ "locale/" + l.rsplit('/')[-1]+"/LC_MESSAGES/*.*" for l in glob.glob("pages/locale/*")]
datas.extend([
'templates/admin/pages/page/*.html',
'templates/pages/*.html',
'fixtures/*.json'
]
)
setup(
name='django-page-cms',
versio... |
00fd448acf952ae5e844c4abe98ef0e973cdf981 | setup.py | setup.py | #!/usr/bin/env python3
import os
from setuptools import setup, find_packages
def get_readme():
return open(os.path.join(os.path.dirname(__file__), 'README.rst')).read()
setup(
author="Julio Gonzalez Altamirano",
author_email='devjga@gmail.com',
classifiers=[
'Intended Audience :: Developers',... | #!/usr/bin/env python3
import os
from setuptools import setup, find_packages
def get_readme():
return open(os.path.join(os.path.dirname(__file__), 'README.rst')).read()
setup(
author="Julio Gonzalez Altamirano",
author_email='devjga@gmail.com',
classifiers=[
'Intended Audience :: Developers',... | Switch capmetrics script to etl function. | Switch capmetrics script to etl function.
| Python | mit | jga/capmetrics-etl,jga/capmetrics-etl | #!/usr/bin/env python3
import os
from setuptools import setup, find_packages
def get_readme():
return open(os.path.join(os.path.dirname(__file__), 'README.rst')).read()
setup(
author="Julio Gonzalez Altamirano",
author_email='devjga@gmail.com',
classifiers=[
'Intended Audience :: Developers',... | #!/usr/bin/env python3
import os
from setuptools import setup, find_packages
def get_readme():
return open(os.path.join(os.path.dirname(__file__), 'README.rst')).read()
setup(
author="Julio Gonzalez Altamirano",
author_email='devjga@gmail.com',
classifiers=[
'Intended Audience :: Developers',... | <commit_before>#!/usr/bin/env python3
import os
from setuptools import setup, find_packages
def get_readme():
return open(os.path.join(os.path.dirname(__file__), 'README.rst')).read()
setup(
author="Julio Gonzalez Altamirano",
author_email='devjga@gmail.com',
classifiers=[
'Intended Audience ... | #!/usr/bin/env python3
import os
from setuptools import setup, find_packages
def get_readme():
return open(os.path.join(os.path.dirname(__file__), 'README.rst')).read()
setup(
author="Julio Gonzalez Altamirano",
author_email='devjga@gmail.com',
classifiers=[
'Intended Audience :: Developers',... | #!/usr/bin/env python3
import os
from setuptools import setup, find_packages
def get_readme():
return open(os.path.join(os.path.dirname(__file__), 'README.rst')).read()
setup(
author="Julio Gonzalez Altamirano",
author_email='devjga@gmail.com',
classifiers=[
'Intended Audience :: Developers',... | <commit_before>#!/usr/bin/env python3
import os
from setuptools import setup, find_packages
def get_readme():
return open(os.path.join(os.path.dirname(__file__), 'README.rst')).read()
setup(
author="Julio Gonzalez Altamirano",
author_email='devjga@gmail.com',
classifiers=[
'Intended Audience ... |
51603984c3d421ccd4bd66208cf8a8224ff3ee3f | setup.py | setup.py | from distutils.core import setup
setup(
name='JekPost',
version='0.1.0',
author='Arjun Krishna Babu',
author_email='arjunkrishnababu96@gmail.com',
packages=['jekpost'],
url='https://github.com/arjunkrishnababu96/jekpost',
license='LICENSE.txt',
description='Package to ease the process o... | from distutils.core import setup
setup(
name='JekPost',
version='0.1.0',
author='Arjun Krishna Babu',
author_email='arjunkrishnababu96@gmail.com',
packages=['jekpost'],
url='https://github.com/arjunkrishnababu96/jekpost',
license='LICENSE.txt',
description='Package to ease the process o... | Change classifier to include python 3 (instead of python 3.5) | Change classifier to include python 3 (instead of python 3.5)
| Python | mit | arjunkrishnababu96/jekpost | from distutils.core import setup
setup(
name='JekPost',
version='0.1.0',
author='Arjun Krishna Babu',
author_email='arjunkrishnababu96@gmail.com',
packages=['jekpost'],
url='https://github.com/arjunkrishnababu96/jekpost',
license='LICENSE.txt',
description='Package to ease the process o... | from distutils.core import setup
setup(
name='JekPost',
version='0.1.0',
author='Arjun Krishna Babu',
author_email='arjunkrishnababu96@gmail.com',
packages=['jekpost'],
url='https://github.com/arjunkrishnababu96/jekpost',
license='LICENSE.txt',
description='Package to ease the process o... | <commit_before>from distutils.core import setup
setup(
name='JekPost',
version='0.1.0',
author='Arjun Krishna Babu',
author_email='arjunkrishnababu96@gmail.com',
packages=['jekpost'],
url='https://github.com/arjunkrishnababu96/jekpost',
license='LICENSE.txt',
description='Package to eas... | from distutils.core import setup
setup(
name='JekPost',
version='0.1.0',
author='Arjun Krishna Babu',
author_email='arjunkrishnababu96@gmail.com',
packages=['jekpost'],
url='https://github.com/arjunkrishnababu96/jekpost',
license='LICENSE.txt',
description='Package to ease the process o... | from distutils.core import setup
setup(
name='JekPost',
version='0.1.0',
author='Arjun Krishna Babu',
author_email='arjunkrishnababu96@gmail.com',
packages=['jekpost'],
url='https://github.com/arjunkrishnababu96/jekpost',
license='LICENSE.txt',
description='Package to ease the process o... | <commit_before>from distutils.core import setup
setup(
name='JekPost',
version='0.1.0',
author='Arjun Krishna Babu',
author_email='arjunkrishnababu96@gmail.com',
packages=['jekpost'],
url='https://github.com/arjunkrishnababu96/jekpost',
license='LICENSE.txt',
description='Package to eas... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.