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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
a7340268cd5bf19d81668595c2cec5e707873737 | tests/test_objects.py | tests/test_objects.py | import sys
from funcy.objects import *
### @cached_property
def test_set_cached_property():
class A(object):
@cached_property
def prop(self):
return 7
a = A()
assert a.prop == 7
a.prop = 42
assert a.prop == 42
### Monkey tests
def test_monkey():
class A(object... | import sys
from funcy.objects import *
### @cached_property
def test_set_cached_property():
calls = [0]
class A(object):
@cached_property
def prop(self):
calls[0] += 1
return 7
a = A()
assert a.prop == 7
assert a.prop == 7
assert calls == [1]
a.p... | Test that @cached_property really caches | Test that @cached_property really caches
| Python | bsd-3-clause | musicpax/funcy,ma-ric/funcy,Suor/funcy | import sys
from funcy.objects import *
### @cached_property
def test_set_cached_property():
class A(object):
@cached_property
def prop(self):
return 7
a = A()
assert a.prop == 7
a.prop = 42
assert a.prop == 42
### Monkey tests
def test_monkey():
class A(object... | import sys
from funcy.objects import *
### @cached_property
def test_set_cached_property():
calls = [0]
class A(object):
@cached_property
def prop(self):
calls[0] += 1
return 7
a = A()
assert a.prop == 7
assert a.prop == 7
assert calls == [1]
a.p... | <commit_before>import sys
from funcy.objects import *
### @cached_property
def test_set_cached_property():
class A(object):
@cached_property
def prop(self):
return 7
a = A()
assert a.prop == 7
a.prop = 42
assert a.prop == 42
### Monkey tests
def test_monkey():
... | import sys
from funcy.objects import *
### @cached_property
def test_set_cached_property():
calls = [0]
class A(object):
@cached_property
def prop(self):
calls[0] += 1
return 7
a = A()
assert a.prop == 7
assert a.prop == 7
assert calls == [1]
a.p... | import sys
from funcy.objects import *
### @cached_property
def test_set_cached_property():
class A(object):
@cached_property
def prop(self):
return 7
a = A()
assert a.prop == 7
a.prop = 42
assert a.prop == 42
### Monkey tests
def test_monkey():
class A(object... | <commit_before>import sys
from funcy.objects import *
### @cached_property
def test_set_cached_property():
class A(object):
@cached_property
def prop(self):
return 7
a = A()
assert a.prop == 7
a.prop = 42
assert a.prop == 42
### Monkey tests
def test_monkey():
... |
5a4eca867882299ce3ad8b0cc15c39b4ada61c0a | PublicWebServicesAPI_AND_servercommandScripts/addInfoToCSVreport.py | PublicWebServicesAPI_AND_servercommandScripts/addInfoToCSVreport.py | #!/usr/bin/env python3
from csv import reader
from sys import stdin
from xmlrpc.client import ServerProxy
from ssl import create_default_context, Purpose
# #TODO Add a note about which report this example works with.
host="https://localhost:9192/rpc/api/xmlrpc" # If not localhost then this address will need to b... | #!/usr/bin/env python3
from csv import reader
from sys import stdin
from xmlrpc.client import ServerProxy
from ssl import create_default_context, Purpose
# Script to add user account notes to account_configurations.csv
host="https://localhost:9192/rpc/api/xmlrpc" # If not localhost then this address will need to ... | Add relevant notes and documentation to addInfoToCSVReport.py | Update: Add relevant notes and documentation to addInfoToCSVReport.py
| Python | mit | PaperCutSoftware/PaperCutExamples,PaperCutSoftware/PaperCutExamples,PaperCutSoftware/PaperCutExamples,PaperCutSoftware/PaperCutExamples,PaperCutSoftware/PaperCutExamples,PaperCutSoftware/PaperCutExamples | #!/usr/bin/env python3
from csv import reader
from sys import stdin
from xmlrpc.client import ServerProxy
from ssl import create_default_context, Purpose
# #TODO Add a note about which report this example works with.
host="https://localhost:9192/rpc/api/xmlrpc" # If not localhost then this address will need to b... | #!/usr/bin/env python3
from csv import reader
from sys import stdin
from xmlrpc.client import ServerProxy
from ssl import create_default_context, Purpose
# Script to add user account notes to account_configurations.csv
host="https://localhost:9192/rpc/api/xmlrpc" # If not localhost then this address will need to ... | <commit_before>#!/usr/bin/env python3
from csv import reader
from sys import stdin
from xmlrpc.client import ServerProxy
from ssl import create_default_context, Purpose
# #TODO Add a note about which report this example works with.
host="https://localhost:9192/rpc/api/xmlrpc" # If not localhost then this address... | #!/usr/bin/env python3
from csv import reader
from sys import stdin
from xmlrpc.client import ServerProxy
from ssl import create_default_context, Purpose
# Script to add user account notes to account_configurations.csv
host="https://localhost:9192/rpc/api/xmlrpc" # If not localhost then this address will need to ... | #!/usr/bin/env python3
from csv import reader
from sys import stdin
from xmlrpc.client import ServerProxy
from ssl import create_default_context, Purpose
# #TODO Add a note about which report this example works with.
host="https://localhost:9192/rpc/api/xmlrpc" # If not localhost then this address will need to b... | <commit_before>#!/usr/bin/env python3
from csv import reader
from sys import stdin
from xmlrpc.client import ServerProxy
from ssl import create_default_context, Purpose
# #TODO Add a note about which report this example works with.
host="https://localhost:9192/rpc/api/xmlrpc" # If not localhost then this address... |
587f6c77153235e3defcc6b0b6598634e1ee2828 | lib/sqlalchemy/dialects/__init__.py | lib/sqlalchemy/dialects/__init__.py | # dialects/__init__.py
# Copyright (C) 2005-2020 the SQLAlchemy authors and contributors
# <see AUTHORS file>
#
# This module is part of SQLAlchemy and is released under
# the MIT License: http://www.opensource.org/licenses/mit-license.php
__all__ = (
"firebird",
"mssql",
"mysql",
"oracle",
"postgr... | # dialects/__init__.py
# Copyright (C) 2005-2020 the SQLAlchemy authors and contributors
# <see AUTHORS file>
#
# This module is part of SQLAlchemy and is released under
# the MIT License: http://www.opensource.org/licenses/mit-license.php
__all__ = (
"firebird",
"mssql",
"mysql",
"oracle",
"postgr... | Load external firebird or sybase dialect if available | Load external firebird or sybase dialect if available
Fixes: #5318
Extension of I1660abb11c02656fbf388f2f9c4257075111be58
Change-Id: I32b678430497327f9b08f821bd345a2557e34b1f
| Python | mit | monetate/sqlalchemy,j5int/sqlalchemy,j5int/sqlalchemy,zzzeek/sqlalchemy,sqlalchemy/sqlalchemy,monetate/sqlalchemy | # dialects/__init__.py
# Copyright (C) 2005-2020 the SQLAlchemy authors and contributors
# <see AUTHORS file>
#
# This module is part of SQLAlchemy and is released under
# the MIT License: http://www.opensource.org/licenses/mit-license.php
__all__ = (
"firebird",
"mssql",
"mysql",
"oracle",
"postgr... | # dialects/__init__.py
# Copyright (C) 2005-2020 the SQLAlchemy authors and contributors
# <see AUTHORS file>
#
# This module is part of SQLAlchemy and is released under
# the MIT License: http://www.opensource.org/licenses/mit-license.php
__all__ = (
"firebird",
"mssql",
"mysql",
"oracle",
"postgr... | <commit_before># dialects/__init__.py
# Copyright (C) 2005-2020 the SQLAlchemy authors and contributors
# <see AUTHORS file>
#
# This module is part of SQLAlchemy and is released under
# the MIT License: http://www.opensource.org/licenses/mit-license.php
__all__ = (
"firebird",
"mssql",
"mysql",
"oracl... | # dialects/__init__.py
# Copyright (C) 2005-2020 the SQLAlchemy authors and contributors
# <see AUTHORS file>
#
# This module is part of SQLAlchemy and is released under
# the MIT License: http://www.opensource.org/licenses/mit-license.php
__all__ = (
"firebird",
"mssql",
"mysql",
"oracle",
"postgr... | # dialects/__init__.py
# Copyright (C) 2005-2020 the SQLAlchemy authors and contributors
# <see AUTHORS file>
#
# This module is part of SQLAlchemy and is released under
# the MIT License: http://www.opensource.org/licenses/mit-license.php
__all__ = (
"firebird",
"mssql",
"mysql",
"oracle",
"postgr... | <commit_before># dialects/__init__.py
# Copyright (C) 2005-2020 the SQLAlchemy authors and contributors
# <see AUTHORS file>
#
# This module is part of SQLAlchemy and is released under
# the MIT License: http://www.opensource.org/licenses/mit-license.php
__all__ = (
"firebird",
"mssql",
"mysql",
"oracl... |
f4c01d85eb5a3873ea80e24b3dae50bd3ab87f4a | llvmlite/binding/linker.py | llvmlite/binding/linker.py | from __future__ import print_function, absolute_import
from ctypes import c_int, c_char_p, POINTER
from . import ffi
def link_modules(dst, src):
dst.verify()
src.verify()
with ffi.OutputString() as outerr:
err = ffi.lib.LLVMPY_LinkModules(dst, src, outerr)
# The underlying module was destr... | from __future__ import print_function, absolute_import
from ctypes import c_int, c_char_p, POINTER
from . import ffi
def link_modules(dst, src):
with ffi.OutputString() as outerr:
err = ffi.lib.LLVMPY_LinkModules(dst, src, outerr)
# The underlying module was destroyed
src.detach()
... | Remove unnecessary verify. We should let user run the verification instead of doing it in linkage. | Remove unnecessary verify.
We should let user run the verification instead of doing it in linkage.
| Python | bsd-2-clause | numba/llvmlite,numba/llvmlite,numba/llvmlite,numba/llvmlite | from __future__ import print_function, absolute_import
from ctypes import c_int, c_char_p, POINTER
from . import ffi
def link_modules(dst, src):
dst.verify()
src.verify()
with ffi.OutputString() as outerr:
err = ffi.lib.LLVMPY_LinkModules(dst, src, outerr)
# The underlying module was destr... | from __future__ import print_function, absolute_import
from ctypes import c_int, c_char_p, POINTER
from . import ffi
def link_modules(dst, src):
with ffi.OutputString() as outerr:
err = ffi.lib.LLVMPY_LinkModules(dst, src, outerr)
# The underlying module was destroyed
src.detach()
... | <commit_before>from __future__ import print_function, absolute_import
from ctypes import c_int, c_char_p, POINTER
from . import ffi
def link_modules(dst, src):
dst.verify()
src.verify()
with ffi.OutputString() as outerr:
err = ffi.lib.LLVMPY_LinkModules(dst, src, outerr)
# The underlying m... | from __future__ import print_function, absolute_import
from ctypes import c_int, c_char_p, POINTER
from . import ffi
def link_modules(dst, src):
with ffi.OutputString() as outerr:
err = ffi.lib.LLVMPY_LinkModules(dst, src, outerr)
# The underlying module was destroyed
src.detach()
... | from __future__ import print_function, absolute_import
from ctypes import c_int, c_char_p, POINTER
from . import ffi
def link_modules(dst, src):
dst.verify()
src.verify()
with ffi.OutputString() as outerr:
err = ffi.lib.LLVMPY_LinkModules(dst, src, outerr)
# The underlying module was destr... | <commit_before>from __future__ import print_function, absolute_import
from ctypes import c_int, c_char_p, POINTER
from . import ffi
def link_modules(dst, src):
dst.verify()
src.verify()
with ffi.OutputString() as outerr:
err = ffi.lib.LLVMPY_LinkModules(dst, src, outerr)
# The underlying m... |
60b039aabb94c1e5a50bb19bb7267a0fd3ceaa86 | mollie/api/objects/list.py | mollie/api/objects/list.py | from .base import Base
class List(Base):
current = None
def __init__(self, result, object_type):
Base.__init__(self, result)
self.object_type = object_type
def __len__(self):
"""Return the count field."""
return int(self['count'])
def get_object_name(self):
r... | from .base import Base
class List(Base):
current = None
def __init__(self, result, object_type):
Base.__init__(self, result)
self.object_type = object_type
def __len__(self):
"""Return the count field."""
return int(self['count'])
def get_object_name(self):
r... | Drop obsoleted support for offset. | Drop obsoleted support for offset.
| Python | bsd-2-clause | mollie/mollie-api-python | from .base import Base
class List(Base):
current = None
def __init__(self, result, object_type):
Base.__init__(self, result)
self.object_type = object_type
def __len__(self):
"""Return the count field."""
return int(self['count'])
def get_object_name(self):
r... | from .base import Base
class List(Base):
current = None
def __init__(self, result, object_type):
Base.__init__(self, result)
self.object_type = object_type
def __len__(self):
"""Return the count field."""
return int(self['count'])
def get_object_name(self):
r... | <commit_before>from .base import Base
class List(Base):
current = None
def __init__(self, result, object_type):
Base.__init__(self, result)
self.object_type = object_type
def __len__(self):
"""Return the count field."""
return int(self['count'])
def get_object_name(s... | from .base import Base
class List(Base):
current = None
def __init__(self, result, object_type):
Base.__init__(self, result)
self.object_type = object_type
def __len__(self):
"""Return the count field."""
return int(self['count'])
def get_object_name(self):
r... | from .base import Base
class List(Base):
current = None
def __init__(self, result, object_type):
Base.__init__(self, result)
self.object_type = object_type
def __len__(self):
"""Return the count field."""
return int(self['count'])
def get_object_name(self):
r... | <commit_before>from .base import Base
class List(Base):
current = None
def __init__(self, result, object_type):
Base.__init__(self, result)
self.object_type = object_type
def __len__(self):
"""Return the count field."""
return int(self['count'])
def get_object_name(s... |
ba211a0037aa26d5d1fc9cb7a0de55a46b481a82 | prometapi/bicikeljproxy/management/commands/bicikelj_fetch_citybikes.py | prometapi/bicikeljproxy/management/commands/bicikelj_fetch_citybikes.py | from django.core.management.base import BaseCommand, CommandError
from optparse import make_option
import os
import sys
class Command(BaseCommand):
help = 'Fetch bicikelj XMLs and store them in order not to storm on official servers'
def handle(self, *args, **options):
from prometapi.bicikeljproxy.models import ... | from django.core.management.base import BaseCommand, CommandError
from optparse import make_option
import os
import sys
class Command(BaseCommand):
help = 'Fetch bicikelj XMLs and store them in order not to storm on official servers'
def handle(self, *args, **options):
from prometapi.bicikeljproxy.models import ... | Print data when citybikes throws error. | Print data when citybikes throws error.
| Python | agpl-3.0 | zejn/prometapi,izacus/prometapi,zejn/prometapi,izacus/prometapi | from django.core.management.base import BaseCommand, CommandError
from optparse import make_option
import os
import sys
class Command(BaseCommand):
help = 'Fetch bicikelj XMLs and store them in order not to storm on official servers'
def handle(self, *args, **options):
from prometapi.bicikeljproxy.models import ... | from django.core.management.base import BaseCommand, CommandError
from optparse import make_option
import os
import sys
class Command(BaseCommand):
help = 'Fetch bicikelj XMLs and store them in order not to storm on official servers'
def handle(self, *args, **options):
from prometapi.bicikeljproxy.models import ... | <commit_before>from django.core.management.base import BaseCommand, CommandError
from optparse import make_option
import os
import sys
class Command(BaseCommand):
help = 'Fetch bicikelj XMLs and store them in order not to storm on official servers'
def handle(self, *args, **options):
from prometapi.bicikeljproxy... | from django.core.management.base import BaseCommand, CommandError
from optparse import make_option
import os
import sys
class Command(BaseCommand):
help = 'Fetch bicikelj XMLs and store them in order not to storm on official servers'
def handle(self, *args, **options):
from prometapi.bicikeljproxy.models import ... | from django.core.management.base import BaseCommand, CommandError
from optparse import make_option
import os
import sys
class Command(BaseCommand):
help = 'Fetch bicikelj XMLs and store them in order not to storm on official servers'
def handle(self, *args, **options):
from prometapi.bicikeljproxy.models import ... | <commit_before>from django.core.management.base import BaseCommand, CommandError
from optparse import make_option
import os
import sys
class Command(BaseCommand):
help = 'Fetch bicikelj XMLs and store them in order not to storm on official servers'
def handle(self, *args, **options):
from prometapi.bicikeljproxy... |
fbbee24a71f840131748bc8ca1cadc7759c58d52 | molo/core/content_import/api/urls.py | molo/core/content_import/api/urls.py | from django.conf.urls import url
from molo.core.content_import.api import admin_views
urlpatterns = [
url(r"^import-articles/$", admin_views.ArticleImportView.as_view(), name="article-import"),
url(r"^parent/$", admin_views.ChooseParentView.as_view(model_admin=admin_views.ArticleModelAdmin()), name="test-par... | from django.conf.urls import url
from molo.core.content_import.api import admin_views
urlpatterns = [
url(r"^import-articles/$", admin_views.ArticleImportView.as_view(), name="article-import"),
url(r"^parent/$", admin_views.ArticleChooserView.as_view(model_admin=admin_views.ArticleModelAdmin()), name="test-p... | Fix name of Aritlce Parent Chooser view as used by the URLs | Fix name of Aritlce Parent Chooser view as used by the URLs
| Python | bsd-2-clause | praekelt/molo,praekelt/molo,praekelt/molo,praekelt/molo | from django.conf.urls import url
from molo.core.content_import.api import admin_views
urlpatterns = [
url(r"^import-articles/$", admin_views.ArticleImportView.as_view(), name="article-import"),
url(r"^parent/$", admin_views.ChooseParentView.as_view(model_admin=admin_views.ArticleModelAdmin()), name="test-par... | from django.conf.urls import url
from molo.core.content_import.api import admin_views
urlpatterns = [
url(r"^import-articles/$", admin_views.ArticleImportView.as_view(), name="article-import"),
url(r"^parent/$", admin_views.ArticleChooserView.as_view(model_admin=admin_views.ArticleModelAdmin()), name="test-p... | <commit_before>from django.conf.urls import url
from molo.core.content_import.api import admin_views
urlpatterns = [
url(r"^import-articles/$", admin_views.ArticleImportView.as_view(), name="article-import"),
url(r"^parent/$", admin_views.ChooseParentView.as_view(model_admin=admin_views.ArticleModelAdmin()),... | from django.conf.urls import url
from molo.core.content_import.api import admin_views
urlpatterns = [
url(r"^import-articles/$", admin_views.ArticleImportView.as_view(), name="article-import"),
url(r"^parent/$", admin_views.ArticleChooserView.as_view(model_admin=admin_views.ArticleModelAdmin()), name="test-p... | from django.conf.urls import url
from molo.core.content_import.api import admin_views
urlpatterns = [
url(r"^import-articles/$", admin_views.ArticleImportView.as_view(), name="article-import"),
url(r"^parent/$", admin_views.ChooseParentView.as_view(model_admin=admin_views.ArticleModelAdmin()), name="test-par... | <commit_before>from django.conf.urls import url
from molo.core.content_import.api import admin_views
urlpatterns = [
url(r"^import-articles/$", admin_views.ArticleImportView.as_view(), name="article-import"),
url(r"^parent/$", admin_views.ChooseParentView.as_view(model_admin=admin_views.ArticleModelAdmin()),... |
ce97f7677a84db351e3d2cadf01691fc879a8fbe | profile/files/applications/report/fedora/check_updates.py | profile/files/applications/report/fedora/check_updates.py | dnf_failure = False
base = dnf.Base()
try:
base.read_all_repos()
base.fill_sack()
upgrades = base.sack.query().upgrades().run()
except:
dnf_failure = True
if dnf_failure:
pkg_output = -1
else:
pkg_output = len(upgrades)
| dnf_failure = False
base = dnf.Base()
base.conf.substitutions.update_from_etc("/")
try:
base.read_all_repos()
base.fill_sack()
upgrades = base.sack.query().upgrades().run()
except:
dnf_failure = True
if dnf_failure:
pkg_output = -1
else:
pkg_output = len(upgrades)
| Read custom variables (Required to support CentOS Stream) | Read custom variables (Required to support CentOS Stream)
| Python | apache-2.0 | norcams/himlar,tanzr/himlar,raykrist/himlar,norcams/himlar,norcams/himlar,TorLdre/himlar,tanzr/himlar,tanzr/himlar,raykrist/himlar,TorLdre/himlar,norcams/himlar,TorLdre/himlar,raykrist/himlar,mikaeld66/himlar,mikaeld66/himlar,mikaeld66/himlar,tanzr/himlar,TorLdre/himlar,raykrist/himlar,tanzr/himlar,norcams/himlar,raykr... | dnf_failure = False
base = dnf.Base()
try:
base.read_all_repos()
base.fill_sack()
upgrades = base.sack.query().upgrades().run()
except:
dnf_failure = True
if dnf_failure:
pkg_output = -1
else:
pkg_output = len(upgrades)
Read custom variables (Required to support CentOS Stream) | dnf_failure = False
base = dnf.Base()
base.conf.substitutions.update_from_etc("/")
try:
base.read_all_repos()
base.fill_sack()
upgrades = base.sack.query().upgrades().run()
except:
dnf_failure = True
if dnf_failure:
pkg_output = -1
else:
pkg_output = len(upgrades)
| <commit_before>dnf_failure = False
base = dnf.Base()
try:
base.read_all_repos()
base.fill_sack()
upgrades = base.sack.query().upgrades().run()
except:
dnf_failure = True
if dnf_failure:
pkg_output = -1
else:
pkg_output = len(upgrades)
<commit_msg>Read custom variables (Required to support Ce... | dnf_failure = False
base = dnf.Base()
base.conf.substitutions.update_from_etc("/")
try:
base.read_all_repos()
base.fill_sack()
upgrades = base.sack.query().upgrades().run()
except:
dnf_failure = True
if dnf_failure:
pkg_output = -1
else:
pkg_output = len(upgrades)
| dnf_failure = False
base = dnf.Base()
try:
base.read_all_repos()
base.fill_sack()
upgrades = base.sack.query().upgrades().run()
except:
dnf_failure = True
if dnf_failure:
pkg_output = -1
else:
pkg_output = len(upgrades)
Read custom variables (Required to support CentOS Stream)dnf_failure = F... | <commit_before>dnf_failure = False
base = dnf.Base()
try:
base.read_all_repos()
base.fill_sack()
upgrades = base.sack.query().upgrades().run()
except:
dnf_failure = True
if dnf_failure:
pkg_output = -1
else:
pkg_output = len(upgrades)
<commit_msg>Read custom variables (Required to support Ce... |
56af29b28ff236c4380a11e4c498ae2c61917e62 | tests/test_level_standards.py | tests/test_level_standards.py | import sys
def test_level_standards(logging, log):
"""
Ensure that the standard log levels work
"""
import logging_levels.standards
del sys.modules['logging_levels.standards'] # Force module to re-import
assert logging.TRACE == 8
assert logging.VERBOSE == 9
log.verbose("I've ... | import sys
def test_level_standards(logging, log):
"""
Ensure that the standard log levels work
"""
import logging_levels.standards
del sys.modules['logging_levels.standards'] # Force module to re-import
assert logging.TRACE == 5
assert logging.VERBOSE == 7
log.verbose("I've ... | Fix standards tests for log levels | Fix standards tests for log levels
| Python | mit | six8/logging-levels | import sys
def test_level_standards(logging, log):
"""
Ensure that the standard log levels work
"""
import logging_levels.standards
del sys.modules['logging_levels.standards'] # Force module to re-import
assert logging.TRACE == 8
assert logging.VERBOSE == 9
log.verbose("I've ... | import sys
def test_level_standards(logging, log):
"""
Ensure that the standard log levels work
"""
import logging_levels.standards
del sys.modules['logging_levels.standards'] # Force module to re-import
assert logging.TRACE == 5
assert logging.VERBOSE == 7
log.verbose("I've ... | <commit_before>import sys
def test_level_standards(logging, log):
"""
Ensure that the standard log levels work
"""
import logging_levels.standards
del sys.modules['logging_levels.standards'] # Force module to re-import
assert logging.TRACE == 8
assert logging.VERBOSE == 9
log... | import sys
def test_level_standards(logging, log):
"""
Ensure that the standard log levels work
"""
import logging_levels.standards
del sys.modules['logging_levels.standards'] # Force module to re-import
assert logging.TRACE == 5
assert logging.VERBOSE == 7
log.verbose("I've ... | import sys
def test_level_standards(logging, log):
"""
Ensure that the standard log levels work
"""
import logging_levels.standards
del sys.modules['logging_levels.standards'] # Force module to re-import
assert logging.TRACE == 8
assert logging.VERBOSE == 9
log.verbose("I've ... | <commit_before>import sys
def test_level_standards(logging, log):
"""
Ensure that the standard log levels work
"""
import logging_levels.standards
del sys.modules['logging_levels.standards'] # Force module to re-import
assert logging.TRACE == 8
assert logging.VERBOSE == 9
log... |
5085e2f8c97ecab6617b4f7b0c8250095d47b22d | boardinghouse/templatetags/boardinghouse.py | boardinghouse/templatetags/boardinghouse.py | from django import template
from ..schema import is_shared_model as _is_shared_model
from ..schema import get_schema_model
Schema = get_schema_model()
register = template.Library()
@register.filter
def is_schema_aware(obj):
return obj and not _is_shared_model(obj)
@register.filter
def is_shared_model(obj):
... | from django import template
from ..schema import is_shared_model as _is_shared_model
from ..schema import _get_schema
register = template.Library()
@register.filter
def is_schema_aware(obj):
return obj and not _is_shared_model(obj)
@register.filter
def is_shared_model(obj):
return obj and _is_shared_model(o... | Remove a database access from the template tag. | Remove a database access from the template tag.
--HG--
branch : schema-invitations
| Python | bsd-3-clause | schinckel/django-boardinghouse,schinckel/django-boardinghouse,schinckel/django-boardinghouse | from django import template
from ..schema import is_shared_model as _is_shared_model
from ..schema import get_schema_model
Schema = get_schema_model()
register = template.Library()
@register.filter
def is_schema_aware(obj):
return obj and not _is_shared_model(obj)
@register.filter
def is_shared_model(obj):
... | from django import template
from ..schema import is_shared_model as _is_shared_model
from ..schema import _get_schema
register = template.Library()
@register.filter
def is_schema_aware(obj):
return obj and not _is_shared_model(obj)
@register.filter
def is_shared_model(obj):
return obj and _is_shared_model(o... | <commit_before>from django import template
from ..schema import is_shared_model as _is_shared_model
from ..schema import get_schema_model
Schema = get_schema_model()
register = template.Library()
@register.filter
def is_schema_aware(obj):
return obj and not _is_shared_model(obj)
@register.filter
def is_shared_... | from django import template
from ..schema import is_shared_model as _is_shared_model
from ..schema import _get_schema
register = template.Library()
@register.filter
def is_schema_aware(obj):
return obj and not _is_shared_model(obj)
@register.filter
def is_shared_model(obj):
return obj and _is_shared_model(o... | from django import template
from ..schema import is_shared_model as _is_shared_model
from ..schema import get_schema_model
Schema = get_schema_model()
register = template.Library()
@register.filter
def is_schema_aware(obj):
return obj and not _is_shared_model(obj)
@register.filter
def is_shared_model(obj):
... | <commit_before>from django import template
from ..schema import is_shared_model as _is_shared_model
from ..schema import get_schema_model
Schema = get_schema_model()
register = template.Library()
@register.filter
def is_schema_aware(obj):
return obj and not _is_shared_model(obj)
@register.filter
def is_shared_... |
b2b6874e044b6984f8b0a300963ff340df62abc9 | ycml/transformers/base.py | ycml/transformers/base.py | import logging
import numpy as np
from sklearn.base import BaseEstimator, TransformerMixin
from ..utils import Timer
__all__ = ['PureTransformer', 'identity']
logger = logging.getLogger(__name__)
# Helper class. A transformer that only does transformation and does not need to fit any internal parameters.
class ... | import logging
import numpy as np
from sklearn.base import BaseEstimator, TransformerMixin
from ..utils import Timer
__all__ = ['PureTransformer', 'identity']
logger = logging.getLogger(__name__)
# Helper class. A transformer that only does transformation and does not need to fit any internal parameters.
class ... | Add `**kwargs` support to transformers | Add `**kwargs` support to transformers
| Python | apache-2.0 | skylander86/ycml | import logging
import numpy as np
from sklearn.base import BaseEstimator, TransformerMixin
from ..utils import Timer
__all__ = ['PureTransformer', 'identity']
logger = logging.getLogger(__name__)
# Helper class. A transformer that only does transformation and does not need to fit any internal parameters.
class ... | import logging
import numpy as np
from sklearn.base import BaseEstimator, TransformerMixin
from ..utils import Timer
__all__ = ['PureTransformer', 'identity']
logger = logging.getLogger(__name__)
# Helper class. A transformer that only does transformation and does not need to fit any internal parameters.
class ... | <commit_before>import logging
import numpy as np
from sklearn.base import BaseEstimator, TransformerMixin
from ..utils import Timer
__all__ = ['PureTransformer', 'identity']
logger = logging.getLogger(__name__)
# Helper class. A transformer that only does transformation and does not need to fit any internal par... | import logging
import numpy as np
from sklearn.base import BaseEstimator, TransformerMixin
from ..utils import Timer
__all__ = ['PureTransformer', 'identity']
logger = logging.getLogger(__name__)
# Helper class. A transformer that only does transformation and does not need to fit any internal parameters.
class ... | import logging
import numpy as np
from sklearn.base import BaseEstimator, TransformerMixin
from ..utils import Timer
__all__ = ['PureTransformer', 'identity']
logger = logging.getLogger(__name__)
# Helper class. A transformer that only does transformation and does not need to fit any internal parameters.
class ... | <commit_before>import logging
import numpy as np
from sklearn.base import BaseEstimator, TransformerMixin
from ..utils import Timer
__all__ = ['PureTransformer', 'identity']
logger = logging.getLogger(__name__)
# Helper class. A transformer that only does transformation and does not need to fit any internal par... |
538ae3b96399e207e38bdf53bdd1c8f738b82e33 | tests/test_pagination.py | tests/test_pagination.py | from hn import HN
hn = HN()
def test_pagination_top():
"""
This test checks if the pagination works for the front page by comparing
number of stories in 2 pages.
"""
assert len(hn.get_stories(page_limit=2)) == 2 * 30
def test_pagination_newest():
"""
This test checks if the pagination wo... | from hn import HN
hn = HN()
def test_pagination_top_for_2_pages():
"""
This test checks if the pagination works for the front page by comparing
number of stories in 2 page.
"""
stories = hn.get_stories(page_limit=2)
assert len(stories) == 2 * 30
def test_pagination_newest_for_3_pages():
... | Add test cases for unexpected page_limit | Add test cases for unexpected page_limit
| Python | mit | brunocappelli/HackerNewsAPI,karan/HackerNewsAPI,brunocappelli/HackerNewsAPI,karan/HackerNewsAPI,brunocappelli/HackerNewsAPI | from hn import HN
hn = HN()
def test_pagination_top():
"""
This test checks if the pagination works for the front page by comparing
number of stories in 2 pages.
"""
assert len(hn.get_stories(page_limit=2)) == 2 * 30
def test_pagination_newest():
"""
This test checks if the pagination wo... | from hn import HN
hn = HN()
def test_pagination_top_for_2_pages():
"""
This test checks if the pagination works for the front page by comparing
number of stories in 2 page.
"""
stories = hn.get_stories(page_limit=2)
assert len(stories) == 2 * 30
def test_pagination_newest_for_3_pages():
... | <commit_before>from hn import HN
hn = HN()
def test_pagination_top():
"""
This test checks if the pagination works for the front page by comparing
number of stories in 2 pages.
"""
assert len(hn.get_stories(page_limit=2)) == 2 * 30
def test_pagination_newest():
"""
This test checks if th... | from hn import HN
hn = HN()
def test_pagination_top_for_2_pages():
"""
This test checks if the pagination works for the front page by comparing
number of stories in 2 page.
"""
stories = hn.get_stories(page_limit=2)
assert len(stories) == 2 * 30
def test_pagination_newest_for_3_pages():
... | from hn import HN
hn = HN()
def test_pagination_top():
"""
This test checks if the pagination works for the front page by comparing
number of stories in 2 pages.
"""
assert len(hn.get_stories(page_limit=2)) == 2 * 30
def test_pagination_newest():
"""
This test checks if the pagination wo... | <commit_before>from hn import HN
hn = HN()
def test_pagination_top():
"""
This test checks if the pagination works for the front page by comparing
number of stories in 2 pages.
"""
assert len(hn.get_stories(page_limit=2)) == 2 * 30
def test_pagination_newest():
"""
This test checks if th... |
7d894c2faa2d9dfac8eec5389ecb500a8f5f8e63 | bin/pymodules/apitest/jscomponent.py | bin/pymodules/apitest/jscomponent.py | import json
import rexviewer as r
import naali
import urllib2
from componenthandler import DynamiccomponentHandler
class JavascriptHandler(DynamiccomponentHandler):
GUINAME = "Javascript Handler"
def __init__(self):
DynamiccomponentHandler.__init__(self)
self.jsloaded = False
def onChang... | import json
import rexviewer as r
import naali
import urllib2
from componenthandler import DynamiccomponentHandler
class JavascriptHandler(DynamiccomponentHandler):
GUINAME = "Javascript Handler"
def __init__(self):
DynamiccomponentHandler.__init__(self)
self.jsloaded = False
def onChang... | Add placeable to javascript context | Add placeable to javascript context
| Python | apache-2.0 | realXtend/tundra,antont/tundra,realXtend/tundra,AlphaStaxLLC/tundra,AlphaStaxLLC/tundra,pharos3d/tundra,AlphaStaxLLC/tundra,pharos3d/tundra,BogusCurry/tundra,AlphaStaxLLC/tundra,jesterKing/naali,pharos3d/tundra,antont/tundra,BogusCurry/tundra,BogusCurry/tundra,realXtend/tundra,jesterKing/naali,antont/tundra,antont/tund... | import json
import rexviewer as r
import naali
import urllib2
from componenthandler import DynamiccomponentHandler
class JavascriptHandler(DynamiccomponentHandler):
GUINAME = "Javascript Handler"
def __init__(self):
DynamiccomponentHandler.__init__(self)
self.jsloaded = False
def onChang... | import json
import rexviewer as r
import naali
import urllib2
from componenthandler import DynamiccomponentHandler
class JavascriptHandler(DynamiccomponentHandler):
GUINAME = "Javascript Handler"
def __init__(self):
DynamiccomponentHandler.__init__(self)
self.jsloaded = False
def onChang... | <commit_before>import json
import rexviewer as r
import naali
import urllib2
from componenthandler import DynamiccomponentHandler
class JavascriptHandler(DynamiccomponentHandler):
GUINAME = "Javascript Handler"
def __init__(self):
DynamiccomponentHandler.__init__(self)
self.jsloaded = False
... | import json
import rexviewer as r
import naali
import urllib2
from componenthandler import DynamiccomponentHandler
class JavascriptHandler(DynamiccomponentHandler):
GUINAME = "Javascript Handler"
def __init__(self):
DynamiccomponentHandler.__init__(self)
self.jsloaded = False
def onChang... | import json
import rexviewer as r
import naali
import urllib2
from componenthandler import DynamiccomponentHandler
class JavascriptHandler(DynamiccomponentHandler):
GUINAME = "Javascript Handler"
def __init__(self):
DynamiccomponentHandler.__init__(self)
self.jsloaded = False
def onChang... | <commit_before>import json
import rexviewer as r
import naali
import urllib2
from componenthandler import DynamiccomponentHandler
class JavascriptHandler(DynamiccomponentHandler):
GUINAME = "Javascript Handler"
def __init__(self):
DynamiccomponentHandler.__init__(self)
self.jsloaded = False
... |
4c922ea8e2ebd6e2ffb001f4733fcf7fa5edc250 | shuup_workbench/wsgi.py | shuup_workbench/wsgi.py | # This file is part of Shuup.
#
# Copyright (c) 2012-2017, Shoop Commerce Ltd. All rights reserved.
#
# This source code is licensed under the OSL-3.0 license found in the
# LICENSE file in the root directory of this source tree.
"""
WSGI config for shuup_workbench project.
It exposes the WSGI callable as a module-lev... | # This file is part of Shuup.
#
# Copyright (c) 2012-2017, Shoop Commerce Ltd. All rights reserved.
#
# This source code is licensed under the OSL-3.0 license found in the
# LICENSE file in the root directory of this source tree.
"""
WSGI config for shuup_workbench project.
It exposes the WSGI callable as a module-lev... | Mark env setter line as noqa | workbench: Mark env setter line as noqa
| Python | agpl-3.0 | shoopio/shoop,suutari-ai/shoop,shoopio/shoop,shoopio/shoop,suutari-ai/shoop,suutari-ai/shoop | # This file is part of Shuup.
#
# Copyright (c) 2012-2017, Shoop Commerce Ltd. All rights reserved.
#
# This source code is licensed under the OSL-3.0 license found in the
# LICENSE file in the root directory of this source tree.
"""
WSGI config for shuup_workbench project.
It exposes the WSGI callable as a module-lev... | # This file is part of Shuup.
#
# Copyright (c) 2012-2017, Shoop Commerce Ltd. All rights reserved.
#
# This source code is licensed under the OSL-3.0 license found in the
# LICENSE file in the root directory of this source tree.
"""
WSGI config for shuup_workbench project.
It exposes the WSGI callable as a module-lev... | <commit_before># This file is part of Shuup.
#
# Copyright (c) 2012-2017, Shoop Commerce Ltd. All rights reserved.
#
# This source code is licensed under the OSL-3.0 license found in the
# LICENSE file in the root directory of this source tree.
"""
WSGI config for shuup_workbench project.
It exposes the WSGI callable ... | # This file is part of Shuup.
#
# Copyright (c) 2012-2017, Shoop Commerce Ltd. All rights reserved.
#
# This source code is licensed under the OSL-3.0 license found in the
# LICENSE file in the root directory of this source tree.
"""
WSGI config for shuup_workbench project.
It exposes the WSGI callable as a module-lev... | # This file is part of Shuup.
#
# Copyright (c) 2012-2017, Shoop Commerce Ltd. All rights reserved.
#
# This source code is licensed under the OSL-3.0 license found in the
# LICENSE file in the root directory of this source tree.
"""
WSGI config for shuup_workbench project.
It exposes the WSGI callable as a module-lev... | <commit_before># This file is part of Shuup.
#
# Copyright (c) 2012-2017, Shoop Commerce Ltd. All rights reserved.
#
# This source code is licensed under the OSL-3.0 license found in the
# LICENSE file in the root directory of this source tree.
"""
WSGI config for shuup_workbench project.
It exposes the WSGI callable ... |
92221186166c0d7d6a593eb38fb4b0845c23634b | eue.py | eue.py | #!/usr/bin/env python
import os
import sys
from bottle import route,run,template,static_file
#from lib import mydb
base=os.path.dirname(os.path.realpath(__file__))
dom0s = []
capacity = []
def getDataStructure():
return {
"title" : "",
"page" : "login.tpl",
"nav" : True
}
@route('/st... | #!/usr/bin/env python
#-*- coding:utf-8 -*-
import os
import sys
from bottle import route, run, template, static_file, get, post
from lib import eueauth
def getDataStructure():
""" initialize a default dict passed to templates """
return {
"title": "",
"page": "login.tpl",
"nav": True... | Fix module import problem, make code more pep compliant, add utf8 encoding | Fix module import problem, make code more pep compliant, add utf8 encoding
| Python | agpl-3.0 | david-guenault/eue-ng,david-guenault/eue-ng,david-guenault/eue-ng,david-guenault/eue-ng,david-guenault/eue-ng,david-guenault/eue-ng | #!/usr/bin/env python
import os
import sys
from bottle import route,run,template,static_file
#from lib import mydb
base=os.path.dirname(os.path.realpath(__file__))
dom0s = []
capacity = []
def getDataStructure():
return {
"title" : "",
"page" : "login.tpl",
"nav" : True
}
@route('/st... | #!/usr/bin/env python
#-*- coding:utf-8 -*-
import os
import sys
from bottle import route, run, template, static_file, get, post
from lib import eueauth
def getDataStructure():
""" initialize a default dict passed to templates """
return {
"title": "",
"page": "login.tpl",
"nav": True... | <commit_before>#!/usr/bin/env python
import os
import sys
from bottle import route,run,template,static_file
#from lib import mydb
base=os.path.dirname(os.path.realpath(__file__))
dom0s = []
capacity = []
def getDataStructure():
return {
"title" : "",
"page" : "login.tpl",
"nav" : True
... | #!/usr/bin/env python
#-*- coding:utf-8 -*-
import os
import sys
from bottle import route, run, template, static_file, get, post
from lib import eueauth
def getDataStructure():
""" initialize a default dict passed to templates """
return {
"title": "",
"page": "login.tpl",
"nav": True... | #!/usr/bin/env python
import os
import sys
from bottle import route,run,template,static_file
#from lib import mydb
base=os.path.dirname(os.path.realpath(__file__))
dom0s = []
capacity = []
def getDataStructure():
return {
"title" : "",
"page" : "login.tpl",
"nav" : True
}
@route('/st... | <commit_before>#!/usr/bin/env python
import os
import sys
from bottle import route,run,template,static_file
#from lib import mydb
base=os.path.dirname(os.path.realpath(__file__))
dom0s = []
capacity = []
def getDataStructure():
return {
"title" : "",
"page" : "login.tpl",
"nav" : True
... |
4e66e9ff016ffc392caf4edb5735b77f518ba2b4 | alignak_backend/models/uipref.py | alignak_backend/models/uipref.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
Resource information of host
"""
def get_name():
"""
Get name of this resource
:return: name of this resource
:rtype: str
"""
return 'uipref'
def get_schema():
"""
Schema structure of this resource
:return: schema dictionnary
... | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
Resource information of host
"""
def get_name():
"""
Get name of this resource
:return: name of this resource
:rtype: str
"""
return 'uipref'
def get_schema():
"""
Schema structure of this resource
:return: schema dictionnary
... | Update UI preferences model (list) | Update UI preferences model (list)
| Python | agpl-3.0 | Alignak-monitoring-contrib/alignak-backend,Alignak-monitoring-contrib/alignak-backend,Alignak-monitoring-contrib/alignak-backend,Alignak-monitoring-contrib/alignak-backend | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
Resource information of host
"""
def get_name():
"""
Get name of this resource
:return: name of this resource
:rtype: str
"""
return 'uipref'
def get_schema():
"""
Schema structure of this resource
:return: schema dictionnary
... | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
Resource information of host
"""
def get_name():
"""
Get name of this resource
:return: name of this resource
:rtype: str
"""
return 'uipref'
def get_schema():
"""
Schema structure of this resource
:return: schema dictionnary
... | <commit_before>#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
Resource information of host
"""
def get_name():
"""
Get name of this resource
:return: name of this resource
:rtype: str
"""
return 'uipref'
def get_schema():
"""
Schema structure of this resource
:return: schema... | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
Resource information of host
"""
def get_name():
"""
Get name of this resource
:return: name of this resource
:rtype: str
"""
return 'uipref'
def get_schema():
"""
Schema structure of this resource
:return: schema dictionnary
... | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
Resource information of host
"""
def get_name():
"""
Get name of this resource
:return: name of this resource
:rtype: str
"""
return 'uipref'
def get_schema():
"""
Schema structure of this resource
:return: schema dictionnary
... | <commit_before>#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
Resource information of host
"""
def get_name():
"""
Get name of this resource
:return: name of this resource
:rtype: str
"""
return 'uipref'
def get_schema():
"""
Schema structure of this resource
:return: schema... |
901a45b36f58312dd1a12c6f48a472cf73e4482c | model/sample/__init__.py | model/sample/__init__.py | # -*- coding: utf-8 -*-
from flask.ext.babel import gettext
from ..division import Division
import user
division = Division(
name='sample',
display_name=gettext("Beispielsektion"),
user_class=user.User,
debug_only=True
)
| # -*- coding: utf-8 -*-
from flask.ext.babel import gettext
from ..division import Division
import user
division = Division(
name='sample',
display_name=gettext("Beispielsektion"),
user_class=user.User,
init_context=user.init_context,
debug_only=True
)
| Add missing init_context to sample divison | Add missing init_context to sample divison
| Python | mit | MarauderXtreme/sipa,agdsn/sipa,lukasjuhrich/sipa,fgrsnau/sipa,MarauderXtreme/sipa,agdsn/sipa,fgrsnau/sipa,agdsn/sipa,fgrsnau/sipa,lukasjuhrich/sipa,agdsn/sipa,lukasjuhrich/sipa,lukasjuhrich/sipa,MarauderXtreme/sipa | # -*- coding: utf-8 -*-
from flask.ext.babel import gettext
from ..division import Division
import user
division = Division(
name='sample',
display_name=gettext("Beispielsektion"),
user_class=user.User,
debug_only=True
)
Add missing init_context to sample divison | # -*- coding: utf-8 -*-
from flask.ext.babel import gettext
from ..division import Division
import user
division = Division(
name='sample',
display_name=gettext("Beispielsektion"),
user_class=user.User,
init_context=user.init_context,
debug_only=True
)
| <commit_before># -*- coding: utf-8 -*-
from flask.ext.babel import gettext
from ..division import Division
import user
division = Division(
name='sample',
display_name=gettext("Beispielsektion"),
user_class=user.User,
debug_only=True
)
<commit_msg>Add missing init_context to sample divison<commit_afte... | # -*- coding: utf-8 -*-
from flask.ext.babel import gettext
from ..division import Division
import user
division = Division(
name='sample',
display_name=gettext("Beispielsektion"),
user_class=user.User,
init_context=user.init_context,
debug_only=True
)
| # -*- coding: utf-8 -*-
from flask.ext.babel import gettext
from ..division import Division
import user
division = Division(
name='sample',
display_name=gettext("Beispielsektion"),
user_class=user.User,
debug_only=True
)
Add missing init_context to sample divison# -*- coding: utf-8 -*-
from flask.ext... | <commit_before># -*- coding: utf-8 -*-
from flask.ext.babel import gettext
from ..division import Division
import user
division = Division(
name='sample',
display_name=gettext("Beispielsektion"),
user_class=user.User,
debug_only=True
)
<commit_msg>Add missing init_context to sample divison<commit_afte... |
c80fc3c31003e6ecec049ac2e1ca370e58ab2b3c | mediasync/processors/yuicompressor.py | mediasync/processors/yuicompressor.py | from django.conf import settings
from mediasync import JS_MIMETYPES
import os
from subprocess import Popen, PIPE
def _yui_path(settings):
if not hasattr(settings, 'MEDIASYNC'):
return None
path = settings.MEDIASYNC.get('YUI_COMPRESSOR_PATH', None)
if path:
path = os.path.realpath(os.path.ex... | from django.conf import settings
from mediasync import CSS_MIMETYPES, JS_MIMETYPES
import os
from subprocess import Popen, PIPE
def _yui_path(settings):
if not hasattr(settings, 'MEDIASYNC'):
return None
path = settings.MEDIASYNC.get('YUI_COMPRESSOR_PATH', None)
if path:
path = os.path.real... | Replace incorrect JS_MIMETYPES with CSS_MIMETYPES | Replace incorrect JS_MIMETYPES with CSS_MIMETYPES
| Python | bsd-3-clause | sunlightlabs/django-mediasync,mntan/django-mediasync,mntan/django-mediasync,sunlightlabs/django-mediasync,sunlightlabs/django-mediasync,mntan/django-mediasync | from django.conf import settings
from mediasync import JS_MIMETYPES
import os
from subprocess import Popen, PIPE
def _yui_path(settings):
if not hasattr(settings, 'MEDIASYNC'):
return None
path = settings.MEDIASYNC.get('YUI_COMPRESSOR_PATH', None)
if path:
path = os.path.realpath(os.path.ex... | from django.conf import settings
from mediasync import CSS_MIMETYPES, JS_MIMETYPES
import os
from subprocess import Popen, PIPE
def _yui_path(settings):
if not hasattr(settings, 'MEDIASYNC'):
return None
path = settings.MEDIASYNC.get('YUI_COMPRESSOR_PATH', None)
if path:
path = os.path.real... | <commit_before>from django.conf import settings
from mediasync import JS_MIMETYPES
import os
from subprocess import Popen, PIPE
def _yui_path(settings):
if not hasattr(settings, 'MEDIASYNC'):
return None
path = settings.MEDIASYNC.get('YUI_COMPRESSOR_PATH', None)
if path:
path = os.path.real... | from django.conf import settings
from mediasync import CSS_MIMETYPES, JS_MIMETYPES
import os
from subprocess import Popen, PIPE
def _yui_path(settings):
if not hasattr(settings, 'MEDIASYNC'):
return None
path = settings.MEDIASYNC.get('YUI_COMPRESSOR_PATH', None)
if path:
path = os.path.real... | from django.conf import settings
from mediasync import JS_MIMETYPES
import os
from subprocess import Popen, PIPE
def _yui_path(settings):
if not hasattr(settings, 'MEDIASYNC'):
return None
path = settings.MEDIASYNC.get('YUI_COMPRESSOR_PATH', None)
if path:
path = os.path.realpath(os.path.ex... | <commit_before>from django.conf import settings
from mediasync import JS_MIMETYPES
import os
from subprocess import Popen, PIPE
def _yui_path(settings):
if not hasattr(settings, 'MEDIASYNC'):
return None
path = settings.MEDIASYNC.get('YUI_COMPRESSOR_PATH', None)
if path:
path = os.path.real... |
a3241e33f189cee4f7b5955e880ca3cc18e2694f | before_after_filesystem_snapshot.py | before_after_filesystem_snapshot.py | def snapshot(before_dict, after_dict):
'''before_after_snapshot is a simple function that returns which files were
unchanged, modified, added or removed from an input dictionary (before_dict)
and an output dictionary (after_dict). Both these dictionaries have file
names as the keys and their hashes as the... | def snapshot(before_dict, after_dict):
'''before_after_snapshot is a simple function that returns which files were
unchanged, modified, added or removed from an input dictionary (before_dict)
and an output dictionary (after_dict). Both these dictionaries have file
names as the keys and their hashes as the... | Add function to generate artifact rules. | Add function to generate artifact rules.
Adds a function to before_after_filesystem_snapshot.py called
generate_artifact_rules.
| Python | mit | in-toto/layout-web-tool,in-toto/layout-web-tool,in-toto/layout-web-tool | def snapshot(before_dict, after_dict):
'''before_after_snapshot is a simple function that returns which files were
unchanged, modified, added or removed from an input dictionary (before_dict)
and an output dictionary (after_dict). Both these dictionaries have file
names as the keys and their hashes as the... | def snapshot(before_dict, after_dict):
'''before_after_snapshot is a simple function that returns which files were
unchanged, modified, added or removed from an input dictionary (before_dict)
and an output dictionary (after_dict). Both these dictionaries have file
names as the keys and their hashes as the... | <commit_before>def snapshot(before_dict, after_dict):
'''before_after_snapshot is a simple function that returns which files were
unchanged, modified, added or removed from an input dictionary (before_dict)
and an output dictionary (after_dict). Both these dictionaries have file
names as the keys and thei... | def snapshot(before_dict, after_dict):
'''before_after_snapshot is a simple function that returns which files were
unchanged, modified, added or removed from an input dictionary (before_dict)
and an output dictionary (after_dict). Both these dictionaries have file
names as the keys and their hashes as the... | def snapshot(before_dict, after_dict):
'''before_after_snapshot is a simple function that returns which files were
unchanged, modified, added or removed from an input dictionary (before_dict)
and an output dictionary (after_dict). Both these dictionaries have file
names as the keys and their hashes as the... | <commit_before>def snapshot(before_dict, after_dict):
'''before_after_snapshot is a simple function that returns which files were
unchanged, modified, added or removed from an input dictionary (before_dict)
and an output dictionary (after_dict). Both these dictionaries have file
names as the keys and thei... |
2745423ce5a7e9963038a529337a1d71d4465cba | core/views.py | core/views.py | from django.conf import settings
from django.views.static import serve
from django.http import HttpResponse
from django.views.decorators.csrf import csrf_view_exempt
import json
import os
from projects.models import Project
from projects.tasks import update_docs
from projects.utils import get_project_path, find_file
... | from django.conf import settings
from django.views.static import serve
from django.http import HttpResponse
from django.views.decorators.csrf import csrf_view_exempt
import json
import os
from projects.models import Project
from projects.tasks import update_docs
from projects.utils import get_project_path, find_file
... | Fix empty file names messin stuff up. | Fix empty file names messin stuff up.
| Python | mit | clarkperkins/readthedocs.org,kenwang76/readthedocs.org,pombredanne/readthedocs.org,LukasBoersma/readthedocs.org,davidfischer/readthedocs.org,raven47git/readthedocs.org,royalwang/readthedocs.org,mhils/readthedocs.org,sils1297/readthedocs.org,gjtorikian/readthedocs.org,nyergler/pythonslides,nyergler/pythonslides,fujita-s... | from django.conf import settings
from django.views.static import serve
from django.http import HttpResponse
from django.views.decorators.csrf import csrf_view_exempt
import json
import os
from projects.models import Project
from projects.tasks import update_docs
from projects.utils import get_project_path, find_file
... | from django.conf import settings
from django.views.static import serve
from django.http import HttpResponse
from django.views.decorators.csrf import csrf_view_exempt
import json
import os
from projects.models import Project
from projects.tasks import update_docs
from projects.utils import get_project_path, find_file
... | <commit_before>from django.conf import settings
from django.views.static import serve
from django.http import HttpResponse
from django.views.decorators.csrf import csrf_view_exempt
import json
import os
from projects.models import Project
from projects.tasks import update_docs
from projects.utils import get_project_p... | from django.conf import settings
from django.views.static import serve
from django.http import HttpResponse
from django.views.decorators.csrf import csrf_view_exempt
import json
import os
from projects.models import Project
from projects.tasks import update_docs
from projects.utils import get_project_path, find_file
... | from django.conf import settings
from django.views.static import serve
from django.http import HttpResponse
from django.views.decorators.csrf import csrf_view_exempt
import json
import os
from projects.models import Project
from projects.tasks import update_docs
from projects.utils import get_project_path, find_file
... | <commit_before>from django.conf import settings
from django.views.static import serve
from django.http import HttpResponse
from django.views.decorators.csrf import csrf_view_exempt
import json
import os
from projects.models import Project
from projects.tasks import update_docs
from projects.utils import get_project_p... |
2327eb0c4db7d6b771777e8d73ec99a8e324391a | printzone.py | printzone.py | #!/usr/bin/env python
import dns.query
import dns.zone
import sys
from optparse import OptionParser
parser = OptionParser()
parser.add_option("--server", dest="dns_server",
help="DNS server to query.",
type="string")
parser.add_option("--zone", dest="dns_zone",
h... | #!/usr/bin/env python
import dns.query
import dns.zone
import sys
from optparse import OptionParser
parser = OptionParser()
parser.add_option("--server", dest="dns_server",
help="DNS server to query.",
type="string")
parser.add_option("--zone", dest="dns_zone",
h... | Split the XFR output into an array of values. | Split the XFR output into an array of values.
Had to split on \n. Need to go through the code more and figure out why it doesn't actually present itself
upon printing
| Python | bsd-3-clause | jforman/python-ddns | #!/usr/bin/env python
import dns.query
import dns.zone
import sys
from optparse import OptionParser
parser = OptionParser()
parser.add_option("--server", dest="dns_server",
help="DNS server to query.",
type="string")
parser.add_option("--zone", dest="dns_zone",
h... | #!/usr/bin/env python
import dns.query
import dns.zone
import sys
from optparse import OptionParser
parser = OptionParser()
parser.add_option("--server", dest="dns_server",
help="DNS server to query.",
type="string")
parser.add_option("--zone", dest="dns_zone",
h... | <commit_before>#!/usr/bin/env python
import dns.query
import dns.zone
import sys
from optparse import OptionParser
parser = OptionParser()
parser.add_option("--server", dest="dns_server",
help="DNS server to query.",
type="string")
parser.add_option("--zone", dest="dns_zone",
... | #!/usr/bin/env python
import dns.query
import dns.zone
import sys
from optparse import OptionParser
parser = OptionParser()
parser.add_option("--server", dest="dns_server",
help="DNS server to query.",
type="string")
parser.add_option("--zone", dest="dns_zone",
h... | #!/usr/bin/env python
import dns.query
import dns.zone
import sys
from optparse import OptionParser
parser = OptionParser()
parser.add_option("--server", dest="dns_server",
help="DNS server to query.",
type="string")
parser.add_option("--zone", dest="dns_zone",
h... | <commit_before>#!/usr/bin/env python
import dns.query
import dns.zone
import sys
from optparse import OptionParser
parser = OptionParser()
parser.add_option("--server", dest="dns_server",
help="DNS server to query.",
type="string")
parser.add_option("--zone", dest="dns_zone",
... |
c3571bf950862a17a0d2938167a3cb9912fab6d9 | setup.py | setup.py | import os
from setuptools import setup, find_packages
import uuid
from jirafs_list_table import __version__ as version_string
requirements_path = os.path.join(
os.path.dirname(__file__),
'requirements.txt',
)
try:
from pip.req import parse_requirements
requirements = [
str(req.req) for req in... | import os
from setuptools import setup, find_packages
import uuid
from jirafs_list_table import __version__ as version_string
requirements_path = os.path.join(
os.path.dirname(__file__),
'requirements.txt',
)
try:
from pip.req import parse_requirements
requirements = [
str(req.req) for req in... | Use the proper entry point name. | Use the proper entry point name.
| Python | mit | coddingtonbear/jirafs-list-table | import os
from setuptools import setup, find_packages
import uuid
from jirafs_list_table import __version__ as version_string
requirements_path = os.path.join(
os.path.dirname(__file__),
'requirements.txt',
)
try:
from pip.req import parse_requirements
requirements = [
str(req.req) for req in... | import os
from setuptools import setup, find_packages
import uuid
from jirafs_list_table import __version__ as version_string
requirements_path = os.path.join(
os.path.dirname(__file__),
'requirements.txt',
)
try:
from pip.req import parse_requirements
requirements = [
str(req.req) for req in... | <commit_before>import os
from setuptools import setup, find_packages
import uuid
from jirafs_list_table import __version__ as version_string
requirements_path = os.path.join(
os.path.dirname(__file__),
'requirements.txt',
)
try:
from pip.req import parse_requirements
requirements = [
str(req.... | import os
from setuptools import setup, find_packages
import uuid
from jirafs_list_table import __version__ as version_string
requirements_path = os.path.join(
os.path.dirname(__file__),
'requirements.txt',
)
try:
from pip.req import parse_requirements
requirements = [
str(req.req) for req in... | import os
from setuptools import setup, find_packages
import uuid
from jirafs_list_table import __version__ as version_string
requirements_path = os.path.join(
os.path.dirname(__file__),
'requirements.txt',
)
try:
from pip.req import parse_requirements
requirements = [
str(req.req) for req in... | <commit_before>import os
from setuptools import setup, find_packages
import uuid
from jirafs_list_table import __version__ as version_string
requirements_path = os.path.join(
os.path.dirname(__file__),
'requirements.txt',
)
try:
from pip.req import parse_requirements
requirements = [
str(req.... |
3577007a2b48ca410a0a34a10f64adcdb3537912 | setup.py | setup.py | # -*- coding: utf-8 -*-
import os
from distutils.core import setup
here = os.path.dirname(__file__)
def get_long_desc():
return open(os.path.join(here, 'README.rst')).read()
# Function borrowed from carljm.
def get_version():
fh = open(os.path.join(here, "gcframe", "__init__.py"))
try:
for lin... | # -*- coding: utf-8 -*-
import os
from distutils.core import setup
here = os.path.dirname(__file__)
def get_long_desc():
return open(os.path.join(here, 'README.rst')).read()
# Function borrowed from carljm.
def get_version():
fh = open(os.path.join(here, "gcframe", "__init__.py"))
try:
for lin... | Update the classification to production/stable. | Update the classification to production/stable.
| Python | bsd-3-clause | benspaulding/django-gcframe | # -*- coding: utf-8 -*-
import os
from distutils.core import setup
here = os.path.dirname(__file__)
def get_long_desc():
return open(os.path.join(here, 'README.rst')).read()
# Function borrowed from carljm.
def get_version():
fh = open(os.path.join(here, "gcframe", "__init__.py"))
try:
for lin... | # -*- coding: utf-8 -*-
import os
from distutils.core import setup
here = os.path.dirname(__file__)
def get_long_desc():
return open(os.path.join(here, 'README.rst')).read()
# Function borrowed from carljm.
def get_version():
fh = open(os.path.join(here, "gcframe", "__init__.py"))
try:
for lin... | <commit_before># -*- coding: utf-8 -*-
import os
from distutils.core import setup
here = os.path.dirname(__file__)
def get_long_desc():
return open(os.path.join(here, 'README.rst')).read()
# Function borrowed from carljm.
def get_version():
fh = open(os.path.join(here, "gcframe", "__init__.py"))
try:
... | # -*- coding: utf-8 -*-
import os
from distutils.core import setup
here = os.path.dirname(__file__)
def get_long_desc():
return open(os.path.join(here, 'README.rst')).read()
# Function borrowed from carljm.
def get_version():
fh = open(os.path.join(here, "gcframe", "__init__.py"))
try:
for lin... | # -*- coding: utf-8 -*-
import os
from distutils.core import setup
here = os.path.dirname(__file__)
def get_long_desc():
return open(os.path.join(here, 'README.rst')).read()
# Function borrowed from carljm.
def get_version():
fh = open(os.path.join(here, "gcframe", "__init__.py"))
try:
for lin... | <commit_before># -*- coding: utf-8 -*-
import os
from distutils.core import setup
here = os.path.dirname(__file__)
def get_long_desc():
return open(os.path.join(here, 'README.rst')).read()
# Function borrowed from carljm.
def get_version():
fh = open(os.path.join(here, "gcframe", "__init__.py"))
try:
... |
3c94fc8a784420740caa8831363b6ebb8b1d6095 | django_archive/archivers/__init__.py | django_archive/archivers/__init__.py | from .tarball import TarballArchiver
from .zipfile import ZipArchiver
TARBALL = TarballArchiver.UNCOMPRESSED
TARBALL_GZ = TarballArchiver.GZ
TARBALL_BZ2 = TarballArchiver.BZ2
TARBALL_XZ = TarballArchiver.XZ
ZIP = 'zip'
def get_archiver(fmt):
"""
Return the class corresponding with the provided archival form... | from .tarball import TarballArchiver
from .zipfile import ZipArchiver
TARBALL = TarballArchiver.UNCOMPRESSED
TARBALL_GZ = TarballArchiver.GZ
TARBALL_BZ2 = TarballArchiver.BZ2
TARBALL_XZ = TarballArchiver.XZ
ZIP = 'zip'
FORMATS = (
(TARBALL, "Tarball (.tar)"),
(TARBALL_GZ, "gzip-compressed Tarball (.tar.gz)")... | Add tuple containing all supported archive formats and their human-readable description. | Add tuple containing all supported archive formats and their human-readable description.
| Python | mit | nathan-osman/django-archive,nathan-osman/django-archive | from .tarball import TarballArchiver
from .zipfile import ZipArchiver
TARBALL = TarballArchiver.UNCOMPRESSED
TARBALL_GZ = TarballArchiver.GZ
TARBALL_BZ2 = TarballArchiver.BZ2
TARBALL_XZ = TarballArchiver.XZ
ZIP = 'zip'
def get_archiver(fmt):
"""
Return the class corresponding with the provided archival form... | from .tarball import TarballArchiver
from .zipfile import ZipArchiver
TARBALL = TarballArchiver.UNCOMPRESSED
TARBALL_GZ = TarballArchiver.GZ
TARBALL_BZ2 = TarballArchiver.BZ2
TARBALL_XZ = TarballArchiver.XZ
ZIP = 'zip'
FORMATS = (
(TARBALL, "Tarball (.tar)"),
(TARBALL_GZ, "gzip-compressed Tarball (.tar.gz)")... | <commit_before>from .tarball import TarballArchiver
from .zipfile import ZipArchiver
TARBALL = TarballArchiver.UNCOMPRESSED
TARBALL_GZ = TarballArchiver.GZ
TARBALL_BZ2 = TarballArchiver.BZ2
TARBALL_XZ = TarballArchiver.XZ
ZIP = 'zip'
def get_archiver(fmt):
"""
Return the class corresponding with the provide... | from .tarball import TarballArchiver
from .zipfile import ZipArchiver
TARBALL = TarballArchiver.UNCOMPRESSED
TARBALL_GZ = TarballArchiver.GZ
TARBALL_BZ2 = TarballArchiver.BZ2
TARBALL_XZ = TarballArchiver.XZ
ZIP = 'zip'
FORMATS = (
(TARBALL, "Tarball (.tar)"),
(TARBALL_GZ, "gzip-compressed Tarball (.tar.gz)")... | from .tarball import TarballArchiver
from .zipfile import ZipArchiver
TARBALL = TarballArchiver.UNCOMPRESSED
TARBALL_GZ = TarballArchiver.GZ
TARBALL_BZ2 = TarballArchiver.BZ2
TARBALL_XZ = TarballArchiver.XZ
ZIP = 'zip'
def get_archiver(fmt):
"""
Return the class corresponding with the provided archival form... | <commit_before>from .tarball import TarballArchiver
from .zipfile import ZipArchiver
TARBALL = TarballArchiver.UNCOMPRESSED
TARBALL_GZ = TarballArchiver.GZ
TARBALL_BZ2 = TarballArchiver.BZ2
TARBALL_XZ = TarballArchiver.XZ
ZIP = 'zip'
def get_archiver(fmt):
"""
Return the class corresponding with the provide... |
ee494fd205c58029960d4a5702f59418c8110eb3 | django_iceberg/context_processors.py | django_iceberg/context_processors.py | # -*- coding: utf-8 -*-
import logging
logger = logging.getLogger(__name__)
from django_iceberg.auth_utils import init_iceberg, get_conf_class
def iceberg_settings(request):
"""
Defines some template variables in context
"""
conf = get_conf_class(request)
if not conf:
ICEBERG_API_URL_FUL... | # -*- coding: utf-8 -*-
import logging
logger = logging.getLogger(__name__)
from django_iceberg.auth_utils import init_iceberg, get_conf_class
def iceberg_settings(request):
"""
Defines some template variables in context
"""
conf = get_conf_class(request)
if not conf:
ICEBERG_API_URL_FUL... | Add username to context in iceberg_settings context processor | Add username to context in iceberg_settings context processor
| Python | mit | izberg-marketplace/django-izberg,izberg-marketplace/django-izberg,Iceberg-Marketplace/django-iceberg,Iceberg-Marketplace/django-iceberg | # -*- coding: utf-8 -*-
import logging
logger = logging.getLogger(__name__)
from django_iceberg.auth_utils import init_iceberg, get_conf_class
def iceberg_settings(request):
"""
Defines some template variables in context
"""
conf = get_conf_class(request)
if not conf:
ICEBERG_API_URL_FUL... | # -*- coding: utf-8 -*-
import logging
logger = logging.getLogger(__name__)
from django_iceberg.auth_utils import init_iceberg, get_conf_class
def iceberg_settings(request):
"""
Defines some template variables in context
"""
conf = get_conf_class(request)
if not conf:
ICEBERG_API_URL_FUL... | <commit_before># -*- coding: utf-8 -*-
import logging
logger = logging.getLogger(__name__)
from django_iceberg.auth_utils import init_iceberg, get_conf_class
def iceberg_settings(request):
"""
Defines some template variables in context
"""
conf = get_conf_class(request)
if not conf:
ICEB... | # -*- coding: utf-8 -*-
import logging
logger = logging.getLogger(__name__)
from django_iceberg.auth_utils import init_iceberg, get_conf_class
def iceberg_settings(request):
"""
Defines some template variables in context
"""
conf = get_conf_class(request)
if not conf:
ICEBERG_API_URL_FUL... | # -*- coding: utf-8 -*-
import logging
logger = logging.getLogger(__name__)
from django_iceberg.auth_utils import init_iceberg, get_conf_class
def iceberg_settings(request):
"""
Defines some template variables in context
"""
conf = get_conf_class(request)
if not conf:
ICEBERG_API_URL_FUL... | <commit_before># -*- coding: utf-8 -*-
import logging
logger = logging.getLogger(__name__)
from django_iceberg.auth_utils import init_iceberg, get_conf_class
def iceberg_settings(request):
"""
Defines some template variables in context
"""
conf = get_conf_class(request)
if not conf:
ICEB... |
ac5b383520286c1c9d1aadc9a46fb900e4227b55 | setup.py | setup.py | from setuptools import find_packages
from setuptools import setup
setup(
name='caravan',
version='0.0.3.dev0',
description='Light python framework for AWS SWF',
long_description=open('README.rst').read(),
keywords='AWS SWF workflow distributed background task',
author='Pior Bastida',
autho... | from setuptools import find_packages
from setuptools import setup
setup(
name='caravan',
version='0.0.3.dev0',
description='Light python framework for AWS SWF',
long_description=open('README.rst').read(),
keywords='AWS SWF workflow distributed background task',
author='Pior Bastida',
autho... | Set pypi development status to Pre-Alpha | Set pypi development status to Pre-Alpha
| Python | mit | pior/caravan | from setuptools import find_packages
from setuptools import setup
setup(
name='caravan',
version='0.0.3.dev0',
description='Light python framework for AWS SWF',
long_description=open('README.rst').read(),
keywords='AWS SWF workflow distributed background task',
author='Pior Bastida',
autho... | from setuptools import find_packages
from setuptools import setup
setup(
name='caravan',
version='0.0.3.dev0',
description='Light python framework for AWS SWF',
long_description=open('README.rst').read(),
keywords='AWS SWF workflow distributed background task',
author='Pior Bastida',
autho... | <commit_before>from setuptools import find_packages
from setuptools import setup
setup(
name='caravan',
version='0.0.3.dev0',
description='Light python framework for AWS SWF',
long_description=open('README.rst').read(),
keywords='AWS SWF workflow distributed background task',
author='Pior Bast... | from setuptools import find_packages
from setuptools import setup
setup(
name='caravan',
version='0.0.3.dev0',
description='Light python framework for AWS SWF',
long_description=open('README.rst').read(),
keywords='AWS SWF workflow distributed background task',
author='Pior Bastida',
autho... | from setuptools import find_packages
from setuptools import setup
setup(
name='caravan',
version='0.0.3.dev0',
description='Light python framework for AWS SWF',
long_description=open('README.rst').read(),
keywords='AWS SWF workflow distributed background task',
author='Pior Bastida',
autho... | <commit_before>from setuptools import find_packages
from setuptools import setup
setup(
name='caravan',
version='0.0.3.dev0',
description='Light python framework for AWS SWF',
long_description=open('README.rst').read(),
keywords='AWS SWF workflow distributed background task',
author='Pior Bast... |
4e20ea7d100d1611b018d5dede4a17915959d6f1 | setup.py | setup.py | #!/usr/bin/env python
from setuptools import setup, find_packages
execfile('police_api/version.py')
setup(
name='police-api-client',
version=__version__, # NOQA
description='Python client library for the Police API',
long_description=open('README.rst').read(),
author='Rock Kitchen Harris',
l... | #!/usr/bin/env python
from setuptools import setup, find_packages
execfile('police_api/version.py')
setup(
name='police-api-client',
version=__version__, # NOQA
description='Python client library for the Police API',
long_description=open('README.rst').read(),
author='Rock Kitchen Harris',
l... | Include package data in release | Include package data in release
| Python | mit | rkhleics/police-api-client-python | #!/usr/bin/env python
from setuptools import setup, find_packages
execfile('police_api/version.py')
setup(
name='police-api-client',
version=__version__, # NOQA
description='Python client library for the Police API',
long_description=open('README.rst').read(),
author='Rock Kitchen Harris',
l... | #!/usr/bin/env python
from setuptools import setup, find_packages
execfile('police_api/version.py')
setup(
name='police-api-client',
version=__version__, # NOQA
description='Python client library for the Police API',
long_description=open('README.rst').read(),
author='Rock Kitchen Harris',
l... | <commit_before>#!/usr/bin/env python
from setuptools import setup, find_packages
execfile('police_api/version.py')
setup(
name='police-api-client',
version=__version__, # NOQA
description='Python client library for the Police API',
long_description=open('README.rst').read(),
author='Rock Kitchen... | #!/usr/bin/env python
from setuptools import setup, find_packages
execfile('police_api/version.py')
setup(
name='police-api-client',
version=__version__, # NOQA
description='Python client library for the Police API',
long_description=open('README.rst').read(),
author='Rock Kitchen Harris',
l... | #!/usr/bin/env python
from setuptools import setup, find_packages
execfile('police_api/version.py')
setup(
name='police-api-client',
version=__version__, # NOQA
description='Python client library for the Police API',
long_description=open('README.rst').read(),
author='Rock Kitchen Harris',
l... | <commit_before>#!/usr/bin/env python
from setuptools import setup, find_packages
execfile('police_api/version.py')
setup(
name='police-api-client',
version=__version__, # NOQA
description='Python client library for the Police API',
long_description=open('README.rst').read(),
author='Rock Kitchen... |
47dedd31b9ee0f768ca3f9f781133458ddc99f4f | setup.py | setup.py | from setuptools import setup
name = 'turbasen'
VERSION = '2.5.0'
setup(
name=name,
packages=[name],
version=VERSION,
description='Client for Nasjonal Turbase REST API',
long_description='Documentation: https://turbasenpy.readthedocs.io/',
author='Ali Kaafarani',
author_email='ali.kaafarani... | from setuptools import setup
name = 'turbasen'
VERSION = '2.5.0'
setup(
name=name,
packages=[name],
version=VERSION,
description='Client for Nasjonal Turbase REST API',
long_description='Documentation: https://turbasenpy.readthedocs.io/',
author='Ali Kaafarani',
author_email='ali.kaafarani... | Add sphinx to dev requirements | Add sphinx to dev requirements
| Python | mit | Turbasen/turbasen.py | from setuptools import setup
name = 'turbasen'
VERSION = '2.5.0'
setup(
name=name,
packages=[name],
version=VERSION,
description='Client for Nasjonal Turbase REST API',
long_description='Documentation: https://turbasenpy.readthedocs.io/',
author='Ali Kaafarani',
author_email='ali.kaafarani... | from setuptools import setup
name = 'turbasen'
VERSION = '2.5.0'
setup(
name=name,
packages=[name],
version=VERSION,
description='Client for Nasjonal Turbase REST API',
long_description='Documentation: https://turbasenpy.readthedocs.io/',
author='Ali Kaafarani',
author_email='ali.kaafarani... | <commit_before>from setuptools import setup
name = 'turbasen'
VERSION = '2.5.0'
setup(
name=name,
packages=[name],
version=VERSION,
description='Client for Nasjonal Turbase REST API',
long_description='Documentation: https://turbasenpy.readthedocs.io/',
author='Ali Kaafarani',
author_email... | from setuptools import setup
name = 'turbasen'
VERSION = '2.5.0'
setup(
name=name,
packages=[name],
version=VERSION,
description='Client for Nasjonal Turbase REST API',
long_description='Documentation: https://turbasenpy.readthedocs.io/',
author='Ali Kaafarani',
author_email='ali.kaafarani... | from setuptools import setup
name = 'turbasen'
VERSION = '2.5.0'
setup(
name=name,
packages=[name],
version=VERSION,
description='Client for Nasjonal Turbase REST API',
long_description='Documentation: https://turbasenpy.readthedocs.io/',
author='Ali Kaafarani',
author_email='ali.kaafarani... | <commit_before>from setuptools import setup
name = 'turbasen'
VERSION = '2.5.0'
setup(
name=name,
packages=[name],
version=VERSION,
description='Client for Nasjonal Turbase REST API',
long_description='Documentation: https://turbasenpy.readthedocs.io/',
author='Ali Kaafarani',
author_email... |
8e934707349079353b00d8a8be8c99431b357595 | setup.py | setup.py | from setuptools import setup, find_packages
def listify(filename):
return filter(None, open(filename, 'r').read().split('\n'))
setup(
name="vumi",
version="0.4.0a",
url='http://github.com/praekelt/vumi',
license='BSD',
description="Super-scalable messaging engine for the delivery of SMS, "
... | from setuptools import setup, find_packages
def listify(filename):
return filter(None, open(filename, 'r').read().split('\n'))
setup(
name="vumi",
version="0.4.0a",
url='http://github.com/praekelt/vumi',
license='BSD',
description="Super-scalable messaging engine for the delivery of SMS, "
... | Include Twisted plugin in install. | Include Twisted plugin in install.
| Python | bsd-3-clause | TouK/vumi,TouK/vumi,harrissoerja/vumi,TouK/vumi,vishwaprakashmishra/xmatrix,harrissoerja/vumi,harrissoerja/vumi,vishwaprakashmishra/xmatrix,vishwaprakashmishra/xmatrix | from setuptools import setup, find_packages
def listify(filename):
return filter(None, open(filename, 'r').read().split('\n'))
setup(
name="vumi",
version="0.4.0a",
url='http://github.com/praekelt/vumi',
license='BSD',
description="Super-scalable messaging engine for the delivery of SMS, "
... | from setuptools import setup, find_packages
def listify(filename):
return filter(None, open(filename, 'r').read().split('\n'))
setup(
name="vumi",
version="0.4.0a",
url='http://github.com/praekelt/vumi',
license='BSD',
description="Super-scalable messaging engine for the delivery of SMS, "
... | <commit_before>from setuptools import setup, find_packages
def listify(filename):
return filter(None, open(filename, 'r').read().split('\n'))
setup(
name="vumi",
version="0.4.0a",
url='http://github.com/praekelt/vumi',
license='BSD',
description="Super-scalable messaging engine for the deliv... | from setuptools import setup, find_packages
def listify(filename):
return filter(None, open(filename, 'r').read().split('\n'))
setup(
name="vumi",
version="0.4.0a",
url='http://github.com/praekelt/vumi',
license='BSD',
description="Super-scalable messaging engine for the delivery of SMS, "
... | from setuptools import setup, find_packages
def listify(filename):
return filter(None, open(filename, 'r').read().split('\n'))
setup(
name="vumi",
version="0.4.0a",
url='http://github.com/praekelt/vumi',
license='BSD',
description="Super-scalable messaging engine for the delivery of SMS, "
... | <commit_before>from setuptools import setup, find_packages
def listify(filename):
return filter(None, open(filename, 'r').read().split('\n'))
setup(
name="vumi",
version="0.4.0a",
url='http://github.com/praekelt/vumi',
license='BSD',
description="Super-scalable messaging engine for the deliv... |
fb1d6d40446a6f51d146c2d426b3a7e5509441f6 | setup.py | setup.py | #!/usr/bin/env python
try:
from setuptools import setup
except ImportError:
from distutils.core import setup
with open('README.rst') as readme_f:
README = readme_f.read()
with open('tests/requirements.txt') as test_requirements_f:
TEST_REQUIREMENTS = test_requirements_f.readlines()
setup(
name=... | #!/usr/bin/env python
try:
from setuptools import setup
except ImportError:
from distutils.core import setup
with open('README.rst') as readme_f:
README = readme_f.read()
with open('tests/requirements.txt') as test_requirements_f:
TEST_REQUIREMENTS = test_requirements_f.readlines()
setup(
name=... | Change trove classifier to show project is now stable | Change trove classifier to show project is now stable
| Python | mit | cdown/srt | #!/usr/bin/env python
try:
from setuptools import setup
except ImportError:
from distutils.core import setup
with open('README.rst') as readme_f:
README = readme_f.read()
with open('tests/requirements.txt') as test_requirements_f:
TEST_REQUIREMENTS = test_requirements_f.readlines()
setup(
name=... | #!/usr/bin/env python
try:
from setuptools import setup
except ImportError:
from distutils.core import setup
with open('README.rst') as readme_f:
README = readme_f.read()
with open('tests/requirements.txt') as test_requirements_f:
TEST_REQUIREMENTS = test_requirements_f.readlines()
setup(
name=... | <commit_before>#!/usr/bin/env python
try:
from setuptools import setup
except ImportError:
from distutils.core import setup
with open('README.rst') as readme_f:
README = readme_f.read()
with open('tests/requirements.txt') as test_requirements_f:
TEST_REQUIREMENTS = test_requirements_f.readlines()
s... | #!/usr/bin/env python
try:
from setuptools import setup
except ImportError:
from distutils.core import setup
with open('README.rst') as readme_f:
README = readme_f.read()
with open('tests/requirements.txt') as test_requirements_f:
TEST_REQUIREMENTS = test_requirements_f.readlines()
setup(
name=... | #!/usr/bin/env python
try:
from setuptools import setup
except ImportError:
from distutils.core import setup
with open('README.rst') as readme_f:
README = readme_f.read()
with open('tests/requirements.txt') as test_requirements_f:
TEST_REQUIREMENTS = test_requirements_f.readlines()
setup(
name=... | <commit_before>#!/usr/bin/env python
try:
from setuptools import setup
except ImportError:
from distutils.core import setup
with open('README.rst') as readme_f:
README = readme_f.read()
with open('tests/requirements.txt') as test_requirements_f:
TEST_REQUIREMENTS = test_requirements_f.readlines()
s... |
66a44d74fa4af27c9d0de86865fc32352c684183 | setup.py | setup.py | import os
import sys
from os.path import join as pjoin
from setuptools import setup
from setuptools import Command
from subprocess import call
def read_version_string():
version = None
sys.path.insert(0, pjoin(os.getcwd()))
from log_formatters import __version__
version = __version__
sys.path.po... | import os
import sys
from setuptools import setup
def read_version_string():
version = None
current_dir = os.path.abspath(os.path.dirname(__file__))
sys.path.insert(0, current_dir)
from log_formatters import __version__
version = __version__
sys.path.pop(0)
return version
setup(
nam... | Add a correct dir to sys.path, remove unused imports. | Add a correct dir to sys.path, remove unused imports.
| Python | apache-2.0 | Kami/python-extra-log-formatters | import os
import sys
from os.path import join as pjoin
from setuptools import setup
from setuptools import Command
from subprocess import call
def read_version_string():
version = None
sys.path.insert(0, pjoin(os.getcwd()))
from log_formatters import __version__
version = __version__
sys.path.po... | import os
import sys
from setuptools import setup
def read_version_string():
version = None
current_dir = os.path.abspath(os.path.dirname(__file__))
sys.path.insert(0, current_dir)
from log_formatters import __version__
version = __version__
sys.path.pop(0)
return version
setup(
nam... | <commit_before>import os
import sys
from os.path import join as pjoin
from setuptools import setup
from setuptools import Command
from subprocess import call
def read_version_string():
version = None
sys.path.insert(0, pjoin(os.getcwd()))
from log_formatters import __version__
version = __version__
... | import os
import sys
from setuptools import setup
def read_version_string():
version = None
current_dir = os.path.abspath(os.path.dirname(__file__))
sys.path.insert(0, current_dir)
from log_formatters import __version__
version = __version__
sys.path.pop(0)
return version
setup(
nam... | import os
import sys
from os.path import join as pjoin
from setuptools import setup
from setuptools import Command
from subprocess import call
def read_version_string():
version = None
sys.path.insert(0, pjoin(os.getcwd()))
from log_formatters import __version__
version = __version__
sys.path.po... | <commit_before>import os
import sys
from os.path import join as pjoin
from setuptools import setup
from setuptools import Command
from subprocess import call
def read_version_string():
version = None
sys.path.insert(0, pjoin(os.getcwd()))
from log_formatters import __version__
version = __version__
... |
cb84aa95759234ff2d7f8aa6b67e28eab382f9cc | setup.py | setup.py | #!/usr/bin/env python
from setuptools import setup
version = "0.10"
setup(
name="pycoinnet",
version=version,
packages=[
"pycoinnet",
"pycoinnet.examples",
"pycoinnet.helpers",
"pycoinnet.peer",
"pycoinnet.peer.tests",
"pycoinnet.peergroup",
"pycoin... | #!/usr/bin/env python
from setuptools import setup
version = "0.19"
REQUIREMENTS = [i.strip() for i in open("requirements.txt").readlines()]
setup(
name="pycoinnet",
version=version,
packages=[
"pycoinnet",
"pycoinnet.examples",
"pycoinnet.helpers",
"pycoinnet.peer",
... | Include the requirements.txt contents in install_requires. | Include the requirements.txt contents in install_requires.
| Python | mit | antiface/pycoinnet,antiface/pycoinnet,richardkiss/pycoinnet,richardkiss/pycoinnet | #!/usr/bin/env python
from setuptools import setup
version = "0.10"
setup(
name="pycoinnet",
version=version,
packages=[
"pycoinnet",
"pycoinnet.examples",
"pycoinnet.helpers",
"pycoinnet.peer",
"pycoinnet.peer.tests",
"pycoinnet.peergroup",
"pycoin... | #!/usr/bin/env python
from setuptools import setup
version = "0.19"
REQUIREMENTS = [i.strip() for i in open("requirements.txt").readlines()]
setup(
name="pycoinnet",
version=version,
packages=[
"pycoinnet",
"pycoinnet.examples",
"pycoinnet.helpers",
"pycoinnet.peer",
... | <commit_before>#!/usr/bin/env python
from setuptools import setup
version = "0.10"
setup(
name="pycoinnet",
version=version,
packages=[
"pycoinnet",
"pycoinnet.examples",
"pycoinnet.helpers",
"pycoinnet.peer",
"pycoinnet.peer.tests",
"pycoinnet.peergroup",
... | #!/usr/bin/env python
from setuptools import setup
version = "0.19"
REQUIREMENTS = [i.strip() for i in open("requirements.txt").readlines()]
setup(
name="pycoinnet",
version=version,
packages=[
"pycoinnet",
"pycoinnet.examples",
"pycoinnet.helpers",
"pycoinnet.peer",
... | #!/usr/bin/env python
from setuptools import setup
version = "0.10"
setup(
name="pycoinnet",
version=version,
packages=[
"pycoinnet",
"pycoinnet.examples",
"pycoinnet.helpers",
"pycoinnet.peer",
"pycoinnet.peer.tests",
"pycoinnet.peergroup",
"pycoin... | <commit_before>#!/usr/bin/env python
from setuptools import setup
version = "0.10"
setup(
name="pycoinnet",
version=version,
packages=[
"pycoinnet",
"pycoinnet.examples",
"pycoinnet.helpers",
"pycoinnet.peer",
"pycoinnet.peer.tests",
"pycoinnet.peergroup",
... |
0f464b995968acbc4685b90472ef2af260b67381 | setup.py | setup.py | from setuptools import setup, find_packages
version = '1.2.0'
setup(name="Miro Community",
version=version,
packages=find_packages(),
author='Participatory Culture Foundation',
license='AGPLv3',
install_requires=['django==1.2.1'])
| from setuptools import setup, find_packages
version = '1.2.0'
setup(name="Miro Community",
version=version,
packages=find_packages(),
author='Participatory Culture Foundation',
license='AGPLv3',
install_requires=['django==1.2.5'])
| Upgrade requirements to be Django 1.2.5 | Upgrade requirements to be Django 1.2.5
| Python | agpl-3.0 | pculture/mirocommunity,pculture/mirocommunity,pculture/mirocommunity,pculture/mirocommunity | from setuptools import setup, find_packages
version = '1.2.0'
setup(name="Miro Community",
version=version,
packages=find_packages(),
author='Participatory Culture Foundation',
license='AGPLv3',
install_requires=['django==1.2.1'])
Upgrade requirements to be Django 1.2.5 | from setuptools import setup, find_packages
version = '1.2.0'
setup(name="Miro Community",
version=version,
packages=find_packages(),
author='Participatory Culture Foundation',
license='AGPLv3',
install_requires=['django==1.2.5'])
| <commit_before>from setuptools import setup, find_packages
version = '1.2.0'
setup(name="Miro Community",
version=version,
packages=find_packages(),
author='Participatory Culture Foundation',
license='AGPLv3',
install_requires=['django==1.2.1'])
<commit_msg>Upgrade requirements to be D... | from setuptools import setup, find_packages
version = '1.2.0'
setup(name="Miro Community",
version=version,
packages=find_packages(),
author='Participatory Culture Foundation',
license='AGPLv3',
install_requires=['django==1.2.5'])
| from setuptools import setup, find_packages
version = '1.2.0'
setup(name="Miro Community",
version=version,
packages=find_packages(),
author='Participatory Culture Foundation',
license='AGPLv3',
install_requires=['django==1.2.1'])
Upgrade requirements to be Django 1.2.5from setuptools ... | <commit_before>from setuptools import setup, find_packages
version = '1.2.0'
setup(name="Miro Community",
version=version,
packages=find_packages(),
author='Participatory Culture Foundation',
license='AGPLv3',
install_requires=['django==1.2.1'])
<commit_msg>Upgrade requirements to be D... |
70cf8c4c49a12caf68ea3f5d1d6b138e21673981 | setup.py | setup.py | #!/usr/bin/env python
"""
Install wagtailsettings using setuptools
"""
from wagtailsettings import __version__
with open('README.rst', 'r') as f:
readme = f.read()
try:
from setuptools import setup, find_packages
except ImportError:
from ez_setup import use_setuptools
use_setuptools()
from setupt... | #!/usr/bin/env python
"""
Install wagtailsettings using setuptools
"""
from wagtailsettings import __version__
with open('README.rst', 'r') as f:
readme = f.read()
try:
from setuptools import setup, find_packages
except ImportError:
from ez_setup import use_setuptools
use_setuptools()
from setupt... | Install wagtail only if needed. | Install wagtail only if needed.
In my case, I'm using not yet released to pypi wagtail, from master branch, and this setup script tries to install old wagtail and old django. | Python | bsd-2-clause | salvadormrf/wagtailsettings,salvadormrf/wagtailsettings | #!/usr/bin/env python
"""
Install wagtailsettings using setuptools
"""
from wagtailsettings import __version__
with open('README.rst', 'r') as f:
readme = f.read()
try:
from setuptools import setup, find_packages
except ImportError:
from ez_setup import use_setuptools
use_setuptools()
from setupt... | #!/usr/bin/env python
"""
Install wagtailsettings using setuptools
"""
from wagtailsettings import __version__
with open('README.rst', 'r') as f:
readme = f.read()
try:
from setuptools import setup, find_packages
except ImportError:
from ez_setup import use_setuptools
use_setuptools()
from setupt... | <commit_before>#!/usr/bin/env python
"""
Install wagtailsettings using setuptools
"""
from wagtailsettings import __version__
with open('README.rst', 'r') as f:
readme = f.read()
try:
from setuptools import setup, find_packages
except ImportError:
from ez_setup import use_setuptools
use_setuptools()
... | #!/usr/bin/env python
"""
Install wagtailsettings using setuptools
"""
from wagtailsettings import __version__
with open('README.rst', 'r') as f:
readme = f.read()
try:
from setuptools import setup, find_packages
except ImportError:
from ez_setup import use_setuptools
use_setuptools()
from setupt... | #!/usr/bin/env python
"""
Install wagtailsettings using setuptools
"""
from wagtailsettings import __version__
with open('README.rst', 'r') as f:
readme = f.read()
try:
from setuptools import setup, find_packages
except ImportError:
from ez_setup import use_setuptools
use_setuptools()
from setupt... | <commit_before>#!/usr/bin/env python
"""
Install wagtailsettings using setuptools
"""
from wagtailsettings import __version__
with open('README.rst', 'r') as f:
readme = f.read()
try:
from setuptools import setup, find_packages
except ImportError:
from ez_setup import use_setuptools
use_setuptools()
... |
8f8c20859828e887699e3acda4671d113cb4b011 | setup.py | setup.py | #!/usr/bin/python3
# -*- coding: utf-8 -*-
from setuptools import setup, find_packages
with open('README.rst') as fp:
readme = fp.read()
with open('HISTORY.rst') as fp:
history = fp.read()
setup(
name='pySRA',
version='0.4.10',
description='Site Response Analysis with Python',
long_descripti... | #!/usr/bin/python3
# -*- coding: utf-8 -*-
from setuptools import setup, find_packages
with open('README.rst') as fp:
readme = fp.read()
with open('HISTORY.rst') as fp:
history = fp.read()
setup(
name='pySRA',
version='0.4.10',
description='Site Response Analysis with Python',
long_descripti... | Add pandas as optional dependency. | Add pandas as optional dependency.
| Python | mit | arkottke/pysra | #!/usr/bin/python3
# -*- coding: utf-8 -*-
from setuptools import setup, find_packages
with open('README.rst') as fp:
readme = fp.read()
with open('HISTORY.rst') as fp:
history = fp.read()
setup(
name='pySRA',
version='0.4.10',
description='Site Response Analysis with Python',
long_descripti... | #!/usr/bin/python3
# -*- coding: utf-8 -*-
from setuptools import setup, find_packages
with open('README.rst') as fp:
readme = fp.read()
with open('HISTORY.rst') as fp:
history = fp.read()
setup(
name='pySRA',
version='0.4.10',
description='Site Response Analysis with Python',
long_descripti... | <commit_before>#!/usr/bin/python3
# -*- coding: utf-8 -*-
from setuptools import setup, find_packages
with open('README.rst') as fp:
readme = fp.read()
with open('HISTORY.rst') as fp:
history = fp.read()
setup(
name='pySRA',
version='0.4.10',
description='Site Response Analysis with Python',
... | #!/usr/bin/python3
# -*- coding: utf-8 -*-
from setuptools import setup, find_packages
with open('README.rst') as fp:
readme = fp.read()
with open('HISTORY.rst') as fp:
history = fp.read()
setup(
name='pySRA',
version='0.4.10',
description='Site Response Analysis with Python',
long_descripti... | #!/usr/bin/python3
# -*- coding: utf-8 -*-
from setuptools import setup, find_packages
with open('README.rst') as fp:
readme = fp.read()
with open('HISTORY.rst') as fp:
history = fp.read()
setup(
name='pySRA',
version='0.4.10',
description='Site Response Analysis with Python',
long_descripti... | <commit_before>#!/usr/bin/python3
# -*- coding: utf-8 -*-
from setuptools import setup, find_packages
with open('README.rst') as fp:
readme = fp.read()
with open('HISTORY.rst') as fp:
history = fp.read()
setup(
name='pySRA',
version='0.4.10',
description='Site Response Analysis with Python',
... |
2a6dbe27150c6d82daee48f054936088467f431f | setup.py | setup.py | from setuptools import setup
setup(
name="rotterdam",
version="0.3.2",
description=(
"Simple distributed job queue via redis."
),
author="William Glass",
author_email="[email protected]",
url="http://github.com/wglass/rotterdam",
packages=["rotterdam"],
include_package... | from setuptools import setup
setup(
name="rotterdam",
version="0.3.2",
description=(
"Simple asynchronous job queue via redis."
),
author="William Glass",
author_email="[email protected]",
url="http://github.com/wglass/rotterdam",
packages=["rotterdam"],
include_packag... | Split out the dependencies of client and server. | Split out the dependencies of client and server.
| Python | mit | wglass/rotterdam | from setuptools import setup
setup(
name="rotterdam",
version="0.3.2",
description=(
"Simple distributed job queue via redis."
),
author="William Glass",
author_email="[email protected]",
url="http://github.com/wglass/rotterdam",
packages=["rotterdam"],
include_package... | from setuptools import setup
setup(
name="rotterdam",
version="0.3.2",
description=(
"Simple asynchronous job queue via redis."
),
author="William Glass",
author_email="[email protected]",
url="http://github.com/wglass/rotterdam",
packages=["rotterdam"],
include_packag... | <commit_before>from setuptools import setup
setup(
name="rotterdam",
version="0.3.2",
description=(
"Simple distributed job queue via redis."
),
author="William Glass",
author_email="[email protected]",
url="http://github.com/wglass/rotterdam",
packages=["rotterdam"],
... | from setuptools import setup
setup(
name="rotterdam",
version="0.3.2",
description=(
"Simple asynchronous job queue via redis."
),
author="William Glass",
author_email="[email protected]",
url="http://github.com/wglass/rotterdam",
packages=["rotterdam"],
include_packag... | from setuptools import setup
setup(
name="rotterdam",
version="0.3.2",
description=(
"Simple distributed job queue via redis."
),
author="William Glass",
author_email="[email protected]",
url="http://github.com/wglass/rotterdam",
packages=["rotterdam"],
include_package... | <commit_before>from setuptools import setup
setup(
name="rotterdam",
version="0.3.2",
description=(
"Simple distributed job queue via redis."
),
author="William Glass",
author_email="[email protected]",
url="http://github.com/wglass/rotterdam",
packages=["rotterdam"],
... |
cd27849acae57a0382f66116771491576177a39e | setup.py | setup.py | #!/usr/bin/env python
from distutils.core import setup
__VERSION__ = '0.2.4'
long_description = "See https://furtive.readthedocs.org"
setup(name='Furtive',
version=__VERSION__,
description='File Integrity Verification System',
author='Derrick Bryant',
author_email='[email protected]',
... | #!/usr/bin/env python
from distutils.core import setup
__VERSION__ = '0.2.4'
long_description = """
Github: https://github.com/dbryant4/furtive
"""
setup(name='Furtive',
version=__VERSION__,
description='File Integrity Verification System',
author='Derrick Bryant',
author_email='dbryant4@gma... | Add links to github project page | Add links to github project page
| Python | mit | dbryant4/furtive | #!/usr/bin/env python
from distutils.core import setup
__VERSION__ = '0.2.4'
long_description = "See https://furtive.readthedocs.org"
setup(name='Furtive',
version=__VERSION__,
description='File Integrity Verification System',
author='Derrick Bryant',
author_email='[email protected]',
... | #!/usr/bin/env python
from distutils.core import setup
__VERSION__ = '0.2.4'
long_description = """
Github: https://github.com/dbryant4/furtive
"""
setup(name='Furtive',
version=__VERSION__,
description='File Integrity Verification System',
author='Derrick Bryant',
author_email='dbryant4@gma... | <commit_before>#!/usr/bin/env python
from distutils.core import setup
__VERSION__ = '0.2.4'
long_description = "See https://furtive.readthedocs.org"
setup(name='Furtive',
version=__VERSION__,
description='File Integrity Verification System',
author='Derrick Bryant',
author_email='dbryant4@gm... | #!/usr/bin/env python
from distutils.core import setup
__VERSION__ = '0.2.4'
long_description = """
Github: https://github.com/dbryant4/furtive
"""
setup(name='Furtive',
version=__VERSION__,
description='File Integrity Verification System',
author='Derrick Bryant',
author_email='dbryant4@gma... | #!/usr/bin/env python
from distutils.core import setup
__VERSION__ = '0.2.4'
long_description = "See https://furtive.readthedocs.org"
setup(name='Furtive',
version=__VERSION__,
description='File Integrity Verification System',
author='Derrick Bryant',
author_email='[email protected]',
... | <commit_before>#!/usr/bin/env python
from distutils.core import setup
__VERSION__ = '0.2.4'
long_description = "See https://furtive.readthedocs.org"
setup(name='Furtive',
version=__VERSION__,
description='File Integrity Verification System',
author='Derrick Bryant',
author_email='dbryant4@gm... |
e725a8ec2a0c998e9eeca100dfb6eb49035c343c | setup.py | setup.py | from setuptools import setup
setup(name='sms_auth_service',
version='0.0.1',
description='An SMS backed authorization micro-service',
packages=['sms_auth_service'],
author='Flowroute Developers',
url='https://github.com/flowroute/two_factor_auth_python_demo',
author_email='developer... | from setuptools import setup
setup(name='sms_auth_service',
version='0.0.1',
description='An SMS backed authorization micro-service',
packages=['sms_auth_service'],
author='Flowroute Developers',
license='MIT',
url='https://github.com/flowroute/sms-verification',
author_email=... | Add license information, and update project url. | Add license information, and update project url.
| Python | mit | flowroute/sms-verification,flowroute/sms-verification,flowroute/sms-verification | from setuptools import setup
setup(name='sms_auth_service',
version='0.0.1',
description='An SMS backed authorization micro-service',
packages=['sms_auth_service'],
author='Flowroute Developers',
url='https://github.com/flowroute/two_factor_auth_python_demo',
author_email='developer... | from setuptools import setup
setup(name='sms_auth_service',
version='0.0.1',
description='An SMS backed authorization micro-service',
packages=['sms_auth_service'],
author='Flowroute Developers',
license='MIT',
url='https://github.com/flowroute/sms-verification',
author_email=... | <commit_before>from setuptools import setup
setup(name='sms_auth_service',
version='0.0.1',
description='An SMS backed authorization micro-service',
packages=['sms_auth_service'],
author='Flowroute Developers',
url='https://github.com/flowroute/two_factor_auth_python_demo',
author_e... | from setuptools import setup
setup(name='sms_auth_service',
version='0.0.1',
description='An SMS backed authorization micro-service',
packages=['sms_auth_service'],
author='Flowroute Developers',
license='MIT',
url='https://github.com/flowroute/sms-verification',
author_email=... | from setuptools import setup
setup(name='sms_auth_service',
version='0.0.1',
description='An SMS backed authorization micro-service',
packages=['sms_auth_service'],
author='Flowroute Developers',
url='https://github.com/flowroute/two_factor_auth_python_demo',
author_email='developer... | <commit_before>from setuptools import setup
setup(name='sms_auth_service',
version='0.0.1',
description='An SMS backed authorization micro-service',
packages=['sms_auth_service'],
author='Flowroute Developers',
url='https://github.com/flowroute/two_factor_auth_python_demo',
author_e... |
ed6d7fdbf24780baa1afa60961fc4bd22354ae8f | setup.py | setup.py | import os
from setuptools import setup, find_packages
from ghtools import __version__
requirements = [
'requests==1.1.0',
'argh==0.23.0'
]
python_scripts = [
'browse',
'list-members',
'login',
'migrate-project',
'migrate-wiki',
'migrate-teams',
'org',
'repo',
'status',
]
... | import os
from setuptools import setup, find_packages
from ghtools import __version__
requirements = [
'requests==2.2.1',
'argh==0.23.0'
]
python_scripts = [
'browse',
'list-members',
'login',
'migrate-project',
'migrate-wiki',
'migrate-teams',
'org',
'repo',
'status',
]
... | Upgrade requests library to version 2.1.1 | Upgrade requests library to version 2.1.1
Upgrade the `requests` library to match the version provided by Ubuntu
Trusty, version 2.1.1.
This is to prevent a conflict on Ubuntu Trusty between system Python
libraries and Pip libraries.
Specifically, Pip relies on the `IncompleteRead` module that is exported
by `reques... | Python | mit | alphagov/ghtools | import os
from setuptools import setup, find_packages
from ghtools import __version__
requirements = [
'requests==1.1.0',
'argh==0.23.0'
]
python_scripts = [
'browse',
'list-members',
'login',
'migrate-project',
'migrate-wiki',
'migrate-teams',
'org',
'repo',
'status',
]
... | import os
from setuptools import setup, find_packages
from ghtools import __version__
requirements = [
'requests==2.2.1',
'argh==0.23.0'
]
python_scripts = [
'browse',
'list-members',
'login',
'migrate-project',
'migrate-wiki',
'migrate-teams',
'org',
'repo',
'status',
]
... | <commit_before>import os
from setuptools import setup, find_packages
from ghtools import __version__
requirements = [
'requests==1.1.0',
'argh==0.23.0'
]
python_scripts = [
'browse',
'list-members',
'login',
'migrate-project',
'migrate-wiki',
'migrate-teams',
'org',
'repo',
... | import os
from setuptools import setup, find_packages
from ghtools import __version__
requirements = [
'requests==2.2.1',
'argh==0.23.0'
]
python_scripts = [
'browse',
'list-members',
'login',
'migrate-project',
'migrate-wiki',
'migrate-teams',
'org',
'repo',
'status',
]
... | import os
from setuptools import setup, find_packages
from ghtools import __version__
requirements = [
'requests==1.1.0',
'argh==0.23.0'
]
python_scripts = [
'browse',
'list-members',
'login',
'migrate-project',
'migrate-wiki',
'migrate-teams',
'org',
'repo',
'status',
]
... | <commit_before>import os
from setuptools import setup, find_packages
from ghtools import __version__
requirements = [
'requests==1.1.0',
'argh==0.23.0'
]
python_scripts = [
'browse',
'list-members',
'login',
'migrate-project',
'migrate-wiki',
'migrate-teams',
'org',
'repo',
... |
d4137375513e22e9fda3ad6abb53e99492101727 | setup.py | setup.py | from setuptools import setup, find_packages
# Prevent "TypeError: 'NoneType' object is not callable" error
# when running python setup.py test
# (see http://www.eby-sarna.com/pipermail/peak/2010-May/003357.html)
try:
import multiprocessing
except ImportError:
pass
setup(
name='cmakelists_parsing',
ve... | from setuptools import setup, find_packages
# Prevent "TypeError: 'NoneType' object is not callable" error
# when running python setup.py test
# (see http://www.eby-sarna.com/pipermail/peak/2010-May/003357.html)
try:
import multiprocessing
except ImportError:
pass
setup(
name='cmakelists_parsing',
ve... | Fix entry point for pretty printing script. | Fix entry point for pretty printing script.
| Python | mit | ijt/cmakelists_parsing,wjwwood/parse_cmake | from setuptools import setup, find_packages
# Prevent "TypeError: 'NoneType' object is not callable" error
# when running python setup.py test
# (see http://www.eby-sarna.com/pipermail/peak/2010-May/003357.html)
try:
import multiprocessing
except ImportError:
pass
setup(
name='cmakelists_parsing',
ve... | from setuptools import setup, find_packages
# Prevent "TypeError: 'NoneType' object is not callable" error
# when running python setup.py test
# (see http://www.eby-sarna.com/pipermail/peak/2010-May/003357.html)
try:
import multiprocessing
except ImportError:
pass
setup(
name='cmakelists_parsing',
ve... | <commit_before>from setuptools import setup, find_packages
# Prevent "TypeError: 'NoneType' object is not callable" error
# when running python setup.py test
# (see http://www.eby-sarna.com/pipermail/peak/2010-May/003357.html)
try:
import multiprocessing
except ImportError:
pass
setup(
name='cmakelists_p... | from setuptools import setup, find_packages
# Prevent "TypeError: 'NoneType' object is not callable" error
# when running python setup.py test
# (see http://www.eby-sarna.com/pipermail/peak/2010-May/003357.html)
try:
import multiprocessing
except ImportError:
pass
setup(
name='cmakelists_parsing',
ve... | from setuptools import setup, find_packages
# Prevent "TypeError: 'NoneType' object is not callable" error
# when running python setup.py test
# (see http://www.eby-sarna.com/pipermail/peak/2010-May/003357.html)
try:
import multiprocessing
except ImportError:
pass
setup(
name='cmakelists_parsing',
ve... | <commit_before>from setuptools import setup, find_packages
# Prevent "TypeError: 'NoneType' object is not callable" error
# when running python setup.py test
# (see http://www.eby-sarna.com/pipermail/peak/2010-May/003357.html)
try:
import multiprocessing
except ImportError:
pass
setup(
name='cmakelists_p... |
c48c0a3c032eb92c7e10d42466381f15c643bbe2 | setup.py | setup.py | from setuptools import setup, find_packages
import os
from osuapi import __version__ as version, __title__ as name, __author__ as author, __license__ as license
def read(fname):
return open(os.path.join(os.path.dirname(__file__), fname)).read()
try:
import pypandoc
with open('README.md') as readme_md:
... | from setuptools import setup, find_packages
import os
from osuapi import __version__ as version, __title__ as name, __author__ as author, __license__ as license
def read(fname):
return open(os.path.join(os.path.dirname(__file__), fname)).read()
try:
import pypandoc
with open('README.md') as readme_md:
... | Add warning if large_description is not generated | Add warning if large_description is not generated
| Python | mit | khazhyk/osuapi | from setuptools import setup, find_packages
import os
from osuapi import __version__ as version, __title__ as name, __author__ as author, __license__ as license
def read(fname):
return open(os.path.join(os.path.dirname(__file__), fname)).read()
try:
import pypandoc
with open('README.md') as readme_md:
... | from setuptools import setup, find_packages
import os
from osuapi import __version__ as version, __title__ as name, __author__ as author, __license__ as license
def read(fname):
return open(os.path.join(os.path.dirname(__file__), fname)).read()
try:
import pypandoc
with open('README.md') as readme_md:
... | <commit_before>from setuptools import setup, find_packages
import os
from osuapi import __version__ as version, __title__ as name, __author__ as author, __license__ as license
def read(fname):
return open(os.path.join(os.path.dirname(__file__), fname)).read()
try:
import pypandoc
with open('README.md') a... | from setuptools import setup, find_packages
import os
from osuapi import __version__ as version, __title__ as name, __author__ as author, __license__ as license
def read(fname):
return open(os.path.join(os.path.dirname(__file__), fname)).read()
try:
import pypandoc
with open('README.md') as readme_md:
... | from setuptools import setup, find_packages
import os
from osuapi import __version__ as version, __title__ as name, __author__ as author, __license__ as license
def read(fname):
return open(os.path.join(os.path.dirname(__file__), fname)).read()
try:
import pypandoc
with open('README.md') as readme_md:
... | <commit_before>from setuptools import setup, find_packages
import os
from osuapi import __version__ as version, __title__ as name, __author__ as author, __license__ as license
def read(fname):
return open(os.path.join(os.path.dirname(__file__), fname)).read()
try:
import pypandoc
with open('README.md') a... |
d8d62288da0339bb0b5414d18eca8aab24b61238 | setup.py | setup.py | try:
from setuptools import setup
except ImportError:
from distutils.core import setup
config = {
'description': 'regetron is a simple shell for playing with regular expressions',
'author': 'Zed A. Shaw',
'url': 'https://gitorious.org/regetron/regetron',
'download_url': 'http://pypi.python.org/pypi/regetro... | try:
from setuptools import setup
except ImportError:
from distutils.core import setup
config = {
'description': 'regetron is a simple shell for playing with regular expressions',
'author': 'Zed A. Shaw',
'url': 'https://gitorious.org/regetron/regetron',
'download_url': 'http://pypi.python.org/pypi/regetro... | Bump version number for the next release. | Bump version number for the next release.
| Python | bsd-3-clause | Sean1708/Regetron3.0,Sean1708/Regetron3.0 | try:
from setuptools import setup
except ImportError:
from distutils.core import setup
config = {
'description': 'regetron is a simple shell for playing with regular expressions',
'author': 'Zed A. Shaw',
'url': 'https://gitorious.org/regetron/regetron',
'download_url': 'http://pypi.python.org/pypi/regetro... | try:
from setuptools import setup
except ImportError:
from distutils.core import setup
config = {
'description': 'regetron is a simple shell for playing with regular expressions',
'author': 'Zed A. Shaw',
'url': 'https://gitorious.org/regetron/regetron',
'download_url': 'http://pypi.python.org/pypi/regetro... | <commit_before>try:
from setuptools import setup
except ImportError:
from distutils.core import setup
config = {
'description': 'regetron is a simple shell for playing with regular expressions',
'author': 'Zed A. Shaw',
'url': 'https://gitorious.org/regetron/regetron',
'download_url': 'http://pypi.python.o... | try:
from setuptools import setup
except ImportError:
from distutils.core import setup
config = {
'description': 'regetron is a simple shell for playing with regular expressions',
'author': 'Zed A. Shaw',
'url': 'https://gitorious.org/regetron/regetron',
'download_url': 'http://pypi.python.org/pypi/regetro... | try:
from setuptools import setup
except ImportError:
from distutils.core import setup
config = {
'description': 'regetron is a simple shell for playing with regular expressions',
'author': 'Zed A. Shaw',
'url': 'https://gitorious.org/regetron/regetron',
'download_url': 'http://pypi.python.org/pypi/regetro... | <commit_before>try:
from setuptools import setup
except ImportError:
from distutils.core import setup
config = {
'description': 'regetron is a simple shell for playing with regular expressions',
'author': 'Zed A. Shaw',
'url': 'https://gitorious.org/regetron/regetron',
'download_url': 'http://pypi.python.o... |
462efd1a2ee217b8a70d1769f2fae9265f54fc4f | setup.py | setup.py | from setuptools import setup, find_packages
setup(
name="adbons",
version="0.0.1",
author="Daniel Bälz",
author_email="[email protected]",
description="""A wrapper for the Android adb tool.
It's just adb on steroids""",
license="BSD",
packages=find_packages(),
include_package_data=Tr... | from setuptools import setup, find_packages
setup(
name="adbons",
version="0.0.1",
author="Daniel Bälz",
author_email="[email protected]",
description="""A wrapper for the Android adb tool.
It's just adb on steroids""",
license="BSD",
packages=find_packages(),
include_package_data=Tr... | Add pyyaml and use lower case lib names | Add pyyaml and use lower case lib names
| Python | bsd-2-clause | dbaelz/adbons | from setuptools import setup, find_packages
setup(
name="adbons",
version="0.0.1",
author="Daniel Bälz",
author_email="[email protected]",
description="""A wrapper for the Android adb tool.
It's just adb on steroids""",
license="BSD",
packages=find_packages(),
include_package_data=Tr... | from setuptools import setup, find_packages
setup(
name="adbons",
version="0.0.1",
author="Daniel Bälz",
author_email="[email protected]",
description="""A wrapper for the Android adb tool.
It's just adb on steroids""",
license="BSD",
packages=find_packages(),
include_package_data=Tr... | <commit_before>from setuptools import setup, find_packages
setup(
name="adbons",
version="0.0.1",
author="Daniel Bälz",
author_email="[email protected]",
description="""A wrapper for the Android adb tool.
It's just adb on steroids""",
license="BSD",
packages=find_packages(),
include_... | from setuptools import setup, find_packages
setup(
name="adbons",
version="0.0.1",
author="Daniel Bälz",
author_email="[email protected]",
description="""A wrapper for the Android adb tool.
It's just adb on steroids""",
license="BSD",
packages=find_packages(),
include_package_data=Tr... | from setuptools import setup, find_packages
setup(
name="adbons",
version="0.0.1",
author="Daniel Bälz",
author_email="[email protected]",
description="""A wrapper for the Android adb tool.
It's just adb on steroids""",
license="BSD",
packages=find_packages(),
include_package_data=Tr... | <commit_before>from setuptools import setup, find_packages
setup(
name="adbons",
version="0.0.1",
author="Daniel Bälz",
author_email="[email protected]",
description="""A wrapper for the Android adb tool.
It's just adb on steroids""",
license="BSD",
packages=find_packages(),
include_... |
1cbf66453e2808e8c15628b41e37e96c93cc77db | great_expectations_airflow/hooks/db_hook.py | great_expectations_airflow/hooks/db_hook.py | from airflow.hooks.dbapi_hook import DbApiHook
import great_expectations as ge
class ExpectationMySQLHook(DbApiHook):
def __init__(self, *args, **kwargs):
super().__init__(*args, **kwargs)
def get_ge_df(self, dataset_name, **kwargs):
self.log.info("Connecting to dataset {dataset} on {uri}".f... | import great_expectations as ge
from airflow.hooks.mysql_hook import MySqlHook
class ExpectationMySQLHook(MySqlHook):
def __init__(self, *args, **kwargs):
super().__init__(*args, **kwargs)
def get_ge_df(self, dataset_name, **kwargs):
self.log.info("Connecting to dataset {dataset} on {uri}".f... | Make sure hook can actually be instantiated (generic DbApiHook cannot) | Make sure hook can actually be instantiated (generic DbApiHook cannot)
| Python | apache-2.0 | great-expectations/great_expectations,great-expectations/great_expectations,great-expectations/great_expectations,great-expectations/great_expectations | from airflow.hooks.dbapi_hook import DbApiHook
import great_expectations as ge
class ExpectationMySQLHook(DbApiHook):
def __init__(self, *args, **kwargs):
super().__init__(*args, **kwargs)
def get_ge_df(self, dataset_name, **kwargs):
self.log.info("Connecting to dataset {dataset} on {uri}".f... | import great_expectations as ge
from airflow.hooks.mysql_hook import MySqlHook
class ExpectationMySQLHook(MySqlHook):
def __init__(self, *args, **kwargs):
super().__init__(*args, **kwargs)
def get_ge_df(self, dataset_name, **kwargs):
self.log.info("Connecting to dataset {dataset} on {uri}".f... | <commit_before>from airflow.hooks.dbapi_hook import DbApiHook
import great_expectations as ge
class ExpectationMySQLHook(DbApiHook):
def __init__(self, *args, **kwargs):
super().__init__(*args, **kwargs)
def get_ge_df(self, dataset_name, **kwargs):
self.log.info("Connecting to dataset {datas... | import great_expectations as ge
from airflow.hooks.mysql_hook import MySqlHook
class ExpectationMySQLHook(MySqlHook):
def __init__(self, *args, **kwargs):
super().__init__(*args, **kwargs)
def get_ge_df(self, dataset_name, **kwargs):
self.log.info("Connecting to dataset {dataset} on {uri}".f... | from airflow.hooks.dbapi_hook import DbApiHook
import great_expectations as ge
class ExpectationMySQLHook(DbApiHook):
def __init__(self, *args, **kwargs):
super().__init__(*args, **kwargs)
def get_ge_df(self, dataset_name, **kwargs):
self.log.info("Connecting to dataset {dataset} on {uri}".f... | <commit_before>from airflow.hooks.dbapi_hook import DbApiHook
import great_expectations as ge
class ExpectationMySQLHook(DbApiHook):
def __init__(self, *args, **kwargs):
super().__init__(*args, **kwargs)
def get_ge_df(self, dataset_name, **kwargs):
self.log.info("Connecting to dataset {datas... |
3443a7355888a9a4fbd6b9de8c8f84c88643e5af | confluent_client/setup.py | confluent_client/setup.py | from setuptools import setup
setup(
name='confluent_client',
version='0.1.1',
author='Jarrod Johnson',
author_email='[email protected]',
url='http://xcat.sf.net/',
packages=['confluent'],
install_requires=['confluent_common>=0.1.1'],
scripts=['bin/confetty'],
)
| from setuptools import setup
setup(
name='confluent_client',
version='0.1.2',
author='Jarrod Johnson',
author_email='[email protected]',
url='http://xcat.sf.net/',
packages=['confluent'],
install_requires=['confluent_common>=0.1.0'],
scripts=['bin/confetty'],
)
| Refresh package data to assure better pyghmi and confetty | Refresh package data to assure better pyghmi and confetty
| Python | apache-2.0 | jufm/confluent,chenglch/confluent,whowutwut/confluent,jjohnson42/confluent,xcat2/confluent,chenglch/confluent,whowutwut/confluent,michaelfardu/thinkconfluent,whowutwut/confluent,michaelfardu/thinkconfluent,jufm/confluent,jufm/confluent,xcat2/confluent,michaelfardu/thinkconfluent,chenglch/confluent,chenglch/confluent,jj... | from setuptools import setup
setup(
name='confluent_client',
version='0.1.1',
author='Jarrod Johnson',
author_email='[email protected]',
url='http://xcat.sf.net/',
packages=['confluent'],
install_requires=['confluent_common>=0.1.1'],
scripts=['bin/confetty'],
)
Refresh package data to... | from setuptools import setup
setup(
name='confluent_client',
version='0.1.2',
author='Jarrod Johnson',
author_email='[email protected]',
url='http://xcat.sf.net/',
packages=['confluent'],
install_requires=['confluent_common>=0.1.0'],
scripts=['bin/confetty'],
)
| <commit_before>from setuptools import setup
setup(
name='confluent_client',
version='0.1.1',
author='Jarrod Johnson',
author_email='[email protected]',
url='http://xcat.sf.net/',
packages=['confluent'],
install_requires=['confluent_common>=0.1.1'],
scripts=['bin/confetty'],
)
<commit_... | from setuptools import setup
setup(
name='confluent_client',
version='0.1.2',
author='Jarrod Johnson',
author_email='[email protected]',
url='http://xcat.sf.net/',
packages=['confluent'],
install_requires=['confluent_common>=0.1.0'],
scripts=['bin/confetty'],
)
| from setuptools import setup
setup(
name='confluent_client',
version='0.1.1',
author='Jarrod Johnson',
author_email='[email protected]',
url='http://xcat.sf.net/',
packages=['confluent'],
install_requires=['confluent_common>=0.1.1'],
scripts=['bin/confetty'],
)
Refresh package data to... | <commit_before>from setuptools import setup
setup(
name='confluent_client',
version='0.1.1',
author='Jarrod Johnson',
author_email='[email protected]',
url='http://xcat.sf.net/',
packages=['confluent'],
install_requires=['confluent_common>=0.1.1'],
scripts=['bin/confetty'],
)
<commit_... |
e68aaef747f5a2ced06f74249d49d0ed81551d23 | test/test_functionality.py | test/test_functionality.py | """
Tests of overall functionality
"""
import pytest
import toolaudit
import yaml
def test_simple_audit(capsys):
"""
Check simple audit gives the expected output
"""
app = toolaudit.application.ToolauditApp()
try:
app.run(kitlist_file='test/example.yaml')
except SystemExit:
pa... | """
Tests of overall functionality
"""
import pytest
import toolaudit
import yaml
def test_simple_audit(capsys, monkeypatch):
"""
Check simple audit gives the expected output
"""
def mockreturn(path):
return '9c3bb3efa8095f36aafd9bf3a698efe439505021'
monkeypatch.setattr(toolaudit.readers,... | Use mocking to fix the result of hashing files | Use mocking to fix the result of hashing files
| Python | mit | jstutters/toolaudit | """
Tests of overall functionality
"""
import pytest
import toolaudit
import yaml
def test_simple_audit(capsys):
"""
Check simple audit gives the expected output
"""
app = toolaudit.application.ToolauditApp()
try:
app.run(kitlist_file='test/example.yaml')
except SystemExit:
pa... | """
Tests of overall functionality
"""
import pytest
import toolaudit
import yaml
def test_simple_audit(capsys, monkeypatch):
"""
Check simple audit gives the expected output
"""
def mockreturn(path):
return '9c3bb3efa8095f36aafd9bf3a698efe439505021'
monkeypatch.setattr(toolaudit.readers,... | <commit_before>"""
Tests of overall functionality
"""
import pytest
import toolaudit
import yaml
def test_simple_audit(capsys):
"""
Check simple audit gives the expected output
"""
app = toolaudit.application.ToolauditApp()
try:
app.run(kitlist_file='test/example.yaml')
except SystemE... | """
Tests of overall functionality
"""
import pytest
import toolaudit
import yaml
def test_simple_audit(capsys, monkeypatch):
"""
Check simple audit gives the expected output
"""
def mockreturn(path):
return '9c3bb3efa8095f36aafd9bf3a698efe439505021'
monkeypatch.setattr(toolaudit.readers,... | """
Tests of overall functionality
"""
import pytest
import toolaudit
import yaml
def test_simple_audit(capsys):
"""
Check simple audit gives the expected output
"""
app = toolaudit.application.ToolauditApp()
try:
app.run(kitlist_file='test/example.yaml')
except SystemExit:
pa... | <commit_before>"""
Tests of overall functionality
"""
import pytest
import toolaudit
import yaml
def test_simple_audit(capsys):
"""
Check simple audit gives the expected output
"""
app = toolaudit.application.ToolauditApp()
try:
app.run(kitlist_file='test/example.yaml')
except SystemE... |
6de9b3215ac9d3a2b5dc97af5e5fe02886d4bfe1 | pywikibot/families/wikitech_family.py | pywikibot/families/wikitech_family.py | # -*- coding: utf-8 -*-
__version__ = '$Id$'
from pywikibot import family
# The Wikitech family
class Family(family.Family):
def __init__(self):
super(Family, self).__init__()
self.name = 'wikitech'
self.langs = {
'en': 'wikitech.wikimedia.org',
}
def version(s... | # -*- coding: utf-8 -*-
__version__ = '$Id$'
from pywikibot import family
# The Wikitech family
class Family(family.Family):
def __init__(self):
super(Family, self).__init__()
self.name = 'wikitech'
self.langs = {
'en': 'wikitech.wikimedia.org',
}
def version(s... | Remove overide of default scriptpath | Remove overide of default scriptpath
| Python | mit | pywikibot/core-migration-example | # -*- coding: utf-8 -*-
__version__ = '$Id$'
from pywikibot import family
# The Wikitech family
class Family(family.Family):
def __init__(self):
super(Family, self).__init__()
self.name = 'wikitech'
self.langs = {
'en': 'wikitech.wikimedia.org',
}
def version(s... | # -*- coding: utf-8 -*-
__version__ = '$Id$'
from pywikibot import family
# The Wikitech family
class Family(family.Family):
def __init__(self):
super(Family, self).__init__()
self.name = 'wikitech'
self.langs = {
'en': 'wikitech.wikimedia.org',
}
def version(s... | <commit_before># -*- coding: utf-8 -*-
__version__ = '$Id$'
from pywikibot import family
# The Wikitech family
class Family(family.Family):
def __init__(self):
super(Family, self).__init__()
self.name = 'wikitech'
self.langs = {
'en': 'wikitech.wikimedia.org',
}
... | # -*- coding: utf-8 -*-
__version__ = '$Id$'
from pywikibot import family
# The Wikitech family
class Family(family.Family):
def __init__(self):
super(Family, self).__init__()
self.name = 'wikitech'
self.langs = {
'en': 'wikitech.wikimedia.org',
}
def version(s... | # -*- coding: utf-8 -*-
__version__ = '$Id$'
from pywikibot import family
# The Wikitech family
class Family(family.Family):
def __init__(self):
super(Family, self).__init__()
self.name = 'wikitech'
self.langs = {
'en': 'wikitech.wikimedia.org',
}
def version(s... | <commit_before># -*- coding: utf-8 -*-
__version__ = '$Id$'
from pywikibot import family
# The Wikitech family
class Family(family.Family):
def __init__(self):
super(Family, self).__init__()
self.name = 'wikitech'
self.langs = {
'en': 'wikitech.wikimedia.org',
}
... |
4a032ece106d4b3b3764420197453afd33475bf6 | donut/modules/permissions/helpers.py | donut/modules/permissions/helpers.py | import flask
from donut.modules.groups import helpers as groups
def has_permission(user_id, permission_id):
'''
Returns True if [user_id] holds a position that directly
or indirectly (through a position relation) grants
them [permission_id]. Otherwise returns False.
'''
if not (isinstance(u... | import flask
from donut.modules.groups import helpers as groups
def has_permission(user_id, permission_id):
'''
Returns True if [user_id] holds a position that directly
or indirectly (through a position relation) grants
them [permission_id]. Otherwise returns False.
'''
if not (isinstance(u... | Fix failing test and make lint | Fix failing test and make lint
| Python | mit | ASCIT/donut-python,ASCIT/donut,ASCIT/donut,ASCIT/donut-python,ASCIT/donut | import flask
from donut.modules.groups import helpers as groups
def has_permission(user_id, permission_id):
'''
Returns True if [user_id] holds a position that directly
or indirectly (through a position relation) grants
them [permission_id]. Otherwise returns False.
'''
if not (isinstance(u... | import flask
from donut.modules.groups import helpers as groups
def has_permission(user_id, permission_id):
'''
Returns True if [user_id] holds a position that directly
or indirectly (through a position relation) grants
them [permission_id]. Otherwise returns False.
'''
if not (isinstance(u... | <commit_before>import flask
from donut.modules.groups import helpers as groups
def has_permission(user_id, permission_id):
'''
Returns True if [user_id] holds a position that directly
or indirectly (through a position relation) grants
them [permission_id]. Otherwise returns False.
'''
if no... | import flask
from donut.modules.groups import helpers as groups
def has_permission(user_id, permission_id):
'''
Returns True if [user_id] holds a position that directly
or indirectly (through a position relation) grants
them [permission_id]. Otherwise returns False.
'''
if not (isinstance(u... | import flask
from donut.modules.groups import helpers as groups
def has_permission(user_id, permission_id):
'''
Returns True if [user_id] holds a position that directly
or indirectly (through a position relation) grants
them [permission_id]. Otherwise returns False.
'''
if not (isinstance(u... | <commit_before>import flask
from donut.modules.groups import helpers as groups
def has_permission(user_id, permission_id):
'''
Returns True if [user_id] holds a position that directly
or indirectly (through a position relation) grants
them [permission_id]. Otherwise returns False.
'''
if no... |
dd5a292320f657a4b5e776c6e0d99fad5916e6e6 | source/fiblist/conf/urls.py | source/fiblist/conf/urls.py | from django.conf.urls import include, url
from django.contrib import admin
from lists.views import home_page
from core.views import custom_server_error
# error pages
# handler400 = 'core.views.custom_bad_request'
# handler403 = 'core.views.custom_permission_denied'
# handler404 = 'core.views.custom_page_not_found'
# ... | from django.conf.urls import include, url
from django.contrib import admin
from lists.views import home_page
# from core.views import custom_server_error
# error pages
# handler400 = 'core.views.custom_bad_request'
# handler403 = 'core.views.custom_permission_denied'
# handler404 = 'core.views.custom_page_not_found'
... | Remove customer server error view temporarily. | Remove customer server error view temporarily.
| Python | unlicense | nicorellius/fiblist,nicorellius/fiblist | from django.conf.urls import include, url
from django.contrib import admin
from lists.views import home_page
from core.views import custom_server_error
# error pages
# handler400 = 'core.views.custom_bad_request'
# handler403 = 'core.views.custom_permission_denied'
# handler404 = 'core.views.custom_page_not_found'
# ... | from django.conf.urls import include, url
from django.contrib import admin
from lists.views import home_page
# from core.views import custom_server_error
# error pages
# handler400 = 'core.views.custom_bad_request'
# handler403 = 'core.views.custom_permission_denied'
# handler404 = 'core.views.custom_page_not_found'
... | <commit_before>from django.conf.urls import include, url
from django.contrib import admin
from lists.views import home_page
from core.views import custom_server_error
# error pages
# handler400 = 'core.views.custom_bad_request'
# handler403 = 'core.views.custom_permission_denied'
# handler404 = 'core.views.custom_pag... | from django.conf.urls import include, url
from django.contrib import admin
from lists.views import home_page
# from core.views import custom_server_error
# error pages
# handler400 = 'core.views.custom_bad_request'
# handler403 = 'core.views.custom_permission_denied'
# handler404 = 'core.views.custom_page_not_found'
... | from django.conf.urls import include, url
from django.contrib import admin
from lists.views import home_page
from core.views import custom_server_error
# error pages
# handler400 = 'core.views.custom_bad_request'
# handler403 = 'core.views.custom_permission_denied'
# handler404 = 'core.views.custom_page_not_found'
# ... | <commit_before>from django.conf.urls import include, url
from django.contrib import admin
from lists.views import home_page
from core.views import custom_server_error
# error pages
# handler400 = 'core.views.custom_bad_request'
# handler403 = 'core.views.custom_permission_denied'
# handler404 = 'core.views.custom_pag... |
30ffff16e5dd4eec6e5128a277a677834470be73 | scikits/learn/tests/test_cross_val.py | scikits/learn/tests/test_cross_val.py | """ Test the cross_val module
"""
import numpy as np
import nose
from .. import cross_val
def test_kfold():
# Check that errors are raise if there is not enough samples
nose.tools.assert_raises(AssertionError, cross_val.KFold, 3, 3)
y = [0, 0, 1, 1, 2]
nose.tools.assert_raises(AssertionError, cross_... | """ Test the cross_val module
"""
import numpy as np
import nose
from ..base import BaseEstimator
from .. import cross_val
class MockClassifier(BaseEstimator):
"""Dummy classifier to test the cross-validation
"""
def __init__(self, a=0):
self.a = a
def fit(self, X, Y, **params):
... | Add a smoke test for cross_val_score | TEST: Add a smoke test for cross_val_score
| Python | bsd-3-clause | mjgrav2001/scikit-learn,marcocaccin/scikit-learn,jmschrei/scikit-learn,ycaihua/scikit-learn,sarahgrogan/scikit-learn,xubenben/scikit-learn,appapantula/scikit-learn,mehdidc/scikit-learn,bikong2/scikit-learn,cainiaocome/scikit-learn,hsiaoyi0504/scikit-learn,Titan-C/scikit-learn,hsuantien/scikit-learn,kmike/scikit-learn,V... | """ Test the cross_val module
"""
import numpy as np
import nose
from .. import cross_val
def test_kfold():
# Check that errors are raise if there is not enough samples
nose.tools.assert_raises(AssertionError, cross_val.KFold, 3, 3)
y = [0, 0, 1, 1, 2]
nose.tools.assert_raises(AssertionError, cross_... | """ Test the cross_val module
"""
import numpy as np
import nose
from ..base import BaseEstimator
from .. import cross_val
class MockClassifier(BaseEstimator):
"""Dummy classifier to test the cross-validation
"""
def __init__(self, a=0):
self.a = a
def fit(self, X, Y, **params):
... | <commit_before>""" Test the cross_val module
"""
import numpy as np
import nose
from .. import cross_val
def test_kfold():
# Check that errors are raise if there is not enough samples
nose.tools.assert_raises(AssertionError, cross_val.KFold, 3, 3)
y = [0, 0, 1, 1, 2]
nose.tools.assert_raises(Asserti... | """ Test the cross_val module
"""
import numpy as np
import nose
from ..base import BaseEstimator
from .. import cross_val
class MockClassifier(BaseEstimator):
"""Dummy classifier to test the cross-validation
"""
def __init__(self, a=0):
self.a = a
def fit(self, X, Y, **params):
... | """ Test the cross_val module
"""
import numpy as np
import nose
from .. import cross_val
def test_kfold():
# Check that errors are raise if there is not enough samples
nose.tools.assert_raises(AssertionError, cross_val.KFold, 3, 3)
y = [0, 0, 1, 1, 2]
nose.tools.assert_raises(AssertionError, cross_... | <commit_before>""" Test the cross_val module
"""
import numpy as np
import nose
from .. import cross_val
def test_kfold():
# Check that errors are raise if there is not enough samples
nose.tools.assert_raises(AssertionError, cross_val.KFold, 3, 3)
y = [0, 0, 1, 1, 2]
nose.tools.assert_raises(Asserti... |
106833059bc2dad8a284de50e153bf673d2e3b4b | premis_event_service/urls.py | premis_event_service/urls.py | from django.conf.urls.defaults import *
urlpatterns = patterns(
'premis_event_service.views',
# begin CODA Family url structure >
(r'^APP/$', 'app'),
# node urls
# (r'^APP/node/$', 'node'),
# (r'^APP/node/(?P<identifier>.+?)/$', 'node'),
# event urls
(r'^APP/event/$', 'app_event'),
... | try:
from django.conf.urls import patterns, url
except ImportError:
from django.conf.urls.defaults import * # In case of Django<=1.3
urlpatterns = patterns(
'premis_event_service.views',
# begin CODA Family url structure >
(r'^APP/$', 'app'),
# node urls
# (r'^APP/node/$', 'node'),
# (... | Support new and old Django urlconf imports | Support new and old Django urlconf imports
| Python | bsd-3-clause | unt-libraries/django-premis-event-service,unt-libraries/django-premis-event-service,unt-libraries/django-premis-event-service | from django.conf.urls.defaults import *
urlpatterns = patterns(
'premis_event_service.views',
# begin CODA Family url structure >
(r'^APP/$', 'app'),
# node urls
# (r'^APP/node/$', 'node'),
# (r'^APP/node/(?P<identifier>.+?)/$', 'node'),
# event urls
(r'^APP/event/$', 'app_event'),
... | try:
from django.conf.urls import patterns, url
except ImportError:
from django.conf.urls.defaults import * # In case of Django<=1.3
urlpatterns = patterns(
'premis_event_service.views',
# begin CODA Family url structure >
(r'^APP/$', 'app'),
# node urls
# (r'^APP/node/$', 'node'),
# (... | <commit_before>from django.conf.urls.defaults import *
urlpatterns = patterns(
'premis_event_service.views',
# begin CODA Family url structure >
(r'^APP/$', 'app'),
# node urls
# (r'^APP/node/$', 'node'),
# (r'^APP/node/(?P<identifier>.+?)/$', 'node'),
# event urls
(r'^APP/event/$', 'ap... | try:
from django.conf.urls import patterns, url
except ImportError:
from django.conf.urls.defaults import * # In case of Django<=1.3
urlpatterns = patterns(
'premis_event_service.views',
# begin CODA Family url structure >
(r'^APP/$', 'app'),
# node urls
# (r'^APP/node/$', 'node'),
# (... | from django.conf.urls.defaults import *
urlpatterns = patterns(
'premis_event_service.views',
# begin CODA Family url structure >
(r'^APP/$', 'app'),
# node urls
# (r'^APP/node/$', 'node'),
# (r'^APP/node/(?P<identifier>.+?)/$', 'node'),
# event urls
(r'^APP/event/$', 'app_event'),
... | <commit_before>from django.conf.urls.defaults import *
urlpatterns = patterns(
'premis_event_service.views',
# begin CODA Family url structure >
(r'^APP/$', 'app'),
# node urls
# (r'^APP/node/$', 'node'),
# (r'^APP/node/(?P<identifier>.+?)/$', 'node'),
# event urls
(r'^APP/event/$', 'ap... |
d902045e991cc778dabe31e34a6dcd119e19ccd0 | attributes/license/main.py | attributes/license/main.py | from utilities import url_to_json
def run(project_id, repo_path, cursor, **options):
query = 'SELECT url FROM projects WHERE id = ' + str(project_id)
cursor.execute(query)
record = cursor.fetchone()
full_url = record[0].rstrip()
json_response = url_to_json(full_url, headers={
'Accept'... | from core import tokenize
from utilities import url_to_json
def run(project_id, repo_path, cursor, **options):
query = 'SELECT url FROM projects WHERE id = ' + str(project_id)
cursor.execute(query)
record = cursor.fetchone()
full_url = tokenize(record[0].rstrip())
json_response = url_to_json(full... | Update license attribute to return binary and raw result | Update license attribute to return binary and raw result
| Python | apache-2.0 | RepoReapers/reaper,RepoReapers/reaper,RepoReapers/reaper,RepoReapers/reaper | from utilities import url_to_json
def run(project_id, repo_path, cursor, **options):
query = 'SELECT url FROM projects WHERE id = ' + str(project_id)
cursor.execute(query)
record = cursor.fetchone()
full_url = record[0].rstrip()
json_response = url_to_json(full_url, headers={
'Accept'... | from core import tokenize
from utilities import url_to_json
def run(project_id, repo_path, cursor, **options):
query = 'SELECT url FROM projects WHERE id = ' + str(project_id)
cursor.execute(query)
record = cursor.fetchone()
full_url = tokenize(record[0].rstrip())
json_response = url_to_json(full... | <commit_before>from utilities import url_to_json
def run(project_id, repo_path, cursor, **options):
query = 'SELECT url FROM projects WHERE id = ' + str(project_id)
cursor.execute(query)
record = cursor.fetchone()
full_url = record[0].rstrip()
json_response = url_to_json(full_url, headers={
... | from core import tokenize
from utilities import url_to_json
def run(project_id, repo_path, cursor, **options):
query = 'SELECT url FROM projects WHERE id = ' + str(project_id)
cursor.execute(query)
record = cursor.fetchone()
full_url = tokenize(record[0].rstrip())
json_response = url_to_json(full... | from utilities import url_to_json
def run(project_id, repo_path, cursor, **options):
query = 'SELECT url FROM projects WHERE id = ' + str(project_id)
cursor.execute(query)
record = cursor.fetchone()
full_url = record[0].rstrip()
json_response = url_to_json(full_url, headers={
'Accept'... | <commit_before>from utilities import url_to_json
def run(project_id, repo_path, cursor, **options):
query = 'SELECT url FROM projects WHERE id = ' + str(project_id)
cursor.execute(query)
record = cursor.fetchone()
full_url = record[0].rstrip()
json_response = url_to_json(full_url, headers={
... |
61cce2cd23c798a8604274335d9637e8ebce1385 | api/v2/views/image.py | api/v2/views/image.py | from core.models import Application as Image
from api import permissions
from api.v2.serializers.details import ImageSerializer
from api.v2.views.base import AuthOptionalViewSet
from api.v2.views.mixins import MultipleFieldLookup
class ImageViewSet(MultipleFieldLookup, AuthOptionalViewSet):
"""
API endpoint... | from core.models import Application as Image
from api import permissions
from api.v2.serializers.details import ImageSerializer
from api.v2.views.base import AuthOptionalViewSet
from api.v2.views.mixins import MultipleFieldLookup
class ImageViewSet(MultipleFieldLookup, AuthOptionalViewSet):
"""
API endpoint... | Add 'Machine Identifier' for easy support lookups in Troposphere | Add 'Machine Identifier' for easy support lookups in Troposphere
| Python | apache-2.0 | CCI-MOC/GUI-Backend,CCI-MOC/GUI-Backend,CCI-MOC/GUI-Backend,CCI-MOC/GUI-Backend | from core.models import Application as Image
from api import permissions
from api.v2.serializers.details import ImageSerializer
from api.v2.views.base import AuthOptionalViewSet
from api.v2.views.mixins import MultipleFieldLookup
class ImageViewSet(MultipleFieldLookup, AuthOptionalViewSet):
"""
API endpoint... | from core.models import Application as Image
from api import permissions
from api.v2.serializers.details import ImageSerializer
from api.v2.views.base import AuthOptionalViewSet
from api.v2.views.mixins import MultipleFieldLookup
class ImageViewSet(MultipleFieldLookup, AuthOptionalViewSet):
"""
API endpoint... | <commit_before>from core.models import Application as Image
from api import permissions
from api.v2.serializers.details import ImageSerializer
from api.v2.views.base import AuthOptionalViewSet
from api.v2.views.mixins import MultipleFieldLookup
class ImageViewSet(MultipleFieldLookup, AuthOptionalViewSet):
"""
... | from core.models import Application as Image
from api import permissions
from api.v2.serializers.details import ImageSerializer
from api.v2.views.base import AuthOptionalViewSet
from api.v2.views.mixins import MultipleFieldLookup
class ImageViewSet(MultipleFieldLookup, AuthOptionalViewSet):
"""
API endpoint... | from core.models import Application as Image
from api import permissions
from api.v2.serializers.details import ImageSerializer
from api.v2.views.base import AuthOptionalViewSet
from api.v2.views.mixins import MultipleFieldLookup
class ImageViewSet(MultipleFieldLookup, AuthOptionalViewSet):
"""
API endpoint... | <commit_before>from core.models import Application as Image
from api import permissions
from api.v2.serializers.details import ImageSerializer
from api.v2.views.base import AuthOptionalViewSet
from api.v2.views.mixins import MultipleFieldLookup
class ImageViewSet(MultipleFieldLookup, AuthOptionalViewSet):
"""
... |
358f244b397f11cdf9f89304356ac45b4c6621b5 | __init__.py | __init__.py | #! /usr/bin/env python
# coding=utf-8
import os.path
import subprocess
class SubTask():
def __init__(self, output_dir, log):
self.__output_dir = output_dir
self.__log = log
self.__wd = os.path.dirname(os.path.realpath(__file__))
self.__init_done = False
print "__init__"
... | #! /usr/bin/env python
# coding=utf-8
import os.path
import subprocess
class SubTask():
def __init__(self, output_dir, log):
self.__output_dir = output_dir
self.__log = log
self.__wd = os.path.dirname(os.path.realpath(__file__))
self.__init_done = False
print "__init__"
... | Add return value: tcc path. | Add return value: tcc path.
| Python | apache-2.0 | lugovskoy/dts-sample-compile | #! /usr/bin/env python
# coding=utf-8
import os.path
import subprocess
class SubTask():
def __init__(self, output_dir, log):
self.__output_dir = output_dir
self.__log = log
self.__wd = os.path.dirname(os.path.realpath(__file__))
self.__init_done = False
print "__init__"
... | #! /usr/bin/env python
# coding=utf-8
import os.path
import subprocess
class SubTask():
def __init__(self, output_dir, log):
self.__output_dir = output_dir
self.__log = log
self.__wd = os.path.dirname(os.path.realpath(__file__))
self.__init_done = False
print "__init__"
... | <commit_before>#! /usr/bin/env python
# coding=utf-8
import os.path
import subprocess
class SubTask():
def __init__(self, output_dir, log):
self.__output_dir = output_dir
self.__log = log
self.__wd = os.path.dirname(os.path.realpath(__file__))
self.__init_done = False
prin... | #! /usr/bin/env python
# coding=utf-8
import os.path
import subprocess
class SubTask():
def __init__(self, output_dir, log):
self.__output_dir = output_dir
self.__log = log
self.__wd = os.path.dirname(os.path.realpath(__file__))
self.__init_done = False
print "__init__"
... | #! /usr/bin/env python
# coding=utf-8
import os.path
import subprocess
class SubTask():
def __init__(self, output_dir, log):
self.__output_dir = output_dir
self.__log = log
self.__wd = os.path.dirname(os.path.realpath(__file__))
self.__init_done = False
print "__init__"
... | <commit_before>#! /usr/bin/env python
# coding=utf-8
import os.path
import subprocess
class SubTask():
def __init__(self, output_dir, log):
self.__output_dir = output_dir
self.__log = log
self.__wd = os.path.dirname(os.path.realpath(__file__))
self.__init_done = False
prin... |
61ca14440f39106b6109b96919b520e40170b1f3 | examples/tour_examples/xkcd_tour.py | examples/tour_examples/xkcd_tour.py | from seleniumbase import BaseCase
class MyTestClass(BaseCase):
def test_basic(self):
self.open('https://xkcd.com/1117/')
self.assert_element('img[alt="My Sky"]')
self.create_shepherd_tour()
self.add_tour_step("Welcome to XKCD!")
self.add_tour_step("This is the XKCD logo.",... | from seleniumbase import BaseCase
class MyTestClass(BaseCase):
def test_basic(self):
self.open('https://xkcd.com/1117/')
self.assert_element('img[alt="My Sky"]')
self.create_shepherd_tour()
self.add_tour_step("Welcome to XKCD!")
self.add_tour_step("This is the XKCD logo.",... | Update a SeleniumBase tour example | Update a SeleniumBase tour example
| Python | mit | mdmintz/SeleniumBase,seleniumbase/SeleniumBase,mdmintz/SeleniumBase,mdmintz/SeleniumBase,seleniumbase/SeleniumBase,seleniumbase/SeleniumBase,seleniumbase/SeleniumBase,mdmintz/SeleniumBase | from seleniumbase import BaseCase
class MyTestClass(BaseCase):
def test_basic(self):
self.open('https://xkcd.com/1117/')
self.assert_element('img[alt="My Sky"]')
self.create_shepherd_tour()
self.add_tour_step("Welcome to XKCD!")
self.add_tour_step("This is the XKCD logo.",... | from seleniumbase import BaseCase
class MyTestClass(BaseCase):
def test_basic(self):
self.open('https://xkcd.com/1117/')
self.assert_element('img[alt="My Sky"]')
self.create_shepherd_tour()
self.add_tour_step("Welcome to XKCD!")
self.add_tour_step("This is the XKCD logo.",... | <commit_before>from seleniumbase import BaseCase
class MyTestClass(BaseCase):
def test_basic(self):
self.open('https://xkcd.com/1117/')
self.assert_element('img[alt="My Sky"]')
self.create_shepherd_tour()
self.add_tour_step("Welcome to XKCD!")
self.add_tour_step("This is t... | from seleniumbase import BaseCase
class MyTestClass(BaseCase):
def test_basic(self):
self.open('https://xkcd.com/1117/')
self.assert_element('img[alt="My Sky"]')
self.create_shepherd_tour()
self.add_tour_step("Welcome to XKCD!")
self.add_tour_step("This is the XKCD logo.",... | from seleniumbase import BaseCase
class MyTestClass(BaseCase):
def test_basic(self):
self.open('https://xkcd.com/1117/')
self.assert_element('img[alt="My Sky"]')
self.create_shepherd_tour()
self.add_tour_step("Welcome to XKCD!")
self.add_tour_step("This is the XKCD logo.",... | <commit_before>from seleniumbase import BaseCase
class MyTestClass(BaseCase):
def test_basic(self):
self.open('https://xkcd.com/1117/')
self.assert_element('img[alt="My Sky"]')
self.create_shepherd_tour()
self.add_tour_step("Welcome to XKCD!")
self.add_tour_step("This is t... |
671cd368c9730e7c15005df4e476e86d80bf0b8e | array/rotate-image.py | array/rotate-image.py | # You are given an n x n 2D matrix that represents an image. Rotate the image by 90 degrees clockwise
# solve with O(1) additional memory
def rotate_image(a):
n = len(a)
if a is None or n < 1:
return a
else:
for i in range(n/2):
for j in range(i, n-i-1):
temp = a[i][j]
a[i][j] = a[n-1-j][i]
a[n-... | # You are given an n x n 2D matrix that represents an image. Rotate the image by 90 degrees clockwise
# solve with O(1) additional memory
def rotate_image(a):
n = len(a)
if a is None or n < 1:
return a
else:
for i in range(n/2): # loop through all squares one by one
for j in range(i, n-i-1): # loop through ... | Add test cases and comments | Add test cases and comments
| Python | mit | derekmpham/interview-prep,derekmpham/interview-prep | # You are given an n x n 2D matrix that represents an image. Rotate the image by 90 degrees clockwise
# solve with O(1) additional memory
def rotate_image(a):
n = len(a)
if a is None or n < 1:
return a
else:
for i in range(n/2):
for j in range(i, n-i-1):
temp = a[i][j]
a[i][j] = a[n-1-j][i]
a[n-... | # You are given an n x n 2D matrix that represents an image. Rotate the image by 90 degrees clockwise
# solve with O(1) additional memory
def rotate_image(a):
n = len(a)
if a is None or n < 1:
return a
else:
for i in range(n/2): # loop through all squares one by one
for j in range(i, n-i-1): # loop through ... | <commit_before># You are given an n x n 2D matrix that represents an image. Rotate the image by 90 degrees clockwise
# solve with O(1) additional memory
def rotate_image(a):
n = len(a)
if a is None or n < 1:
return a
else:
for i in range(n/2):
for j in range(i, n-i-1):
temp = a[i][j]
a[i][j] = a[n-1... | # You are given an n x n 2D matrix that represents an image. Rotate the image by 90 degrees clockwise
# solve with O(1) additional memory
def rotate_image(a):
n = len(a)
if a is None or n < 1:
return a
else:
for i in range(n/2): # loop through all squares one by one
for j in range(i, n-i-1): # loop through ... | # You are given an n x n 2D matrix that represents an image. Rotate the image by 90 degrees clockwise
# solve with O(1) additional memory
def rotate_image(a):
n = len(a)
if a is None or n < 1:
return a
else:
for i in range(n/2):
for j in range(i, n-i-1):
temp = a[i][j]
a[i][j] = a[n-1-j][i]
a[n-... | <commit_before># You are given an n x n 2D matrix that represents an image. Rotate the image by 90 degrees clockwise
# solve with O(1) additional memory
def rotate_image(a):
n = len(a)
if a is None or n < 1:
return a
else:
for i in range(n/2):
for j in range(i, n-i-1):
temp = a[i][j]
a[i][j] = a[n-1... |
d68f391d15927db65ea4e62d67bd9faf37b5deaf | file_process/utils/get_reference.py | file_process/utils/get_reference.py | from __future__ import absolute_import
from .twobit import TwoBitFile
def get_reference_allele(chrom, start, hg19_path):
twobit_file = TwoBitFile(hg19_path)
end = start + 1
refallele = twobit_file[chrom][start:end]
return refallele
| from __future__ import absolute_import
from .twobit import TwoBitFile
def get_reference_allele(chrom, start, hg19_path):
twobit_file = TwoBitFile(hg19_path)
end = start + 1
try:
refallele = twobit_file[chrom][start:end]
except TypeError:
refallele = 'N'
return refallele
| Return N for ref allele in pos uncovered by ref | Return N for ref allele in pos uncovered by ref
This arose during processing of a CGI var file originating from LFR
data (not sure, but LFR is an advanced technique, so it's possible CGI
is calling some positions that aren't called in reference).
| Python | mit | PersonalGenomesOrg/archive-genevieve-201505,PersonalGenomesOrg/archive-genevieve-201505,PersonalGenomesOrg/archive-genevieve-201505 | from __future__ import absolute_import
from .twobit import TwoBitFile
def get_reference_allele(chrom, start, hg19_path):
twobit_file = TwoBitFile(hg19_path)
end = start + 1
refallele = twobit_file[chrom][start:end]
return refallele
Return N for ref allele in pos uncovered by ref
This arose during pro... | from __future__ import absolute_import
from .twobit import TwoBitFile
def get_reference_allele(chrom, start, hg19_path):
twobit_file = TwoBitFile(hg19_path)
end = start + 1
try:
refallele = twobit_file[chrom][start:end]
except TypeError:
refallele = 'N'
return refallele
| <commit_before>from __future__ import absolute_import
from .twobit import TwoBitFile
def get_reference_allele(chrom, start, hg19_path):
twobit_file = TwoBitFile(hg19_path)
end = start + 1
refallele = twobit_file[chrom][start:end]
return refallele
<commit_msg>Return N for ref allele in pos uncovered by... | from __future__ import absolute_import
from .twobit import TwoBitFile
def get_reference_allele(chrom, start, hg19_path):
twobit_file = TwoBitFile(hg19_path)
end = start + 1
try:
refallele = twobit_file[chrom][start:end]
except TypeError:
refallele = 'N'
return refallele
| from __future__ import absolute_import
from .twobit import TwoBitFile
def get_reference_allele(chrom, start, hg19_path):
twobit_file = TwoBitFile(hg19_path)
end = start + 1
refallele = twobit_file[chrom][start:end]
return refallele
Return N for ref allele in pos uncovered by ref
This arose during pro... | <commit_before>from __future__ import absolute_import
from .twobit import TwoBitFile
def get_reference_allele(chrom, start, hg19_path):
twobit_file = TwoBitFile(hg19_path)
end = start + 1
refallele = twobit_file[chrom][start:end]
return refallele
<commit_msg>Return N for ref allele in pos uncovered by... |
461522c3b79202c915544466272d3bb2a3d0ecbe | api/radar_api/serializers/meta.py | api/radar_api/serializers/meta.py | from radar.models.users import User
from radar.serializers.fields import StringField, IntegerField
from radar.serializers.models import ModelSerializer
class TinyUserSerializer(ModelSerializer):
id = IntegerField()
username = StringField()
email = StringField()
first_name = StringField()
last_name... | from radar.models.users import User
from radar.serializers.fields import StringField, IntegerField, DateTimeField
from radar.serializers.models import ModelSerializer
class TinyUserSerializer(ModelSerializer):
id = IntegerField()
username = StringField()
email = StringField()
first_name = StringField(... | Add created and modified date mixins | Add created and modified date mixins
| Python | agpl-3.0 | renalreg/radar,renalreg/radar,renalreg/radar,renalreg/radar | from radar.models.users import User
from radar.serializers.fields import StringField, IntegerField
from radar.serializers.models import ModelSerializer
class TinyUserSerializer(ModelSerializer):
id = IntegerField()
username = StringField()
email = StringField()
first_name = StringField()
last_name... | from radar.models.users import User
from radar.serializers.fields import StringField, IntegerField, DateTimeField
from radar.serializers.models import ModelSerializer
class TinyUserSerializer(ModelSerializer):
id = IntegerField()
username = StringField()
email = StringField()
first_name = StringField(... | <commit_before>from radar.models.users import User
from radar.serializers.fields import StringField, IntegerField
from radar.serializers.models import ModelSerializer
class TinyUserSerializer(ModelSerializer):
id = IntegerField()
username = StringField()
email = StringField()
first_name = StringField(... | from radar.models.users import User
from radar.serializers.fields import StringField, IntegerField, DateTimeField
from radar.serializers.models import ModelSerializer
class TinyUserSerializer(ModelSerializer):
id = IntegerField()
username = StringField()
email = StringField()
first_name = StringField(... | from radar.models.users import User
from radar.serializers.fields import StringField, IntegerField
from radar.serializers.models import ModelSerializer
class TinyUserSerializer(ModelSerializer):
id = IntegerField()
username = StringField()
email = StringField()
first_name = StringField()
last_name... | <commit_before>from radar.models.users import User
from radar.serializers.fields import StringField, IntegerField
from radar.serializers.models import ModelSerializer
class TinyUserSerializer(ModelSerializer):
id = IntegerField()
username = StringField()
email = StringField()
first_name = StringField(... |
71d6176b1468a5bf9aef1ced5214c32b69efaf50 | apps/countdown/views.py | apps/countdown/views.py | from django.shortcuts import render_to_response
from django.template import RequestContext
from django.http import HttpResponse
from django.utils.http import urlencode
import json
import urllib2
def index(request, year, month, day, hour, text):
params = {
'year': year,
'month': int(month) - 1, #JS takes month... | from django.shortcuts import render_to_response
from django.template import RequestContext
from django.http import HttpResponse
from django.utils.http import urlencode
import json
import urllib2
def index(request, year, month, day, hour, text):
params = {
'year': year,
'month': int(month) - 1, #JS takes month... | Fix bug in countdonw hours calculation | Fix bug in countdonw hours calculation
| Python | bsd-3-clause | Teknologforeningen/tf-info,Teknologforeningen/tf-info,Teknologforeningen/tf-info | from django.shortcuts import render_to_response
from django.template import RequestContext
from django.http import HttpResponse
from django.utils.http import urlencode
import json
import urllib2
def index(request, year, month, day, hour, text):
params = {
'year': year,
'month': int(month) - 1, #JS takes month... | from django.shortcuts import render_to_response
from django.template import RequestContext
from django.http import HttpResponse
from django.utils.http import urlencode
import json
import urllib2
def index(request, year, month, day, hour, text):
params = {
'year': year,
'month': int(month) - 1, #JS takes month... | <commit_before>from django.shortcuts import render_to_response
from django.template import RequestContext
from django.http import HttpResponse
from django.utils.http import urlencode
import json
import urllib2
def index(request, year, month, day, hour, text):
params = {
'year': year,
'month': int(month) - 1, ... | from django.shortcuts import render_to_response
from django.template import RequestContext
from django.http import HttpResponse
from django.utils.http import urlencode
import json
import urllib2
def index(request, year, month, day, hour, text):
params = {
'year': year,
'month': int(month) - 1, #JS takes month... | from django.shortcuts import render_to_response
from django.template import RequestContext
from django.http import HttpResponse
from django.utils.http import urlencode
import json
import urllib2
def index(request, year, month, day, hour, text):
params = {
'year': year,
'month': int(month) - 1, #JS takes month... | <commit_before>from django.shortcuts import render_to_response
from django.template import RequestContext
from django.http import HttpResponse
from django.utils.http import urlencode
import json
import urllib2
def index(request, year, month, day, hour, text):
params = {
'year': year,
'month': int(month) - 1, ... |
bde0363b51bfa7bb6facac1185c9a687ff952e36 | artifacts/exceptions.py | artifacts/exceptions.py | # -*- coding: utf-8 -*-
#
# Artifacts - Artifactory Search Client
#
# Copyright 2015 Smarter Travel
#
# Available under the MIT license. See LICENSE for details.
#
"""
artifacts.exceptions
~~~~~~~~~~~~~~~~~~~~
Exceptions raised by the Artifacts library.
"""
from __future__ import print_function, division
class Art... | # -*- coding: utf-8 -*-
#
# Artifacts - Artifactory Search Client
#
# Copyright 2015 Smarter Travel
#
# Available under the MIT license. See LICENSE for details.
#
"""
artifacts.exceptions
~~~~~~~~~~~~~~~~~~~~
Exceptions raised by the Artifacts library.
"""
from __future__ import print_function, division
__all__ = ... | Add __all__ variable to enforce ordering in docs | Add __all__ variable to enforce ordering in docs
| Python | mit | smarter-travel-media/stac | # -*- coding: utf-8 -*-
#
# Artifacts - Artifactory Search Client
#
# Copyright 2015 Smarter Travel
#
# Available under the MIT license. See LICENSE for details.
#
"""
artifacts.exceptions
~~~~~~~~~~~~~~~~~~~~
Exceptions raised by the Artifacts library.
"""
from __future__ import print_function, division
class Art... | # -*- coding: utf-8 -*-
#
# Artifacts - Artifactory Search Client
#
# Copyright 2015 Smarter Travel
#
# Available under the MIT license. See LICENSE for details.
#
"""
artifacts.exceptions
~~~~~~~~~~~~~~~~~~~~
Exceptions raised by the Artifacts library.
"""
from __future__ import print_function, division
__all__ = ... | <commit_before># -*- coding: utf-8 -*-
#
# Artifacts - Artifactory Search Client
#
# Copyright 2015 Smarter Travel
#
# Available under the MIT license. See LICENSE for details.
#
"""
artifacts.exceptions
~~~~~~~~~~~~~~~~~~~~
Exceptions raised by the Artifacts library.
"""
from __future__ import print_function, divis... | # -*- coding: utf-8 -*-
#
# Artifacts - Artifactory Search Client
#
# Copyright 2015 Smarter Travel
#
# Available under the MIT license. See LICENSE for details.
#
"""
artifacts.exceptions
~~~~~~~~~~~~~~~~~~~~
Exceptions raised by the Artifacts library.
"""
from __future__ import print_function, division
__all__ = ... | # -*- coding: utf-8 -*-
#
# Artifacts - Artifactory Search Client
#
# Copyright 2015 Smarter Travel
#
# Available under the MIT license. See LICENSE for details.
#
"""
artifacts.exceptions
~~~~~~~~~~~~~~~~~~~~
Exceptions raised by the Artifacts library.
"""
from __future__ import print_function, division
class Art... | <commit_before># -*- coding: utf-8 -*-
#
# Artifacts - Artifactory Search Client
#
# Copyright 2015 Smarter Travel
#
# Available under the MIT license. See LICENSE for details.
#
"""
artifacts.exceptions
~~~~~~~~~~~~~~~~~~~~
Exceptions raised by the Artifacts library.
"""
from __future__ import print_function, divis... |
784fb8591cd1a66de1adac9626d8c4fb02d8e01e | examples/customization/pwd-cd-and-system/utils.py | examples/customization/pwd-cd-and-system/utils.py | """Utility for changing directories and execution of commands in a subshell."""
import os, shlex, subprocess
def chdir(debugger, args, result, dict):
"""Change the working directory, or cd to ${HOME}."""
dir = args.strip()
if dir:
os.chdir(args)
else:
os.chdir(os.path.expanduser('~'))
... | """Utility for changing directories and execution of commands in a subshell."""
import os, shlex, subprocess
# Store the previous working directory for the 'cd -' command.
class Holder:
"""Holds the _prev_dir_ class attribute for chdir() function."""
_prev_dir_ = None
@classmethod
def prev_dir(cls):
... | Add 'cd -' feature to change to the previous working directory. | Add 'cd -' feature to change to the previous working directory.
git-svn-id: b33bab8abb5b18c12ee100cd7761ab452d00b2b0@141846 91177308-0d34-0410-b5e6-96231b3b80d8
| Python | apache-2.0 | apple/swift-lldb,apple/swift-lldb,apple/swift-lldb,apple/swift-lldb,apple/swift-lldb,llvm-mirror/lldb,apple/swift-lldb,llvm-mirror/lldb,llvm-mirror/lldb,llvm-mirror/lldb,llvm-mirror/lldb | """Utility for changing directories and execution of commands in a subshell."""
import os, shlex, subprocess
def chdir(debugger, args, result, dict):
"""Change the working directory, or cd to ${HOME}."""
dir = args.strip()
if dir:
os.chdir(args)
else:
os.chdir(os.path.expanduser('~'))
... | """Utility for changing directories and execution of commands in a subshell."""
import os, shlex, subprocess
# Store the previous working directory for the 'cd -' command.
class Holder:
"""Holds the _prev_dir_ class attribute for chdir() function."""
_prev_dir_ = None
@classmethod
def prev_dir(cls):
... | <commit_before>"""Utility for changing directories and execution of commands in a subshell."""
import os, shlex, subprocess
def chdir(debugger, args, result, dict):
"""Change the working directory, or cd to ${HOME}."""
dir = args.strip()
if dir:
os.chdir(args)
else:
os.chdir(os.path.ex... | """Utility for changing directories and execution of commands in a subshell."""
import os, shlex, subprocess
# Store the previous working directory for the 'cd -' command.
class Holder:
"""Holds the _prev_dir_ class attribute for chdir() function."""
_prev_dir_ = None
@classmethod
def prev_dir(cls):
... | """Utility for changing directories and execution of commands in a subshell."""
import os, shlex, subprocess
def chdir(debugger, args, result, dict):
"""Change the working directory, or cd to ${HOME}."""
dir = args.strip()
if dir:
os.chdir(args)
else:
os.chdir(os.path.expanduser('~'))
... | <commit_before>"""Utility for changing directories and execution of commands in a subshell."""
import os, shlex, subprocess
def chdir(debugger, args, result, dict):
"""Change the working directory, or cd to ${HOME}."""
dir = args.strip()
if dir:
os.chdir(args)
else:
os.chdir(os.path.ex... |
c1ed5eb96b04ca0af2ad8f26023d8cbaa4a75eda | rx/concurrency/threadpoolscheduler.py | rx/concurrency/threadpoolscheduler.py | import logging
from concurrent.futures import ThreadPoolExecutor
from rx.core import Scheduler, Disposable
from rx.disposables import SingleAssignmentDisposable, CompositeDisposable
from .timeoutscheduler import TimeoutScheduler
log = logging.getLogger("Rx")
class ThreadPoolScheduler(TimeoutScheduler):
"""A sc... | from concurrent.futures import ThreadPoolExecutor
from rx.core import Scheduler
from .newthreadscheduler import NewThreadScheduler
class ThreadPoolScheduler(NewThreadScheduler):
"""A scheduler that schedules work via the thread pool."""
class ThreadPoolThread:
"""Wraps a concurrent future as a thre... | Make thread pool scheduler behave as a pooled new thread scheduler | Make thread pool scheduler behave as a pooled new thread scheduler
| Python | mit | ReactiveX/RxPY,ReactiveX/RxPY | import logging
from concurrent.futures import ThreadPoolExecutor
from rx.core import Scheduler, Disposable
from rx.disposables import SingleAssignmentDisposable, CompositeDisposable
from .timeoutscheduler import TimeoutScheduler
log = logging.getLogger("Rx")
class ThreadPoolScheduler(TimeoutScheduler):
"""A sc... | from concurrent.futures import ThreadPoolExecutor
from rx.core import Scheduler
from .newthreadscheduler import NewThreadScheduler
class ThreadPoolScheduler(NewThreadScheduler):
"""A scheduler that schedules work via the thread pool."""
class ThreadPoolThread:
"""Wraps a concurrent future as a thre... | <commit_before>import logging
from concurrent.futures import ThreadPoolExecutor
from rx.core import Scheduler, Disposable
from rx.disposables import SingleAssignmentDisposable, CompositeDisposable
from .timeoutscheduler import TimeoutScheduler
log = logging.getLogger("Rx")
class ThreadPoolScheduler(TimeoutSchedule... | from concurrent.futures import ThreadPoolExecutor
from rx.core import Scheduler
from .newthreadscheduler import NewThreadScheduler
class ThreadPoolScheduler(NewThreadScheduler):
"""A scheduler that schedules work via the thread pool."""
class ThreadPoolThread:
"""Wraps a concurrent future as a thre... | import logging
from concurrent.futures import ThreadPoolExecutor
from rx.core import Scheduler, Disposable
from rx.disposables import SingleAssignmentDisposable, CompositeDisposable
from .timeoutscheduler import TimeoutScheduler
log = logging.getLogger("Rx")
class ThreadPoolScheduler(TimeoutScheduler):
"""A sc... | <commit_before>import logging
from concurrent.futures import ThreadPoolExecutor
from rx.core import Scheduler, Disposable
from rx.disposables import SingleAssignmentDisposable, CompositeDisposable
from .timeoutscheduler import TimeoutScheduler
log = logging.getLogger("Rx")
class ThreadPoolScheduler(TimeoutSchedule... |
71b73151c358d2c3d6ceae80d6a2287143085065 | arxiv_vanity/scraper/arxiv_ids.py | arxiv_vanity/scraper/arxiv_ids.py | import re
ARXIV_ID_PATTERN = r"([a-z\-]+(?:\.[A-Z]{2})?/\d{7}|\d+\.\d+)(v\d+)?"
ARXIV_ID_RE = re.compile(ARXIV_ID_PATTERN)
ARXIV_URL_RE = re.compile(fr"arxiv.org/[^\/]+/({ARXIV_ID_PATTERN})(\.pdf)?", re.I)
ARXIV_DOI_RE = re.compile(fr"^(?:arxiv:)?({ARXIV_ID_PATTERN})$", re.I)
ARXIV_VANITY_RE = re.compile(
fr"(?:lo... | import re
ARXIV_ID_PATTERN = r"([a-z\-]+(?:\.[A-Z]{2})?/\d{7}|\d+\.\d+)(v\d+)?"
ARXIV_ID_RE = re.compile(ARXIV_ID_PATTERN, re.I)
ARXIV_URL_RE = re.compile(fr"arxiv.org/[^\/]+/({ARXIV_ID_PATTERN})(\.pdf)?", re.I)
ARXIV_DOI_RE = re.compile(fr"^(?:arxiv:)?({ARXIV_ID_PATTERN})$", re.I)
ARXIV_VANITY_RE = re.compile(
fr... | Handle capital "V" in URL | Handle capital "V" in URL
| Python | apache-2.0 | arxiv-vanity/arxiv-vanity,arxiv-vanity/arxiv-vanity,arxiv-vanity/arxiv-vanity,arxiv-vanity/arxiv-vanity | import re
ARXIV_ID_PATTERN = r"([a-z\-]+(?:\.[A-Z]{2})?/\d{7}|\d+\.\d+)(v\d+)?"
ARXIV_ID_RE = re.compile(ARXIV_ID_PATTERN)
ARXIV_URL_RE = re.compile(fr"arxiv.org/[^\/]+/({ARXIV_ID_PATTERN})(\.pdf)?", re.I)
ARXIV_DOI_RE = re.compile(fr"^(?:arxiv:)?({ARXIV_ID_PATTERN})$", re.I)
ARXIV_VANITY_RE = re.compile(
fr"(?:lo... | import re
ARXIV_ID_PATTERN = r"([a-z\-]+(?:\.[A-Z]{2})?/\d{7}|\d+\.\d+)(v\d+)?"
ARXIV_ID_RE = re.compile(ARXIV_ID_PATTERN, re.I)
ARXIV_URL_RE = re.compile(fr"arxiv.org/[^\/]+/({ARXIV_ID_PATTERN})(\.pdf)?", re.I)
ARXIV_DOI_RE = re.compile(fr"^(?:arxiv:)?({ARXIV_ID_PATTERN})$", re.I)
ARXIV_VANITY_RE = re.compile(
fr... | <commit_before>import re
ARXIV_ID_PATTERN = r"([a-z\-]+(?:\.[A-Z]{2})?/\d{7}|\d+\.\d+)(v\d+)?"
ARXIV_ID_RE = re.compile(ARXIV_ID_PATTERN)
ARXIV_URL_RE = re.compile(fr"arxiv.org/[^\/]+/({ARXIV_ID_PATTERN})(\.pdf)?", re.I)
ARXIV_DOI_RE = re.compile(fr"^(?:arxiv:)?({ARXIV_ID_PATTERN})$", re.I)
ARXIV_VANITY_RE = re.compil... | import re
ARXIV_ID_PATTERN = r"([a-z\-]+(?:\.[A-Z]{2})?/\d{7}|\d+\.\d+)(v\d+)?"
ARXIV_ID_RE = re.compile(ARXIV_ID_PATTERN, re.I)
ARXIV_URL_RE = re.compile(fr"arxiv.org/[^\/]+/({ARXIV_ID_PATTERN})(\.pdf)?", re.I)
ARXIV_DOI_RE = re.compile(fr"^(?:arxiv:)?({ARXIV_ID_PATTERN})$", re.I)
ARXIV_VANITY_RE = re.compile(
fr... | import re
ARXIV_ID_PATTERN = r"([a-z\-]+(?:\.[A-Z]{2})?/\d{7}|\d+\.\d+)(v\d+)?"
ARXIV_ID_RE = re.compile(ARXIV_ID_PATTERN)
ARXIV_URL_RE = re.compile(fr"arxiv.org/[^\/]+/({ARXIV_ID_PATTERN})(\.pdf)?", re.I)
ARXIV_DOI_RE = re.compile(fr"^(?:arxiv:)?({ARXIV_ID_PATTERN})$", re.I)
ARXIV_VANITY_RE = re.compile(
fr"(?:lo... | <commit_before>import re
ARXIV_ID_PATTERN = r"([a-z\-]+(?:\.[A-Z]{2})?/\d{7}|\d+\.\d+)(v\d+)?"
ARXIV_ID_RE = re.compile(ARXIV_ID_PATTERN)
ARXIV_URL_RE = re.compile(fr"arxiv.org/[^\/]+/({ARXIV_ID_PATTERN})(\.pdf)?", re.I)
ARXIV_DOI_RE = re.compile(fr"^(?:arxiv:)?({ARXIV_ID_PATTERN})$", re.I)
ARXIV_VANITY_RE = re.compil... |
358fcbf44903d817f115d4df1074a89a9f151c9c | pythonforandroid/recipes/pymunk/__init__.py | pythonforandroid/recipes/pymunk/__init__.py | from os.path import join
from pythonforandroid.recipe import CompiledComponentsPythonRecipe
class PymunkRecipe(CompiledComponentsPythonRecipe):
name = "pymunk"
version = '5.5.0'
url = 'https://pypi.python.org/packages/source/p/pymunk/pymunk-{version}.zip'
depends = ['cffi', 'setuptools']
call_host... | from pythonforandroid.recipe import CompiledComponentsPythonRecipe
class PymunkRecipe(CompiledComponentsPythonRecipe):
name = "pymunk"
version = "6.0.0"
url = "https://pypi.python.org/packages/source/p/pymunk/pymunk-{version}.zip"
depends = ["cffi", "setuptools"]
call_hostpython_via_targetpython =... | Update Pymunk recipe to 6.0.0 | Update Pymunk recipe to 6.0.0
| Python | mit | PKRoma/python-for-android,kronenpj/python-for-android,kronenpj/python-for-android,PKRoma/python-for-android,PKRoma/python-for-android,kronenpj/python-for-android,kivy/python-for-android,kronenpj/python-for-android,kivy/python-for-android,kronenpj/python-for-android,kivy/python-for-android,kivy/python-for-android,kivy/p... | from os.path import join
from pythonforandroid.recipe import CompiledComponentsPythonRecipe
class PymunkRecipe(CompiledComponentsPythonRecipe):
name = "pymunk"
version = '5.5.0'
url = 'https://pypi.python.org/packages/source/p/pymunk/pymunk-{version}.zip'
depends = ['cffi', 'setuptools']
call_host... | from pythonforandroid.recipe import CompiledComponentsPythonRecipe
class PymunkRecipe(CompiledComponentsPythonRecipe):
name = "pymunk"
version = "6.0.0"
url = "https://pypi.python.org/packages/source/p/pymunk/pymunk-{version}.zip"
depends = ["cffi", "setuptools"]
call_hostpython_via_targetpython =... | <commit_before>from os.path import join
from pythonforandroid.recipe import CompiledComponentsPythonRecipe
class PymunkRecipe(CompiledComponentsPythonRecipe):
name = "pymunk"
version = '5.5.0'
url = 'https://pypi.python.org/packages/source/p/pymunk/pymunk-{version}.zip'
depends = ['cffi', 'setuptools'... | from pythonforandroid.recipe import CompiledComponentsPythonRecipe
class PymunkRecipe(CompiledComponentsPythonRecipe):
name = "pymunk"
version = "6.0.0"
url = "https://pypi.python.org/packages/source/p/pymunk/pymunk-{version}.zip"
depends = ["cffi", "setuptools"]
call_hostpython_via_targetpython =... | from os.path import join
from pythonforandroid.recipe import CompiledComponentsPythonRecipe
class PymunkRecipe(CompiledComponentsPythonRecipe):
name = "pymunk"
version = '5.5.0'
url = 'https://pypi.python.org/packages/source/p/pymunk/pymunk-{version}.zip'
depends = ['cffi', 'setuptools']
call_host... | <commit_before>from os.path import join
from pythonforandroid.recipe import CompiledComponentsPythonRecipe
class PymunkRecipe(CompiledComponentsPythonRecipe):
name = "pymunk"
version = '5.5.0'
url = 'https://pypi.python.org/packages/source/p/pymunk/pymunk-{version}.zip'
depends = ['cffi', 'setuptools'... |
a9fb5d3899e5f7f9c0b964a2eaa0f74df33dc52f | scrapple/utils/exceptions.py | scrapple/utils/exceptions.py | """
scrapple.utils.exceptions
~~~~~~~~~~~~~~~~~~~~~~~~~
Functions related to handling exceptions in the input arguments
"""
import re
def check_arguments(args):
"""
Validates the arguments passed through the CLI commands.
:param args: The arguments passed in the CLI, parsed by the docopt module
:return: None
... | """
scrapple.utils.exceptions
~~~~~~~~~~~~~~~~~~~~~~~~~
Functions related to handling exceptions in the input arguments
"""
import re
class InvalidType(ValueError):
"""Exception class for invalid type in arguments."""
pass
def check_arguments(args):
"""
Validates the arguments passed through the CLI commands.... | Add custom error class 'InvalidType' | Add custom error class 'InvalidType'
| Python | mit | AlexMathew/scrapple,scrappleapp/scrapple,AlexMathew/scrapple,AlexMathew/scrapple,scrappleapp/scrapple | """
scrapple.utils.exceptions
~~~~~~~~~~~~~~~~~~~~~~~~~
Functions related to handling exceptions in the input arguments
"""
import re
def check_arguments(args):
"""
Validates the arguments passed through the CLI commands.
:param args: The arguments passed in the CLI, parsed by the docopt module
:return: None
... | """
scrapple.utils.exceptions
~~~~~~~~~~~~~~~~~~~~~~~~~
Functions related to handling exceptions in the input arguments
"""
import re
class InvalidType(ValueError):
"""Exception class for invalid type in arguments."""
pass
def check_arguments(args):
"""
Validates the arguments passed through the CLI commands.... | <commit_before>"""
scrapple.utils.exceptions
~~~~~~~~~~~~~~~~~~~~~~~~~
Functions related to handling exceptions in the input arguments
"""
import re
def check_arguments(args):
"""
Validates the arguments passed through the CLI commands.
:param args: The arguments passed in the CLI, parsed by the docopt module
... | """
scrapple.utils.exceptions
~~~~~~~~~~~~~~~~~~~~~~~~~
Functions related to handling exceptions in the input arguments
"""
import re
class InvalidType(ValueError):
"""Exception class for invalid type in arguments."""
pass
def check_arguments(args):
"""
Validates the arguments passed through the CLI commands.... | """
scrapple.utils.exceptions
~~~~~~~~~~~~~~~~~~~~~~~~~
Functions related to handling exceptions in the input arguments
"""
import re
def check_arguments(args):
"""
Validates the arguments passed through the CLI commands.
:param args: The arguments passed in the CLI, parsed by the docopt module
:return: None
... | <commit_before>"""
scrapple.utils.exceptions
~~~~~~~~~~~~~~~~~~~~~~~~~
Functions related to handling exceptions in the input arguments
"""
import re
def check_arguments(args):
"""
Validates the arguments passed through the CLI commands.
:param args: The arguments passed in the CLI, parsed by the docopt module
... |
0757efde915acdf651231bc345c4c1f3ca67d921 | work/print-traceback.py | work/print-traceback.py | #!/usr/bin/python3
from pprint import pprint
import json
import sys
def get(obj, path):
try:
for part in path:
obj = obj[part]
return obj
except KeyError:
return None
if __name__ == '__main__':
if len(sys.argv) >= 2:
paths = [sys.argv[1].split('.')]
else:
... | #!/usr/bin/python3
from pprint import pprint
import json
import sys
def get(obj, path):
try:
for part in path:
obj = obj[part]
return obj
except KeyError:
return None
def display(obj):
for path in paths:
subobj = get(obj, path)
if subobj is not None:
... | Allow multiple lines of traceback. | Allow multiple lines of traceback.
| Python | mit | ammongit/scripts,ammongit/scripts,ammongit/scripts,ammongit/scripts | #!/usr/bin/python3
from pprint import pprint
import json
import sys
def get(obj, path):
try:
for part in path:
obj = obj[part]
return obj
except KeyError:
return None
if __name__ == '__main__':
if len(sys.argv) >= 2:
paths = [sys.argv[1].split('.')]
else:
... | #!/usr/bin/python3
from pprint import pprint
import json
import sys
def get(obj, path):
try:
for part in path:
obj = obj[part]
return obj
except KeyError:
return None
def display(obj):
for path in paths:
subobj = get(obj, path)
if subobj is not None:
... | <commit_before>#!/usr/bin/python3
from pprint import pprint
import json
import sys
def get(obj, path):
try:
for part in path:
obj = obj[part]
return obj
except KeyError:
return None
if __name__ == '__main__':
if len(sys.argv) >= 2:
paths = [sys.argv[1].split('.... | #!/usr/bin/python3
from pprint import pprint
import json
import sys
def get(obj, path):
try:
for part in path:
obj = obj[part]
return obj
except KeyError:
return None
def display(obj):
for path in paths:
subobj = get(obj, path)
if subobj is not None:
... | #!/usr/bin/python3
from pprint import pprint
import json
import sys
def get(obj, path):
try:
for part in path:
obj = obj[part]
return obj
except KeyError:
return None
if __name__ == '__main__':
if len(sys.argv) >= 2:
paths = [sys.argv[1].split('.')]
else:
... | <commit_before>#!/usr/bin/python3
from pprint import pprint
import json
import sys
def get(obj, path):
try:
for part in path:
obj = obj[part]
return obj
except KeyError:
return None
if __name__ == '__main__':
if len(sys.argv) >= 2:
paths = [sys.argv[1].split('.... |
88e91100cf191b5320ed20678aca835601f7031c | doc/ext/cinder_autodoc.py | doc/ext/cinder_autodoc.py | from __future__ import print_function
import gettext
import os
gettext.install('cinder')
from cinder import utils
def setup(app):
print("**Autodocumenting from %s" % os.path.abspath(os.curdir))
rv = utils.execute('./doc/generate_autodoc_index.sh')
print(rv[0])
| # Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the ... | Add Apache 2.0 license to source file | Add Apache 2.0 license to source file
Source code should be licensed under the Apache 2.0 license.
All source files should have the licensing header.
Change-Id: I67df47560d87182265ec4fa973bddaf356829fc1
| Python | apache-2.0 | eharney/cinder,Datera/cinder,j-griffith/cinder,phenoxim/cinder,phenoxim/cinder,mahak/cinder,openstack/cinder,Datera/cinder,mahak/cinder,openstack/cinder,ge0rgi/cinder,j-griffith/cinder,eharney/cinder | from __future__ import print_function
import gettext
import os
gettext.install('cinder')
from cinder import utils
def setup(app):
print("**Autodocumenting from %s" % os.path.abspath(os.curdir))
rv = utils.execute('./doc/generate_autodoc_index.sh')
print(rv[0])
Add Apache 2.0 license to source file
Sou... | # Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the ... | <commit_before>from __future__ import print_function
import gettext
import os
gettext.install('cinder')
from cinder import utils
def setup(app):
print("**Autodocumenting from %s" % os.path.abspath(os.curdir))
rv = utils.execute('./doc/generate_autodoc_index.sh')
print(rv[0])
<commit_msg>Add Apache 2.0 ... | # Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the ... | from __future__ import print_function
import gettext
import os
gettext.install('cinder')
from cinder import utils
def setup(app):
print("**Autodocumenting from %s" % os.path.abspath(os.curdir))
rv = utils.execute('./doc/generate_autodoc_index.sh')
print(rv[0])
Add Apache 2.0 license to source file
Sou... | <commit_before>from __future__ import print_function
import gettext
import os
gettext.install('cinder')
from cinder import utils
def setup(app):
print("**Autodocumenting from %s" % os.path.abspath(os.curdir))
rv = utils.execute('./doc/generate_autodoc_index.sh')
print(rv[0])
<commit_msg>Add Apache 2.0 ... |
26b79c227ac13bcad686bec6670f585b2d202e33 | module/plugins/accounts/ReloadCc.py | module/plugins/accounts/ReloadCc.py | from module.plugins.Account import Account
from module.common.json_layer import json_loads
class ReloadCc(Account):
__name__ = "ReloadCc"
__version__ = "0.1"
__type__ = "account"
__description__ = """Reload.Cc account plugin"""
__author_name__ = ("Reload Team")
__author_mail__ = ("hello... | from module.plugins.Account import Account
from module.common.json_layer import json_loads
class ReloadCc(Account):
__name__ = "ReloadCc"
__version__ = "0.1"
__type__ = "account"
__description__ = """Reload.Cc account plugin"""
__author_name__ = ("Reload Team")
__author_mail__ = ("hello... | Change self.accounts to self.info for getting the cached password hash | Change self.accounts to self.info for getting the cached password hash
| Python | agpl-3.0 | vuolter/pyload,vuolter/pyload,pyblub/pyload,pyblub/pyload,vuolter/pyload | from module.plugins.Account import Account
from module.common.json_layer import json_loads
class ReloadCc(Account):
__name__ = "ReloadCc"
__version__ = "0.1"
__type__ = "account"
__description__ = """Reload.Cc account plugin"""
__author_name__ = ("Reload Team")
__author_mail__ = ("hello... | from module.plugins.Account import Account
from module.common.json_layer import json_loads
class ReloadCc(Account):
__name__ = "ReloadCc"
__version__ = "0.1"
__type__ = "account"
__description__ = """Reload.Cc account plugin"""
__author_name__ = ("Reload Team")
__author_mail__ = ("hello... | <commit_before>from module.plugins.Account import Account
from module.common.json_layer import json_loads
class ReloadCc(Account):
__name__ = "ReloadCc"
__version__ = "0.1"
__type__ = "account"
__description__ = """Reload.Cc account plugin"""
__author_name__ = ("Reload Team")
__author_m... | from module.plugins.Account import Account
from module.common.json_layer import json_loads
class ReloadCc(Account):
__name__ = "ReloadCc"
__version__ = "0.1"
__type__ = "account"
__description__ = """Reload.Cc account plugin"""
__author_name__ = ("Reload Team")
__author_mail__ = ("hello... | from module.plugins.Account import Account
from module.common.json_layer import json_loads
class ReloadCc(Account):
__name__ = "ReloadCc"
__version__ = "0.1"
__type__ = "account"
__description__ = """Reload.Cc account plugin"""
__author_name__ = ("Reload Team")
__author_mail__ = ("hello... | <commit_before>from module.plugins.Account import Account
from module.common.json_layer import json_loads
class ReloadCc(Account):
__name__ = "ReloadCc"
__version__ = "0.1"
__type__ = "account"
__description__ = """Reload.Cc account plugin"""
__author_name__ = ("Reload Team")
__author_m... |
b56c1cb1185c8d20276688f29509947cb46a26d4 | test/test_compiled.py | test/test_compiled.py | """
Test compiled module
"""
import os
import platform
import sys
import jedi
from .helpers import cwd_at
@cwd_at('test/extensions')
def test_completions():
if platform.architecture()[0] == '64bit':
package_name = "compiled%s%s" % sys.version_info[:2]
sys.path.insert(0, os.getcwd())
if os... | """
Test compiled module
"""
import os
import platform
import sys
import jedi
from .helpers import cwd_at
@cwd_at('test/extensions')
def test_completions():
if platform.architecture()[0] == '64bit':
package_name = "compiled%s%s" % sys.version_info[:2]
sys.path.insert(0, os.getcwd())
if os... | Add test with standard lib | Add test with standard lib
math.cos( should return <Param: x @0,0>
| Python | mit | WoLpH/jedi,WoLpH/jedi,dwillmer/jedi,jonashaag/jedi,mfussenegger/jedi,flurischt/jedi,mfussenegger/jedi,dwillmer/jedi,jonashaag/jedi,tjwei/jedi,tjwei/jedi,flurischt/jedi | """
Test compiled module
"""
import os
import platform
import sys
import jedi
from .helpers import cwd_at
@cwd_at('test/extensions')
def test_completions():
if platform.architecture()[0] == '64bit':
package_name = "compiled%s%s" % sys.version_info[:2]
sys.path.insert(0, os.getcwd())
if os... | """
Test compiled module
"""
import os
import platform
import sys
import jedi
from .helpers import cwd_at
@cwd_at('test/extensions')
def test_completions():
if platform.architecture()[0] == '64bit':
package_name = "compiled%s%s" % sys.version_info[:2]
sys.path.insert(0, os.getcwd())
if os... | <commit_before>"""
Test compiled module
"""
import os
import platform
import sys
import jedi
from .helpers import cwd_at
@cwd_at('test/extensions')
def test_completions():
if platform.architecture()[0] == '64bit':
package_name = "compiled%s%s" % sys.version_info[:2]
sys.path.insert(0, os.getcwd()... | """
Test compiled module
"""
import os
import platform
import sys
import jedi
from .helpers import cwd_at
@cwd_at('test/extensions')
def test_completions():
if platform.architecture()[0] == '64bit':
package_name = "compiled%s%s" % sys.version_info[:2]
sys.path.insert(0, os.getcwd())
if os... | """
Test compiled module
"""
import os
import platform
import sys
import jedi
from .helpers import cwd_at
@cwd_at('test/extensions')
def test_completions():
if platform.architecture()[0] == '64bit':
package_name = "compiled%s%s" % sys.version_info[:2]
sys.path.insert(0, os.getcwd())
if os... | <commit_before>"""
Test compiled module
"""
import os
import platform
import sys
import jedi
from .helpers import cwd_at
@cwd_at('test/extensions')
def test_completions():
if platform.architecture()[0] == '64bit':
package_name = "compiled%s%s" % sys.version_info[:2]
sys.path.insert(0, os.getcwd()... |
85d0bc9fbb20daeff9aa48a83be1823fa346cb9c | tests/test_helpers.py | tests/test_helpers.py | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
import pytest
import types
from rakuten_ws.webservice import RakutenWebService
from rakuten_ws.base import RakutenAPIResponse
@pytest.mark.online
def test_response(credentials):
ws = RakutenWebService(**credentials)
response = ws.ichiba.item.sea... | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
import pytest
import types
from rakuten_ws.webservice import RakutenWebService
from rakuten_ws.base import RakutenAPIResponse
@pytest.mark.online
def test_response(credentials):
ws = RakutenWebService(**credentials)
response = ws.ichiba.item.sea... | Fix tests for Python 3 | Fix tests for Python 3
| Python | mit | alexandriagroup/rakuten-ws | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
import pytest
import types
from rakuten_ws.webservice import RakutenWebService
from rakuten_ws.base import RakutenAPIResponse
@pytest.mark.online
def test_response(credentials):
ws = RakutenWebService(**credentials)
response = ws.ichiba.item.sea... | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
import pytest
import types
from rakuten_ws.webservice import RakutenWebService
from rakuten_ws.base import RakutenAPIResponse
@pytest.mark.online
def test_response(credentials):
ws = RakutenWebService(**credentials)
response = ws.ichiba.item.sea... | <commit_before># -*- coding: utf-8 -*-
from __future__ import unicode_literals
import pytest
import types
from rakuten_ws.webservice import RakutenWebService
from rakuten_ws.base import RakutenAPIResponse
@pytest.mark.online
def test_response(credentials):
ws = RakutenWebService(**credentials)
response = ws.... | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
import pytest
import types
from rakuten_ws.webservice import RakutenWebService
from rakuten_ws.base import RakutenAPIResponse
@pytest.mark.online
def test_response(credentials):
ws = RakutenWebService(**credentials)
response = ws.ichiba.item.sea... | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
import pytest
import types
from rakuten_ws.webservice import RakutenWebService
from rakuten_ws.base import RakutenAPIResponse
@pytest.mark.online
def test_response(credentials):
ws = RakutenWebService(**credentials)
response = ws.ichiba.item.sea... | <commit_before># -*- coding: utf-8 -*-
from __future__ import unicode_literals
import pytest
import types
from rakuten_ws.webservice import RakutenWebService
from rakuten_ws.base import RakutenAPIResponse
@pytest.mark.online
def test_response(credentials):
ws = RakutenWebService(**credentials)
response = ws.... |
36477e0737897fd717e3cbde4b05cb210d335440 | tests/test_refresh.py | tests/test_refresh.py | # vim: fileencoding=utf-8 et sw=4 ts=4 tw=80:
# python-quilt - A Python implementation of the quilt patch system
#
# See LICENSE comming with the source of python-quilt for details.
import os
from .helpers import make_file
from unittest import TestCase
import quilt.refresh
from quilt.db import Db, Patch
from quilt... | # vim: fileencoding=utf-8 et sw=4 ts=4 tw=80:
# python-quilt - A Python implementation of the quilt patch system
#
# See LICENSE comming with the source of python-quilt for details.
import os
from helpers import make_file
from unittest import TestCase
import quilt.refresh
from quilt.db import Db, Patch
from quilt.... | Use “helpers” as independent module for “tests.runtests” environment | Use “helpers” as independent module for “tests.runtests” environment
| Python | mit | bjoernricks/python-quilt | # vim: fileencoding=utf-8 et sw=4 ts=4 tw=80:
# python-quilt - A Python implementation of the quilt patch system
#
# See LICENSE comming with the source of python-quilt for details.
import os
from .helpers import make_file
from unittest import TestCase
import quilt.refresh
from quilt.db import Db, Patch
from quilt... | # vim: fileencoding=utf-8 et sw=4 ts=4 tw=80:
# python-quilt - A Python implementation of the quilt patch system
#
# See LICENSE comming with the source of python-quilt for details.
import os
from helpers import make_file
from unittest import TestCase
import quilt.refresh
from quilt.db import Db, Patch
from quilt.... | <commit_before># vim: fileencoding=utf-8 et sw=4 ts=4 tw=80:
# python-quilt - A Python implementation of the quilt patch system
#
# See LICENSE comming with the source of python-quilt for details.
import os
from .helpers import make_file
from unittest import TestCase
import quilt.refresh
from quilt.db import Db, P... | # vim: fileencoding=utf-8 et sw=4 ts=4 tw=80:
# python-quilt - A Python implementation of the quilt patch system
#
# See LICENSE comming with the source of python-quilt for details.
import os
from helpers import make_file
from unittest import TestCase
import quilt.refresh
from quilt.db import Db, Patch
from quilt.... | # vim: fileencoding=utf-8 et sw=4 ts=4 tw=80:
# python-quilt - A Python implementation of the quilt patch system
#
# See LICENSE comming with the source of python-quilt for details.
import os
from .helpers import make_file
from unittest import TestCase
import quilt.refresh
from quilt.db import Db, Patch
from quilt... | <commit_before># vim: fileencoding=utf-8 et sw=4 ts=4 tw=80:
# python-quilt - A Python implementation of the quilt patch system
#
# See LICENSE comming with the source of python-quilt for details.
import os
from .helpers import make_file
from unittest import TestCase
import quilt.refresh
from quilt.db import Db, P... |
1083201467c2305966dd2c36e9d7b147ced891e2 | {{cookiecutter.project_slug}}/{{cookiecutter.project_slug}}/contrib/customlogging.py | {{cookiecutter.project_slug}}/{{cookiecutter.project_slug}}/contrib/customlogging.py | from .request import GLOBALS
from django.conf import settings
import logging
class GrayFilter(logging.Filter): # pragma: no cover
def filter(self, record):
if hasattr(GLOBALS, "user") and GLOBALS.user:
record.user_id = GLOBALS.user.id
record.env = settings.STATIC_LOGGING.get("env")
... | import logging
from django.conf import settings
from .request import GLOBALS
class GrayFilter(logging.Filter): # pragma: no cover
def filter(self, record):
# check for request._cached_user before accessing the user object,
# this means django.contrib.auth.middleware.get_user has returned.
... | Fix recursive logging error wheni GrayFilter is in use and "django" logger is at DEBUG leve | Fix recursive logging error wheni GrayFilter is in use and "django" logger is at DEBUG leve
| Python | apache-2.0 | Benoss/django-cookiecutter,Benoss/django-cookiecutter,Benoss/django-cookiecutter,Benoss/django-cookiecutter | from .request import GLOBALS
from django.conf import settings
import logging
class GrayFilter(logging.Filter): # pragma: no cover
def filter(self, record):
if hasattr(GLOBALS, "user") and GLOBALS.user:
record.user_id = GLOBALS.user.id
record.env = settings.STATIC_LOGGING.get("env")
... | import logging
from django.conf import settings
from .request import GLOBALS
class GrayFilter(logging.Filter): # pragma: no cover
def filter(self, record):
# check for request._cached_user before accessing the user object,
# this means django.contrib.auth.middleware.get_user has returned.
... | <commit_before>from .request import GLOBALS
from django.conf import settings
import logging
class GrayFilter(logging.Filter): # pragma: no cover
def filter(self, record):
if hasattr(GLOBALS, "user") and GLOBALS.user:
record.user_id = GLOBALS.user.id
record.env = settings.STATIC_LOGG... | import logging
from django.conf import settings
from .request import GLOBALS
class GrayFilter(logging.Filter): # pragma: no cover
def filter(self, record):
# check for request._cached_user before accessing the user object,
# this means django.contrib.auth.middleware.get_user has returned.
... | from .request import GLOBALS
from django.conf import settings
import logging
class GrayFilter(logging.Filter): # pragma: no cover
def filter(self, record):
if hasattr(GLOBALS, "user") and GLOBALS.user:
record.user_id = GLOBALS.user.id
record.env = settings.STATIC_LOGGING.get("env")
... | <commit_before>from .request import GLOBALS
from django.conf import settings
import logging
class GrayFilter(logging.Filter): # pragma: no cover
def filter(self, record):
if hasattr(GLOBALS, "user") and GLOBALS.user:
record.user_id = GLOBALS.user.id
record.env = settings.STATIC_LOGG... |
f18957ca1986317e8987183633c39f1987e316c4 | pgcontents/__init__.py | pgcontents/__init__.py | from .checkpoints import PostgresCheckpoints
from .pgmanager import PostgresContentsManager
__all__ = [
'PostgresCheckpoints',
'PostgresContentsManager',
]
| # Do this first so that we bail early with a useful message if the user didn't
# specify [ipy3] or [ipy4].
try:
import IPython # noqa
except ImportError:
raise ImportError(
"No IPython installation found.\n"
"To install pgcontents with the latest Jupyter Notebook"
" run 'pip install pgc... | Add warning if IPython isn't installed. | DOC: Add warning if IPython isn't installed.
| Python | apache-2.0 | quantopian/pgcontents | from .checkpoints import PostgresCheckpoints
from .pgmanager import PostgresContentsManager
__all__ = [
'PostgresCheckpoints',
'PostgresContentsManager',
]
DOC: Add warning if IPython isn't installed. | # Do this first so that we bail early with a useful message if the user didn't
# specify [ipy3] or [ipy4].
try:
import IPython # noqa
except ImportError:
raise ImportError(
"No IPython installation found.\n"
"To install pgcontents with the latest Jupyter Notebook"
" run 'pip install pgc... | <commit_before>from .checkpoints import PostgresCheckpoints
from .pgmanager import PostgresContentsManager
__all__ = [
'PostgresCheckpoints',
'PostgresContentsManager',
]
<commit_msg>DOC: Add warning if IPython isn't installed.<commit_after> | # Do this first so that we bail early with a useful message if the user didn't
# specify [ipy3] or [ipy4].
try:
import IPython # noqa
except ImportError:
raise ImportError(
"No IPython installation found.\n"
"To install pgcontents with the latest Jupyter Notebook"
" run 'pip install pgc... | from .checkpoints import PostgresCheckpoints
from .pgmanager import PostgresContentsManager
__all__ = [
'PostgresCheckpoints',
'PostgresContentsManager',
]
DOC: Add warning if IPython isn't installed.# Do this first so that we bail early with a useful message if the user didn't
# specify [ipy3] or [ipy4].
try:... | <commit_before>from .checkpoints import PostgresCheckpoints
from .pgmanager import PostgresContentsManager
__all__ = [
'PostgresCheckpoints',
'PostgresContentsManager',
]
<commit_msg>DOC: Add warning if IPython isn't installed.<commit_after># Do this first so that we bail early with a useful message if the use... |
cc44afdca3ebcdaeed3555f161d3e0a1992c19eb | planet/api/__init__.py | planet/api/__init__.py | # Copyright 2017 Planet Labs, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writ... | # Copyright 2017 Planet Labs, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writ... | Put api.__version__ back in after version shuffle | Put api.__version__ back in after version shuffle
| Python | apache-2.0 | planetlabs/planet-client-python,planetlabs/planet-client-python | # Copyright 2017 Planet Labs, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writ... | # Copyright 2017 Planet Labs, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writ... | <commit_before># Copyright 2017 Planet Labs, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or ag... | # Copyright 2017 Planet Labs, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writ... | # Copyright 2017 Planet Labs, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writ... | <commit_before># Copyright 2017 Planet Labs, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or ag... |
268c4dce6cfa59e10cff7f4bf8456276c2e11f7d | main.py | main.py | #!/usr/bin/env python2.7
#coding: utf8
"""
KSP Add-on Version Checker.
"""
# Copyright 2014 Dimitri "Tyrope" Molenaars
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use self file except in compliance with the License.
# You may obtain a copy of the License at
# http://www.apache.... | #!/usr/bin/env python2.7
#coding: utf8
"""
KSP Add-on Version Checker.
"""
# Copyright 2014 Dimitri "Tyrope" Molenaars
# 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.... | Create config paths if needed, find files and (for now) report remotes. | Create config paths if needed, find files and (for now) report remotes.
| Python | apache-2.0 | tyrope/KSP-addon-version-checker | #!/usr/bin/env python2.7
#coding: utf8
"""
KSP Add-on Version Checker.
"""
# Copyright 2014 Dimitri "Tyrope" Molenaars
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use self file except in compliance with the License.
# You may obtain a copy of the License at
# http://www.apache.... | #!/usr/bin/env python2.7
#coding: utf8
"""
KSP Add-on Version Checker.
"""
# Copyright 2014 Dimitri "Tyrope" Molenaars
# 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.... | <commit_before>#!/usr/bin/env python2.7
#coding: utf8
"""
KSP Add-on Version Checker.
"""
# Copyright 2014 Dimitri "Tyrope" Molenaars
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use self file except in compliance with the License.
# You may obtain a copy of the License at
# htt... | #!/usr/bin/env python2.7
#coding: utf8
"""
KSP Add-on Version Checker.
"""
# Copyright 2014 Dimitri "Tyrope" Molenaars
# 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.... | #!/usr/bin/env python2.7
#coding: utf8
"""
KSP Add-on Version Checker.
"""
# Copyright 2014 Dimitri "Tyrope" Molenaars
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use self file except in compliance with the License.
# You may obtain a copy of the License at
# http://www.apache.... | <commit_before>#!/usr/bin/env python2.7
#coding: utf8
"""
KSP Add-on Version Checker.
"""
# Copyright 2014 Dimitri "Tyrope" Molenaars
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use self file except in compliance with the License.
# You may obtain a copy of the License at
# htt... |
9fe11538a9d74ff235b530a71d2399fe6c03a88a | tests/rules_tests/FromRulesComputeTest.py | tests/rules_tests/FromRulesComputeTest.py | #!/usr/bin/env python
"""
:Author Patrik Valkovic
:Created 23.06.2017 16:39
:Licence GNUv3
Part of grammpy
"""
from unittest import main, TestCase
from grammpy import Rule
class FromRulesComputeTest(TestCase):
pass
if __name__ == '__main__':
main()
| #!/usr/bin/env python
"""
:Author Patrik Valkovic
:Created 23.06.2017 16:39
:Licence GNUv3
Part of grammpy
"""
from unittest import main, TestCase
from grammpy import Rule
from grammpy.exceptions.NotASingleSymbolException import NotASingleSymbolException
from grammpy.exceptions.CantCreateSingleRuleExcepti... | Add tests to compute from rules property | Add tests to compute from rules property
| Python | mit | PatrikValkovic/grammpy | #!/usr/bin/env python
"""
:Author Patrik Valkovic
:Created 23.06.2017 16:39
:Licence GNUv3
Part of grammpy
"""
from unittest import main, TestCase
from grammpy import Rule
class FromRulesComputeTest(TestCase):
pass
if __name__ == '__main__':
main()
Add tests to compute from rules proper... | #!/usr/bin/env python
"""
:Author Patrik Valkovic
:Created 23.06.2017 16:39
:Licence GNUv3
Part of grammpy
"""
from unittest import main, TestCase
from grammpy import Rule
from grammpy.exceptions.NotASingleSymbolException import NotASingleSymbolException
from grammpy.exceptions.CantCreateSingleRuleExcepti... | <commit_before>#!/usr/bin/env python
"""
:Author Patrik Valkovic
:Created 23.06.2017 16:39
:Licence GNUv3
Part of grammpy
"""
from unittest import main, TestCase
from grammpy import Rule
class FromRulesComputeTest(TestCase):
pass
if __name__ == '__main__':
main()
<commit_msg>Add tests t... | #!/usr/bin/env python
"""
:Author Patrik Valkovic
:Created 23.06.2017 16:39
:Licence GNUv3
Part of grammpy
"""
from unittest import main, TestCase
from grammpy import Rule
from grammpy.exceptions.NotASingleSymbolException import NotASingleSymbolException
from grammpy.exceptions.CantCreateSingleRuleExcepti... | #!/usr/bin/env python
"""
:Author Patrik Valkovic
:Created 23.06.2017 16:39
:Licence GNUv3
Part of grammpy
"""
from unittest import main, TestCase
from grammpy import Rule
class FromRulesComputeTest(TestCase):
pass
if __name__ == '__main__':
main()
Add tests to compute from rules proper... | <commit_before>#!/usr/bin/env python
"""
:Author Patrik Valkovic
:Created 23.06.2017 16:39
:Licence GNUv3
Part of grammpy
"""
from unittest import main, TestCase
from grammpy import Rule
class FromRulesComputeTest(TestCase):
pass
if __name__ == '__main__':
main()
<commit_msg>Add tests t... |
fbfae080cc59e2faae4c8ece21e4aa2970efee1e | encmass.py | encmass.py | #!/usr/bin/env python
# -----------------------------------------------------------------------------
# GENHERNQUIST.ENCMASS
# Laura L Watkins [[email protected]]
# -----------------------------------------------------------------------------
import numpy as np
from astropy import units as u
from scipy import sp... | #!/usr/bin/env python
# -----------------------------------------------------------------------------
# GENHERNQUIST.ENCMASS
# Laura L Watkins [[email protected]]
# -----------------------------------------------------------------------------
import numpy as np
from astropy import units as u
from scipy import sp... | Fix error in enclosed mass calculation and fix unit handling. | Fix error in enclosed mass calculation and fix unit handling.
| Python | bsd-2-clause | lauralwatkins/genhernquist | #!/usr/bin/env python
# -----------------------------------------------------------------------------
# GENHERNQUIST.ENCMASS
# Laura L Watkins [[email protected]]
# -----------------------------------------------------------------------------
import numpy as np
from astropy import units as u
from scipy import sp... | #!/usr/bin/env python
# -----------------------------------------------------------------------------
# GENHERNQUIST.ENCMASS
# Laura L Watkins [[email protected]]
# -----------------------------------------------------------------------------
import numpy as np
from astropy import units as u
from scipy import sp... | <commit_before>#!/usr/bin/env python
# -----------------------------------------------------------------------------
# GENHERNQUIST.ENCMASS
# Laura L Watkins [[email protected]]
# -----------------------------------------------------------------------------
import numpy as np
from astropy import units as u
from ... | #!/usr/bin/env python
# -----------------------------------------------------------------------------
# GENHERNQUIST.ENCMASS
# Laura L Watkins [[email protected]]
# -----------------------------------------------------------------------------
import numpy as np
from astropy import units as u
from scipy import sp... | #!/usr/bin/env python
# -----------------------------------------------------------------------------
# GENHERNQUIST.ENCMASS
# Laura L Watkins [[email protected]]
# -----------------------------------------------------------------------------
import numpy as np
from astropy import units as u
from scipy import sp... | <commit_before>#!/usr/bin/env python
# -----------------------------------------------------------------------------
# GENHERNQUIST.ENCMASS
# Laura L Watkins [[email protected]]
# -----------------------------------------------------------------------------
import numpy as np
from astropy import units as u
from ... |
5ee3eb2f68e4af8e70ea383b067fe67ffd4800bf | loadsbroker/webapp/__init__.py | loadsbroker/webapp/__init__.py | import os
import tornado.web
from loadsbroker.webapp.api import RootHandler, RunHandler
from loadsbroker.webapp.views import GrafanaHandler
_GRAFANA = os.path.join(os.path.dirname(__file__), 'grafana')
application = tornado.web.Application([
(r"/api", RootHandler),
(r"/api/run/(.*)", RunHandler),
(r"/da... | import os
import tornado.web
from loadsbroker.webapp.api import RootHandler, RunHandler
from loadsbroker.webapp.views import GrafanaHandler
_GRAFANA = os.path.join(os.path.dirname(__file__), 'grafana')
application = tornado.web.Application([
(r"/api", RootHandler),
(r"/api/run/(.*)", RunHandler),
(r"/da... | Set the `default_filename` for `GrafanaHandler`. | Set the `default_filename` for `GrafanaHandler`.
| Python | apache-2.0 | loads/loads-broker,loads/loads-broker,loads/loads-broker,loads/loads-broker | import os
import tornado.web
from loadsbroker.webapp.api import RootHandler, RunHandler
from loadsbroker.webapp.views import GrafanaHandler
_GRAFANA = os.path.join(os.path.dirname(__file__), 'grafana')
application = tornado.web.Application([
(r"/api", RootHandler),
(r"/api/run/(.*)", RunHandler),
(r"/da... | import os
import tornado.web
from loadsbroker.webapp.api import RootHandler, RunHandler
from loadsbroker.webapp.views import GrafanaHandler
_GRAFANA = os.path.join(os.path.dirname(__file__), 'grafana')
application = tornado.web.Application([
(r"/api", RootHandler),
(r"/api/run/(.*)", RunHandler),
(r"/da... | <commit_before>import os
import tornado.web
from loadsbroker.webapp.api import RootHandler, RunHandler
from loadsbroker.webapp.views import GrafanaHandler
_GRAFANA = os.path.join(os.path.dirname(__file__), 'grafana')
application = tornado.web.Application([
(r"/api", RootHandler),
(r"/api/run/(.*)", RunHandl... | import os
import tornado.web
from loadsbroker.webapp.api import RootHandler, RunHandler
from loadsbroker.webapp.views import GrafanaHandler
_GRAFANA = os.path.join(os.path.dirname(__file__), 'grafana')
application = tornado.web.Application([
(r"/api", RootHandler),
(r"/api/run/(.*)", RunHandler),
(r"/da... | import os
import tornado.web
from loadsbroker.webapp.api import RootHandler, RunHandler
from loadsbroker.webapp.views import GrafanaHandler
_GRAFANA = os.path.join(os.path.dirname(__file__), 'grafana')
application = tornado.web.Application([
(r"/api", RootHandler),
(r"/api/run/(.*)", RunHandler),
(r"/da... | <commit_before>import os
import tornado.web
from loadsbroker.webapp.api import RootHandler, RunHandler
from loadsbroker.webapp.views import GrafanaHandler
_GRAFANA = os.path.join(os.path.dirname(__file__), 'grafana')
application = tornado.web.Application([
(r"/api", RootHandler),
(r"/api/run/(.*)", RunHandl... |
ddd8f1a8fab0f77943d7a47e1d154d1104add26e | ievv_opensource/ievv_batchframework/rq_tasks.py | ievv_opensource/ievv_batchframework/rq_tasks.py | from __future__ import absolute_import
import django_rq
from ievv_opensource.ievv_batchframework.models import BatchOperation
from ievv_opensource.ievv_batchframework import batchregistry
import logging
class BatchActionGroupTask(object):
abstract = True
def run_actiongroup(self, actiongroup_name, batchop... | import django_rq
from ievv_opensource.ievv_batchframework.models import BatchOperation
from ievv_opensource.ievv_batchframework import batchregistry
import logging
class BatchActionGroupTask(object):
abstract = True
def run_actiongroup(self, actiongroup_name, batchoperation_id, **kwargs):
try:
... | Remove dependency on the future lib. | Remove dependency on the future lib.
| Python | bsd-3-clause | appressoas/ievv_opensource,appressoas/ievv_opensource,appressoas/ievv_opensource,appressoas/ievv_opensource,appressoas/ievv_opensource | from __future__ import absolute_import
import django_rq
from ievv_opensource.ievv_batchframework.models import BatchOperation
from ievv_opensource.ievv_batchframework import batchregistry
import logging
class BatchActionGroupTask(object):
abstract = True
def run_actiongroup(self, actiongroup_name, batchop... | import django_rq
from ievv_opensource.ievv_batchframework.models import BatchOperation
from ievv_opensource.ievv_batchframework import batchregistry
import logging
class BatchActionGroupTask(object):
abstract = True
def run_actiongroup(self, actiongroup_name, batchoperation_id, **kwargs):
try:
... | <commit_before>from __future__ import absolute_import
import django_rq
from ievv_opensource.ievv_batchframework.models import BatchOperation
from ievv_opensource.ievv_batchframework import batchregistry
import logging
class BatchActionGroupTask(object):
abstract = True
def run_actiongroup(self, actiongrou... | import django_rq
from ievv_opensource.ievv_batchframework.models import BatchOperation
from ievv_opensource.ievv_batchframework import batchregistry
import logging
class BatchActionGroupTask(object):
abstract = True
def run_actiongroup(self, actiongroup_name, batchoperation_id, **kwargs):
try:
... | from __future__ import absolute_import
import django_rq
from ievv_opensource.ievv_batchframework.models import BatchOperation
from ievv_opensource.ievv_batchframework import batchregistry
import logging
class BatchActionGroupTask(object):
abstract = True
def run_actiongroup(self, actiongroup_name, batchop... | <commit_before>from __future__ import absolute_import
import django_rq
from ievv_opensource.ievv_batchframework.models import BatchOperation
from ievv_opensource.ievv_batchframework import batchregistry
import logging
class BatchActionGroupTask(object):
abstract = True
def run_actiongroup(self, actiongrou... |
1d74d333cdf6d25150afc93febc8141ea3c655b0 | sirius/LI_V00/lattice.py | sirius/LI_V00/lattice.py | #!/usr/bin/env python3
import math as _math
import numpy as _np
import pyaccel as _pyaccel
import mathphys as _mp
from . import optics_mode_M0 as _optics_mode_M0
_default_optics_mode = _optics_mode_M0
_energy = 0.15e9 #[eV]
_emittance = 170.3329758677203e-09 #[m rad]
_energy_spread = 0.005
_single_bunch_charge = 1e-9... | #!/usr/bin/env python3
import math as _math
import numpy as _np
import pyaccel as _pyaccel
import mathphys as _mp
from . import optics_mode_M0 as _optics_mode_M0
_default_optics_mode = _optics_mode_M0
_energy = 0.15e9 #[eV]
_emittance = 170.3329758677203e-09 #[m rad]
_energy_spread = 0.005
_single_bunch_charge = 1e-9... | Change Linac pulse duration interval to 150 ns | Change Linac pulse duration interval to 150 ns
| Python | mit | lnls-fac/sirius | #!/usr/bin/env python3
import math as _math
import numpy as _np
import pyaccel as _pyaccel
import mathphys as _mp
from . import optics_mode_M0 as _optics_mode_M0
_default_optics_mode = _optics_mode_M0
_energy = 0.15e9 #[eV]
_emittance = 170.3329758677203e-09 #[m rad]
_energy_spread = 0.005
_single_bunch_charge = 1e-9... | #!/usr/bin/env python3
import math as _math
import numpy as _np
import pyaccel as _pyaccel
import mathphys as _mp
from . import optics_mode_M0 as _optics_mode_M0
_default_optics_mode = _optics_mode_M0
_energy = 0.15e9 #[eV]
_emittance = 170.3329758677203e-09 #[m rad]
_energy_spread = 0.005
_single_bunch_charge = 1e-9... | <commit_before>#!/usr/bin/env python3
import math as _math
import numpy as _np
import pyaccel as _pyaccel
import mathphys as _mp
from . import optics_mode_M0 as _optics_mode_M0
_default_optics_mode = _optics_mode_M0
_energy = 0.15e9 #[eV]
_emittance = 170.3329758677203e-09 #[m rad]
_energy_spread = 0.005
_single_bunc... | #!/usr/bin/env python3
import math as _math
import numpy as _np
import pyaccel as _pyaccel
import mathphys as _mp
from . import optics_mode_M0 as _optics_mode_M0
_default_optics_mode = _optics_mode_M0
_energy = 0.15e9 #[eV]
_emittance = 170.3329758677203e-09 #[m rad]
_energy_spread = 0.005
_single_bunch_charge = 1e-9... | #!/usr/bin/env python3
import math as _math
import numpy as _np
import pyaccel as _pyaccel
import mathphys as _mp
from . import optics_mode_M0 as _optics_mode_M0
_default_optics_mode = _optics_mode_M0
_energy = 0.15e9 #[eV]
_emittance = 170.3329758677203e-09 #[m rad]
_energy_spread = 0.005
_single_bunch_charge = 1e-9... | <commit_before>#!/usr/bin/env python3
import math as _math
import numpy as _np
import pyaccel as _pyaccel
import mathphys as _mp
from . import optics_mode_M0 as _optics_mode_M0
_default_optics_mode = _optics_mode_M0
_energy = 0.15e9 #[eV]
_emittance = 170.3329758677203e-09 #[m rad]
_energy_spread = 0.005
_single_bunc... |
144264fcf06b24c8676e99bff5abb08e7bc936fb | comics/comics/fminus.py | comics/comics/fminus.py | from comics.aggregator.crawler import GoComicsComCrawlerBase
from comics.core.comic_data import ComicDataBase
class ComicData(ComicDataBase):
name = "F Minus"
language = "en"
url = "http://www.gocomics.com/fminus"
start_date = "1999-09-01"
rights = "Tony Carrillo"
class Crawler(GoComicsComCrawle... | from comics.aggregator.crawler import GoComicsComCrawlerBase
from comics.core.comic_data import ComicDataBase
class ComicData(ComicDataBase):
name = "F Minus"
language = "en"
url = "http://www.gocomics.com/fminus"
start_date = "1999-09-01"
rights = "Tony Carrillo"
class Crawler(GoComicsComCrawle... | Update history capability for "F Minus" | Update history capability for "F Minus"
| Python | agpl-3.0 | jodal/comics,datagutten/comics,jodal/comics,jodal/comics,jodal/comics,datagutten/comics,datagutten/comics,datagutten/comics | from comics.aggregator.crawler import GoComicsComCrawlerBase
from comics.core.comic_data import ComicDataBase
class ComicData(ComicDataBase):
name = "F Minus"
language = "en"
url = "http://www.gocomics.com/fminus"
start_date = "1999-09-01"
rights = "Tony Carrillo"
class Crawler(GoComicsComCrawle... | from comics.aggregator.crawler import GoComicsComCrawlerBase
from comics.core.comic_data import ComicDataBase
class ComicData(ComicDataBase):
name = "F Minus"
language = "en"
url = "http://www.gocomics.com/fminus"
start_date = "1999-09-01"
rights = "Tony Carrillo"
class Crawler(GoComicsComCrawle... | <commit_before>from comics.aggregator.crawler import GoComicsComCrawlerBase
from comics.core.comic_data import ComicDataBase
class ComicData(ComicDataBase):
name = "F Minus"
language = "en"
url = "http://www.gocomics.com/fminus"
start_date = "1999-09-01"
rights = "Tony Carrillo"
class Crawler(Go... | from comics.aggregator.crawler import GoComicsComCrawlerBase
from comics.core.comic_data import ComicDataBase
class ComicData(ComicDataBase):
name = "F Minus"
language = "en"
url = "http://www.gocomics.com/fminus"
start_date = "1999-09-01"
rights = "Tony Carrillo"
class Crawler(GoComicsComCrawle... | from comics.aggregator.crawler import GoComicsComCrawlerBase
from comics.core.comic_data import ComicDataBase
class ComicData(ComicDataBase):
name = "F Minus"
language = "en"
url = "http://www.gocomics.com/fminus"
start_date = "1999-09-01"
rights = "Tony Carrillo"
class Crawler(GoComicsComCrawle... | <commit_before>from comics.aggregator.crawler import GoComicsComCrawlerBase
from comics.core.comic_data import ComicDataBase
class ComicData(ComicDataBase):
name = "F Minus"
language = "en"
url = "http://www.gocomics.com/fminus"
start_date = "1999-09-01"
rights = "Tony Carrillo"
class Crawler(Go... |
7168d7dc1695228e7711124395f41c3d52651a04 | conanfile.py | conanfile.py | from conans import ConanFile, CMake
from conans.tools import load
import re
def get_version():
try:
content = load("CMakeLists.txt")
version = re.search(r"^\s*project\(resource_pool\s+VERSION\s+([^\s]+)", content, re.M).group(1)
return version.strip()
except Exception:
return N... | from conans import ConanFile, CMake
from conans.tools import load
import re
def get_version():
try:
content = load("CMakeLists.txt")
version = re.search(r"^\s*project\(resource_pool\s+VERSION\s+([^\s]+)", content, re.M).group(1)
return version.strip()
except Exception:
return N... | Use boost 1.71.0 for conan | Use boost 1.71.0 for conan
https://github.com/conan-io/conan-center-index/issues/214#issuecomment-564074114
| Python | mit | elsid/resource_pool,elsid/resource_pool,elsid/resource_pool | from conans import ConanFile, CMake
from conans.tools import load
import re
def get_version():
try:
content = load("CMakeLists.txt")
version = re.search(r"^\s*project\(resource_pool\s+VERSION\s+([^\s]+)", content, re.M).group(1)
return version.strip()
except Exception:
return N... | from conans import ConanFile, CMake
from conans.tools import load
import re
def get_version():
try:
content = load("CMakeLists.txt")
version = re.search(r"^\s*project\(resource_pool\s+VERSION\s+([^\s]+)", content, re.M).group(1)
return version.strip()
except Exception:
return N... | <commit_before>from conans import ConanFile, CMake
from conans.tools import load
import re
def get_version():
try:
content = load("CMakeLists.txt")
version = re.search(r"^\s*project\(resource_pool\s+VERSION\s+([^\s]+)", content, re.M).group(1)
return version.strip()
except Exception:
... | from conans import ConanFile, CMake
from conans.tools import load
import re
def get_version():
try:
content = load("CMakeLists.txt")
version = re.search(r"^\s*project\(resource_pool\s+VERSION\s+([^\s]+)", content, re.M).group(1)
return version.strip()
except Exception:
return N... | from conans import ConanFile, CMake
from conans.tools import load
import re
def get_version():
try:
content = load("CMakeLists.txt")
version = re.search(r"^\s*project\(resource_pool\s+VERSION\s+([^\s]+)", content, re.M).group(1)
return version.strip()
except Exception:
return N... | <commit_before>from conans import ConanFile, CMake
from conans.tools import load
import re
def get_version():
try:
content = load("CMakeLists.txt")
version = re.search(r"^\s*project\(resource_pool\s+VERSION\s+([^\s]+)", content, re.M).group(1)
return version.strip()
except Exception:
... |
dd739126181b29493c9d1d90a7e40eac09c23666 | app/models.py | app/models.py | # -*- coding: utf-8 -*-
"""
app.models
~~~~~~~~~~
Provides the SQLAlchemy models
"""
from __future__ import (
absolute_import, division, print_function, with_statement,
unicode_literals)
import savalidation.validators as val
from datetime import datetime as dt
from app import db
from savalidation... | # -*- coding: utf-8 -*-
"""
app.models
~~~~~~~~~~
Provides the SQLAlchemy models
"""
from __future__ import (
absolute_import, division, print_function, with_statement,
unicode_literals)
import savalidation.validators as val
from datetime import datetime as dt
from app import db
from savalidation... | Add unique constraint to rid | Add unique constraint to rid | Python | mit | reubano/hdxscraper-hdro,reubano/hdxscraper-hdro,reubano/hdxscraper-hdro | # -*- coding: utf-8 -*-
"""
app.models
~~~~~~~~~~
Provides the SQLAlchemy models
"""
from __future__ import (
absolute_import, division, print_function, with_statement,
unicode_literals)
import savalidation.validators as val
from datetime import datetime as dt
from app import db
from savalidation... | # -*- coding: utf-8 -*-
"""
app.models
~~~~~~~~~~
Provides the SQLAlchemy models
"""
from __future__ import (
absolute_import, division, print_function, with_statement,
unicode_literals)
import savalidation.validators as val
from datetime import datetime as dt
from app import db
from savalidation... | <commit_before># -*- coding: utf-8 -*-
"""
app.models
~~~~~~~~~~
Provides the SQLAlchemy models
"""
from __future__ import (
absolute_import, division, print_function, with_statement,
unicode_literals)
import savalidation.validators as val
from datetime import datetime as dt
from app import db
fr... | # -*- coding: utf-8 -*-
"""
app.models
~~~~~~~~~~
Provides the SQLAlchemy models
"""
from __future__ import (
absolute_import, division, print_function, with_statement,
unicode_literals)
import savalidation.validators as val
from datetime import datetime as dt
from app import db
from savalidation... | # -*- coding: utf-8 -*-
"""
app.models
~~~~~~~~~~
Provides the SQLAlchemy models
"""
from __future__ import (
absolute_import, division, print_function, with_statement,
unicode_literals)
import savalidation.validators as val
from datetime import datetime as dt
from app import db
from savalidation... | <commit_before># -*- coding: utf-8 -*-
"""
app.models
~~~~~~~~~~
Provides the SQLAlchemy models
"""
from __future__ import (
absolute_import, division, print_function, with_statement,
unicode_literals)
import savalidation.validators as val
from datetime import datetime as dt
from app import db
fr... |
4ac335e2ac69f634d51ab8b84805947fe2b87fc5 | app.py | app.py | #!notify/bin/python3
import os
import sys
from pushbullet import Pushbullet
def create_note(title, content):
api_key = os.environ["PB_API_KEY"]
pb = Pushbullet(api_key)
pb.push_note(title, content)
if len(sys.argv) >= 3:
title = sys.argv[1]
body = sys.argv[2]
create_note(title, body)
else:
... | #!notify/bin/python3
import hug
import os
from pushbullet import Pushbullet
@hug.cli()
def create_note(title: hug.types.text, content: hug.types.text):
api_key = os.environ["PB_API_KEY"]
pb = Pushbullet(api_key)
pb.push_note(title, content)
if __name__ == '__main__':
create_note.interface.cli()
| Migrate command line interface to hug | Migrate command line interface to hug
| Python | isc | tildecross/tildex-notify | #!notify/bin/python3
import os
import sys
from pushbullet import Pushbullet
def create_note(title, content):
api_key = os.environ["PB_API_KEY"]
pb = Pushbullet(api_key)
pb.push_note(title, content)
if len(sys.argv) >= 3:
title = sys.argv[1]
body = sys.argv[2]
create_note(title, body)
else:
... | #!notify/bin/python3
import hug
import os
from pushbullet import Pushbullet
@hug.cli()
def create_note(title: hug.types.text, content: hug.types.text):
api_key = os.environ["PB_API_KEY"]
pb = Pushbullet(api_key)
pb.push_note(title, content)
if __name__ == '__main__':
create_note.interface.cli()
| <commit_before>#!notify/bin/python3
import os
import sys
from pushbullet import Pushbullet
def create_note(title, content):
api_key = os.environ["PB_API_KEY"]
pb = Pushbullet(api_key)
pb.push_note(title, content)
if len(sys.argv) >= 3:
title = sys.argv[1]
body = sys.argv[2]
create_note(titl... | #!notify/bin/python3
import hug
import os
from pushbullet import Pushbullet
@hug.cli()
def create_note(title: hug.types.text, content: hug.types.text):
api_key = os.environ["PB_API_KEY"]
pb = Pushbullet(api_key)
pb.push_note(title, content)
if __name__ == '__main__':
create_note.interface.cli()
| #!notify/bin/python3
import os
import sys
from pushbullet import Pushbullet
def create_note(title, content):
api_key = os.environ["PB_API_KEY"]
pb = Pushbullet(api_key)
pb.push_note(title, content)
if len(sys.argv) >= 3:
title = sys.argv[1]
body = sys.argv[2]
create_note(title, body)
else:
... | <commit_before>#!notify/bin/python3
import os
import sys
from pushbullet import Pushbullet
def create_note(title, content):
api_key = os.environ["PB_API_KEY"]
pb = Pushbullet(api_key)
pb.push_note(title, content)
if len(sys.argv) >= 3:
title = sys.argv[1]
body = sys.argv[2]
create_note(titl... |
fe768f5d8c1081f69acd8cf656aa618da7caf93b | cbpos/mod/currency/views/config.py | cbpos/mod/currency/views/config.py | from PySide import QtGui
import cbpos
from cbpos.mod.currency.models.currency import Currency
class CurrencyConfigPage(QtGui.QWidget):
label = 'Currency'
def __init__(self):
super(CurrencyConfigPage, self).__init__()
self.default = QtGui.QComboBox()
... | from PySide import QtGui
import cbpos
import cbpos.mod.currency.controllers as currency
from cbpos.mod.currency.models.currency import Currency
class CurrencyConfigPage(QtGui.QWidget):
label = 'Currency'
def __init__(self):
super(CurrencyConfigPage, self).__init__()
... | Handle unset default currency better | Handle unset default currency better
| Python | mit | coinbox/coinbox-mod-currency | from PySide import QtGui
import cbpos
from cbpos.mod.currency.models.currency import Currency
class CurrencyConfigPage(QtGui.QWidget):
label = 'Currency'
def __init__(self):
super(CurrencyConfigPage, self).__init__()
self.default = QtGui.QComboBox()
... | from PySide import QtGui
import cbpos
import cbpos.mod.currency.controllers as currency
from cbpos.mod.currency.models.currency import Currency
class CurrencyConfigPage(QtGui.QWidget):
label = 'Currency'
def __init__(self):
super(CurrencyConfigPage, self).__init__()
... | <commit_before>from PySide import QtGui
import cbpos
from cbpos.mod.currency.models.currency import Currency
class CurrencyConfigPage(QtGui.QWidget):
label = 'Currency'
def __init__(self):
super(CurrencyConfigPage, self).__init__()
self.default = QtGui.QComboBox()
... | from PySide import QtGui
import cbpos
import cbpos.mod.currency.controllers as currency
from cbpos.mod.currency.models.currency import Currency
class CurrencyConfigPage(QtGui.QWidget):
label = 'Currency'
def __init__(self):
super(CurrencyConfigPage, self).__init__()
... | from PySide import QtGui
import cbpos
from cbpos.mod.currency.models.currency import Currency
class CurrencyConfigPage(QtGui.QWidget):
label = 'Currency'
def __init__(self):
super(CurrencyConfigPage, self).__init__()
self.default = QtGui.QComboBox()
... | <commit_before>from PySide import QtGui
import cbpos
from cbpos.mod.currency.models.currency import Currency
class CurrencyConfigPage(QtGui.QWidget):
label = 'Currency'
def __init__(self):
super(CurrencyConfigPage, self).__init__()
self.default = QtGui.QComboBox()
... |
2c2eac755245562446161e355d3436d6e662147c | notification/backends/email.py | notification/backends/email.py | from django.conf import settings
from django.core.mail import EmailMessage
from notification.backends.base import NotificationBackend
class EmailBackend(NotificationBackend):
sensitivity = 2
slug = u'email'
display_name = u'E-mail'
formats = ['short.txt', 'full.txt']
def email_for_user(self, rec... | from django.conf import settings
from django.core.mail import EmailMessage
from notification.backends.base import NotificationBackend
class EmailBackend(NotificationBackend):
sensitivity = 3
slug = u'email'
display_name = u'E-mail'
formats = ['short.txt', 'full.txt']
def email_for_user(self, rec... | Set notification.backends.EmailBackend.sensitivity = 3, so that it has a different sensitivity from the WebBackend | Set notification.backends.EmailBackend.sensitivity = 3, so that it has a different sensitivity from the WebBackend
| Python | mit | theatlantic/django-notification,theatlantic/django-notification | from django.conf import settings
from django.core.mail import EmailMessage
from notification.backends.base import NotificationBackend
class EmailBackend(NotificationBackend):
sensitivity = 2
slug = u'email'
display_name = u'E-mail'
formats = ['short.txt', 'full.txt']
def email_for_user(self, rec... | from django.conf import settings
from django.core.mail import EmailMessage
from notification.backends.base import NotificationBackend
class EmailBackend(NotificationBackend):
sensitivity = 3
slug = u'email'
display_name = u'E-mail'
formats = ['short.txt', 'full.txt']
def email_for_user(self, rec... | <commit_before>from django.conf import settings
from django.core.mail import EmailMessage
from notification.backends.base import NotificationBackend
class EmailBackend(NotificationBackend):
sensitivity = 2
slug = u'email'
display_name = u'E-mail'
formats = ['short.txt', 'full.txt']
def email_for... | from django.conf import settings
from django.core.mail import EmailMessage
from notification.backends.base import NotificationBackend
class EmailBackend(NotificationBackend):
sensitivity = 3
slug = u'email'
display_name = u'E-mail'
formats = ['short.txt', 'full.txt']
def email_for_user(self, rec... | from django.conf import settings
from django.core.mail import EmailMessage
from notification.backends.base import NotificationBackend
class EmailBackend(NotificationBackend):
sensitivity = 2
slug = u'email'
display_name = u'E-mail'
formats = ['short.txt', 'full.txt']
def email_for_user(self, rec... | <commit_before>from django.conf import settings
from django.core.mail import EmailMessage
from notification.backends.base import NotificationBackend
class EmailBackend(NotificationBackend):
sensitivity = 2
slug = u'email'
display_name = u'E-mail'
formats = ['short.txt', 'full.txt']
def email_for... |
85faea2a9185924d1255e84aad1489f7e3627d13 | django_lightweight_queue/utils.py | django_lightweight_queue/utils.py | from django.db import models
from django.conf import settings
from django.utils.importlib import import_module
from django.core.exceptions import MiddlewareNotUsed
from django.utils.functional import memoize
from django.utils.module_loading import module_has_submodule
from . import app_settings
def get_path(path):
... | from django.db import models
from django.conf import settings
from django.utils.importlib import import_module
from django.core.exceptions import MiddlewareNotUsed
from django.utils.functional import memoize
from django.utils.module_loading import module_has_submodule
from . import app_settings
def get_path(path):
... | Add setproctitle wrapper so it's optional. | Add setproctitle wrapper so it's optional.
Signed-off-by: Chris Lamb <[email protected]>
| Python | bsd-3-clause | prophile/django-lightweight-queue,prophile/django-lightweight-queue,thread/django-lightweight-queue,lamby/django-lightweight-queue,thread/django-lightweight-queue | from django.db import models
from django.conf import settings
from django.utils.importlib import import_module
from django.core.exceptions import MiddlewareNotUsed
from django.utils.functional import memoize
from django.utils.module_loading import module_has_submodule
from . import app_settings
def get_path(path):
... | from django.db import models
from django.conf import settings
from django.utils.importlib import import_module
from django.core.exceptions import MiddlewareNotUsed
from django.utils.functional import memoize
from django.utils.module_loading import module_has_submodule
from . import app_settings
def get_path(path):
... | <commit_before>from django.db import models
from django.conf import settings
from django.utils.importlib import import_module
from django.core.exceptions import MiddlewareNotUsed
from django.utils.functional import memoize
from django.utils.module_loading import module_has_submodule
from . import app_settings
def get... | from django.db import models
from django.conf import settings
from django.utils.importlib import import_module
from django.core.exceptions import MiddlewareNotUsed
from django.utils.functional import memoize
from django.utils.module_loading import module_has_submodule
from . import app_settings
def get_path(path):
... | from django.db import models
from django.conf import settings
from django.utils.importlib import import_module
from django.core.exceptions import MiddlewareNotUsed
from django.utils.functional import memoize
from django.utils.module_loading import module_has_submodule
from . import app_settings
def get_path(path):
... | <commit_before>from django.db import models
from django.conf import settings
from django.utils.importlib import import_module
from django.core.exceptions import MiddlewareNotUsed
from django.utils.functional import memoize
from django.utils.module_loading import module_has_submodule
from . import app_settings
def get... |
694079aa480072e97043f968547941404f303c75 | array/quick-sort.py | array/quick-sort.py | # Sort list using recursion
def quick_sort(lst):
if len(lst) == 0:
print []
left = []
right = []
pivot = lst[0]
# compare first element in list to the rest
for i in range(1, len(lst)):
if lst[i] < pivot:
left.append(lst[i])
else:
right.append(lst[i])
| # Sort list using recursion
def quick_sort(lst):
if len(lst) == 0:
print []
left = []
right = []
pivot = lst[0]
# compare first element in list to the rest
for i in range(1, len(lst)):
if lst[i] < pivot:
left.append(lst[i])
else:
right.append(lst[i])
# recursion
print quick_sort(left) + pivot + ... | Apply recursion to quick sort | Apply recursion to quick sort
| Python | mit | derekmpham/interview-prep,derekmpham/interview-prep | # Sort list using recursion
def quick_sort(lst):
if len(lst) == 0:
print []
left = []
right = []
pivot = lst[0]
# compare first element in list to the rest
for i in range(1, len(lst)):
if lst[i] < pivot:
left.append(lst[i])
else:
right.append(lst[i])
Apply recursion to quick sort | # Sort list using recursion
def quick_sort(lst):
if len(lst) == 0:
print []
left = []
right = []
pivot = lst[0]
# compare first element in list to the rest
for i in range(1, len(lst)):
if lst[i] < pivot:
left.append(lst[i])
else:
right.append(lst[i])
# recursion
print quick_sort(left) + pivot + ... | <commit_before># Sort list using recursion
def quick_sort(lst):
if len(lst) == 0:
print []
left = []
right = []
pivot = lst[0]
# compare first element in list to the rest
for i in range(1, len(lst)):
if lst[i] < pivot:
left.append(lst[i])
else:
right.append(lst[i])
<commit_msg>Apply recursion to ... | # Sort list using recursion
def quick_sort(lst):
if len(lst) == 0:
print []
left = []
right = []
pivot = lst[0]
# compare first element in list to the rest
for i in range(1, len(lst)):
if lst[i] < pivot:
left.append(lst[i])
else:
right.append(lst[i])
# recursion
print quick_sort(left) + pivot + ... | # Sort list using recursion
def quick_sort(lst):
if len(lst) == 0:
print []
left = []
right = []
pivot = lst[0]
# compare first element in list to the rest
for i in range(1, len(lst)):
if lst[i] < pivot:
left.append(lst[i])
else:
right.append(lst[i])
Apply recursion to quick sort# Sort list using... | <commit_before># Sort list using recursion
def quick_sort(lst):
if len(lst) == 0:
print []
left = []
right = []
pivot = lst[0]
# compare first element in list to the rest
for i in range(1, len(lst)):
if lst[i] < pivot:
left.append(lst[i])
else:
right.append(lst[i])
<commit_msg>Apply recursion to ... |
5345cfddc24303a7d27b61865306775f93bb908c | django_lightweight_queue/utils.py | django_lightweight_queue/utils.py | from django.utils.importlib import import_module
from django.core.exceptions import MiddlewareNotUsed
from django.utils.functional import memoize
from . import app_settings
def get_path(path):
module_name, attr = path.rsplit('.', 1)
module = import_module(module_name)
return getattr(module, attr)
def g... | from django.db.models import get_apps
from django.core.exceptions import MiddlewareNotUsed
from django.utils.importlib import import_module
from django.utils.functional import memoize
from django.utils.module_loading import module_has_submodule
from . import app_settings
def get_path(path):
module_name, attr = pa... | Add utility to import all submodules of all apps. | Add utility to import all submodules of all apps.
Signed-off-by: Chris Lamb <[email protected]>
| Python | bsd-3-clause | thread/django-lightweight-queue,thread/django-lightweight-queue,prophile/django-lightweight-queue,prophile/django-lightweight-queue,lamby/django-lightweight-queue | from django.utils.importlib import import_module
from django.core.exceptions import MiddlewareNotUsed
from django.utils.functional import memoize
from . import app_settings
def get_path(path):
module_name, attr = path.rsplit('.', 1)
module = import_module(module_name)
return getattr(module, attr)
def g... | from django.db.models import get_apps
from django.core.exceptions import MiddlewareNotUsed
from django.utils.importlib import import_module
from django.utils.functional import memoize
from django.utils.module_loading import module_has_submodule
from . import app_settings
def get_path(path):
module_name, attr = pa... | <commit_before>from django.utils.importlib import import_module
from django.core.exceptions import MiddlewareNotUsed
from django.utils.functional import memoize
from . import app_settings
def get_path(path):
module_name, attr = path.rsplit('.', 1)
module = import_module(module_name)
return getattr(modul... | from django.db.models import get_apps
from django.core.exceptions import MiddlewareNotUsed
from django.utils.importlib import import_module
from django.utils.functional import memoize
from django.utils.module_loading import module_has_submodule
from . import app_settings
def get_path(path):
module_name, attr = pa... | from django.utils.importlib import import_module
from django.core.exceptions import MiddlewareNotUsed
from django.utils.functional import memoize
from . import app_settings
def get_path(path):
module_name, attr = path.rsplit('.', 1)
module = import_module(module_name)
return getattr(module, attr)
def g... | <commit_before>from django.utils.importlib import import_module
from django.core.exceptions import MiddlewareNotUsed
from django.utils.functional import memoize
from . import app_settings
def get_path(path):
module_name, attr = path.rsplit('.', 1)
module = import_module(module_name)
return getattr(modul... |
5853c4449ff3e2ac04e96ab8c601609b4b24f267 | flaskapp.py | flaskapp.py | import io
import dont_tread_on_memes
import flask
app = flask.Flask(__name__)
@app.route("/", defaults={"caption": "tread on"})
@app.route("/<caption>/")
def main(caption):
flag = dont_tread_on_memes.dont_me(caption)
data = io.BytesIO()
flag.save(data, "PNG")
data.seek(0)
return flask.send_file... | import io
import dont_tread_on_memes
import flask
app = flask.Flask(__name__)
@app.route("/", defaults={"caption": "tread on"})
@app.route("/<caption>/")
def main(caption):
# Color argument
color = flask.request.args.get("color")
if color is None:
color = "black"
# Allow disabling of forma... | Implement some URL parameter options | Implement some URL parameter options
| Python | mit | controversial/dont-tread-on-memes | import io
import dont_tread_on_memes
import flask
app = flask.Flask(__name__)
@app.route("/", defaults={"caption": "tread on"})
@app.route("/<caption>/")
def main(caption):
flag = dont_tread_on_memes.dont_me(caption)
data = io.BytesIO()
flag.save(data, "PNG")
data.seek(0)
return flask.send_file... | import io
import dont_tread_on_memes
import flask
app = flask.Flask(__name__)
@app.route("/", defaults={"caption": "tread on"})
@app.route("/<caption>/")
def main(caption):
# Color argument
color = flask.request.args.get("color")
if color is None:
color = "black"
# Allow disabling of forma... | <commit_before>import io
import dont_tread_on_memes
import flask
app = flask.Flask(__name__)
@app.route("/", defaults={"caption": "tread on"})
@app.route("/<caption>/")
def main(caption):
flag = dont_tread_on_memes.dont_me(caption)
data = io.BytesIO()
flag.save(data, "PNG")
data.seek(0)
return ... | import io
import dont_tread_on_memes
import flask
app = flask.Flask(__name__)
@app.route("/", defaults={"caption": "tread on"})
@app.route("/<caption>/")
def main(caption):
# Color argument
color = flask.request.args.get("color")
if color is None:
color = "black"
# Allow disabling of forma... | import io
import dont_tread_on_memes
import flask
app = flask.Flask(__name__)
@app.route("/", defaults={"caption": "tread on"})
@app.route("/<caption>/")
def main(caption):
flag = dont_tread_on_memes.dont_me(caption)
data = io.BytesIO()
flag.save(data, "PNG")
data.seek(0)
return flask.send_file... | <commit_before>import io
import dont_tread_on_memes
import flask
app = flask.Flask(__name__)
@app.route("/", defaults={"caption": "tread on"})
@app.route("/<caption>/")
def main(caption):
flag = dont_tread_on_memes.dont_me(caption)
data = io.BytesIO()
flag.save(data, "PNG")
data.seek(0)
return ... |
f225ffecf061470b877388d26c1605248b9611da | ygorcam.py | ygorcam.py | #!/usr/bin/env python
import tempfile
import subprocess
import web
urls = ("/camera", "Camera")
app = web.application(urls, globals())
class Camera(object):
def GET(self):
with tempfile.NamedTemporaryFile(suffix=".jpg") as tfp:
process = subprocess.Popen(["picamera", "-o", tfp.name])
... | #!/usr/bin/env python
import tempfile
import subprocess
import web
urls = ("/camera", "Camera")
app = web.application(urls, globals())
class Camera(object):
def GET(self):
with tempfile.NamedTemporaryFile(suffix=".jpg") as tfp:
process = subprocess.Popen(["raspistill", "-o", tfp.name])
... | Use raspistill and provide some additional error info | Use raspistill and provide some additional error info
| Python | mit | f0rk/ygorcam | #!/usr/bin/env python
import tempfile
import subprocess
import web
urls = ("/camera", "Camera")
app = web.application(urls, globals())
class Camera(object):
def GET(self):
with tempfile.NamedTemporaryFile(suffix=".jpg") as tfp:
process = subprocess.Popen(["picamera", "-o", tfp.name])
... | #!/usr/bin/env python
import tempfile
import subprocess
import web
urls = ("/camera", "Camera")
app = web.application(urls, globals())
class Camera(object):
def GET(self):
with tempfile.NamedTemporaryFile(suffix=".jpg") as tfp:
process = subprocess.Popen(["raspistill", "-o", tfp.name])
... | <commit_before>#!/usr/bin/env python
import tempfile
import subprocess
import web
urls = ("/camera", "Camera")
app = web.application(urls, globals())
class Camera(object):
def GET(self):
with tempfile.NamedTemporaryFile(suffix=".jpg") as tfp:
process = subprocess.Popen(["picamera", "-o", tf... | #!/usr/bin/env python
import tempfile
import subprocess
import web
urls = ("/camera", "Camera")
app = web.application(urls, globals())
class Camera(object):
def GET(self):
with tempfile.NamedTemporaryFile(suffix=".jpg") as tfp:
process = subprocess.Popen(["raspistill", "-o", tfp.name])
... | #!/usr/bin/env python
import tempfile
import subprocess
import web
urls = ("/camera", "Camera")
app = web.application(urls, globals())
class Camera(object):
def GET(self):
with tempfile.NamedTemporaryFile(suffix=".jpg") as tfp:
process = subprocess.Popen(["picamera", "-o", tfp.name])
... | <commit_before>#!/usr/bin/env python
import tempfile
import subprocess
import web
urls = ("/camera", "Camera")
app = web.application(urls, globals())
class Camera(object):
def GET(self):
with tempfile.NamedTemporaryFile(suffix=".jpg") as tfp:
process = subprocess.Popen(["picamera", "-o", tf... |
7a290359a0800c8f94da2b3f74dcb7153c4c27ed | nomnom/tests/functional_tests.py | nomnom/tests/functional_tests.py | from django_webtest import WebTest
from bs4 import BeautifulSoup
from django.contrib.admin.models import User
class NomnomTest(WebTest):
fixtures = ['users.json',]
def test_can_access_nomnom(self):
# An administrator visits the admin site
response = self.app.get('/admin/')
soup = Beaut... | from django_webtest import WebTest
from bs4 import BeautifulSoup
from django.contrib.admin.models import User
class NomnomTest(WebTest):
fixtures = ['users.json',]
def test_can_access_nomnom(self):
# An administrator visits the admin site
response = self.app.get('/admin/')
soup = Beaut... | Correct button text in functional test | Correct button text in functional test
| Python | mit | storyandstructure/django-nomnom | from django_webtest import WebTest
from bs4 import BeautifulSoup
from django.contrib.admin.models import User
class NomnomTest(WebTest):
fixtures = ['users.json',]
def test_can_access_nomnom(self):
# An administrator visits the admin site
response = self.app.get('/admin/')
soup = Beaut... | from django_webtest import WebTest
from bs4 import BeautifulSoup
from django.contrib.admin.models import User
class NomnomTest(WebTest):
fixtures = ['users.json',]
def test_can_access_nomnom(self):
# An administrator visits the admin site
response = self.app.get('/admin/')
soup = Beaut... | <commit_before>from django_webtest import WebTest
from bs4 import BeautifulSoup
from django.contrib.admin.models import User
class NomnomTest(WebTest):
fixtures = ['users.json',]
def test_can_access_nomnom(self):
# An administrator visits the admin site
response = self.app.get('/admin/')
... | from django_webtest import WebTest
from bs4 import BeautifulSoup
from django.contrib.admin.models import User
class NomnomTest(WebTest):
fixtures = ['users.json',]
def test_can_access_nomnom(self):
# An administrator visits the admin site
response = self.app.get('/admin/')
soup = Beaut... | from django_webtest import WebTest
from bs4 import BeautifulSoup
from django.contrib.admin.models import User
class NomnomTest(WebTest):
fixtures = ['users.json',]
def test_can_access_nomnom(self):
# An administrator visits the admin site
response = self.app.get('/admin/')
soup = Beaut... | <commit_before>from django_webtest import WebTest
from bs4 import BeautifulSoup
from django.contrib.admin.models import User
class NomnomTest(WebTest):
fixtures = ['users.json',]
def test_can_access_nomnom(self):
# An administrator visits the admin site
response = self.app.get('/admin/')
... |
cc62a1eea746a7191b4a07a48dcf55f4c76787ee | asyncpg/__init__.py | asyncpg/__init__.py | import asyncio
from .protocol import Protocol
__all__ = ('connect',)
class Connection:
def __init__(self, protocol, transport, loop):
self._protocol = protocol
self._transport = transport
self._loop = loop
def get_settings(self):
return self._protocol.get_settings()
as... | import asyncio
from .protocol import Protocol
__all__ = ('connect',)
class Connection:
def __init__(self, protocol, transport, loop):
self._protocol = protocol
self._transport = transport
self._loop = loop
def get_settings(self):
return self._protocol.get_settings()
as... | Use loop.create_future if it exists | Use loop.create_future if it exists
| Python | apache-2.0 | MagicStack/asyncpg,MagicStack/asyncpg | import asyncio
from .protocol import Protocol
__all__ = ('connect',)
class Connection:
def __init__(self, protocol, transport, loop):
self._protocol = protocol
self._transport = transport
self._loop = loop
def get_settings(self):
return self._protocol.get_settings()
as... | import asyncio
from .protocol import Protocol
__all__ = ('connect',)
class Connection:
def __init__(self, protocol, transport, loop):
self._protocol = protocol
self._transport = transport
self._loop = loop
def get_settings(self):
return self._protocol.get_settings()
as... | <commit_before>import asyncio
from .protocol import Protocol
__all__ = ('connect',)
class Connection:
def __init__(self, protocol, transport, loop):
self._protocol = protocol
self._transport = transport
self._loop = loop
def get_settings(self):
return self._protocol.get_set... | import asyncio
from .protocol import Protocol
__all__ = ('connect',)
class Connection:
def __init__(self, protocol, transport, loop):
self._protocol = protocol
self._transport = transport
self._loop = loop
def get_settings(self):
return self._protocol.get_settings()
as... | import asyncio
from .protocol import Protocol
__all__ = ('connect',)
class Connection:
def __init__(self, protocol, transport, loop):
self._protocol = protocol
self._transport = transport
self._loop = loop
def get_settings(self):
return self._protocol.get_settings()
as... | <commit_before>import asyncio
from .protocol import Protocol
__all__ = ('connect',)
class Connection:
def __init__(self, protocol, transport, loop):
self._protocol = protocol
self._transport = transport
self._loop = loop
def get_settings(self):
return self._protocol.get_set... |
2b5d5d7f551d36af457ef357004dba2484e51572 | spec_cleaner/rpmbuild.py | spec_cleaner/rpmbuild.py | # vim: set ts=4 sw=4 et: coding=UTF-8
# We basically extend rpmcheck
from .rpmcheck import RpmCheck
class RpmBuild(RpmCheck):
"""
Replace various troublemakers in build phase
"""
def add(self, line):
# if user uses cmake directly just recommend him using the macros
if line.starts... | # vim: set ts=4 sw=4 et: coding=UTF-8
# We basically extend rpmcheck
from .rpmcheck import RpmCheck
class RpmBuild(RpmCheck):
"""
Replace various troublemakers in build phase
"""
def add(self, line):
# if user uses cmake directly just recommend him using the macros
if line.starts... | Fix repetitive adding of cmake macro recommendation | Fix repetitive adding of cmake macro recommendation
| Python | bsd-3-clause | plusky/spec-cleaner,plusky/spec-cleaner,plusky/spec-cleaner,plusky/spec-cleaner,pombredanne/spec-cleaner,pombredanne/spec-cleaner,plusky/spec-cleaner | # vim: set ts=4 sw=4 et: coding=UTF-8
# We basically extend rpmcheck
from .rpmcheck import RpmCheck
class RpmBuild(RpmCheck):
"""
Replace various troublemakers in build phase
"""
def add(self, line):
# if user uses cmake directly just recommend him using the macros
if line.starts... | # vim: set ts=4 sw=4 et: coding=UTF-8
# We basically extend rpmcheck
from .rpmcheck import RpmCheck
class RpmBuild(RpmCheck):
"""
Replace various troublemakers in build phase
"""
def add(self, line):
# if user uses cmake directly just recommend him using the macros
if line.starts... | <commit_before># vim: set ts=4 sw=4 et: coding=UTF-8
# We basically extend rpmcheck
from .rpmcheck import RpmCheck
class RpmBuild(RpmCheck):
"""
Replace various troublemakers in build phase
"""
def add(self, line):
# if user uses cmake directly just recommend him using the macros
... | # vim: set ts=4 sw=4 et: coding=UTF-8
# We basically extend rpmcheck
from .rpmcheck import RpmCheck
class RpmBuild(RpmCheck):
"""
Replace various troublemakers in build phase
"""
def add(self, line):
# if user uses cmake directly just recommend him using the macros
if line.starts... | # vim: set ts=4 sw=4 et: coding=UTF-8
# We basically extend rpmcheck
from .rpmcheck import RpmCheck
class RpmBuild(RpmCheck):
"""
Replace various troublemakers in build phase
"""
def add(self, line):
# if user uses cmake directly just recommend him using the macros
if line.starts... | <commit_before># vim: set ts=4 sw=4 et: coding=UTF-8
# We basically extend rpmcheck
from .rpmcheck import RpmCheck
class RpmBuild(RpmCheck):
"""
Replace various troublemakers in build phase
"""
def add(self, line):
# if user uses cmake directly just recommend him using the macros
... |
64b4c9e44c5305801f45e23efd2bc0843588afef | src/sentry/api/endpoints/organization_projects.py | src/sentry/api/endpoints/organization_projects.py | from __future__ import absolute_import
from rest_framework.response import Response
from sentry.api.bases.organization import OrganizationEndpoint
from sentry.api.permissions import assert_perm
from sentry.api.serializers import serialize
from sentry.models import Project, Team
class OrganizationProjectsEndpoint(Or... | from __future__ import absolute_import
from rest_framework.response import Response
from sentry.api.base import DocSection
from sentry.api.bases.organization import OrganizationEndpoint
from sentry.api.permissions import assert_perm
from sentry.api.serializers import serialize
from sentry.models import Project, Team
... | Add organization projects to docs | Add organization projects to docs
| Python | bsd-3-clause | ngonzalvez/sentry,argonemyth/sentry,imankulov/sentry,wujuguang/sentry,JackDanger/sentry,llonchj/sentry,BayanGroup/sentry,felixbuenemann/sentry,ifduyue/sentry,gencer/sentry,jean/sentry,gencer/sentry,gencer/sentry,jean/sentry,1tush/sentry,wujuguang/sentry,BuildingLink/sentry,imankulov/sentry,kevinastone/sentry,looker/sen... | from __future__ import absolute_import
from rest_framework.response import Response
from sentry.api.bases.organization import OrganizationEndpoint
from sentry.api.permissions import assert_perm
from sentry.api.serializers import serialize
from sentry.models import Project, Team
class OrganizationProjectsEndpoint(Or... | from __future__ import absolute_import
from rest_framework.response import Response
from sentry.api.base import DocSection
from sentry.api.bases.organization import OrganizationEndpoint
from sentry.api.permissions import assert_perm
from sentry.api.serializers import serialize
from sentry.models import Project, Team
... | <commit_before>from __future__ import absolute_import
from rest_framework.response import Response
from sentry.api.bases.organization import OrganizationEndpoint
from sentry.api.permissions import assert_perm
from sentry.api.serializers import serialize
from sentry.models import Project, Team
class OrganizationProj... | from __future__ import absolute_import
from rest_framework.response import Response
from sentry.api.base import DocSection
from sentry.api.bases.organization import OrganizationEndpoint
from sentry.api.permissions import assert_perm
from sentry.api.serializers import serialize
from sentry.models import Project, Team
... | from __future__ import absolute_import
from rest_framework.response import Response
from sentry.api.bases.organization import OrganizationEndpoint
from sentry.api.permissions import assert_perm
from sentry.api.serializers import serialize
from sentry.models import Project, Team
class OrganizationProjectsEndpoint(Or... | <commit_before>from __future__ import absolute_import
from rest_framework.response import Response
from sentry.api.bases.organization import OrganizationEndpoint
from sentry.api.permissions import assert_perm
from sentry.api.serializers import serialize
from sentry.models import Project, Team
class OrganizationProj... |
1596e1cdd1a9907c6efa29e89b68f57e21b2fc01 | ibmcnx/doc/DataSources.py | ibmcnx/doc/DataSources.py | ######
# Check ExId (GUID) by Email through JDBC
#
# Author: Christoph Stoettner
# Mail: [email protected]
# Documentation: http://scripting101.stoeps.de
#
# Version: 2.0
# Date: 2014-06-04
#
# License: Apache 2.0
#
# Check ExId of a User in all Connections Appli... | ######
# Check ExId (GUID) by Email through JDBC
#
# Author: Christoph Stoettner
# Mail: [email protected]
# Documentation: http://scripting101.stoeps.de
#
# Version: 2.0
# Date: 2014-06-04
#
# License: Apache 2.0
#
# Check ExId of a User in all Connections Appli... | Create documentation of DataSource Settings | : Create documentation of DataSource Settings
Task-Url: | Python | apache-2.0 | stoeps13/ibmcnx2,stoeps13/ibmcnx2 | ######
# Check ExId (GUID) by Email through JDBC
#
# Author: Christoph Stoettner
# Mail: [email protected]
# Documentation: http://scripting101.stoeps.de
#
# Version: 2.0
# Date: 2014-06-04
#
# License: Apache 2.0
#
# Check ExId of a User in all Connections Appli... | ######
# Check ExId (GUID) by Email through JDBC
#
# Author: Christoph Stoettner
# Mail: [email protected]
# Documentation: http://scripting101.stoeps.de
#
# Version: 2.0
# Date: 2014-06-04
#
# License: Apache 2.0
#
# Check ExId of a User in all Connections Appli... | <commit_before>######
# Check ExId (GUID) by Email through JDBC
#
# Author: Christoph Stoettner
# Mail: [email protected]
# Documentation: http://scripting101.stoeps.de
#
# Version: 2.0
# Date: 2014-06-04
#
# License: Apache 2.0
#
# Check ExId of a User in all Co... | ######
# Check ExId (GUID) by Email through JDBC
#
# Author: Christoph Stoettner
# Mail: [email protected]
# Documentation: http://scripting101.stoeps.de
#
# Version: 2.0
# Date: 2014-06-04
#
# License: Apache 2.0
#
# Check ExId of a User in all Connections Appli... | ######
# Check ExId (GUID) by Email through JDBC
#
# Author: Christoph Stoettner
# Mail: [email protected]
# Documentation: http://scripting101.stoeps.de
#
# Version: 2.0
# Date: 2014-06-04
#
# License: Apache 2.0
#
# Check ExId of a User in all Connections Appli... | <commit_before>######
# Check ExId (GUID) by Email through JDBC
#
# Author: Christoph Stoettner
# Mail: [email protected]
# Documentation: http://scripting101.stoeps.de
#
# Version: 2.0
# Date: 2014-06-04
#
# License: Apache 2.0
#
# Check ExId of a User in all Co... |
ab8abaf874613a6d31ee0dad77f18e2cfc18db41 | docs/conf.py | docs/conf.py | from datetime import date
import guzzle_sphinx_theme
from pyinfra import __version__
copyright = 'Nick Barrett {0} — pyinfra v{1}'.format(
date.today().year,
__version__,
)
extensions = [
# Official
'sphinx.ext.autodoc',
'sphinx.ext.napoleon',
]
extensions.append('guzzle_sphinx_theme')
source... | from datetime import date
import guzzle_sphinx_theme
from pyinfra import __version__
copyright = 'Nick Barrett {0} — pyinfra v{1}'.format(
date.today().year,
__version__,
)
extensions = [
# Official
'sphinx.ext.autodoc',
'sphinx.ext.napoleon',
'sphinx.ext.autosectionlabel',
]
autosectionlab... | Add sphinx autosection label plugin. | Add sphinx autosection label plugin.
| Python | mit | Fizzadar/pyinfra,Fizzadar/pyinfra | from datetime import date
import guzzle_sphinx_theme
from pyinfra import __version__
copyright = 'Nick Barrett {0} — pyinfra v{1}'.format(
date.today().year,
__version__,
)
extensions = [
# Official
'sphinx.ext.autodoc',
'sphinx.ext.napoleon',
]
extensions.append('guzzle_sphinx_theme')
source... | from datetime import date
import guzzle_sphinx_theme
from pyinfra import __version__
copyright = 'Nick Barrett {0} — pyinfra v{1}'.format(
date.today().year,
__version__,
)
extensions = [
# Official
'sphinx.ext.autodoc',
'sphinx.ext.napoleon',
'sphinx.ext.autosectionlabel',
]
autosectionlab... | <commit_before>from datetime import date
import guzzle_sphinx_theme
from pyinfra import __version__
copyright = 'Nick Barrett {0} — pyinfra v{1}'.format(
date.today().year,
__version__,
)
extensions = [
# Official
'sphinx.ext.autodoc',
'sphinx.ext.napoleon',
]
extensions.append('guzzle_sphinx_... | from datetime import date
import guzzle_sphinx_theme
from pyinfra import __version__
copyright = 'Nick Barrett {0} — pyinfra v{1}'.format(
date.today().year,
__version__,
)
extensions = [
# Official
'sphinx.ext.autodoc',
'sphinx.ext.napoleon',
'sphinx.ext.autosectionlabel',
]
autosectionlab... | from datetime import date
import guzzle_sphinx_theme
from pyinfra import __version__
copyright = 'Nick Barrett {0} — pyinfra v{1}'.format(
date.today().year,
__version__,
)
extensions = [
# Official
'sphinx.ext.autodoc',
'sphinx.ext.napoleon',
]
extensions.append('guzzle_sphinx_theme')
source... | <commit_before>from datetime import date
import guzzle_sphinx_theme
from pyinfra import __version__
copyright = 'Nick Barrett {0} — pyinfra v{1}'.format(
date.today().year,
__version__,
)
extensions = [
# Official
'sphinx.ext.autodoc',
'sphinx.ext.napoleon',
]
extensions.append('guzzle_sphinx_... |
44297159b6539987ed8fcdb50cd5b3e367a9cdc2 | db/sql_server/pyodbc.py | db/sql_server/pyodbc.py | from django.db import connection
from django.db.models.fields import *
from south.db import generic
class DatabaseOperations(generic.DatabaseOperations):
"""
django-pyodbc (sql_server.pyodbc) implementation of database operations.
"""
def create_table(self, table_name, fields):
# Tweak stuff a... | from django.db import connection
from django.db.models.fields import *
from south.db import generic
class DatabaseOperations(generic.DatabaseOperations):
"""
django-pyodbc (sql_server.pyodbc) implementation of database operations.
"""
add_column_string = 'ALTER TABLE %s ADD %s;'
def create_ta... | Add column support for sql server | Add column support for sql server
| Python | apache-2.0 | smartfile/django-south,smartfile/django-south | from django.db import connection
from django.db.models.fields import *
from south.db import generic
class DatabaseOperations(generic.DatabaseOperations):
"""
django-pyodbc (sql_server.pyodbc) implementation of database operations.
"""
def create_table(self, table_name, fields):
# Tweak stuff a... | from django.db import connection
from django.db.models.fields import *
from south.db import generic
class DatabaseOperations(generic.DatabaseOperations):
"""
django-pyodbc (sql_server.pyodbc) implementation of database operations.
"""
add_column_string = 'ALTER TABLE %s ADD %s;'
def create_ta... | <commit_before>from django.db import connection
from django.db.models.fields import *
from south.db import generic
class DatabaseOperations(generic.DatabaseOperations):
"""
django-pyodbc (sql_server.pyodbc) implementation of database operations.
"""
def create_table(self, table_name, fields):
... | from django.db import connection
from django.db.models.fields import *
from south.db import generic
class DatabaseOperations(generic.DatabaseOperations):
"""
django-pyodbc (sql_server.pyodbc) implementation of database operations.
"""
add_column_string = 'ALTER TABLE %s ADD %s;'
def create_ta... | from django.db import connection
from django.db.models.fields import *
from south.db import generic
class DatabaseOperations(generic.DatabaseOperations):
"""
django-pyodbc (sql_server.pyodbc) implementation of database operations.
"""
def create_table(self, table_name, fields):
# Tweak stuff a... | <commit_before>from django.db import connection
from django.db.models.fields import *
from south.db import generic
class DatabaseOperations(generic.DatabaseOperations):
"""
django-pyodbc (sql_server.pyodbc) implementation of database operations.
"""
def create_table(self, table_name, fields):
... |
a0d0d1312d95e1d6df2b8463b9df3ff4178c2802 | setup.py | setup.py | from distutils.core import setup
import glob,re
config_files = glob.glob('config/*.ini')
def get_version():
"""
Gets version from osg-configure script file
"""
buffer = open('scripts/osg-configure').read()
match = re.search("VERSION\s+=\s+'(.*)'", buffer)
return match.group(1)
setup(name='osg-configur... | from distutils.core import setup
import glob,re, os
config_files = glob.glob('config/*.ini')
def get_version():
"""
Gets version from osg-configure script file
"""
buffer = open('scripts/osg-configure').read()
match = re.search("VERSION\s+=\s+'(.*)'", buffer)
return match.group(1)
def get_test_files()... | Include test files when packaging osg-configure | Include test files when packaging osg-configure
git-svn-id: 8e6470fdf0410dbd375d7ca1c7e7b1f4e5857e13@14556 4e558342-562e-0410-864c-e07659590f8c
| Python | apache-2.0 | opensciencegrid/osg-configure,opensciencegrid/osg-configure,matyasselmeci/osg-configure,matyasselmeci/osg-configure | from distutils.core import setup
import glob,re
config_files = glob.glob('config/*.ini')
def get_version():
"""
Gets version from osg-configure script file
"""
buffer = open('scripts/osg-configure').read()
match = re.search("VERSION\s+=\s+'(.*)'", buffer)
return match.group(1)
setup(name='osg-configur... | from distutils.core import setup
import glob,re, os
config_files = glob.glob('config/*.ini')
def get_version():
"""
Gets version from osg-configure script file
"""
buffer = open('scripts/osg-configure').read()
match = re.search("VERSION\s+=\s+'(.*)'", buffer)
return match.group(1)
def get_test_files()... | <commit_before>from distutils.core import setup
import glob,re
config_files = glob.glob('config/*.ini')
def get_version():
"""
Gets version from osg-configure script file
"""
buffer = open('scripts/osg-configure').read()
match = re.search("VERSION\s+=\s+'(.*)'", buffer)
return match.group(1)
setup(nam... | from distutils.core import setup
import glob,re, os
config_files = glob.glob('config/*.ini')
def get_version():
"""
Gets version from osg-configure script file
"""
buffer = open('scripts/osg-configure').read()
match = re.search("VERSION\s+=\s+'(.*)'", buffer)
return match.group(1)
def get_test_files()... | from distutils.core import setup
import glob,re
config_files = glob.glob('config/*.ini')
def get_version():
"""
Gets version from osg-configure script file
"""
buffer = open('scripts/osg-configure').read()
match = re.search("VERSION\s+=\s+'(.*)'", buffer)
return match.group(1)
setup(name='osg-configur... | <commit_before>from distutils.core import setup
import glob,re
config_files = glob.glob('config/*.ini')
def get_version():
"""
Gets version from osg-configure script file
"""
buffer = open('scripts/osg-configure').read()
match = re.search("VERSION\s+=\s+'(.*)'", buffer)
return match.group(1)
setup(nam... |
52c02ceda3c6430a2f4bbb3f9054180699baaa93 | setup.py | setup.py | # -*- encoding: utf-8 *-*
#!/usr/bin/env python
import sys
from setuptools import setup, Extension
from Cython.Distutils import build_ext
dependencies = ['pycrypto', 'msgpack-python', 'pbkdf2.py', 'xattr', 'paramiko', 'Pyrex', 'Cython']
if sys.version_info < (2, 7):
dependencies.append('argparse')
setup(name='da... | # -*- encoding: utf-8 *-*
#!/usr/bin/env python
import os
import sys
from glob import glob
from setuptools import setup, Extension
from setuptools.command.sdist import sdist
hashindex_sources = ['darc/hashindex.pyx', 'darc/_hashindex.c']
try:
from Cython.Distutils import build_ext
import Cython.Compiler.Main a... | Include Cython output in sdist | Include Cython output in sdist
| Python | bsd-3-clause | ionelmc/borg,pombredanne/attic,edgimar/borg,raxenak/borg,RonnyPfannschmidt/borg,RonnyPfannschmidt/borg,edgimar/borg,mhubig/borg,edgewood/borg,RonnyPfannschmidt/borg,edgewood/borg,raxenak/borg,RonnyPfannschmidt/borg,ionelmc/borg,RonnyPfannschmidt/borg,mhubig/borg,level323/borg,jborg/attic,jborg/attic,mhubig/borg,ionelmc... | # -*- encoding: utf-8 *-*
#!/usr/bin/env python
import sys
from setuptools import setup, Extension
from Cython.Distutils import build_ext
dependencies = ['pycrypto', 'msgpack-python', 'pbkdf2.py', 'xattr', 'paramiko', 'Pyrex', 'Cython']
if sys.version_info < (2, 7):
dependencies.append('argparse')
setup(name='da... | # -*- encoding: utf-8 *-*
#!/usr/bin/env python
import os
import sys
from glob import glob
from setuptools import setup, Extension
from setuptools.command.sdist import sdist
hashindex_sources = ['darc/hashindex.pyx', 'darc/_hashindex.c']
try:
from Cython.Distutils import build_ext
import Cython.Compiler.Main a... | <commit_before># -*- encoding: utf-8 *-*
#!/usr/bin/env python
import sys
from setuptools import setup, Extension
from Cython.Distutils import build_ext
dependencies = ['pycrypto', 'msgpack-python', 'pbkdf2.py', 'xattr', 'paramiko', 'Pyrex', 'Cython']
if sys.version_info < (2, 7):
dependencies.append('argparse')
... | # -*- encoding: utf-8 *-*
#!/usr/bin/env python
import os
import sys
from glob import glob
from setuptools import setup, Extension
from setuptools.command.sdist import sdist
hashindex_sources = ['darc/hashindex.pyx', 'darc/_hashindex.c']
try:
from Cython.Distutils import build_ext
import Cython.Compiler.Main a... | # -*- encoding: utf-8 *-*
#!/usr/bin/env python
import sys
from setuptools import setup, Extension
from Cython.Distutils import build_ext
dependencies = ['pycrypto', 'msgpack-python', 'pbkdf2.py', 'xattr', 'paramiko', 'Pyrex', 'Cython']
if sys.version_info < (2, 7):
dependencies.append('argparse')
setup(name='da... | <commit_before># -*- encoding: utf-8 *-*
#!/usr/bin/env python
import sys
from setuptools import setup, Extension
from Cython.Distutils import build_ext
dependencies = ['pycrypto', 'msgpack-python', 'pbkdf2.py', 'xattr', 'paramiko', 'Pyrex', 'Cython']
if sys.version_info < (2, 7):
dependencies.append('argparse')
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.