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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
f4c8462d1197fe657c9556515bde6eafeabce5ca | downstream_node/config/config.py | downstream_node/config/config.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import os
# Flask
SECRET_KEY = os.urandom(32)
# SQLAlchemy (DB)
SQLALCHEMY_DATABASE_URI = 'mysql://localhost/downstream'
# Heartbeat
HEARTBEAT_SECRET = (
r'6\x1eg\xd4\x19\xde\xad\xc1x\x00+\xc9\x04~_`%\x'
r'f0\x7fF\xd9\x0b=\x91J\xe5\x0b\xeb\xc1D\xcd\x8d'
)
FILES... | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import os
# Flask
SECRET_KEY = os.urandom(32)
# SQLAlchemy (DB)
SQLALCHEMY_DATABASE_URI = 'mysql+pymysql://localhost/downstream'
# Heartbeat
HEARTBEAT_SECRET = (
r'6\x1eg\xd4\x19\xde\xad\xc1x\x00+\xc9\x04~_`%\x'
r'f0\x7fF\xd9\x0b=\x91J\xe5\x0b\xeb\xc1D\xcd\x8d'
... | Fix mysql connect string to be pymysql compatible | Fix mysql connect string to be pymysql compatible
| Python | mit | Storj/downstream-node,Storj/downstream-node | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import os
# Flask
SECRET_KEY = os.urandom(32)
# SQLAlchemy (DB)
SQLALCHEMY_DATABASE_URI = 'mysql://localhost/downstream'
# Heartbeat
HEARTBEAT_SECRET = (
r'6\x1eg\xd4\x19\xde\xad\xc1x\x00+\xc9\x04~_`%\x'
r'f0\x7fF\xd9\x0b=\x91J\xe5\x0b\xeb\xc1D\xcd\x8d'
)
FILES... | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import os
# Flask
SECRET_KEY = os.urandom(32)
# SQLAlchemy (DB)
SQLALCHEMY_DATABASE_URI = 'mysql+pymysql://localhost/downstream'
# Heartbeat
HEARTBEAT_SECRET = (
r'6\x1eg\xd4\x19\xde\xad\xc1x\x00+\xc9\x04~_`%\x'
r'f0\x7fF\xd9\x0b=\x91J\xe5\x0b\xeb\xc1D\xcd\x8d'
... | <commit_before>#!/usr/bin/env python
# -*- coding: utf-8 -*-
import os
# Flask
SECRET_KEY = os.urandom(32)
# SQLAlchemy (DB)
SQLALCHEMY_DATABASE_URI = 'mysql://localhost/downstream'
# Heartbeat
HEARTBEAT_SECRET = (
r'6\x1eg\xd4\x19\xde\xad\xc1x\x00+\xc9\x04~_`%\x'
r'f0\x7fF\xd9\x0b=\x91J\xe5\x0b\xeb\xc1D\xc... | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import os
# Flask
SECRET_KEY = os.urandom(32)
# SQLAlchemy (DB)
SQLALCHEMY_DATABASE_URI = 'mysql+pymysql://localhost/downstream'
# Heartbeat
HEARTBEAT_SECRET = (
r'6\x1eg\xd4\x19\xde\xad\xc1x\x00+\xc9\x04~_`%\x'
r'f0\x7fF\xd9\x0b=\x91J\xe5\x0b\xeb\xc1D\xcd\x8d'
... | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import os
# Flask
SECRET_KEY = os.urandom(32)
# SQLAlchemy (DB)
SQLALCHEMY_DATABASE_URI = 'mysql://localhost/downstream'
# Heartbeat
HEARTBEAT_SECRET = (
r'6\x1eg\xd4\x19\xde\xad\xc1x\x00+\xc9\x04~_`%\x'
r'f0\x7fF\xd9\x0b=\x91J\xe5\x0b\xeb\xc1D\xcd\x8d'
)
FILES... | <commit_before>#!/usr/bin/env python
# -*- coding: utf-8 -*-
import os
# Flask
SECRET_KEY = os.urandom(32)
# SQLAlchemy (DB)
SQLALCHEMY_DATABASE_URI = 'mysql://localhost/downstream'
# Heartbeat
HEARTBEAT_SECRET = (
r'6\x1eg\xd4\x19\xde\xad\xc1x\x00+\xc9\x04~_`%\x'
r'f0\x7fF\xd9\x0b=\x91J\xe5\x0b\xeb\xc1D\xc... |
dd3cc71bb09ab2fb265b3f4bdda69cb1880842c6 | tests/utils_test.py | tests/utils_test.py | import unittest
from zttf.utils import fixed_version, binary_search_parameters
class TestUtils(unittest.TestCase):
def test_fixed_version(self):
cases = [
(0x00005000, 0.5),
(0x00010000, 1.0),
(0x00035000, 3.5),
(0x00105000, 10.5)
]
for case... | import unittest
import struct
from zttf.utils import fixed_version, binary_search_parameters, ttf_checksum
class TestUtils(unittest.TestCase):
def test_fixed_version(self):
cases = [
(0x00005000, 0.5),
(0x00010000, 1.0),
(0x00035000, 3.5),
(0x00105000, 10.5... | Add a simple test for the checksum routine. | Add a simple test for the checksum routine.
| Python | apache-2.0 | zathras777/zttf | import unittest
from zttf.utils import fixed_version, binary_search_parameters
class TestUtils(unittest.TestCase):
def test_fixed_version(self):
cases = [
(0x00005000, 0.5),
(0x00010000, 1.0),
(0x00035000, 3.5),
(0x00105000, 10.5)
]
for case... | import unittest
import struct
from zttf.utils import fixed_version, binary_search_parameters, ttf_checksum
class TestUtils(unittest.TestCase):
def test_fixed_version(self):
cases = [
(0x00005000, 0.5),
(0x00010000, 1.0),
(0x00035000, 3.5),
(0x00105000, 10.5... | <commit_before>import unittest
from zttf.utils import fixed_version, binary_search_parameters
class TestUtils(unittest.TestCase):
def test_fixed_version(self):
cases = [
(0x00005000, 0.5),
(0x00010000, 1.0),
(0x00035000, 3.5),
(0x00105000, 10.5)
]
... | import unittest
import struct
from zttf.utils import fixed_version, binary_search_parameters, ttf_checksum
class TestUtils(unittest.TestCase):
def test_fixed_version(self):
cases = [
(0x00005000, 0.5),
(0x00010000, 1.0),
(0x00035000, 3.5),
(0x00105000, 10.5... | import unittest
from zttf.utils import fixed_version, binary_search_parameters
class TestUtils(unittest.TestCase):
def test_fixed_version(self):
cases = [
(0x00005000, 0.5),
(0x00010000, 1.0),
(0x00035000, 3.5),
(0x00105000, 10.5)
]
for case... | <commit_before>import unittest
from zttf.utils import fixed_version, binary_search_parameters
class TestUtils(unittest.TestCase):
def test_fixed_version(self):
cases = [
(0x00005000, 0.5),
(0x00010000, 1.0),
(0x00035000, 3.5),
(0x00105000, 10.5)
]
... |
473aee0eda226acc6ae959a3ef39656dce6031b5 | akanda/horizon/routers/views.py | akanda/horizon/routers/views.py | from django.utils.translation import ugettext_lazy as _ # noqa
from horizon import exceptions
from openstack_dashboard import api
def get_interfaces_data(self):
try:
router_id = self.kwargs['router_id']
ports = api.neutron.port_list(self.request,
router_id=r... | from django.utils.translation import ugettext_lazy as _ # noqa
from horizon import exceptions
from openstack_dashboard import api
def get_interfaces_data(self):
try:
router_id = self.kwargs['router_id']
router = api.quantum.router_get(self.request, router_id)
ports = [api.quantum.Port(p)... | Fix router's interface listing view | Fix router's interface listing view
To get all the ports for a router Horizon uses port_list
filtering by the device_id value which in vanilla openstack
is the quantum router_id, but we use the akanda_id as value for
that field so the listing doesn't work for us. Lets replace the
port_list call with router_get.
Chan... | Python | apache-2.0 | dreamhost/akanda-horizon,dreamhost/akanda-horizon | from django.utils.translation import ugettext_lazy as _ # noqa
from horizon import exceptions
from openstack_dashboard import api
def get_interfaces_data(self):
try:
router_id = self.kwargs['router_id']
ports = api.neutron.port_list(self.request,
router_id=r... | from django.utils.translation import ugettext_lazy as _ # noqa
from horizon import exceptions
from openstack_dashboard import api
def get_interfaces_data(self):
try:
router_id = self.kwargs['router_id']
router = api.quantum.router_get(self.request, router_id)
ports = [api.quantum.Port(p)... | <commit_before>from django.utils.translation import ugettext_lazy as _ # noqa
from horizon import exceptions
from openstack_dashboard import api
def get_interfaces_data(self):
try:
router_id = self.kwargs['router_id']
ports = api.neutron.port_list(self.request,
... | from django.utils.translation import ugettext_lazy as _ # noqa
from horizon import exceptions
from openstack_dashboard import api
def get_interfaces_data(self):
try:
router_id = self.kwargs['router_id']
router = api.quantum.router_get(self.request, router_id)
ports = [api.quantum.Port(p)... | from django.utils.translation import ugettext_lazy as _ # noqa
from horizon import exceptions
from openstack_dashboard import api
def get_interfaces_data(self):
try:
router_id = self.kwargs['router_id']
ports = api.neutron.port_list(self.request,
router_id=r... | <commit_before>from django.utils.translation import ugettext_lazy as _ # noqa
from horizon import exceptions
from openstack_dashboard import api
def get_interfaces_data(self):
try:
router_id = self.kwargs['router_id']
ports = api.neutron.port_list(self.request,
... |
22aaf754eb04e9f345c55f73ffb0f549d83c68df | apps/explorer/tests/test_templatetags.py | apps/explorer/tests/test_templatetags.py | from django.test import TestCase
from ..templatetags import explorer
class HighlightTestCase(TestCase):
def test_highlight_returns_text_when_empty_word(self):
expected = 'foo bar baz'
assert explorer.highlight('foo bar baz', '') == expected
def test_highlight(self):
expected = '<s... | from django.test import TestCase
from ..templatetags import explorer
class HighlightTestCase(TestCase):
def test_highlight_returns_text_when_empty_word(self):
expected = 'foo bar baz'
assert explorer.highlight('foo bar baz', '') == expected
def test_highlight(self):
expected = '<s... | Add test for concat template tag | Add test for concat template tag
| Python | bsd-3-clause | Candihub/pixel,Candihub/pixel,Candihub/pixel,Candihub/pixel,Candihub/pixel | from django.test import TestCase
from ..templatetags import explorer
class HighlightTestCase(TestCase):
def test_highlight_returns_text_when_empty_word(self):
expected = 'foo bar baz'
assert explorer.highlight('foo bar baz', '') == expected
def test_highlight(self):
expected = '<s... | from django.test import TestCase
from ..templatetags import explorer
class HighlightTestCase(TestCase):
def test_highlight_returns_text_when_empty_word(self):
expected = 'foo bar baz'
assert explorer.highlight('foo bar baz', '') == expected
def test_highlight(self):
expected = '<s... | <commit_before>from django.test import TestCase
from ..templatetags import explorer
class HighlightTestCase(TestCase):
def test_highlight_returns_text_when_empty_word(self):
expected = 'foo bar baz'
assert explorer.highlight('foo bar baz', '') == expected
def test_highlight(self):
... | from django.test import TestCase
from ..templatetags import explorer
class HighlightTestCase(TestCase):
def test_highlight_returns_text_when_empty_word(self):
expected = 'foo bar baz'
assert explorer.highlight('foo bar baz', '') == expected
def test_highlight(self):
expected = '<s... | from django.test import TestCase
from ..templatetags import explorer
class HighlightTestCase(TestCase):
def test_highlight_returns_text_when_empty_word(self):
expected = 'foo bar baz'
assert explorer.highlight('foo bar baz', '') == expected
def test_highlight(self):
expected = '<s... | <commit_before>from django.test import TestCase
from ..templatetags import explorer
class HighlightTestCase(TestCase):
def test_highlight_returns_text_when_empty_word(self):
expected = 'foo bar baz'
assert explorer.highlight('foo bar baz', '') == expected
def test_highlight(self):
... |
f52c8cc3938567a24ac6ea0a807654aa73caa871 | pages/views.py | pages/views.py | from pages.models import Page, Language, Content
from pages.utils import auto_render
from django.contrib.admin.views.decorators import staff_member_required
from django import forms
from django.http import Http404
import settings
@auto_render
def details(request, page_id=None):
template = None
lang = Language.... | from pages.models import Page, Language, Content
from pages.utils import auto_render
from django.contrib.admin.views.decorators import staff_member_required
from django import forms
from django.http import Http404
import settings
@auto_render
def details(request, page_id=None):
template = None
lang = Language.... | Fix a bug with an empty database | Fix a bug with an empty database
git-svn-id: 54fea250f97f2a4e12c6f7a610b8f07cb4c107b4@138 439a9e5f-3f3e-0410-bc46-71226ad0111b
| Python | bsd-3-clause | pombredanne/django-page-cms-1,oliciv/django-page-cms,akaihola/django-page-cms,pombredanne/django-page-cms-1,akaihola/django-page-cms,remik/django-page-cms,pombredanne/django-page-cms-1,batiste/django-page-cms,oliciv/django-page-cms,remik/django-page-cms,batiste/django-page-cms,oliciv/django-page-cms,batiste/django-page... | from pages.models import Page, Language, Content
from pages.utils import auto_render
from django.contrib.admin.views.decorators import staff_member_required
from django import forms
from django.http import Http404
import settings
@auto_render
def details(request, page_id=None):
template = None
lang = Language.... | from pages.models import Page, Language, Content
from pages.utils import auto_render
from django.contrib.admin.views.decorators import staff_member_required
from django import forms
from django.http import Http404
import settings
@auto_render
def details(request, page_id=None):
template = None
lang = Language.... | <commit_before>from pages.models import Page, Language, Content
from pages.utils import auto_render
from django.contrib.admin.views.decorators import staff_member_required
from django import forms
from django.http import Http404
import settings
@auto_render
def details(request, page_id=None):
template = None
l... | from pages.models import Page, Language, Content
from pages.utils import auto_render
from django.contrib.admin.views.decorators import staff_member_required
from django import forms
from django.http import Http404
import settings
@auto_render
def details(request, page_id=None):
template = None
lang = Language.... | from pages.models import Page, Language, Content
from pages.utils import auto_render
from django.contrib.admin.views.decorators import staff_member_required
from django import forms
from django.http import Http404
import settings
@auto_render
def details(request, page_id=None):
template = None
lang = Language.... | <commit_before>from pages.models import Page, Language, Content
from pages.utils import auto_render
from django.contrib.admin.views.decorators import staff_member_required
from django import forms
from django.http import Http404
import settings
@auto_render
def details(request, page_id=None):
template = None
l... |
265ed91b7e7f204926e7c5f9d2fbe76f447f7955 | gitfs/views/read_only.py | gitfs/views/read_only.py | import os
from errno import EROFS
from fuse import FuseOSError
from gitfs import FuseMethodNotImplemented
from .view import View
class ReadOnlyView(View):
def getxattr(self, path, fh):
raise FuseMethodNotImplemented
def open(self, path, flags):
return 0
def create(self, path, fh):
... | import os
from errno import EROFS
from fuse import FuseOSError
from gitfs import FuseMethodNotImplemented
from .view import View
class ReadOnlyView(View):
def getxattr(self, path, fh):
raise FuseMethodNotImplemented
def open(self, path, flags):
return 0
def create(self, path, fh):
... | Raise read-only filesystem when the user wants to chmod in /history. | Raise read-only filesystem when the user wants to chmod in /history.
| Python | apache-2.0 | PressLabs/gitfs,bussiere/gitfs,rowhit/gitfs,ksmaheshkumar/gitfs,PressLabs/gitfs | import os
from errno import EROFS
from fuse import FuseOSError
from gitfs import FuseMethodNotImplemented
from .view import View
class ReadOnlyView(View):
def getxattr(self, path, fh):
raise FuseMethodNotImplemented
def open(self, path, flags):
return 0
def create(self, path, fh):
... | import os
from errno import EROFS
from fuse import FuseOSError
from gitfs import FuseMethodNotImplemented
from .view import View
class ReadOnlyView(View):
def getxattr(self, path, fh):
raise FuseMethodNotImplemented
def open(self, path, flags):
return 0
def create(self, path, fh):
... | <commit_before>import os
from errno import EROFS
from fuse import FuseOSError
from gitfs import FuseMethodNotImplemented
from .view import View
class ReadOnlyView(View):
def getxattr(self, path, fh):
raise FuseMethodNotImplemented
def open(self, path, flags):
return 0
def create(self,... | import os
from errno import EROFS
from fuse import FuseOSError
from gitfs import FuseMethodNotImplemented
from .view import View
class ReadOnlyView(View):
def getxattr(self, path, fh):
raise FuseMethodNotImplemented
def open(self, path, flags):
return 0
def create(self, path, fh):
... | import os
from errno import EROFS
from fuse import FuseOSError
from gitfs import FuseMethodNotImplemented
from .view import View
class ReadOnlyView(View):
def getxattr(self, path, fh):
raise FuseMethodNotImplemented
def open(self, path, flags):
return 0
def create(self, path, fh):
... | <commit_before>import os
from errno import EROFS
from fuse import FuseOSError
from gitfs import FuseMethodNotImplemented
from .view import View
class ReadOnlyView(View):
def getxattr(self, path, fh):
raise FuseMethodNotImplemented
def open(self, path, flags):
return 0
def create(self,... |
bbc6ce8225cf54e56331ec75fa2de007d02162af | src/_thread/__init__.py | src/_thread/__init__.py | from __future__ import absolute_import
import sys
__future_module__ = True
if sys.version_info[0] < 3:
from dummy_thread import *
else:
raise ImportError('This package should not be accessible on Python 3. '
'Either you are trying to run from the python-future src folder '
... | from __future__ import absolute_import
import sys
__future_module__ = True
if sys.version_info[0] < 3:
try:
from thread import *
except ImportError:
from dummy_thread import *
else:
raise ImportError('This package should not be accessible on Python 3. '
'Either you are... | Fix bug where dummy_thread was always imported | Fix bug where dummy_thread was always imported
The code always import the dummy_thread module even on platforms where the real thread module is available. This caused bugs in other packages that use this import style:
try:
from _thread import interrupt_main # Py 3
except ImportError:
from thread import ... | Python | mit | QuLogic/python-future,QuLogic/python-future,PythonCharmers/python-future,michaelpacer/python-future,michaelpacer/python-future,PythonCharmers/python-future | from __future__ import absolute_import
import sys
__future_module__ = True
if sys.version_info[0] < 3:
from dummy_thread import *
else:
raise ImportError('This package should not be accessible on Python 3. '
'Either you are trying to run from the python-future src folder '
... | from __future__ import absolute_import
import sys
__future_module__ = True
if sys.version_info[0] < 3:
try:
from thread import *
except ImportError:
from dummy_thread import *
else:
raise ImportError('This package should not be accessible on Python 3. '
'Either you are... | <commit_before>from __future__ import absolute_import
import sys
__future_module__ = True
if sys.version_info[0] < 3:
from dummy_thread import *
else:
raise ImportError('This package should not be accessible on Python 3. '
'Either you are trying to run from the python-future src folder '
... | from __future__ import absolute_import
import sys
__future_module__ = True
if sys.version_info[0] < 3:
try:
from thread import *
except ImportError:
from dummy_thread import *
else:
raise ImportError('This package should not be accessible on Python 3. '
'Either you are... | from __future__ import absolute_import
import sys
__future_module__ = True
if sys.version_info[0] < 3:
from dummy_thread import *
else:
raise ImportError('This package should not be accessible on Python 3. '
'Either you are trying to run from the python-future src folder '
... | <commit_before>from __future__ import absolute_import
import sys
__future_module__ = True
if sys.version_info[0] < 3:
from dummy_thread import *
else:
raise ImportError('This package should not be accessible on Python 3. '
'Either you are trying to run from the python-future src folder '
... |
4f7382303d56871b2b174e291b47b238777f5d32 | yubico/yubico_exceptions.py | yubico/yubico_exceptions.py | __all___ = [
'YubicoError',
'StatusCodeError',
'InvalidClientIdError',
'InvalidValidationResponse',
'SignatureVerificationError'
]
class YubicoError(Exception):
""" Base class for Yubico related exceptions. """
pass
class StatusCodeError(YubicoError):
def __init__(self, status_code):... | __all___ = [
'YubicoError',
'StatusCodeError',
'InvalidClientIdError',
'InvalidValidationResponse',
'SignatureVerificationError'
]
class YubicoError(Exception):
""" Base class for Yubico related exceptions. """
pass
class StatusCodeError(YubicoError):
def __init__(self, status_code):... | Set message attribute on InvalidValidationResponse error class. | Set message attribute on InvalidValidationResponse error class.
| Python | bsd-3-clause | Kami/python-yubico-client | __all___ = [
'YubicoError',
'StatusCodeError',
'InvalidClientIdError',
'InvalidValidationResponse',
'SignatureVerificationError'
]
class YubicoError(Exception):
""" Base class for Yubico related exceptions. """
pass
class StatusCodeError(YubicoError):
def __init__(self, status_code):... | __all___ = [
'YubicoError',
'StatusCodeError',
'InvalidClientIdError',
'InvalidValidationResponse',
'SignatureVerificationError'
]
class YubicoError(Exception):
""" Base class for Yubico related exceptions. """
pass
class StatusCodeError(YubicoError):
def __init__(self, status_code):... | <commit_before>__all___ = [
'YubicoError',
'StatusCodeError',
'InvalidClientIdError',
'InvalidValidationResponse',
'SignatureVerificationError'
]
class YubicoError(Exception):
""" Base class for Yubico related exceptions. """
pass
class StatusCodeError(YubicoError):
def __init__(self... | __all___ = [
'YubicoError',
'StatusCodeError',
'InvalidClientIdError',
'InvalidValidationResponse',
'SignatureVerificationError'
]
class YubicoError(Exception):
""" Base class for Yubico related exceptions. """
pass
class StatusCodeError(YubicoError):
def __init__(self, status_code):... | __all___ = [
'YubicoError',
'StatusCodeError',
'InvalidClientIdError',
'InvalidValidationResponse',
'SignatureVerificationError'
]
class YubicoError(Exception):
""" Base class for Yubico related exceptions. """
pass
class StatusCodeError(YubicoError):
def __init__(self, status_code):... | <commit_before>__all___ = [
'YubicoError',
'StatusCodeError',
'InvalidClientIdError',
'InvalidValidationResponse',
'SignatureVerificationError'
]
class YubicoError(Exception):
""" Base class for Yubico related exceptions. """
pass
class StatusCodeError(YubicoError):
def __init__(self... |
b6027aceae21769c2f3dc7baccd5960e83ed9a90 | heufybot/connection.py | heufybot/connection.py | from twisted.words.protocols import irc
class HeufyBotConnection(irc.IRC):
def __init__(self, protocol):
self.protocol = protocol
self.nickname = "PyHeufyBot" #TODO This will be set by a configuration at some point
self.ident = "PyHeufyBot" #TODO This will be set by a configuration at some... | from twisted.words.protocols import irc
class HeufyBotConnection(irc.IRC):
def __init__(self, protocol):
self.protocol = protocol
self.nickname = "PyHeufyBot" #TODO This will be set by a configuration at some point
self.ident = "PyHeufyBot" #TODO This will be set by a configuration at some... | Add functions for NICK and USER sending. Override sendMessage for debugging. | Add functions for NICK and USER sending. Override sendMessage for debugging.
| Python | mit | Heufneutje/PyHeufyBot,Heufneutje/PyHeufyBot | from twisted.words.protocols import irc
class HeufyBotConnection(irc.IRC):
def __init__(self, protocol):
self.protocol = protocol
self.nickname = "PyHeufyBot" #TODO This will be set by a configuration at some point
self.ident = "PyHeufyBot" #TODO This will be set by a configuration at some... | from twisted.words.protocols import irc
class HeufyBotConnection(irc.IRC):
def __init__(self, protocol):
self.protocol = protocol
self.nickname = "PyHeufyBot" #TODO This will be set by a configuration at some point
self.ident = "PyHeufyBot" #TODO This will be set by a configuration at some... | <commit_before>from twisted.words.protocols import irc
class HeufyBotConnection(irc.IRC):
def __init__(self, protocol):
self.protocol = protocol
self.nickname = "PyHeufyBot" #TODO This will be set by a configuration at some point
self.ident = "PyHeufyBot" #TODO This will be set by a config... | from twisted.words.protocols import irc
class HeufyBotConnection(irc.IRC):
def __init__(self, protocol):
self.protocol = protocol
self.nickname = "PyHeufyBot" #TODO This will be set by a configuration at some point
self.ident = "PyHeufyBot" #TODO This will be set by a configuration at some... | from twisted.words.protocols import irc
class HeufyBotConnection(irc.IRC):
def __init__(self, protocol):
self.protocol = protocol
self.nickname = "PyHeufyBot" #TODO This will be set by a configuration at some point
self.ident = "PyHeufyBot" #TODO This will be set by a configuration at some... | <commit_before>from twisted.words.protocols import irc
class HeufyBotConnection(irc.IRC):
def __init__(self, protocol):
self.protocol = protocol
self.nickname = "PyHeufyBot" #TODO This will be set by a configuration at some point
self.ident = "PyHeufyBot" #TODO This will be set by a config... |
16c68198d353735343321b7b9558370247ad1b5e | banana/maya/extensions/OpenMaya/MFileIO.py | banana/maya/extensions/OpenMaya/MFileIO.py | """
banana.maya.MFileIO
~~~~~~~~~~~~~~~~~~~
Monkey patching of the `~maya.OpenMaya.MFileIO` class.
:copyright: Copyright 2014 by Christopher Crouzet.
:license: MIT, see LICENSE for details.
"""
import gorilla
from maya import OpenMaya
@gorilla.patch(OpenMaya)
class MFileIO(object):
... | """
banana.maya.MFileIO
~~~~~~~~~~~~~~~~~~~
Monkey patching of the `~maya.OpenMaya.MFileIO` class.
:copyright: Copyright 2014 by Christopher Crouzet.
:license: MIT, see LICENSE for details.
"""
import gorilla
from maya import OpenMaya
@gorilla.patch(OpenMaya)
class MFileIO(object):
... | Replace the use of the list for a set to emphasize the semantics. | Replace the use of the list for a set to emphasize the semantics.
| Python | mit | christophercrouzet/banana.maya,christophercrouzet/bana | """
banana.maya.MFileIO
~~~~~~~~~~~~~~~~~~~
Monkey patching of the `~maya.OpenMaya.MFileIO` class.
:copyright: Copyright 2014 by Christopher Crouzet.
:license: MIT, see LICENSE for details.
"""
import gorilla
from maya import OpenMaya
@gorilla.patch(OpenMaya)
class MFileIO(object):
... | """
banana.maya.MFileIO
~~~~~~~~~~~~~~~~~~~
Monkey patching of the `~maya.OpenMaya.MFileIO` class.
:copyright: Copyright 2014 by Christopher Crouzet.
:license: MIT, see LICENSE for details.
"""
import gorilla
from maya import OpenMaya
@gorilla.patch(OpenMaya)
class MFileIO(object):
... | <commit_before>"""
banana.maya.MFileIO
~~~~~~~~~~~~~~~~~~~
Monkey patching of the `~maya.OpenMaya.MFileIO` class.
:copyright: Copyright 2014 by Christopher Crouzet.
:license: MIT, see LICENSE for details.
"""
import gorilla
from maya import OpenMaya
@gorilla.patch(OpenMaya)
class MFileI... | """
banana.maya.MFileIO
~~~~~~~~~~~~~~~~~~~
Monkey patching of the `~maya.OpenMaya.MFileIO` class.
:copyright: Copyright 2014 by Christopher Crouzet.
:license: MIT, see LICENSE for details.
"""
import gorilla
from maya import OpenMaya
@gorilla.patch(OpenMaya)
class MFileIO(object):
... | """
banana.maya.MFileIO
~~~~~~~~~~~~~~~~~~~
Monkey patching of the `~maya.OpenMaya.MFileIO` class.
:copyright: Copyright 2014 by Christopher Crouzet.
:license: MIT, see LICENSE for details.
"""
import gorilla
from maya import OpenMaya
@gorilla.patch(OpenMaya)
class MFileIO(object):
... | <commit_before>"""
banana.maya.MFileIO
~~~~~~~~~~~~~~~~~~~
Monkey patching of the `~maya.OpenMaya.MFileIO` class.
:copyright: Copyright 2014 by Christopher Crouzet.
:license: MIT, see LICENSE for details.
"""
import gorilla
from maya import OpenMaya
@gorilla.patch(OpenMaya)
class MFileI... |
cbbfa328f3f5998c2d3bc78315f9ecfc3fee9aad | pirx/checks.py | pirx/checks.py | #!/usr/bin/env python
import socket
import sys
def host(name):
"""Check if host name is equal to the given name"""
return socket.gethostname() == name
def arg(name, expected_value=None):
"""
Check if command-line argument with a given name was passed and if it has
the expected value.
"""
... | #!/usr/bin/env python
import socket
import sys
def host(name):
"""Check if host name is equal to the given name"""
return socket.gethostname() == name
def arg(name, expected_value=None):
"""
Check if command-line argument with a given name was passed and if it has
the expected value.
"""
... | Fix for-if in "arg" function | Fix for-if in "arg" function
| Python | mit | piotrekw/pirx | #!/usr/bin/env python
import socket
import sys
def host(name):
"""Check if host name is equal to the given name"""
return socket.gethostname() == name
def arg(name, expected_value=None):
"""
Check if command-line argument with a given name was passed and if it has
the expected value.
"""
... | #!/usr/bin/env python
import socket
import sys
def host(name):
"""Check if host name is equal to the given name"""
return socket.gethostname() == name
def arg(name, expected_value=None):
"""
Check if command-line argument with a given name was passed and if it has
the expected value.
"""
... | <commit_before>#!/usr/bin/env python
import socket
import sys
def host(name):
"""Check if host name is equal to the given name"""
return socket.gethostname() == name
def arg(name, expected_value=None):
"""
Check if command-line argument with a given name was passed and if it has
the expected valu... | #!/usr/bin/env python
import socket
import sys
def host(name):
"""Check if host name is equal to the given name"""
return socket.gethostname() == name
def arg(name, expected_value=None):
"""
Check if command-line argument with a given name was passed and if it has
the expected value.
"""
... | #!/usr/bin/env python
import socket
import sys
def host(name):
"""Check if host name is equal to the given name"""
return socket.gethostname() == name
def arg(name, expected_value=None):
"""
Check if command-line argument with a given name was passed and if it has
the expected value.
"""
... | <commit_before>#!/usr/bin/env python
import socket
import sys
def host(name):
"""Check if host name is equal to the given name"""
return socket.gethostname() == name
def arg(name, expected_value=None):
"""
Check if command-line argument with a given name was passed and if it has
the expected valu... |
12d55dbd223d32b4be77dde8d3342517e617a48f | migmig/log.py | migmig/log.py | # migmig logger module
import logging
import sys
console = True
class logger():
def __init__(self):
logging.basicConfig(level=logging.DEBUG, filename='test/mylog.txt', format='%(name)s \t%(message)s')
self.handlers = []
if console:
self.handlers.append(logging.StreamHandler(sys.stdout))
def get_logger(s... | # migmig logger module
import logging
import sys
class logger():
def __init__(self, verbose, console = None):
'''
Python doc :
https://docs.python.org/2/library/logging.html#logrecord-attributes
Levels:
0: NOTSET - 0
1: DEBUG - 10
2: INFO - 20
3: WARNING - 30
4: ERROR - 40
5: CRITI... | Improve the Log module, add console handler | Improve the Log module, add console handler
This commit will improve the logging levels, user now can set the
verbose level by typing "-v" option.
if user wants the logs into the console, he should type "--console" option.
| Python | agpl-3.0 | dotamin/migmig | # migmig logger module
import logging
import sys
console = True
class logger():
def __init__(self):
logging.basicConfig(level=logging.DEBUG, filename='test/mylog.txt', format='%(name)s \t%(message)s')
self.handlers = []
if console:
self.handlers.append(logging.StreamHandler(sys.stdout))
def get_logger(s... | # migmig logger module
import logging
import sys
class logger():
def __init__(self, verbose, console = None):
'''
Python doc :
https://docs.python.org/2/library/logging.html#logrecord-attributes
Levels:
0: NOTSET - 0
1: DEBUG - 10
2: INFO - 20
3: WARNING - 30
4: ERROR - 40
5: CRITI... | <commit_before># migmig logger module
import logging
import sys
console = True
class logger():
def __init__(self):
logging.basicConfig(level=logging.DEBUG, filename='test/mylog.txt', format='%(name)s \t%(message)s')
self.handlers = []
if console:
self.handlers.append(logging.StreamHandler(sys.stdout))
d... | # migmig logger module
import logging
import sys
class logger():
def __init__(self, verbose, console = None):
'''
Python doc :
https://docs.python.org/2/library/logging.html#logrecord-attributes
Levels:
0: NOTSET - 0
1: DEBUG - 10
2: INFO - 20
3: WARNING - 30
4: ERROR - 40
5: CRITI... | # migmig logger module
import logging
import sys
console = True
class logger():
def __init__(self):
logging.basicConfig(level=logging.DEBUG, filename='test/mylog.txt', format='%(name)s \t%(message)s')
self.handlers = []
if console:
self.handlers.append(logging.StreamHandler(sys.stdout))
def get_logger(s... | <commit_before># migmig logger module
import logging
import sys
console = True
class logger():
def __init__(self):
logging.basicConfig(level=logging.DEBUG, filename='test/mylog.txt', format='%(name)s \t%(message)s')
self.handlers = []
if console:
self.handlers.append(logging.StreamHandler(sys.stdout))
d... |
9e17cda40ddefaa5c2b905b3ffdfadf485461eaa | plugin/main.py | plugin/main.py | #!/usr/bin/env python
"""
Deploy builds to a Rancher orchestrated stack using rancher-compose
"""
import os
import drone
import subprocess
def main():
"""The main entrypoint for the plugin."""
payload = drone.plugin.get_input()
vargs = payload["vargs"]
# Change directory to deploy path
deploy_pa... | #!/usr/bin/env python
"""
Deploy builds to a Rancher orchestrated stack using rancher-compose
"""
import os
import drone
import subprocess
def main():
"""The main entrypoint for the plugin."""
payload = drone.plugin.get_input()
vargs = payload["vargs"]
# Change directory to deploy path
deploy_pa... | Append services string only if not blank | Append services string only if not blank
| Python | apache-2.0 | dangerfarms/drone-rancher | #!/usr/bin/env python
"""
Deploy builds to a Rancher orchestrated stack using rancher-compose
"""
import os
import drone
import subprocess
def main():
"""The main entrypoint for the plugin."""
payload = drone.plugin.get_input()
vargs = payload["vargs"]
# Change directory to deploy path
deploy_pa... | #!/usr/bin/env python
"""
Deploy builds to a Rancher orchestrated stack using rancher-compose
"""
import os
import drone
import subprocess
def main():
"""The main entrypoint for the plugin."""
payload = drone.plugin.get_input()
vargs = payload["vargs"]
# Change directory to deploy path
deploy_pa... | <commit_before>#!/usr/bin/env python
"""
Deploy builds to a Rancher orchestrated stack using rancher-compose
"""
import os
import drone
import subprocess
def main():
"""The main entrypoint for the plugin."""
payload = drone.plugin.get_input()
vargs = payload["vargs"]
# Change directory to deploy pat... | #!/usr/bin/env python
"""
Deploy builds to a Rancher orchestrated stack using rancher-compose
"""
import os
import drone
import subprocess
def main():
"""The main entrypoint for the plugin."""
payload = drone.plugin.get_input()
vargs = payload["vargs"]
# Change directory to deploy path
deploy_pa... | #!/usr/bin/env python
"""
Deploy builds to a Rancher orchestrated stack using rancher-compose
"""
import os
import drone
import subprocess
def main():
"""The main entrypoint for the plugin."""
payload = drone.plugin.get_input()
vargs = payload["vargs"]
# Change directory to deploy path
deploy_pa... | <commit_before>#!/usr/bin/env python
"""
Deploy builds to a Rancher orchestrated stack using rancher-compose
"""
import os
import drone
import subprocess
def main():
"""The main entrypoint for the plugin."""
payload = drone.plugin.get_input()
vargs = payload["vargs"]
# Change directory to deploy pat... |
5055e3b911afe52f70f60915254d27bfc0c2b645 | application/navigation/views.py | application/navigation/views.py | from flask import Markup
from flask import render_template
from application.page.models import Page
def find_subpages(pages, parent):
subpages = []
for page in pages:
prefix = '/'.join(page.path.split('/')[:-1])
if prefix == parent.path:
subpages.append(page)
return subpages
def view_bar(current_page='')... | from flask import Markup
from flask import render_template
from application.page.models import Page
def find_subpages(pages, parent):
subpages = []
for page in pages:
prefix = '/'.join(page.path.split('/')[:-1])
if prefix == parent.path:
subpages.append(page)
return subpages
def view_bar(current_page='')... | Remove print statement so Stephan won't be annoyed anymore | Remove print statement so Stephan won't be annoyed anymore
| Python | mit | viaict/viaduct,viaict/viaduct,viaict/viaduct,viaict/viaduct,viaict/viaduct | from flask import Markup
from flask import render_template
from application.page.models import Page
def find_subpages(pages, parent):
subpages = []
for page in pages:
prefix = '/'.join(page.path.split('/')[:-1])
if prefix == parent.path:
subpages.append(page)
return subpages
def view_bar(current_page='')... | from flask import Markup
from flask import render_template
from application.page.models import Page
def find_subpages(pages, parent):
subpages = []
for page in pages:
prefix = '/'.join(page.path.split('/')[:-1])
if prefix == parent.path:
subpages.append(page)
return subpages
def view_bar(current_page='')... | <commit_before>from flask import Markup
from flask import render_template
from application.page.models import Page
def find_subpages(pages, parent):
subpages = []
for page in pages:
prefix = '/'.join(page.path.split('/')[:-1])
if prefix == parent.path:
subpages.append(page)
return subpages
def view_bar(c... | from flask import Markup
from flask import render_template
from application.page.models import Page
def find_subpages(pages, parent):
subpages = []
for page in pages:
prefix = '/'.join(page.path.split('/')[:-1])
if prefix == parent.path:
subpages.append(page)
return subpages
def view_bar(current_page='')... | from flask import Markup
from flask import render_template
from application.page.models import Page
def find_subpages(pages, parent):
subpages = []
for page in pages:
prefix = '/'.join(page.path.split('/')[:-1])
if prefix == parent.path:
subpages.append(page)
return subpages
def view_bar(current_page='')... | <commit_before>from flask import Markup
from flask import render_template
from application.page.models import Page
def find_subpages(pages, parent):
subpages = []
for page in pages:
prefix = '/'.join(page.path.split('/')[:-1])
if prefix == parent.path:
subpages.append(page)
return subpages
def view_bar(c... |
2fb3a72885d279f7a79e10f00d71991144748f1c | haas/plugins/base_plugin.py | haas/plugins/base_plugin.py | from haas.utils import uncamelcase
from .i_plugin import IPlugin
class BasePlugin(IPlugin):
name = None
enabled = False
enabling_option = None
def __init__(self, name=None):
if name is None:
name = uncamelcase(type(self).__name__, sep='-')
self.name = name
self.en... | from haas.utils import uncamelcase
from .i_plugin import IPlugin
class BasePlugin(IPlugin):
name = None
enabled = False
enabling_option = None
def __init__(self, name=None):
if name is None:
name = uncamelcase(type(self).__name__, sep='-')
self.name = name
self.en... | Add help text for plugin enable option | Add help text for plugin enable option
| Python | bsd-3-clause | sjagoe/haas,scalative/haas,sjagoe/haas,itziakos/haas,scalative/haas,itziakos/haas | from haas.utils import uncamelcase
from .i_plugin import IPlugin
class BasePlugin(IPlugin):
name = None
enabled = False
enabling_option = None
def __init__(self, name=None):
if name is None:
name = uncamelcase(type(self).__name__, sep='-')
self.name = name
self.en... | from haas.utils import uncamelcase
from .i_plugin import IPlugin
class BasePlugin(IPlugin):
name = None
enabled = False
enabling_option = None
def __init__(self, name=None):
if name is None:
name = uncamelcase(type(self).__name__, sep='-')
self.name = name
self.en... | <commit_before>from haas.utils import uncamelcase
from .i_plugin import IPlugin
class BasePlugin(IPlugin):
name = None
enabled = False
enabling_option = None
def __init__(self, name=None):
if name is None:
name = uncamelcase(type(self).__name__, sep='-')
self.name = name
... | from haas.utils import uncamelcase
from .i_plugin import IPlugin
class BasePlugin(IPlugin):
name = None
enabled = False
enabling_option = None
def __init__(self, name=None):
if name is None:
name = uncamelcase(type(self).__name__, sep='-')
self.name = name
self.en... | from haas.utils import uncamelcase
from .i_plugin import IPlugin
class BasePlugin(IPlugin):
name = None
enabled = False
enabling_option = None
def __init__(self, name=None):
if name is None:
name = uncamelcase(type(self).__name__, sep='-')
self.name = name
self.en... | <commit_before>from haas.utils import uncamelcase
from .i_plugin import IPlugin
class BasePlugin(IPlugin):
name = None
enabled = False
enabling_option = None
def __init__(self, name=None):
if name is None:
name = uncamelcase(type(self).__name__, sep='-')
self.name = name
... |
9fc92a176fbc9425229d02a032d3494566139e6a | tests/Physics/TestNTC.py | tests/Physics/TestNTC.py | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
from numpy.testing import assert_approx_equal, assert_allclose, assert_array_less
from nose.tools import raises, assert_true, assert_equal
from UliEngineering.Physics.NTC import *
from UliEngineering.Exceptions import *
import functools
import numpy as np
class TestNTC(ob... | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
from numpy.testing import assert_approx_equal, assert_allclose, assert_array_less
from nose.tools import raises, assert_true, assert_equal
from UliEngineering.Physics.NTC import *
from UliEngineering.Exceptions import *
import functools
import numpy as np
class TestNTC(ob... | Add more NTC unit tests | Add more NTC unit tests
| Python | apache-2.0 | ulikoehler/UliEngineering | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
from numpy.testing import assert_approx_equal, assert_allclose, assert_array_less
from nose.tools import raises, assert_true, assert_equal
from UliEngineering.Physics.NTC import *
from UliEngineering.Exceptions import *
import functools
import numpy as np
class TestNTC(ob... | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
from numpy.testing import assert_approx_equal, assert_allclose, assert_array_less
from nose.tools import raises, assert_true, assert_equal
from UliEngineering.Physics.NTC import *
from UliEngineering.Exceptions import *
import functools
import numpy as np
class TestNTC(ob... | <commit_before>#!/usr/bin/env python3
# -*- coding: utf-8 -*-
from numpy.testing import assert_approx_equal, assert_allclose, assert_array_less
from nose.tools import raises, assert_true, assert_equal
from UliEngineering.Physics.NTC import *
from UliEngineering.Exceptions import *
import functools
import numpy as np
c... | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
from numpy.testing import assert_approx_equal, assert_allclose, assert_array_less
from nose.tools import raises, assert_true, assert_equal
from UliEngineering.Physics.NTC import *
from UliEngineering.Exceptions import *
import functools
import numpy as np
class TestNTC(ob... | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
from numpy.testing import assert_approx_equal, assert_allclose, assert_array_less
from nose.tools import raises, assert_true, assert_equal
from UliEngineering.Physics.NTC import *
from UliEngineering.Exceptions import *
import functools
import numpy as np
class TestNTC(ob... | <commit_before>#!/usr/bin/env python3
# -*- coding: utf-8 -*-
from numpy.testing import assert_approx_equal, assert_allclose, assert_array_less
from nose.tools import raises, assert_true, assert_equal
from UliEngineering.Physics.NTC import *
from UliEngineering.Exceptions import *
import functools
import numpy as np
c... |
cd959b5216a0bc1cdc89c963022f312d0ea65e8a | bluebottle/projects/urls/api.py | bluebottle/projects/urls/api.py | from bluebottle.projects.views import ProjectMediaDetail, ProjectSupportDetail
from ..views import (
ManageProjectBudgetLineDetail, ManageProjectBudgetLineList,
ManageProjectDocumentList, ManageProjectDocumentDetail)
from django.conf.urls import patterns, url
urlpatterns = patterns(
'',
url(r'^media/... | from bluebottle.projects.views import ProjectMediaDetail, ProjectSupportDetail
from ..views import (
ManageProjectBudgetLineDetail, ManageProjectBudgetLineList,
ManageProjectDocumentList, ManageProjectDocumentDetail)
from django.conf.urls import patterns, url
urlpatterns = patterns(
'',
url(r'^media/... | Use urls without a slash in project/media project/support | Use urls without a slash in project/media project/support
BB-7765 #resolve
| Python | bsd-3-clause | onepercentclub/bluebottle,onepercentclub/bluebottle,onepercentclub/bluebottle,onepercentclub/bluebottle,onepercentclub/bluebottle | from bluebottle.projects.views import ProjectMediaDetail, ProjectSupportDetail
from ..views import (
ManageProjectBudgetLineDetail, ManageProjectBudgetLineList,
ManageProjectDocumentList, ManageProjectDocumentDetail)
from django.conf.urls import patterns, url
urlpatterns = patterns(
'',
url(r'^media/... | from bluebottle.projects.views import ProjectMediaDetail, ProjectSupportDetail
from ..views import (
ManageProjectBudgetLineDetail, ManageProjectBudgetLineList,
ManageProjectDocumentList, ManageProjectDocumentDetail)
from django.conf.urls import patterns, url
urlpatterns = patterns(
'',
url(r'^media/... | <commit_before>from bluebottle.projects.views import ProjectMediaDetail, ProjectSupportDetail
from ..views import (
ManageProjectBudgetLineDetail, ManageProjectBudgetLineList,
ManageProjectDocumentList, ManageProjectDocumentDetail)
from django.conf.urls import patterns, url
urlpatterns = patterns(
'',
... | from bluebottle.projects.views import ProjectMediaDetail, ProjectSupportDetail
from ..views import (
ManageProjectBudgetLineDetail, ManageProjectBudgetLineList,
ManageProjectDocumentList, ManageProjectDocumentDetail)
from django.conf.urls import patterns, url
urlpatterns = patterns(
'',
url(r'^media/... | from bluebottle.projects.views import ProjectMediaDetail, ProjectSupportDetail
from ..views import (
ManageProjectBudgetLineDetail, ManageProjectBudgetLineList,
ManageProjectDocumentList, ManageProjectDocumentDetail)
from django.conf.urls import patterns, url
urlpatterns = patterns(
'',
url(r'^media/... | <commit_before>from bluebottle.projects.views import ProjectMediaDetail, ProjectSupportDetail
from ..views import (
ManageProjectBudgetLineDetail, ManageProjectBudgetLineList,
ManageProjectDocumentList, ManageProjectDocumentDetail)
from django.conf.urls import patterns, url
urlpatterns = patterns(
'',
... |
4b9789350a01fee5c341ac8a5612c7dae123fddd | tests/test_boto_store.py | tests/test_boto_store.py | #!/usr/bin/env python
import pytest
boto = pytest.importorskip('boto')
from simplekv.net.botostore import BotoStore
from basic_store import BasicStore
from url_store import UrlStore
from bucket_manager import boto_credentials, boto_bucket
@pytest.fixture(params=boto_credentials,
ids=[c['access_key'... | #!/usr/bin/env python
import os
from tempdir import TempDir
import pytest
boto = pytest.importorskip('boto')
from simplekv.net.botostore import BotoStore
from basic_store import BasicStore
from url_store import UrlStore
from bucket_manager import boto_credentials, boto_bucket
@pytest.fixture(params=boto_credentia... | Fix botos rudeness when handling nonexisting files. | Fix botos rudeness when handling nonexisting files.
| Python | mit | fmarczin/simplekv,karteek/simplekv,fmarczin/simplekv,mbr/simplekv,mbr/simplekv,karteek/simplekv | #!/usr/bin/env python
import pytest
boto = pytest.importorskip('boto')
from simplekv.net.botostore import BotoStore
from basic_store import BasicStore
from url_store import UrlStore
from bucket_manager import boto_credentials, boto_bucket
@pytest.fixture(params=boto_credentials,
ids=[c['access_key'... | #!/usr/bin/env python
import os
from tempdir import TempDir
import pytest
boto = pytest.importorskip('boto')
from simplekv.net.botostore import BotoStore
from basic_store import BasicStore
from url_store import UrlStore
from bucket_manager import boto_credentials, boto_bucket
@pytest.fixture(params=boto_credentia... | <commit_before>#!/usr/bin/env python
import pytest
boto = pytest.importorskip('boto')
from simplekv.net.botostore import BotoStore
from basic_store import BasicStore
from url_store import UrlStore
from bucket_manager import boto_credentials, boto_bucket
@pytest.fixture(params=boto_credentials,
ids=... | #!/usr/bin/env python
import os
from tempdir import TempDir
import pytest
boto = pytest.importorskip('boto')
from simplekv.net.botostore import BotoStore
from basic_store import BasicStore
from url_store import UrlStore
from bucket_manager import boto_credentials, boto_bucket
@pytest.fixture(params=boto_credentia... | #!/usr/bin/env python
import pytest
boto = pytest.importorskip('boto')
from simplekv.net.botostore import BotoStore
from basic_store import BasicStore
from url_store import UrlStore
from bucket_manager import boto_credentials, boto_bucket
@pytest.fixture(params=boto_credentials,
ids=[c['access_key'... | <commit_before>#!/usr/bin/env python
import pytest
boto = pytest.importorskip('boto')
from simplekv.net.botostore import BotoStore
from basic_store import BasicStore
from url_store import UrlStore
from bucket_manager import boto_credentials, boto_bucket
@pytest.fixture(params=boto_credentials,
ids=... |
acf9e2d1f879758412154fe8008371b387f4d2bc | namegen/name.py | namegen/name.py |
import random
__metaclass__ = type
class Generator:
def __init__(self, data):
if isinstance(data, str):
data = data.split('\n')
self.clusters = []
for item in data:
if item.find(' ') < 0:
item += ' '
name, info = item.split(' ', 2)
... |
import random
__metaclass__ = type
class Generator:
def __init__(self, data):
if isinstance(data, str):
data = data.split('\n')
self.clusters = []
for item in data:
if item.find(' ') < 0:
item += ' '
name, info = item.split(' ', 2)
... | Use cluster length of 3 | Use cluster length of 3
| Python | mit | lethosor/py-namegen |
import random
__metaclass__ = type
class Generator:
def __init__(self, data):
if isinstance(data, str):
data = data.split('\n')
self.clusters = []
for item in data:
if item.find(' ') < 0:
item += ' '
name, info = item.split(' ', 2)
... |
import random
__metaclass__ = type
class Generator:
def __init__(self, data):
if isinstance(data, str):
data = data.split('\n')
self.clusters = []
for item in data:
if item.find(' ') < 0:
item += ' '
name, info = item.split(' ', 2)
... | <commit_before>
import random
__metaclass__ = type
class Generator:
def __init__(self, data):
if isinstance(data, str):
data = data.split('\n')
self.clusters = []
for item in data:
if item.find(' ') < 0:
item += ' '
name, info = item.spli... |
import random
__metaclass__ = type
class Generator:
def __init__(self, data):
if isinstance(data, str):
data = data.split('\n')
self.clusters = []
for item in data:
if item.find(' ') < 0:
item += ' '
name, info = item.split(' ', 2)
... |
import random
__metaclass__ = type
class Generator:
def __init__(self, data):
if isinstance(data, str):
data = data.split('\n')
self.clusters = []
for item in data:
if item.find(' ') < 0:
item += ' '
name, info = item.split(' ', 2)
... | <commit_before>
import random
__metaclass__ = type
class Generator:
def __init__(self, data):
if isinstance(data, str):
data = data.split('\n')
self.clusters = []
for item in data:
if item.find(' ') < 0:
item += ' '
name, info = item.spli... |
ff35b4353fbb47c602d3561c5e6e84201355df14 | Cryptor.py | Cryptor.py | from Crypto.Cipher import AES
class Cryptor(object):
def __init__(self, key, iv):
#self.aes = AES.new(key, mode=AES.MODE_CBC, IV=iv) # This resembles stuff from shairtunes
self.aes = AES.new(key, mode=AES.MODE_ECB, IV=iv) # I found this in airtunesd
self.inbuf = ""
self.outbuf = ""
self.lastLen = 0
def d... | from Crypto.Cipher import AES
import Crypto.Util.Counter
class Cryptor(AES.AESCipher):
def __init__(self, key, iv):
self.counter = Crypto.Util.Counter.new(128, initial_value=long(iv.encode("hex"), 16))
AES.AESCipher.__init__(self, key, mode=AES.MODE_CTR, counter=self.counter)
class EchoCryptor(object):
def de... | Use CTR as encrypton mode. Works with iOS6. | Use CTR as encrypton mode. Works with iOS6.
| Python | bsd-2-clause | tzwenn/PyOpenAirMirror,tzwenn/PyOpenAirMirror | from Crypto.Cipher import AES
class Cryptor(object):
def __init__(self, key, iv):
#self.aes = AES.new(key, mode=AES.MODE_CBC, IV=iv) # This resembles stuff from shairtunes
self.aes = AES.new(key, mode=AES.MODE_ECB, IV=iv) # I found this in airtunesd
self.inbuf = ""
self.outbuf = ""
self.lastLen = 0
def d... | from Crypto.Cipher import AES
import Crypto.Util.Counter
class Cryptor(AES.AESCipher):
def __init__(self, key, iv):
self.counter = Crypto.Util.Counter.new(128, initial_value=long(iv.encode("hex"), 16))
AES.AESCipher.__init__(self, key, mode=AES.MODE_CTR, counter=self.counter)
class EchoCryptor(object):
def de... | <commit_before>from Crypto.Cipher import AES
class Cryptor(object):
def __init__(self, key, iv):
#self.aes = AES.new(key, mode=AES.MODE_CBC, IV=iv) # This resembles stuff from shairtunes
self.aes = AES.new(key, mode=AES.MODE_ECB, IV=iv) # I found this in airtunesd
self.inbuf = ""
self.outbuf = ""
self.last... | from Crypto.Cipher import AES
import Crypto.Util.Counter
class Cryptor(AES.AESCipher):
def __init__(self, key, iv):
self.counter = Crypto.Util.Counter.new(128, initial_value=long(iv.encode("hex"), 16))
AES.AESCipher.__init__(self, key, mode=AES.MODE_CTR, counter=self.counter)
class EchoCryptor(object):
def de... | from Crypto.Cipher import AES
class Cryptor(object):
def __init__(self, key, iv):
#self.aes = AES.new(key, mode=AES.MODE_CBC, IV=iv) # This resembles stuff from shairtunes
self.aes = AES.new(key, mode=AES.MODE_ECB, IV=iv) # I found this in airtunesd
self.inbuf = ""
self.outbuf = ""
self.lastLen = 0
def d... | <commit_before>from Crypto.Cipher import AES
class Cryptor(object):
def __init__(self, key, iv):
#self.aes = AES.new(key, mode=AES.MODE_CBC, IV=iv) # This resembles stuff from shairtunes
self.aes = AES.new(key, mode=AES.MODE_ECB, IV=iv) # I found this in airtunesd
self.inbuf = ""
self.outbuf = ""
self.last... |
f9903bc92bf02eeaa18e1a2843d288e909b71c33 | social_core/tests/backends/test_asana.py | social_core/tests/backends/test_asana.py | import json
from .oauth import OAuth2Test
class AsanaOAuth2Test(OAuth2Test):
backend_path = 'social_core.backends.asana.AsanaOAuth2'
user_data_url = 'https://app.asana.com/api/1.0/users/me'
expected_username = 'erlich@bachmanity.com'
access_token_body = json.dumps({
'access_token': 'aviato',
... | import json
from .oauth import OAuth2Test
class AsanaOAuth2Test(OAuth2Test):
backend_path = 'social_core.backends.asana.AsanaOAuth2'
user_data_url = 'https://app.asana.com/api/1.0/users/me'
expected_username = 'erlich@bachmanity.com'
access_token_body = json.dumps({
'access_token': 'aviato',
... | Correct mocked response from Asana API | Correct mocked response from Asana API
| Python | bsd-3-clause | tobias47n9e/social-core,python-social-auth/social-core,python-social-auth/social-core | import json
from .oauth import OAuth2Test
class AsanaOAuth2Test(OAuth2Test):
backend_path = 'social_core.backends.asana.AsanaOAuth2'
user_data_url = 'https://app.asana.com/api/1.0/users/me'
expected_username = 'erlich@bachmanity.com'
access_token_body = json.dumps({
'access_token': 'aviato',
... | import json
from .oauth import OAuth2Test
class AsanaOAuth2Test(OAuth2Test):
backend_path = 'social_core.backends.asana.AsanaOAuth2'
user_data_url = 'https://app.asana.com/api/1.0/users/me'
expected_username = 'erlich@bachmanity.com'
access_token_body = json.dumps({
'access_token': 'aviato',
... | <commit_before>import json
from .oauth import OAuth2Test
class AsanaOAuth2Test(OAuth2Test):
backend_path = 'social_core.backends.asana.AsanaOAuth2'
user_data_url = 'https://app.asana.com/api/1.0/users/me'
expected_username = 'erlich@bachmanity.com'
access_token_body = json.dumps({
'access_tok... | import json
from .oauth import OAuth2Test
class AsanaOAuth2Test(OAuth2Test):
backend_path = 'social_core.backends.asana.AsanaOAuth2'
user_data_url = 'https://app.asana.com/api/1.0/users/me'
expected_username = 'erlich@bachmanity.com'
access_token_body = json.dumps({
'access_token': 'aviato',
... | import json
from .oauth import OAuth2Test
class AsanaOAuth2Test(OAuth2Test):
backend_path = 'social_core.backends.asana.AsanaOAuth2'
user_data_url = 'https://app.asana.com/api/1.0/users/me'
expected_username = 'erlich@bachmanity.com'
access_token_body = json.dumps({
'access_token': 'aviato',
... | <commit_before>import json
from .oauth import OAuth2Test
class AsanaOAuth2Test(OAuth2Test):
backend_path = 'social_core.backends.asana.AsanaOAuth2'
user_data_url = 'https://app.asana.com/api/1.0/users/me'
expected_username = 'erlich@bachmanity.com'
access_token_body = json.dumps({
'access_tok... |
05e86efadfd0a05bac660e2ce47a5502b5bbdddb | tempest/tests/fake_auth_provider.py | tempest/tests/fake_auth_provider.py | # Copyright 2014 Hewlett-Packard Development Company, L.P.
# 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.apache.org/licenses/LICENSE-2... | # Copyright 2014 Hewlett-Packard Development Company, L.P.
# 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.apache.org/licenses/LICENSE-2... | Remove auth_request as no used | Remove auth_request as no used
Function auth_request() isn't be used, it can be removed for the
code clean.
Change-Id: I979b67e934c72f50dd62c75ac614f99f136cfeae
| Python | apache-2.0 | vedujoshi/tempest,Tesora/tesora-tempest,openstack/tempest,openstack/tempest,vedujoshi/tempest,masayukig/tempest,masayukig/tempest,Juniper/tempest,cisco-openstack/tempest,sebrandon1/tempest,sebrandon1/tempest,cisco-openstack/tempest,Tesora/tesora-tempest,Juniper/tempest | # Copyright 2014 Hewlett-Packard Development Company, L.P.
# 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.apache.org/licenses/LICENSE-2... | # Copyright 2014 Hewlett-Packard Development Company, L.P.
# 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.apache.org/licenses/LICENSE-2... | <commit_before># Copyright 2014 Hewlett-Packard Development Company, L.P.
# 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.apache.org/lic... | # Copyright 2014 Hewlett-Packard Development Company, L.P.
# 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.apache.org/licenses/LICENSE-2... | # Copyright 2014 Hewlett-Packard Development Company, L.P.
# 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.apache.org/licenses/LICENSE-2... | <commit_before># Copyright 2014 Hewlett-Packard Development Company, L.P.
# 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.apache.org/lic... |
51ab41fc42bf3cc79461733fbfac50667da63eed | sanitytest.py | sanitytest.py | #!/usr/bin/python
import libvirt
globals = dir(libvirt)
# Sanity test that the generator hasn't gone wrong
# Look for core classes
assert("virConnect" in globals)
assert("virDomain" in globals)
assert("virDomainSnapshot" in globals)
assert("virInterface" in globals)
assert("virNWFilter" in globals)
assert("virNodeD... | #!/usr/bin/python
import libvirt
globals = dir(libvirt)
# Sanity test that the generator hasn't gone wrong
# Look for core classes
for clsname in ["virConnect",
"virDomain",
"virDomainSnapshot",
"virInterface",
"virNWFilter",
"virNodeDe... | Check if classes are derived from object | Check if classes are derived from object
This makes sure we don't regress to old style classes
| Python | lgpl-2.1 | cardoe/libvirt-python,cardoe/libvirt-python,libvirt/libvirt-python,libvirt/libvirt-python,libvirt/libvirt-python,cardoe/libvirt-python | #!/usr/bin/python
import libvirt
globals = dir(libvirt)
# Sanity test that the generator hasn't gone wrong
# Look for core classes
assert("virConnect" in globals)
assert("virDomain" in globals)
assert("virDomainSnapshot" in globals)
assert("virInterface" in globals)
assert("virNWFilter" in globals)
assert("virNodeD... | #!/usr/bin/python
import libvirt
globals = dir(libvirt)
# Sanity test that the generator hasn't gone wrong
# Look for core classes
for clsname in ["virConnect",
"virDomain",
"virDomainSnapshot",
"virInterface",
"virNWFilter",
"virNodeDe... | <commit_before>#!/usr/bin/python
import libvirt
globals = dir(libvirt)
# Sanity test that the generator hasn't gone wrong
# Look for core classes
assert("virConnect" in globals)
assert("virDomain" in globals)
assert("virDomainSnapshot" in globals)
assert("virInterface" in globals)
assert("virNWFilter" in globals)
a... | #!/usr/bin/python
import libvirt
globals = dir(libvirt)
# Sanity test that the generator hasn't gone wrong
# Look for core classes
for clsname in ["virConnect",
"virDomain",
"virDomainSnapshot",
"virInterface",
"virNWFilter",
"virNodeDe... | #!/usr/bin/python
import libvirt
globals = dir(libvirt)
# Sanity test that the generator hasn't gone wrong
# Look for core classes
assert("virConnect" in globals)
assert("virDomain" in globals)
assert("virDomainSnapshot" in globals)
assert("virInterface" in globals)
assert("virNWFilter" in globals)
assert("virNodeD... | <commit_before>#!/usr/bin/python
import libvirt
globals = dir(libvirt)
# Sanity test that the generator hasn't gone wrong
# Look for core classes
assert("virConnect" in globals)
assert("virDomain" in globals)
assert("virDomainSnapshot" in globals)
assert("virInterface" in globals)
assert("virNWFilter" in globals)
a... |
ebe21ef2014b9b6c6d77c1254a87546d5096642f | src/foremast/app/aws.py | src/foremast/app/aws.py | """AWS Spinnaker Application."""
from pprint import pformat
from foremast.app.base import BaseApp
from foremast.utils import wait_for_task
class SpinnakerApp(BaseApp):
"""Create AWS Spinnaker Application."""
def create(self):
"""Send a POST to spinnaker to create a new application with class variable... | """AWS Spinnaker Application."""
from pprint import pformat
from foremast.app import base
from foremast.utils import wait_for_task
class SpinnakerApp(base.BaseApp):
"""Create AWS Spinnaker Application."""
def create(self):
"""Send a POST to spinnaker to create a new application with class variables.... | Use different import for better testing | fix: Use different import for better testing
| Python | apache-2.0 | gogoair/foremast,gogoair/foremast | """AWS Spinnaker Application."""
from pprint import pformat
from foremast.app.base import BaseApp
from foremast.utils import wait_for_task
class SpinnakerApp(BaseApp):
"""Create AWS Spinnaker Application."""
def create(self):
"""Send a POST to spinnaker to create a new application with class variable... | """AWS Spinnaker Application."""
from pprint import pformat
from foremast.app import base
from foremast.utils import wait_for_task
class SpinnakerApp(base.BaseApp):
"""Create AWS Spinnaker Application."""
def create(self):
"""Send a POST to spinnaker to create a new application with class variables.... | <commit_before>"""AWS Spinnaker Application."""
from pprint import pformat
from foremast.app.base import BaseApp
from foremast.utils import wait_for_task
class SpinnakerApp(BaseApp):
"""Create AWS Spinnaker Application."""
def create(self):
"""Send a POST to spinnaker to create a new application with... | """AWS Spinnaker Application."""
from pprint import pformat
from foremast.app import base
from foremast.utils import wait_for_task
class SpinnakerApp(base.BaseApp):
"""Create AWS Spinnaker Application."""
def create(self):
"""Send a POST to spinnaker to create a new application with class variables.... | """AWS Spinnaker Application."""
from pprint import pformat
from foremast.app.base import BaseApp
from foremast.utils import wait_for_task
class SpinnakerApp(BaseApp):
"""Create AWS Spinnaker Application."""
def create(self):
"""Send a POST to spinnaker to create a new application with class variable... | <commit_before>"""AWS Spinnaker Application."""
from pprint import pformat
from foremast.app.base import BaseApp
from foremast.utils import wait_for_task
class SpinnakerApp(BaseApp):
"""Create AWS Spinnaker Application."""
def create(self):
"""Send a POST to spinnaker to create a new application with... |
c8decb4f11059b58dd96442a4114f10cb95c7b35 | tv-script-generation/helper.py | tv-script-generation/helper.py | import os
import pickle
def load_data(path):
"""
Load Dataset from File
"""
input_file = os.path.join(path)
with open(input_file, "r") as f:
data = f.read()
return data
def preprocess_and_save_data(dataset_path, token_lookup, create_lookup_tables):
"""
Preprocess Text Data
... | import os
import pickle
def load_data(path):
"""
Load Dataset from File
"""
input_file = os.path.join(path)
with open(input_file, "r") as f:
data = f.read()
return data
def preprocess_and_save_data(dataset_path, token_lookup, create_lookup_tables):
"""
Preprocess Text Data
... | Remove copyright notice during preprocessing | Remove copyright notice during preprocessing
| Python | mit | danresende/deep-learning,snegirigens/DLND,0x4a50/udacity-0x4a50-deep-learning-nanodegree,kitu2007/dl_class,seinberg/deep-learning,samirma/deep-learning,schaber/deep-learning,dataewan/deep-learning,michaelgat/Udacity_DL,Bismarrck/deep-learning,greg-ashby/deep-learning-nanodegree,cranium/deep-learning,thiagoqd/queirozdia... | import os
import pickle
def load_data(path):
"""
Load Dataset from File
"""
input_file = os.path.join(path)
with open(input_file, "r") as f:
data = f.read()
return data
def preprocess_and_save_data(dataset_path, token_lookup, create_lookup_tables):
"""
Preprocess Text Data
... | import os
import pickle
def load_data(path):
"""
Load Dataset from File
"""
input_file = os.path.join(path)
with open(input_file, "r") as f:
data = f.read()
return data
def preprocess_and_save_data(dataset_path, token_lookup, create_lookup_tables):
"""
Preprocess Text Data
... | <commit_before>import os
import pickle
def load_data(path):
"""
Load Dataset from File
"""
input_file = os.path.join(path)
with open(input_file, "r") as f:
data = f.read()
return data
def preprocess_and_save_data(dataset_path, token_lookup, create_lookup_tables):
"""
Preproc... | import os
import pickle
def load_data(path):
"""
Load Dataset from File
"""
input_file = os.path.join(path)
with open(input_file, "r") as f:
data = f.read()
return data
def preprocess_and_save_data(dataset_path, token_lookup, create_lookup_tables):
"""
Preprocess Text Data
... | import os
import pickle
def load_data(path):
"""
Load Dataset from File
"""
input_file = os.path.join(path)
with open(input_file, "r") as f:
data = f.read()
return data
def preprocess_and_save_data(dataset_path, token_lookup, create_lookup_tables):
"""
Preprocess Text Data
... | <commit_before>import os
import pickle
def load_data(path):
"""
Load Dataset from File
"""
input_file = os.path.join(path)
with open(input_file, "r") as f:
data = f.read()
return data
def preprocess_and_save_data(dataset_path, token_lookup, create_lookup_tables):
"""
Preproc... |
df0aa97de17be8b8b4d906bddf61272927009eb9 | web.py | web.py | import os
import requests
import json
from flask import Flask, jsonify, abort, make_response, request
FLICKR_BASE = "http://api.flickr.com/services/rest/"
app = Flask(__name__)
if __name__ == '__main__':
port = int(os.environ.get('PORT', 5000))
app.run(host='0.0.0.0', port=port, debug=True)
| import os
import flickr
from flask import Flask, jsonify, abort, make_response, request
app = Flask(__name__)
if __name__ == '__main__':
port = int(os.environ.get('PORT', 5000))
app.run(host='0.0.0.0', port=port, debug=True)
| Add the helper to the default | Add the helper to the default
| Python | mit | kyleconroy/quivr | import os
import requests
import json
from flask import Flask, jsonify, abort, make_response, request
FLICKR_BASE = "http://api.flickr.com/services/rest/"
app = Flask(__name__)
if __name__ == '__main__':
port = int(os.environ.get('PORT', 5000))
app.run(host='0.0.0.0', port=port, debug=True)
Add the helper t... | import os
import flickr
from flask import Flask, jsonify, abort, make_response, request
app = Flask(__name__)
if __name__ == '__main__':
port = int(os.environ.get('PORT', 5000))
app.run(host='0.0.0.0', port=port, debug=True)
| <commit_before>import os
import requests
import json
from flask import Flask, jsonify, abort, make_response, request
FLICKR_BASE = "http://api.flickr.com/services/rest/"
app = Flask(__name__)
if __name__ == '__main__':
port = int(os.environ.get('PORT', 5000))
app.run(host='0.0.0.0', port=port, debug=True)
<... | import os
import flickr
from flask import Flask, jsonify, abort, make_response, request
app = Flask(__name__)
if __name__ == '__main__':
port = int(os.environ.get('PORT', 5000))
app.run(host='0.0.0.0', port=port, debug=True)
| import os
import requests
import json
from flask import Flask, jsonify, abort, make_response, request
FLICKR_BASE = "http://api.flickr.com/services/rest/"
app = Flask(__name__)
if __name__ == '__main__':
port = int(os.environ.get('PORT', 5000))
app.run(host='0.0.0.0', port=port, debug=True)
Add the helper t... | <commit_before>import os
import requests
import json
from flask import Flask, jsonify, abort, make_response, request
FLICKR_BASE = "http://api.flickr.com/services/rest/"
app = Flask(__name__)
if __name__ == '__main__':
port = int(os.environ.get('PORT', 5000))
app.run(host='0.0.0.0', port=port, debug=True)
<... |
4a95e49570a26f1295a2dad9d6d71ad9a887f1b1 | setup_data.py | setup_data.py | INFO = {
'name': 'Mayavi',
'version': '3.4.1',
'install_requires': [
'AppTools >= 3.4.1.dev',
'Traits >= 3.6.0.dev',
],
}
| INFO = {
'extras_require': {
'app' : [
'EnvisageCore >= 3.2.0.dev',
'EnvisagePlugins >= 3.2.0.dev',
'TraitsBackendWX >= 3.6.0.dev',
],
},
'name': 'Mayavi',
'version': '3.4.1',
'install_requires': [
'AppTools >= 3.4.1.dev',
'... | Add back the extra requires for the | MISC: Add back the extra requires for the [app]
| Python | bsd-3-clause | liulion/mayavi,dmsurti/mayavi,alexandreleroux/mayavi,alexandreleroux/mayavi,dmsurti/mayavi,liulion/mayavi | INFO = {
'name': 'Mayavi',
'version': '3.4.1',
'install_requires': [
'AppTools >= 3.4.1.dev',
'Traits >= 3.6.0.dev',
],
}
MISC: Add back the extra requires for the [app] | INFO = {
'extras_require': {
'app' : [
'EnvisageCore >= 3.2.0.dev',
'EnvisagePlugins >= 3.2.0.dev',
'TraitsBackendWX >= 3.6.0.dev',
],
},
'name': 'Mayavi',
'version': '3.4.1',
'install_requires': [
'AppTools >= 3.4.1.dev',
'... | <commit_before>INFO = {
'name': 'Mayavi',
'version': '3.4.1',
'install_requires': [
'AppTools >= 3.4.1.dev',
'Traits >= 3.6.0.dev',
],
}
<commit_msg>MISC: Add back the extra requires for the [app]<commit_after> | INFO = {
'extras_require': {
'app' : [
'EnvisageCore >= 3.2.0.dev',
'EnvisagePlugins >= 3.2.0.dev',
'TraitsBackendWX >= 3.6.0.dev',
],
},
'name': 'Mayavi',
'version': '3.4.1',
'install_requires': [
'AppTools >= 3.4.1.dev',
'... | INFO = {
'name': 'Mayavi',
'version': '3.4.1',
'install_requires': [
'AppTools >= 3.4.1.dev',
'Traits >= 3.6.0.dev',
],
}
MISC: Add back the extra requires for the [app]INFO = {
'extras_require': {
'app' : [
'EnvisageCore >= 3.2.0.dev',
'EnvisagePlugin... | <commit_before>INFO = {
'name': 'Mayavi',
'version': '3.4.1',
'install_requires': [
'AppTools >= 3.4.1.dev',
'Traits >= 3.6.0.dev',
],
}
<commit_msg>MISC: Add back the extra requires for the [app]<commit_after>INFO = {
'extras_require': {
'app' : [
'EnvisageCore >... |
ac923a58ffa7c437985e68d98e7dd0e4e67df39c | shiva/http.py | shiva/http.py | from flask import current_app as app, Response
from flask.ext import restful
from shiva.decorators import allow_origins
class Resource(restful.Resource):
def __new__(cls, *args, **kwargs):
if app.config.get('CORS_ENABLED') is True:
# Applies to all inherited resources
cls.method_d... | from flask import current_app as app, Response
from flask.ext import restful
from shiva.decorators import allow_origins
class Resource(restful.Resource):
def __new__(cls, *args, **kwargs):
if app.config.get('CORS_ENABLED') is True:
# Applies to all inherited resources
cls.method_d... | Fix for OPTIONS method to an instance | Fix for OPTIONS method to an instance
OPTIONS /track/1
TypeError: options() got an unexpected keyword argument 'track_id'
| Python | mit | tooxie/shiva-server,maurodelazeri/shiva-server,maurodelazeri/shiva-server,tooxie/shiva-server | from flask import current_app as app, Response
from flask.ext import restful
from shiva.decorators import allow_origins
class Resource(restful.Resource):
def __new__(cls, *args, **kwargs):
if app.config.get('CORS_ENABLED') is True:
# Applies to all inherited resources
cls.method_d... | from flask import current_app as app, Response
from flask.ext import restful
from shiva.decorators import allow_origins
class Resource(restful.Resource):
def __new__(cls, *args, **kwargs):
if app.config.get('CORS_ENABLED') is True:
# Applies to all inherited resources
cls.method_d... | <commit_before>from flask import current_app as app, Response
from flask.ext import restful
from shiva.decorators import allow_origins
class Resource(restful.Resource):
def __new__(cls, *args, **kwargs):
if app.config.get('CORS_ENABLED') is True:
# Applies to all inherited resources
... | from flask import current_app as app, Response
from flask.ext import restful
from shiva.decorators import allow_origins
class Resource(restful.Resource):
def __new__(cls, *args, **kwargs):
if app.config.get('CORS_ENABLED') is True:
# Applies to all inherited resources
cls.method_d... | from flask import current_app as app, Response
from flask.ext import restful
from shiva.decorators import allow_origins
class Resource(restful.Resource):
def __new__(cls, *args, **kwargs):
if app.config.get('CORS_ENABLED') is True:
# Applies to all inherited resources
cls.method_d... | <commit_before>from flask import current_app as app, Response
from flask.ext import restful
from shiva.decorators import allow_origins
class Resource(restful.Resource):
def __new__(cls, *args, **kwargs):
if app.config.get('CORS_ENABLED') is True:
# Applies to all inherited resources
... |
41e0ea623baaff22ed5f436ad563edf52b762bcc | Main.py | Main.py | """Main Module of PDF Splitter"""
import argparse
import os
from PyPDF2 import PdfFileWriter
from Util import all_pdf_files_in_directory, split_on_condition, concat_pdf_pages
parser = \
argparse.ArgumentParser(
description='Split all the pages of multiple PDF files in a directory by document number'
... | """Main Module of PDF Splitter"""
import argparse
import os
from PyPDF2 import PdfFileWriter
from Util import all_pdf_files_in_directory, split_on_condition, concat_pdf_pages
parser = \
argparse.ArgumentParser(
description='Split all the pages of multiple PDF files in a directory by document number'
... | Fix bug where only PDF files in current directory can be found | Fix bug where only PDF files in current directory can be found
| Python | mit | shunghsiyu/pdf-processor | """Main Module of PDF Splitter"""
import argparse
import os
from PyPDF2 import PdfFileWriter
from Util import all_pdf_files_in_directory, split_on_condition, concat_pdf_pages
parser = \
argparse.ArgumentParser(
description='Split all the pages of multiple PDF files in a directory by document number'
... | """Main Module of PDF Splitter"""
import argparse
import os
from PyPDF2 import PdfFileWriter
from Util import all_pdf_files_in_directory, split_on_condition, concat_pdf_pages
parser = \
argparse.ArgumentParser(
description='Split all the pages of multiple PDF files in a directory by document number'
... | <commit_before>"""Main Module of PDF Splitter"""
import argparse
import os
from PyPDF2 import PdfFileWriter
from Util import all_pdf_files_in_directory, split_on_condition, concat_pdf_pages
parser = \
argparse.ArgumentParser(
description='Split all the pages of multiple PDF files in a directory by docume... | """Main Module of PDF Splitter"""
import argparse
import os
from PyPDF2 import PdfFileWriter
from Util import all_pdf_files_in_directory, split_on_condition, concat_pdf_pages
parser = \
argparse.ArgumentParser(
description='Split all the pages of multiple PDF files in a directory by document number'
... | """Main Module of PDF Splitter"""
import argparse
import os
from PyPDF2 import PdfFileWriter
from Util import all_pdf_files_in_directory, split_on_condition, concat_pdf_pages
parser = \
argparse.ArgumentParser(
description='Split all the pages of multiple PDF files in a directory by document number'
... | <commit_before>"""Main Module of PDF Splitter"""
import argparse
import os
from PyPDF2 import PdfFileWriter
from Util import all_pdf_files_in_directory, split_on_condition, concat_pdf_pages
parser = \
argparse.ArgumentParser(
description='Split all the pages of multiple PDF files in a directory by docume... |
84741b8f6c7aec220b8644d92535e1a805c65b08 | run_example.py | run_example.py | import keras
from DatasetHandler.CreateDataset import *
from ModelHandler.CreateModel.functions_for_vgg16 import *
import time
#d = load_8376_resized_150x150(desired_number=10)
#d.statistics()
start = time.time()
print time.ctime()
main_vgg16(TMP_size_of_dataset=100, TMP_num_of_epochs=150, name_of_the_experiment = '... | import keras
from DatasetHandler.CreateDataset import *
from ModelHandler.CreateModel.functions_for_vgg16 import *
import time
import sys
# DEFAULT VALUES:
TMP_size_of_dataset=100
TMP_num_of_epochs=150
name_of_the_experiment = '-newWawe-1stRoundShouldCountBoth'
# python python_script.py var1 var2 var3
if len(sys.argv... | Add the support for custom setting given by bash script (run as "python_script.py sizeOfDataset numOfEpochs nameOfExp") | Add the support for custom setting given by bash script (run as "python_script.py sizeOfDataset numOfEpochs nameOfExp")
| Python | mit | previtus/MGR-Project-Code,previtus/MGR-Project-Code,previtus/MGR-Project-Code | import keras
from DatasetHandler.CreateDataset import *
from ModelHandler.CreateModel.functions_for_vgg16 import *
import time
#d = load_8376_resized_150x150(desired_number=10)
#d.statistics()
start = time.time()
print time.ctime()
main_vgg16(TMP_size_of_dataset=100, TMP_num_of_epochs=150, name_of_the_experiment = '... | import keras
from DatasetHandler.CreateDataset import *
from ModelHandler.CreateModel.functions_for_vgg16 import *
import time
import sys
# DEFAULT VALUES:
TMP_size_of_dataset=100
TMP_num_of_epochs=150
name_of_the_experiment = '-newWawe-1stRoundShouldCountBoth'
# python python_script.py var1 var2 var3
if len(sys.argv... | <commit_before>import keras
from DatasetHandler.CreateDataset import *
from ModelHandler.CreateModel.functions_for_vgg16 import *
import time
#d = load_8376_resized_150x150(desired_number=10)
#d.statistics()
start = time.time()
print time.ctime()
main_vgg16(TMP_size_of_dataset=100, TMP_num_of_epochs=150, name_of_the... | import keras
from DatasetHandler.CreateDataset import *
from ModelHandler.CreateModel.functions_for_vgg16 import *
import time
import sys
# DEFAULT VALUES:
TMP_size_of_dataset=100
TMP_num_of_epochs=150
name_of_the_experiment = '-newWawe-1stRoundShouldCountBoth'
# python python_script.py var1 var2 var3
if len(sys.argv... | import keras
from DatasetHandler.CreateDataset import *
from ModelHandler.CreateModel.functions_for_vgg16 import *
import time
#d = load_8376_resized_150x150(desired_number=10)
#d.statistics()
start = time.time()
print time.ctime()
main_vgg16(TMP_size_of_dataset=100, TMP_num_of_epochs=150, name_of_the_experiment = '... | <commit_before>import keras
from DatasetHandler.CreateDataset import *
from ModelHandler.CreateModel.functions_for_vgg16 import *
import time
#d = load_8376_resized_150x150(desired_number=10)
#d.statistics()
start = time.time()
print time.ctime()
main_vgg16(TMP_size_of_dataset=100, TMP_num_of_epochs=150, name_of_the... |
d4580c01fc6adc078b382281a23022537c87940a | imager/imagerprofile/handlers.py | imager/imagerprofile/handlers.py | from django.db.models.signals import post_save
from django.dispatch import receiver
from django.contrib.auth.models import User
from imagerprofile.models import ImagerProfile
@receiver(post_save, sender=User)
def add_profile(sender, instance, **kwargs):
if kwargs['created']:
# try:
new_profile = I... | from django.db.models.signals import post_save
from django.dispatch import receiver
from django.contrib.auth.models import User
from imagerprofile.models import ImagerProfile
@receiver(post_save, sender=User)
def add_profile(sender, instance, **kwargs):
if kwargs['created']:
new_profile = ImagerProfile(us... | Remove commented out code that isn't needed | Remove commented out code that isn't needed
| Python | mit | nbeck90/django-imager,nbeck90/django-imager | from django.db.models.signals import post_save
from django.dispatch import receiver
from django.contrib.auth.models import User
from imagerprofile.models import ImagerProfile
@receiver(post_save, sender=User)
def add_profile(sender, instance, **kwargs):
if kwargs['created']:
# try:
new_profile = I... | from django.db.models.signals import post_save
from django.dispatch import receiver
from django.contrib.auth.models import User
from imagerprofile.models import ImagerProfile
@receiver(post_save, sender=User)
def add_profile(sender, instance, **kwargs):
if kwargs['created']:
new_profile = ImagerProfile(us... | <commit_before>from django.db.models.signals import post_save
from django.dispatch import receiver
from django.contrib.auth.models import User
from imagerprofile.models import ImagerProfile
@receiver(post_save, sender=User)
def add_profile(sender, instance, **kwargs):
if kwargs['created']:
# try:
... | from django.db.models.signals import post_save
from django.dispatch import receiver
from django.contrib.auth.models import User
from imagerprofile.models import ImagerProfile
@receiver(post_save, sender=User)
def add_profile(sender, instance, **kwargs):
if kwargs['created']:
new_profile = ImagerProfile(us... | from django.db.models.signals import post_save
from django.dispatch import receiver
from django.contrib.auth.models import User
from imagerprofile.models import ImagerProfile
@receiver(post_save, sender=User)
def add_profile(sender, instance, **kwargs):
if kwargs['created']:
# try:
new_profile = I... | <commit_before>from django.db.models.signals import post_save
from django.dispatch import receiver
from django.contrib.auth.models import User
from imagerprofile.models import ImagerProfile
@receiver(post_save, sender=User)
def add_profile(sender, instance, **kwargs):
if kwargs['created']:
# try:
... |
52d8ace9c944dda105dc95ab0baff4a41b4b48c3 | scripts/art.py | scripts/art.py | #!/usr/bin/env python
import sys
from pyfiglet import Figlet
from optparse import OptionParser
def draw_text(f, font, text):
f.setFont(font=font)
print f.renderText(text)
def main(args):
parser = OptionParser()
parser.add_option("-f", "--font", help="specify the font",
action="store... | #!/usr/bin/env python
import sys
from pyfiglet import Figlet
from optparse import OptionParser
def draw_text(figlet, font, textlist):
figlet.setFont(font=font)
for t in textlist:
print figlet.renderText(t)
def list_fonts(figlet, count=10):
fonts = figlet.getFonts()
nrows = len(fonts)/count
... | Support for text input via args. | Support for text input via args.
1. better help message
2. support for input arguments
3. better defaults
4. columnar display of fonts
| Python | mit | shiva/asciiart | #!/usr/bin/env python
import sys
from pyfiglet import Figlet
from optparse import OptionParser
def draw_text(f, font, text):
f.setFont(font=font)
print f.renderText(text)
def main(args):
parser = OptionParser()
parser.add_option("-f", "--font", help="specify the font",
action="store... | #!/usr/bin/env python
import sys
from pyfiglet import Figlet
from optparse import OptionParser
def draw_text(figlet, font, textlist):
figlet.setFont(font=font)
for t in textlist:
print figlet.renderText(t)
def list_fonts(figlet, count=10):
fonts = figlet.getFonts()
nrows = len(fonts)/count
... | <commit_before>#!/usr/bin/env python
import sys
from pyfiglet import Figlet
from optparse import OptionParser
def draw_text(f, font, text):
f.setFont(font=font)
print f.renderText(text)
def main(args):
parser = OptionParser()
parser.add_option("-f", "--font", help="specify the font",
... | #!/usr/bin/env python
import sys
from pyfiglet import Figlet
from optparse import OptionParser
def draw_text(figlet, font, textlist):
figlet.setFont(font=font)
for t in textlist:
print figlet.renderText(t)
def list_fonts(figlet, count=10):
fonts = figlet.getFonts()
nrows = len(fonts)/count
... | #!/usr/bin/env python
import sys
from pyfiglet import Figlet
from optparse import OptionParser
def draw_text(f, font, text):
f.setFont(font=font)
print f.renderText(text)
def main(args):
parser = OptionParser()
parser.add_option("-f", "--font", help="specify the font",
action="store... | <commit_before>#!/usr/bin/env python
import sys
from pyfiglet import Figlet
from optparse import OptionParser
def draw_text(f, font, text):
f.setFont(font=font)
print f.renderText(text)
def main(args):
parser = OptionParser()
parser.add_option("-f", "--font", help="specify the font",
... |
a7d8d2f95acbf801c0cc8b0f2a8cc008f6cb34c0 | rouver/types.py | rouver/types.py | from __future__ import annotations
from collections.abc import Iterable, Mapping
from typing import Any, Callable, Dict, Tuple
from typing_extensions import TypeAlias
from werkzeug.wrappers import Request
# (name, value)
Header: TypeAlias = Tuple[str, str]
WSGIEnvironment: TypeAlias = Dict[str, Any]
# (body) -> No... | from __future__ import annotations
from typing import Any, Callable, Dict, Iterable, Mapping, Tuple
from typing_extensions import TypeAlias
from werkzeug.wrappers import Request
# (name, value)
Header: TypeAlias = Tuple[str, str]
WSGIEnvironment: TypeAlias = Dict[str, Any]
# (body) -> None
StartResponseReturnType:... | Fix imports on Python <= 3.8 | Fix imports on Python <= 3.8
| Python | mit | srittau/rouver | from __future__ import annotations
from collections.abc import Iterable, Mapping
from typing import Any, Callable, Dict, Tuple
from typing_extensions import TypeAlias
from werkzeug.wrappers import Request
# (name, value)
Header: TypeAlias = Tuple[str, str]
WSGIEnvironment: TypeAlias = Dict[str, Any]
# (body) -> No... | from __future__ import annotations
from typing import Any, Callable, Dict, Iterable, Mapping, Tuple
from typing_extensions import TypeAlias
from werkzeug.wrappers import Request
# (name, value)
Header: TypeAlias = Tuple[str, str]
WSGIEnvironment: TypeAlias = Dict[str, Any]
# (body) -> None
StartResponseReturnType:... | <commit_before>from __future__ import annotations
from collections.abc import Iterable, Mapping
from typing import Any, Callable, Dict, Tuple
from typing_extensions import TypeAlias
from werkzeug.wrappers import Request
# (name, value)
Header: TypeAlias = Tuple[str, str]
WSGIEnvironment: TypeAlias = Dict[str, Any]
... | from __future__ import annotations
from typing import Any, Callable, Dict, Iterable, Mapping, Tuple
from typing_extensions import TypeAlias
from werkzeug.wrappers import Request
# (name, value)
Header: TypeAlias = Tuple[str, str]
WSGIEnvironment: TypeAlias = Dict[str, Any]
# (body) -> None
StartResponseReturnType:... | from __future__ import annotations
from collections.abc import Iterable, Mapping
from typing import Any, Callable, Dict, Tuple
from typing_extensions import TypeAlias
from werkzeug.wrappers import Request
# (name, value)
Header: TypeAlias = Tuple[str, str]
WSGIEnvironment: TypeAlias = Dict[str, Any]
# (body) -> No... | <commit_before>from __future__ import annotations
from collections.abc import Iterable, Mapping
from typing import Any, Callable, Dict, Tuple
from typing_extensions import TypeAlias
from werkzeug.wrappers import Request
# (name, value)
Header: TypeAlias = Tuple[str, str]
WSGIEnvironment: TypeAlias = Dict[str, Any]
... |
5b87029e229fa3dcf0e81231899c36bd52a7616c | numpy/core/__init__.py | numpy/core/__init__.py |
from info import __doc__
from numpy.version import version as __version__
import multiarray
import umath
import numerictypes as nt
multiarray.set_typeDict(nt.sctypeDict)
import _sort
from numeric import *
from fromnumeric import *
from defmatrix import *
import ma
import defchararray as char
import records as rec
fro... |
from info import __doc__
from numpy.version import version as __version__
import multiarray
import umath
import _internal # for freeze programs
import numerictypes as nt
multiarray.set_typeDict(nt.sctypeDict)
import _sort
from numeric import *
from fromnumeric import *
from defmatrix import *
import ma
import defchar... | Add an dummy import statement so that freeze programs pick up _internal.p | Add an dummy import statement so that freeze programs pick up _internal.p
| Python | bsd-3-clause | dato-code/numpy,jorisvandenbossche/numpy,mathdd/numpy,stefanv/numpy,sinhrks/numpy,stuarteberg/numpy,rajathkumarmp/numpy,madphysicist/numpy,skwbc/numpy,rudimeier/numpy,abalkin/numpy,brandon-rhodes/numpy,Linkid/numpy,shoyer/numpy,pizzathief/numpy,rherault-insa/numpy,pbrod/numpy,mingwpy/numpy,MaPePeR/numpy,argriffing/nump... |
from info import __doc__
from numpy.version import version as __version__
import multiarray
import umath
import numerictypes as nt
multiarray.set_typeDict(nt.sctypeDict)
import _sort
from numeric import *
from fromnumeric import *
from defmatrix import *
import ma
import defchararray as char
import records as rec
fro... |
from info import __doc__
from numpy.version import version as __version__
import multiarray
import umath
import _internal # for freeze programs
import numerictypes as nt
multiarray.set_typeDict(nt.sctypeDict)
import _sort
from numeric import *
from fromnumeric import *
from defmatrix import *
import ma
import defchar... | <commit_before>
from info import __doc__
from numpy.version import version as __version__
import multiarray
import umath
import numerictypes as nt
multiarray.set_typeDict(nt.sctypeDict)
import _sort
from numeric import *
from fromnumeric import *
from defmatrix import *
import ma
import defchararray as char
import rec... |
from info import __doc__
from numpy.version import version as __version__
import multiarray
import umath
import _internal # for freeze programs
import numerictypes as nt
multiarray.set_typeDict(nt.sctypeDict)
import _sort
from numeric import *
from fromnumeric import *
from defmatrix import *
import ma
import defchar... |
from info import __doc__
from numpy.version import version as __version__
import multiarray
import umath
import numerictypes as nt
multiarray.set_typeDict(nt.sctypeDict)
import _sort
from numeric import *
from fromnumeric import *
from defmatrix import *
import ma
import defchararray as char
import records as rec
fro... | <commit_before>
from info import __doc__
from numpy.version import version as __version__
import multiarray
import umath
import numerictypes as nt
multiarray.set_typeDict(nt.sctypeDict)
import _sort
from numeric import *
from fromnumeric import *
from defmatrix import *
import ma
import defchararray as char
import rec... |
389fd283c0e05a7c3ccdc871b2423a1d0f3b2280 | stack/cluster.py | stack/cluster.py | from troposphere import (
Parameter,
Ref,
)
from troposphere.ecs import (
Cluster,
)
from .template import template
container_instance_type = Ref(template.add_parameter(Parameter(
"ContainerInstanceType",
Description="The container instance type",
Type="String",
Default="t2.micro",
A... | from troposphere import (
Parameter,
Ref,
)
from troposphere.ecs import (
Cluster,
)
from .template import template
container_instance_type = Ref(template.add_parameter(Parameter(
"ContainerInstanceType",
Description="The container instance type",
Type="String",
Default="t2.micro",
A... | Add a `ECS` ami ids as a region mapping | Add a `ECS` ami ids as a region mapping
| Python | mit | tobiasmcnulty/aws-container-basics,caktus/aws-web-stacks | from troposphere import (
Parameter,
Ref,
)
from troposphere.ecs import (
Cluster,
)
from .template import template
container_instance_type = Ref(template.add_parameter(Parameter(
"ContainerInstanceType",
Description="The container instance type",
Type="String",
Default="t2.micro",
A... | from troposphere import (
Parameter,
Ref,
)
from troposphere.ecs import (
Cluster,
)
from .template import template
container_instance_type = Ref(template.add_parameter(Parameter(
"ContainerInstanceType",
Description="The container instance type",
Type="String",
Default="t2.micro",
A... | <commit_before>from troposphere import (
Parameter,
Ref,
)
from troposphere.ecs import (
Cluster,
)
from .template import template
container_instance_type = Ref(template.add_parameter(Parameter(
"ContainerInstanceType",
Description="The container instance type",
Type="String",
Default="t... | from troposphere import (
Parameter,
Ref,
)
from troposphere.ecs import (
Cluster,
)
from .template import template
container_instance_type = Ref(template.add_parameter(Parameter(
"ContainerInstanceType",
Description="The container instance type",
Type="String",
Default="t2.micro",
A... | from troposphere import (
Parameter,
Ref,
)
from troposphere.ecs import (
Cluster,
)
from .template import template
container_instance_type = Ref(template.add_parameter(Parameter(
"ContainerInstanceType",
Description="The container instance type",
Type="String",
Default="t2.micro",
A... | <commit_before>from troposphere import (
Parameter,
Ref,
)
from troposphere.ecs import (
Cluster,
)
from .template import template
container_instance_type = Ref(template.add_parameter(Parameter(
"ContainerInstanceType",
Description="The container instance type",
Type="String",
Default="t... |
56300ddbac1a47f9b2c9f7946c8810e55e19bb07 | Code/Native/update_module_builder.py | Code/Native/update_module_builder.py | """
This script downloads and updates the module builder.
"""
# Dont checkout all files
IGNORE_FILES = [
"__init__.py",
".gitignore",
"LICENSE",
"README.md",
"config.ini",
"Source/config_module.cpp",
"Source/config_module.h",
"Source/ExampleClass.cpp",
"Source/ExampleClass.h",
... | """
This script downloads and updates the module builder.
"""
# Dont checkout all files
IGNORE_FILES = [
"__init__.py",
".gitignore",
"LICENSE",
"README.md",
"config.ini",
"Source/config_module.cpp",
"Source/config_module.h",
"Source/ExampleClass.cpp",
"Source/ExampleClass.h",
... | Fix missing __init__ in native directory | Fix missing __init__ in native directory
| Python | mit | eswartz/RenderPipeline,eswartz/RenderPipeline,eswartz/RenderPipeline | """
This script downloads and updates the module builder.
"""
# Dont checkout all files
IGNORE_FILES = [
"__init__.py",
".gitignore",
"LICENSE",
"README.md",
"config.ini",
"Source/config_module.cpp",
"Source/config_module.h",
"Source/ExampleClass.cpp",
"Source/ExampleClass.h",
... | """
This script downloads and updates the module builder.
"""
# Dont checkout all files
IGNORE_FILES = [
"__init__.py",
".gitignore",
"LICENSE",
"README.md",
"config.ini",
"Source/config_module.cpp",
"Source/config_module.h",
"Source/ExampleClass.cpp",
"Source/ExampleClass.h",
... | <commit_before>"""
This script downloads and updates the module builder.
"""
# Dont checkout all files
IGNORE_FILES = [
"__init__.py",
".gitignore",
"LICENSE",
"README.md",
"config.ini",
"Source/config_module.cpp",
"Source/config_module.h",
"Source/ExampleClass.cpp",
"Source/Exam... | """
This script downloads and updates the module builder.
"""
# Dont checkout all files
IGNORE_FILES = [
"__init__.py",
".gitignore",
"LICENSE",
"README.md",
"config.ini",
"Source/config_module.cpp",
"Source/config_module.h",
"Source/ExampleClass.cpp",
"Source/ExampleClass.h",
... | """
This script downloads and updates the module builder.
"""
# Dont checkout all files
IGNORE_FILES = [
"__init__.py",
".gitignore",
"LICENSE",
"README.md",
"config.ini",
"Source/config_module.cpp",
"Source/config_module.h",
"Source/ExampleClass.cpp",
"Source/ExampleClass.h",
... | <commit_before>"""
This script downloads and updates the module builder.
"""
# Dont checkout all files
IGNORE_FILES = [
"__init__.py",
".gitignore",
"LICENSE",
"README.md",
"config.ini",
"Source/config_module.cpp",
"Source/config_module.h",
"Source/ExampleClass.cpp",
"Source/Exam... |
716f6d2f8ed4e2845746bcb803092806dd8f50b7 | tx_salaries/utils/transformers/mixins.py | tx_salaries/utils/transformers/mixins.py | class OrganizationMixin(object):
"""
Adds a generic ``organization`` property to the class
This requires that the class mixing it in adds an
``ORGANIZATION_NAME`` property of the main level agency or
department.
"""
@property
def organization(self):
return {
'name': ... | class OrganizationMixin(object):
"""
Adds a generic ``organization`` property to the class
This requires that the class mixing it in adds an
``ORGANIZATION_NAME`` property of the main level agency or
department and needs a ``department`` property.
"""
@property
def organization(self):
... | Tweak the wording just a bit | Tweak the wording just a bit
| Python | apache-2.0 | texastribune/tx_salaries,texastribune/tx_salaries | class OrganizationMixin(object):
"""
Adds a generic ``organization`` property to the class
This requires that the class mixing it in adds an
``ORGANIZATION_NAME`` property of the main level agency or
department.
"""
@property
def organization(self):
return {
'name': ... | class OrganizationMixin(object):
"""
Adds a generic ``organization`` property to the class
This requires that the class mixing it in adds an
``ORGANIZATION_NAME`` property of the main level agency or
department and needs a ``department`` property.
"""
@property
def organization(self):
... | <commit_before>class OrganizationMixin(object):
"""
Adds a generic ``organization`` property to the class
This requires that the class mixing it in adds an
``ORGANIZATION_NAME`` property of the main level agency or
department.
"""
@property
def organization(self):
return {
... | class OrganizationMixin(object):
"""
Adds a generic ``organization`` property to the class
This requires that the class mixing it in adds an
``ORGANIZATION_NAME`` property of the main level agency or
department and needs a ``department`` property.
"""
@property
def organization(self):
... | class OrganizationMixin(object):
"""
Adds a generic ``organization`` property to the class
This requires that the class mixing it in adds an
``ORGANIZATION_NAME`` property of the main level agency or
department.
"""
@property
def organization(self):
return {
'name': ... | <commit_before>class OrganizationMixin(object):
"""
Adds a generic ``organization`` property to the class
This requires that the class mixing it in adds an
``ORGANIZATION_NAME`` property of the main level agency or
department.
"""
@property
def organization(self):
return {
... |
83361d2e5cd1cbada31da7350c653133ae9a185f | typhon/spareice/collocations/__init__.py | typhon/spareice/collocations/__init__.py | """
This module contains classes to find collocations between datasets. They are
inspired by the implemented CollocatedDataset classes in atmlab written by
Gerrit Holl.
TODO: I would like to have this package as typhon.collocations.
Created by John Mrziglod, June 2017
"""
from .common import * # noqa
__all__ = [
... | Divide collocations package into submodules | Divide collocations package into submodules
| Python | mit | atmtools/typhon,atmtools/typhon | Divide collocations package into submodules | """
This module contains classes to find collocations between datasets. They are
inspired by the implemented CollocatedDataset classes in atmlab written by
Gerrit Holl.
TODO: I would like to have this package as typhon.collocations.
Created by John Mrziglod, June 2017
"""
from .common import * # noqa
__all__ = [
... | <commit_before><commit_msg>Divide collocations package into submodules<commit_after> | """
This module contains classes to find collocations between datasets. They are
inspired by the implemented CollocatedDataset classes in atmlab written by
Gerrit Holl.
TODO: I would like to have this package as typhon.collocations.
Created by John Mrziglod, June 2017
"""
from .common import * # noqa
__all__ = [
... | Divide collocations package into submodules"""
This module contains classes to find collocations between datasets. They are
inspired by the implemented CollocatedDataset classes in atmlab written by
Gerrit Holl.
TODO: I would like to have this package as typhon.collocations.
Created by John Mrziglod, June 2017
"""
f... | <commit_before><commit_msg>Divide collocations package into submodules<commit_after>"""
This module contains classes to find collocations between datasets. They are
inspired by the implemented CollocatedDataset classes in atmlab written by
Gerrit Holl.
TODO: I would like to have this package as typhon.collocations.
C... | |
7b4b5bc95f0a498ab83422192410f9213bfdb251 | praw/models/listing/mixins/submission.py | praw/models/listing/mixins/submission.py | """Provide the SubmissionListingMixin class."""
from ....const import API_PATH
from ..generator import ListingGenerator
from .base import BaseListingMixin
from .gilded import GildedListingMixin
class SubmissionListingMixin(BaseListingMixin, GildedListingMixin):
"""Adds additional methods pertaining to Submission ... | """Provide the SubmissionListingMixin class."""
from ....const import API_PATH
from ..generator import ListingGenerator
from .gilded import GildedListingMixin
class SubmissionListingMixin(GildedListingMixin):
"""Adds additional methods pertaining to Submission instances."""
def duplicates(self, **generator_k... | Remove BaseListingMixin as superclass for SubmissionListingMixin | Remove BaseListingMixin as superclass for SubmissionListingMixin
| Python | bsd-2-clause | darthkedrik/praw,leviroth/praw,praw-dev/praw,gschizas/praw,13steinj/praw,nmtake/praw,13steinj/praw,gschizas/praw,nmtake/praw,praw-dev/praw,darthkedrik/praw,leviroth/praw | """Provide the SubmissionListingMixin class."""
from ....const import API_PATH
from ..generator import ListingGenerator
from .base import BaseListingMixin
from .gilded import GildedListingMixin
class SubmissionListingMixin(BaseListingMixin, GildedListingMixin):
"""Adds additional methods pertaining to Submission ... | """Provide the SubmissionListingMixin class."""
from ....const import API_PATH
from ..generator import ListingGenerator
from .gilded import GildedListingMixin
class SubmissionListingMixin(GildedListingMixin):
"""Adds additional methods pertaining to Submission instances."""
def duplicates(self, **generator_k... | <commit_before>"""Provide the SubmissionListingMixin class."""
from ....const import API_PATH
from ..generator import ListingGenerator
from .base import BaseListingMixin
from .gilded import GildedListingMixin
class SubmissionListingMixin(BaseListingMixin, GildedListingMixin):
"""Adds additional methods pertaining... | """Provide the SubmissionListingMixin class."""
from ....const import API_PATH
from ..generator import ListingGenerator
from .gilded import GildedListingMixin
class SubmissionListingMixin(GildedListingMixin):
"""Adds additional methods pertaining to Submission instances."""
def duplicates(self, **generator_k... | """Provide the SubmissionListingMixin class."""
from ....const import API_PATH
from ..generator import ListingGenerator
from .base import BaseListingMixin
from .gilded import GildedListingMixin
class SubmissionListingMixin(BaseListingMixin, GildedListingMixin):
"""Adds additional methods pertaining to Submission ... | <commit_before>"""Provide the SubmissionListingMixin class."""
from ....const import API_PATH
from ..generator import ListingGenerator
from .base import BaseListingMixin
from .gilded import GildedListingMixin
class SubmissionListingMixin(BaseListingMixin, GildedListingMixin):
"""Adds additional methods pertaining... |
27360cf049446c5a619b7280dbdd7c3f49c45ad8 | app/questionnaire_state/answer.py | app/questionnaire_state/answer.py | from app.questionnaire_state.item import Item
class Answer(Item):
def __init__(self, id):
super().__init__(id=id)
# typed value
self.value = None
# actual user input
self.input = None
def update_state(self, user_input, schema_item):
if self.id in user_input.key... | from app.questionnaire_state.item import Item
class Answer(Item):
def __init__(self, id):
super().__init__(id=id)
# typed value
self.value = None
# actual user input
self.input = None
def update_state(self, user_input, schema_item):
if self.id in user_input.key... | Clear warnings and errors when type checking passes | Clear warnings and errors when type checking passes
| Python | mit | ONSdigital/eq-survey-runner,ONSdigital/eq-survey-runner,ONSdigital/eq-survey-runner,ONSdigital/eq-survey-runner | from app.questionnaire_state.item import Item
class Answer(Item):
def __init__(self, id):
super().__init__(id=id)
# typed value
self.value = None
# actual user input
self.input = None
def update_state(self, user_input, schema_item):
if self.id in user_input.key... | from app.questionnaire_state.item import Item
class Answer(Item):
def __init__(self, id):
super().__init__(id=id)
# typed value
self.value = None
# actual user input
self.input = None
def update_state(self, user_input, schema_item):
if self.id in user_input.key... | <commit_before>from app.questionnaire_state.item import Item
class Answer(Item):
def __init__(self, id):
super().__init__(id=id)
# typed value
self.value = None
# actual user input
self.input = None
def update_state(self, user_input, schema_item):
if self.id in... | from app.questionnaire_state.item import Item
class Answer(Item):
def __init__(self, id):
super().__init__(id=id)
# typed value
self.value = None
# actual user input
self.input = None
def update_state(self, user_input, schema_item):
if self.id in user_input.key... | from app.questionnaire_state.item import Item
class Answer(Item):
def __init__(self, id):
super().__init__(id=id)
# typed value
self.value = None
# actual user input
self.input = None
def update_state(self, user_input, schema_item):
if self.id in user_input.key... | <commit_before>from app.questionnaire_state.item import Item
class Answer(Item):
def __init__(self, id):
super().__init__(id=id)
# typed value
self.value = None
# actual user input
self.input = None
def update_state(self, user_input, schema_item):
if self.id in... |
af0f80d2385001b52560cb0ec9d31e85c4a891bf | mopidy/frontends/mpd/__init__.py | mopidy/frontends/mpd/__init__.py | import logging
from mopidy.frontends.base import BaseFrontend
from mopidy.frontends.mpd.dispatcher import MpdDispatcher
from mopidy.frontends.mpd.thread import MpdThread
from mopidy.utils.process import unpickle_connection
logger = logging.getLogger('mopidy.frontends.mpd')
class MpdFrontend(BaseFrontend):
"""
... | import logging
from mopidy.frontends.base import BaseFrontend
from mopidy.frontends.mpd.dispatcher import MpdDispatcher
from mopidy.frontends.mpd.thread import MpdThread
from mopidy.utils.process import unpickle_connection
logger = logging.getLogger('mopidy.frontends.mpd')
class MpdFrontend(BaseFrontend):
"""
... | Add MPD_SERVER_PASSWORD to list of relevant frontend settings | Add MPD_SERVER_PASSWORD to list of relevant frontend settings
| Python | apache-2.0 | ali/mopidy,quartz55/mopidy,priestd09/mopidy,rawdlite/mopidy,quartz55/mopidy,vrs01/mopidy,mokieyue/mopidy,mopidy/mopidy,jcass77/mopidy,pacificIT/mopidy,bencevans/mopidy,ali/mopidy,hkariti/mopidy,bencevans/mopidy,pacificIT/mopidy,kingosticks/mopidy,jcass77/mopidy,quartz55/mopidy,jodal/mopidy,glogiotatidis/mopidy,diandian... | import logging
from mopidy.frontends.base import BaseFrontend
from mopidy.frontends.mpd.dispatcher import MpdDispatcher
from mopidy.frontends.mpd.thread import MpdThread
from mopidy.utils.process import unpickle_connection
logger = logging.getLogger('mopidy.frontends.mpd')
class MpdFrontend(BaseFrontend):
"""
... | import logging
from mopidy.frontends.base import BaseFrontend
from mopidy.frontends.mpd.dispatcher import MpdDispatcher
from mopidy.frontends.mpd.thread import MpdThread
from mopidy.utils.process import unpickle_connection
logger = logging.getLogger('mopidy.frontends.mpd')
class MpdFrontend(BaseFrontend):
"""
... | <commit_before>import logging
from mopidy.frontends.base import BaseFrontend
from mopidy.frontends.mpd.dispatcher import MpdDispatcher
from mopidy.frontends.mpd.thread import MpdThread
from mopidy.utils.process import unpickle_connection
logger = logging.getLogger('mopidy.frontends.mpd')
class MpdFrontend(BaseFronte... | import logging
from mopidy.frontends.base import BaseFrontend
from mopidy.frontends.mpd.dispatcher import MpdDispatcher
from mopidy.frontends.mpd.thread import MpdThread
from mopidy.utils.process import unpickle_connection
logger = logging.getLogger('mopidy.frontends.mpd')
class MpdFrontend(BaseFrontend):
"""
... | import logging
from mopidy.frontends.base import BaseFrontend
from mopidy.frontends.mpd.dispatcher import MpdDispatcher
from mopidy.frontends.mpd.thread import MpdThread
from mopidy.utils.process import unpickle_connection
logger = logging.getLogger('mopidy.frontends.mpd')
class MpdFrontend(BaseFrontend):
"""
... | <commit_before>import logging
from mopidy.frontends.base import BaseFrontend
from mopidy.frontends.mpd.dispatcher import MpdDispatcher
from mopidy.frontends.mpd.thread import MpdThread
from mopidy.utils.process import unpickle_connection
logger = logging.getLogger('mopidy.frontends.mpd')
class MpdFrontend(BaseFronte... |
a7bea68d4e904a27c53d08d37093ac5ed2c033f0 | utilities/StartPages.py | utilities/StartPages.py | #--coding:utf-8--
#StartPage.py
#Create/Edit file:'../cfg/StartPage.json'
import os
import re
import sys
import json
from __common__code__ import CreateFile
from __tmpl__ import Prompt
class PromptClass(Prompt.ErrPrompt):
def InitInput(self):
print ("Please input URL(s), use EOF to finish. \n(CTRL+D. if no... | #--coding:utf-8--
#StartPage.py
#Create/Edit file:'../cfg/StartPage.json'
import re
import sys
import json
from __common__code__ import CreateFile
from __tmpl__ import Prompt
class PromptClass(Prompt.ErrPrompt):
def InitInput(self):
print ("Please input URL(s), use EOF to finish. \n(CTRL+D. if not work for... | Fix bug: continue running when fail to open file | Fix bug: continue running when fail to open file
| Python | mit | nday-dev/Spider-Framework | #--coding:utf-8--
#StartPage.py
#Create/Edit file:'../cfg/StartPage.json'
import os
import re
import sys
import json
from __common__code__ import CreateFile
from __tmpl__ import Prompt
class PromptClass(Prompt.ErrPrompt):
def InitInput(self):
print ("Please input URL(s), use EOF to finish. \n(CTRL+D. if no... | #--coding:utf-8--
#StartPage.py
#Create/Edit file:'../cfg/StartPage.json'
import re
import sys
import json
from __common__code__ import CreateFile
from __tmpl__ import Prompt
class PromptClass(Prompt.ErrPrompt):
def InitInput(self):
print ("Please input URL(s), use EOF to finish. \n(CTRL+D. if not work for... | <commit_before>#--coding:utf-8--
#StartPage.py
#Create/Edit file:'../cfg/StartPage.json'
import os
import re
import sys
import json
from __common__code__ import CreateFile
from __tmpl__ import Prompt
class PromptClass(Prompt.ErrPrompt):
def InitInput(self):
print ("Please input URL(s), use EOF to finish. \... | #--coding:utf-8--
#StartPage.py
#Create/Edit file:'../cfg/StartPage.json'
import re
import sys
import json
from __common__code__ import CreateFile
from __tmpl__ import Prompt
class PromptClass(Prompt.ErrPrompt):
def InitInput(self):
print ("Please input URL(s), use EOF to finish. \n(CTRL+D. if not work for... | #--coding:utf-8--
#StartPage.py
#Create/Edit file:'../cfg/StartPage.json'
import os
import re
import sys
import json
from __common__code__ import CreateFile
from __tmpl__ import Prompt
class PromptClass(Prompt.ErrPrompt):
def InitInput(self):
print ("Please input URL(s), use EOF to finish. \n(CTRL+D. if no... | <commit_before>#--coding:utf-8--
#StartPage.py
#Create/Edit file:'../cfg/StartPage.json'
import os
import re
import sys
import json
from __common__code__ import CreateFile
from __tmpl__ import Prompt
class PromptClass(Prompt.ErrPrompt):
def InitInput(self):
print ("Please input URL(s), use EOF to finish. \... |
c136ee96237a05cb717c777dd33b9a3dff9b0015 | test/test_py3.py | test/test_py3.py | import pytest
from in_place import InPlace
from test_in_place_util import UNICODE, pylistdir
def test_py3_textstr(tmpdir):
""" Assert that `InPlace` works with text strings in Python 3 """
assert pylistdir(tmpdir) == []
p = tmpdir.join("file.txt")
p.write_text(UNICODE, 'utf-8')
with I... | import locale
import pytest
from in_place import InPlace
from test_in_place_util import UNICODE, pylistdir
def test_py3_textstr(tmpdir):
""" Assert that `InPlace` works with text strings in Python 3 """
assert pylistdir(tmpdir) == []
p = tmpdir.join("file.txt")
p.write_text(UNICODE, local... | Handle different default encoding on Windows in tests | Handle different default encoding on Windows in tests
| Python | mit | jwodder/inplace | import pytest
from in_place import InPlace
from test_in_place_util import UNICODE, pylistdir
def test_py3_textstr(tmpdir):
""" Assert that `InPlace` works with text strings in Python 3 """
assert pylistdir(tmpdir) == []
p = tmpdir.join("file.txt")
p.write_text(UNICODE, 'utf-8')
with I... | import locale
import pytest
from in_place import InPlace
from test_in_place_util import UNICODE, pylistdir
def test_py3_textstr(tmpdir):
""" Assert that `InPlace` works with text strings in Python 3 """
assert pylistdir(tmpdir) == []
p = tmpdir.join("file.txt")
p.write_text(UNICODE, local... | <commit_before>import pytest
from in_place import InPlace
from test_in_place_util import UNICODE, pylistdir
def test_py3_textstr(tmpdir):
""" Assert that `InPlace` works with text strings in Python 3 """
assert pylistdir(tmpdir) == []
p = tmpdir.join("file.txt")
p.write_text(UNICODE, 'utf... | import locale
import pytest
from in_place import InPlace
from test_in_place_util import UNICODE, pylistdir
def test_py3_textstr(tmpdir):
""" Assert that `InPlace` works with text strings in Python 3 """
assert pylistdir(tmpdir) == []
p = tmpdir.join("file.txt")
p.write_text(UNICODE, local... | import pytest
from in_place import InPlace
from test_in_place_util import UNICODE, pylistdir
def test_py3_textstr(tmpdir):
""" Assert that `InPlace` works with text strings in Python 3 """
assert pylistdir(tmpdir) == []
p = tmpdir.join("file.txt")
p.write_text(UNICODE, 'utf-8')
with I... | <commit_before>import pytest
from in_place import InPlace
from test_in_place_util import UNICODE, pylistdir
def test_py3_textstr(tmpdir):
""" Assert that `InPlace` works with text strings in Python 3 """
assert pylistdir(tmpdir) == []
p = tmpdir.join("file.txt")
p.write_text(UNICODE, 'utf... |
f5ace7ea8badb2401190e4845fb0216c7a80891e | tests/testall.py | tests/testall.py | #!/usr/bin/env python
import unittest, os, sys
try:
import coverage
coverage.erase()
coverage.start()
except ImportError:
coverage = None
my_dir = os.path.dirname(sys.argv[0])
if not my_dir:
my_dir = os.getcwd()
sys.argv.append('-v')
suite_names = [f[:-3] for f in os.listdir(my_dir)
if f.startswith('test') an... | #!/usr/bin/env python
import unittest, os, sys
try:
import coverage
coverage.erase()
coverage.start()
except ImportError:
coverage = None
my_dir = os.path.dirname(sys.argv[0])
if not my_dir:
my_dir = os.getcwd()
testLoader = unittest.TestLoader()
if len(sys.argv) > 1:
alltests = testLoader.loadTestsFromNames(s... | Allow specifying which unit-tests to run | Allow specifying which unit-tests to run
e.g. 0test ../0release.xml -- testrelease.TestRelease.testBinaryRelease
| Python | lgpl-2.1 | timbertson/0release,0install/0release,0install/0release,gfxmonk/0release | #!/usr/bin/env python
import unittest, os, sys
try:
import coverage
coverage.erase()
coverage.start()
except ImportError:
coverage = None
my_dir = os.path.dirname(sys.argv[0])
if not my_dir:
my_dir = os.getcwd()
sys.argv.append('-v')
suite_names = [f[:-3] for f in os.listdir(my_dir)
if f.startswith('test') an... | #!/usr/bin/env python
import unittest, os, sys
try:
import coverage
coverage.erase()
coverage.start()
except ImportError:
coverage = None
my_dir = os.path.dirname(sys.argv[0])
if not my_dir:
my_dir = os.getcwd()
testLoader = unittest.TestLoader()
if len(sys.argv) > 1:
alltests = testLoader.loadTestsFromNames(s... | <commit_before>#!/usr/bin/env python
import unittest, os, sys
try:
import coverage
coverage.erase()
coverage.start()
except ImportError:
coverage = None
my_dir = os.path.dirname(sys.argv[0])
if not my_dir:
my_dir = os.getcwd()
sys.argv.append('-v')
suite_names = [f[:-3] for f in os.listdir(my_dir)
if f.starts... | #!/usr/bin/env python
import unittest, os, sys
try:
import coverage
coverage.erase()
coverage.start()
except ImportError:
coverage = None
my_dir = os.path.dirname(sys.argv[0])
if not my_dir:
my_dir = os.getcwd()
testLoader = unittest.TestLoader()
if len(sys.argv) > 1:
alltests = testLoader.loadTestsFromNames(s... | #!/usr/bin/env python
import unittest, os, sys
try:
import coverage
coverage.erase()
coverage.start()
except ImportError:
coverage = None
my_dir = os.path.dirname(sys.argv[0])
if not my_dir:
my_dir = os.getcwd()
sys.argv.append('-v')
suite_names = [f[:-3] for f in os.listdir(my_dir)
if f.startswith('test') an... | <commit_before>#!/usr/bin/env python
import unittest, os, sys
try:
import coverage
coverage.erase()
coverage.start()
except ImportError:
coverage = None
my_dir = os.path.dirname(sys.argv[0])
if not my_dir:
my_dir = os.getcwd()
sys.argv.append('-v')
suite_names = [f[:-3] for f in os.listdir(my_dir)
if f.starts... |
d190e4466a28714bf0e04869dc11a940526031b1 | fullcalendar/templatetags/fullcalendar.py | fullcalendar/templatetags/fullcalendar.py | from django import template
from fullcalendar.models import Occurrence
register = template.Library()
@register.inclusion_tag('events/agenda_tag.html')
def show_agenda(*args, **kwargs):
qs = Occurrence.objects.upcoming()
if 'limit' in kwargs:
qs.limit(int(kwargs['limit']))
return {
'occu... | from django import template
from fullcalendar.models import Occurrence
register = template.Library()
@register.inclusion_tag('events/agenda_tag.html')
def show_agenda(*args, **kwargs):
qs = Occurrence.objects.upcoming()
if 'limit' in kwargs:
qs = qs[:int(kwargs['limit'])]
return {
'occu... | Use the right way to limit queries | Use the right way to limit queries
| Python | mit | jonge-democraten/mezzanine-fullcalendar | from django import template
from fullcalendar.models import Occurrence
register = template.Library()
@register.inclusion_tag('events/agenda_tag.html')
def show_agenda(*args, **kwargs):
qs = Occurrence.objects.upcoming()
if 'limit' in kwargs:
qs.limit(int(kwargs['limit']))
return {
'occu... | from django import template
from fullcalendar.models import Occurrence
register = template.Library()
@register.inclusion_tag('events/agenda_tag.html')
def show_agenda(*args, **kwargs):
qs = Occurrence.objects.upcoming()
if 'limit' in kwargs:
qs = qs[:int(kwargs['limit'])]
return {
'occu... | <commit_before>from django import template
from fullcalendar.models import Occurrence
register = template.Library()
@register.inclusion_tag('events/agenda_tag.html')
def show_agenda(*args, **kwargs):
qs = Occurrence.objects.upcoming()
if 'limit' in kwargs:
qs.limit(int(kwargs['limit']))
return ... | from django import template
from fullcalendar.models import Occurrence
register = template.Library()
@register.inclusion_tag('events/agenda_tag.html')
def show_agenda(*args, **kwargs):
qs = Occurrence.objects.upcoming()
if 'limit' in kwargs:
qs = qs[:int(kwargs['limit'])]
return {
'occu... | from django import template
from fullcalendar.models import Occurrence
register = template.Library()
@register.inclusion_tag('events/agenda_tag.html')
def show_agenda(*args, **kwargs):
qs = Occurrence.objects.upcoming()
if 'limit' in kwargs:
qs.limit(int(kwargs['limit']))
return {
'occu... | <commit_before>from django import template
from fullcalendar.models import Occurrence
register = template.Library()
@register.inclusion_tag('events/agenda_tag.html')
def show_agenda(*args, **kwargs):
qs = Occurrence.objects.upcoming()
if 'limit' in kwargs:
qs.limit(int(kwargs['limit']))
return ... |
3a70e339637285355e594f9bec15481eae631a63 | ibmcnx/config/j2ee/RoleBackup.py | ibmcnx/config/j2ee/RoleBackup.py | ######
# Create a backup of J2EE Security Roles
#
# Author: Christoph Stoettner
# Mail: christoph.stoettner@stoeps.de
# Documentation: http://scripting101.stoeps.de
#
# Version: 2.0
# Date: 2014-06-04
#
# License: Apache 2.0
#
#
import sys
import os
import ibmcnx.functions
... | ######
# Create a backup of J2EE Security Roles
#
# Author: Christoph Stoettner
# Mail: christoph.stoettner@stoeps.de
# Documentation: http://scripting101.stoeps.de
#
# Version: 2.0
# Date: 2014-06-04
#
# License: Apache 2.0
#
#
import sys
import os
import ibmcnx.functions
... | Test all scripts on Windows | 10: Test all scripts on Windows
Task-Url: http://github.com/stoeps13/ibmcnx2/issues/issue/10 | Python | apache-2.0 | stoeps13/ibmcnx2,stoeps13/ibmcnx2 | ######
# Create a backup of J2EE Security Roles
#
# Author: Christoph Stoettner
# Mail: christoph.stoettner@stoeps.de
# Documentation: http://scripting101.stoeps.de
#
# Version: 2.0
# Date: 2014-06-04
#
# License: Apache 2.0
#
#
import sys
import os
import ibmcnx.functions
... | ######
# Create a backup of J2EE Security Roles
#
# Author: Christoph Stoettner
# Mail: christoph.stoettner@stoeps.de
# Documentation: http://scripting101.stoeps.de
#
# Version: 2.0
# Date: 2014-06-04
#
# License: Apache 2.0
#
#
import sys
import os
import ibmcnx.functions
... | <commit_before>######
# Create a backup of J2EE Security Roles
#
# Author: Christoph Stoettner
# Mail: christoph.stoettner@stoeps.de
# Documentation: http://scripting101.stoeps.de
#
# Version: 2.0
# Date: 2014-06-04
#
# License: Apache 2.0
#
#
import sys
import os
import ibm... | ######
# Create a backup of J2EE Security Roles
#
# Author: Christoph Stoettner
# Mail: christoph.stoettner@stoeps.de
# Documentation: http://scripting101.stoeps.de
#
# Version: 2.0
# Date: 2014-06-04
#
# License: Apache 2.0
#
#
import sys
import os
import ibmcnx.functions
... | ######
# Create a backup of J2EE Security Roles
#
# Author: Christoph Stoettner
# Mail: christoph.stoettner@stoeps.de
# Documentation: http://scripting101.stoeps.de
#
# Version: 2.0
# Date: 2014-06-04
#
# License: Apache 2.0
#
#
import sys
import os
import ibmcnx.functions
... | <commit_before>######
# Create a backup of J2EE Security Roles
#
# Author: Christoph Stoettner
# Mail: christoph.stoettner@stoeps.de
# Documentation: http://scripting101.stoeps.de
#
# Version: 2.0
# Date: 2014-06-04
#
# License: Apache 2.0
#
#
import sys
import os
import ibm... |
8dcda9a9dd5c7f106d5544bb185fa348157495fb | blimp_boards/accounts/serializers.py | blimp_boards/accounts/serializers.py | from rest_framework import serializers
from ..utils.fields import DomainNameField
from .fields import SignupDomainsField
from .models import Account
class ValidateSignupDomainsSerializer(serializers.Serializer):
"""
Serializer that handles signup domains validation endpoint.
"""
signup_domains = Sign... | from rest_framework import serializers
from ..utils.fields import DomainNameField
from .fields import SignupDomainsField
from .models import Account
class ValidateSignupDomainsSerializer(serializers.Serializer):
"""
Serializer that handles signup domains validation endpoint.
"""
signup_domains = Sign... | Set Account logo_color to be read only | Set Account logo_color to be read only | Python | agpl-3.0 | jessamynsmith/boards-backend,jessamynsmith/boards-backend,GetBlimp/boards-backend | from rest_framework import serializers
from ..utils.fields import DomainNameField
from .fields import SignupDomainsField
from .models import Account
class ValidateSignupDomainsSerializer(serializers.Serializer):
"""
Serializer that handles signup domains validation endpoint.
"""
signup_domains = Sign... | from rest_framework import serializers
from ..utils.fields import DomainNameField
from .fields import SignupDomainsField
from .models import Account
class ValidateSignupDomainsSerializer(serializers.Serializer):
"""
Serializer that handles signup domains validation endpoint.
"""
signup_domains = Sign... | <commit_before>from rest_framework import serializers
from ..utils.fields import DomainNameField
from .fields import SignupDomainsField
from .models import Account
class ValidateSignupDomainsSerializer(serializers.Serializer):
"""
Serializer that handles signup domains validation endpoint.
"""
signup... | from rest_framework import serializers
from ..utils.fields import DomainNameField
from .fields import SignupDomainsField
from .models import Account
class ValidateSignupDomainsSerializer(serializers.Serializer):
"""
Serializer that handles signup domains validation endpoint.
"""
signup_domains = Sign... | from rest_framework import serializers
from ..utils.fields import DomainNameField
from .fields import SignupDomainsField
from .models import Account
class ValidateSignupDomainsSerializer(serializers.Serializer):
"""
Serializer that handles signup domains validation endpoint.
"""
signup_domains = Sign... | <commit_before>from rest_framework import serializers
from ..utils.fields import DomainNameField
from .fields import SignupDomainsField
from .models import Account
class ValidateSignupDomainsSerializer(serializers.Serializer):
"""
Serializer that handles signup domains validation endpoint.
"""
signup... |
243feb2fe194ad00f59c6ff22ac41989fe0978d1 | bots.sample/number-jokes/__init__.py | bots.sample/number-jokes/__init__.py | import random
from botfriend.bot import TextGeneratorBot
class ExampleBot(TextGeneratorBot):
def generate_text(self):
"""Tell a joke about numbers."""
num = random.randint(1,10)
arguments = dict(
num=num,
plus_1=num+1,
plus_3=num+3
)
setu... | import random
from botfriend.bot import TextGeneratorBot
class NumberJokes(TextGeneratorBot):
def generate_text(self):
"""Tell a joke about numbers."""
num = random.randint(1,10)
arguments = dict(
num=num,
plus_1=num+1,
plus_3=num+3
)
set... | Change number-jokes to match the tutorial. | Change number-jokes to match the tutorial.
| Python | mit | leonardr/botfriend | import random
from botfriend.bot import TextGeneratorBot
class ExampleBot(TextGeneratorBot):
def generate_text(self):
"""Tell a joke about numbers."""
num = random.randint(1,10)
arguments = dict(
num=num,
plus_1=num+1,
plus_3=num+3
)
setu... | import random
from botfriend.bot import TextGeneratorBot
class NumberJokes(TextGeneratorBot):
def generate_text(self):
"""Tell a joke about numbers."""
num = random.randint(1,10)
arguments = dict(
num=num,
plus_1=num+1,
plus_3=num+3
)
set... | <commit_before>import random
from botfriend.bot import TextGeneratorBot
class ExampleBot(TextGeneratorBot):
def generate_text(self):
"""Tell a joke about numbers."""
num = random.randint(1,10)
arguments = dict(
num=num,
plus_1=num+1,
plus_3=num+3
... | import random
from botfriend.bot import TextGeneratorBot
class NumberJokes(TextGeneratorBot):
def generate_text(self):
"""Tell a joke about numbers."""
num = random.randint(1,10)
arguments = dict(
num=num,
plus_1=num+1,
plus_3=num+3
)
set... | import random
from botfriend.bot import TextGeneratorBot
class ExampleBot(TextGeneratorBot):
def generate_text(self):
"""Tell a joke about numbers."""
num = random.randint(1,10)
arguments = dict(
num=num,
plus_1=num+1,
plus_3=num+3
)
setu... | <commit_before>import random
from botfriend.bot import TextGeneratorBot
class ExampleBot(TextGeneratorBot):
def generate_text(self):
"""Tell a joke about numbers."""
num = random.randint(1,10)
arguments = dict(
num=num,
plus_1=num+1,
plus_3=num+3
... |
d01adfce91927c57258f1e13ed34e4e600e40048 | pipenv/pew/__main__.py | pipenv/pew/__main__.py | from pipenv.patched import pew
if __name__ == '__main__':
pew.pew.pew()
| from pipenv.patched import pew
import os
import sys
pipenv_root = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
pipenv_vendor = os.sep.join([pipenv_root, 'vendor'])
pipenv_patched = os.sep.join([pipenv_root, 'patched'])
if __name__ == '__main__':
sys.path.insert(0, pipenv_vendor)
sys.path.inser... | Add vendor and patch directories to pew path | Add vendor and patch directories to pew path
- Fixes #1661
| Python | mit | kennethreitz/pipenv | from pipenv.patched import pew
if __name__ == '__main__':
pew.pew.pew()
Add vendor and patch directories to pew path
- Fixes #1661 | from pipenv.patched import pew
import os
import sys
pipenv_root = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
pipenv_vendor = os.sep.join([pipenv_root, 'vendor'])
pipenv_patched = os.sep.join([pipenv_root, 'patched'])
if __name__ == '__main__':
sys.path.insert(0, pipenv_vendor)
sys.path.inser... | <commit_before>from pipenv.patched import pew
if __name__ == '__main__':
pew.pew.pew()
<commit_msg>Add vendor and patch directories to pew path
- Fixes #1661<commit_after> | from pipenv.patched import pew
import os
import sys
pipenv_root = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
pipenv_vendor = os.sep.join([pipenv_root, 'vendor'])
pipenv_patched = os.sep.join([pipenv_root, 'patched'])
if __name__ == '__main__':
sys.path.insert(0, pipenv_vendor)
sys.path.inser... | from pipenv.patched import pew
if __name__ == '__main__':
pew.pew.pew()
Add vendor and patch directories to pew path
- Fixes #1661from pipenv.patched import pew
import os
import sys
pipenv_root = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
pipenv_vendor = os.sep.join([pipenv_root, 'vendor'])
pipe... | <commit_before>from pipenv.patched import pew
if __name__ == '__main__':
pew.pew.pew()
<commit_msg>Add vendor and patch directories to pew path
- Fixes #1661<commit_after>from pipenv.patched import pew
import os
import sys
pipenv_root = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
pipenv_vendor = ... |
4a0d781c64da4a0ad211e5fb211dc317a4e3f4c5 | data_structures/doubly_linked_list.py | data_structures/doubly_linked_list.py | class Node(object):
def __init__(self, val, prev=None, next_=None):
self.val = val
self.prev = prev
self.next = next_
def __repr__(self):
return '{val}'.format(val=self.val)
class DoublLinkedList(object):
def __init__(self, iterable=()):
self._current = None
... | Add structure and methods to double linked list. | Add structure and methods to double linked list.
| Python | mit | sjschmidt44/python_data_structures | Add structure and methods to double linked list. | class Node(object):
def __init__(self, val, prev=None, next_=None):
self.val = val
self.prev = prev
self.next = next_
def __repr__(self):
return '{val}'.format(val=self.val)
class DoublLinkedList(object):
def __init__(self, iterable=()):
self._current = None
... | <commit_before><commit_msg>Add structure and methods to double linked list.<commit_after> | class Node(object):
def __init__(self, val, prev=None, next_=None):
self.val = val
self.prev = prev
self.next = next_
def __repr__(self):
return '{val}'.format(val=self.val)
class DoublLinkedList(object):
def __init__(self, iterable=()):
self._current = None
... | Add structure and methods to double linked list.class Node(object):
def __init__(self, val, prev=None, next_=None):
self.val = val
self.prev = prev
self.next = next_
def __repr__(self):
return '{val}'.format(val=self.val)
class DoublLinkedList(object):
def __init__(self, i... | <commit_before><commit_msg>Add structure and methods to double linked list.<commit_after>class Node(object):
def __init__(self, val, prev=None, next_=None):
self.val = val
self.prev = prev
self.next = next_
def __repr__(self):
return '{val}'.format(val=self.val)
class DoublLin... | |
8a61bd499e9a3cc538d7d83719c6d4231753925b | megalista_dataflow/uploaders/uploaders.py | megalista_dataflow/uploaders/uploaders.py | # Copyright 2022 Google LLC
#
# 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
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, ... | # Copyright 2022 Google LLC
#
# 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
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, ... | Change the notifier to be sent on finish_bundle instead of teardown | Change the notifier to be sent on finish_bundle instead of teardown
Change-Id: I6b80b1d0431b0fe285a5b59e9a33199bf8bd3510
| Python | apache-2.0 | google/megalista,google/megalista | # Copyright 2022 Google LLC
#
# 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
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, ... | # Copyright 2022 Google LLC
#
# 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
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, ... | <commit_before># Copyright 2022 Google LLC
#
# 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
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed ... | # Copyright 2022 Google LLC
#
# 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
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, ... | # Copyright 2022 Google LLC
#
# 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
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, ... | <commit_before># Copyright 2022 Google LLC
#
# 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
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed ... |
0c9582598d172585466f89434035cf3e3cafcf61 | frontends/etiquette_flask/etiquette_flask_launch.py | frontends/etiquette_flask/etiquette_flask_launch.py | import gevent.monkey
gevent.monkey.patch_all()
import logging
handler = logging.StreamHandler()
log_format = '{levelname}:etiquette.{module}.{funcName}: {message}'
handler.setFormatter(logging.Formatter(log_format, style='{'))
logging.getLogger().addHandler(handler)
import etiquette_flask
import gevent.pywsgi
import ... | import gevent.monkey
gevent.monkey.patch_all()
import logging
handler = logging.StreamHandler()
log_format = '{levelname}:etiquette.{module}.{funcName}: {message}'
handler.setFormatter(logging.Formatter(log_format, style='{'))
logging.getLogger().addHandler(handler)
import etiquette_flask
import gevent.pywsgi
import ... | Add arg --https even for non-443. | Add arg --https even for non-443.
| Python | bsd-3-clause | voussoir/etiquette,voussoir/etiquette,voussoir/etiquette | import gevent.monkey
gevent.monkey.patch_all()
import logging
handler = logging.StreamHandler()
log_format = '{levelname}:etiquette.{module}.{funcName}: {message}'
handler.setFormatter(logging.Formatter(log_format, style='{'))
logging.getLogger().addHandler(handler)
import etiquette_flask
import gevent.pywsgi
import ... | import gevent.monkey
gevent.monkey.patch_all()
import logging
handler = logging.StreamHandler()
log_format = '{levelname}:etiquette.{module}.{funcName}: {message}'
handler.setFormatter(logging.Formatter(log_format, style='{'))
logging.getLogger().addHandler(handler)
import etiquette_flask
import gevent.pywsgi
import ... | <commit_before>import gevent.monkey
gevent.monkey.patch_all()
import logging
handler = logging.StreamHandler()
log_format = '{levelname}:etiquette.{module}.{funcName}: {message}'
handler.setFormatter(logging.Formatter(log_format, style='{'))
logging.getLogger().addHandler(handler)
import etiquette_flask
import gevent... | import gevent.monkey
gevent.monkey.patch_all()
import logging
handler = logging.StreamHandler()
log_format = '{levelname}:etiquette.{module}.{funcName}: {message}'
handler.setFormatter(logging.Formatter(log_format, style='{'))
logging.getLogger().addHandler(handler)
import etiquette_flask
import gevent.pywsgi
import ... | import gevent.monkey
gevent.monkey.patch_all()
import logging
handler = logging.StreamHandler()
log_format = '{levelname}:etiquette.{module}.{funcName}: {message}'
handler.setFormatter(logging.Formatter(log_format, style='{'))
logging.getLogger().addHandler(handler)
import etiquette_flask
import gevent.pywsgi
import ... | <commit_before>import gevent.monkey
gevent.monkey.patch_all()
import logging
handler = logging.StreamHandler()
log_format = '{levelname}:etiquette.{module}.{funcName}: {message}'
handler.setFormatter(logging.Formatter(log_format, style='{'))
logging.getLogger().addHandler(handler)
import etiquette_flask
import gevent... |
ffb261023de0a2b918a0245c05f680e0c644d7f1 | caribou/antler/antler_settings.py | caribou/antler/antler_settings.py | from caribou.settings.setting_types import *
from caribou.i18n import _
AntlerSettings = SettingsTopGroup(
_("Antler Preferences"), "/org/gnome/antler/", "org.gnome.antler",
[SettingsGroup("antler", _("Antler"), [
SettingsGroup("appearance", _("Appearance"), [
StringSett... | from caribou.settings.setting_types import *
from caribou.i18n import _
AntlerSettings = SettingsTopGroup(
_("Antler Preferences"), "/org/gnome/antler/", "org.gnome.antler",
[SettingsGroup("antler", _("Antler"), [
SettingsGroup("appearance", _("Appearance"), [
StringSett... | Use custom theme by default. | antler: Use custom theme by default.
| Python | lgpl-2.1 | GNOME/caribou,GNOME/caribou,GNOME/caribou | from caribou.settings.setting_types import *
from caribou.i18n import _
AntlerSettings = SettingsTopGroup(
_("Antler Preferences"), "/org/gnome/antler/", "org.gnome.antler",
[SettingsGroup("antler", _("Antler"), [
SettingsGroup("appearance", _("Appearance"), [
StringSett... | from caribou.settings.setting_types import *
from caribou.i18n import _
AntlerSettings = SettingsTopGroup(
_("Antler Preferences"), "/org/gnome/antler/", "org.gnome.antler",
[SettingsGroup("antler", _("Antler"), [
SettingsGroup("appearance", _("Appearance"), [
StringSett... | <commit_before>from caribou.settings.setting_types import *
from caribou.i18n import _
AntlerSettings = SettingsTopGroup(
_("Antler Preferences"), "/org/gnome/antler/", "org.gnome.antler",
[SettingsGroup("antler", _("Antler"), [
SettingsGroup("appearance", _("Appearance"), [
... | from caribou.settings.setting_types import *
from caribou.i18n import _
AntlerSettings = SettingsTopGroup(
_("Antler Preferences"), "/org/gnome/antler/", "org.gnome.antler",
[SettingsGroup("antler", _("Antler"), [
SettingsGroup("appearance", _("Appearance"), [
StringSett... | from caribou.settings.setting_types import *
from caribou.i18n import _
AntlerSettings = SettingsTopGroup(
_("Antler Preferences"), "/org/gnome/antler/", "org.gnome.antler",
[SettingsGroup("antler", _("Antler"), [
SettingsGroup("appearance", _("Appearance"), [
StringSett... | <commit_before>from caribou.settings.setting_types import *
from caribou.i18n import _
AntlerSettings = SettingsTopGroup(
_("Antler Preferences"), "/org/gnome/antler/", "org.gnome.antler",
[SettingsGroup("antler", _("Antler"), [
SettingsGroup("appearance", _("Appearance"), [
... |
d75d26bc51ed35eec362660e29bda58a91cd418b | pebble_tool/util/npm.py | pebble_tool/util/npm.py | # encoding: utf-8
from __future__ import absolute_import, print_function, division
import os
import subprocess
from pebble_tool.exceptions import ToolError
from pebble_tool.util.versions import version_to_key
def check_npm():
try:
npm_version = subprocess.check_output(["npm", "--version"]).strip()
... | # encoding: utf-8
from __future__ import absolute_import, print_function, division
import os
import subprocess
from pebble_tool.exceptions import ToolError
from pebble_tool.util.versions import version_to_key
def check_npm():
try:
npm_version = subprocess.check_output(["npm", "--version"]).strip()
... | Add check for isdir to handle non-directories | Add check for isdir to handle non-directories
| Python | mit | pebble/pebble-tool,pebble/pebble-tool,gregoiresage/pebble-tool,pebble/pebble-tool,gregoiresage/pebble-tool,gregoiresage/pebble-tool,gregoiresage/pebble-tool,pebble/pebble-tool | # encoding: utf-8
from __future__ import absolute_import, print_function, division
import os
import subprocess
from pebble_tool.exceptions import ToolError
from pebble_tool.util.versions import version_to_key
def check_npm():
try:
npm_version = subprocess.check_output(["npm", "--version"]).strip()
... | # encoding: utf-8
from __future__ import absolute_import, print_function, division
import os
import subprocess
from pebble_tool.exceptions import ToolError
from pebble_tool.util.versions import version_to_key
def check_npm():
try:
npm_version = subprocess.check_output(["npm", "--version"]).strip()
... | <commit_before># encoding: utf-8
from __future__ import absolute_import, print_function, division
import os
import subprocess
from pebble_tool.exceptions import ToolError
from pebble_tool.util.versions import version_to_key
def check_npm():
try:
npm_version = subprocess.check_output(["npm", "--version"]... | # encoding: utf-8
from __future__ import absolute_import, print_function, division
import os
import subprocess
from pebble_tool.exceptions import ToolError
from pebble_tool.util.versions import version_to_key
def check_npm():
try:
npm_version = subprocess.check_output(["npm", "--version"]).strip()
... | # encoding: utf-8
from __future__ import absolute_import, print_function, division
import os
import subprocess
from pebble_tool.exceptions import ToolError
from pebble_tool.util.versions import version_to_key
def check_npm():
try:
npm_version = subprocess.check_output(["npm", "--version"]).strip()
... | <commit_before># encoding: utf-8
from __future__ import absolute_import, print_function, division
import os
import subprocess
from pebble_tool.exceptions import ToolError
from pebble_tool.util.versions import version_to_key
def check_npm():
try:
npm_version = subprocess.check_output(["npm", "--version"]... |
52716c4dc7d95820d2640ba7c9e75fb00f786e85 | lib/ansible/utils/module_docs_fragments/validate.py | lib/ansible/utils/module_docs_fragments/validate.py | # Copyright (c) 2015 Ansible, Inc
#
# This file is part of Ansible
#
# Ansible is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# Ansi... | # Copyright (c) 2015 Ansible, Inc
#
# This file is part of Ansible
#
# Ansible is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# Ansi... | Remove mention of 'apache example' | Remove mention of 'apache example'
Removed explicit mention of 'apache' | Python | mit | thaim/ansible,thaim/ansible | # Copyright (c) 2015 Ansible, Inc
#
# This file is part of Ansible
#
# Ansible is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# Ansi... | # Copyright (c) 2015 Ansible, Inc
#
# This file is part of Ansible
#
# Ansible is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# Ansi... | <commit_before># Copyright (c) 2015 Ansible, Inc
#
# This file is part of Ansible
#
# Ansible is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later ve... | # Copyright (c) 2015 Ansible, Inc
#
# This file is part of Ansible
#
# Ansible is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# Ansi... | # Copyright (c) 2015 Ansible, Inc
#
# This file is part of Ansible
#
# Ansible is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# Ansi... | <commit_before># Copyright (c) 2015 Ansible, Inc
#
# This file is part of Ansible
#
# Ansible is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later ve... |
bebde48483e1397a2f45a81c72cc3c79ee7bd150 | djcelery/contrib/test_runner.py | djcelery/contrib/test_runner.py | from __future__ import absolute_import
from django.conf import settings
from django.test.simple import DjangoTestSuiteRunner
USAGE = """\
Custom test runner to allow testing of celery delayed tasks.
"""
class CeleryTestSuiteRunner(DjangoTestSuiteRunner):
"""Django test runner allowing testing of celery delayed ... | from __future__ import absolute_import
from django.conf import settings
from django.test.simple import DjangoTestSuiteRunner
USAGE = """\
Custom test runner to allow testing of celery delayed tasks.
"""
class CeleryTestSuiteRunner(DjangoTestSuiteRunner):
"""Django test runner allowing testing of celery delayed ... | Correct documentation for path to load test runner | Correct documentation for path to load test runner | Python | bsd-3-clause | georgewhewell/django-celery,planorama/django-celery,axiom-data-science/django-celery,axiom-data-science/django-celery,ask/django-celery,kanemra/django-celery,CloudNcodeInc/django-celery,celery/django-celery,georgewhewell/django-celery,kanemra/django-celery,tkanemoto/django-celery,tkanemoto/django-celery,iris-edu-int/dj... | from __future__ import absolute_import
from django.conf import settings
from django.test.simple import DjangoTestSuiteRunner
USAGE = """\
Custom test runner to allow testing of celery delayed tasks.
"""
class CeleryTestSuiteRunner(DjangoTestSuiteRunner):
"""Django test runner allowing testing of celery delayed ... | from __future__ import absolute_import
from django.conf import settings
from django.test.simple import DjangoTestSuiteRunner
USAGE = """\
Custom test runner to allow testing of celery delayed tasks.
"""
class CeleryTestSuiteRunner(DjangoTestSuiteRunner):
"""Django test runner allowing testing of celery delayed ... | <commit_before>from __future__ import absolute_import
from django.conf import settings
from django.test.simple import DjangoTestSuiteRunner
USAGE = """\
Custom test runner to allow testing of celery delayed tasks.
"""
class CeleryTestSuiteRunner(DjangoTestSuiteRunner):
"""Django test runner allowing testing of ... | from __future__ import absolute_import
from django.conf import settings
from django.test.simple import DjangoTestSuiteRunner
USAGE = """\
Custom test runner to allow testing of celery delayed tasks.
"""
class CeleryTestSuiteRunner(DjangoTestSuiteRunner):
"""Django test runner allowing testing of celery delayed ... | from __future__ import absolute_import
from django.conf import settings
from django.test.simple import DjangoTestSuiteRunner
USAGE = """\
Custom test runner to allow testing of celery delayed tasks.
"""
class CeleryTestSuiteRunner(DjangoTestSuiteRunner):
"""Django test runner allowing testing of celery delayed ... | <commit_before>from __future__ import absolute_import
from django.conf import settings
from django.test.simple import DjangoTestSuiteRunner
USAGE = """\
Custom test runner to allow testing of celery delayed tasks.
"""
class CeleryTestSuiteRunner(DjangoTestSuiteRunner):
"""Django test runner allowing testing of ... |
003d3921bb6c801c5a2efdede20ed70ee07edf3d | 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 delete_backup_storage_quota_from_tenant(apps, schema_editor):
tenant_con... | # -*- 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... | Replace quota deletion with cleanup | Replace quota deletion with cleanup [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 delete_backup_storage_quota_from_tenant(apps, schema_editor):
tenant_con... | # -*- 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 delete_backup_storage_quota_from_tenant(apps, schema_editor):... | # -*- 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.contrib.contenttypes.models import ContentType
from django.db import migrations
from nodeconductor.quotas import models as quotas_models
from .. import models
def delete_backup_storage_quota_from_tenant(apps, schema_editor):
tenant_con... | <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 delete_backup_storage_quota_from_tenant(apps, schema_editor):... |
878975b1b82d22bba0ac23cf162eb68b46e76f0a | wagtail/wagtailembeds/finders/__init__.py | wagtail/wagtailembeds/finders/__init__.py | from django.utils.module_loading import import_string
from django.conf import settings
from wagtail.wagtailembeds.finders.oembed import oembed
from wagtail.wagtailembeds.finders.embedly import embedly
MOVED_FINDERS = {
'wagtail.wagtailembeds.embeds.embedly': 'wagtail.wagtailembeds.finders.embedly.embedly',
'... | from django.utils.module_loading import import_string
from django.conf import settings
MOVED_FINDERS = {
'wagtail.wagtailembeds.embeds.embedly': 'wagtail.wagtailembeds.finders.embedly.embedly',
'wagtail.wagtailembeds.embeds.oembed': 'wagtail.wagtailembeds.finders.oembed.oembed',
}
def get_default_finder():
... | Refactor get_default_finder to work without importing finders | Refactor get_default_finder to work without importing finders
| Python | bsd-3-clause | takeflight/wagtail,mikedingjan/wagtail,JoshBarr/wagtail,gasman/wagtail,chrxr/wagtail,FlipperPA/wagtail,JoshBarr/wagtail,inonit/wagtail,wagtail/wagtail,nilnvoid/wagtail,mikedingjan/wagtail,gasman/wagtail,timorieber/wagtail,torchbox/wagtail,jnns/wagtail,hamsterbacke23/wagtail,nealtodd/wagtail,iansprice/wagtail,timorieber... | from django.utils.module_loading import import_string
from django.conf import settings
from wagtail.wagtailembeds.finders.oembed import oembed
from wagtail.wagtailembeds.finders.embedly import embedly
MOVED_FINDERS = {
'wagtail.wagtailembeds.embeds.embedly': 'wagtail.wagtailembeds.finders.embedly.embedly',
'... | from django.utils.module_loading import import_string
from django.conf import settings
MOVED_FINDERS = {
'wagtail.wagtailembeds.embeds.embedly': 'wagtail.wagtailembeds.finders.embedly.embedly',
'wagtail.wagtailembeds.embeds.oembed': 'wagtail.wagtailembeds.finders.oembed.oembed',
}
def get_default_finder():
... | <commit_before>from django.utils.module_loading import import_string
from django.conf import settings
from wagtail.wagtailembeds.finders.oembed import oembed
from wagtail.wagtailembeds.finders.embedly import embedly
MOVED_FINDERS = {
'wagtail.wagtailembeds.embeds.embedly': 'wagtail.wagtailembeds.finders.embedly.... | from django.utils.module_loading import import_string
from django.conf import settings
MOVED_FINDERS = {
'wagtail.wagtailembeds.embeds.embedly': 'wagtail.wagtailembeds.finders.embedly.embedly',
'wagtail.wagtailembeds.embeds.oembed': 'wagtail.wagtailembeds.finders.oembed.oembed',
}
def get_default_finder():
... | from django.utils.module_loading import import_string
from django.conf import settings
from wagtail.wagtailembeds.finders.oembed import oembed
from wagtail.wagtailembeds.finders.embedly import embedly
MOVED_FINDERS = {
'wagtail.wagtailembeds.embeds.embedly': 'wagtail.wagtailembeds.finders.embedly.embedly',
'... | <commit_before>from django.utils.module_loading import import_string
from django.conf import settings
from wagtail.wagtailembeds.finders.oembed import oembed
from wagtail.wagtailembeds.finders.embedly import embedly
MOVED_FINDERS = {
'wagtail.wagtailembeds.embeds.embedly': 'wagtail.wagtailembeds.finders.embedly.... |
a8244c25c5cc7e2279723538daa9889a1d327cae | extensions/ExtGameController.py | extensions/ExtGameController.py | from python_cowbull_game.GameController import GameController
from python_cowbull_game.GameMode import GameMode
class ExtGameController(GameController):
additional_modes = [
GameMode(mode="SuperTough", priority=6, digits=10, digit_type=0),
GameMode(mode="hexTough", priority=5, digits=3, guesses_al... | from python_cowbull_game.GameController import GameController
from python_cowbull_game.GameMode import GameMode
class ExtGameController(GameController):
additional_modes = [
# GameMode(mode="SuperTough", priority=6, digits=10, digit_type=0),
# GameMode(mode="hexTough", priority=5, digits=3, guesses_... | Remove new modes for testing. | Remove new modes for testing.
| Python | apache-2.0 | dsandersAzure/python_cowbull_server,dsandersAzure/python_cowbull_server | from python_cowbull_game.GameController import GameController
from python_cowbull_game.GameMode import GameMode
class ExtGameController(GameController):
additional_modes = [
GameMode(mode="SuperTough", priority=6, digits=10, digit_type=0),
GameMode(mode="hexTough", priority=5, digits=3, guesses_al... | from python_cowbull_game.GameController import GameController
from python_cowbull_game.GameMode import GameMode
class ExtGameController(GameController):
additional_modes = [
# GameMode(mode="SuperTough", priority=6, digits=10, digit_type=0),
# GameMode(mode="hexTough", priority=5, digits=3, guesses_... | <commit_before>from python_cowbull_game.GameController import GameController
from python_cowbull_game.GameMode import GameMode
class ExtGameController(GameController):
additional_modes = [
GameMode(mode="SuperTough", priority=6, digits=10, digit_type=0),
GameMode(mode="hexTough", priority=5, digit... | from python_cowbull_game.GameController import GameController
from python_cowbull_game.GameMode import GameMode
class ExtGameController(GameController):
additional_modes = [
# GameMode(mode="SuperTough", priority=6, digits=10, digit_type=0),
# GameMode(mode="hexTough", priority=5, digits=3, guesses_... | from python_cowbull_game.GameController import GameController
from python_cowbull_game.GameMode import GameMode
class ExtGameController(GameController):
additional_modes = [
GameMode(mode="SuperTough", priority=6, digits=10, digit_type=0),
GameMode(mode="hexTough", priority=5, digits=3, guesses_al... | <commit_before>from python_cowbull_game.GameController import GameController
from python_cowbull_game.GameMode import GameMode
class ExtGameController(GameController):
additional_modes = [
GameMode(mode="SuperTough", priority=6, digits=10, digit_type=0),
GameMode(mode="hexTough", priority=5, digit... |
b678d2da0845ae7f567eb6c4cd55471974d5b5e1 | apps/storybase_user/models.py | apps/storybase_user/models.py | from django.contrib.auth.models import User
from django.db import models
from uuidfield.fields import UUIDField
from storybase.fields import ShortTextField
class Organization(models.Model):
""" An organization or a community group that users and stories can be associated with. """
organization_id = UUIDField(a... | from django.contrib.auth.models import User
from django.db import models
from uuidfield.fields import UUIDField
from storybase.fields import ShortTextField
class Organization(models.Model):
""" An organization or a community group that users and stories can be associated with. """
organization_id = UUIDField(a... | Use correct named view for organization detail view | Use correct named view for organization detail view
| Python | mit | denverfoundation/storybase,denverfoundation/storybase,denverfoundation/storybase,denverfoundation/storybase | from django.contrib.auth.models import User
from django.db import models
from uuidfield.fields import UUIDField
from storybase.fields import ShortTextField
class Organization(models.Model):
""" An organization or a community group that users and stories can be associated with. """
organization_id = UUIDField(a... | from django.contrib.auth.models import User
from django.db import models
from uuidfield.fields import UUIDField
from storybase.fields import ShortTextField
class Organization(models.Model):
""" An organization or a community group that users and stories can be associated with. """
organization_id = UUIDField(a... | <commit_before>from django.contrib.auth.models import User
from django.db import models
from uuidfield.fields import UUIDField
from storybase.fields import ShortTextField
class Organization(models.Model):
""" An organization or a community group that users and stories can be associated with. """
organization_i... | from django.contrib.auth.models import User
from django.db import models
from uuidfield.fields import UUIDField
from storybase.fields import ShortTextField
class Organization(models.Model):
""" An organization or a community group that users and stories can be associated with. """
organization_id = UUIDField(a... | from django.contrib.auth.models import User
from django.db import models
from uuidfield.fields import UUIDField
from storybase.fields import ShortTextField
class Organization(models.Model):
""" An organization or a community group that users and stories can be associated with. """
organization_id = UUIDField(a... | <commit_before>from django.contrib.auth.models import User
from django.db import models
from uuidfield.fields import UUIDField
from storybase.fields import ShortTextField
class Organization(models.Model):
""" An organization or a community group that users and stories can be associated with. """
organization_i... |
c09f346f7a2be5bdfd5dca8821ab260494a652af | routines/migrate-all.py | routines/migrate-all.py | from pmxbot import logging
from pmxbot import util
from pmxbot import rss
from pmxbot import storage
storage.migrate_all('sqlite:pmxbot.sqlite', 'mongodb://localhost')
| import importlib
import pmxbot.storage
def run():
# load the storage classes so the migration routine will find them.
for mod in ('pmxbot.logging', 'pmxbot.karma', 'pmxbot.quotes',
'pmxbot.rss'):
importlib.import_module(mod)
pmxbot.storage.migrate_all('sqlite:pmxbot.sqlite', 'mongodb://localhost')
if __name_... | Update migration script so it only runs if executed as a script. Also updated module references. | Update migration script so it only runs if executed as a script. Also updated module references.
| Python | bsd-3-clause | jamwt/diesel-pmxbot,jamwt/diesel-pmxbot | from pmxbot import logging
from pmxbot import util
from pmxbot import rss
from pmxbot import storage
storage.migrate_all('sqlite:pmxbot.sqlite', 'mongodb://localhost')
Update migration script so it only runs if executed as a script. Also updated module references. | import importlib
import pmxbot.storage
def run():
# load the storage classes so the migration routine will find them.
for mod in ('pmxbot.logging', 'pmxbot.karma', 'pmxbot.quotes',
'pmxbot.rss'):
importlib.import_module(mod)
pmxbot.storage.migrate_all('sqlite:pmxbot.sqlite', 'mongodb://localhost')
if __name_... | <commit_before>from pmxbot import logging
from pmxbot import util
from pmxbot import rss
from pmxbot import storage
storage.migrate_all('sqlite:pmxbot.sqlite', 'mongodb://localhost')
<commit_msg>Update migration script so it only runs if executed as a script. Also updated module references.<commit_after> | import importlib
import pmxbot.storage
def run():
# load the storage classes so the migration routine will find them.
for mod in ('pmxbot.logging', 'pmxbot.karma', 'pmxbot.quotes',
'pmxbot.rss'):
importlib.import_module(mod)
pmxbot.storage.migrate_all('sqlite:pmxbot.sqlite', 'mongodb://localhost')
if __name_... | from pmxbot import logging
from pmxbot import util
from pmxbot import rss
from pmxbot import storage
storage.migrate_all('sqlite:pmxbot.sqlite', 'mongodb://localhost')
Update migration script so it only runs if executed as a script. Also updated module references.import importlib
import pmxbot.storage
def run():
# l... | <commit_before>from pmxbot import logging
from pmxbot import util
from pmxbot import rss
from pmxbot import storage
storage.migrate_all('sqlite:pmxbot.sqlite', 'mongodb://localhost')
<commit_msg>Update migration script so it only runs if executed as a script. Also updated module references.<commit_after>import importli... |
793baa838b7bc7bfed3eb74a69c297645b4c5da6 | app/passthrough/views.py | app/passthrough/views.py | import boto3
import botocore
from flask import (
abort,
current_app,
flash,
make_response,
redirect,
request,
Response,
url_for,
)
from flask_login import current_user
from . import passthrough_bp
@passthrough_bp.route('/<path:path>')
def passthrough(path):
if not current_user.is_a... | import boto3
import botocore
from flask import (
abort,
current_app,
flash,
make_response,
redirect,
request,
Response,
url_for,
)
from flask_login import current_user
from . import passthrough_bp
@passthrough_bp.route('/<path:path>')
def passthrough(path):
if not current_user.is_a... | Handle the case of an empty path | Handle the case of an empty path
This will deal with the root domain request going to default page. | Python | mit | iandees/bucket-protection,iandees/bucket-protection | import boto3
import botocore
from flask import (
abort,
current_app,
flash,
make_response,
redirect,
request,
Response,
url_for,
)
from flask_login import current_user
from . import passthrough_bp
@passthrough_bp.route('/<path:path>')
def passthrough(path):
if not current_user.is_a... | import boto3
import botocore
from flask import (
abort,
current_app,
flash,
make_response,
redirect,
request,
Response,
url_for,
)
from flask_login import current_user
from . import passthrough_bp
@passthrough_bp.route('/<path:path>')
def passthrough(path):
if not current_user.is_a... | <commit_before>import boto3
import botocore
from flask import (
abort,
current_app,
flash,
make_response,
redirect,
request,
Response,
url_for,
)
from flask_login import current_user
from . import passthrough_bp
@passthrough_bp.route('/<path:path>')
def passthrough(path):
if not cu... | import boto3
import botocore
from flask import (
abort,
current_app,
flash,
make_response,
redirect,
request,
Response,
url_for,
)
from flask_login import current_user
from . import passthrough_bp
@passthrough_bp.route('/<path:path>')
def passthrough(path):
if not current_user.is_a... | import boto3
import botocore
from flask import (
abort,
current_app,
flash,
make_response,
redirect,
request,
Response,
url_for,
)
from flask_login import current_user
from . import passthrough_bp
@passthrough_bp.route('/<path:path>')
def passthrough(path):
if not current_user.is_a... | <commit_before>import boto3
import botocore
from flask import (
abort,
current_app,
flash,
make_response,
redirect,
request,
Response,
url_for,
)
from flask_login import current_user
from . import passthrough_bp
@passthrough_bp.route('/<path:path>')
def passthrough(path):
if not cu... |
867195ef9331ec9740efbd6d1dc35c501b373437 | recipes/kaleido-core/run_test.py | recipes/kaleido-core/run_test.py | from subprocess import Popen, PIPE
import json
import platform
# Remove "sys.exit" after feedstock creation when running
# on linux-anvil-cos7-x86_64 image
if platform.system() == "Linux":
import sys
sys.exit(0)
if platform.system() == "Windows":
ext = ".cmd"
else:
ext = ""
p = Popen(
['kaleido' ... | from subprocess import Popen, PIPE
import json
import platform
# Remove "sys.exit" after feedstock creation when running
# on linux-anvil-cos7-x86_64 image
if platform.system() == "Linux":
import sys
sys.exit(0)
if platform.system() == "Windows":
ext = ".cmd"
else:
ext = ""
p = Popen(
['kaleido' ... | Fix test string (Confirmed that incorrect string fails on CI) | Fix test string (Confirmed that incorrect string fails on CI)
| Python | bsd-3-clause | ReimarBauer/staged-recipes,stuertz/staged-recipes,igortg/staged-recipes,conda-forge/staged-recipes,stuertz/staged-recipes,kwilcox/staged-recipes,scopatz/staged-recipes,mariusvniekerk/staged-recipes,ocefpaf/staged-recipes,igortg/staged-recipes,johanneskoester/staged-recipes,conda-forge/staged-recipes,kwilcox/staged-reci... | from subprocess import Popen, PIPE
import json
import platform
# Remove "sys.exit" after feedstock creation when running
# on linux-anvil-cos7-x86_64 image
if platform.system() == "Linux":
import sys
sys.exit(0)
if platform.system() == "Windows":
ext = ".cmd"
else:
ext = ""
p = Popen(
['kaleido' ... | from subprocess import Popen, PIPE
import json
import platform
# Remove "sys.exit" after feedstock creation when running
# on linux-anvil-cos7-x86_64 image
if platform.system() == "Linux":
import sys
sys.exit(0)
if platform.system() == "Windows":
ext = ".cmd"
else:
ext = ""
p = Popen(
['kaleido' ... | <commit_before>from subprocess import Popen, PIPE
import json
import platform
# Remove "sys.exit" after feedstock creation when running
# on linux-anvil-cos7-x86_64 image
if platform.system() == "Linux":
import sys
sys.exit(0)
if platform.system() == "Windows":
ext = ".cmd"
else:
ext = ""
p = Popen(
... | from subprocess import Popen, PIPE
import json
import platform
# Remove "sys.exit" after feedstock creation when running
# on linux-anvil-cos7-x86_64 image
if platform.system() == "Linux":
import sys
sys.exit(0)
if platform.system() == "Windows":
ext = ".cmd"
else:
ext = ""
p = Popen(
['kaleido' ... | from subprocess import Popen, PIPE
import json
import platform
# Remove "sys.exit" after feedstock creation when running
# on linux-anvil-cos7-x86_64 image
if platform.system() == "Linux":
import sys
sys.exit(0)
if platform.system() == "Windows":
ext = ".cmd"
else:
ext = ""
p = Popen(
['kaleido' ... | <commit_before>from subprocess import Popen, PIPE
import json
import platform
# Remove "sys.exit" after feedstock creation when running
# on linux-anvil-cos7-x86_64 image
if platform.system() == "Linux":
import sys
sys.exit(0)
if platform.system() == "Windows":
ext = ".cmd"
else:
ext = ""
p = Popen(
... |
3daa15b0ccb3fc4891daf55724cbeaa705f923e5 | scripts/clio_daemon.py | scripts/clio_daemon.py |
import logging
import simpledaemon
class clio_daemon(simpledaemon.Daemon):
default_conf = 'clio_daemon.conf'
section = 'clio'
def run(self):
import eventlet
from clio.store import app
logger = logging.getLogger()
if logger.handlers:
[app.logger.addHandler(h) f... |
import simpledaemon
class clio_daemon(simpledaemon.Daemon):
default_conf = 'clio_daemon.conf'
section = 'clio'
def run(self):
import eventlet
from clio.store import app
eventlet.serve(eventlet.listen((app.config['HOST'], app.config['PORT']), backlog=2048), app)
if __name__ == '__... | Revert "output flask logging into simpledaemon's log file." | Revert "output flask logging into simpledaemon's log file."
This is completely superfluous - logging does this already
automatically.
This reverts commit 18091efef351ecddb1d29ee7d01d0a7fb567a7b7.
| Python | apache-2.0 | geodelic/clio,geodelic/clio |
import logging
import simpledaemon
class clio_daemon(simpledaemon.Daemon):
default_conf = 'clio_daemon.conf'
section = 'clio'
def run(self):
import eventlet
from clio.store import app
logger = logging.getLogger()
if logger.handlers:
[app.logger.addHandler(h) f... |
import simpledaemon
class clio_daemon(simpledaemon.Daemon):
default_conf = 'clio_daemon.conf'
section = 'clio'
def run(self):
import eventlet
from clio.store import app
eventlet.serve(eventlet.listen((app.config['HOST'], app.config['PORT']), backlog=2048), app)
if __name__ == '__... | <commit_before>
import logging
import simpledaemon
class clio_daemon(simpledaemon.Daemon):
default_conf = 'clio_daemon.conf'
section = 'clio'
def run(self):
import eventlet
from clio.store import app
logger = logging.getLogger()
if logger.handlers:
[app.logger.... |
import simpledaemon
class clio_daemon(simpledaemon.Daemon):
default_conf = 'clio_daemon.conf'
section = 'clio'
def run(self):
import eventlet
from clio.store import app
eventlet.serve(eventlet.listen((app.config['HOST'], app.config['PORT']), backlog=2048), app)
if __name__ == '__... |
import logging
import simpledaemon
class clio_daemon(simpledaemon.Daemon):
default_conf = 'clio_daemon.conf'
section = 'clio'
def run(self):
import eventlet
from clio.store import app
logger = logging.getLogger()
if logger.handlers:
[app.logger.addHandler(h) f... | <commit_before>
import logging
import simpledaemon
class clio_daemon(simpledaemon.Daemon):
default_conf = 'clio_daemon.conf'
section = 'clio'
def run(self):
import eventlet
from clio.store import app
logger = logging.getLogger()
if logger.handlers:
[app.logger.... |
0d6805bf6dce4b652f1b4f4556696c7521820790 | feder/users/autocomplete_light_registry.py | feder/users/autocomplete_light_registry.py | import autocomplete_light
from models import User
class UserAutocomplete(autocomplete_light.AutocompleteModelBase):
search_fields = ['username']
def choices_for_request(self, *args, **kwargs):
qs = super(UserAutocomplete, self).choices_for_request(*args, **kwargs)
return qs.only('username')
a... | import autocomplete_light
from .models import User
class UserAutocomplete(autocomplete_light.AutocompleteModelBase):
search_fields = ['username']
def choices_for_request(self, *args, **kwargs):
qs = super(UserAutocomplete, self).choices_for_request(*args, **kwargs)
return qs.only('username')
... | Fix typo in users autocomplete | Fix typo in users autocomplete
| Python | mit | watchdogpolska/feder,watchdogpolska/feder,watchdogpolska/feder,watchdogpolska/feder | import autocomplete_light
from models import User
class UserAutocomplete(autocomplete_light.AutocompleteModelBase):
search_fields = ['username']
def choices_for_request(self, *args, **kwargs):
qs = super(UserAutocomplete, self).choices_for_request(*args, **kwargs)
return qs.only('username')
a... | import autocomplete_light
from .models import User
class UserAutocomplete(autocomplete_light.AutocompleteModelBase):
search_fields = ['username']
def choices_for_request(self, *args, **kwargs):
qs = super(UserAutocomplete, self).choices_for_request(*args, **kwargs)
return qs.only('username')
... | <commit_before>import autocomplete_light
from models import User
class UserAutocomplete(autocomplete_light.AutocompleteModelBase):
search_fields = ['username']
def choices_for_request(self, *args, **kwargs):
qs = super(UserAutocomplete, self).choices_for_request(*args, **kwargs)
return qs.onl... | import autocomplete_light
from .models import User
class UserAutocomplete(autocomplete_light.AutocompleteModelBase):
search_fields = ['username']
def choices_for_request(self, *args, **kwargs):
qs = super(UserAutocomplete, self).choices_for_request(*args, **kwargs)
return qs.only('username')
... | import autocomplete_light
from models import User
class UserAutocomplete(autocomplete_light.AutocompleteModelBase):
search_fields = ['username']
def choices_for_request(self, *args, **kwargs):
qs = super(UserAutocomplete, self).choices_for_request(*args, **kwargs)
return qs.only('username')
a... | <commit_before>import autocomplete_light
from models import User
class UserAutocomplete(autocomplete_light.AutocompleteModelBase):
search_fields = ['username']
def choices_for_request(self, *args, **kwargs):
qs = super(UserAutocomplete, self).choices_for_request(*args, **kwargs)
return qs.onl... |
d19f054cdc68d0060731d6c742886f94ac41f3ab | diceclient.py | diceclient.py | #!/usr/bin/env python
import sys
from twisted.internet import reactor, defer
from twisted.internet.protocol import ClientCreator
from twisted.protocols import amp
from twisted.python import usage
from diceserver import RollDice, port
class Options(usage.Options):
optParameters = [
["host", "h",... | #!/usr/bin/env python
import sys
from twisted.internet import reactor, defer
from twisted.internet.protocol import ClientCreator
from twisted.protocols import amp
from twisted.python import usage
from diceserver import RollDice, port
class Options(usage.Options):
optParameters = [
["host", "h",... | Make done a top-level function rather than a nested one. | Make done a top-level function rather than a nested one.
| Python | mit | dripton/ampchat | #!/usr/bin/env python
import sys
from twisted.internet import reactor, defer
from twisted.internet.protocol import ClientCreator
from twisted.protocols import amp
from twisted.python import usage
from diceserver import RollDice, port
class Options(usage.Options):
optParameters = [
["host", "h",... | #!/usr/bin/env python
import sys
from twisted.internet import reactor, defer
from twisted.internet.protocol import ClientCreator
from twisted.protocols import amp
from twisted.python import usage
from diceserver import RollDice, port
class Options(usage.Options):
optParameters = [
["host", "h",... | <commit_before>#!/usr/bin/env python
import sys
from twisted.internet import reactor, defer
from twisted.internet.protocol import ClientCreator
from twisted.protocols import amp
from twisted.python import usage
from diceserver import RollDice, port
class Options(usage.Options):
optParameters = [
... | #!/usr/bin/env python
import sys
from twisted.internet import reactor, defer
from twisted.internet.protocol import ClientCreator
from twisted.protocols import amp
from twisted.python import usage
from diceserver import RollDice, port
class Options(usage.Options):
optParameters = [
["host", "h",... | #!/usr/bin/env python
import sys
from twisted.internet import reactor, defer
from twisted.internet.protocol import ClientCreator
from twisted.protocols import amp
from twisted.python import usage
from diceserver import RollDice, port
class Options(usage.Options):
optParameters = [
["host", "h",... | <commit_before>#!/usr/bin/env python
import sys
from twisted.internet import reactor, defer
from twisted.internet.protocol import ClientCreator
from twisted.protocols import amp
from twisted.python import usage
from diceserver import RollDice, port
class Options(usage.Options):
optParameters = [
... |
e31948f3638f4d688b396060eefe301f50f48ce8 | extra/psucontrol_subpluginexample.py | extra/psucontrol_subpluginexample.py | # coding=utf-8
from __future__ import absolute_import
__author__ = "Shawn Bruce <kantlivelong@gmail.com>"
__license__ = "GNU Affero General Public License http://www.gnu.org/licenses/agpl.html"
__copyright__ = "Copyright (C) 2021 Shawn Bruce - Released under terms of the AGPLv3 License"
import octoprint.plugin
class... | # coding=utf-8
from __future__ import absolute_import
__author__ = "Shawn Bruce <kantlivelong@gmail.com>"
__license__ = "GNU Affero General Public License http://www.gnu.org/licenses/agpl.html"
__copyright__ = "Copyright (C) 2021 Shawn Bruce - Released under terms of the AGPLv3 License"
import octoprint.plugin
class... | Update sub-plugin example - Require restart on install | Update sub-plugin example - Require restart on install
| Python | agpl-3.0 | kantlivelong/OctoPrint-PSUControl,kantlivelong/OctoPrint-PSUControl,kantlivelong/OctoPrint-PSUControl | # coding=utf-8
from __future__ import absolute_import
__author__ = "Shawn Bruce <kantlivelong@gmail.com>"
__license__ = "GNU Affero General Public License http://www.gnu.org/licenses/agpl.html"
__copyright__ = "Copyright (C) 2021 Shawn Bruce - Released under terms of the AGPLv3 License"
import octoprint.plugin
class... | # coding=utf-8
from __future__ import absolute_import
__author__ = "Shawn Bruce <kantlivelong@gmail.com>"
__license__ = "GNU Affero General Public License http://www.gnu.org/licenses/agpl.html"
__copyright__ = "Copyright (C) 2021 Shawn Bruce - Released under terms of the AGPLv3 License"
import octoprint.plugin
class... | <commit_before># coding=utf-8
from __future__ import absolute_import
__author__ = "Shawn Bruce <kantlivelong@gmail.com>"
__license__ = "GNU Affero General Public License http://www.gnu.org/licenses/agpl.html"
__copyright__ = "Copyright (C) 2021 Shawn Bruce - Released under terms of the AGPLv3 License"
import octoprin... | # coding=utf-8
from __future__ import absolute_import
__author__ = "Shawn Bruce <kantlivelong@gmail.com>"
__license__ = "GNU Affero General Public License http://www.gnu.org/licenses/agpl.html"
__copyright__ = "Copyright (C) 2021 Shawn Bruce - Released under terms of the AGPLv3 License"
import octoprint.plugin
class... | # coding=utf-8
from __future__ import absolute_import
__author__ = "Shawn Bruce <kantlivelong@gmail.com>"
__license__ = "GNU Affero General Public License http://www.gnu.org/licenses/agpl.html"
__copyright__ = "Copyright (C) 2021 Shawn Bruce - Released under terms of the AGPLv3 License"
import octoprint.plugin
class... | <commit_before># coding=utf-8
from __future__ import absolute_import
__author__ = "Shawn Bruce <kantlivelong@gmail.com>"
__license__ = "GNU Affero General Public License http://www.gnu.org/licenses/agpl.html"
__copyright__ = "Copyright (C) 2021 Shawn Bruce - Released under terms of the AGPLv3 License"
import octoprin... |
03c2a7711a07bb85398c66e79777c32f0c995536 | django/applications/catmaid/middleware.py | django/applications/catmaid/middleware.py | import json
from django.http import HttpResponse
from django.conf import settings
class AjaxExceptionMiddleware(object):
def process_exception(self, request, exception):
response = {'error': str(exception)}
if settings.DEBUG:
import sys, traceback
(exc_type, exc_info, tb)... | import json
from django.http import HttpResponse
from django.conf import settings
class AjaxExceptionMiddleware(object):
def process_exception(self, request, exception):
response = {'error': str(exception)}
if settings.DEBUG:
import sys, traceback
(exc_type, exc_info, tb)... | Return exception for non ajax | Return exception for non ajax
| Python | agpl-3.0 | fzadow/CATMAID,htem/CATMAID,htem/CATMAID,fzadow/CATMAID,htem/CATMAID,fzadow/CATMAID,htem/CATMAID,fzadow/CATMAID | import json
from django.http import HttpResponse
from django.conf import settings
class AjaxExceptionMiddleware(object):
def process_exception(self, request, exception):
response = {'error': str(exception)}
if settings.DEBUG:
import sys, traceback
(exc_type, exc_info, tb)... | import json
from django.http import HttpResponse
from django.conf import settings
class AjaxExceptionMiddleware(object):
def process_exception(self, request, exception):
response = {'error': str(exception)}
if settings.DEBUG:
import sys, traceback
(exc_type, exc_info, tb)... | <commit_before>import json
from django.http import HttpResponse
from django.conf import settings
class AjaxExceptionMiddleware(object):
def process_exception(self, request, exception):
response = {'error': str(exception)}
if settings.DEBUG:
import sys, traceback
(exc_type... | import json
from django.http import HttpResponse
from django.conf import settings
class AjaxExceptionMiddleware(object):
def process_exception(self, request, exception):
response = {'error': str(exception)}
if settings.DEBUG:
import sys, traceback
(exc_type, exc_info, tb)... | import json
from django.http import HttpResponse
from django.conf import settings
class AjaxExceptionMiddleware(object):
def process_exception(self, request, exception):
response = {'error': str(exception)}
if settings.DEBUG:
import sys, traceback
(exc_type, exc_info, tb)... | <commit_before>import json
from django.http import HttpResponse
from django.conf import settings
class AjaxExceptionMiddleware(object):
def process_exception(self, request, exception):
response = {'error': str(exception)}
if settings.DEBUG:
import sys, traceback
(exc_type... |
cdb546a9db593d79c2b9935b746e9862a2b1221c | winthrop/people/urls.py | winthrop/people/urls.py | from django.conf.urls import url
from django.contrib.admin.views.decorators import staff_member_required
from winthrop.people.views import ViafAutoSuggest
urlpatterns = [
url(r'^autocomplete/viaf/suggest/$', staff_member_required(ViafAutoSuggest.as_view()),
name='autocomplete-suggest'),
]
| from django.conf.urls import url
from django.contrib.admin.views.decorators import staff_member_required
from winthrop.people.views import ViafAutoSuggest
urlpatterns = [
url(r'^autocomplete/viaf/suggest/$', staff_member_required(ViafAutoSuggest.as_view()),
name='viaf-autosuggest'),
]
| Make the url name for autosuggest clearer | Make the url name for autosuggest clearer
| Python | apache-2.0 | Princeton-CDH/winthrop-django,Princeton-CDH/winthrop-django,Princeton-CDH/winthrop-django | from django.conf.urls import url
from django.contrib.admin.views.decorators import staff_member_required
from winthrop.people.views import ViafAutoSuggest
urlpatterns = [
url(r'^autocomplete/viaf/suggest/$', staff_member_required(ViafAutoSuggest.as_view()),
name='autocomplete-suggest'),
]
Make the url na... | from django.conf.urls import url
from django.contrib.admin.views.decorators import staff_member_required
from winthrop.people.views import ViafAutoSuggest
urlpatterns = [
url(r'^autocomplete/viaf/suggest/$', staff_member_required(ViafAutoSuggest.as_view()),
name='viaf-autosuggest'),
]
| <commit_before>from django.conf.urls import url
from django.contrib.admin.views.decorators import staff_member_required
from winthrop.people.views import ViafAutoSuggest
urlpatterns = [
url(r'^autocomplete/viaf/suggest/$', staff_member_required(ViafAutoSuggest.as_view()),
name='autocomplete-suggest'),
]
... | from django.conf.urls import url
from django.contrib.admin.views.decorators import staff_member_required
from winthrop.people.views import ViafAutoSuggest
urlpatterns = [
url(r'^autocomplete/viaf/suggest/$', staff_member_required(ViafAutoSuggest.as_view()),
name='viaf-autosuggest'),
]
| from django.conf.urls import url
from django.contrib.admin.views.decorators import staff_member_required
from winthrop.people.views import ViafAutoSuggest
urlpatterns = [
url(r'^autocomplete/viaf/suggest/$', staff_member_required(ViafAutoSuggest.as_view()),
name='autocomplete-suggest'),
]
Make the url na... | <commit_before>from django.conf.urls import url
from django.contrib.admin.views.decorators import staff_member_required
from winthrop.people.views import ViafAutoSuggest
urlpatterns = [
url(r'^autocomplete/viaf/suggest/$', staff_member_required(ViafAutoSuggest.as_view()),
name='autocomplete-suggest'),
]
... |
556e3ca6d3650b1cf6e80ded98ae6d59fefa5025 | BuildAndRun.py | BuildAndRun.py | import os
import subprocess
# Update to the latest version
for line in os.popen('git fetch -p -q; git merge -q origin/master').readlines():
print line.strip()
# Move the old version over
for line in os.popen('cp sync oldsync').readlines():
print line.strip()
# Rebuild
for line in os.popen('go build ./...... | import os
import subprocess
# Update to the latest version
for line in os.popen('git fetch -p -q; git merge -q origin/master').readlines():
print line.strip()
# Move the old version over
for line in os.popen('cp sync oldsync').readlines():
print line.strip()
# Rebuild
for line in os.popen('go build ./...... | Fix to the Build and Run script | Fix to the Build and Run script
| Python | mit | brotherlogic/discogssyncer,brotherlogic/discogssyncer | import os
import subprocess
# Update to the latest version
for line in os.popen('git fetch -p -q; git merge -q origin/master').readlines():
print line.strip()
# Move the old version over
for line in os.popen('cp sync oldsync').readlines():
print line.strip()
# Rebuild
for line in os.popen('go build ./...... | import os
import subprocess
# Update to the latest version
for line in os.popen('git fetch -p -q; git merge -q origin/master').readlines():
print line.strip()
# Move the old version over
for line in os.popen('cp sync oldsync').readlines():
print line.strip()
# Rebuild
for line in os.popen('go build ./...... | <commit_before>import os
import subprocess
# Update to the latest version
for line in os.popen('git fetch -p -q; git merge -q origin/master').readlines():
print line.strip()
# Move the old version over
for line in os.popen('cp sync oldsync').readlines():
print line.strip()
# Rebuild
for line in os.popen(... | import os
import subprocess
# Update to the latest version
for line in os.popen('git fetch -p -q; git merge -q origin/master').readlines():
print line.strip()
# Move the old version over
for line in os.popen('cp sync oldsync').readlines():
print line.strip()
# Rebuild
for line in os.popen('go build ./...... | import os
import subprocess
# Update to the latest version
for line in os.popen('git fetch -p -q; git merge -q origin/master').readlines():
print line.strip()
# Move the old version over
for line in os.popen('cp sync oldsync').readlines():
print line.strip()
# Rebuild
for line in os.popen('go build ./...... | <commit_before>import os
import subprocess
# Update to the latest version
for line in os.popen('git fetch -p -q; git merge -q origin/master').readlines():
print line.strip()
# Move the old version over
for line in os.popen('cp sync oldsync').readlines():
print line.strip()
# Rebuild
for line in os.popen(... |
b3cc4e19ea207870b65f60e0ff4a5bc221ca493b | lib/node_modules/@stdlib/math/base/special/logit/test/fixtures/python/runner.py | lib/node_modules/@stdlib/math/base/special/logit/test/fixtures/python/runner.py | #!/usr/bin/env python
"""Generate fixtures."""
import os
import json
import numpy as np
from scipy import special
# Get the file path:
FILE = os.path.realpath(__file__)
# Extract the directory in which this file resides:
DIR = os.path.dirname(FILE)
def gen(x, name):
"""Generates fixture data and writes them t... | #!/usr/bin/env python
"""Generate fixtures."""
import os
import json
import numpy as np
from scipy import special
# Get the file path:
FILE = os.path.realpath(__file__)
# Extract the directory in which this file resides:
DIR = os.path.dirname(FILE)
def gen(x, name):
"""Generates fixture data and writes them t... | Remove whitespace around brackets in example code | Remove whitespace around brackets in example code
| Python | apache-2.0 | stdlib-js/stdlib,stdlib-js/stdlib,stdlib-js/stdlib,stdlib-js/stdlib,stdlib-js/stdlib,stdlib-js/stdlib,stdlib-js/stdlib,stdlib-js/stdlib | #!/usr/bin/env python
"""Generate fixtures."""
import os
import json
import numpy as np
from scipy import special
# Get the file path:
FILE = os.path.realpath(__file__)
# Extract the directory in which this file resides:
DIR = os.path.dirname(FILE)
def gen(x, name):
"""Generates fixture data and writes them t... | #!/usr/bin/env python
"""Generate fixtures."""
import os
import json
import numpy as np
from scipy import special
# Get the file path:
FILE = os.path.realpath(__file__)
# Extract the directory in which this file resides:
DIR = os.path.dirname(FILE)
def gen(x, name):
"""Generates fixture data and writes them t... | <commit_before>#!/usr/bin/env python
"""Generate fixtures."""
import os
import json
import numpy as np
from scipy import special
# Get the file path:
FILE = os.path.realpath(__file__)
# Extract the directory in which this file resides:
DIR = os.path.dirname(FILE)
def gen(x, name):
"""Generates fixture data an... | #!/usr/bin/env python
"""Generate fixtures."""
import os
import json
import numpy as np
from scipy import special
# Get the file path:
FILE = os.path.realpath(__file__)
# Extract the directory in which this file resides:
DIR = os.path.dirname(FILE)
def gen(x, name):
"""Generates fixture data and writes them t... | #!/usr/bin/env python
"""Generate fixtures."""
import os
import json
import numpy as np
from scipy import special
# Get the file path:
FILE = os.path.realpath(__file__)
# Extract the directory in which this file resides:
DIR = os.path.dirname(FILE)
def gen(x, name):
"""Generates fixture data and writes them t... | <commit_before>#!/usr/bin/env python
"""Generate fixtures."""
import os
import json
import numpy as np
from scipy import special
# Get the file path:
FILE = os.path.realpath(__file__)
# Extract the directory in which this file resides:
DIR = os.path.dirname(FILE)
def gen(x, name):
"""Generates fixture data an... |
8589af4b858acace99cc856ce118f73568fb96b1 | main.py | main.py | #!/usr/bin/env python3.6
import argparse
import asyncio
import logging
import sys
from pathlib import Path
from MoMMI.logsetup import setup_logs
# Do this BEFORE we import master, because it does a lot of event loop stuff.
if sys.platform == "win32":
loop = asyncio.ProactorEventLoop()
asyncio.set_event_loop(lo... | #!/usr/bin/env python3.6
import argparse
import asyncio
import logging
import sys
from pathlib import Path
from MoMMI.logsetup import setup_logs
# Do this BEFORE we import master, because it does a lot of event loop stuff.
if sys.platform == "win32":
loop = asyncio.ProactorEventLoop()
asyncio.set_event_loop(lo... | Make uvloop except be explicit ImportError | Make uvloop except be explicit ImportError
| Python | mit | PJB3005/MoMMI,PJB3005/MoMMI,PJB3005/MoMMI | #!/usr/bin/env python3.6
import argparse
import asyncio
import logging
import sys
from pathlib import Path
from MoMMI.logsetup import setup_logs
# Do this BEFORE we import master, because it does a lot of event loop stuff.
if sys.platform == "win32":
loop = asyncio.ProactorEventLoop()
asyncio.set_event_loop(lo... | #!/usr/bin/env python3.6
import argparse
import asyncio
import logging
import sys
from pathlib import Path
from MoMMI.logsetup import setup_logs
# Do this BEFORE we import master, because it does a lot of event loop stuff.
if sys.platform == "win32":
loop = asyncio.ProactorEventLoop()
asyncio.set_event_loop(lo... | <commit_before>#!/usr/bin/env python3.6
import argparse
import asyncio
import logging
import sys
from pathlib import Path
from MoMMI.logsetup import setup_logs
# Do this BEFORE we import master, because it does a lot of event loop stuff.
if sys.platform == "win32":
loop = asyncio.ProactorEventLoop()
asyncio.se... | #!/usr/bin/env python3.6
import argparse
import asyncio
import logging
import sys
from pathlib import Path
from MoMMI.logsetup import setup_logs
# Do this BEFORE we import master, because it does a lot of event loop stuff.
if sys.platform == "win32":
loop = asyncio.ProactorEventLoop()
asyncio.set_event_loop(lo... | #!/usr/bin/env python3.6
import argparse
import asyncio
import logging
import sys
from pathlib import Path
from MoMMI.logsetup import setup_logs
# Do this BEFORE we import master, because it does a lot of event loop stuff.
if sys.platform == "win32":
loop = asyncio.ProactorEventLoop()
asyncio.set_event_loop(lo... | <commit_before>#!/usr/bin/env python3.6
import argparse
import asyncio
import logging
import sys
from pathlib import Path
from MoMMI.logsetup import setup_logs
# Do this BEFORE we import master, because it does a lot of event loop stuff.
if sys.platform == "win32":
loop = asyncio.ProactorEventLoop()
asyncio.se... |
d57d572d91a5df06bbab97864c6187c7423c0135 | main.py | main.py | # Import blockmodels file
import BlockModels
import webapp2, jinja2, os
from datetime import *
jinja_environment = jinja2.Environment(autoescape=True,
loader=jinja2.FileSystemLoader(os.path.join(os.path.dirname(__file__), 'templates')))
class CST(tzinfo):
def utcoffset(self, dt):
return timedelta(hour... | # Import blockmodels file
import BlockModels
import webapp2, jinja2, os
from datetime import *
jinja_environment = jinja2.Environment(autoescape=True,
loader=jinja2.FileSystemLoader(os.path.join(os.path.dirname(__file__), 'templates')))
class CST(tzinfo):
def utcoffset(self, dt):
return timedelta(hour... | Change the MainHandler to Schedule_Handler and changed the “/“ to “/schedule” | Change the MainHandler to Schedule_Handler and changed the “/“ to “/schedule”
| Python | mit | shickey/BearStatus,shickey/BearStatus,shickey/BearStatus | # Import blockmodels file
import BlockModels
import webapp2, jinja2, os
from datetime import *
jinja_environment = jinja2.Environment(autoescape=True,
loader=jinja2.FileSystemLoader(os.path.join(os.path.dirname(__file__), 'templates')))
class CST(tzinfo):
def utcoffset(self, dt):
return timedelta(hour... | # Import blockmodels file
import BlockModels
import webapp2, jinja2, os
from datetime import *
jinja_environment = jinja2.Environment(autoescape=True,
loader=jinja2.FileSystemLoader(os.path.join(os.path.dirname(__file__), 'templates')))
class CST(tzinfo):
def utcoffset(self, dt):
return timedelta(hour... | <commit_before># Import blockmodels file
import BlockModels
import webapp2, jinja2, os
from datetime import *
jinja_environment = jinja2.Environment(autoescape=True,
loader=jinja2.FileSystemLoader(os.path.join(os.path.dirname(__file__), 'templates')))
class CST(tzinfo):
def utcoffset(self, dt):
return... | # Import blockmodels file
import BlockModels
import webapp2, jinja2, os
from datetime import *
jinja_environment = jinja2.Environment(autoescape=True,
loader=jinja2.FileSystemLoader(os.path.join(os.path.dirname(__file__), 'templates')))
class CST(tzinfo):
def utcoffset(self, dt):
return timedelta(hour... | # Import blockmodels file
import BlockModels
import webapp2, jinja2, os
from datetime import *
jinja_environment = jinja2.Environment(autoescape=True,
loader=jinja2.FileSystemLoader(os.path.join(os.path.dirname(__file__), 'templates')))
class CST(tzinfo):
def utcoffset(self, dt):
return timedelta(hour... | <commit_before># Import blockmodels file
import BlockModels
import webapp2, jinja2, os
from datetime import *
jinja_environment = jinja2.Environment(autoescape=True,
loader=jinja2.FileSystemLoader(os.path.join(os.path.dirname(__file__), 'templates')))
class CST(tzinfo):
def utcoffset(self, dt):
return... |
306dc0d7e96d91b417a702230a9d34fa1dbcc289 | util.py | util.py | import collections
def flatten(l, ltypes=collections.Sequence):
l = list(l)
while l:
if isinstance(l[0], str):
yield l.pop(0)
continue
while l and isinstance(l[0], ltypes):
l[0:1] = l[0]
if l:
yield l.pop(0)
noop = lambda self, *a, **kw:... | import collections
def flatten(l, ltypes=collections.Sequence):
l = list(l)
while l:
if isinstance(l[0], str):
yield l.pop(0)
continue
while l and isinstance(l[0], ltypes):
l[0:1] = l[0]
if l:
yield l.pop(0)
def getattrpath(obj, path):
... | Add helpers for nested attributes | Add helpers for nested attributes
getattrpath is for nested retrieval (getting obj.a.b.c with
getattrpath(obj, 'a.b.c))
prefix_keys generates key, value pairs with the prefix prepended to each
key.
| Python | mit | numberoverzero/origami | import collections
def flatten(l, ltypes=collections.Sequence):
l = list(l)
while l:
if isinstance(l[0], str):
yield l.pop(0)
continue
while l and isinstance(l[0], ltypes):
l[0:1] = l[0]
if l:
yield l.pop(0)
noop = lambda self, *a, **kw:... | import collections
def flatten(l, ltypes=collections.Sequence):
l = list(l)
while l:
if isinstance(l[0], str):
yield l.pop(0)
continue
while l and isinstance(l[0], ltypes):
l[0:1] = l[0]
if l:
yield l.pop(0)
def getattrpath(obj, path):
... | <commit_before>import collections
def flatten(l, ltypes=collections.Sequence):
l = list(l)
while l:
if isinstance(l[0], str):
yield l.pop(0)
continue
while l and isinstance(l[0], ltypes):
l[0:1] = l[0]
if l:
yield l.pop(0)
noop = lambda ... | import collections
def flatten(l, ltypes=collections.Sequence):
l = list(l)
while l:
if isinstance(l[0], str):
yield l.pop(0)
continue
while l and isinstance(l[0], ltypes):
l[0:1] = l[0]
if l:
yield l.pop(0)
def getattrpath(obj, path):
... | import collections
def flatten(l, ltypes=collections.Sequence):
l = list(l)
while l:
if isinstance(l[0], str):
yield l.pop(0)
continue
while l and isinstance(l[0], ltypes):
l[0:1] = l[0]
if l:
yield l.pop(0)
noop = lambda self, *a, **kw:... | <commit_before>import collections
def flatten(l, ltypes=collections.Sequence):
l = list(l)
while l:
if isinstance(l[0], str):
yield l.pop(0)
continue
while l and isinstance(l[0], ltypes):
l[0:1] = l[0]
if l:
yield l.pop(0)
noop = lambda ... |
6c7c69fccd924ab65219c7f28dbdef66bec7181a | 4/src.py | 4/src.py | import sys
from itertools import imap
from collections import Counter
class Room:
pass
def parse_room(s):
last_dash = s.rfind("-")
after_name = s[last_dash+1:]
bracket = after_name.find("[")
room = Room()
room.name = s[:last_dash]
room.sector = int(after_name[:bracket])
room.checksum ... | import sys
from itertools import imap
from collections import Counter
class Room:
pass
def parse_room(s):
last_dash = s.rfind("-")
after_name = s[last_dash+1:]
bracket = after_name.find("[")
room = Room()
room.name = s[:last_dash]
room.sector = int(after_name[:bracket])
room.checksum ... | Replace lambda with higher-order function | Replace lambda with higher-order function
| Python | mit | amalloy/advent-of-code-2016 | import sys
from itertools import imap
from collections import Counter
class Room:
pass
def parse_room(s):
last_dash = s.rfind("-")
after_name = s[last_dash+1:]
bracket = after_name.find("[")
room = Room()
room.name = s[:last_dash]
room.sector = int(after_name[:bracket])
room.checksum ... | import sys
from itertools import imap
from collections import Counter
class Room:
pass
def parse_room(s):
last_dash = s.rfind("-")
after_name = s[last_dash+1:]
bracket = after_name.find("[")
room = Room()
room.name = s[:last_dash]
room.sector = int(after_name[:bracket])
room.checksum ... | <commit_before>import sys
from itertools import imap
from collections import Counter
class Room:
pass
def parse_room(s):
last_dash = s.rfind("-")
after_name = s[last_dash+1:]
bracket = after_name.find("[")
room = Room()
room.name = s[:last_dash]
room.sector = int(after_name[:bracket])
... | import sys
from itertools import imap
from collections import Counter
class Room:
pass
def parse_room(s):
last_dash = s.rfind("-")
after_name = s[last_dash+1:]
bracket = after_name.find("[")
room = Room()
room.name = s[:last_dash]
room.sector = int(after_name[:bracket])
room.checksum ... | import sys
from itertools import imap
from collections import Counter
class Room:
pass
def parse_room(s):
last_dash = s.rfind("-")
after_name = s[last_dash+1:]
bracket = after_name.find("[")
room = Room()
room.name = s[:last_dash]
room.sector = int(after_name[:bracket])
room.checksum ... | <commit_before>import sys
from itertools import imap
from collections import Counter
class Room:
pass
def parse_room(s):
last_dash = s.rfind("-")
after_name = s[last_dash+1:]
bracket = after_name.find("[")
room = Room()
room.name = s[:last_dash]
room.sector = int(after_name[:bracket])
... |
3f160ac663ff37b5b8b16ebe630536521969d079 | text.py | text.py | import ibmcnx.filehandle
emp1 = ibmcnx.filehandle.Ibmcnxfile()
emp1.writeToFile( execfile('ibmcnx/doc/JVMSettings.py' ) )
#emp1.writeToFile("Test2")
#emp1.writeToFile("Test3")
emp1.closeFile()
| import ibmcnx.filehandle
import sys
sys.stdout = open("/tmp/documentation.txt", "w")
print "test"
execfile('ibmcnx/doc/JVMSettings.py' )
| Create script to save documentation to a file | 4: Create script to save documentation to a file
Task-Url: http://github.com/stoeps13/ibmcnx2/issues/issue/4 | Python | apache-2.0 | stoeps13/ibmcnx2,stoeps13/ibmcnx2 | import ibmcnx.filehandle
emp1 = ibmcnx.filehandle.Ibmcnxfile()
emp1.writeToFile( execfile('ibmcnx/doc/JVMSettings.py' ) )
#emp1.writeToFile("Test2")
#emp1.writeToFile("Test3")
emp1.closeFile()
4: Create script to save documentation to a file
Task-Url: http://github.com/stoeps13/ibmcnx2/issues/issue/4 | import ibmcnx.filehandle
import sys
sys.stdout = open("/tmp/documentation.txt", "w")
print "test"
execfile('ibmcnx/doc/JVMSettings.py' )
| <commit_before>import ibmcnx.filehandle
emp1 = ibmcnx.filehandle.Ibmcnxfile()
emp1.writeToFile( execfile('ibmcnx/doc/JVMSettings.py' ) )
#emp1.writeToFile("Test2")
#emp1.writeToFile("Test3")
emp1.closeFile()
<commit_msg>4: Create script to save documentation to a file
Task-Url: http://github.com/stoeps13/ibmcnx2/is... | import ibmcnx.filehandle
import sys
sys.stdout = open("/tmp/documentation.txt", "w")
print "test"
execfile('ibmcnx/doc/JVMSettings.py' )
| import ibmcnx.filehandle
emp1 = ibmcnx.filehandle.Ibmcnxfile()
emp1.writeToFile( execfile('ibmcnx/doc/JVMSettings.py' ) )
#emp1.writeToFile("Test2")
#emp1.writeToFile("Test3")
emp1.closeFile()
4: Create script to save documentation to a file
Task-Url: http://github.com/stoeps13/ibmcnx2/issues/issue/4import ibmcnx.f... | <commit_before>import ibmcnx.filehandle
emp1 = ibmcnx.filehandle.Ibmcnxfile()
emp1.writeToFile( execfile('ibmcnx/doc/JVMSettings.py' ) )
#emp1.writeToFile("Test2")
#emp1.writeToFile("Test3")
emp1.closeFile()
<commit_msg>4: Create script to save documentation to a file
Task-Url: http://github.com/stoeps13/ibmcnx2/is... |
b725eac62c72dd3674f35898ff6704c613e7272d | bears/julia/JuliaLintBear.py | bears/julia/JuliaLintBear.py | from coalib.bearlib.abstractions.Lint import Lint
from coalib.bears.LocalBear import LocalBear
from coalib.results.RESULT_SEVERITY import RESULT_SEVERITY
class JuliaLintBear(LocalBear, Lint):
executable = 'julia'
arguments = '-e \'import Lint.lintfile; lintfile({filename})\''
output_regex = r'(^.*\.jl):(?... | from coalib.bearlib.abstractions.Lint import Lint
from coalib.bears.LocalBear import LocalBear
from coalib.results.RESULT_SEVERITY import RESULT_SEVERITY
class JuliaLintBear(LocalBear, Lint):
executable = 'julia'
arguments = '-e \'import Lint.lintfile; lintfile({filename})\''
prerequisite_command = ['juli... | Add Skip Condition for JuliaBear | bears/julia: Add Skip Condition for JuliaBear
Add prerequisite_command and prerequisite_fail_msg
to JuliaBear.
Fixes https://github.com/coala-analyzer/coala-bears/issues/222
| Python | agpl-3.0 | yash-nisar/coala-bears,naveentata/coala-bears,kaustubhhiware/coala-bears,mr-karan/coala-bears,shreyans800755/coala-bears,sims1253/coala-bears,coala-analyzer/coala-bears,coala/coala-bears,coala-analyzer/coala-bears,chriscoyfish/coala-bears,seblat/coala-bears,Vamshi99/coala-bears,seblat/coala-bears,sounak98/coala-bears,L... | from coalib.bearlib.abstractions.Lint import Lint
from coalib.bears.LocalBear import LocalBear
from coalib.results.RESULT_SEVERITY import RESULT_SEVERITY
class JuliaLintBear(LocalBear, Lint):
executable = 'julia'
arguments = '-e \'import Lint.lintfile; lintfile({filename})\''
output_regex = r'(^.*\.jl):(?... | from coalib.bearlib.abstractions.Lint import Lint
from coalib.bears.LocalBear import LocalBear
from coalib.results.RESULT_SEVERITY import RESULT_SEVERITY
class JuliaLintBear(LocalBear, Lint):
executable = 'julia'
arguments = '-e \'import Lint.lintfile; lintfile({filename})\''
prerequisite_command = ['juli... | <commit_before>from coalib.bearlib.abstractions.Lint import Lint
from coalib.bears.LocalBear import LocalBear
from coalib.results.RESULT_SEVERITY import RESULT_SEVERITY
class JuliaLintBear(LocalBear, Lint):
executable = 'julia'
arguments = '-e \'import Lint.lintfile; lintfile({filename})\''
output_regex =... | from coalib.bearlib.abstractions.Lint import Lint
from coalib.bears.LocalBear import LocalBear
from coalib.results.RESULT_SEVERITY import RESULT_SEVERITY
class JuliaLintBear(LocalBear, Lint):
executable = 'julia'
arguments = '-e \'import Lint.lintfile; lintfile({filename})\''
prerequisite_command = ['juli... | from coalib.bearlib.abstractions.Lint import Lint
from coalib.bears.LocalBear import LocalBear
from coalib.results.RESULT_SEVERITY import RESULT_SEVERITY
class JuliaLintBear(LocalBear, Lint):
executable = 'julia'
arguments = '-e \'import Lint.lintfile; lintfile({filename})\''
output_regex = r'(^.*\.jl):(?... | <commit_before>from coalib.bearlib.abstractions.Lint import Lint
from coalib.bears.LocalBear import LocalBear
from coalib.results.RESULT_SEVERITY import RESULT_SEVERITY
class JuliaLintBear(LocalBear, Lint):
executable = 'julia'
arguments = '-e \'import Lint.lintfile; lintfile({filename})\''
output_regex =... |
e38f81fff1edf83bc6739804447e4a64a0a76de8 | apps/persona/urls.py | apps/persona/urls.py | from django.conf.urls.defaults import *
from mozorg.util import page
import views
urlpatterns = patterns('',
page('', 'persona/persona.html'),
page('about', 'persona/about.html'),
page('privacy-policy', 'persona/privacy-policy.html'),
page('terms-of-service', 'persona/terms-of-service.html'),
page(... | from django.conf.urls.defaults import *
from mozorg.util import page
urlpatterns = patterns('',
page('', 'persona/persona.html'),
page('about', 'persona/about.html'),
page('privacy-policy', 'persona/privacy-policy.html'),
page('terms-of-service', 'persona/terms-of-service.html'),
page('developer-fa... | Remove unnecessary 'import views' line | Remove unnecessary 'import views' line
| Python | mpl-2.0 | mmmavis/bedrock,pmclanahan/bedrock,malena/bedrock,craigcook/bedrock,dudepare/bedrock,davehunt/bedrock,flodolo/bedrock,dudepare/bedrock,schalkneethling/bedrock,mahinthjoe/bedrock,analytics-pros/mozilla-bedrock,flodolo/bedrock,mkmelin/bedrock,mermi/bedrock,pmclanahan/bedrock,SujaySKumar/bedrock,mmmavis/bedrock,mahinthjoe... | from django.conf.urls.defaults import *
from mozorg.util import page
import views
urlpatterns = patterns('',
page('', 'persona/persona.html'),
page('about', 'persona/about.html'),
page('privacy-policy', 'persona/privacy-policy.html'),
page('terms-of-service', 'persona/terms-of-service.html'),
page(... | from django.conf.urls.defaults import *
from mozorg.util import page
urlpatterns = patterns('',
page('', 'persona/persona.html'),
page('about', 'persona/about.html'),
page('privacy-policy', 'persona/privacy-policy.html'),
page('terms-of-service', 'persona/terms-of-service.html'),
page('developer-fa... | <commit_before>from django.conf.urls.defaults import *
from mozorg.util import page
import views
urlpatterns = patterns('',
page('', 'persona/persona.html'),
page('about', 'persona/about.html'),
page('privacy-policy', 'persona/privacy-policy.html'),
page('terms-of-service', 'persona/terms-of-service.ht... | from django.conf.urls.defaults import *
from mozorg.util import page
urlpatterns = patterns('',
page('', 'persona/persona.html'),
page('about', 'persona/about.html'),
page('privacy-policy', 'persona/privacy-policy.html'),
page('terms-of-service', 'persona/terms-of-service.html'),
page('developer-fa... | from django.conf.urls.defaults import *
from mozorg.util import page
import views
urlpatterns = patterns('',
page('', 'persona/persona.html'),
page('about', 'persona/about.html'),
page('privacy-policy', 'persona/privacy-policy.html'),
page('terms-of-service', 'persona/terms-of-service.html'),
page(... | <commit_before>from django.conf.urls.defaults import *
from mozorg.util import page
import views
urlpatterns = patterns('',
page('', 'persona/persona.html'),
page('about', 'persona/about.html'),
page('privacy-policy', 'persona/privacy-policy.html'),
page('terms-of-service', 'persona/terms-of-service.ht... |
cd5c50c94f2240c3d4996e38cc1712e5f397120f | datalogger/__init__.py | datalogger/__init__.py | from datalogger import api
from datalogger import analysis
from datalogger import acquisition
from datalogger import analysis_window, acquisition_window
#from datalogger.api import workspace as workspace
from datalogger.api import workspace as workspace
import os.path as _path
_PKG_ROOT = _path.abspath(_path.dirname(... | from datalogger import api
from datalogger import analysis
from datalogger import acquisition
from datalogger import analysis_window, acquisition_window
#from datalogger.api import workspace as workspace
from datalogger.api import workspace as workspace
import os.path as _path
_PKG_ROOT = _path.abspath(_path.dirname(... | Add __version__=None if no VERSION found | Add __version__=None if no VERSION found
| Python | bsd-3-clause | torebutlin/cued_datalogger | from datalogger import api
from datalogger import analysis
from datalogger import acquisition
from datalogger import analysis_window, acquisition_window
#from datalogger.api import workspace as workspace
from datalogger.api import workspace as workspace
import os.path as _path
_PKG_ROOT = _path.abspath(_path.dirname(... | from datalogger import api
from datalogger import analysis
from datalogger import acquisition
from datalogger import analysis_window, acquisition_window
#from datalogger.api import workspace as workspace
from datalogger.api import workspace as workspace
import os.path as _path
_PKG_ROOT = _path.abspath(_path.dirname(... | <commit_before>from datalogger import api
from datalogger import analysis
from datalogger import acquisition
from datalogger import analysis_window, acquisition_window
#from datalogger.api import workspace as workspace
from datalogger.api import workspace as workspace
import os.path as _path
_PKG_ROOT = _path.abspath... | from datalogger import api
from datalogger import analysis
from datalogger import acquisition
from datalogger import analysis_window, acquisition_window
#from datalogger.api import workspace as workspace
from datalogger.api import workspace as workspace
import os.path as _path
_PKG_ROOT = _path.abspath(_path.dirname(... | from datalogger import api
from datalogger import analysis
from datalogger import acquisition
from datalogger import analysis_window, acquisition_window
#from datalogger.api import workspace as workspace
from datalogger.api import workspace as workspace
import os.path as _path
_PKG_ROOT = _path.abspath(_path.dirname(... | <commit_before>from datalogger import api
from datalogger import analysis
from datalogger import acquisition
from datalogger import analysis_window, acquisition_window
#from datalogger.api import workspace as workspace
from datalogger.api import workspace as workspace
import os.path as _path
_PKG_ROOT = _path.abspath... |
493df570353fbeff288d6ee61fb0842622443967 | sleekxmpp/thirdparty/__init__.py | sleekxmpp/thirdparty/__init__.py | try:
from ordereddict import OrderedDict
except:
from sleekxmpp.thirdparty.ordereddict import OrderedDict
| try:
from collections import OrderedDict
except:
from sleekxmpp.thirdparty.ordereddict import OrderedDict
| Fix thirdparty imports for Python3 | Fix thirdparty imports for Python3
| Python | mit | destroy/SleekXMPP-gevent | try:
from ordereddict import OrderedDict
except:
from sleekxmpp.thirdparty.ordereddict import OrderedDict
Fix thirdparty imports for Python3 | try:
from collections import OrderedDict
except:
from sleekxmpp.thirdparty.ordereddict import OrderedDict
| <commit_before>try:
from ordereddict import OrderedDict
except:
from sleekxmpp.thirdparty.ordereddict import OrderedDict
<commit_msg>Fix thirdparty imports for Python3<commit_after> | try:
from collections import OrderedDict
except:
from sleekxmpp.thirdparty.ordereddict import OrderedDict
| try:
from ordereddict import OrderedDict
except:
from sleekxmpp.thirdparty.ordereddict import OrderedDict
Fix thirdparty imports for Python3try:
from collections import OrderedDict
except:
from sleekxmpp.thirdparty.ordereddict import OrderedDict
| <commit_before>try:
from ordereddict import OrderedDict
except:
from sleekxmpp.thirdparty.ordereddict import OrderedDict
<commit_msg>Fix thirdparty imports for Python3<commit_after>try:
from collections import OrderedDict
except:
from sleekxmpp.thirdparty.ordereddict import OrderedDict
|
53dc5e1029ea905f6e5da86592b33911309d1acd | bdateutil/__init__.py | bdateutil/__init__.py | # bdateutil
# -----------
# Adds business day logic and improved data type flexibility to
# python-dateutil.
#
# Author: ryanss <ryanssdev@icloud.com>
# Website: https://github.com/ryanss/bdateutil
# License: MIT (see LICENSE file)
__version__ = '0.1-dev'
from dateutil.relativedelta import MO, TU, WE, TH, FR... | # bdateutil
# -----------
# Adds business day logic and improved data type flexibility to
# python-dateutil.
#
# Author: ryanss <ryanssdev@icloud.com>
# Website: https://github.com/ryanss/bdateutil
# License: MIT (see LICENSE file)
__version__ = '0.1-dev'
from dateutil.relativedelta import MO, TU, WE, TH, FR... | Fix import statement in Python 3 | Fix import statement in Python 3
| Python | mit | pganssle/bdateutil | # bdateutil
# -----------
# Adds business day logic and improved data type flexibility to
# python-dateutil.
#
# Author: ryanss <ryanssdev@icloud.com>
# Website: https://github.com/ryanss/bdateutil
# License: MIT (see LICENSE file)
__version__ = '0.1-dev'
from dateutil.relativedelta import MO, TU, WE, TH, FR... | # bdateutil
# -----------
# Adds business day logic and improved data type flexibility to
# python-dateutil.
#
# Author: ryanss <ryanssdev@icloud.com>
# Website: https://github.com/ryanss/bdateutil
# License: MIT (see LICENSE file)
__version__ = '0.1-dev'
from dateutil.relativedelta import MO, TU, WE, TH, FR... | <commit_before># bdateutil
# -----------
# Adds business day logic and improved data type flexibility to
# python-dateutil.
#
# Author: ryanss <ryanssdev@icloud.com>
# Website: https://github.com/ryanss/bdateutil
# License: MIT (see LICENSE file)
__version__ = '0.1-dev'
from dateutil.relativedelta import MO,... | # bdateutil
# -----------
# Adds business day logic and improved data type flexibility to
# python-dateutil.
#
# Author: ryanss <ryanssdev@icloud.com>
# Website: https://github.com/ryanss/bdateutil
# License: MIT (see LICENSE file)
__version__ = '0.1-dev'
from dateutil.relativedelta import MO, TU, WE, TH, FR... | # bdateutil
# -----------
# Adds business day logic and improved data type flexibility to
# python-dateutil.
#
# Author: ryanss <ryanssdev@icloud.com>
# Website: https://github.com/ryanss/bdateutil
# License: MIT (see LICENSE file)
__version__ = '0.1-dev'
from dateutil.relativedelta import MO, TU, WE, TH, FR... | <commit_before># bdateutil
# -----------
# Adds business day logic and improved data type flexibility to
# python-dateutil.
#
# Author: ryanss <ryanssdev@icloud.com>
# Website: https://github.com/ryanss/bdateutil
# License: MIT (see LICENSE file)
__version__ = '0.1-dev'
from dateutil.relativedelta import MO,... |
4d7c1fec37943558ccc8bf6a17860b2a86fe1941 | gee_asset_manager/batch_copy.py | gee_asset_manager/batch_copy.py | import ee
import os
import csv
import logging
def copy(source, destination):
with open(source, 'r') as f:
reader = csv.reader(f)
for line in reader:
name = line[0]
gme_id = line[1]
gme_path = 'GME/images/' + gme_id
ee_path = os.path.join(destination, ... | import ee
import os
import csv
import logging
def copy(source, destination):
with open(source, 'r') as f:
reader = csv.reader(f)
for line in reader:
name = line[0]
gme_id = line[1]
gme_path = 'GME/images/' + gme_id
ee_path = os.path.join(destination, ... | Add exception handling to batch copy | Add exception handling to batch copy
| Python | apache-2.0 | tracek/gee_asset_manager | import ee
import os
import csv
import logging
def copy(source, destination):
with open(source, 'r') as f:
reader = csv.reader(f)
for line in reader:
name = line[0]
gme_id = line[1]
gme_path = 'GME/images/' + gme_id
ee_path = os.path.join(destination, ... | import ee
import os
import csv
import logging
def copy(source, destination):
with open(source, 'r') as f:
reader = csv.reader(f)
for line in reader:
name = line[0]
gme_id = line[1]
gme_path = 'GME/images/' + gme_id
ee_path = os.path.join(destination, ... | <commit_before>import ee
import os
import csv
import logging
def copy(source, destination):
with open(source, 'r') as f:
reader = csv.reader(f)
for line in reader:
name = line[0]
gme_id = line[1]
gme_path = 'GME/images/' + gme_id
ee_path = os.path.joi... | import ee
import os
import csv
import logging
def copy(source, destination):
with open(source, 'r') as f:
reader = csv.reader(f)
for line in reader:
name = line[0]
gme_id = line[1]
gme_path = 'GME/images/' + gme_id
ee_path = os.path.join(destination, ... | import ee
import os
import csv
import logging
def copy(source, destination):
with open(source, 'r') as f:
reader = csv.reader(f)
for line in reader:
name = line[0]
gme_id = line[1]
gme_path = 'GME/images/' + gme_id
ee_path = os.path.join(destination, ... | <commit_before>import ee
import os
import csv
import logging
def copy(source, destination):
with open(source, 'r') as f:
reader = csv.reader(f)
for line in reader:
name = line[0]
gme_id = line[1]
gme_path = 'GME/images/' + gme_id
ee_path = os.path.joi... |
cf4b58ff5afa6c7c8649e89b430b5386fabdc02c | djmoney/serializers.py | djmoney/serializers.py | # coding=utf-8
import json
from decimal import Decimal
from django.core.serializers.python import Deserializer as PythonDeserializer
from django.core.serializers.json import Serializer as JSONSerializer
from django.core.serializers.python import _get_model
from django.utils import six
from djmoney.models.fields impo... | # coding=utf-8
import json
from decimal import Decimal
from django.core.serializers.python import Deserializer as PythonDeserializer
from django.core.serializers.json import Serializer as JSONSerializer
from django.core.serializers.python import _get_model
from django.utils import six
from djmoney.models.fields impo... | Fix for de-serialization. Using vanilla django-money, when one did the following: | Fix for de-serialization.
Using vanilla django-money, when one did the following:
./manage.py dumpdata
the values were saved properly, i.e:
{
'amount': '12',
'amount_currency': 'USD',
}
however, after the de-serialization:
./manage.py loaddata [fixtures]
the currencies were omitted.
i have no idea (yet) how ... | Python | bsd-3-clause | rescale/django-money,tsouvarev/django-money,iXioN/django-money,iXioN/django-money,recklessromeo/django-money,recklessromeo/django-money,tsouvarev/django-money,AlexRiina/django-money | # coding=utf-8
import json
from decimal import Decimal
from django.core.serializers.python import Deserializer as PythonDeserializer
from django.core.serializers.json import Serializer as JSONSerializer
from django.core.serializers.python import _get_model
from django.utils import six
from djmoney.models.fields impo... | # coding=utf-8
import json
from decimal import Decimal
from django.core.serializers.python import Deserializer as PythonDeserializer
from django.core.serializers.json import Serializer as JSONSerializer
from django.core.serializers.python import _get_model
from django.utils import six
from djmoney.models.fields impo... | <commit_before># coding=utf-8
import json
from decimal import Decimal
from django.core.serializers.python import Deserializer as PythonDeserializer
from django.core.serializers.json import Serializer as JSONSerializer
from django.core.serializers.python import _get_model
from django.utils import six
from djmoney.mod... | # coding=utf-8
import json
from decimal import Decimal
from django.core.serializers.python import Deserializer as PythonDeserializer
from django.core.serializers.json import Serializer as JSONSerializer
from django.core.serializers.python import _get_model
from django.utils import six
from djmoney.models.fields impo... | # coding=utf-8
import json
from decimal import Decimal
from django.core.serializers.python import Deserializer as PythonDeserializer
from django.core.serializers.json import Serializer as JSONSerializer
from django.core.serializers.python import _get_model
from django.utils import six
from djmoney.models.fields impo... | <commit_before># coding=utf-8
import json
from decimal import Decimal
from django.core.serializers.python import Deserializer as PythonDeserializer
from django.core.serializers.json import Serializer as JSONSerializer
from django.core.serializers.python import _get_model
from django.utils import six
from djmoney.mod... |
ceb3a49fc3e3ca149d203e8489bd4b17b286d6c3 | event/urls.py | event/urls.py | from django.conf.urls import url
from . import views
app_name = 'event'
urlpatterns = [
url(r'^$', views.IndexView.as_view(), name='index'),
url(r'^artist/$', views.ArtistView.as_view(), name='artist'),
url(r'^artist/(?P<pk>\d+)$', views.ArtistDetailView.as_view(), name='artist_detail'),
url(r'^event/... | from django.conf.urls import url
from . import views
app_name = 'event'
urlpatterns = [
url(r'^$', views.IndexView.as_view(), name='index'),
url(r'^artist/$', views.ArtistView.as_view(), name='artist'),
url(r'^artist/(?P<pk>\d+)/$', views.ArtistDetailView.as_view(), name='artist_detail'),
url(r'^event... | Fix Artist detail view url | Fix Artist detail view url
| Python | mit | FedorSelitsky/eventrack,FedorSelitsky/eventrack,FedorSelitsky/eventrack,FedorSelitsky/eventrack | from django.conf.urls import url
from . import views
app_name = 'event'
urlpatterns = [
url(r'^$', views.IndexView.as_view(), name='index'),
url(r'^artist/$', views.ArtistView.as_view(), name='artist'),
url(r'^artist/(?P<pk>\d+)$', views.ArtistDetailView.as_view(), name='artist_detail'),
url(r'^event/... | from django.conf.urls import url
from . import views
app_name = 'event'
urlpatterns = [
url(r'^$', views.IndexView.as_view(), name='index'),
url(r'^artist/$', views.ArtistView.as_view(), name='artist'),
url(r'^artist/(?P<pk>\d+)/$', views.ArtistDetailView.as_view(), name='artist_detail'),
url(r'^event... | <commit_before>from django.conf.urls import url
from . import views
app_name = 'event'
urlpatterns = [
url(r'^$', views.IndexView.as_view(), name='index'),
url(r'^artist/$', views.ArtistView.as_view(), name='artist'),
url(r'^artist/(?P<pk>\d+)$', views.ArtistDetailView.as_view(), name='artist_detail'),
... | from django.conf.urls import url
from . import views
app_name = 'event'
urlpatterns = [
url(r'^$', views.IndexView.as_view(), name='index'),
url(r'^artist/$', views.ArtistView.as_view(), name='artist'),
url(r'^artist/(?P<pk>\d+)/$', views.ArtistDetailView.as_view(), name='artist_detail'),
url(r'^event... | from django.conf.urls import url
from . import views
app_name = 'event'
urlpatterns = [
url(r'^$', views.IndexView.as_view(), name='index'),
url(r'^artist/$', views.ArtistView.as_view(), name='artist'),
url(r'^artist/(?P<pk>\d+)$', views.ArtistDetailView.as_view(), name='artist_detail'),
url(r'^event/... | <commit_before>from django.conf.urls import url
from . import views
app_name = 'event'
urlpatterns = [
url(r'^$', views.IndexView.as_view(), name='index'),
url(r'^artist/$', views.ArtistView.as_view(), name='artist'),
url(r'^artist/(?P<pk>\d+)$', views.ArtistDetailView.as_view(), name='artist_detail'),
... |
9719a31459e033cc84a5a522e4fc618aa11b45fe | charlesbot/util/http.py | charlesbot/util/http.py | import asyncio
import aiohttp
import logging
log = logging.getLogger(__name__)
@asyncio.coroutine
def http_get_auth_request(auth_string,
url,
content_type="application/json",
auth_method="Token",
payload={}):
h... | import asyncio
import aiohttp
import logging
log = logging.getLogger(__name__)
@asyncio.coroutine
def http_get_auth_request(auth_string,
url,
content_type="application/json",
auth_method="Token",
payload={}):
h... | Print the URL that erred out, along with the other info | Print the URL that erred out, along with the other info
| Python | mit | marvinpinto/charlesbot,marvinpinto/charlesbot | import asyncio
import aiohttp
import logging
log = logging.getLogger(__name__)
@asyncio.coroutine
def http_get_auth_request(auth_string,
url,
content_type="application/json",
auth_method="Token",
payload={}):
h... | import asyncio
import aiohttp
import logging
log = logging.getLogger(__name__)
@asyncio.coroutine
def http_get_auth_request(auth_string,
url,
content_type="application/json",
auth_method="Token",
payload={}):
h... | <commit_before>import asyncio
import aiohttp
import logging
log = logging.getLogger(__name__)
@asyncio.coroutine
def http_get_auth_request(auth_string,
url,
content_type="application/json",
auth_method="Token",
pay... | import asyncio
import aiohttp
import logging
log = logging.getLogger(__name__)
@asyncio.coroutine
def http_get_auth_request(auth_string,
url,
content_type="application/json",
auth_method="Token",
payload={}):
h... | import asyncio
import aiohttp
import logging
log = logging.getLogger(__name__)
@asyncio.coroutine
def http_get_auth_request(auth_string,
url,
content_type="application/json",
auth_method="Token",
payload={}):
h... | <commit_before>import asyncio
import aiohttp
import logging
log = logging.getLogger(__name__)
@asyncio.coroutine
def http_get_auth_request(auth_string,
url,
content_type="application/json",
auth_method="Token",
pay... |
9ba0620230e370f9de8dec6e2bdd3eebeb3a986a | __TEMPLATE__.py | __TEMPLATE__.py | # -*- coding: utf-8 -*-
__author__ = """Chris Tabor (dxdstudio@gmail.com)"""
if __name__ == '__main__':
from os import getcwd
from os import sys
sys.path.append(getcwd())
from MOAL.helpers.display import Section
DEBUG = True if __name__ == '__main__' else False
class MyClass(object):
raise NotImpl... | """Module docstring.
This talks about the module."""
# -*- coding: utf-8 -*-
__author__ = """Chris Tabor (dxdstudio@gmail.com)"""
if __name__ == '__main__':
from os import getcwd
from os import sys
sys.path.append(getcwd())
from MOAL.helpers.display import Section
DEBUG = True if __name__ == '__main__... | Add Flake-8 docstring pep requirements for template | Add Flake-8 docstring pep requirements for template
| Python | apache-2.0 | christabor/MoAL,christabor/MoAL,christabor/MoAL,christabor/MoAL,christabor/MoAL | # -*- coding: utf-8 -*-
__author__ = """Chris Tabor (dxdstudio@gmail.com)"""
if __name__ == '__main__':
from os import getcwd
from os import sys
sys.path.append(getcwd())
from MOAL.helpers.display import Section
DEBUG = True if __name__ == '__main__' else False
class MyClass(object):
raise NotImpl... | """Module docstring.
This talks about the module."""
# -*- coding: utf-8 -*-
__author__ = """Chris Tabor (dxdstudio@gmail.com)"""
if __name__ == '__main__':
from os import getcwd
from os import sys
sys.path.append(getcwd())
from MOAL.helpers.display import Section
DEBUG = True if __name__ == '__main__... | <commit_before># -*- coding: utf-8 -*-
__author__ = """Chris Tabor (dxdstudio@gmail.com)"""
if __name__ == '__main__':
from os import getcwd
from os import sys
sys.path.append(getcwd())
from MOAL.helpers.display import Section
DEBUG = True if __name__ == '__main__' else False
class MyClass(object):
... | """Module docstring.
This talks about the module."""
# -*- coding: utf-8 -*-
__author__ = """Chris Tabor (dxdstudio@gmail.com)"""
if __name__ == '__main__':
from os import getcwd
from os import sys
sys.path.append(getcwd())
from MOAL.helpers.display import Section
DEBUG = True if __name__ == '__main__... | # -*- coding: utf-8 -*-
__author__ = """Chris Tabor (dxdstudio@gmail.com)"""
if __name__ == '__main__':
from os import getcwd
from os import sys
sys.path.append(getcwd())
from MOAL.helpers.display import Section
DEBUG = True if __name__ == '__main__' else False
class MyClass(object):
raise NotImpl... | <commit_before># -*- coding: utf-8 -*-
__author__ = """Chris Tabor (dxdstudio@gmail.com)"""
if __name__ == '__main__':
from os import getcwd
from os import sys
sys.path.append(getcwd())
from MOAL.helpers.display import Section
DEBUG = True if __name__ == '__main__' else False
class MyClass(object):
... |
3b2390691544ac8f5bbe7cbfd3b105c2f327d8be | aafig/setup.py | aafig/setup.py | # -*- coding: utf-8 -*-
from setuptools import setup, find_packages
long_desc = '''
This package contains the aafigure Sphinx extension.
Allow embeded ASCII art figure to be rendered as nice images.
'''
requires = ['Sphinx>=0.6']
setup(
name='sphinxcontrib-aafig',
version='0.1',
url='http://bitbucket.o... | # -*- coding: utf-8 -*-
from setuptools import setup, find_packages
long_desc = '''
This package contains the aafigure_ Sphinx_ extension.
.. _aafigure: http://docutils.sourceforge.net/sandbox/aafigure/
.. _Sphinx: http://sphinx.pocoo.org/
_aafigure is a program and a reStructuredText_ directive to allow embeded AS... | Improve package short and long description | aafig: Improve package short and long description
| Python | bsd-2-clause | sphinx-contrib/spelling,sphinx-contrib/spelling | # -*- coding: utf-8 -*-
from setuptools import setup, find_packages
long_desc = '''
This package contains the aafigure Sphinx extension.
Allow embeded ASCII art figure to be rendered as nice images.
'''
requires = ['Sphinx>=0.6']
setup(
name='sphinxcontrib-aafig',
version='0.1',
url='http://bitbucket.o... | # -*- coding: utf-8 -*-
from setuptools import setup, find_packages
long_desc = '''
This package contains the aafigure_ Sphinx_ extension.
.. _aafigure: http://docutils.sourceforge.net/sandbox/aafigure/
.. _Sphinx: http://sphinx.pocoo.org/
_aafigure is a program and a reStructuredText_ directive to allow embeded AS... | <commit_before># -*- coding: utf-8 -*-
from setuptools import setup, find_packages
long_desc = '''
This package contains the aafigure Sphinx extension.
Allow embeded ASCII art figure to be rendered as nice images.
'''
requires = ['Sphinx>=0.6']
setup(
name='sphinxcontrib-aafig',
version='0.1',
url='htt... | # -*- coding: utf-8 -*-
from setuptools import setup, find_packages
long_desc = '''
This package contains the aafigure_ Sphinx_ extension.
.. _aafigure: http://docutils.sourceforge.net/sandbox/aafigure/
.. _Sphinx: http://sphinx.pocoo.org/
_aafigure is a program and a reStructuredText_ directive to allow embeded AS... | # -*- coding: utf-8 -*-
from setuptools import setup, find_packages
long_desc = '''
This package contains the aafigure Sphinx extension.
Allow embeded ASCII art figure to be rendered as nice images.
'''
requires = ['Sphinx>=0.6']
setup(
name='sphinxcontrib-aafig',
version='0.1',
url='http://bitbucket.o... | <commit_before># -*- coding: utf-8 -*-
from setuptools import setup, find_packages
long_desc = '''
This package contains the aafigure Sphinx extension.
Allow embeded ASCII art figure to be rendered as nice images.
'''
requires = ['Sphinx>=0.6']
setup(
name='sphinxcontrib-aafig',
version='0.1',
url='htt... |
d9ab4683a8c5859b8d5e2579dbfe1f718f3ff423 | skylines/tests/test_i18n.py | skylines/tests/test_i18n.py | import os
import sys
import glob
from babel.messages.pofile import read_po
import nose
def get_language_code(filename):
filename = os.path.split(filename)[0]
filename = os.path.split(filename)[0]
filename = os.path.split(filename)[1]
return filename
def test_pofiles():
for filename in glob.glob(... | import os
import sys
import glob
from babel.messages.pofile import read_po
import nose
def get_language_code(filename):
filename = os.path.split(filename)[0]
filename = os.path.split(filename)[0]
filename = os.path.split(filename)[1]
return filename
def test_pofiles():
for filename in glob.glob(... | Raise AssertionError to mark tests as failed instead of errored | tests: Raise AssertionError to mark tests as failed instead of errored
| Python | agpl-3.0 | snip/skylines,Turbo87/skylines,kerel-fs/skylines,Harry-R/skylines,kerel-fs/skylines,TobiasLohner/SkyLines,Turbo87/skylines,skylines-project/skylines,snip/skylines,RBE-Avionik/skylines,RBE-Avionik/skylines,shadowoneau/skylines,Turbo87/skylines,Harry-R/skylines,TobiasLohner/SkyLines,RBE-Avionik/skylines,Turbo87/skylines,... | import os
import sys
import glob
from babel.messages.pofile import read_po
import nose
def get_language_code(filename):
filename = os.path.split(filename)[0]
filename = os.path.split(filename)[0]
filename = os.path.split(filename)[1]
return filename
def test_pofiles():
for filename in glob.glob(... | import os
import sys
import glob
from babel.messages.pofile import read_po
import nose
def get_language_code(filename):
filename = os.path.split(filename)[0]
filename = os.path.split(filename)[0]
filename = os.path.split(filename)[1]
return filename
def test_pofiles():
for filename in glob.glob(... | <commit_before>import os
import sys
import glob
from babel.messages.pofile import read_po
import nose
def get_language_code(filename):
filename = os.path.split(filename)[0]
filename = os.path.split(filename)[0]
filename = os.path.split(filename)[1]
return filename
def test_pofiles():
for filenam... | import os
import sys
import glob
from babel.messages.pofile import read_po
import nose
def get_language_code(filename):
filename = os.path.split(filename)[0]
filename = os.path.split(filename)[0]
filename = os.path.split(filename)[1]
return filename
def test_pofiles():
for filename in glob.glob(... | import os
import sys
import glob
from babel.messages.pofile import read_po
import nose
def get_language_code(filename):
filename = os.path.split(filename)[0]
filename = os.path.split(filename)[0]
filename = os.path.split(filename)[1]
return filename
def test_pofiles():
for filename in glob.glob(... | <commit_before>import os
import sys
import glob
from babel.messages.pofile import read_po
import nose
def get_language_code(filename):
filename = os.path.split(filename)[0]
filename = os.path.split(filename)[0]
filename = os.path.split(filename)[1]
return filename
def test_pofiles():
for filenam... |
9e745b0e5ac673d04d978887654627b686813d93 | cms/apps/pages/tests/urls.py | cms/apps/pages/tests/urls.py | from django.conf.urls import patterns, url
def view():
pass
urlpatterns = patterns(
"",
url("^$", view, name="index"),
url("^(?P<url_title>[^/]+)/$", view, name="detail"),
)
| from django.conf.urls import patterns, url
urlpatterns = patterns(
"",
url("^$", lambda: None, name="index"),
url("^(?P<url_title>[^/]+)/$", lambda: None, name="detail"),
)
| Replace page test url views with lambdas. | Replace page test url views with lambdas.
| Python | bsd-3-clause | danielsamuels/cms,jamesfoley/cms,dan-gamble/cms,lewiscollard/cms,jamesfoley/cms,jamesfoley/cms,lewiscollard/cms,danielsamuels/cms,lewiscollard/cms,jamesfoley/cms,dan-gamble/cms,danielsamuels/cms,dan-gamble/cms | from django.conf.urls import patterns, url
def view():
pass
urlpatterns = patterns(
"",
url("^$", view, name="index"),
url("^(?P<url_title>[^/]+)/$", view, name="detail"),
)
Replace page test url views with lambdas. | from django.conf.urls import patterns, url
urlpatterns = patterns(
"",
url("^$", lambda: None, name="index"),
url("^(?P<url_title>[^/]+)/$", lambda: None, name="detail"),
)
| <commit_before>from django.conf.urls import patterns, url
def view():
pass
urlpatterns = patterns(
"",
url("^$", view, name="index"),
url("^(?P<url_title>[^/]+)/$", view, name="detail"),
)
<commit_msg>Replace page test url views with lambdas.<commit_after> | from django.conf.urls import patterns, url
urlpatterns = patterns(
"",
url("^$", lambda: None, name="index"),
url("^(?P<url_title>[^/]+)/$", lambda: None, name="detail"),
)
| from django.conf.urls import patterns, url
def view():
pass
urlpatterns = patterns(
"",
url("^$", view, name="index"),
url("^(?P<url_title>[^/]+)/$", view, name="detail"),
)
Replace page test url views with lambdas.from django.conf.urls import patterns, url
urlpatterns = patterns(
"",
url("... | <commit_before>from django.conf.urls import patterns, url
def view():
pass
urlpatterns = patterns(
"",
url("^$", view, name="index"),
url("^(?P<url_title>[^/]+)/$", view, name="detail"),
)
<commit_msg>Replace page test url views with lambdas.<commit_after>from django.conf.urls import patterns, url
... |
621a97a0904e085c33ef78d68cd733af0d816aee | app/aflafrettir/routes.py | app/aflafrettir/routes.py | from flask import render_template
from . import aflafrettir
@aflafrettir.route('/')
def index():
return render_template('aflafrettir/index.html')
@talks.route('/user/<username>')
def user(username):
return render_template('aflafrettir/index.html', username = username)
| from flask import render_template
from . import aflafrettir
@aflafrettir.route('/')
def index():
return render_template('aflafrettir/index.html')
@aflafrettir.route('/user/<username>')
def user(username):
return render_template('aflafrettir/user.html', username = username)
| Use the correct template, and call the aflafrettir route decorator | Use the correct template, and call the aflafrettir route decorator
| Python | mit | finnurtorfa/aflafrettir.is,finnurtorfa/aflafrettir.is,finnurtorfa/aflafrettir.is,finnurtorfa/aflafrettir.is | from flask import render_template
from . import aflafrettir
@aflafrettir.route('/')
def index():
return render_template('aflafrettir/index.html')
@talks.route('/user/<username>')
def user(username):
return render_template('aflafrettir/index.html', username = username)
Use the correct template, and call the aflafr... | from flask import render_template
from . import aflafrettir
@aflafrettir.route('/')
def index():
return render_template('aflafrettir/index.html')
@aflafrettir.route('/user/<username>')
def user(username):
return render_template('aflafrettir/user.html', username = username)
| <commit_before>from flask import render_template
from . import aflafrettir
@aflafrettir.route('/')
def index():
return render_template('aflafrettir/index.html')
@talks.route('/user/<username>')
def user(username):
return render_template('aflafrettir/index.html', username = username)
<commit_msg>Use the correct te... | from flask import render_template
from . import aflafrettir
@aflafrettir.route('/')
def index():
return render_template('aflafrettir/index.html')
@aflafrettir.route('/user/<username>')
def user(username):
return render_template('aflafrettir/user.html', username = username)
| from flask import render_template
from . import aflafrettir
@aflafrettir.route('/')
def index():
return render_template('aflafrettir/index.html')
@talks.route('/user/<username>')
def user(username):
return render_template('aflafrettir/index.html', username = username)
Use the correct template, and call the aflafr... | <commit_before>from flask import render_template
from . import aflafrettir
@aflafrettir.route('/')
def index():
return render_template('aflafrettir/index.html')
@talks.route('/user/<username>')
def user(username):
return render_template('aflafrettir/index.html', username = username)
<commit_msg>Use the correct te... |
28a8de1c23aeb23800bf55bd3045ead082950c81 | example/models.py | example/models.py | from django.db import models
import i18n
from i18n.models import TranslatableModel
class Document(TranslatableModel):
untranslated_charfield = models.CharField(max_length=50, blank=True)
charfield = i18n.LocalizedCharField(max_length=50)
textfield = i18n.LocalizedTextField(max_length=500, blank=True)
... | from django.db import models
import i18n
from i18n.models import TranslatableModel
class Document(TranslatableModel):
untranslated_charfield = models.CharField(max_length=50, blank=True)
charfield = i18n.LocalizedCharField(max_length=50)
textfield = i18n.LocalizedTextField(max_length=500, blank=True)
... | Remove booleanfield from example app for now | Remove booleanfield from example app for now
We rather want a non required field for testing and should add a
NullBooleanField anyway
| Python | bsd-3-clause | jonasundderwolf/django-localizedfields,jonasundderwolf/django-localizedfields | from django.db import models
import i18n
from i18n.models import TranslatableModel
class Document(TranslatableModel):
untranslated_charfield = models.CharField(max_length=50, blank=True)
charfield = i18n.LocalizedCharField(max_length=50)
textfield = i18n.LocalizedTextField(max_length=500, blank=True)
... | from django.db import models
import i18n
from i18n.models import TranslatableModel
class Document(TranslatableModel):
untranslated_charfield = models.CharField(max_length=50, blank=True)
charfield = i18n.LocalizedCharField(max_length=50)
textfield = i18n.LocalizedTextField(max_length=500, blank=True)
... | <commit_before>from django.db import models
import i18n
from i18n.models import TranslatableModel
class Document(TranslatableModel):
untranslated_charfield = models.CharField(max_length=50, blank=True)
charfield = i18n.LocalizedCharField(max_length=50)
textfield = i18n.LocalizedTextField(max_length=500, b... | from django.db import models
import i18n
from i18n.models import TranslatableModel
class Document(TranslatableModel):
untranslated_charfield = models.CharField(max_length=50, blank=True)
charfield = i18n.LocalizedCharField(max_length=50)
textfield = i18n.LocalizedTextField(max_length=500, blank=True)
... | from django.db import models
import i18n
from i18n.models import TranslatableModel
class Document(TranslatableModel):
untranslated_charfield = models.CharField(max_length=50, blank=True)
charfield = i18n.LocalizedCharField(max_length=50)
textfield = i18n.LocalizedTextField(max_length=500, blank=True)
... | <commit_before>from django.db import models
import i18n
from i18n.models import TranslatableModel
class Document(TranslatableModel):
untranslated_charfield = models.CharField(max_length=50, blank=True)
charfield = i18n.LocalizedCharField(max_length=50)
textfield = i18n.LocalizedTextField(max_length=500, b... |
517668eeb493bcd72838716258d40abd4a73e039 | alexandria/views/user.py | alexandria/views/user.py | from pyramid.view import (
view_config,
view_defaults,
)
from pyramid.security import (
remember,
forget,
)
@view_defaults(accept='application/json', renderer='json', context='..traversal.User')
class User(object):
def __init__(self, context, request):
self.... | from pyramid.view import (
view_config,
view_defaults,
)
from pyramid.httpexceptions import HTTPSeeOther
from pyramid.security import (
remember,
forget,
)
@view_defaults(accept='application/json', renderer='json', context='..traversal.User')
class User(object):
de... | Implement the login/logout functionality on the REST endpoints | Implement the login/logout functionality on the REST endpoints
| Python | isc | cdunklau/alexandria,bertjwregeer/alexandria,cdunklau/alexandria,cdunklau/alexandria,bertjwregeer/alexandria | from pyramid.view import (
view_config,
view_defaults,
)
from pyramid.security import (
remember,
forget,
)
@view_defaults(accept='application/json', renderer='json', context='..traversal.User')
class User(object):
def __init__(self, context, request):
self.... | from pyramid.view import (
view_config,
view_defaults,
)
from pyramid.httpexceptions import HTTPSeeOther
from pyramid.security import (
remember,
forget,
)
@view_defaults(accept='application/json', renderer='json', context='..traversal.User')
class User(object):
de... | <commit_before>from pyramid.view import (
view_config,
view_defaults,
)
from pyramid.security import (
remember,
forget,
)
@view_defaults(accept='application/json', renderer='json', context='..traversal.User')
class User(object):
def __init__(self, context, request)... | from pyramid.view import (
view_config,
view_defaults,
)
from pyramid.httpexceptions import HTTPSeeOther
from pyramid.security import (
remember,
forget,
)
@view_defaults(accept='application/json', renderer='json', context='..traversal.User')
class User(object):
de... | from pyramid.view import (
view_config,
view_defaults,
)
from pyramid.security import (
remember,
forget,
)
@view_defaults(accept='application/json', renderer='json', context='..traversal.User')
class User(object):
def __init__(self, context, request):
self.... | <commit_before>from pyramid.view import (
view_config,
view_defaults,
)
from pyramid.security import (
remember,
forget,
)
@view_defaults(accept='application/json', renderer='json', context='..traversal.User')
class User(object):
def __init__(self, context, request)... |
36edb0e161fd3c65d2957b7b319b67975e846e7e | src/sentry/templatetags/sentry_assets.py | src/sentry/templatetags/sentry_assets.py | from __future__ import absolute_import
from django.template import Library
from sentry.utils.assets import get_asset_url
register = Library()
@register.simple_tag
def asset_url(module, path):
"""
Returns a versioned asset URL (located within Sentry's static files).
Example:
{% asset_url 'sentry'... | from __future__ import absolute_import
from django.template import Library
from sentry.utils.assets import get_asset_url
from sentry.utils.http import absolute_uri
register = Library()
@register.simple_tag
def asset_url(module, path):
"""
Returns a versioned asset URL (located within Sentry's static files)... | Make all asset URLs absolute | Make all asset URLs absolute
| Python | bsd-3-clause | mvaled/sentry,looker/sentry,JamesMura/sentry,zenefits/sentry,BuildingLink/sentry,gencer/sentry,ifduyue/sentry,BuildingLink/sentry,fotinakis/sentry,mitsuhiko/sentry,zenefits/sentry,fotinakis/sentry,gencer/sentry,looker/sentry,beeftornado/sentry,gencer/sentry,mitsuhiko/sentry,BayanGroup/sentry,fotinakis/sentry,daevaorn/s... | from __future__ import absolute_import
from django.template import Library
from sentry.utils.assets import get_asset_url
register = Library()
@register.simple_tag
def asset_url(module, path):
"""
Returns a versioned asset URL (located within Sentry's static files).
Example:
{% asset_url 'sentry'... | from __future__ import absolute_import
from django.template import Library
from sentry.utils.assets import get_asset_url
from sentry.utils.http import absolute_uri
register = Library()
@register.simple_tag
def asset_url(module, path):
"""
Returns a versioned asset URL (located within Sentry's static files)... | <commit_before>from __future__ import absolute_import
from django.template import Library
from sentry.utils.assets import get_asset_url
register = Library()
@register.simple_tag
def asset_url(module, path):
"""
Returns a versioned asset URL (located within Sentry's static files).
Example:
{% ass... | from __future__ import absolute_import
from django.template import Library
from sentry.utils.assets import get_asset_url
from sentry.utils.http import absolute_uri
register = Library()
@register.simple_tag
def asset_url(module, path):
"""
Returns a versioned asset URL (located within Sentry's static files)... | from __future__ import absolute_import
from django.template import Library
from sentry.utils.assets import get_asset_url
register = Library()
@register.simple_tag
def asset_url(module, path):
"""
Returns a versioned asset URL (located within Sentry's static files).
Example:
{% asset_url 'sentry'... | <commit_before>from __future__ import absolute_import
from django.template import Library
from sentry.utils.assets import get_asset_url
register = Library()
@register.simple_tag
def asset_url(module, path):
"""
Returns a versioned asset URL (located within Sentry's static files).
Example:
{% ass... |
75eacb13930ef03c1ebc1ff619f47b54cde85532 | examples/hello.py | examples/hello.py | from cell import Actor, Agent
from cell.actors import Server
from kombu import Connection
from kombu.log import setup_logging
connection = Connection()
class GreetingActor(Server):
default_routing_key = 'GreetingActor'
class state:
def greet(self, who='world'):
return 'Hello %s' % who... | from cell import Actor, Agent
from cell.actors import Server
from kombu import Connection
from kombu.log import setup_logging
connection = Connection()
class GreetingActor(Server):
default_routing_key = 'GreetingActor'
class state:
def greet(self, who='world'):
return 'Hello %s' % who
... | Use the Server class (an Actor derived class) | Use the Server class (an Actor derived class)
| Python | bsd-3-clause | celery/cell,celery/cell | from cell import Actor, Agent
from cell.actors import Server
from kombu import Connection
from kombu.log import setup_logging
connection = Connection()
class GreetingActor(Server):
default_routing_key = 'GreetingActor'
class state:
def greet(self, who='world'):
return 'Hello %s' % who... | from cell import Actor, Agent
from cell.actors import Server
from kombu import Connection
from kombu.log import setup_logging
connection = Connection()
class GreetingActor(Server):
default_routing_key = 'GreetingActor'
class state:
def greet(self, who='world'):
return 'Hello %s' % who
... | <commit_before>from cell import Actor, Agent
from cell.actors import Server
from kombu import Connection
from kombu.log import setup_logging
connection = Connection()
class GreetingActor(Server):
default_routing_key = 'GreetingActor'
class state:
def greet(self, who='world'):
return '... | from cell import Actor, Agent
from cell.actors import Server
from kombu import Connection
from kombu.log import setup_logging
connection = Connection()
class GreetingActor(Server):
default_routing_key = 'GreetingActor'
class state:
def greet(self, who='world'):
return 'Hello %s' % who
... | from cell import Actor, Agent
from cell.actors import Server
from kombu import Connection
from kombu.log import setup_logging
connection = Connection()
class GreetingActor(Server):
default_routing_key = 'GreetingActor'
class state:
def greet(self, who='world'):
return 'Hello %s' % who... | <commit_before>from cell import Actor, Agent
from cell.actors import Server
from kombu import Connection
from kombu.log import setup_logging
connection = Connection()
class GreetingActor(Server):
default_routing_key = 'GreetingActor'
class state:
def greet(self, who='world'):
return '... |
ddec6067054cc4408ac174e3ea4ffeca2a962201 | regulations/views/notice_home.py | regulations/views/notice_home.py | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from operator import itemgetter
import logging
from django.http import Http404
from django.template.response import TemplateResponse
from django.views.generic.base import View
from regulations.generator.api_reader import ApiReader
from regulations.vie... | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from operator import itemgetter
import logging
from django.http import Http404
from django.template.response import TemplateResponse
from django.views.generic.base import View
from regulations.generator.api_reader import ApiReader
from regulations.vie... | Remove unnecessary assert from view for Notice home. | Remove unnecessary assert from view for Notice home.
| Python | cc0-1.0 | 18F/regulations-site,18F/regulations-site,eregs/regulations-site,tadhg-ohiggins/regulations-site,tadhg-ohiggins/regulations-site,tadhg-ohiggins/regulations-site,eregs/regulations-site,eregs/regulations-site,eregs/regulations-site,tadhg-ohiggins/regulations-site,18F/regulations-site,18F/regulations-site | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from operator import itemgetter
import logging
from django.http import Http404
from django.template.response import TemplateResponse
from django.views.generic.base import View
from regulations.generator.api_reader import ApiReader
from regulations.vie... | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from operator import itemgetter
import logging
from django.http import Http404
from django.template.response import TemplateResponse
from django.views.generic.base import View
from regulations.generator.api_reader import ApiReader
from regulations.vie... | <commit_before># -*- coding: utf-8 -*-
from __future__ import unicode_literals
from operator import itemgetter
import logging
from django.http import Http404
from django.template.response import TemplateResponse
from django.views.generic.base import View
from regulations.generator.api_reader import ApiReader
from ... | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from operator import itemgetter
import logging
from django.http import Http404
from django.template.response import TemplateResponse
from django.views.generic.base import View
from regulations.generator.api_reader import ApiReader
from regulations.vie... | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from operator import itemgetter
import logging
from django.http import Http404
from django.template.response import TemplateResponse
from django.views.generic.base import View
from regulations.generator.api_reader import ApiReader
from regulations.vie... | <commit_before># -*- coding: utf-8 -*-
from __future__ import unicode_literals
from operator import itemgetter
import logging
from django.http import Http404
from django.template.response import TemplateResponse
from django.views.generic.base import View
from regulations.generator.api_reader import ApiReader
from ... |
7a1ddf38db725f0696482a271c32fa297d629316 | backlog/__init__.py | backlog/__init__.py | __version__ = (0, 2, 1, '', 0)
def get_version():
version = '%d.%d.%d' % __version__[0:3]
if __version__[3]:
version = '%s-%s%s' % (version, __version__[3],
(__version__[4] and str(__version__[4])) or '')
return version
| __version__ = (0, 2, 2, 'dev', 0)
def get_version():
version = '%d.%d.%d' % __version__[0:3]
if __version__[3]:
version = '%s-%s%s' % (version, __version__[3],
(__version__[4] and str(__version__[4])) or '')
return version
| Set the version to the next patch release number (in dev mode) | Set the version to the next patch release number (in dev mode)
| Python | bsd-3-clause | jszakmeister/trac-backlog,jszakmeister/trac-backlog | __version__ = (0, 2, 1, '', 0)
def get_version():
version = '%d.%d.%d' % __version__[0:3]
if __version__[3]:
version = '%s-%s%s' % (version, __version__[3],
(__version__[4] and str(__version__[4])) or '')
return version
Set the version to the next patch release number (in... | __version__ = (0, 2, 2, 'dev', 0)
def get_version():
version = '%d.%d.%d' % __version__[0:3]
if __version__[3]:
version = '%s-%s%s' % (version, __version__[3],
(__version__[4] and str(__version__[4])) or '')
return version
| <commit_before>__version__ = (0, 2, 1, '', 0)
def get_version():
version = '%d.%d.%d' % __version__[0:3]
if __version__[3]:
version = '%s-%s%s' % (version, __version__[3],
(__version__[4] and str(__version__[4])) or '')
return version
<commit_msg>Set the version to the ne... | __version__ = (0, 2, 2, 'dev', 0)
def get_version():
version = '%d.%d.%d' % __version__[0:3]
if __version__[3]:
version = '%s-%s%s' % (version, __version__[3],
(__version__[4] and str(__version__[4])) or '')
return version
| __version__ = (0, 2, 1, '', 0)
def get_version():
version = '%d.%d.%d' % __version__[0:3]
if __version__[3]:
version = '%s-%s%s' % (version, __version__[3],
(__version__[4] and str(__version__[4])) or '')
return version
Set the version to the next patch release number (in... | <commit_before>__version__ = (0, 2, 1, '', 0)
def get_version():
version = '%d.%d.%d' % __version__[0:3]
if __version__[3]:
version = '%s-%s%s' % (version, __version__[3],
(__version__[4] and str(__version__[4])) or '')
return version
<commit_msg>Set the version to the ne... |
a0af5dc1478fe8b639cc5a37898ad180f1f20a89 | src/twelve_tone/cli.py | src/twelve_tone/cli.py | """
Module that contains the command line app.
Why does this file exist, and why not put this in __main__?
You might be tempted to import things from __main__ later, but that will cause
problems: the code will get executed twice:
- When you run `python -mtwelve_tone` python will execute
``__main__.py`` as ... | """
Module that contains the command line app.
Why does this file exist, and why not put this in __main__?
You might be tempted to import things from __main__ later, but that will cause
problems: the code will get executed twice:
- When you run `python -mtwelve_tone` python will execute
``__main__.py`` as ... | Add --midi option to CLI | Add --midi option to CLI
| Python | bsd-2-clause | accraze/python-twelve-tone | """
Module that contains the command line app.
Why does this file exist, and why not put this in __main__?
You might be tempted to import things from __main__ later, but that will cause
problems: the code will get executed twice:
- When you run `python -mtwelve_tone` python will execute
``__main__.py`` as ... | """
Module that contains the command line app.
Why does this file exist, and why not put this in __main__?
You might be tempted to import things from __main__ later, but that will cause
problems: the code will get executed twice:
- When you run `python -mtwelve_tone` python will execute
``__main__.py`` as ... | <commit_before>"""
Module that contains the command line app.
Why does this file exist, and why not put this in __main__?
You might be tempted to import things from __main__ later, but that will cause
problems: the code will get executed twice:
- When you run `python -mtwelve_tone` python will execute
``__... | """
Module that contains the command line app.
Why does this file exist, and why not put this in __main__?
You might be tempted to import things from __main__ later, but that will cause
problems: the code will get executed twice:
- When you run `python -mtwelve_tone` python will execute
``__main__.py`` as ... | """
Module that contains the command line app.
Why does this file exist, and why not put this in __main__?
You might be tempted to import things from __main__ later, but that will cause
problems: the code will get executed twice:
- When you run `python -mtwelve_tone` python will execute
``__main__.py`` as ... | <commit_before>"""
Module that contains the command line app.
Why does this file exist, and why not put this in __main__?
You might be tempted to import things from __main__ later, but that will cause
problems: the code will get executed twice:
- When you run `python -mtwelve_tone` python will execute
``__... |
3868a4ef30835ed1904a37318013e20f2295a8a9 | ckanext/cob/plugin.py | ckanext/cob/plugin.py | import ckan.plugins as plugins
import ckan.plugins.toolkit as toolkit
def groups():
# Return a list of groups
return toolkit.get_action('group_list')(data_dict={'all_fields': True})
def dataset_count():
# Return a count of all datasets
result = toolkit.get_action('package_search')(data_dict={'rows': 1... | import ckan.plugins as plugins
import ckan.plugins.toolkit as toolkit
def groups():
# Return a list of groups
return toolkit.get_action('group_list')(data_dict={'all_fields': True})
def dataset_count():
# Return a count of all datasets
result = toolkit.get_action('package_search')(data_dict={'rows': 1... | Remove fantastic from COB theme | Remove fantastic from COB theme
Updates #10
| Python | agpl-3.0 | City-of-Bloomington/ckanext-cob,City-of-Bloomington/ckanext-cob | import ckan.plugins as plugins
import ckan.plugins.toolkit as toolkit
def groups():
# Return a list of groups
return toolkit.get_action('group_list')(data_dict={'all_fields': True})
def dataset_count():
# Return a count of all datasets
result = toolkit.get_action('package_search')(data_dict={'rows': 1... | import ckan.plugins as plugins
import ckan.plugins.toolkit as toolkit
def groups():
# Return a list of groups
return toolkit.get_action('group_list')(data_dict={'all_fields': True})
def dataset_count():
# Return a count of all datasets
result = toolkit.get_action('package_search')(data_dict={'rows': 1... | <commit_before>import ckan.plugins as plugins
import ckan.plugins.toolkit as toolkit
def groups():
# Return a list of groups
return toolkit.get_action('group_list')(data_dict={'all_fields': True})
def dataset_count():
# Return a count of all datasets
result = toolkit.get_action('package_search')(data_... | import ckan.plugins as plugins
import ckan.plugins.toolkit as toolkit
def groups():
# Return a list of groups
return toolkit.get_action('group_list')(data_dict={'all_fields': True})
def dataset_count():
# Return a count of all datasets
result = toolkit.get_action('package_search')(data_dict={'rows': 1... | import ckan.plugins as plugins
import ckan.plugins.toolkit as toolkit
def groups():
# Return a list of groups
return toolkit.get_action('group_list')(data_dict={'all_fields': True})
def dataset_count():
# Return a count of all datasets
result = toolkit.get_action('package_search')(data_dict={'rows': 1... | <commit_before>import ckan.plugins as plugins
import ckan.plugins.toolkit as toolkit
def groups():
# Return a list of groups
return toolkit.get_action('group_list')(data_dict={'all_fields': True})
def dataset_count():
# Return a count of all datasets
result = toolkit.get_action('package_search')(data_... |
bf7562d9f45a777163f2ac775dc9cf4afe99a930 | linter.py | linter.py | #
# linter.py
# Linter for SublimeLinter3, a code checking framework for Sublime Text 3
#
# Written by Aparajita Fishman
# Copyright (c) 2013 Aparajita Fishman
#
# Project: https://github.com/SublimeLinter/SublimeLinter-contrib-jshint
# License: MIT
#
"""This module exports the JSHint plugin linter class."""
from Sub... | #
# linter.py
# Linter for SublimeLinter3, a code checking framework for Sublime Text 3
#
# Written by Aparajita Fishman
# Copyright (c) 2013 Aparajita Fishman
#
# Project: https://github.com/SublimeLinter/SublimeLinter-contrib-jshint
# License: MIT
#
"""This module exports the JSHint plugin linter class."""
from Sub... | Change 'language' to 'syntax', that is more precise terminology. | Change 'language' to 'syntax', that is more precise terminology.
| Python | mit | tylertebbs20/Practice-SublimeLinter-jshint,tylertebbs20/Practice-SublimeLinter-jshint,SublimeLinter/SublimeLinter-jshint | #
# linter.py
# Linter for SublimeLinter3, a code checking framework for Sublime Text 3
#
# Written by Aparajita Fishman
# Copyright (c) 2013 Aparajita Fishman
#
# Project: https://github.com/SublimeLinter/SublimeLinter-contrib-jshint
# License: MIT
#
"""This module exports the JSHint plugin linter class."""
from Sub... | #
# linter.py
# Linter for SublimeLinter3, a code checking framework for Sublime Text 3
#
# Written by Aparajita Fishman
# Copyright (c) 2013 Aparajita Fishman
#
# Project: https://github.com/SublimeLinter/SublimeLinter-contrib-jshint
# License: MIT
#
"""This module exports the JSHint plugin linter class."""
from Sub... | <commit_before>#
# linter.py
# Linter for SublimeLinter3, a code checking framework for Sublime Text 3
#
# Written by Aparajita Fishman
# Copyright (c) 2013 Aparajita Fishman
#
# Project: https://github.com/SublimeLinter/SublimeLinter-contrib-jshint
# License: MIT
#
"""This module exports the JSHint plugin linter clas... | #
# linter.py
# Linter for SublimeLinter3, a code checking framework for Sublime Text 3
#
# Written by Aparajita Fishman
# Copyright (c) 2013 Aparajita Fishman
#
# Project: https://github.com/SublimeLinter/SublimeLinter-contrib-jshint
# License: MIT
#
"""This module exports the JSHint plugin linter class."""
from Sub... | #
# linter.py
# Linter for SublimeLinter3, a code checking framework for Sublime Text 3
#
# Written by Aparajita Fishman
# Copyright (c) 2013 Aparajita Fishman
#
# Project: https://github.com/SublimeLinter/SublimeLinter-contrib-jshint
# License: MIT
#
"""This module exports the JSHint plugin linter class."""
from Sub... | <commit_before>#
# linter.py
# Linter for SublimeLinter3, a code checking framework for Sublime Text 3
#
# Written by Aparajita Fishman
# Copyright (c) 2013 Aparajita Fishman
#
# Project: https://github.com/SublimeLinter/SublimeLinter-contrib-jshint
# License: MIT
#
"""This module exports the JSHint plugin linter clas... |
7cac8f8ba591315d68e223503c4e93f976c8d89d | characters/views.py | characters/views.py | from django.shortcuts import get_object_or_404, redirect, render
from characters.forms import CharacterForm
from characters.models import Character, Class, Race
def index(request):
all_characters = Character.objects.all()
context = {'all_characters': all_characters}
return render(request, 'characters/ind... | from django.shortcuts import get_object_or_404, redirect, render
from characters.forms import CharacterForm
from characters.models import Character, Class, Race
def index(request):
all_characters = Character.objects.all()
context = {'all_characters': all_characters}
return render(request, 'characters/ind... | Set default race and class without extra database queries | Set default race and class without extra database queries
| Python | mit | mpirnat/django-tutorial-v2 | from django.shortcuts import get_object_or_404, redirect, render
from characters.forms import CharacterForm
from characters.models import Character, Class, Race
def index(request):
all_characters = Character.objects.all()
context = {'all_characters': all_characters}
return render(request, 'characters/ind... | from django.shortcuts import get_object_or_404, redirect, render
from characters.forms import CharacterForm
from characters.models import Character, Class, Race
def index(request):
all_characters = Character.objects.all()
context = {'all_characters': all_characters}
return render(request, 'characters/ind... | <commit_before>from django.shortcuts import get_object_or_404, redirect, render
from characters.forms import CharacterForm
from characters.models import Character, Class, Race
def index(request):
all_characters = Character.objects.all()
context = {'all_characters': all_characters}
return render(request, ... | from django.shortcuts import get_object_or_404, redirect, render
from characters.forms import CharacterForm
from characters.models import Character, Class, Race
def index(request):
all_characters = Character.objects.all()
context = {'all_characters': all_characters}
return render(request, 'characters/ind... | from django.shortcuts import get_object_or_404, redirect, render
from characters.forms import CharacterForm
from characters.models import Character, Class, Race
def index(request):
all_characters = Character.objects.all()
context = {'all_characters': all_characters}
return render(request, 'characters/ind... | <commit_before>from django.shortcuts import get_object_or_404, redirect, render
from characters.forms import CharacterForm
from characters.models import Character, Class, Race
def index(request):
all_characters = Character.objects.all()
context = {'all_characters': all_characters}
return render(request, ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.