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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
355b78dfa8be2000a1e3198231088c7b3cec0d18 | alexandria/__init__.py | alexandria/__init__.py | import logging
log = logging.getLogger(__name__)
from pyramid.config import Configurator
from sqlalchemy import engine_from_config
from .models import DBSession
required_settings = [
'pyramid.secret.session',
'pyramid.secret.auth',
]
def main(global_config, **settings):
""" This function... | import logging
log = logging.getLogger(__name__)
from pyramid.config import Configurator
from sqlalchemy import engine_from_config
from .models import DBSession
required_settings = [
'pyramid.secret.session',
'pyramid.secret.auth',
]
def main(global_config, **settings):
""" This function... | Set up the factory for the default route | Set up the factory for the default route
| Python | isc | bertjwregeer/alexandria,bertjwregeer/alexandria,cdunklau/alexandria,cdunklau/alexandria,cdunklau/alexandria | import logging
log = logging.getLogger(__name__)
from pyramid.config import Configurator
from sqlalchemy import engine_from_config
from .models import DBSession
required_settings = [
'pyramid.secret.session',
'pyramid.secret.auth',
]
def main(global_config, **settings):
""" This function... | import logging
log = logging.getLogger(__name__)
from pyramid.config import Configurator
from sqlalchemy import engine_from_config
from .models import DBSession
required_settings = [
'pyramid.secret.session',
'pyramid.secret.auth',
]
def main(global_config, **settings):
""" This function... | <commit_before>import logging
log = logging.getLogger(__name__)
from pyramid.config import Configurator
from sqlalchemy import engine_from_config
from .models import DBSession
required_settings = [
'pyramid.secret.session',
'pyramid.secret.auth',
]
def main(global_config, **settings):
""... | import logging
log = logging.getLogger(__name__)
from pyramid.config import Configurator
from sqlalchemy import engine_from_config
from .models import DBSession
required_settings = [
'pyramid.secret.session',
'pyramid.secret.auth',
]
def main(global_config, **settings):
""" This function... | import logging
log = logging.getLogger(__name__)
from pyramid.config import Configurator
from sqlalchemy import engine_from_config
from .models import DBSession
required_settings = [
'pyramid.secret.session',
'pyramid.secret.auth',
]
def main(global_config, **settings):
""" This function... | <commit_before>import logging
log = logging.getLogger(__name__)
from pyramid.config import Configurator
from sqlalchemy import engine_from_config
from .models import DBSession
required_settings = [
'pyramid.secret.session',
'pyramid.secret.auth',
]
def main(global_config, **settings):
""... |
fb13bc1a5735912b28026a80f7698cb0c299151f | tools/chrome_proxy/integration_tests/chrome_proxy_pagesets/reenable_after_bypass.py | tools/chrome_proxy/integration_tests/chrome_proxy_pagesets/reenable_after_bypass.py | # Copyright 2014 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
from telemetry.page import page as page_module
from telemetry import story
class ReenableAfterBypassPage(page_module.Page):
"""A test page for the re-ena... | # Copyright 2014 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
from telemetry.page import page as page_module
from telemetry import story
class ReenableAfterBypassPage(page_module.Page):
"""A test page for the re-ena... | Add trailing slash to chrome_proxy telemetry test page URL. | Add trailing slash to chrome_proxy telemetry test page URL.
BUG=507797
Review URL: https://codereview.chromium.org/1229563002
Cr-Commit-Position: 972c6d2dc6dd5efdad1377c0d224e03eb8f276f7@{#337895}
| Python | bsd-3-clause | lihui7115/ChromiumGStreamerBackend,ltilve/ChromiumGStreamerBackend,ltilve/ChromiumGStreamerBackend,ltilve/ChromiumGStreamerBackend,ltilve/ChromiumGStreamerBackend,lihui7115/ChromiumGStreamerBackend,CapOM/ChromiumGStreamerBackend,lihui7115/ChromiumGStreamerBackend,lihui7115/ChromiumGStreamerBackend,ltilve/ChromiumGStrea... | # Copyright 2014 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
from telemetry.page import page as page_module
from telemetry import story
class ReenableAfterBypassPage(page_module.Page):
"""A test page for the re-ena... | # Copyright 2014 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
from telemetry.page import page as page_module
from telemetry import story
class ReenableAfterBypassPage(page_module.Page):
"""A test page for the re-ena... | <commit_before># Copyright 2014 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
from telemetry.page import page as page_module
from telemetry import story
class ReenableAfterBypassPage(page_module.Page):
"""A test page... | # Copyright 2014 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
from telemetry.page import page as page_module
from telemetry import story
class ReenableAfterBypassPage(page_module.Page):
"""A test page for the re-ena... | # Copyright 2014 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
from telemetry.page import page as page_module
from telemetry import story
class ReenableAfterBypassPage(page_module.Page):
"""A test page for the re-ena... | <commit_before># Copyright 2014 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
from telemetry.page import page as page_module
from telemetry import story
class ReenableAfterBypassPage(page_module.Page):
"""A test page... |
b785fdc041a41f06c10e08d1e4e4b2bd4a5e5f90 | tests/test_uploader.py | tests/test_uploader.py | """Tests for the uploader module"""
from __future__ import unicode_literals
from __future__ import print_function
from __future__ import division
from __future__ import absolute_import
from builtins import open
from future import standard_library
standard_library.install_aliases()
from os.path import join
from datap... | """Tests for the uploader module"""
from __future__ import unicode_literals
from __future__ import print_function
from __future__ import division
from __future__ import absolute_import
from datapackage import DataPackage
from future import standard_library
from gobble.user import User
standard_library.install_alias... | Refactor uploader tests to use the fixture module. | Refactor uploader tests to use the fixture module.
| Python | mit | openspending/gobble | """Tests for the uploader module"""
from __future__ import unicode_literals
from __future__ import print_function
from __future__ import division
from __future__ import absolute_import
from builtins import open
from future import standard_library
standard_library.install_aliases()
from os.path import join
from datap... | """Tests for the uploader module"""
from __future__ import unicode_literals
from __future__ import print_function
from __future__ import division
from __future__ import absolute_import
from datapackage import DataPackage
from future import standard_library
from gobble.user import User
standard_library.install_alias... | <commit_before>"""Tests for the uploader module"""
from __future__ import unicode_literals
from __future__ import print_function
from __future__ import division
from __future__ import absolute_import
from builtins import open
from future import standard_library
standard_library.install_aliases()
from os.path import ... | """Tests for the uploader module"""
from __future__ import unicode_literals
from __future__ import print_function
from __future__ import division
from __future__ import absolute_import
from datapackage import DataPackage
from future import standard_library
from gobble.user import User
standard_library.install_alias... | """Tests for the uploader module"""
from __future__ import unicode_literals
from __future__ import print_function
from __future__ import division
from __future__ import absolute_import
from builtins import open
from future import standard_library
standard_library.install_aliases()
from os.path import join
from datap... | <commit_before>"""Tests for the uploader module"""
from __future__ import unicode_literals
from __future__ import print_function
from __future__ import division
from __future__ import absolute_import
from builtins import open
from future import standard_library
standard_library.install_aliases()
from os.path import ... |
a80d20fd0419e7e6aa9a9d83145fcab2987e286c | deploy/fabfile.py | deploy/fabfile.py | from fabric.api import env, local, run, sudo
env.user = 'root'
#env.hosts = ['204.232.205.6']
env.code_dir = '/home/docs/sites/readthedocs.org/checkouts/readthedocs.org'
env.virtualenv = '/home/docs/sites/readthedocs.org'
env.rundir = '/home/docs/sites/readthedocs.org/run'
env.chef_executable = '/var/lib/gems/1.8/bin... | from fabric.api import env, local, run, sudo
env.user = 'root'
#env.hosts = ['204.232.205.6']
env.code_dir = '/home/docs/sites/readthedocs.org/checkouts/readthedocs.org'
env.virtualenv = '/home/docs/sites/readthedocs.org'
env.rundir = '/home/docs/sites/readthedocs.org/run'
env.chef_executable = '/var/lib/gems/1.8/bin... | Make sure to use the same version of chef as the vagrant | Make sure to use the same version of chef as the vagrant
| Python | mit | tddv/readthedocs.org,sils1297/readthedocs.org,tddv/readthedocs.org,sunnyzwh/readthedocs.org,asampat3090/readthedocs.org,titiushko/readthedocs.org,clarkperkins/readthedocs.org,raven47git/readthedocs.org,emawind84/readthedocs.org,kdkeyser/readthedocs.org,kenwang76/readthedocs.org,techtonik/readthedocs.org,d0ugal/readthed... | from fabric.api import env, local, run, sudo
env.user = 'root'
#env.hosts = ['204.232.205.6']
env.code_dir = '/home/docs/sites/readthedocs.org/checkouts/readthedocs.org'
env.virtualenv = '/home/docs/sites/readthedocs.org'
env.rundir = '/home/docs/sites/readthedocs.org/run'
env.chef_executable = '/var/lib/gems/1.8/bin... | from fabric.api import env, local, run, sudo
env.user = 'root'
#env.hosts = ['204.232.205.6']
env.code_dir = '/home/docs/sites/readthedocs.org/checkouts/readthedocs.org'
env.virtualenv = '/home/docs/sites/readthedocs.org'
env.rundir = '/home/docs/sites/readthedocs.org/run'
env.chef_executable = '/var/lib/gems/1.8/bin... | <commit_before>from fabric.api import env, local, run, sudo
env.user = 'root'
#env.hosts = ['204.232.205.6']
env.code_dir = '/home/docs/sites/readthedocs.org/checkouts/readthedocs.org'
env.virtualenv = '/home/docs/sites/readthedocs.org'
env.rundir = '/home/docs/sites/readthedocs.org/run'
env.chef_executable = '/var/l... | from fabric.api import env, local, run, sudo
env.user = 'root'
#env.hosts = ['204.232.205.6']
env.code_dir = '/home/docs/sites/readthedocs.org/checkouts/readthedocs.org'
env.virtualenv = '/home/docs/sites/readthedocs.org'
env.rundir = '/home/docs/sites/readthedocs.org/run'
env.chef_executable = '/var/lib/gems/1.8/bin... | from fabric.api import env, local, run, sudo
env.user = 'root'
#env.hosts = ['204.232.205.6']
env.code_dir = '/home/docs/sites/readthedocs.org/checkouts/readthedocs.org'
env.virtualenv = '/home/docs/sites/readthedocs.org'
env.rundir = '/home/docs/sites/readthedocs.org/run'
env.chef_executable = '/var/lib/gems/1.8/bin... | <commit_before>from fabric.api import env, local, run, sudo
env.user = 'root'
#env.hosts = ['204.232.205.6']
env.code_dir = '/home/docs/sites/readthedocs.org/checkouts/readthedocs.org'
env.virtualenv = '/home/docs/sites/readthedocs.org'
env.rundir = '/home/docs/sites/readthedocs.org/run'
env.chef_executable = '/var/l... |
69d013b768edabb6bc7dbe78b1f219ea1b49db16 | sqlitebiter/_config.py | sqlitebiter/_config.py | #!/usr/bin/env python
# encoding: utf-8
"""
.. codeauthor:: Tsuyoshi Hombashi <tsuyoshi.hombashi@gmail.com>
"""
from __future__ import absolute_import
from __future__ import unicode_literals
import appconfigpy
from ._const import PROGRAM_NAME
class ConfigKey(object):
PROXY_SERVER = "proxy_server"
GS_CREDE... | #!/usr/bin/env python
# encoding: utf-8
"""
.. codeauthor:: Tsuyoshi Hombashi <tsuyoshi.hombashi@gmail.com>
"""
from __future__ import absolute_import
from __future__ import unicode_literals
import appconfigpy
from ._const import PROGRAM_NAME
class ConfigKey(object):
DEFAULT_ENCODING = "default_encoding"
... | Add default encoding parameter to configure subcommand | Add default encoding parameter to configure subcommand
| Python | mit | thombashi/sqlitebiter,thombashi/sqlitebiter | #!/usr/bin/env python
# encoding: utf-8
"""
.. codeauthor:: Tsuyoshi Hombashi <tsuyoshi.hombashi@gmail.com>
"""
from __future__ import absolute_import
from __future__ import unicode_literals
import appconfigpy
from ._const import PROGRAM_NAME
class ConfigKey(object):
PROXY_SERVER = "proxy_server"
GS_CREDE... | #!/usr/bin/env python
# encoding: utf-8
"""
.. codeauthor:: Tsuyoshi Hombashi <tsuyoshi.hombashi@gmail.com>
"""
from __future__ import absolute_import
from __future__ import unicode_literals
import appconfigpy
from ._const import PROGRAM_NAME
class ConfigKey(object):
DEFAULT_ENCODING = "default_encoding"
... | <commit_before>#!/usr/bin/env python
# encoding: utf-8
"""
.. codeauthor:: Tsuyoshi Hombashi <tsuyoshi.hombashi@gmail.com>
"""
from __future__ import absolute_import
from __future__ import unicode_literals
import appconfigpy
from ._const import PROGRAM_NAME
class ConfigKey(object):
PROXY_SERVER = "proxy_serve... | #!/usr/bin/env python
# encoding: utf-8
"""
.. codeauthor:: Tsuyoshi Hombashi <tsuyoshi.hombashi@gmail.com>
"""
from __future__ import absolute_import
from __future__ import unicode_literals
import appconfigpy
from ._const import PROGRAM_NAME
class ConfigKey(object):
DEFAULT_ENCODING = "default_encoding"
... | #!/usr/bin/env python
# encoding: utf-8
"""
.. codeauthor:: Tsuyoshi Hombashi <tsuyoshi.hombashi@gmail.com>
"""
from __future__ import absolute_import
from __future__ import unicode_literals
import appconfigpy
from ._const import PROGRAM_NAME
class ConfigKey(object):
PROXY_SERVER = "proxy_server"
GS_CREDE... | <commit_before>#!/usr/bin/env python
# encoding: utf-8
"""
.. codeauthor:: Tsuyoshi Hombashi <tsuyoshi.hombashi@gmail.com>
"""
from __future__ import absolute_import
from __future__ import unicode_literals
import appconfigpy
from ._const import PROGRAM_NAME
class ConfigKey(object):
PROXY_SERVER = "proxy_serve... |
71677afa8e5146023dc63c28a187ad5610d5b90a | upsrv/conary_schema.py | upsrv/conary_schema.py | #!/usr/bin/python
#
# Copyright (c) SAS Institute Inc.
#
import sys
import os
import pwd
from conary.server import schema
from conary.lib import cfgtypes, tracelog
from conary import dbstore
from .config import UpsrvConfig
class SimpleFileLog(tracelog.FileLog):
def printLog(self, level, msg):
self.fd.wri... | #!/usr/bin/python
#
# Copyright (c) SAS Institute Inc.
#
import sys
import os
import pwd
from conary.server import schema
from conary.lib import cfgtypes, tracelog
from conary import dbstore
from .config import UpsrvConfig
class SimpleFileLog(tracelog.FileLog):
def printLog(self, level, msg):
self.fd.wri... | Fix traceback being emitted when updating a proxy-mode rus (RCE-2260) | Fix traceback being emitted when updating a proxy-mode rus (RCE-2260)
| Python | apache-2.0 | sassoftware/rbm,sassoftware/rbm,sassoftware/rbm | #!/usr/bin/python
#
# Copyright (c) SAS Institute Inc.
#
import sys
import os
import pwd
from conary.server import schema
from conary.lib import cfgtypes, tracelog
from conary import dbstore
from .config import UpsrvConfig
class SimpleFileLog(tracelog.FileLog):
def printLog(self, level, msg):
self.fd.wri... | #!/usr/bin/python
#
# Copyright (c) SAS Institute Inc.
#
import sys
import os
import pwd
from conary.server import schema
from conary.lib import cfgtypes, tracelog
from conary import dbstore
from .config import UpsrvConfig
class SimpleFileLog(tracelog.FileLog):
def printLog(self, level, msg):
self.fd.wri... | <commit_before>#!/usr/bin/python
#
# Copyright (c) SAS Institute Inc.
#
import sys
import os
import pwd
from conary.server import schema
from conary.lib import cfgtypes, tracelog
from conary import dbstore
from .config import UpsrvConfig
class SimpleFileLog(tracelog.FileLog):
def printLog(self, level, msg):
... | #!/usr/bin/python
#
# Copyright (c) SAS Institute Inc.
#
import sys
import os
import pwd
from conary.server import schema
from conary.lib import cfgtypes, tracelog
from conary import dbstore
from .config import UpsrvConfig
class SimpleFileLog(tracelog.FileLog):
def printLog(self, level, msg):
self.fd.wri... | #!/usr/bin/python
#
# Copyright (c) SAS Institute Inc.
#
import sys
import os
import pwd
from conary.server import schema
from conary.lib import cfgtypes, tracelog
from conary import dbstore
from .config import UpsrvConfig
class SimpleFileLog(tracelog.FileLog):
def printLog(self, level, msg):
self.fd.wri... | <commit_before>#!/usr/bin/python
#
# Copyright (c) SAS Institute Inc.
#
import sys
import os
import pwd
from conary.server import schema
from conary.lib import cfgtypes, tracelog
from conary import dbstore
from .config import UpsrvConfig
class SimpleFileLog(tracelog.FileLog):
def printLog(self, level, msg):
... |
f4c8f003a4ffdd8e64468d261aa2cd34d58f1b9d | src/compdb/__init__.py | src/compdb/__init__.py | import warnings
from signac import *
msg = "compdb was renamed to signac. Please import signac in the future."
warnings.warn(DeprecationWarning, msg)
| import warnings
from signac import *
__all__ = ['core', 'contrib', 'db']
msg = "compdb was renamed to signac. Please import signac in the future."
print('Warning!',msg)
warnings.warn(msg, DeprecationWarning)
| Add surrogate compdb package, linking to signac. | Add surrogate compdb package, linking to signac.
Provided to guarantee compatibility.
Prints warning on import.
| Python | bsd-3-clause | csadorf/signac,csadorf/signac | import warnings
from signac import *
msg = "compdb was renamed to signac. Please import signac in the future."
warnings.warn(DeprecationWarning, msg)
Add surrogate compdb package, linking to signac.
Provided to guarantee compatibility.
Prints warning on import. | import warnings
from signac import *
__all__ = ['core', 'contrib', 'db']
msg = "compdb was renamed to signac. Please import signac in the future."
print('Warning!',msg)
warnings.warn(msg, DeprecationWarning)
| <commit_before>import warnings
from signac import *
msg = "compdb was renamed to signac. Please import signac in the future."
warnings.warn(DeprecationWarning, msg)
<commit_msg>Add surrogate compdb package, linking to signac.
Provided to guarantee compatibility.
Prints warning on import.<commit_after> | import warnings
from signac import *
__all__ = ['core', 'contrib', 'db']
msg = "compdb was renamed to signac. Please import signac in the future."
print('Warning!',msg)
warnings.warn(msg, DeprecationWarning)
| import warnings
from signac import *
msg = "compdb was renamed to signac. Please import signac in the future."
warnings.warn(DeprecationWarning, msg)
Add surrogate compdb package, linking to signac.
Provided to guarantee compatibility.
Prints warning on import.import warnings
from signac import *
__all__ = ['core',... | <commit_before>import warnings
from signac import *
msg = "compdb was renamed to signac. Please import signac in the future."
warnings.warn(DeprecationWarning, msg)
<commit_msg>Add surrogate compdb package, linking to signac.
Provided to guarantee compatibility.
Prints warning on import.<commit_after>import warnings... |
a25d7cbe7a2fb583e08e642e846edd7d647f2013 | tests/test_engine_import.py | tests/test_engine_import.py | import unittest
import os
from stevedore.extension import ExtensionManager
ENGINES = [
'lammps',
'openfoam',
'kratos',
'jyulb']
if os.getenv("HAVE_NUMERRIN", "no") == "yes":
ENGINES.append("numerrin")
class TestEngineImport(unittest.TestCase):
def test_engine_import(self):
extensio... | import unittest
import os
from stevedore.extension import ExtensionManager
ENGINES = [
'lammps',
'openfoam_file_io',
'openfoam_internal',
'kratos',
'jyulb_fileio_isothermal',
'jyulb_internal_isothermal']
if os.getenv("HAVE_NUMERRIN", "no") == "yes":
ENGINES.append("numerrin")
class Test... | Fix engine extension names for jyulb and openfoam | Fix engine extension names for jyulb and openfoam
| Python | bsd-2-clause | simphony/simphony-framework | import unittest
import os
from stevedore.extension import ExtensionManager
ENGINES = [
'lammps',
'openfoam',
'kratos',
'jyulb']
if os.getenv("HAVE_NUMERRIN", "no") == "yes":
ENGINES.append("numerrin")
class TestEngineImport(unittest.TestCase):
def test_engine_import(self):
extensio... | import unittest
import os
from stevedore.extension import ExtensionManager
ENGINES = [
'lammps',
'openfoam_file_io',
'openfoam_internal',
'kratos',
'jyulb_fileio_isothermal',
'jyulb_internal_isothermal']
if os.getenv("HAVE_NUMERRIN", "no") == "yes":
ENGINES.append("numerrin")
class Test... | <commit_before>import unittest
import os
from stevedore.extension import ExtensionManager
ENGINES = [
'lammps',
'openfoam',
'kratos',
'jyulb']
if os.getenv("HAVE_NUMERRIN", "no") == "yes":
ENGINES.append("numerrin")
class TestEngineImport(unittest.TestCase):
def test_engine_import(self):
... | import unittest
import os
from stevedore.extension import ExtensionManager
ENGINES = [
'lammps',
'openfoam_file_io',
'openfoam_internal',
'kratos',
'jyulb_fileio_isothermal',
'jyulb_internal_isothermal']
if os.getenv("HAVE_NUMERRIN", "no") == "yes":
ENGINES.append("numerrin")
class Test... | import unittest
import os
from stevedore.extension import ExtensionManager
ENGINES = [
'lammps',
'openfoam',
'kratos',
'jyulb']
if os.getenv("HAVE_NUMERRIN", "no") == "yes":
ENGINES.append("numerrin")
class TestEngineImport(unittest.TestCase):
def test_engine_import(self):
extensio... | <commit_before>import unittest
import os
from stevedore.extension import ExtensionManager
ENGINES = [
'lammps',
'openfoam',
'kratos',
'jyulb']
if os.getenv("HAVE_NUMERRIN", "no") == "yes":
ENGINES.append("numerrin")
class TestEngineImport(unittest.TestCase):
def test_engine_import(self):
... |
8a19543354a82f586d7aed7913c71e52dbd7d55c | src/librement/account/backends.py | src/librement/account/backends.py | from django.contrib.auth.backends import ModelBackend
from .models import Email
class LibrementBackend(ModelBackend):
def authenticate(self, email=None, password=None):
try:
email = Email.objects.get(email__iexact=email)
if email.user.check_password(password):
retu... | from django.contrib.auth.backends import ModelBackend
from .models import Email
class LibrementBackend(ModelBackend):
def authenticate(self, email=None, password=None):
try:
email = Email.objects.get(email__iexact=email)
for candidate in (
password,
... | Allow a bunch of different combinations of password. | Allow a bunch of different combinations of password.
Signed-off-by: Chris Lamb <29e6d179a8d73471df7861382db6dd7e64138033@debian.org>
| Python | agpl-3.0 | rhertzog/librement,rhertzog/librement,rhertzog/librement | from django.contrib.auth.backends import ModelBackend
from .models import Email
class LibrementBackend(ModelBackend):
def authenticate(self, email=None, password=None):
try:
email = Email.objects.get(email__iexact=email)
if email.user.check_password(password):
retu... | from django.contrib.auth.backends import ModelBackend
from .models import Email
class LibrementBackend(ModelBackend):
def authenticate(self, email=None, password=None):
try:
email = Email.objects.get(email__iexact=email)
for candidate in (
password,
... | <commit_before>from django.contrib.auth.backends import ModelBackend
from .models import Email
class LibrementBackend(ModelBackend):
def authenticate(self, email=None, password=None):
try:
email = Email.objects.get(email__iexact=email)
if email.user.check_password(password):
... | from django.contrib.auth.backends import ModelBackend
from .models import Email
class LibrementBackend(ModelBackend):
def authenticate(self, email=None, password=None):
try:
email = Email.objects.get(email__iexact=email)
for candidate in (
password,
... | from django.contrib.auth.backends import ModelBackend
from .models import Email
class LibrementBackend(ModelBackend):
def authenticate(self, email=None, password=None):
try:
email = Email.objects.get(email__iexact=email)
if email.user.check_password(password):
retu... | <commit_before>from django.contrib.auth.backends import ModelBackend
from .models import Email
class LibrementBackend(ModelBackend):
def authenticate(self, email=None, password=None):
try:
email = Email.objects.get(email__iexact=email)
if email.user.check_password(password):
... |
261883f80174873af38a17ac7b0ebe7a79263d85 | project/scripts/unit_tests.py | project/scripts/unit_tests.py | #!/usr/bin/env python3
import unittest
import pandas as pd
from fetch_trends import fetch_hourly_data
class TestFetch(unittest.TestCase):
def test_fetch_type(self):
result = fetch_hourly_data("test", 2021, 1, 1, 2021, 1, 12)
self.assertIsInstance(result, pd.DataFrame, "Should be a dataframe")
... | #!/usr/bin/env python3
import unittest
import pandas as pd
from fetch_trends import fetch_hourly_data, aggregate_hourly_to_daily
from dates import get_end_times, get_start_times
class TestFetch(unittest.TestCase):
def setUp(self):
self.hourly_result = fetch_hourly_data("test", 2021, 1, 1, 2021, 1, 1)
... | Add unit testing of dates and fetch functions | Add unit testing of dates and fetch functions
| Python | apache-2.0 | googleinterns/sgonks,googleinterns/sgonks,googleinterns/sgonks,googleinterns/sgonks | #!/usr/bin/env python3
import unittest
import pandas as pd
from fetch_trends import fetch_hourly_data
class TestFetch(unittest.TestCase):
def test_fetch_type(self):
result = fetch_hourly_data("test", 2021, 1, 1, 2021, 1, 12)
self.assertIsInstance(result, pd.DataFrame, "Should be a dataframe")
... | #!/usr/bin/env python3
import unittest
import pandas as pd
from fetch_trends import fetch_hourly_data, aggregate_hourly_to_daily
from dates import get_end_times, get_start_times
class TestFetch(unittest.TestCase):
def setUp(self):
self.hourly_result = fetch_hourly_data("test", 2021, 1, 1, 2021, 1, 1)
... | <commit_before>#!/usr/bin/env python3
import unittest
import pandas as pd
from fetch_trends import fetch_hourly_data
class TestFetch(unittest.TestCase):
def test_fetch_type(self):
result = fetch_hourly_data("test", 2021, 1, 1, 2021, 1, 12)
self.assertIsInstance(result, pd.DataFrame, "Should be ... | #!/usr/bin/env python3
import unittest
import pandas as pd
from fetch_trends import fetch_hourly_data, aggregate_hourly_to_daily
from dates import get_end_times, get_start_times
class TestFetch(unittest.TestCase):
def setUp(self):
self.hourly_result = fetch_hourly_data("test", 2021, 1, 1, 2021, 1, 1)
... | #!/usr/bin/env python3
import unittest
import pandas as pd
from fetch_trends import fetch_hourly_data
class TestFetch(unittest.TestCase):
def test_fetch_type(self):
result = fetch_hourly_data("test", 2021, 1, 1, 2021, 1, 12)
self.assertIsInstance(result, pd.DataFrame, "Should be a dataframe")
... | <commit_before>#!/usr/bin/env python3
import unittest
import pandas as pd
from fetch_trends import fetch_hourly_data
class TestFetch(unittest.TestCase):
def test_fetch_type(self):
result = fetch_hourly_data("test", 2021, 1, 1, 2021, 1, 12)
self.assertIsInstance(result, pd.DataFrame, "Should be ... |
2582eaeb27bf5cb6185cd2400edf56fe3c5cbacc | nlppln/wfgenerator.py | nlppln/wfgenerator.py | import os
from scriptcwl import WorkflowGenerator as WFGenerator
class WorkflowGenerator(WFGenerator):
def __init__(self):
module_path = os.path.dirname(os.path.realpath(__file__))
steps_dir = os.path.join(module_path, '../cwl/steps/')
steps_dir = os.path.realpath(steps_dir)
WFGe... | import os
from scriptcwl import WorkflowGenerator as WFGenerator
class WorkflowGenerator(WFGenerator):
def __init__(self):
module_path = os.path.dirname(os.path.realpath(__file__))
steps_dir = os.path.join(module_path, '../cwl/')
steps_dir = os.path.realpath(steps_dir)
WFGenerato... | Load steps (CommandLineTools) from new directory | Load steps (CommandLineTools) from new directory
This also required changes to scriptcwl; scriptcwl now checks whether
a cwl-file contains a CommandLineTool or a Workflow. If it contains a
Workflow, an empty step is added to the steps library. This needs to
be fixed.
| Python | apache-2.0 | WhatWorksWhenForWhom/nlppln,WhatWorksWhenForWhom/nlppln,WhatWorksWhenForWhom/nlppln | import os
from scriptcwl import WorkflowGenerator as WFGenerator
class WorkflowGenerator(WFGenerator):
def __init__(self):
module_path = os.path.dirname(os.path.realpath(__file__))
steps_dir = os.path.join(module_path, '../cwl/steps/')
steps_dir = os.path.realpath(steps_dir)
WFGe... | import os
from scriptcwl import WorkflowGenerator as WFGenerator
class WorkflowGenerator(WFGenerator):
def __init__(self):
module_path = os.path.dirname(os.path.realpath(__file__))
steps_dir = os.path.join(module_path, '../cwl/')
steps_dir = os.path.realpath(steps_dir)
WFGenerato... | <commit_before>import os
from scriptcwl import WorkflowGenerator as WFGenerator
class WorkflowGenerator(WFGenerator):
def __init__(self):
module_path = os.path.dirname(os.path.realpath(__file__))
steps_dir = os.path.join(module_path, '../cwl/steps/')
steps_dir = os.path.realpath(steps_dir... | import os
from scriptcwl import WorkflowGenerator as WFGenerator
class WorkflowGenerator(WFGenerator):
def __init__(self):
module_path = os.path.dirname(os.path.realpath(__file__))
steps_dir = os.path.join(module_path, '../cwl/')
steps_dir = os.path.realpath(steps_dir)
WFGenerato... | import os
from scriptcwl import WorkflowGenerator as WFGenerator
class WorkflowGenerator(WFGenerator):
def __init__(self):
module_path = os.path.dirname(os.path.realpath(__file__))
steps_dir = os.path.join(module_path, '../cwl/steps/')
steps_dir = os.path.realpath(steps_dir)
WFGe... | <commit_before>import os
from scriptcwl import WorkflowGenerator as WFGenerator
class WorkflowGenerator(WFGenerator):
def __init__(self):
module_path = os.path.dirname(os.path.realpath(__file__))
steps_dir = os.path.join(module_path, '../cwl/steps/')
steps_dir = os.path.realpath(steps_dir... |
91f1accf58e0446eb9ac6421cbf148b619c09ea9 | grappa_http/__init__.py | grappa_http/__init__.py | # -*- coding: utf-8 -*
"""
`grappa_http` provides HTTP protocol assertion for `grappa` testing library.
Example::
import grappa
import grappa_http
# Register plugin
grappa.use(grappa_http)
# Use plugin assertion
res = requests.get('httpbin.org/status/204')
res | should.have.status(204)
... | # -*- coding: utf-8 -*
"""
`grappa_http` provides HTTP protocol assertion for `grappa` testing library.
Example::
import grappa
import grappa_http
# Register plugin
grappa.use(grappa_http)
# Use plugin assertion
res = requests.get('httpbin.org/status/204')
res | should.have.status(204)
... | Bump version: 0.1.2 → 0.1.3 | Bump version: 0.1.2 → 0.1.3
| Python | mit | grappa-py/http | # -*- coding: utf-8 -*
"""
`grappa_http` provides HTTP protocol assertion for `grappa` testing library.
Example::
import grappa
import grappa_http
# Register plugin
grappa.use(grappa_http)
# Use plugin assertion
res = requests.get('httpbin.org/status/204')
res | should.have.status(204)
... | # -*- coding: utf-8 -*
"""
`grappa_http` provides HTTP protocol assertion for `grappa` testing library.
Example::
import grappa
import grappa_http
# Register plugin
grappa.use(grappa_http)
# Use plugin assertion
res = requests.get('httpbin.org/status/204')
res | should.have.status(204)
... | <commit_before># -*- coding: utf-8 -*
"""
`grappa_http` provides HTTP protocol assertion for `grappa` testing library.
Example::
import grappa
import grappa_http
# Register plugin
grappa.use(grappa_http)
# Use plugin assertion
res = requests.get('httpbin.org/status/204')
res | should.hav... | # -*- coding: utf-8 -*
"""
`grappa_http` provides HTTP protocol assertion for `grappa` testing library.
Example::
import grappa
import grappa_http
# Register plugin
grappa.use(grappa_http)
# Use plugin assertion
res = requests.get('httpbin.org/status/204')
res | should.have.status(204)
... | # -*- coding: utf-8 -*
"""
`grappa_http` provides HTTP protocol assertion for `grappa` testing library.
Example::
import grappa
import grappa_http
# Register plugin
grappa.use(grappa_http)
# Use plugin assertion
res = requests.get('httpbin.org/status/204')
res | should.have.status(204)
... | <commit_before># -*- coding: utf-8 -*
"""
`grappa_http` provides HTTP protocol assertion for `grappa` testing library.
Example::
import grappa
import grappa_http
# Register plugin
grappa.use(grappa_http)
# Use plugin assertion
res = requests.get('httpbin.org/status/204')
res | should.hav... |
1d555c184a10ae4fd84d758105e19b10828543c2 | q2_feature_classifier/tests/__init__.py | q2_feature_classifier/tests/__init__.py | # ----------------------------------------------------------------------------
# Copyright (c) 2016--, Ben Kaehler
#
# Distributed under the terms of the Modified BSD License.
#
# The full license is in the file LICENSE, distributed with this software.
# -----------------------------------------------------------------... | # ----------------------------------------------------------------------------
# Copyright (c) 2016--, Ben Kaehler
#
# Distributed under the terms of the Modified BSD License.
#
# The full license is in the file LICENSE, distributed with this software.
# -----------------------------------------------------------------... | Update import location of TestPluginBase | TST: Update import location of TestPluginBase
| Python | bsd-3-clause | BenKaehler/q2-feature-classifier | # ----------------------------------------------------------------------------
# Copyright (c) 2016--, Ben Kaehler
#
# Distributed under the terms of the Modified BSD License.
#
# The full license is in the file LICENSE, distributed with this software.
# -----------------------------------------------------------------... | # ----------------------------------------------------------------------------
# Copyright (c) 2016--, Ben Kaehler
#
# Distributed under the terms of the Modified BSD License.
#
# The full license is in the file LICENSE, distributed with this software.
# -----------------------------------------------------------------... | <commit_before># ----------------------------------------------------------------------------
# Copyright (c) 2016--, Ben Kaehler
#
# Distributed under the terms of the Modified BSD License.
#
# The full license is in the file LICENSE, distributed with this software.
# --------------------------------------------------... | # ----------------------------------------------------------------------------
# Copyright (c) 2016--, Ben Kaehler
#
# Distributed under the terms of the Modified BSD License.
#
# The full license is in the file LICENSE, distributed with this software.
# -----------------------------------------------------------------... | # ----------------------------------------------------------------------------
# Copyright (c) 2016--, Ben Kaehler
#
# Distributed under the terms of the Modified BSD License.
#
# The full license is in the file LICENSE, distributed with this software.
# -----------------------------------------------------------------... | <commit_before># ----------------------------------------------------------------------------
# Copyright (c) 2016--, Ben Kaehler
#
# Distributed under the terms of the Modified BSD License.
#
# The full license is in the file LICENSE, distributed with this software.
# --------------------------------------------------... |
c15dab903d3759578449279cc034d766d362d41f | rest_framework/authtoken/serializers.py | rest_framework/authtoken/serializers.py | from django.contrib.auth import authenticate
from rest_framework import serializers
class AuthTokenSerializer(serializers.Serializer):
username = serializers.CharField()
password = serializers.CharField()
def validate(self, attrs):
username = attrs.get('username')
password = attrs.get('pa... | from django.contrib.auth import authenticate
from django.utils.translation import ugettext_lazy as _
from rest_framework import serializers
class AuthTokenSerializer(serializers.Serializer):
username = serializers.CharField()
password = serializers.CharField()
def validate(self, attrs):
username... | Mark strings in AuthTokenSerializer as translatable | Mark strings in AuthTokenSerializer as translatable
| Python | bsd-2-clause | linovia/django-rest-framework,nhorelik/django-rest-framework,rafaelang/django-rest-framework,iheitlager/django-rest-framework,fishky/django-rest-framework,bluedazzle/django-rest-framework,damycra/django-rest-framework,HireAnEsquire/django-rest-framework,jerryhebert/django-rest-framework,gregmuellegger/django-rest-frame... | from django.contrib.auth import authenticate
from rest_framework import serializers
class AuthTokenSerializer(serializers.Serializer):
username = serializers.CharField()
password = serializers.CharField()
def validate(self, attrs):
username = attrs.get('username')
password = attrs.get('pa... | from django.contrib.auth import authenticate
from django.utils.translation import ugettext_lazy as _
from rest_framework import serializers
class AuthTokenSerializer(serializers.Serializer):
username = serializers.CharField()
password = serializers.CharField()
def validate(self, attrs):
username... | <commit_before>from django.contrib.auth import authenticate
from rest_framework import serializers
class AuthTokenSerializer(serializers.Serializer):
username = serializers.CharField()
password = serializers.CharField()
def validate(self, attrs):
username = attrs.get('username')
password ... | from django.contrib.auth import authenticate
from django.utils.translation import ugettext_lazy as _
from rest_framework import serializers
class AuthTokenSerializer(serializers.Serializer):
username = serializers.CharField()
password = serializers.CharField()
def validate(self, attrs):
username... | from django.contrib.auth import authenticate
from rest_framework import serializers
class AuthTokenSerializer(serializers.Serializer):
username = serializers.CharField()
password = serializers.CharField()
def validate(self, attrs):
username = attrs.get('username')
password = attrs.get('pa... | <commit_before>from django.contrib.auth import authenticate
from rest_framework import serializers
class AuthTokenSerializer(serializers.Serializer):
username = serializers.CharField()
password = serializers.CharField()
def validate(self, attrs):
username = attrs.get('username')
password ... |
52c9768b30bf758a3ffeb2a94e10e28ab52541ab | test/__init__.py | test/__init__.py | import unittest
from controller import c3bottles, db
from view.user import User
NAME = 'user'
PASSWORD = 'test'
def load_config():
c3bottles.config['SQLALCHEMY_DATABASE_URI'] = "sqlite://"
c3bottles.config['TESTING'] = True
class C3BottlesTestCase(unittest.TestCase):
def setUp(self):
load_con... | import unittest
from controller import c3bottles, db
from view.user import User
NAME = 'user'
PASSWORD = 'test'
def load_config():
c3bottles.config['SQLALCHEMY_DATABASE_URI'] = "sqlite://"
c3bottles.config['TESTING'] = True
c3bottles.config['WTF_CSRF_ENABLED'] = False
c3bottles.config['SECRET_KEY']... | Add ability to test requests | test: Add ability to test requests
Disable CSRF and set the SECRET_KEY in tests so that it's possible to
write HTTP based tests.
| Python | mit | der-michik/c3bottles,der-michik/c3bottles,der-michik/c3bottles,der-michik/c3bottles | import unittest
from controller import c3bottles, db
from view.user import User
NAME = 'user'
PASSWORD = 'test'
def load_config():
c3bottles.config['SQLALCHEMY_DATABASE_URI'] = "sqlite://"
c3bottles.config['TESTING'] = True
class C3BottlesTestCase(unittest.TestCase):
def setUp(self):
load_con... | import unittest
from controller import c3bottles, db
from view.user import User
NAME = 'user'
PASSWORD = 'test'
def load_config():
c3bottles.config['SQLALCHEMY_DATABASE_URI'] = "sqlite://"
c3bottles.config['TESTING'] = True
c3bottles.config['WTF_CSRF_ENABLED'] = False
c3bottles.config['SECRET_KEY']... | <commit_before>import unittest
from controller import c3bottles, db
from view.user import User
NAME = 'user'
PASSWORD = 'test'
def load_config():
c3bottles.config['SQLALCHEMY_DATABASE_URI'] = "sqlite://"
c3bottles.config['TESTING'] = True
class C3BottlesTestCase(unittest.TestCase):
def setUp(self):
... | import unittest
from controller import c3bottles, db
from view.user import User
NAME = 'user'
PASSWORD = 'test'
def load_config():
c3bottles.config['SQLALCHEMY_DATABASE_URI'] = "sqlite://"
c3bottles.config['TESTING'] = True
c3bottles.config['WTF_CSRF_ENABLED'] = False
c3bottles.config['SECRET_KEY']... | import unittest
from controller import c3bottles, db
from view.user import User
NAME = 'user'
PASSWORD = 'test'
def load_config():
c3bottles.config['SQLALCHEMY_DATABASE_URI'] = "sqlite://"
c3bottles.config['TESTING'] = True
class C3BottlesTestCase(unittest.TestCase):
def setUp(self):
load_con... | <commit_before>import unittest
from controller import c3bottles, db
from view.user import User
NAME = 'user'
PASSWORD = 'test'
def load_config():
c3bottles.config['SQLALCHEMY_DATABASE_URI'] = "sqlite://"
c3bottles.config['TESTING'] = True
class C3BottlesTestCase(unittest.TestCase):
def setUp(self):
... |
733f116125e7c061cf9f0e11e5b1008ee5272131 | test/conftest.py | test/conftest.py | # -*- coding: utf-8 -*-
import pytest
import os
import json
import sys
if sys.version_info[0] == 2:
from codecs import open
# This pair of generator expressions are pretty lame, but building lists is a
# bad idea as I plan to have a substantial number of tests here.
story_directories = (
os.path.join('test/te... | # -*- coding: utf-8 -*-
import pytest
import os
import json
import sys
from hypothesis.strategies import text
if sys.version_info[0] == 2:
from codecs import open
# We need to grab one text example from hypothesis to prime its cache.
text().example()
# This pair of generator expressions are pretty lame, but bui... | Fix some test breakages with Hypothesis. | Fix some test breakages with Hypothesis.
| Python | mit | python-hyper/hpack,python-hyper/hpack | # -*- coding: utf-8 -*-
import pytest
import os
import json
import sys
if sys.version_info[0] == 2:
from codecs import open
# This pair of generator expressions are pretty lame, but building lists is a
# bad idea as I plan to have a substantial number of tests here.
story_directories = (
os.path.join('test/te... | # -*- coding: utf-8 -*-
import pytest
import os
import json
import sys
from hypothesis.strategies import text
if sys.version_info[0] == 2:
from codecs import open
# We need to grab one text example from hypothesis to prime its cache.
text().example()
# This pair of generator expressions are pretty lame, but bui... | <commit_before># -*- coding: utf-8 -*-
import pytest
import os
import json
import sys
if sys.version_info[0] == 2:
from codecs import open
# This pair of generator expressions are pretty lame, but building lists is a
# bad idea as I plan to have a substantial number of tests here.
story_directories = (
os.pat... | # -*- coding: utf-8 -*-
import pytest
import os
import json
import sys
from hypothesis.strategies import text
if sys.version_info[0] == 2:
from codecs import open
# We need to grab one text example from hypothesis to prime its cache.
text().example()
# This pair of generator expressions are pretty lame, but bui... | # -*- coding: utf-8 -*-
import pytest
import os
import json
import sys
if sys.version_info[0] == 2:
from codecs import open
# This pair of generator expressions are pretty lame, but building lists is a
# bad idea as I plan to have a substantial number of tests here.
story_directories = (
os.path.join('test/te... | <commit_before># -*- coding: utf-8 -*-
import pytest
import os
import json
import sys
if sys.version_info[0] == 2:
from codecs import open
# This pair of generator expressions are pretty lame, but building lists is a
# bad idea as I plan to have a substantial number of tests here.
story_directories = (
os.pat... |
095d77b74a3bfad6d97387a860ac67f82f31c478 | test/conftest.py | test/conftest.py | import pytest
def pytest_addoption(parser):
parser.addoption("--travis", action="store_true", default=False,
help="Only run tests marked for Travis")
def pytest_configure(config):
config.addinivalue_line("markers",
"not_travis: Mark a test that should not be ... | import pytest
def pytest_addoption(parser):
parser.addoption("--travis", action="store_true", default=False,
help="Only run tests marked for Travis")
def pytest_configure(config):
config.addinivalue_line("markers",
"not_travis: Mark a test that should not be ... | Print "still alive" progress when testing on travis | test: Print "still alive" progress when testing on travis
| Python | mit | tkarna/cofs | import pytest
def pytest_addoption(parser):
parser.addoption("--travis", action="store_true", default=False,
help="Only run tests marked for Travis")
def pytest_configure(config):
config.addinivalue_line("markers",
"not_travis: Mark a test that should not be ... | import pytest
def pytest_addoption(parser):
parser.addoption("--travis", action="store_true", default=False,
help="Only run tests marked for Travis")
def pytest_configure(config):
config.addinivalue_line("markers",
"not_travis: Mark a test that should not be ... | <commit_before>import pytest
def pytest_addoption(parser):
parser.addoption("--travis", action="store_true", default=False,
help="Only run tests marked for Travis")
def pytest_configure(config):
config.addinivalue_line("markers",
"not_travis: Mark a test that... | import pytest
def pytest_addoption(parser):
parser.addoption("--travis", action="store_true", default=False,
help="Only run tests marked for Travis")
def pytest_configure(config):
config.addinivalue_line("markers",
"not_travis: Mark a test that should not be ... | import pytest
def pytest_addoption(parser):
parser.addoption("--travis", action="store_true", default=False,
help="Only run tests marked for Travis")
def pytest_configure(config):
config.addinivalue_line("markers",
"not_travis: Mark a test that should not be ... | <commit_before>import pytest
def pytest_addoption(parser):
parser.addoption("--travis", action="store_true", default=False,
help="Only run tests marked for Travis")
def pytest_configure(config):
config.addinivalue_line("markers",
"not_travis: Mark a test that... |
50bd3ae1cac853d34d29c697573ccf8a3fc4cd96 | tweepy/utils.py | tweepy/utils.py | # Tweepy
# Copyright 2010-2022 Joshua Roesslein
# See LICENSE for details.
import datetime
def list_to_csv(item_list):
if item_list:
return ','.join(map(str, item_list))
def parse_datetime(datetime_string):
return datetime.datetime.strptime(
datetime_string, "%Y-%m-%dT%H:%M:%S.%fZ"
).re... | # Tweepy
# Copyright 2010-2022 Joshua Roesslein
# See LICENSE for details.
import datetime
def list_to_csv(item_list):
if item_list:
return ','.join(map(str, item_list))
def parse_datetime(datetime_string):
return datetime.datetime.strptime(
datetime_string, "%Y-%m-%dT%H:%M:%S.%f%z"
).r... | Use %z directive in parse_datetime | Use %z directive in parse_datetime
| Python | mit | svven/tweepy,tweepy/tweepy | # Tweepy
# Copyright 2010-2022 Joshua Roesslein
# See LICENSE for details.
import datetime
def list_to_csv(item_list):
if item_list:
return ','.join(map(str, item_list))
def parse_datetime(datetime_string):
return datetime.datetime.strptime(
datetime_string, "%Y-%m-%dT%H:%M:%S.%fZ"
).re... | # Tweepy
# Copyright 2010-2022 Joshua Roesslein
# See LICENSE for details.
import datetime
def list_to_csv(item_list):
if item_list:
return ','.join(map(str, item_list))
def parse_datetime(datetime_string):
return datetime.datetime.strptime(
datetime_string, "%Y-%m-%dT%H:%M:%S.%f%z"
).r... | <commit_before># Tweepy
# Copyright 2010-2022 Joshua Roesslein
# See LICENSE for details.
import datetime
def list_to_csv(item_list):
if item_list:
return ','.join(map(str, item_list))
def parse_datetime(datetime_string):
return datetime.datetime.strptime(
datetime_string, "%Y-%m-%dT%H:%M:%... | # Tweepy
# Copyright 2010-2022 Joshua Roesslein
# See LICENSE for details.
import datetime
def list_to_csv(item_list):
if item_list:
return ','.join(map(str, item_list))
def parse_datetime(datetime_string):
return datetime.datetime.strptime(
datetime_string, "%Y-%m-%dT%H:%M:%S.%f%z"
).r... | # Tweepy
# Copyright 2010-2022 Joshua Roesslein
# See LICENSE for details.
import datetime
def list_to_csv(item_list):
if item_list:
return ','.join(map(str, item_list))
def parse_datetime(datetime_string):
return datetime.datetime.strptime(
datetime_string, "%Y-%m-%dT%H:%M:%S.%fZ"
).re... | <commit_before># Tweepy
# Copyright 2010-2022 Joshua Roesslein
# See LICENSE for details.
import datetime
def list_to_csv(item_list):
if item_list:
return ','.join(map(str, item_list))
def parse_datetime(datetime_string):
return datetime.datetime.strptime(
datetime_string, "%Y-%m-%dT%H:%M:%... |
52b11c93eed257622d169ab037b3b4918b936ddd | test/settings.py | test/settings.py | import django
from os import path
SECRET_KEY = 'not secret'
INSTALLED_APPS = ('dumper', 'test', 'django.contrib.contenttypes')
TEMPLATE_DEBUG = DEBUG = True
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.sqlite3',
'NAME': 'imagekit.db',
},
}
ROOT_URLCONF = 'test.urls'
# Testing
if ... | import django
from os import path
SECRET_KEY = 'not secret'
INSTALLED_APPS = ('dumper', 'test', 'django.contrib.contenttypes')
TEMPLATE_DEBUG = DEBUG = True
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.sqlite3',
},
}
ROOT_URLCONF = 'test.urls'
# Testing
if django.VERSION[:2] < (1, 6):
... | Use in memory test database | Use in memory test database
| Python | mit | saulshanabrook/django-dumper | import django
from os import path
SECRET_KEY = 'not secret'
INSTALLED_APPS = ('dumper', 'test', 'django.contrib.contenttypes')
TEMPLATE_DEBUG = DEBUG = True
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.sqlite3',
'NAME': 'imagekit.db',
},
}
ROOT_URLCONF = 'test.urls'
# Testing
if ... | import django
from os import path
SECRET_KEY = 'not secret'
INSTALLED_APPS = ('dumper', 'test', 'django.contrib.contenttypes')
TEMPLATE_DEBUG = DEBUG = True
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.sqlite3',
},
}
ROOT_URLCONF = 'test.urls'
# Testing
if django.VERSION[:2] < (1, 6):
... | <commit_before>import django
from os import path
SECRET_KEY = 'not secret'
INSTALLED_APPS = ('dumper', 'test', 'django.contrib.contenttypes')
TEMPLATE_DEBUG = DEBUG = True
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.sqlite3',
'NAME': 'imagekit.db',
},
}
ROOT_URLCONF = 'test.urls'... | import django
from os import path
SECRET_KEY = 'not secret'
INSTALLED_APPS = ('dumper', 'test', 'django.contrib.contenttypes')
TEMPLATE_DEBUG = DEBUG = True
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.sqlite3',
},
}
ROOT_URLCONF = 'test.urls'
# Testing
if django.VERSION[:2] < (1, 6):
... | import django
from os import path
SECRET_KEY = 'not secret'
INSTALLED_APPS = ('dumper', 'test', 'django.contrib.contenttypes')
TEMPLATE_DEBUG = DEBUG = True
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.sqlite3',
'NAME': 'imagekit.db',
},
}
ROOT_URLCONF = 'test.urls'
# Testing
if ... | <commit_before>import django
from os import path
SECRET_KEY = 'not secret'
INSTALLED_APPS = ('dumper', 'test', 'django.contrib.contenttypes')
TEMPLATE_DEBUG = DEBUG = True
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.sqlite3',
'NAME': 'imagekit.db',
},
}
ROOT_URLCONF = 'test.urls'... |
ffa0fe66512aada62ba2778ea2edba28fd34de88 | demo/sigal.conf.py | demo/sigal.conf.py | # This configuration has been configured for this demo, not all
# normal sigal settings have an effect in this theme.
# ---------------------
# General configuration
# ---------------------
source = 'source'
destination = 'output'
theme = '' # theme is automatically set by the theme plugin.
title = 'Photography'
aut... | # This configuration has been configured for this demo, not all
# normal sigal settings have an effect in this theme.
# ---------------------
# General configuration
# ---------------------
source = 'source'
destination = 'output'
theme = '' # theme is automatically set by the theme plugin.
title = 'Photography'
aut... | Replace http by https in demo | Replace http by https in demo
| Python | mit | 153957/153957-theme,153957/153957-theme | # This configuration has been configured for this demo, not all
# normal sigal settings have an effect in this theme.
# ---------------------
# General configuration
# ---------------------
source = 'source'
destination = 'output'
theme = '' # theme is automatically set by the theme plugin.
title = 'Photography'
aut... | # This configuration has been configured for this demo, not all
# normal sigal settings have an effect in this theme.
# ---------------------
# General configuration
# ---------------------
source = 'source'
destination = 'output'
theme = '' # theme is automatically set by the theme plugin.
title = 'Photography'
aut... | <commit_before># This configuration has been configured for this demo, not all
# normal sigal settings have an effect in this theme.
# ---------------------
# General configuration
# ---------------------
source = 'source'
destination = 'output'
theme = '' # theme is automatically set by the theme plugin.
title = 'P... | # This configuration has been configured for this demo, not all
# normal sigal settings have an effect in this theme.
# ---------------------
# General configuration
# ---------------------
source = 'source'
destination = 'output'
theme = '' # theme is automatically set by the theme plugin.
title = 'Photography'
aut... | # This configuration has been configured for this demo, not all
# normal sigal settings have an effect in this theme.
# ---------------------
# General configuration
# ---------------------
source = 'source'
destination = 'output'
theme = '' # theme is automatically set by the theme plugin.
title = 'Photography'
aut... | <commit_before># This configuration has been configured for this demo, not all
# normal sigal settings have an effect in this theme.
# ---------------------
# General configuration
# ---------------------
source = 'source'
destination = 'output'
theme = '' # theme is automatically set by the theme plugin.
title = 'P... |
7b26b893d642d829c55126452fcbebca8cfff806 | test_settings.py | test_settings.py | DATABASES = {
'default' : {
'ENGINE': 'django.db.backends.sqlite3'
}
}
INSTALLED_APPS = (
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.auth',
'django.contrib.sites',
'django_extensions',
'newsletter',
)
ROOT_URLCONF = 'test_urls'
SITE_ID = 1
TEMPL... | DATABASES = {
'default' : {
'ENGINE': 'django.db.backends.sqlite3'
}
}
INSTALLED_APPS = (
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.auth',
'django.contrib.sites',
'django_extensions',
'newsletter',
)
ROOT_URLCONF = 'test_urls'
SITE_ID = 1
TEMPL... | Enable timezone support in tests. | Enable timezone support in tests.
| Python | agpl-3.0 | ctxis/django-newsletter,ctxis/django-newsletter,dsanders11/django-newsletter,dsanders11/django-newsletter,dsanders11/django-newsletter,viaregio/django-newsletter,viaregio/django-newsletter,ctxis/django-newsletter | DATABASES = {
'default' : {
'ENGINE': 'django.db.backends.sqlite3'
}
}
INSTALLED_APPS = (
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.auth',
'django.contrib.sites',
'django_extensions',
'newsletter',
)
ROOT_URLCONF = 'test_urls'
SITE_ID = 1
TEMPL... | DATABASES = {
'default' : {
'ENGINE': 'django.db.backends.sqlite3'
}
}
INSTALLED_APPS = (
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.auth',
'django.contrib.sites',
'django_extensions',
'newsletter',
)
ROOT_URLCONF = 'test_urls'
SITE_ID = 1
TEMPL... | <commit_before>DATABASES = {
'default' : {
'ENGINE': 'django.db.backends.sqlite3'
}
}
INSTALLED_APPS = (
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.auth',
'django.contrib.sites',
'django_extensions',
'newsletter',
)
ROOT_URLCONF = 'test_urls'
SIT... | DATABASES = {
'default' : {
'ENGINE': 'django.db.backends.sqlite3'
}
}
INSTALLED_APPS = (
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.auth',
'django.contrib.sites',
'django_extensions',
'newsletter',
)
ROOT_URLCONF = 'test_urls'
SITE_ID = 1
TEMPL... | DATABASES = {
'default' : {
'ENGINE': 'django.db.backends.sqlite3'
}
}
INSTALLED_APPS = (
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.auth',
'django.contrib.sites',
'django_extensions',
'newsletter',
)
ROOT_URLCONF = 'test_urls'
SITE_ID = 1
TEMPL... | <commit_before>DATABASES = {
'default' : {
'ENGINE': 'django.db.backends.sqlite3'
}
}
INSTALLED_APPS = (
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.auth',
'django.contrib.sites',
'django_extensions',
'newsletter',
)
ROOT_URLCONF = 'test_urls'
SIT... |
e586b8ba3bb896dabe97d65d1b564c749faa4d42 | src/ocspdash/web/blueprints/ui.py | src/ocspdash/web/blueprints/ui.py | # -*- coding: utf-8 -*-
"""The OCSPdash homepage UI blueprint."""
from flask import Blueprint, render_template
from ocspdash.web.proxies import manager
__all__ = [
'ui',
]
ui = Blueprint('ui', __name__)
@ui.route('/')
def home():
"""Show the user the home view."""
payload = manager.get_payload()
... | # -*- coding: utf-8 -*-
"""Blueprint for non-API endpoints in OCSPdash."""
from flask import Blueprint, render_template
from ocspdash.web.proxies import manager
__all__ = [
'ui',
]
ui = Blueprint('ui', __name__)
@ui.route('/')
def home():
"""Show the user the home view."""
payload = manager.get_paylo... | Update docstring and remove unused code from UI blueprint. | Update docstring and remove unused code from UI blueprint.
| Python | mit | scolby33/OCSPdash,scolby33/OCSPdash,scolby33/OCSPdash | # -*- coding: utf-8 -*-
"""The OCSPdash homepage UI blueprint."""
from flask import Blueprint, render_template
from ocspdash.web.proxies import manager
__all__ = [
'ui',
]
ui = Blueprint('ui', __name__)
@ui.route('/')
def home():
"""Show the user the home view."""
payload = manager.get_payload()
... | # -*- coding: utf-8 -*-
"""Blueprint for non-API endpoints in OCSPdash."""
from flask import Blueprint, render_template
from ocspdash.web.proxies import manager
__all__ = [
'ui',
]
ui = Blueprint('ui', __name__)
@ui.route('/')
def home():
"""Show the user the home view."""
payload = manager.get_paylo... | <commit_before># -*- coding: utf-8 -*-
"""The OCSPdash homepage UI blueprint."""
from flask import Blueprint, render_template
from ocspdash.web.proxies import manager
__all__ = [
'ui',
]
ui = Blueprint('ui', __name__)
@ui.route('/')
def home():
"""Show the user the home view."""
payload = manager.get... | # -*- coding: utf-8 -*-
"""Blueprint for non-API endpoints in OCSPdash."""
from flask import Blueprint, render_template
from ocspdash.web.proxies import manager
__all__ = [
'ui',
]
ui = Blueprint('ui', __name__)
@ui.route('/')
def home():
"""Show the user the home view."""
payload = manager.get_paylo... | # -*- coding: utf-8 -*-
"""The OCSPdash homepage UI blueprint."""
from flask import Blueprint, render_template
from ocspdash.web.proxies import manager
__all__ = [
'ui',
]
ui = Blueprint('ui', __name__)
@ui.route('/')
def home():
"""Show the user the home view."""
payload = manager.get_payload()
... | <commit_before># -*- coding: utf-8 -*-
"""The OCSPdash homepage UI blueprint."""
from flask import Blueprint, render_template
from ocspdash.web.proxies import manager
__all__ = [
'ui',
]
ui = Blueprint('ui', __name__)
@ui.route('/')
def home():
"""Show the user the home view."""
payload = manager.get... |
7fe3495398b8663cee420e3d3f8ad8d1135e2df9 | api_server/interview/send_email.py | api_server/interview/send_email.py | # -*- encoding: utf-8 -*-
import smtplib
from email.mime.text import MIMEText
from django.conf import settings
def send_text(sender, receiver, subject, body):
msg = MIMEText(body, _charset='utf-8')
msg['Subject'] = subject
msg['From'] = sender
msg['To'] = receiver
msg["Accept-Language"] = "zh-CN"... | # -*- encoding: utf-8 -*-
import smtplib
from email.mime.text import MIMEText
from django.conf import settings
def send_text(sender, receiver, subject, body):
msg = MIMEText(body, _charset='utf-8')
msg['Subject'] = subject
msg['From'] = sender
msg['To'] = receiver
msg["Accept-Language"] = "zh-CN"... | Fix encoding of email content | Fix encoding of email content
| Python | mit | t103z/interview,t103z/interview,t103z/interview,t103z/interview | # -*- encoding: utf-8 -*-
import smtplib
from email.mime.text import MIMEText
from django.conf import settings
def send_text(sender, receiver, subject, body):
msg = MIMEText(body, _charset='utf-8')
msg['Subject'] = subject
msg['From'] = sender
msg['To'] = receiver
msg["Accept-Language"] = "zh-CN"... | # -*- encoding: utf-8 -*-
import smtplib
from email.mime.text import MIMEText
from django.conf import settings
def send_text(sender, receiver, subject, body):
msg = MIMEText(body, _charset='utf-8')
msg['Subject'] = subject
msg['From'] = sender
msg['To'] = receiver
msg["Accept-Language"] = "zh-CN"... | <commit_before># -*- encoding: utf-8 -*-
import smtplib
from email.mime.text import MIMEText
from django.conf import settings
def send_text(sender, receiver, subject, body):
msg = MIMEText(body, _charset='utf-8')
msg['Subject'] = subject
msg['From'] = sender
msg['To'] = receiver
msg["Accept-Langu... | # -*- encoding: utf-8 -*-
import smtplib
from email.mime.text import MIMEText
from django.conf import settings
def send_text(sender, receiver, subject, body):
msg = MIMEText(body, _charset='utf-8')
msg['Subject'] = subject
msg['From'] = sender
msg['To'] = receiver
msg["Accept-Language"] = "zh-CN"... | # -*- encoding: utf-8 -*-
import smtplib
from email.mime.text import MIMEText
from django.conf import settings
def send_text(sender, receiver, subject, body):
msg = MIMEText(body, _charset='utf-8')
msg['Subject'] = subject
msg['From'] = sender
msg['To'] = receiver
msg["Accept-Language"] = "zh-CN"... | <commit_before># -*- encoding: utf-8 -*-
import smtplib
from email.mime.text import MIMEText
from django.conf import settings
def send_text(sender, receiver, subject, body):
msg = MIMEText(body, _charset='utf-8')
msg['Subject'] = subject
msg['From'] = sender
msg['To'] = receiver
msg["Accept-Langu... |
fef4e4ce6b05506babc2c325b08aed77af8b9a3c | cryptex/exchange.py | cryptex/exchange.py | class Exchange(object):
def get_markets(self):
"""
Returns a list of tuples of the form ('XXX', 'YYY') representing the
available markets on the exchange, where XXX and YYY are the currency
codes for the base currency and counter currency, respectively.
"""
raise No... | class Exchange(object):
def get_markets(self):
"""
Returns a list of tuples of the form ('XXX', 'YYY') representing the
available markets on the exchange, where XXX and YYY are the currency
codes for the base currency and counter currency, respectively.
"""
raise No... | Modify buy and sell interface to take market tuples | Modify buy and sell interface to take market tuples
| Python | mit | coink/cryptex | class Exchange(object):
def get_markets(self):
"""
Returns a list of tuples of the form ('XXX', 'YYY') representing the
available markets on the exchange, where XXX and YYY are the currency
codes for the base currency and counter currency, respectively.
"""
raise No... | class Exchange(object):
def get_markets(self):
"""
Returns a list of tuples of the form ('XXX', 'YYY') representing the
available markets on the exchange, where XXX and YYY are the currency
codes for the base currency and counter currency, respectively.
"""
raise No... | <commit_before>class Exchange(object):
def get_markets(self):
"""
Returns a list of tuples of the form ('XXX', 'YYY') representing the
available markets on the exchange, where XXX and YYY are the currency
codes for the base currency and counter currency, respectively.
"""
... | class Exchange(object):
def get_markets(self):
"""
Returns a list of tuples of the form ('XXX', 'YYY') representing the
available markets on the exchange, where XXX and YYY are the currency
codes for the base currency and counter currency, respectively.
"""
raise No... | class Exchange(object):
def get_markets(self):
"""
Returns a list of tuples of the form ('XXX', 'YYY') representing the
available markets on the exchange, where XXX and YYY are the currency
codes for the base currency and counter currency, respectively.
"""
raise No... | <commit_before>class Exchange(object):
def get_markets(self):
"""
Returns a list of tuples of the form ('XXX', 'YYY') representing the
available markets on the exchange, where XXX and YYY are the currency
codes for the base currency and counter currency, respectively.
"""
... |
e7b7c93efe20ac50256c33ac7b37e4e51151123f | OIPA/api/region/urls.py | OIPA/api/region/urls.py | from django.conf.urls import patterns, url
from api.region import views
urlpatterns = patterns(
'',
url(r'^$', views.RegionList.as_view(), name='region-list'),
url(
r'^/(?P<pk>[0-9]+)$',
views.RegionDetail.as_view(),
name='region-detail'
),
url(
r'^/(?P<pk>[0-9]+)/c... | from django.conf.urls import patterns, url
from api.region import views
urlpatterns = patterns(
'',
url(r'^$', views.RegionList.as_view(), name='region-list'),
url(
r'^/(?P<pk>[A-Za-z0-9]+)$',
views.RegionDetail.as_view(),
name='region-detail'
),
url(
r'^/(?P<pk>[A-... | Fix region resolve on non Integer | Fix region resolve on non Integer
| Python | agpl-3.0 | openaid-IATI/OIPA,zimmerman-zimmerman/OIPA,zimmerman-zimmerman/OIPA,openaid-IATI/OIPA,openaid-IATI/OIPA,openaid-IATI/OIPA,openaid-IATI/OIPA,zimmerman-zimmerman/OIPA,zimmerman-zimmerman/OIPA,zimmerman-zimmerman/OIPA | from django.conf.urls import patterns, url
from api.region import views
urlpatterns = patterns(
'',
url(r'^$', views.RegionList.as_view(), name='region-list'),
url(
r'^/(?P<pk>[0-9]+)$',
views.RegionDetail.as_view(),
name='region-detail'
),
url(
r'^/(?P<pk>[0-9]+)/c... | from django.conf.urls import patterns, url
from api.region import views
urlpatterns = patterns(
'',
url(r'^$', views.RegionList.as_view(), name='region-list'),
url(
r'^/(?P<pk>[A-Za-z0-9]+)$',
views.RegionDetail.as_view(),
name='region-detail'
),
url(
r'^/(?P<pk>[A-... | <commit_before>from django.conf.urls import patterns, url
from api.region import views
urlpatterns = patterns(
'',
url(r'^$', views.RegionList.as_view(), name='region-list'),
url(
r'^/(?P<pk>[0-9]+)$',
views.RegionDetail.as_view(),
name='region-detail'
),
url(
r'^/(... | from django.conf.urls import patterns, url
from api.region import views
urlpatterns = patterns(
'',
url(r'^$', views.RegionList.as_view(), name='region-list'),
url(
r'^/(?P<pk>[A-Za-z0-9]+)$',
views.RegionDetail.as_view(),
name='region-detail'
),
url(
r'^/(?P<pk>[A-... | from django.conf.urls import patterns, url
from api.region import views
urlpatterns = patterns(
'',
url(r'^$', views.RegionList.as_view(), name='region-list'),
url(
r'^/(?P<pk>[0-9]+)$',
views.RegionDetail.as_view(),
name='region-detail'
),
url(
r'^/(?P<pk>[0-9]+)/c... | <commit_before>from django.conf.urls import patterns, url
from api.region import views
urlpatterns = patterns(
'',
url(r'^$', views.RegionList.as_view(), name='region-list'),
url(
r'^/(?P<pk>[0-9]+)$',
views.RegionDetail.as_view(),
name='region-detail'
),
url(
r'^/(... |
e214e46e748881e6418ffac374a87d6ad30fcfea | packages/Python/lldbsuite/test/repl/pounwrapping/TestPOUnwrapping.py | packages/Python/lldbsuite/test/repl/pounwrapping/TestPOUnwrapping.py | # TestPOUnwrapping.py
#
# This source file is part of the Swift.org open source project
#
# Copyright (c) 2014 - 2016 Apple Inc. and the Swift project authors
# Licensed under Apache License v2.0 with Runtime Library Exception
#
# See https://swift.org/LICENSE.txt for license information
# See https://swift.org/CONTRIB... | # TestPOUnwrapping.py
#
# This source file is part of the Swift.org open source project
#
# Copyright (c) 2014 - 2016 Apple Inc. and the Swift project authors
# Licensed under Apache License v2.0 with Runtime Library Exception
#
# See https://swift.org/LICENSE.txt for license information
# See https://swift.org/CONTRIB... | Disable test that fails on bot | Disable test that fails on bot
I will look at it.
rdar://35264910
| Python | apache-2.0 | apple/swift-lldb,apple/swift-lldb,apple/swift-lldb,apple/swift-lldb,apple/swift-lldb,apple/swift-lldb | # TestPOUnwrapping.py
#
# This source file is part of the Swift.org open source project
#
# Copyright (c) 2014 - 2016 Apple Inc. and the Swift project authors
# Licensed under Apache License v2.0 with Runtime Library Exception
#
# See https://swift.org/LICENSE.txt for license information
# See https://swift.org/CONTRIB... | # TestPOUnwrapping.py
#
# This source file is part of the Swift.org open source project
#
# Copyright (c) 2014 - 2016 Apple Inc. and the Swift project authors
# Licensed under Apache License v2.0 with Runtime Library Exception
#
# See https://swift.org/LICENSE.txt for license information
# See https://swift.org/CONTRIB... | <commit_before># TestPOUnwrapping.py
#
# This source file is part of the Swift.org open source project
#
# Copyright (c) 2014 - 2016 Apple Inc. and the Swift project authors
# Licensed under Apache License v2.0 with Runtime Library Exception
#
# See https://swift.org/LICENSE.txt for license information
# See https://sw... | # TestPOUnwrapping.py
#
# This source file is part of the Swift.org open source project
#
# Copyright (c) 2014 - 2016 Apple Inc. and the Swift project authors
# Licensed under Apache License v2.0 with Runtime Library Exception
#
# See https://swift.org/LICENSE.txt for license information
# See https://swift.org/CONTRIB... | # TestPOUnwrapping.py
#
# This source file is part of the Swift.org open source project
#
# Copyright (c) 2014 - 2016 Apple Inc. and the Swift project authors
# Licensed under Apache License v2.0 with Runtime Library Exception
#
# See https://swift.org/LICENSE.txt for license information
# See https://swift.org/CONTRIB... | <commit_before># TestPOUnwrapping.py
#
# This source file is part of the Swift.org open source project
#
# Copyright (c) 2014 - 2016 Apple Inc. and the Swift project authors
# Licensed under Apache License v2.0 with Runtime Library Exception
#
# See https://swift.org/LICENSE.txt for license information
# See https://sw... |
ab845dfd7eb2142ee8bf2fb86f58544e65ac97b8 | auth0/v2/authentication/enterprise.py | auth0/v2/authentication/enterprise.py | from .base import AuthenticationBase
class Enterprise(AuthenticationBase):
def __init__(self, domain):
self.domain = domain
def saml_metadata(self, client_id):
return self.get(url='https://%s/samlp/metadata/%s' % (self.domain,
cli... | from .base import AuthenticationBase
class Enterprise(AuthenticationBase):
"""Enterprise endpoints.
Args:
domain (str): Your auth0 domain (e.g: username.auth0.com)
"""
def __init__(self, domain):
self.domain = domain
def saml_metadata(self, client_id):
"""Get SAML2.0 Me... | Add docstrings in Enterprise class | Add docstrings in Enterprise class
| Python | mit | auth0/auth0-python,auth0/auth0-python | from .base import AuthenticationBase
class Enterprise(AuthenticationBase):
def __init__(self, domain):
self.domain = domain
def saml_metadata(self, client_id):
return self.get(url='https://%s/samlp/metadata/%s' % (self.domain,
cli... | from .base import AuthenticationBase
class Enterprise(AuthenticationBase):
"""Enterprise endpoints.
Args:
domain (str): Your auth0 domain (e.g: username.auth0.com)
"""
def __init__(self, domain):
self.domain = domain
def saml_metadata(self, client_id):
"""Get SAML2.0 Me... | <commit_before>from .base import AuthenticationBase
class Enterprise(AuthenticationBase):
def __init__(self, domain):
self.domain = domain
def saml_metadata(self, client_id):
return self.get(url='https://%s/samlp/metadata/%s' % (self.domain,
... | from .base import AuthenticationBase
class Enterprise(AuthenticationBase):
"""Enterprise endpoints.
Args:
domain (str): Your auth0 domain (e.g: username.auth0.com)
"""
def __init__(self, domain):
self.domain = domain
def saml_metadata(self, client_id):
"""Get SAML2.0 Me... | from .base import AuthenticationBase
class Enterprise(AuthenticationBase):
def __init__(self, domain):
self.domain = domain
def saml_metadata(self, client_id):
return self.get(url='https://%s/samlp/metadata/%s' % (self.domain,
cli... | <commit_before>from .base import AuthenticationBase
class Enterprise(AuthenticationBase):
def __init__(self, domain):
self.domain = domain
def saml_metadata(self, client_id):
return self.get(url='https://%s/samlp/metadata/%s' % (self.domain,
... |
082e34ae8d336d2fe93ea428db0b9a72bbfd649e | templatetags/stringformat.py | templatetags/stringformat.py | from django import template
register=template.Library()
@register.filter
def stringformat(value, fmt='{}'):
'''
format the value
'''
return fmt.format(value)
| from django import template
register=template.Library()
@register.filter
def stringformat(value, fmt='{}'):
'''
format the value
'''
if isinstance(value, dict):
return fmt.format(**value)
return fmt.format(value)
| Add named format support if dict | Add named format support if dict
| Python | apache-2.0 | kensonman/webframe,kensonman/webframe,kensonman/webframe | from django import template
register=template.Library()
@register.filter
def stringformat(value, fmt='{}'):
'''
format the value
'''
return fmt.format(value)
Add named format support if dict | from django import template
register=template.Library()
@register.filter
def stringformat(value, fmt='{}'):
'''
format the value
'''
if isinstance(value, dict):
return fmt.format(**value)
return fmt.format(value)
| <commit_before>from django import template
register=template.Library()
@register.filter
def stringformat(value, fmt='{}'):
'''
format the value
'''
return fmt.format(value)
<commit_msg>Add named format support if dict<commit_after> | from django import template
register=template.Library()
@register.filter
def stringformat(value, fmt='{}'):
'''
format the value
'''
if isinstance(value, dict):
return fmt.format(**value)
return fmt.format(value)
| from django import template
register=template.Library()
@register.filter
def stringformat(value, fmt='{}'):
'''
format the value
'''
return fmt.format(value)
Add named format support if dictfrom django import template
register=template.Library()
@register.filter
def stringformat(value, fmt='{}'):
'''
... | <commit_before>from django import template
register=template.Library()
@register.filter
def stringformat(value, fmt='{}'):
'''
format the value
'''
return fmt.format(value)
<commit_msg>Add named format support if dict<commit_after>from django import template
register=template.Library()
@register.filter
de... |
e502c906e0515dc753c972656751c9fd1ef939f9 | backend/project_name/settings/test.py | backend/project_name/settings/test.py | from .base import * # noqa
SECRET_KEY = 'test'
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.sqlite3',
'NAME': base_dir_join('db.sqlite3'),
}
}
STATIC_ROOT = base_dir_join('staticfiles')
STATIC_URL = '/static/'
MEDIA_ROOT = base_dir_join('mediafiles')
MEDIA_URL = '/media/'
DEFA... | from .base import * # noqa
SECRET_KEY = 'test'
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.sqlite3',
'NAME': base_dir_join('db.sqlite3'),
}
}
STATIC_ROOT = "staticfiles"
STATIC_URL = "/static/"
MEDIA_ROOT = "mediafiles"
MEDIA_URL = "/media/"
DEFAULT_FILE_STORAGE = 'django.cor... | Fix ci build by adjust static root and media root path | Fix ci build by adjust static root and media root path
| Python | mit | vintasoftware/django-react-boilerplate,vintasoftware/django-react-boilerplate,vintasoftware/django-react-boilerplate,vintasoftware/django-react-boilerplate | from .base import * # noqa
SECRET_KEY = 'test'
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.sqlite3',
'NAME': base_dir_join('db.sqlite3'),
}
}
STATIC_ROOT = base_dir_join('staticfiles')
STATIC_URL = '/static/'
MEDIA_ROOT = base_dir_join('mediafiles')
MEDIA_URL = '/media/'
DEFA... | from .base import * # noqa
SECRET_KEY = 'test'
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.sqlite3',
'NAME': base_dir_join('db.sqlite3'),
}
}
STATIC_ROOT = "staticfiles"
STATIC_URL = "/static/"
MEDIA_ROOT = "mediafiles"
MEDIA_URL = "/media/"
DEFAULT_FILE_STORAGE = 'django.cor... | <commit_before>from .base import * # noqa
SECRET_KEY = 'test'
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.sqlite3',
'NAME': base_dir_join('db.sqlite3'),
}
}
STATIC_ROOT = base_dir_join('staticfiles')
STATIC_URL = '/static/'
MEDIA_ROOT = base_dir_join('mediafiles')
MEDIA_URL = ... | from .base import * # noqa
SECRET_KEY = 'test'
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.sqlite3',
'NAME': base_dir_join('db.sqlite3'),
}
}
STATIC_ROOT = "staticfiles"
STATIC_URL = "/static/"
MEDIA_ROOT = "mediafiles"
MEDIA_URL = "/media/"
DEFAULT_FILE_STORAGE = 'django.cor... | from .base import * # noqa
SECRET_KEY = 'test'
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.sqlite3',
'NAME': base_dir_join('db.sqlite3'),
}
}
STATIC_ROOT = base_dir_join('staticfiles')
STATIC_URL = '/static/'
MEDIA_ROOT = base_dir_join('mediafiles')
MEDIA_URL = '/media/'
DEFA... | <commit_before>from .base import * # noqa
SECRET_KEY = 'test'
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.sqlite3',
'NAME': base_dir_join('db.sqlite3'),
}
}
STATIC_ROOT = base_dir_join('staticfiles')
STATIC_URL = '/static/'
MEDIA_ROOT = base_dir_join('mediafiles')
MEDIA_URL = ... |
6b42983178f2a6fc3c485dc23825b748859351e5 | gimlet/backends/sql.py | gimlet/backends/sql.py | from sqlalchemy import MetaData, Table, Column, types, create_engine, select
from .base import BaseBackend
class SQLBackend(BaseBackend):
def __init__(self, url, table_name='gimlet_channels'):
engine = create_engine(url)
meta = MetaData()
meta.bind = engine
self.table = Table(ta... | from sqlalchemy import MetaData, Table, Column, types, create_engine, select
from .base import BaseBackend
class SQLBackend(BaseBackend):
def __init__(self, url, table_name='gimlet_channels'):
meta = MetaData(bind=create_engine(url))
self.table = Table(table_name, meta,
... | Simplify creation of MetaData in SQLBackend | Simplify creation of MetaData in SQLBackend
Squash a few lines into one.
| Python | mit | storborg/gimlet | from sqlalchemy import MetaData, Table, Column, types, create_engine, select
from .base import BaseBackend
class SQLBackend(BaseBackend):
def __init__(self, url, table_name='gimlet_channels'):
engine = create_engine(url)
meta = MetaData()
meta.bind = engine
self.table = Table(ta... | from sqlalchemy import MetaData, Table, Column, types, create_engine, select
from .base import BaseBackend
class SQLBackend(BaseBackend):
def __init__(self, url, table_name='gimlet_channels'):
meta = MetaData(bind=create_engine(url))
self.table = Table(table_name, meta,
... | <commit_before>from sqlalchemy import MetaData, Table, Column, types, create_engine, select
from .base import BaseBackend
class SQLBackend(BaseBackend):
def __init__(self, url, table_name='gimlet_channels'):
engine = create_engine(url)
meta = MetaData()
meta.bind = engine
self.t... | from sqlalchemy import MetaData, Table, Column, types, create_engine, select
from .base import BaseBackend
class SQLBackend(BaseBackend):
def __init__(self, url, table_name='gimlet_channels'):
meta = MetaData(bind=create_engine(url))
self.table = Table(table_name, meta,
... | from sqlalchemy import MetaData, Table, Column, types, create_engine, select
from .base import BaseBackend
class SQLBackend(BaseBackend):
def __init__(self, url, table_name='gimlet_channels'):
engine = create_engine(url)
meta = MetaData()
meta.bind = engine
self.table = Table(ta... | <commit_before>from sqlalchemy import MetaData, Table, Column, types, create_engine, select
from .base import BaseBackend
class SQLBackend(BaseBackend):
def __init__(self, url, table_name='gimlet_channels'):
engine = create_engine(url)
meta = MetaData()
meta.bind = engine
self.t... |
1a9e83262201ad7256c5f02c91dc38c2bdccd908 | email_auth/forms.py | email_auth/forms.py | from django import forms
from django.contrib.auth import authenticate
from django.contrib.auth.forms import AuthenticationForm as Form
from django.utils.translation import ugettext_lazy as _
class AuthenticationForm(Form):
"""Authenticate a ``User`` by email and password."""
def __init__(self, *args, **kwargs)... | from django import forms
from django.contrib.auth import authenticate
from django.contrib.auth.forms import AuthenticationForm as Form
from django.utils.translation import ugettext_lazy as _
class AuthenticationForm(Form):
"""Authenticate a ``User`` by email and password."""
def __init__(self, *args, **kwargs)... | Allow entry of usernames in email field. | Allow entry of usernames in email field.
| Python | bsd-3-clause | strange/django-email-auth | from django import forms
from django.contrib.auth import authenticate
from django.contrib.auth.forms import AuthenticationForm as Form
from django.utils.translation import ugettext_lazy as _
class AuthenticationForm(Form):
"""Authenticate a ``User`` by email and password."""
def __init__(self, *args, **kwargs)... | from django import forms
from django.contrib.auth import authenticate
from django.contrib.auth.forms import AuthenticationForm as Form
from django.utils.translation import ugettext_lazy as _
class AuthenticationForm(Form):
"""Authenticate a ``User`` by email and password."""
def __init__(self, *args, **kwargs)... | <commit_before>from django import forms
from django.contrib.auth import authenticate
from django.contrib.auth.forms import AuthenticationForm as Form
from django.utils.translation import ugettext_lazy as _
class AuthenticationForm(Form):
"""Authenticate a ``User`` by email and password."""
def __init__(self, *... | from django import forms
from django.contrib.auth import authenticate
from django.contrib.auth.forms import AuthenticationForm as Form
from django.utils.translation import ugettext_lazy as _
class AuthenticationForm(Form):
"""Authenticate a ``User`` by email and password."""
def __init__(self, *args, **kwargs)... | from django import forms
from django.contrib.auth import authenticate
from django.contrib.auth.forms import AuthenticationForm as Form
from django.utils.translation import ugettext_lazy as _
class AuthenticationForm(Form):
"""Authenticate a ``User`` by email and password."""
def __init__(self, *args, **kwargs)... | <commit_before>from django import forms
from django.contrib.auth import authenticate
from django.contrib.auth.forms import AuthenticationForm as Form
from django.utils.translation import ugettext_lazy as _
class AuthenticationForm(Form):
"""Authenticate a ``User`` by email and password."""
def __init__(self, *... |
cf44260d057e289a089c1c3c440e5f64366facfa | scraping/urls/scrape_fish.py | scraping/urls/scrape_fish.py | import pandas as pd
from subprocess import check_output
import sys
fish_df = pd.read_csv(sys.argv[1],names=['fish'])
url_dict = {}
for fish in fish_df.fish:
output = check_output(['node','scrape_image_urls.js',fish,sys.argv[2]])
splits = str(output).replace('\\n','').split(' url: ')
urls = [s.split(', ... | import pandas as pd
from subprocess import check_output
import sys
fish_df = pd.read_csv(sys.argv[1],names=['fish'])
dfs = []
for fish in fish_df.fish:
output = check_output(['node','scrape_image_urls.js',fish + ' fish',sys.argv[2]])
splits = str(output).replace('\\n','').split(' url: ')
urls = [s.split('... | Update scrape fish to handle different size url sets and to specify to google that we want fish | Update scrape fish to handle different size url sets and to specify to google that we want fish
| Python | mit | matthew-sochor/fish.io.ai,matthew-sochor/fish.io.ai,matthew-sochor/fish.io.ai,matthew-sochor/fish.io.ai | import pandas as pd
from subprocess import check_output
import sys
fish_df = pd.read_csv(sys.argv[1],names=['fish'])
url_dict = {}
for fish in fish_df.fish:
output = check_output(['node','scrape_image_urls.js',fish,sys.argv[2]])
splits = str(output).replace('\\n','').split(' url: ')
urls = [s.split(', ... | import pandas as pd
from subprocess import check_output
import sys
fish_df = pd.read_csv(sys.argv[1],names=['fish'])
dfs = []
for fish in fish_df.fish:
output = check_output(['node','scrape_image_urls.js',fish + ' fish',sys.argv[2]])
splits = str(output).replace('\\n','').split(' url: ')
urls = [s.split('... | <commit_before>import pandas as pd
from subprocess import check_output
import sys
fish_df = pd.read_csv(sys.argv[1],names=['fish'])
url_dict = {}
for fish in fish_df.fish:
output = check_output(['node','scrape_image_urls.js',fish,sys.argv[2]])
splits = str(output).replace('\\n','').split(' url: ')
urls = ... | import pandas as pd
from subprocess import check_output
import sys
fish_df = pd.read_csv(sys.argv[1],names=['fish'])
dfs = []
for fish in fish_df.fish:
output = check_output(['node','scrape_image_urls.js',fish + ' fish',sys.argv[2]])
splits = str(output).replace('\\n','').split(' url: ')
urls = [s.split('... | import pandas as pd
from subprocess import check_output
import sys
fish_df = pd.read_csv(sys.argv[1],names=['fish'])
url_dict = {}
for fish in fish_df.fish:
output = check_output(['node','scrape_image_urls.js',fish,sys.argv[2]])
splits = str(output).replace('\\n','').split(' url: ')
urls = [s.split(', ... | <commit_before>import pandas as pd
from subprocess import check_output
import sys
fish_df = pd.read_csv(sys.argv[1],names=['fish'])
url_dict = {}
for fish in fish_df.fish:
output = check_output(['node','scrape_image_urls.js',fish,sys.argv[2]])
splits = str(output).replace('\\n','').split(' url: ')
urls = ... |
a41f468f667869a433e5fbb2bd2dde797ae24586 | examples/img_client.py | examples/img_client.py | #!/usr/bin/env python
"""
This example demonstrates a client fetching images from a server running img_server.py.
The first packet contains the number of chunks to expect, and then that number of chunks is read.
Lost packets are not handled in any way.
"""
from nuts import UDPAuthChannel
channel = UDPAu... | #!/usr/bin/env python
"""
This example demonstrates a client fetching images from a server running img_server.py.
The first packet contains the number of chunks to expect, and then that number of chunks is read.
Lost packets are not handled in any way.
"""
from nuts import UDPAuthChannel
channel = UDPAu... | Set 4s timeout for img client | Set 4s timeout for img client
| Python | mit | thusoy/nuts-auth,thusoy/nuts-auth | #!/usr/bin/env python
"""
This example demonstrates a client fetching images from a server running img_server.py.
The first packet contains the number of chunks to expect, and then that number of chunks is read.
Lost packets are not handled in any way.
"""
from nuts import UDPAuthChannel
channel = UDPAu... | #!/usr/bin/env python
"""
This example demonstrates a client fetching images from a server running img_server.py.
The first packet contains the number of chunks to expect, and then that number of chunks is read.
Lost packets are not handled in any way.
"""
from nuts import UDPAuthChannel
channel = UDPAu... | <commit_before>#!/usr/bin/env python
"""
This example demonstrates a client fetching images from a server running img_server.py.
The first packet contains the number of chunks to expect, and then that number of chunks is read.
Lost packets are not handled in any way.
"""
from nuts import UDPAuthChannel
... | #!/usr/bin/env python
"""
This example demonstrates a client fetching images from a server running img_server.py.
The first packet contains the number of chunks to expect, and then that number of chunks is read.
Lost packets are not handled in any way.
"""
from nuts import UDPAuthChannel
channel = UDPAu... | #!/usr/bin/env python
"""
This example demonstrates a client fetching images from a server running img_server.py.
The first packet contains the number of chunks to expect, and then that number of chunks is read.
Lost packets are not handled in any way.
"""
from nuts import UDPAuthChannel
channel = UDPAu... | <commit_before>#!/usr/bin/env python
"""
This example demonstrates a client fetching images from a server running img_server.py.
The first packet contains the number of chunks to expect, and then that number of chunks is read.
Lost packets are not handled in any way.
"""
from nuts import UDPAuthChannel
... |
3cc8f2f212199d956c0132cc0aa12bd33e94e8dc | tests/drivers/test-facets.py | tests/drivers/test-facets.py | import pyxb.binding.generate
import pyxb.utils.domutils
from xml.dom import Node
import os.path
schema_path = '%s/../schemas/test-facets.xsd' % (os.path.dirname(__file__),)
code = pyxb.binding.generate.GeneratePython(schema_location=schema_path)
rv = compile(code, 'test', 'exec')
eval(rv)
from pyxb.exceptions_ impor... | import pyxb.binding.generate
import pyxb.utils.domutils
from xml.dom import Node
import os.path
schema_path = '%s/../schemas/test-facets.xsd' % (os.path.dirname(__file__),)
code = pyxb.binding.generate.GeneratePython(schema_location=schema_path)
rv = compile(code, 'test', 'exec')
eval(rv)
from pyxb.exceptions_ impor... | Change to support new binding model | Change to support new binding model
| Python | apache-2.0 | jonfoster/pyxb2,jonfoster/pyxb-upstream-mirror,balanced/PyXB,jonfoster/pyxb1,jonfoster/pyxb-upstream-mirror,balanced/PyXB,CantemoInternal/pyxb,jonfoster/pyxb-upstream-mirror,pabigot/pyxb,jonfoster/pyxb2,balanced/PyXB,CantemoInternal/pyxb,pabigot/pyxb,jonfoster/pyxb1,CantemoInternal/pyxb,jonfoster/pyxb2 | import pyxb.binding.generate
import pyxb.utils.domutils
from xml.dom import Node
import os.path
schema_path = '%s/../schemas/test-facets.xsd' % (os.path.dirname(__file__),)
code = pyxb.binding.generate.GeneratePython(schema_location=schema_path)
rv = compile(code, 'test', 'exec')
eval(rv)
from pyxb.exceptions_ impor... | import pyxb.binding.generate
import pyxb.utils.domutils
from xml.dom import Node
import os.path
schema_path = '%s/../schemas/test-facets.xsd' % (os.path.dirname(__file__),)
code = pyxb.binding.generate.GeneratePython(schema_location=schema_path)
rv = compile(code, 'test', 'exec')
eval(rv)
from pyxb.exceptions_ impor... | <commit_before>import pyxb.binding.generate
import pyxb.utils.domutils
from xml.dom import Node
import os.path
schema_path = '%s/../schemas/test-facets.xsd' % (os.path.dirname(__file__),)
code = pyxb.binding.generate.GeneratePython(schema_location=schema_path)
rv = compile(code, 'test', 'exec')
eval(rv)
from pyxb.ex... | import pyxb.binding.generate
import pyxb.utils.domutils
from xml.dom import Node
import os.path
schema_path = '%s/../schemas/test-facets.xsd' % (os.path.dirname(__file__),)
code = pyxb.binding.generate.GeneratePython(schema_location=schema_path)
rv = compile(code, 'test', 'exec')
eval(rv)
from pyxb.exceptions_ impor... | import pyxb.binding.generate
import pyxb.utils.domutils
from xml.dom import Node
import os.path
schema_path = '%s/../schemas/test-facets.xsd' % (os.path.dirname(__file__),)
code = pyxb.binding.generate.GeneratePython(schema_location=schema_path)
rv = compile(code, 'test', 'exec')
eval(rv)
from pyxb.exceptions_ impor... | <commit_before>import pyxb.binding.generate
import pyxb.utils.domutils
from xml.dom import Node
import os.path
schema_path = '%s/../schemas/test-facets.xsd' % (os.path.dirname(__file__),)
code = pyxb.binding.generate.GeneratePython(schema_location=schema_path)
rv = compile(code, 'test', 'exec')
eval(rv)
from pyxb.ex... |
a2a4b9f400fa6d62d3671d69d9742d06c165f7da | amaranth/ml/__main__.py | amaranth/ml/__main__.py | # Lint as: python3
"""This script is used to run the amaranth.ml module as an executable.
For now, this script just delegates it's main to amaranth.ml.train
"""
from amaranth.ml import train
def main():
train.main()
if __name__ == '__main__':
main()
| # Lint as: python3
"""This script is used to run the amaranth.ml module as an executable.
For now, this script just delegates it's main to amaranth.ml.train
"""
from amaranth.ml import train
from amaranth.ml import interactive
def main():
# List of possible functions this module can perform
# List elements shou... | Allow user to choose what to run in amaranth.ml | Allow user to choose what to run in amaranth.ml
Choose between the executables for training the model or interacting
with the model.
| Python | apache-2.0 | googleinterns/amaranth,googleinterns/amaranth | # Lint as: python3
"""This script is used to run the amaranth.ml module as an executable.
For now, this script just delegates it's main to amaranth.ml.train
"""
from amaranth.ml import train
def main():
train.main()
if __name__ == '__main__':
main()
Allow user to choose what to run in amaranth.ml
Choose betw... | # Lint as: python3
"""This script is used to run the amaranth.ml module as an executable.
For now, this script just delegates it's main to amaranth.ml.train
"""
from amaranth.ml import train
from amaranth.ml import interactive
def main():
# List of possible functions this module can perform
# List elements shou... | <commit_before># Lint as: python3
"""This script is used to run the amaranth.ml module as an executable.
For now, this script just delegates it's main to amaranth.ml.train
"""
from amaranth.ml import train
def main():
train.main()
if __name__ == '__main__':
main()
<commit_msg>Allow user to choose what to run ... | # Lint as: python3
"""This script is used to run the amaranth.ml module as an executable.
For now, this script just delegates it's main to amaranth.ml.train
"""
from amaranth.ml import train
from amaranth.ml import interactive
def main():
# List of possible functions this module can perform
# List elements shou... | # Lint as: python3
"""This script is used to run the amaranth.ml module as an executable.
For now, this script just delegates it's main to amaranth.ml.train
"""
from amaranth.ml import train
def main():
train.main()
if __name__ == '__main__':
main()
Allow user to choose what to run in amaranth.ml
Choose betw... | <commit_before># Lint as: python3
"""This script is used to run the amaranth.ml module as an executable.
For now, this script just delegates it's main to amaranth.ml.train
"""
from amaranth.ml import train
def main():
train.main()
if __name__ == '__main__':
main()
<commit_msg>Allow user to choose what to run ... |
fa0d138ce465efdd630b83ba4a7ee10888a68b4a | alg_factorial.py | alg_factorial.py | """Factorial series:
1!, 2!, 3!, ...
- Factorial(1) = 1! = 1
- Factorial(2) = 2! = 2
- Factorial(n) = n! = n * (n - 1)! = n * Factorial(n - 1)
"""
from __future__ import absolute_import
from __future__ import print_function
from __future__ import division
def factorial_recur(n):
"""Get the nth number of Fibonac... | """Factorial series:
1!, 2!, 3!, ...
- Factorial(1) = 1! = 1
- Factorial(2) = 2! = 2
- Factorial(n) = n! = n * (n - 1)! = n * Factorial(n - 1)
"""
from __future__ import absolute_import
from __future__ import print_function
from __future__ import division
def factorial_recur(n):
"""Get the nth number of factori... | Complete factorial_recur(), factorial_memo() & factorial_dp() from Hokaido | Complete factorial_recur(), factorial_memo() & factorial_dp() from Hokaido
| Python | bsd-2-clause | bowen0701/algorithms_data_structures | """Factorial series:
1!, 2!, 3!, ...
- Factorial(1) = 1! = 1
- Factorial(2) = 2! = 2
- Factorial(n) = n! = n * (n - 1)! = n * Factorial(n - 1)
"""
from __future__ import absolute_import
from __future__ import print_function
from __future__ import division
def factorial_recur(n):
"""Get the nth number of Fibonac... | """Factorial series:
1!, 2!, 3!, ...
- Factorial(1) = 1! = 1
- Factorial(2) = 2! = 2
- Factorial(n) = n! = n * (n - 1)! = n * Factorial(n - 1)
"""
from __future__ import absolute_import
from __future__ import print_function
from __future__ import division
def factorial_recur(n):
"""Get the nth number of factori... | <commit_before>"""Factorial series:
1!, 2!, 3!, ...
- Factorial(1) = 1! = 1
- Factorial(2) = 2! = 2
- Factorial(n) = n! = n * (n - 1)! = n * Factorial(n - 1)
"""
from __future__ import absolute_import
from __future__ import print_function
from __future__ import division
def factorial_recur(n):
"""Get the nth nu... | """Factorial series:
1!, 2!, 3!, ...
- Factorial(1) = 1! = 1
- Factorial(2) = 2! = 2
- Factorial(n) = n! = n * (n - 1)! = n * Factorial(n - 1)
"""
from __future__ import absolute_import
from __future__ import print_function
from __future__ import division
def factorial_recur(n):
"""Get the nth number of factori... | """Factorial series:
1!, 2!, 3!, ...
- Factorial(1) = 1! = 1
- Factorial(2) = 2! = 2
- Factorial(n) = n! = n * (n - 1)! = n * Factorial(n - 1)
"""
from __future__ import absolute_import
from __future__ import print_function
from __future__ import division
def factorial_recur(n):
"""Get the nth number of Fibonac... | <commit_before>"""Factorial series:
1!, 2!, 3!, ...
- Factorial(1) = 1! = 1
- Factorial(2) = 2! = 2
- Factorial(n) = n! = n * (n - 1)! = n * Factorial(n - 1)
"""
from __future__ import absolute_import
from __future__ import print_function
from __future__ import division
def factorial_recur(n):
"""Get the nth nu... |
6115590cde40c05b92cb6fa9e7358e08c964f4d1 | nipype/utils/config.py | nipype/utils/config.py | '''
Created on 20 Apr 2010
@author: Chris Filo Gorgolewski
'''
import ConfigParser, os
from io import StringIO
default_cfg = StringIO("""
[logging]
workflow_level = INFO
node_level = INFO
filemanip_level = INFO
[execution]
stop_on_first_crash = false
hash_method = content
""")
config = ConfigParser.ConfigParser()
c... | '''
Created on 20 Apr 2010
@author: Chris Filo Gorgolewski
'''
import ConfigParser, os
from StringIO import StringIO
default_cfg = StringIO("""
[logging]
workflow_level = INFO
node_level = INFO
filemanip_level = INFO
[execution]
stop_on_first_crash = false
hash_method = content
""")
config = ConfigParser.ConfigPars... | Use StringIO.StringIO instead of the io.StringIO. | Use StringIO.StringIO instead of the io.StringIO.
The io library is new to Python 2.6, we still support 2.5. And the doc for
the io library encourages us to continue to use StringIO.StringIO:
http://docs.python.org/whatsnew/2.6.html#pep-3116-new-i-o-library
git-svn-id: 24f545668198cdd163a527378499f2123e59bf9f@1333 ... | Python | bsd-3-clause | blakedewey/nipype,wanderine/nipype,fprados/nipype,gerddie/nipype,iglpdc/nipype,mick-d/nipype,arokem/nipype,rameshvs/nipype,iglpdc/nipype,FredLoney/nipype,mick-d/nipype_source,JohnGriffiths/nipype,dmordom/nipype,glatard/nipype,carlohamalainen/nipype,arokem/nipype,blakedewey/nipype,glatard/nipype,rameshvs/nipype,carolFro... | '''
Created on 20 Apr 2010
@author: Chris Filo Gorgolewski
'''
import ConfigParser, os
from io import StringIO
default_cfg = StringIO("""
[logging]
workflow_level = INFO
node_level = INFO
filemanip_level = INFO
[execution]
stop_on_first_crash = false
hash_method = content
""")
config = ConfigParser.ConfigParser()
c... | '''
Created on 20 Apr 2010
@author: Chris Filo Gorgolewski
'''
import ConfigParser, os
from StringIO import StringIO
default_cfg = StringIO("""
[logging]
workflow_level = INFO
node_level = INFO
filemanip_level = INFO
[execution]
stop_on_first_crash = false
hash_method = content
""")
config = ConfigParser.ConfigPars... | <commit_before>'''
Created on 20 Apr 2010
@author: Chris Filo Gorgolewski
'''
import ConfigParser, os
from io import StringIO
default_cfg = StringIO("""
[logging]
workflow_level = INFO
node_level = INFO
filemanip_level = INFO
[execution]
stop_on_first_crash = false
hash_method = content
""")
config = ConfigParser.C... | '''
Created on 20 Apr 2010
@author: Chris Filo Gorgolewski
'''
import ConfigParser, os
from StringIO import StringIO
default_cfg = StringIO("""
[logging]
workflow_level = INFO
node_level = INFO
filemanip_level = INFO
[execution]
stop_on_first_crash = false
hash_method = content
""")
config = ConfigParser.ConfigPars... | '''
Created on 20 Apr 2010
@author: Chris Filo Gorgolewski
'''
import ConfigParser, os
from io import StringIO
default_cfg = StringIO("""
[logging]
workflow_level = INFO
node_level = INFO
filemanip_level = INFO
[execution]
stop_on_first_crash = false
hash_method = content
""")
config = ConfigParser.ConfigParser()
c... | <commit_before>'''
Created on 20 Apr 2010
@author: Chris Filo Gorgolewski
'''
import ConfigParser, os
from io import StringIO
default_cfg = StringIO("""
[logging]
workflow_level = INFO
node_level = INFO
filemanip_level = INFO
[execution]
stop_on_first_crash = false
hash_method = content
""")
config = ConfigParser.C... |
cd7a8b999280e0e834e196066068f78375cfb88a | water_level/water_level.py | water_level/water_level.py | '''
Created on Aug 1, 2017
@author: alkaitz
'''
if __name__ == '__main__':
pass | '''
Created on Aug 1, 2017
@author: alkaitz
'''
'''
[3 2 3] -> 1
'''
if __name__ == '__main__':
pass | Include quick sample for water level identification | Include quick sample for water level identification
| Python | mit | alkaitz/general-programming | '''
Created on Aug 1, 2017
@author: alkaitz
'''
if __name__ == '__main__':
passInclude quick sample for water level identification | '''
Created on Aug 1, 2017
@author: alkaitz
'''
'''
[3 2 3] -> 1
'''
if __name__ == '__main__':
pass | <commit_before>'''
Created on Aug 1, 2017
@author: alkaitz
'''
if __name__ == '__main__':
pass<commit_msg>Include quick sample for water level identification<commit_after> | '''
Created on Aug 1, 2017
@author: alkaitz
'''
'''
[3 2 3] -> 1
'''
if __name__ == '__main__':
pass | '''
Created on Aug 1, 2017
@author: alkaitz
'''
if __name__ == '__main__':
passInclude quick sample for water level identification'''
Created on Aug 1, 2017
@author: alkaitz
'''
'''
[3 2 3] -> 1
'''
if __name__ == '__main__':
pass | <commit_before>'''
Created on Aug 1, 2017
@author: alkaitz
'''
if __name__ == '__main__':
pass<commit_msg>Include quick sample for water level identification<commit_after>'''
Created on Aug 1, 2017
@author: alkaitz
'''
'''
[3 2 3] -> 1
'''
if __name__ == '__main__':
pass |
3d1dba15097ac8b746c138b75fe1763aa4b8ac12 | footballseason/urls.py | footballseason/urls.py | from django.conf.urls import url
from . import views
urlpatterns = [
# eg: /footballseason/
url(r'^$', views.index, name='index'),
# eg: /footballseason/3
url(r'^(?P<week_id>[0-9]+)/$', views.display, name='display'),
# eg: /footballseason/3/submit
url(r'^(?P<week_id>[0-9]+)/submit$', views.... | from django.conf.urls import url
from . import views
urlpatterns = [
# eg: /footballseason/
url(r'^$', views.index, name='index'),
# eg: /footballseason/3/
url(r'^(?P<week_id>[0-9]+)/$', views.display, name='display'),
# eg: /footballseason/3/submit/
url(r'^(?P<week_id>[0-9]+)/submit/$', vie... | Fix URLs so APPEND_SLASH works | Fix URLs so APPEND_SLASH works
| Python | mit | mkokotovich/footballpicks,mkokotovich/footballpicks,mkokotovich/footballpicks,mkokotovich/footballpicks | from django.conf.urls import url
from . import views
urlpatterns = [
# eg: /footballseason/
url(r'^$', views.index, name='index'),
# eg: /footballseason/3
url(r'^(?P<week_id>[0-9]+)/$', views.display, name='display'),
# eg: /footballseason/3/submit
url(r'^(?P<week_id>[0-9]+)/submit$', views.... | from django.conf.urls import url
from . import views
urlpatterns = [
# eg: /footballseason/
url(r'^$', views.index, name='index'),
# eg: /footballseason/3/
url(r'^(?P<week_id>[0-9]+)/$', views.display, name='display'),
# eg: /footballseason/3/submit/
url(r'^(?P<week_id>[0-9]+)/submit/$', vie... | <commit_before>from django.conf.urls import url
from . import views
urlpatterns = [
# eg: /footballseason/
url(r'^$', views.index, name='index'),
# eg: /footballseason/3
url(r'^(?P<week_id>[0-9]+)/$', views.display, name='display'),
# eg: /footballseason/3/submit
url(r'^(?P<week_id>[0-9]+)/s... | from django.conf.urls import url
from . import views
urlpatterns = [
# eg: /footballseason/
url(r'^$', views.index, name='index'),
# eg: /footballseason/3/
url(r'^(?P<week_id>[0-9]+)/$', views.display, name='display'),
# eg: /footballseason/3/submit/
url(r'^(?P<week_id>[0-9]+)/submit/$', vie... | from django.conf.urls import url
from . import views
urlpatterns = [
# eg: /footballseason/
url(r'^$', views.index, name='index'),
# eg: /footballseason/3
url(r'^(?P<week_id>[0-9]+)/$', views.display, name='display'),
# eg: /footballseason/3/submit
url(r'^(?P<week_id>[0-9]+)/submit$', views.... | <commit_before>from django.conf.urls import url
from . import views
urlpatterns = [
# eg: /footballseason/
url(r'^$', views.index, name='index'),
# eg: /footballseason/3
url(r'^(?P<week_id>[0-9]+)/$', views.display, name='display'),
# eg: /footballseason/3/submit
url(r'^(?P<week_id>[0-9]+)/s... |
b7d8daf8377fff86662bb8721b1008667e8a4767 | gstorage/__init__.py | gstorage/__init__.py | # -*- coding: utf-8 -*-
"""
"""
__version__ = "0.0.1.1"
__author__ = "Fyndiq"
__license__ = "MIT"
__copyright__ = "Copyright 2016 Fyndiq AB"
| # -*- coding: utf-8 -*-
"""
django-gstorage
~~~~~~~~~~~~~~~
A plug-and-play replacement for FileSystemStorage but
using Google storage for persistence
"""
__version__ = '0.0.1.1'
__author__ = 'Fyndiq'
__license__ = 'MIT'
__copyright__ = 'Copyright 2016 Fyndiq AB'
| Add a one-liner about module functionality and tidy double quotes | Add a one-liner about module functionality and tidy double quotes
| Python | mit | fyndiq/django-gstorage | # -*- coding: utf-8 -*-
"""
"""
__version__ = "0.0.1.1"
__author__ = "Fyndiq"
__license__ = "MIT"
__copyright__ = "Copyright 2016 Fyndiq AB"
Add a one-liner about module functionality and tidy double quotes | # -*- coding: utf-8 -*-
"""
django-gstorage
~~~~~~~~~~~~~~~
A plug-and-play replacement for FileSystemStorage but
using Google storage for persistence
"""
__version__ = '0.0.1.1'
__author__ = 'Fyndiq'
__license__ = 'MIT'
__copyright__ = 'Copyright 2016 Fyndiq AB'
| <commit_before># -*- coding: utf-8 -*-
"""
"""
__version__ = "0.0.1.1"
__author__ = "Fyndiq"
__license__ = "MIT"
__copyright__ = "Copyright 2016 Fyndiq AB"
<commit_msg>Add a one-liner about module functionality and tidy double quotes<commit_after> | # -*- coding: utf-8 -*-
"""
django-gstorage
~~~~~~~~~~~~~~~
A plug-and-play replacement for FileSystemStorage but
using Google storage for persistence
"""
__version__ = '0.0.1.1'
__author__ = 'Fyndiq'
__license__ = 'MIT'
__copyright__ = 'Copyright 2016 Fyndiq AB'
| # -*- coding: utf-8 -*-
"""
"""
__version__ = "0.0.1.1"
__author__ = "Fyndiq"
__license__ = "MIT"
__copyright__ = "Copyright 2016 Fyndiq AB"
Add a one-liner about module functionality and tidy double quotes# -*- coding: utf-8 -*-
"""
django-gstorage
~~~~~~~~~~~~~~~
A plug-and-play replacement for FileSyst... | <commit_before># -*- coding: utf-8 -*-
"""
"""
__version__ = "0.0.1.1"
__author__ = "Fyndiq"
__license__ = "MIT"
__copyright__ = "Copyright 2016 Fyndiq AB"
<commit_msg>Add a one-liner about module functionality and tidy double quotes<commit_after># -*- coding: utf-8 -*-
"""
django-gstorage
~~~~~~~~~~~~~~~
... |
cd67e3d2419fd84fd11e469d17562bba19131099 | looknsay.py | looknsay.py | #!/usr/bin/env python3
from argparse import ArgumentParser
from itertools import groupby
def iterate(n):
result = 0
digits = [int(i) for i in str(n)]
for k, g in groupby(digits):
result = result * 100 + len(tuple(g)) * 10 + k
return result
def compute(n, i=20):
yield n
x = n
for... | #!/usr/bin/env python3
from argparse import ArgumentParser
from itertools import groupby
def iterate(n):
result = 0
digits = [int(i) for i in str(n)]
for k, g in groupby(digits):
result = result * 100 + len(tuple(g)) * 10 + k
return result
def compute(n, i=20):
yield n
x = n
for... | Add option to print only last step of iteration. | Add option to print only last step of iteration.
| Python | unlicense | jajakobyly/looknsay | #!/usr/bin/env python3
from argparse import ArgumentParser
from itertools import groupby
def iterate(n):
result = 0
digits = [int(i) for i in str(n)]
for k, g in groupby(digits):
result = result * 100 + len(tuple(g)) * 10 + k
return result
def compute(n, i=20):
yield n
x = n
for... | #!/usr/bin/env python3
from argparse import ArgumentParser
from itertools import groupby
def iterate(n):
result = 0
digits = [int(i) for i in str(n)]
for k, g in groupby(digits):
result = result * 100 + len(tuple(g)) * 10 + k
return result
def compute(n, i=20):
yield n
x = n
for... | <commit_before>#!/usr/bin/env python3
from argparse import ArgumentParser
from itertools import groupby
def iterate(n):
result = 0
digits = [int(i) for i in str(n)]
for k, g in groupby(digits):
result = result * 100 + len(tuple(g)) * 10 + k
return result
def compute(n, i=20):
yield n
... | #!/usr/bin/env python3
from argparse import ArgumentParser
from itertools import groupby
def iterate(n):
result = 0
digits = [int(i) for i in str(n)]
for k, g in groupby(digits):
result = result * 100 + len(tuple(g)) * 10 + k
return result
def compute(n, i=20):
yield n
x = n
for... | #!/usr/bin/env python3
from argparse import ArgumentParser
from itertools import groupby
def iterate(n):
result = 0
digits = [int(i) for i in str(n)]
for k, g in groupby(digits):
result = result * 100 + len(tuple(g)) * 10 + k
return result
def compute(n, i=20):
yield n
x = n
for... | <commit_before>#!/usr/bin/env python3
from argparse import ArgumentParser
from itertools import groupby
def iterate(n):
result = 0
digits = [int(i) for i in str(n)]
for k, g in groupby(digits):
result = result * 100 + len(tuple(g)) * 10 + k
return result
def compute(n, i=20):
yield n
... |
72d193956d1be4e0fbbe92b417d9022770de823b | fabfile/__init__.py | fabfile/__init__.py | """Django project fabfile."""
import os
from fabric.api import puts, task
from fabric.utils import indent
from deploy import deploy_to_heroku, prepare_to_deploy, tag_project
from publish import update_staticfiles, upload_staticfiles
from settings import PROJECT_ENVIRONMENT, PROJECT_ROOT, SITE_NAME, STATIC_ROOT
@tas... | """Django project fabfile."""
import os
from fabric.api import puts, task
from fabric.utils import indent
from deploy import deploy_to_heroku, prepare_to_deploy, tag_project
from publish import update_staticfiles, upload_staticfiles
from settings import PROJECT_ENVIRONMENT, PROJECT_ROOT, SITE_NAME, STATIC_ROOT
@tas... | Add a skip_publish flag to the deploy task. | Add a skip_publish flag to the deploy task.
| Python | mit | PrecisionMojo/pm-www,PrecisionMojo/pm-www | """Django project fabfile."""
import os
from fabric.api import puts, task
from fabric.utils import indent
from deploy import deploy_to_heroku, prepare_to_deploy, tag_project
from publish import update_staticfiles, upload_staticfiles
from settings import PROJECT_ENVIRONMENT, PROJECT_ROOT, SITE_NAME, STATIC_ROOT
@tas... | """Django project fabfile."""
import os
from fabric.api import puts, task
from fabric.utils import indent
from deploy import deploy_to_heroku, prepare_to_deploy, tag_project
from publish import update_staticfiles, upload_staticfiles
from settings import PROJECT_ENVIRONMENT, PROJECT_ROOT, SITE_NAME, STATIC_ROOT
@tas... | <commit_before>"""Django project fabfile."""
import os
from fabric.api import puts, task
from fabric.utils import indent
from deploy import deploy_to_heroku, prepare_to_deploy, tag_project
from publish import update_staticfiles, upload_staticfiles
from settings import PROJECT_ENVIRONMENT, PROJECT_ROOT, SITE_NAME, STA... | """Django project fabfile."""
import os
from fabric.api import puts, task
from fabric.utils import indent
from deploy import deploy_to_heroku, prepare_to_deploy, tag_project
from publish import update_staticfiles, upload_staticfiles
from settings import PROJECT_ENVIRONMENT, PROJECT_ROOT, SITE_NAME, STATIC_ROOT
@tas... | """Django project fabfile."""
import os
from fabric.api import puts, task
from fabric.utils import indent
from deploy import deploy_to_heroku, prepare_to_deploy, tag_project
from publish import update_staticfiles, upload_staticfiles
from settings import PROJECT_ENVIRONMENT, PROJECT_ROOT, SITE_NAME, STATIC_ROOT
@tas... | <commit_before>"""Django project fabfile."""
import os
from fabric.api import puts, task
from fabric.utils import indent
from deploy import deploy_to_heroku, prepare_to_deploy, tag_project
from publish import update_staticfiles, upload_staticfiles
from settings import PROJECT_ENVIRONMENT, PROJECT_ROOT, SITE_NAME, STA... |
e0055226a9d10d726fcde948ea72ac2e84f8109a | falafel/__init__.py | falafel/__init__.py | import os
from .core import LogFileOutput, Mapper, IniConfigFile, LegacyItemAccess # noqa: F401
from .core.plugins import mapper, reducer, make_response, make_metadata # noqa: F401
from .mappers import get_active_lines # noqa: F401
from .util import defaults, parse_table # noqa: F401
__here__ = os.path.dirname(os.... | import os
from .core import LogFileOutput, Mapper, IniConfigFile, LegacyItemAccess # noqa: F401
from .core import FileListing # noqa: F401
from .core.plugins import mapper, reducer, make_response, make_metadata # noqa: F401
from .mappers import get_active_lines # noqa: F401
from .util import defaults, parse_table ... | Add FileListing to objects we export | Add FileListing to objects we export
| Python | apache-2.0 | RedHatInsights/insights-core,RedHatInsights/insights-core | import os
from .core import LogFileOutput, Mapper, IniConfigFile, LegacyItemAccess # noqa: F401
from .core.plugins import mapper, reducer, make_response, make_metadata # noqa: F401
from .mappers import get_active_lines # noqa: F401
from .util import defaults, parse_table # noqa: F401
__here__ = os.path.dirname(os.... | import os
from .core import LogFileOutput, Mapper, IniConfigFile, LegacyItemAccess # noqa: F401
from .core import FileListing # noqa: F401
from .core.plugins import mapper, reducer, make_response, make_metadata # noqa: F401
from .mappers import get_active_lines # noqa: F401
from .util import defaults, parse_table ... | <commit_before>import os
from .core import LogFileOutput, Mapper, IniConfigFile, LegacyItemAccess # noqa: F401
from .core.plugins import mapper, reducer, make_response, make_metadata # noqa: F401
from .mappers import get_active_lines # noqa: F401
from .util import defaults, parse_table # noqa: F401
__here__ = os.p... | import os
from .core import LogFileOutput, Mapper, IniConfigFile, LegacyItemAccess # noqa: F401
from .core import FileListing # noqa: F401
from .core.plugins import mapper, reducer, make_response, make_metadata # noqa: F401
from .mappers import get_active_lines # noqa: F401
from .util import defaults, parse_table ... | import os
from .core import LogFileOutput, Mapper, IniConfigFile, LegacyItemAccess # noqa: F401
from .core.plugins import mapper, reducer, make_response, make_metadata # noqa: F401
from .mappers import get_active_lines # noqa: F401
from .util import defaults, parse_table # noqa: F401
__here__ = os.path.dirname(os.... | <commit_before>import os
from .core import LogFileOutput, Mapper, IniConfigFile, LegacyItemAccess # noqa: F401
from .core.plugins import mapper, reducer, make_response, make_metadata # noqa: F401
from .mappers import get_active_lines # noqa: F401
from .util import defaults, parse_table # noqa: F401
__here__ = os.p... |
25f2692d5865a76533f8087c2f566299ae777c8e | conman/redirects/views.py | conman/redirects/views.py | from django.views.generic import RedirectView
class RouteRedirectView(RedirectView):
"""Redirect to the target Route."""
def get_redirect_url(self, *args, **kwargs):
"""
Return the route's target url.
Save the route's redirect type for use by RedirectView.
"""
redirect... | from django.views.generic import RedirectView
class RouteRedirectView(RedirectView):
"""Redirect to the target Route."""
permanent = True # Set to django 1.9's default to avoid RemovedInDjango19Warning
def get_redirect_url(self, *args, **kwargs):
"""
Return the route's target url.
... | Set variable to future default | Set variable to future default
Deprecation warning was:
RemovedInDjango19Warning: Default value of 'RedirectView.permanent' will
change from True to False in Django 1.9. Set an explicit value to
silence this warning.
| Python | bsd-2-clause | meshy/django-conman,meshy/django-conman,Ian-Foote/django-conman | from django.views.generic import RedirectView
class RouteRedirectView(RedirectView):
"""Redirect to the target Route."""
def get_redirect_url(self, *args, **kwargs):
"""
Return the route's target url.
Save the route's redirect type for use by RedirectView.
"""
redirect... | from django.views.generic import RedirectView
class RouteRedirectView(RedirectView):
"""Redirect to the target Route."""
permanent = True # Set to django 1.9's default to avoid RemovedInDjango19Warning
def get_redirect_url(self, *args, **kwargs):
"""
Return the route's target url.
... | <commit_before>from django.views.generic import RedirectView
class RouteRedirectView(RedirectView):
"""Redirect to the target Route."""
def get_redirect_url(self, *args, **kwargs):
"""
Return the route's target url.
Save the route's redirect type for use by RedirectView.
"""
... | from django.views.generic import RedirectView
class RouteRedirectView(RedirectView):
"""Redirect to the target Route."""
permanent = True # Set to django 1.9's default to avoid RemovedInDjango19Warning
def get_redirect_url(self, *args, **kwargs):
"""
Return the route's target url.
... | from django.views.generic import RedirectView
class RouteRedirectView(RedirectView):
"""Redirect to the target Route."""
def get_redirect_url(self, *args, **kwargs):
"""
Return the route's target url.
Save the route's redirect type for use by RedirectView.
"""
redirect... | <commit_before>from django.views.generic import RedirectView
class RouteRedirectView(RedirectView):
"""Redirect to the target Route."""
def get_redirect_url(self, *args, **kwargs):
"""
Return the route's target url.
Save the route's redirect type for use by RedirectView.
"""
... |
f28d1c7b1daba6a2ca4d8b2537e861d8146bc998 | src/competition/validators.py | src/competition/validators.py | from django.core.exceptions import ValidationError
from django.template.defaultfilters import slugify
import re
NAME_REGULAR_EXPRESSION = re.compile(r'^[a-zA-Z0-9]+[\w\-\.: ]*$')
def greater_than_zero(value):
"""Checks if value is greater than zero"""
if value <= 0:
raise ValidationError("Value must ... | from django.core.exceptions import ValidationError
from django.template.defaultfilters import slugify
import re
NAME_REGULAR_EXPRESSION = re.compile(r'^[a-zA-Z0-9]+[\w\-\.: ]*$')
def greater_than_zero(value):
"""Checks if value is greater than zero"""
if value <= 0:
raise ValidationError("Value must ... | Remove whitespace from name when checking for bye | Remove whitespace from name when checking for bye
| Python | bsd-3-clause | michaelwisely/django-competition,michaelwisely/django-competition,michaelwisely/django-competition | from django.core.exceptions import ValidationError
from django.template.defaultfilters import slugify
import re
NAME_REGULAR_EXPRESSION = re.compile(r'^[a-zA-Z0-9]+[\w\-\.: ]*$')
def greater_than_zero(value):
"""Checks if value is greater than zero"""
if value <= 0:
raise ValidationError("Value must ... | from django.core.exceptions import ValidationError
from django.template.defaultfilters import slugify
import re
NAME_REGULAR_EXPRESSION = re.compile(r'^[a-zA-Z0-9]+[\w\-\.: ]*$')
def greater_than_zero(value):
"""Checks if value is greater than zero"""
if value <= 0:
raise ValidationError("Value must ... | <commit_before>from django.core.exceptions import ValidationError
from django.template.defaultfilters import slugify
import re
NAME_REGULAR_EXPRESSION = re.compile(r'^[a-zA-Z0-9]+[\w\-\.: ]*$')
def greater_than_zero(value):
"""Checks if value is greater than zero"""
if value <= 0:
raise ValidationErr... | from django.core.exceptions import ValidationError
from django.template.defaultfilters import slugify
import re
NAME_REGULAR_EXPRESSION = re.compile(r'^[a-zA-Z0-9]+[\w\-\.: ]*$')
def greater_than_zero(value):
"""Checks if value is greater than zero"""
if value <= 0:
raise ValidationError("Value must ... | from django.core.exceptions import ValidationError
from django.template.defaultfilters import slugify
import re
NAME_REGULAR_EXPRESSION = re.compile(r'^[a-zA-Z0-9]+[\w\-\.: ]*$')
def greater_than_zero(value):
"""Checks if value is greater than zero"""
if value <= 0:
raise ValidationError("Value must ... | <commit_before>from django.core.exceptions import ValidationError
from django.template.defaultfilters import slugify
import re
NAME_REGULAR_EXPRESSION = re.compile(r'^[a-zA-Z0-9]+[\w\-\.: ]*$')
def greater_than_zero(value):
"""Checks if value is greater than zero"""
if value <= 0:
raise ValidationErr... |
38e25c5219476f51ca391fcea5e629177f4dde84 | daisyproducer/documents/storage.py | daisyproducer/documents/storage.py | """
A storage implementation that overwrites exiting files in the storage
See "Writing a custom storage system"
(https://docs.djangoproject.com/en/1.3/howto/custom-file-storage/) and
the discussion on stackoverflow on "ImageField overwrite image file"
(http://stackoverflow.com/questions/9522759/imagefield-overwrite-im... | """
A storage implementation that overwrites exiting files in the storage
See "Writing a custom storage system"
(https://docs.djangoproject.com/en/1.3/howto/custom-file-storage/) and
the discussion on stackoverflow on "ImageField overwrite image file"
(http://stackoverflow.com/questions/9522759/imagefield-overwrite-im... | Migrate to new Storage API | Migrate to new Storage API
for Django 1.8
| Python | agpl-3.0 | sbsdev/daisyproducer,sbsdev/daisyproducer,sbsdev/daisyproducer,sbsdev/daisyproducer | """
A storage implementation that overwrites exiting files in the storage
See "Writing a custom storage system"
(https://docs.djangoproject.com/en/1.3/howto/custom-file-storage/) and
the discussion on stackoverflow on "ImageField overwrite image file"
(http://stackoverflow.com/questions/9522759/imagefield-overwrite-im... | """
A storage implementation that overwrites exiting files in the storage
See "Writing a custom storage system"
(https://docs.djangoproject.com/en/1.3/howto/custom-file-storage/) and
the discussion on stackoverflow on "ImageField overwrite image file"
(http://stackoverflow.com/questions/9522759/imagefield-overwrite-im... | <commit_before>"""
A storage implementation that overwrites exiting files in the storage
See "Writing a custom storage system"
(https://docs.djangoproject.com/en/1.3/howto/custom-file-storage/) and
the discussion on stackoverflow on "ImageField overwrite image file"
(http://stackoverflow.com/questions/9522759/imagefie... | """
A storage implementation that overwrites exiting files in the storage
See "Writing a custom storage system"
(https://docs.djangoproject.com/en/1.3/howto/custom-file-storage/) and
the discussion on stackoverflow on "ImageField overwrite image file"
(http://stackoverflow.com/questions/9522759/imagefield-overwrite-im... | """
A storage implementation that overwrites exiting files in the storage
See "Writing a custom storage system"
(https://docs.djangoproject.com/en/1.3/howto/custom-file-storage/) and
the discussion on stackoverflow on "ImageField overwrite image file"
(http://stackoverflow.com/questions/9522759/imagefield-overwrite-im... | <commit_before>"""
A storage implementation that overwrites exiting files in the storage
See "Writing a custom storage system"
(https://docs.djangoproject.com/en/1.3/howto/custom-file-storage/) and
the discussion on stackoverflow on "ImageField overwrite image file"
(http://stackoverflow.com/questions/9522759/imagefie... |
07d8c7be45e80741fc024b14fff8f0ae8a20c4c5 | instance/tasks.py | instance/tasks.py | # -*- encoding: utf-8 -*-
#
# Copyright (c) 2015, OpenCraft
#
# Imports #####################################################################
from huey.djhuey import crontab, db_periodic_task, task
from instance.github import get_watched_pr_list
from .models import OpenEdXInstance
# Logging #######################... | # -*- encoding: utf-8 -*-
#
# Copyright (c) 2015, OpenCraft
#
# Imports #####################################################################
from huey.djhuey import crontab, db_periodic_task, task
from instance.github import get_watched_pr_list
from .models import OpenEdXInstance
# Logging #######################... | Update default PR sandbox subdomain to not overlap existing sandboxes | Update default PR sandbox subdomain to not overlap existing sandboxes
| Python | agpl-3.0 | omarkhan/opencraft,open-craft/opencraft,omarkhan/opencraft,omarkhan/opencraft,open-craft/opencraft,open-craft/opencraft,omarkhan/opencraft,brousch/opencraft,open-craft/opencraft,open-craft/opencraft,brousch/opencraft,brousch/opencraft | # -*- encoding: utf-8 -*-
#
# Copyright (c) 2015, OpenCraft
#
# Imports #####################################################################
from huey.djhuey import crontab, db_periodic_task, task
from instance.github import get_watched_pr_list
from .models import OpenEdXInstance
# Logging #######################... | # -*- encoding: utf-8 -*-
#
# Copyright (c) 2015, OpenCraft
#
# Imports #####################################################################
from huey.djhuey import crontab, db_periodic_task, task
from instance.github import get_watched_pr_list
from .models import OpenEdXInstance
# Logging #######################... | <commit_before># -*- encoding: utf-8 -*-
#
# Copyright (c) 2015, OpenCraft
#
# Imports #####################################################################
from huey.djhuey import crontab, db_periodic_task, task
from instance.github import get_watched_pr_list
from .models import OpenEdXInstance
# Logging ########... | # -*- encoding: utf-8 -*-
#
# Copyright (c) 2015, OpenCraft
#
# Imports #####################################################################
from huey.djhuey import crontab, db_periodic_task, task
from instance.github import get_watched_pr_list
from .models import OpenEdXInstance
# Logging #######################... | # -*- encoding: utf-8 -*-
#
# Copyright (c) 2015, OpenCraft
#
# Imports #####################################################################
from huey.djhuey import crontab, db_periodic_task, task
from instance.github import get_watched_pr_list
from .models import OpenEdXInstance
# Logging #######################... | <commit_before># -*- encoding: utf-8 -*-
#
# Copyright (c) 2015, OpenCraft
#
# Imports #####################################################################
from huey.djhuey import crontab, db_periodic_task, task
from instance.github import get_watched_pr_list
from .models import OpenEdXInstance
# Logging ########... |
7cc1a78d4fefcb216a6c8d5128d05ba9e70f5246 | jazzband/hooks.py | jazzband/hooks.py | from flask.ext.hookserver import Hooks
from .models import db, User
hooks = Hooks()
@hooks.hook('ping')
def ping(data, guid):
return 'pong'
@hooks.hook('membership')
def membership(data, guid):
if data['scope'] != 'team':
return
member = User.query.filter_by(id=data['member']['id']).first()
... | from flask.ext.hookserver import Hooks
from .models import db, User
hooks = Hooks()
@hooks.hook('ping')
def ping(data, guid):
return 'pong'
@hooks.hook('membership')
def membership(data, guid):
if data['scope'] != 'team':
return
member = User.query.filter_by(id=data['member']['id']).first()
... | Return a response for the membership webhook. | Return a response for the membership webhook.
| Python | mit | jazzband/website,jazzband/website,jazzband/website,jazzband/site,jazzband/jazzband-site,jazzband/site,jazzband/jazzband-site,jazzband/website | from flask.ext.hookserver import Hooks
from .models import db, User
hooks = Hooks()
@hooks.hook('ping')
def ping(data, guid):
return 'pong'
@hooks.hook('membership')
def membership(data, guid):
if data['scope'] != 'team':
return
member = User.query.filter_by(id=data['member']['id']).first()
... | from flask.ext.hookserver import Hooks
from .models import db, User
hooks = Hooks()
@hooks.hook('ping')
def ping(data, guid):
return 'pong'
@hooks.hook('membership')
def membership(data, guid):
if data['scope'] != 'team':
return
member = User.query.filter_by(id=data['member']['id']).first()
... | <commit_before>from flask.ext.hookserver import Hooks
from .models import db, User
hooks = Hooks()
@hooks.hook('ping')
def ping(data, guid):
return 'pong'
@hooks.hook('membership')
def membership(data, guid):
if data['scope'] != 'team':
return
member = User.query.filter_by(id=data['member']['... | from flask.ext.hookserver import Hooks
from .models import db, User
hooks = Hooks()
@hooks.hook('ping')
def ping(data, guid):
return 'pong'
@hooks.hook('membership')
def membership(data, guid):
if data['scope'] != 'team':
return
member = User.query.filter_by(id=data['member']['id']).first()
... | from flask.ext.hookserver import Hooks
from .models import db, User
hooks = Hooks()
@hooks.hook('ping')
def ping(data, guid):
return 'pong'
@hooks.hook('membership')
def membership(data, guid):
if data['scope'] != 'team':
return
member = User.query.filter_by(id=data['member']['id']).first()
... | <commit_before>from flask.ext.hookserver import Hooks
from .models import db, User
hooks = Hooks()
@hooks.hook('ping')
def ping(data, guid):
return 'pong'
@hooks.hook('membership')
def membership(data, guid):
if data['scope'] != 'team':
return
member = User.query.filter_by(id=data['member']['... |
acb348ae14bbbef6ea6a51d926fef975f8684fdd | gather/commands.py | gather/commands.py | from gather.organiser import NotEnoughPlayersError
def strip_help(bot):
messages = []
for regex, action in bot.actions.values():
if action.__doc__:
messages.append(action.__doc__.strip())
return messages
async def bot_help(bot, channel, author, message):
await bot.say_lines(chan... | from gather.organiser import NotEnoughPlayersError
def strip_help(bot):
messages = []
for regex, action in bot.actions.values():
if action.__doc__:
messages.append(action.__doc__.strip())
return messages
async def bot_help(bot, channel, author, message):
await bot.say_lines(chan... | Use right command to select teams | Use right command to select teams
| Python | mit | veryhappythings/discord-gather | from gather.organiser import NotEnoughPlayersError
def strip_help(bot):
messages = []
for regex, action in bot.actions.values():
if action.__doc__:
messages.append(action.__doc__.strip())
return messages
async def bot_help(bot, channel, author, message):
await bot.say_lines(chan... | from gather.organiser import NotEnoughPlayersError
def strip_help(bot):
messages = []
for regex, action in bot.actions.values():
if action.__doc__:
messages.append(action.__doc__.strip())
return messages
async def bot_help(bot, channel, author, message):
await bot.say_lines(chan... | <commit_before>from gather.organiser import NotEnoughPlayersError
def strip_help(bot):
messages = []
for regex, action in bot.actions.values():
if action.__doc__:
messages.append(action.__doc__.strip())
return messages
async def bot_help(bot, channel, author, message):
await bot... | from gather.organiser import NotEnoughPlayersError
def strip_help(bot):
messages = []
for regex, action in bot.actions.values():
if action.__doc__:
messages.append(action.__doc__.strip())
return messages
async def bot_help(bot, channel, author, message):
await bot.say_lines(chan... | from gather.organiser import NotEnoughPlayersError
def strip_help(bot):
messages = []
for regex, action in bot.actions.values():
if action.__doc__:
messages.append(action.__doc__.strip())
return messages
async def bot_help(bot, channel, author, message):
await bot.say_lines(chan... | <commit_before>from gather.organiser import NotEnoughPlayersError
def strip_help(bot):
messages = []
for regex, action in bot.actions.values():
if action.__doc__:
messages.append(action.__doc__.strip())
return messages
async def bot_help(bot, channel, author, message):
await bot... |
6d1dcaa08969e369b25debc010d7675ec8099724 | pnnl/models/__init__.py | pnnl/models/__init__.py | import importlib
import logging
from volttron.platform.agent import utils
_log = logging.getLogger(__name__)
utils.setup_logging()
__version__ = "0.1"
__all__ = ['Model']
class Model(object):
def __init__(self, config, **kwargs):
self.model = None
config = self.store_model_config(config)
... | import importlib
import logging
from volttron.platform.agent import utils
_log = logging.getLogger(__name__)
utils.setup_logging()
__version__ = "0.1"
__all__ = ['Model']
class Model(object):
def __init__(self, config, **kwargs):
self.model = None
config = self.store_model_config(config)
... | Add check to verify if model is in config callback state. | Add check to verify if model is in config callback state.
| Python | bsd-3-clause | VOLTTRON/volttron-applications,VOLTTRON/volttron-applications,VOLTTRON/volttron-applications,VOLTTRON/volttron-applications,VOLTTRON/volttron-applications | import importlib
import logging
from volttron.platform.agent import utils
_log = logging.getLogger(__name__)
utils.setup_logging()
__version__ = "0.1"
__all__ = ['Model']
class Model(object):
def __init__(self, config, **kwargs):
self.model = None
config = self.store_model_config(config)
... | import importlib
import logging
from volttron.platform.agent import utils
_log = logging.getLogger(__name__)
utils.setup_logging()
__version__ = "0.1"
__all__ = ['Model']
class Model(object):
def __init__(self, config, **kwargs):
self.model = None
config = self.store_model_config(config)
... | <commit_before>import importlib
import logging
from volttron.platform.agent import utils
_log = logging.getLogger(__name__)
utils.setup_logging()
__version__ = "0.1"
__all__ = ['Model']
class Model(object):
def __init__(self, config, **kwargs):
self.model = None
config = self.store_model_config(... | import importlib
import logging
from volttron.platform.agent import utils
_log = logging.getLogger(__name__)
utils.setup_logging()
__version__ = "0.1"
__all__ = ['Model']
class Model(object):
def __init__(self, config, **kwargs):
self.model = None
config = self.store_model_config(config)
... | import importlib
import logging
from volttron.platform.agent import utils
_log = logging.getLogger(__name__)
utils.setup_logging()
__version__ = "0.1"
__all__ = ['Model']
class Model(object):
def __init__(self, config, **kwargs):
self.model = None
config = self.store_model_config(config)
... | <commit_before>import importlib
import logging
from volttron.platform.agent import utils
_log = logging.getLogger(__name__)
utils.setup_logging()
__version__ = "0.1"
__all__ = ['Model']
class Model(object):
def __init__(self, config, **kwargs):
self.model = None
config = self.store_model_config(... |
7ce8e8e217e80098ce2b6371dd6c117009843602 | pyxform/tests_v1/test_whitespace.py | pyxform/tests_v1/test_whitespace.py | from pyxform.tests_v1.pyxform_test_case import PyxformTestCase
class WhitespaceTest(PyxformTestCase):
def test_over_trim(self):
self.assertPyxformXform(
name='issue96',
md="""
| survey | | | |
| | type | l... | from pyxform.tests_v1.pyxform_test_case import PyxformTestCase
class WhitespaceTest(PyxformTestCase):
def test_over_trim(self):
self.assertPyxformXform(
name='issue96',
md="""
| survey | | | |
| | type | l... | Remove test that can't be fulfilled | Remove test that can't be fulfilled
| Python | bsd-2-clause | XLSForm/pyxform,XLSForm/pyxform | from pyxform.tests_v1.pyxform_test_case import PyxformTestCase
class WhitespaceTest(PyxformTestCase):
def test_over_trim(self):
self.assertPyxformXform(
name='issue96',
md="""
| survey | | | |
| | type | l... | from pyxform.tests_v1.pyxform_test_case import PyxformTestCase
class WhitespaceTest(PyxformTestCase):
def test_over_trim(self):
self.assertPyxformXform(
name='issue96',
md="""
| survey | | | |
| | type | l... | <commit_before>from pyxform.tests_v1.pyxform_test_case import PyxformTestCase
class WhitespaceTest(PyxformTestCase):
def test_over_trim(self):
self.assertPyxformXform(
name='issue96',
md="""
| survey | | | |
| | type... | from pyxform.tests_v1.pyxform_test_case import PyxformTestCase
class WhitespaceTest(PyxformTestCase):
def test_over_trim(self):
self.assertPyxformXform(
name='issue96',
md="""
| survey | | | |
| | type | l... | from pyxform.tests_v1.pyxform_test_case import PyxformTestCase
class WhitespaceTest(PyxformTestCase):
def test_over_trim(self):
self.assertPyxformXform(
name='issue96',
md="""
| survey | | | |
| | type | l... | <commit_before>from pyxform.tests_v1.pyxform_test_case import PyxformTestCase
class WhitespaceTest(PyxformTestCase):
def test_over_trim(self):
self.assertPyxformXform(
name='issue96',
md="""
| survey | | | |
| | type... |
7e6de52fd77ab865164368d90f7c2cfc8369b4fe | pyinfra_cli/__main__.py | pyinfra_cli/__main__.py | import os
import signal
import sys
import click
import gevent
import pyinfra
from .legacy import run_main_with_legacy_arguments
from .main import cli, main
# Set CLI mode
pyinfra.is_cli = True
# Don't write out deploy.pyc/config.pyc etc
sys.dont_write_bytecode = True
# Make sure imported files (deploy.py/etc) be... | import os
import signal
import sys
import click
import gevent
import pyinfra
from .legacy import run_main_with_legacy_arguments
from .main import cli, main
# Set CLI mode
pyinfra.is_cli = True
# Don't write out deploy.pyc/config.pyc etc
sys.dont_write_bytecode = True
# Make sure imported files (deploy.py/etc) be... | Use `gevent.signal_handler` not `gevent.signal` (gevent1.5). | Use `gevent.signal_handler` not `gevent.signal` (gevent1.5).
| Python | mit | Fizzadar/pyinfra,Fizzadar/pyinfra | import os
import signal
import sys
import click
import gevent
import pyinfra
from .legacy import run_main_with_legacy_arguments
from .main import cli, main
# Set CLI mode
pyinfra.is_cli = True
# Don't write out deploy.pyc/config.pyc etc
sys.dont_write_bytecode = True
# Make sure imported files (deploy.py/etc) be... | import os
import signal
import sys
import click
import gevent
import pyinfra
from .legacy import run_main_with_legacy_arguments
from .main import cli, main
# Set CLI mode
pyinfra.is_cli = True
# Don't write out deploy.pyc/config.pyc etc
sys.dont_write_bytecode = True
# Make sure imported files (deploy.py/etc) be... | <commit_before>import os
import signal
import sys
import click
import gevent
import pyinfra
from .legacy import run_main_with_legacy_arguments
from .main import cli, main
# Set CLI mode
pyinfra.is_cli = True
# Don't write out deploy.pyc/config.pyc etc
sys.dont_write_bytecode = True
# Make sure imported files (de... | import os
import signal
import sys
import click
import gevent
import pyinfra
from .legacy import run_main_with_legacy_arguments
from .main import cli, main
# Set CLI mode
pyinfra.is_cli = True
# Don't write out deploy.pyc/config.pyc etc
sys.dont_write_bytecode = True
# Make sure imported files (deploy.py/etc) be... | import os
import signal
import sys
import click
import gevent
import pyinfra
from .legacy import run_main_with_legacy_arguments
from .main import cli, main
# Set CLI mode
pyinfra.is_cli = True
# Don't write out deploy.pyc/config.pyc etc
sys.dont_write_bytecode = True
# Make sure imported files (deploy.py/etc) be... | <commit_before>import os
import signal
import sys
import click
import gevent
import pyinfra
from .legacy import run_main_with_legacy_arguments
from .main import cli, main
# Set CLI mode
pyinfra.is_cli = True
# Don't write out deploy.pyc/config.pyc etc
sys.dont_write_bytecode = True
# Make sure imported files (de... |
f00e8bcadd3d71ed8ab797073a744f5d3d9648ea | wrapper.py | wrapper.py | #!/usr/bin/env python
#
# Copyright (C) 2014 The Android Open Source Project
#
# 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 req... | #!/usr/bin/env python
#
# Copyright (C) 2014 The Android Open Source Project
#
# 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 req... | Remove redundant 'repo' in WrapperPath() | Remove redundant 'repo' in WrapperPath()
| Python | apache-2.0 | jcfrank/myrepo,jcfrank/myrepo | #!/usr/bin/env python
#
# Copyright (C) 2014 The Android Open Source Project
#
# 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 req... | #!/usr/bin/env python
#
# Copyright (C) 2014 The Android Open Source Project
#
# 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 req... | <commit_before>#!/usr/bin/env python
#
# Copyright (C) 2014 The Android Open Source Project
#
# 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... | #!/usr/bin/env python
#
# Copyright (C) 2014 The Android Open Source Project
#
# 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 req... | #!/usr/bin/env python
#
# Copyright (C) 2014 The Android Open Source Project
#
# 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 req... | <commit_before>#!/usr/bin/env python
#
# Copyright (C) 2014 The Android Open Source Project
#
# 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... |
20d766de4d20355303b5b423dd30bf0cd4c8ee8e | createGlyphsPDF.py | createGlyphsPDF.py | from fontTools.pens.cocoaPen import CocoaPen
# Some configuration
page_format = 'A4' # See http://drawbot.readthedocs.org/content/canvas/pages.html#size for other size-values
my_selection = CurrentFont() # May also be CurrentFont.selection or else
class RegisterGlyph(object):
def __init__(self, glyph):
... | from fontTools.pens.cocoaPen import CocoaPen
# Some configuration
page_format = 'A4' # See http://drawbot.readthedocs.org/content/canvas/pages.html#size for other size-values
margins = (50,50,50,50) # left, top, right, bottom
my_selection = CurrentFont() # May also be CurrentFont.selection or else
# Init
size(page_fo... | Set size nonce at the beginning of the script | Set size nonce at the beginning of the script
| Python | mit | AlphabetType/DrawBot-Scripts | from fontTools.pens.cocoaPen import CocoaPen
# Some configuration
page_format = 'A4' # See http://drawbot.readthedocs.org/content/canvas/pages.html#size for other size-values
my_selection = CurrentFont() # May also be CurrentFont.selection or else
class RegisterGlyph(object):
def __init__(self, glyph):
... | from fontTools.pens.cocoaPen import CocoaPen
# Some configuration
page_format = 'A4' # See http://drawbot.readthedocs.org/content/canvas/pages.html#size for other size-values
margins = (50,50,50,50) # left, top, right, bottom
my_selection = CurrentFont() # May also be CurrentFont.selection or else
# Init
size(page_fo... | <commit_before>from fontTools.pens.cocoaPen import CocoaPen
# Some configuration
page_format = 'A4' # See http://drawbot.readthedocs.org/content/canvas/pages.html#size for other size-values
my_selection = CurrentFont() # May also be CurrentFont.selection or else
class RegisterGlyph(object):
def __init__(sel... | from fontTools.pens.cocoaPen import CocoaPen
# Some configuration
page_format = 'A4' # See http://drawbot.readthedocs.org/content/canvas/pages.html#size for other size-values
margins = (50,50,50,50) # left, top, right, bottom
my_selection = CurrentFont() # May also be CurrentFont.selection or else
# Init
size(page_fo... | from fontTools.pens.cocoaPen import CocoaPen
# Some configuration
page_format = 'A4' # See http://drawbot.readthedocs.org/content/canvas/pages.html#size for other size-values
my_selection = CurrentFont() # May also be CurrentFont.selection or else
class RegisterGlyph(object):
def __init__(self, glyph):
... | <commit_before>from fontTools.pens.cocoaPen import CocoaPen
# Some configuration
page_format = 'A4' # See http://drawbot.readthedocs.org/content/canvas/pages.html#size for other size-values
my_selection = CurrentFont() # May also be CurrentFont.selection or else
class RegisterGlyph(object):
def __init__(sel... |
45d27a34b0254123f8eb681a90d1cecfaab0b838 | ipywidgets/_version.py | ipywidgets/_version.py | # Copyright (c) Jupyter Development Team.
# Distributed under the terms of the Modified BSD License.
version_info = (7, 0, 0, 'beta', 9)
_specifier_ = {'alpha': 'a', 'beta': 'b', 'candidate': 'rc', 'final': ''}
__version__ = '%s.%s.%s%s'%(version_info[0], version_info[1], version_info[2],
'' if version_info[3]=='f... | # Copyright (c) Jupyter Development Team.
# Distributed under the terms of the Modified BSD License.
version_info = (7, 0, 0, 'beta', 9)
_specifier_ = {'alpha': 'a', 'beta': 'b', 'candidate': 'rc', 'final': ''}
__version__ = '%s.%s.%s%s'%(version_info[0], version_info[1], version_info[2],
'' if version_info[3]=='f... | Bump the version of html-manager for the embed script. | Bump the version of html-manager for the embed script. | Python | bsd-3-clause | ipython/ipywidgets,ipython/ipywidgets,jupyter-widgets/ipywidgets,SylvainCorlay/ipywidgets,SylvainCorlay/ipywidgets,SylvainCorlay/ipywidgets,ipython/ipywidgets,jupyter-widgets/ipywidgets,SylvainCorlay/ipywidgets,jupyter-widgets/ipywidgets,ipython/ipywidgets,jupyter-widgets/ipywidgets,ipython/ipywidgets | # Copyright (c) Jupyter Development Team.
# Distributed under the terms of the Modified BSD License.
version_info = (7, 0, 0, 'beta', 9)
_specifier_ = {'alpha': 'a', 'beta': 'b', 'candidate': 'rc', 'final': ''}
__version__ = '%s.%s.%s%s'%(version_info[0], version_info[1], version_info[2],
'' if version_info[3]=='f... | # Copyright (c) Jupyter Development Team.
# Distributed under the terms of the Modified BSD License.
version_info = (7, 0, 0, 'beta', 9)
_specifier_ = {'alpha': 'a', 'beta': 'b', 'candidate': 'rc', 'final': ''}
__version__ = '%s.%s.%s%s'%(version_info[0], version_info[1], version_info[2],
'' if version_info[3]=='f... | <commit_before># Copyright (c) Jupyter Development Team.
# Distributed under the terms of the Modified BSD License.
version_info = (7, 0, 0, 'beta', 9)
_specifier_ = {'alpha': 'a', 'beta': 'b', 'candidate': 'rc', 'final': ''}
__version__ = '%s.%s.%s%s'%(version_info[0], version_info[1], version_info[2],
'' if vers... | # Copyright (c) Jupyter Development Team.
# Distributed under the terms of the Modified BSD License.
version_info = (7, 0, 0, 'beta', 9)
_specifier_ = {'alpha': 'a', 'beta': 'b', 'candidate': 'rc', 'final': ''}
__version__ = '%s.%s.%s%s'%(version_info[0], version_info[1], version_info[2],
'' if version_info[3]=='f... | # Copyright (c) Jupyter Development Team.
# Distributed under the terms of the Modified BSD License.
version_info = (7, 0, 0, 'beta', 9)
_specifier_ = {'alpha': 'a', 'beta': 'b', 'candidate': 'rc', 'final': ''}
__version__ = '%s.%s.%s%s'%(version_info[0], version_info[1], version_info[2],
'' if version_info[3]=='f... | <commit_before># Copyright (c) Jupyter Development Team.
# Distributed under the terms of the Modified BSD License.
version_info = (7, 0, 0, 'beta', 9)
_specifier_ = {'alpha': 'a', 'beta': 'b', 'candidate': 'rc', 'final': ''}
__version__ = '%s.%s.%s%s'%(version_info[0], version_info[1], version_info[2],
'' if vers... |
46e20cb4ac6571b922968674f2127318eef68821 | common/utilities/throttling.py | common/utilities/throttling.py | from rest_framework import throttling
class ThrottlingBySession(throttling.SimpleRateThrottle):
"""
Limits the rating of facility service to only 10 per day per IP.
This rate is configurable at the DRF settings.DEFAULT_THROTTLE_RATES.
The rate will apply to both the publc user and other authenticated... | from rest_framework import throttling
class ThrottlingBySession(throttling.SimpleRateThrottle):
"""
Limits the rating of facility service to only 10 per day per IP.
This rate is configurable at the DRF settings.DEFAULT_THROTTLE_RATES.
The rate will apply to both the publc user and other authenticated... | Remove is_autheticated check as by default all the endpoints are authenticated | Remove is_autheticated check as by default all the endpoints are authenticated
| Python | mit | MasterFacilityList/mfl_api,MasterFacilityList/mfl_api,MasterFacilityList/mfl_api,MasterFacilityList/mfl_api,MasterFacilityList/mfl_api | from rest_framework import throttling
class ThrottlingBySession(throttling.SimpleRateThrottle):
"""
Limits the rating of facility service to only 10 per day per IP.
This rate is configurable at the DRF settings.DEFAULT_THROTTLE_RATES.
The rate will apply to both the publc user and other authenticated... | from rest_framework import throttling
class ThrottlingBySession(throttling.SimpleRateThrottle):
"""
Limits the rating of facility service to only 10 per day per IP.
This rate is configurable at the DRF settings.DEFAULT_THROTTLE_RATES.
The rate will apply to both the publc user and other authenticated... | <commit_before>from rest_framework import throttling
class ThrottlingBySession(throttling.SimpleRateThrottle):
"""
Limits the rating of facility service to only 10 per day per IP.
This rate is configurable at the DRF settings.DEFAULT_THROTTLE_RATES.
The rate will apply to both the publc user and othe... | from rest_framework import throttling
class ThrottlingBySession(throttling.SimpleRateThrottle):
"""
Limits the rating of facility service to only 10 per day per IP.
This rate is configurable at the DRF settings.DEFAULT_THROTTLE_RATES.
The rate will apply to both the publc user and other authenticated... | from rest_framework import throttling
class ThrottlingBySession(throttling.SimpleRateThrottle):
"""
Limits the rating of facility service to only 10 per day per IP.
This rate is configurable at the DRF settings.DEFAULT_THROTTLE_RATES.
The rate will apply to both the publc user and other authenticated... | <commit_before>from rest_framework import throttling
class ThrottlingBySession(throttling.SimpleRateThrottle):
"""
Limits the rating of facility service to only 10 per day per IP.
This rate is configurable at the DRF settings.DEFAULT_THROTTLE_RATES.
The rate will apply to both the publc user and othe... |
7125760a5d824ebe4bab81d688113a877f1c78c3 | csvkit/__init__.py | csvkit/__init__.py | #!/usr/bin/env python
from csvkit.unicsv import UnicodeCSVReader, UnicodeCSVWriter
class CSVKitReader(UnicodeCSVReader):
"""
A unicode-aware CSV reader with some additional features.
"""
pass
class CSVKitWriter(UnicodeCSVWriter):
"""
A unicode-aware CSV writer with some additional features.
... | #!/usr/bin/env python
from csvkit.unicsv import UnicodeCSVReader, UnicodeCSVWriter
class CSVKitReader(UnicodeCSVReader):
"""
A unicode-aware CSV reader with some additional features.
"""
pass
class CSVKitWriter(UnicodeCSVWriter):
"""
A unicode-aware CSV writer with some additional features.
... | Fix serialization bug in CSVKitWriter that was breaking 4 tests. | Fix serialization bug in CSVKitWriter that was breaking 4 tests.
| Python | mit | archaeogeek/csvkit,Tabea-K/csvkit,Jobava/csvkit,kyeoh/csvkit,moradology/csvkit,tlevine/csvkit,doganmeh/csvkit,bmispelon/csvkit,reubano/csvkit,wireservice/csvkit,wjr1985/csvkit,aequitas/csvkit,barentsen/csvkit,dannguyen/csvkit,arowla/csvkit,themiurgo/csvkit,KarrieK/csvkit,haginara/csvkit,onyxfish/csvkit,metasoarous/csvk... | #!/usr/bin/env python
from csvkit.unicsv import UnicodeCSVReader, UnicodeCSVWriter
class CSVKitReader(UnicodeCSVReader):
"""
A unicode-aware CSV reader with some additional features.
"""
pass
class CSVKitWriter(UnicodeCSVWriter):
"""
A unicode-aware CSV writer with some additional features.
... | #!/usr/bin/env python
from csvkit.unicsv import UnicodeCSVReader, UnicodeCSVWriter
class CSVKitReader(UnicodeCSVReader):
"""
A unicode-aware CSV reader with some additional features.
"""
pass
class CSVKitWriter(UnicodeCSVWriter):
"""
A unicode-aware CSV writer with some additional features.
... | <commit_before>#!/usr/bin/env python
from csvkit.unicsv import UnicodeCSVReader, UnicodeCSVWriter
class CSVKitReader(UnicodeCSVReader):
"""
A unicode-aware CSV reader with some additional features.
"""
pass
class CSVKitWriter(UnicodeCSVWriter):
"""
A unicode-aware CSV writer with some additio... | #!/usr/bin/env python
from csvkit.unicsv import UnicodeCSVReader, UnicodeCSVWriter
class CSVKitReader(UnicodeCSVReader):
"""
A unicode-aware CSV reader with some additional features.
"""
pass
class CSVKitWriter(UnicodeCSVWriter):
"""
A unicode-aware CSV writer with some additional features.
... | #!/usr/bin/env python
from csvkit.unicsv import UnicodeCSVReader, UnicodeCSVWriter
class CSVKitReader(UnicodeCSVReader):
"""
A unicode-aware CSV reader with some additional features.
"""
pass
class CSVKitWriter(UnicodeCSVWriter):
"""
A unicode-aware CSV writer with some additional features.
... | <commit_before>#!/usr/bin/env python
from csvkit.unicsv import UnicodeCSVReader, UnicodeCSVWriter
class CSVKitReader(UnicodeCSVReader):
"""
A unicode-aware CSV reader with some additional features.
"""
pass
class CSVKitWriter(UnicodeCSVWriter):
"""
A unicode-aware CSV writer with some additio... |
3fb772c8d5958a8a93ab1cedc87c61d513b84eea | savanna/utils/crypto.py | savanna/utils/crypto.py | # Copyright (c) 2013 Mirantis 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 (c) 2013 Mirantis 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... | Use six to improve python 3 compatibility. | Use six to improve python 3 compatibility.
* StringIO
Change-Id: I8471e525566a0353d9276529be4b0d0e0cbf6cd6
| Python | apache-2.0 | rnirmal/savanna,bigfootproject/sahara,openstack/sahara,tellesnobrega/storm_plugin,zhangjunli177/sahara,bigfootproject/sahara,xme1226/sahara,tellesnobrega/sahara,esikachev/sahara-backup,crobby/sahara,zhujzhuo/Sahara,citrix-openstack-build/sahara,matips/iosr-2015,keedio/sahara,matips/iosr-2015,henaras/sahara,xme1226/saha... | # Copyright (c) 2013 Mirantis 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 (c) 2013 Mirantis 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 (c) 2013 Mirantis 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 (c) 2013 Mirantis 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 (c) 2013 Mirantis 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 (c) 2013 Mirantis 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... |
01b8b80bd694a93bce9cbdd2541f3e262f95c015 | tests/test_commands.py | tests/test_commands.py | from __future__ import unicode_literals, absolute_import
import sys
import unittest
import mock
from fm import Fm
class TestFm(unittest.TestCase):
def setUp(self):
self.mock_stdin = mock.create_autospec(sys.stdin)
self.mock_stdout = mock.create_autospec(sys.stdout)
def create(self):
... | from __future__ import unicode_literals, absolute_import
import sys
import unittest
import mock
import re
from fm import Fm
class TestFm(unittest.TestCase):
def setUp(self):
self.mock_stdin = mock.create_autospec(sys.stdin)
self.mock_stdout = mock.create_autospec(sys.stdout)
def create(sel... | Clear output from colors in test cases | Clear output from colors in test cases
| Python | bsd-3-clause | roman-kachanovsky/cmd.fm-python | from __future__ import unicode_literals, absolute_import
import sys
import unittest
import mock
from fm import Fm
class TestFm(unittest.TestCase):
def setUp(self):
self.mock_stdin = mock.create_autospec(sys.stdin)
self.mock_stdout = mock.create_autospec(sys.stdout)
def create(self):
... | from __future__ import unicode_literals, absolute_import
import sys
import unittest
import mock
import re
from fm import Fm
class TestFm(unittest.TestCase):
def setUp(self):
self.mock_stdin = mock.create_autospec(sys.stdin)
self.mock_stdout = mock.create_autospec(sys.stdout)
def create(sel... | <commit_before>from __future__ import unicode_literals, absolute_import
import sys
import unittest
import mock
from fm import Fm
class TestFm(unittest.TestCase):
def setUp(self):
self.mock_stdin = mock.create_autospec(sys.stdin)
self.mock_stdout = mock.create_autospec(sys.stdout)
def creat... | from __future__ import unicode_literals, absolute_import
import sys
import unittest
import mock
import re
from fm import Fm
class TestFm(unittest.TestCase):
def setUp(self):
self.mock_stdin = mock.create_autospec(sys.stdin)
self.mock_stdout = mock.create_autospec(sys.stdout)
def create(sel... | from __future__ import unicode_literals, absolute_import
import sys
import unittest
import mock
from fm import Fm
class TestFm(unittest.TestCase):
def setUp(self):
self.mock_stdin = mock.create_autospec(sys.stdin)
self.mock_stdout = mock.create_autospec(sys.stdout)
def create(self):
... | <commit_before>from __future__ import unicode_literals, absolute_import
import sys
import unittest
import mock
from fm import Fm
class TestFm(unittest.TestCase):
def setUp(self):
self.mock_stdin = mock.create_autospec(sys.stdin)
self.mock_stdout = mock.create_autospec(sys.stdout)
def creat... |
3be0c6c18a61f35ae5804464cc0da867fd0065f5 | tests/test_ez_setup.py | tests/test_ez_setup.py | import sys
import os
import tempfile
import unittest
import shutil
import copy
CURDIR = os.path.abspath(os.path.dirname(__file__))
TOPDIR = os.path.split(CURDIR)[0]
sys.path.insert(0, TOPDIR)
from ez_setup import (use_setuptools, _python_cmd, _install)
import ez_setup
class TestSetup(unittest.TestCase):
def url... | import sys
import os
import tempfile
import unittest
import shutil
import copy
CURDIR = os.path.abspath(os.path.dirname(__file__))
TOPDIR = os.path.split(CURDIR)[0]
sys.path.insert(0, TOPDIR)
from ez_setup import _python_cmd, _install
import ez_setup
class TestSetup(unittest.TestCase):
def urlopen(self, url):
... | Remove test for use_setuptools, as it fails when running under pytest because the installed version of setuptools is already present. | Remove test for use_setuptools, as it fails when running under pytest because the installed version of setuptools is already present.
| Python | mit | pypa/setuptools,pypa/setuptools,pypa/setuptools | import sys
import os
import tempfile
import unittest
import shutil
import copy
CURDIR = os.path.abspath(os.path.dirname(__file__))
TOPDIR = os.path.split(CURDIR)[0]
sys.path.insert(0, TOPDIR)
from ez_setup import (use_setuptools, _python_cmd, _install)
import ez_setup
class TestSetup(unittest.TestCase):
def url... | import sys
import os
import tempfile
import unittest
import shutil
import copy
CURDIR = os.path.abspath(os.path.dirname(__file__))
TOPDIR = os.path.split(CURDIR)[0]
sys.path.insert(0, TOPDIR)
from ez_setup import _python_cmd, _install
import ez_setup
class TestSetup(unittest.TestCase):
def urlopen(self, url):
... | <commit_before>import sys
import os
import tempfile
import unittest
import shutil
import copy
CURDIR = os.path.abspath(os.path.dirname(__file__))
TOPDIR = os.path.split(CURDIR)[0]
sys.path.insert(0, TOPDIR)
from ez_setup import (use_setuptools, _python_cmd, _install)
import ez_setup
class TestSetup(unittest.TestCase... | import sys
import os
import tempfile
import unittest
import shutil
import copy
CURDIR = os.path.abspath(os.path.dirname(__file__))
TOPDIR = os.path.split(CURDIR)[0]
sys.path.insert(0, TOPDIR)
from ez_setup import _python_cmd, _install
import ez_setup
class TestSetup(unittest.TestCase):
def urlopen(self, url):
... | import sys
import os
import tempfile
import unittest
import shutil
import copy
CURDIR = os.path.abspath(os.path.dirname(__file__))
TOPDIR = os.path.split(CURDIR)[0]
sys.path.insert(0, TOPDIR)
from ez_setup import (use_setuptools, _python_cmd, _install)
import ez_setup
class TestSetup(unittest.TestCase):
def url... | <commit_before>import sys
import os
import tempfile
import unittest
import shutil
import copy
CURDIR = os.path.abspath(os.path.dirname(__file__))
TOPDIR = os.path.split(CURDIR)[0]
sys.path.insert(0, TOPDIR)
from ez_setup import (use_setuptools, _python_cmd, _install)
import ez_setup
class TestSetup(unittest.TestCase... |
d9ffd877f646b3a5c020ed823d3541135af74fef | tests/test_question.py | tests/test_question.py | from pywatson.question.question import Question
class TestQuestion:
def test___init___basic(self, questions):
question = Question(questions[0]['questionText'])
assert question.question_text == questions[0]['questionText']
def test_ask_question_basic(self, watson):
answer = watson.ask_... | from pywatson.question.evidence_request import EvidenceRequest
from pywatson.question.filter import Filter
from pywatson.question.question import Question
class TestQuestion(object):
"""Unit tests for the Question class"""
def test___init___basic(self, questions):
"""Question is constructed properly ... | Add complete question constructor test | Add complete question constructor test
| Python | mit | sherlocke/pywatson | from pywatson.question.question import Question
class TestQuestion:
def test___init___basic(self, questions):
question = Question(questions[0]['questionText'])
assert question.question_text == questions[0]['questionText']
def test_ask_question_basic(self, watson):
answer = watson.ask_... | from pywatson.question.evidence_request import EvidenceRequest
from pywatson.question.filter import Filter
from pywatson.question.question import Question
class TestQuestion(object):
"""Unit tests for the Question class"""
def test___init___basic(self, questions):
"""Question is constructed properly ... | <commit_before>from pywatson.question.question import Question
class TestQuestion:
def test___init___basic(self, questions):
question = Question(questions[0]['questionText'])
assert question.question_text == questions[0]['questionText']
def test_ask_question_basic(self, watson):
answe... | from pywatson.question.evidence_request import EvidenceRequest
from pywatson.question.filter import Filter
from pywatson.question.question import Question
class TestQuestion(object):
"""Unit tests for the Question class"""
def test___init___basic(self, questions):
"""Question is constructed properly ... | from pywatson.question.question import Question
class TestQuestion:
def test___init___basic(self, questions):
question = Question(questions[0]['questionText'])
assert question.question_text == questions[0]['questionText']
def test_ask_question_basic(self, watson):
answer = watson.ask_... | <commit_before>from pywatson.question.question import Question
class TestQuestion:
def test___init___basic(self, questions):
question = Question(questions[0]['questionText'])
assert question.question_text == questions[0]['questionText']
def test_ask_question_basic(self, watson):
answe... |
3979e0a2ebdba434a215d5f89cc58f2737ac0111 | tomviz/python/ReinterpretSignedToUnsigned.py | tomviz/python/ReinterpretSignedToUnsigned.py | def transform_scalars(dataset):
"""Reinterpret a signed integral array type as its unsigned counterpart.
This can be used when the bytes of a data array have been interpreted as a
signed array when it should have been interpreted as an unsigned array."""
from tomviz import utils
import numpy as np
... | def transform_scalars(dataset):
"""Reinterpret a signed integral array type as its unsigned counterpart.
This can be used when the bytes of a data array have been interpreted as a
signed array when it should have been interpreted as an unsigned array."""
from tomviz import utils
import numpy as np
... | Fix typo in Python script | Fix typo in Python script
| Python | bsd-3-clause | thewtex/tomviz,cjh1/tomviz,OpenChemistry/tomviz,cjh1/tomviz,thewtex/tomviz,OpenChemistry/tomviz,cryos/tomviz,OpenChemistry/tomviz,OpenChemistry/tomviz,cryos/tomviz,cjh1/tomviz,mathturtle/tomviz,mathturtle/tomviz,cryos/tomviz,mathturtle/tomviz,thewtex/tomviz | def transform_scalars(dataset):
"""Reinterpret a signed integral array type as its unsigned counterpart.
This can be used when the bytes of a data array have been interpreted as a
signed array when it should have been interpreted as an unsigned array."""
from tomviz import utils
import numpy as np
... | def transform_scalars(dataset):
"""Reinterpret a signed integral array type as its unsigned counterpart.
This can be used when the bytes of a data array have been interpreted as a
signed array when it should have been interpreted as an unsigned array."""
from tomviz import utils
import numpy as np
... | <commit_before>def transform_scalars(dataset):
"""Reinterpret a signed integral array type as its unsigned counterpart.
This can be used when the bytes of a data array have been interpreted as a
signed array when it should have been interpreted as an unsigned array."""
from tomviz import utils
impo... | def transform_scalars(dataset):
"""Reinterpret a signed integral array type as its unsigned counterpart.
This can be used when the bytes of a data array have been interpreted as a
signed array when it should have been interpreted as an unsigned array."""
from tomviz import utils
import numpy as np
... | def transform_scalars(dataset):
"""Reinterpret a signed integral array type as its unsigned counterpart.
This can be used when the bytes of a data array have been interpreted as a
signed array when it should have been interpreted as an unsigned array."""
from tomviz import utils
import numpy as np
... | <commit_before>def transform_scalars(dataset):
"""Reinterpret a signed integral array type as its unsigned counterpart.
This can be used when the bytes of a data array have been interpreted as a
signed array when it should have been interpreted as an unsigned array."""
from tomviz import utils
impo... |
4ade8ef1f53340a9efd053eeae1694724187c4be | scripts/poweron/DRAC.py | scripts/poweron/DRAC.py | import subprocess, sys, os.path
class DRAC_NO_SUPP_PACK(Exception):
"""Base Exception class for all transfer plugin errors."""
def __init__(self, *args):
Exception.__init__(self, *args)
class DRAC_POWERON_FAILED(Exception):
"""Base Exception class for all transfer plugin errors."""
def... | import subprocess, sys, os.path
class DRAC_NO_SUPP_PACK(Exception):
"""Base Exception class for all transfer plugin errors."""
def __init__(self, *args):
Exception.__init__(self, *args)
class DRAC_POWERON_FAILED(Exception):
"""Base Exception class for all transfer plugin errors."""
def... | Change path to the supplemental pack | CA-40618: Change path to the supplemental pack
Signed-off-by: Javier Alvarez-Valle <cf4c8668a0b4c5e013f594a6940d05b3d4d9ddcf@citrix.com>
| Python | lgpl-2.1 | srowe/xen-api,koushikcgit/xen-api,koushikcgit/xen-api,agimofcarmen/xen-api,anoobs/xen-api,euanh/xen-api,Frezzle/xen-api,agimofcarmen/xen-api,simonjbeaumont/xen-api,srowe/xen-api,cheng-z/xen-api,djs55/xen-api,agimofcarmen/xen-api,thomassa/xen-api,rafalmiel/xen-api,ravippandey/xen-api,rafalmiel/xen-api,vasilenkomike/xen-... | import subprocess, sys, os.path
class DRAC_NO_SUPP_PACK(Exception):
"""Base Exception class for all transfer plugin errors."""
def __init__(self, *args):
Exception.__init__(self, *args)
class DRAC_POWERON_FAILED(Exception):
"""Base Exception class for all transfer plugin errors."""
def... | import subprocess, sys, os.path
class DRAC_NO_SUPP_PACK(Exception):
"""Base Exception class for all transfer plugin errors."""
def __init__(self, *args):
Exception.__init__(self, *args)
class DRAC_POWERON_FAILED(Exception):
"""Base Exception class for all transfer plugin errors."""
def... | <commit_before>import subprocess, sys, os.path
class DRAC_NO_SUPP_PACK(Exception):
"""Base Exception class for all transfer plugin errors."""
def __init__(self, *args):
Exception.__init__(self, *args)
class DRAC_POWERON_FAILED(Exception):
"""Base Exception class for all transfer plugin err... | import subprocess, sys, os.path
class DRAC_NO_SUPP_PACK(Exception):
"""Base Exception class for all transfer plugin errors."""
def __init__(self, *args):
Exception.__init__(self, *args)
class DRAC_POWERON_FAILED(Exception):
"""Base Exception class for all transfer plugin errors."""
def... | import subprocess, sys, os.path
class DRAC_NO_SUPP_PACK(Exception):
"""Base Exception class for all transfer plugin errors."""
def __init__(self, *args):
Exception.__init__(self, *args)
class DRAC_POWERON_FAILED(Exception):
"""Base Exception class for all transfer plugin errors."""
def... | <commit_before>import subprocess, sys, os.path
class DRAC_NO_SUPP_PACK(Exception):
"""Base Exception class for all transfer plugin errors."""
def __init__(self, *args):
Exception.__init__(self, *args)
class DRAC_POWERON_FAILED(Exception):
"""Base Exception class for all transfer plugin err... |
4b06210ddcff50e9aa99a86edeb99e1a6200d5a9 | health_monitor/urls.py | health_monitor/urls.py | from django.conf.urls import url
from health_monitor import views
urlpatterns = [
url(r'^health/(?P<uid>[\w-]*)/$', views.read, name='read'),
url(r'^health/(?P<uid>[\w-]*)/update/(?P<test_name>[\w-]*)/$', views.update, name='update'),
url(r'^health/(?P<uid>[\w-]*)/history/(?P<group>[\w-]*)/$', views.histo... | from django.conf.urls import url
from health_monitor import views
urlpatterns = [
url(r'^health/(?P<uid>[\d]*)/$', views.read, name='read'),
url(r'^health/(?P<uid>[\d]*)/update/(?P<test_name>[\w-]*)/$', views.update, name='update'),
url(r'^health/(?P<uid>[\d]*)/history/(?P<group>[\w-]*)/$', views.history,... | Modify UID to be passed as number. | Modify UID to be passed as number.
| Python | apache-2.0 | seanchon/django-health-monitor,gracenote/django-health-monitor,gracenote/django-health-monitor,seanchon/django-health-monitor | from django.conf.urls import url
from health_monitor import views
urlpatterns = [
url(r'^health/(?P<uid>[\w-]*)/$', views.read, name='read'),
url(r'^health/(?P<uid>[\w-]*)/update/(?P<test_name>[\w-]*)/$', views.update, name='update'),
url(r'^health/(?P<uid>[\w-]*)/history/(?P<group>[\w-]*)/$', views.histo... | from django.conf.urls import url
from health_monitor import views
urlpatterns = [
url(r'^health/(?P<uid>[\d]*)/$', views.read, name='read'),
url(r'^health/(?P<uid>[\d]*)/update/(?P<test_name>[\w-]*)/$', views.update, name='update'),
url(r'^health/(?P<uid>[\d]*)/history/(?P<group>[\w-]*)/$', views.history,... | <commit_before>from django.conf.urls import url
from health_monitor import views
urlpatterns = [
url(r'^health/(?P<uid>[\w-]*)/$', views.read, name='read'),
url(r'^health/(?P<uid>[\w-]*)/update/(?P<test_name>[\w-]*)/$', views.update, name='update'),
url(r'^health/(?P<uid>[\w-]*)/history/(?P<group>[\w-]*)/... | from django.conf.urls import url
from health_monitor import views
urlpatterns = [
url(r'^health/(?P<uid>[\d]*)/$', views.read, name='read'),
url(r'^health/(?P<uid>[\d]*)/update/(?P<test_name>[\w-]*)/$', views.update, name='update'),
url(r'^health/(?P<uid>[\d]*)/history/(?P<group>[\w-]*)/$', views.history,... | from django.conf.urls import url
from health_monitor import views
urlpatterns = [
url(r'^health/(?P<uid>[\w-]*)/$', views.read, name='read'),
url(r'^health/(?P<uid>[\w-]*)/update/(?P<test_name>[\w-]*)/$', views.update, name='update'),
url(r'^health/(?P<uid>[\w-]*)/history/(?P<group>[\w-]*)/$', views.histo... | <commit_before>from django.conf.urls import url
from health_monitor import views
urlpatterns = [
url(r'^health/(?P<uid>[\w-]*)/$', views.read, name='read'),
url(r'^health/(?P<uid>[\w-]*)/update/(?P<test_name>[\w-]*)/$', views.update, name='update'),
url(r'^health/(?P<uid>[\w-]*)/history/(?P<group>[\w-]*)/... |
f8d3477dc4a496d648ac6bfd8d26eeacd853200f | src/masterfile/formatters.py | src/masterfile/formatters.py | # -*- coding: utf-8 -*-
# Part of the masterfile package: https://github.com/njvack/masterfile
# Copyright (c) 2017 Board of Regents of the University of Wisconsin System
# Written by Nate Vack <njvack@wisc.edu> at the Center for Healthy Minds
# at the University of Wisconsin-Madison.
# Released under MIT licence; see... | # -*- coding: utf-8 -*-
# Part of the masterfile package: https://github.com/njvack/masterfile
# Copyright (c) 2017 Board of Regents of the University of Wisconsin System
# Written by Nate Vack <njvack@wisc.edu> at the Center for Healthy Minds
# at the University of Wisconsin-Madison.
# Released under MIT licence; see... | Replace index_to_column_id with iterative fx | Replace index_to_column_id with iterative fx
The recursive one was neat but a bit too clever. | Python | mit | njvack/masterfile | # -*- coding: utf-8 -*-
# Part of the masterfile package: https://github.com/njvack/masterfile
# Copyright (c) 2017 Board of Regents of the University of Wisconsin System
# Written by Nate Vack <njvack@wisc.edu> at the Center for Healthy Minds
# at the University of Wisconsin-Madison.
# Released under MIT licence; see... | # -*- coding: utf-8 -*-
# Part of the masterfile package: https://github.com/njvack/masterfile
# Copyright (c) 2017 Board of Regents of the University of Wisconsin System
# Written by Nate Vack <njvack@wisc.edu> at the Center for Healthy Minds
# at the University of Wisconsin-Madison.
# Released under MIT licence; see... | <commit_before># -*- coding: utf-8 -*-
# Part of the masterfile package: https://github.com/njvack/masterfile
# Copyright (c) 2017 Board of Regents of the University of Wisconsin System
# Written by Nate Vack <njvack@wisc.edu> at the Center for Healthy Minds
# at the University of Wisconsin-Madison.
# Released under M... | # -*- coding: utf-8 -*-
# Part of the masterfile package: https://github.com/njvack/masterfile
# Copyright (c) 2017 Board of Regents of the University of Wisconsin System
# Written by Nate Vack <njvack@wisc.edu> at the Center for Healthy Minds
# at the University of Wisconsin-Madison.
# Released under MIT licence; see... | # -*- coding: utf-8 -*-
# Part of the masterfile package: https://github.com/njvack/masterfile
# Copyright (c) 2017 Board of Regents of the University of Wisconsin System
# Written by Nate Vack <njvack@wisc.edu> at the Center for Healthy Minds
# at the University of Wisconsin-Madison.
# Released under MIT licence; see... | <commit_before># -*- coding: utf-8 -*-
# Part of the masterfile package: https://github.com/njvack/masterfile
# Copyright (c) 2017 Board of Regents of the University of Wisconsin System
# Written by Nate Vack <njvack@wisc.edu> at the Center for Healthy Minds
# at the University of Wisconsin-Madison.
# Released under M... |
5e25577d067f891474c722000327026744068e88 | src/unittest/python/permission_lambda_tests.py | src/unittest/python/permission_lambda_tests.py | from unittest2 import TestCase
import simplejson as json
import boto3
from moto import mock_s3
import permission_lambda
class PermissionLambdaTests(TestCase):
def _get_permission_statements(self, client, queue_url):
""" Return a list of policy statements for given queue"""
policy_response = client... | from unittest2 import TestCase
import simplejson as json
import boto3
from moto import mock_s3
import permission_lambda
class PermissionLambdaTests(TestCase):
@mock_s3
def test_get_usofa_accountlist_from_bucket(self):
bucketname = "testbucket"
usofa_data = {
"account1": {
... | Remove Unittests done as integrationtests, due to NotImplementedErrors from moto | PIO-129: Remove Unittests done as integrationtests, due to NotImplementedErrors from moto
| Python | apache-2.0 | ImmobilienScout24/aws-set-sqs-permission-lambda | from unittest2 import TestCase
import simplejson as json
import boto3
from moto import mock_s3
import permission_lambda
class PermissionLambdaTests(TestCase):
def _get_permission_statements(self, client, queue_url):
""" Return a list of policy statements for given queue"""
policy_response = client... | from unittest2 import TestCase
import simplejson as json
import boto3
from moto import mock_s3
import permission_lambda
class PermissionLambdaTests(TestCase):
@mock_s3
def test_get_usofa_accountlist_from_bucket(self):
bucketname = "testbucket"
usofa_data = {
"account1": {
... | <commit_before>from unittest2 import TestCase
import simplejson as json
import boto3
from moto import mock_s3
import permission_lambda
class PermissionLambdaTests(TestCase):
def _get_permission_statements(self, client, queue_url):
""" Return a list of policy statements for given queue"""
policy_re... | from unittest2 import TestCase
import simplejson as json
import boto3
from moto import mock_s3
import permission_lambda
class PermissionLambdaTests(TestCase):
@mock_s3
def test_get_usofa_accountlist_from_bucket(self):
bucketname = "testbucket"
usofa_data = {
"account1": {
... | from unittest2 import TestCase
import simplejson as json
import boto3
from moto import mock_s3
import permission_lambda
class PermissionLambdaTests(TestCase):
def _get_permission_statements(self, client, queue_url):
""" Return a list of policy statements for given queue"""
policy_response = client... | <commit_before>from unittest2 import TestCase
import simplejson as json
import boto3
from moto import mock_s3
import permission_lambda
class PermissionLambdaTests(TestCase):
def _get_permission_statements(self, client, queue_url):
""" Return a list of policy statements for given queue"""
policy_re... |
5fd04a337dd6fec1afc9bf53b437cce01e4fef9e | myDevices/os/threadpool.py | myDevices/os/threadpool.py | from concurrent.futures import ThreadPoolExecutor
from myDevices.utils.singleton import Singleton
import inspect
executor = ThreadPoolExecutor(max_workers=4)
class ThreadPool(Singleton):
def Submit(something):
future = executor.submit(something)
def SubmitParam(*arg):
executor.submit(*arg)
def Shutdown():
ex... | """
This module provides a singleton thread pool class
"""
from concurrent.futures import ThreadPoolExecutor
from myDevices.utils.singleton import Singleton
executor = ThreadPoolExecutor(max_workers=4)
class ThreadPool(Singleton):
"""Singleton thread pool class"""
@staticmethod
def Submit(func):
"... | Clean up thread pool code. | Clean up thread pool code.
| Python | mit | myDevicesIoT/Cayenne-Agent,myDevicesIoT/Cayenne-Agent | from concurrent.futures import ThreadPoolExecutor
from myDevices.utils.singleton import Singleton
import inspect
executor = ThreadPoolExecutor(max_workers=4)
class ThreadPool(Singleton):
def Submit(something):
future = executor.submit(something)
def SubmitParam(*arg):
executor.submit(*arg)
def Shutdown():
ex... | """
This module provides a singleton thread pool class
"""
from concurrent.futures import ThreadPoolExecutor
from myDevices.utils.singleton import Singleton
executor = ThreadPoolExecutor(max_workers=4)
class ThreadPool(Singleton):
"""Singleton thread pool class"""
@staticmethod
def Submit(func):
"... | <commit_before>from concurrent.futures import ThreadPoolExecutor
from myDevices.utils.singleton import Singleton
import inspect
executor = ThreadPoolExecutor(max_workers=4)
class ThreadPool(Singleton):
def Submit(something):
future = executor.submit(something)
def SubmitParam(*arg):
executor.submit(*arg)
def S... | """
This module provides a singleton thread pool class
"""
from concurrent.futures import ThreadPoolExecutor
from myDevices.utils.singleton import Singleton
executor = ThreadPoolExecutor(max_workers=4)
class ThreadPool(Singleton):
"""Singleton thread pool class"""
@staticmethod
def Submit(func):
"... | from concurrent.futures import ThreadPoolExecutor
from myDevices.utils.singleton import Singleton
import inspect
executor = ThreadPoolExecutor(max_workers=4)
class ThreadPool(Singleton):
def Submit(something):
future = executor.submit(something)
def SubmitParam(*arg):
executor.submit(*arg)
def Shutdown():
ex... | <commit_before>from concurrent.futures import ThreadPoolExecutor
from myDevices.utils.singleton import Singleton
import inspect
executor = ThreadPoolExecutor(max_workers=4)
class ThreadPool(Singleton):
def Submit(something):
future = executor.submit(something)
def SubmitParam(*arg):
executor.submit(*arg)
def S... |
43776062a15640c62d94d8a9c19edadb21a773be | lab/trace_sample.py | lab/trace_sample.py | import os, sys
global nest
nest = 0
def trace(frame, event, arg):
#if event == 'line':
global nest
print "%s%s %s %d (%r)" % (
" " * nest,
event,
os.path.basename(frame.f_code.co_filename),
frame.f_lineno,
arg
)
if event == '... | import os, sys
global nest
nest = 0
def trace(frame, event, arg):
#if event == 'line':
global nest
print "%s%s %s %d" % (
" " * nest,
event,
os.path.basename(frame.f_code.co_filename),
frame.f_lineno,
)
if event == 'call':
ne... | Remove a little noise from this lab tool | Remove a little noise from this lab tool
| Python | apache-2.0 | hugovk/coveragepy,jayhetee/coveragepy,larsbutler/coveragepy,7WebPages/coveragepy,hugovk/coveragepy,nedbat/coveragepy,7WebPages/coveragepy,nedbat/coveragepy,nedbat/coveragepy,hugovk/coveragepy,blueyed/coveragepy,jayhetee/coveragepy,blueyed/coveragepy,blueyed/coveragepy,7WebPages/coveragepy,nedbat/coveragepy,blueyed/cove... | import os, sys
global nest
nest = 0
def trace(frame, event, arg):
#if event == 'line':
global nest
print "%s%s %s %d (%r)" % (
" " * nest,
event,
os.path.basename(frame.f_code.co_filename),
frame.f_lineno,
arg
)
if event == '... | import os, sys
global nest
nest = 0
def trace(frame, event, arg):
#if event == 'line':
global nest
print "%s%s %s %d" % (
" " * nest,
event,
os.path.basename(frame.f_code.co_filename),
frame.f_lineno,
)
if event == 'call':
ne... | <commit_before>import os, sys
global nest
nest = 0
def trace(frame, event, arg):
#if event == 'line':
global nest
print "%s%s %s %d (%r)" % (
" " * nest,
event,
os.path.basename(frame.f_code.co_filename),
frame.f_lineno,
arg
)
... | import os, sys
global nest
nest = 0
def trace(frame, event, arg):
#if event == 'line':
global nest
print "%s%s %s %d" % (
" " * nest,
event,
os.path.basename(frame.f_code.co_filename),
frame.f_lineno,
)
if event == 'call':
ne... | import os, sys
global nest
nest = 0
def trace(frame, event, arg):
#if event == 'line':
global nest
print "%s%s %s %d (%r)" % (
" " * nest,
event,
os.path.basename(frame.f_code.co_filename),
frame.f_lineno,
arg
)
if event == '... | <commit_before>import os, sys
global nest
nest = 0
def trace(frame, event, arg):
#if event == 'line':
global nest
print "%s%s %s %d (%r)" % (
" " * nest,
event,
os.path.basename(frame.f_code.co_filename),
frame.f_lineno,
arg
)
... |
1028e1a6e15af5a20caedd5598cebc49c5486f64 | scripts/iepy_runner.py | scripts/iepy_runner.py | """
Run IEPY core loop
Usage:
iepy_runner.py <dbname> <seeds_file>
iepy_runner.py -h | --help | --version
Options:
-h --help Show this screen
--version Version number
"""
import pprint
from docopt import docopt
from iepy.core import BootstrappedIEPipeline
from iepy import db
from... | """
Run IEPY core loop
Usage:
iepy_runner.py <dbname> <seeds_file> <output_file>
iepy_runner.py -h | --help | --version
Options:
-h --help Show this screen
--version Version number
"""
import pprint
from docopt import docopt
from iepy.core import BootstrappedIEPipeline
from iepy ... | Add <output_file> parameter to the IEPY runner script. | Add <output_file> parameter to the IEPY runner script.
| Python | bsd-3-clause | mrshu/iepy,machinalis/iepy,machinalis/iepy,mrshu/iepy,machinalis/iepy,mrshu/iepy | """
Run IEPY core loop
Usage:
iepy_runner.py <dbname> <seeds_file>
iepy_runner.py -h | --help | --version
Options:
-h --help Show this screen
--version Version number
"""
import pprint
from docopt import docopt
from iepy.core import BootstrappedIEPipeline
from iepy import db
from... | """
Run IEPY core loop
Usage:
iepy_runner.py <dbname> <seeds_file> <output_file>
iepy_runner.py -h | --help | --version
Options:
-h --help Show this screen
--version Version number
"""
import pprint
from docopt import docopt
from iepy.core import BootstrappedIEPipeline
from iepy ... | <commit_before>"""
Run IEPY core loop
Usage:
iepy_runner.py <dbname> <seeds_file>
iepy_runner.py -h | --help | --version
Options:
-h --help Show this screen
--version Version number
"""
import pprint
from docopt import docopt
from iepy.core import BootstrappedIEPipeline
from iepy... | """
Run IEPY core loop
Usage:
iepy_runner.py <dbname> <seeds_file> <output_file>
iepy_runner.py -h | --help | --version
Options:
-h --help Show this screen
--version Version number
"""
import pprint
from docopt import docopt
from iepy.core import BootstrappedIEPipeline
from iepy ... | """
Run IEPY core loop
Usage:
iepy_runner.py <dbname> <seeds_file>
iepy_runner.py -h | --help | --version
Options:
-h --help Show this screen
--version Version number
"""
import pprint
from docopt import docopt
from iepy.core import BootstrappedIEPipeline
from iepy import db
from... | <commit_before>"""
Run IEPY core loop
Usage:
iepy_runner.py <dbname> <seeds_file>
iepy_runner.py -h | --help | --version
Options:
-h --help Show this screen
--version Version number
"""
import pprint
from docopt import docopt
from iepy.core import BootstrappedIEPipeline
from iepy... |
a79bb92e976eee795cb3118b3a03f5f0df11e14d | deepchem/feat/__init__.py | deepchem/feat/__init__.py | """
Making it easy to import in classes.
"""
from __future__ import print_function
from __future__ import division
from __future__ import unicode_literals
__author__ = "Bharath Ramsundar"
__copyright__ = "Copyright 2016, Stanford University"
__license__ = "GPL"
from deepchem.feat.base_classes import Featurizer
from d... | """
Making it easy to import in classes.
"""
from __future__ import print_function
from __future__ import division
from __future__ import unicode_literals
__author__ = "Bharath Ramsundar"
__copyright__ = "Copyright 2016, Stanford University"
__license__ = "GPL"
from deepchem.feat.base_classes import Featurizer
from d... | Add CoulombMatrix to dc.feat import | Add CoulombMatrix to dc.feat import
| Python | mit | ktaneishi/deepchem,ktaneishi/deepchem,ktaneishi/deepchem,miaecle/deepchem,joegomes/deepchem,peastman/deepchem,miaecle/deepchem,rbharath/deepchem,miaecle/deepchem,Agent007/deepchem,rbharath/deepchem,peastman/deepchem,deepchem/deepchem,lilleswing/deepchem,joegomes/deepchem,Agent007/deepchem,deepchem/deepchem,Agent007/dee... | """
Making it easy to import in classes.
"""
from __future__ import print_function
from __future__ import division
from __future__ import unicode_literals
__author__ = "Bharath Ramsundar"
__copyright__ = "Copyright 2016, Stanford University"
__license__ = "GPL"
from deepchem.feat.base_classes import Featurizer
from d... | """
Making it easy to import in classes.
"""
from __future__ import print_function
from __future__ import division
from __future__ import unicode_literals
__author__ = "Bharath Ramsundar"
__copyright__ = "Copyright 2016, Stanford University"
__license__ = "GPL"
from deepchem.feat.base_classes import Featurizer
from d... | <commit_before>"""
Making it easy to import in classes.
"""
from __future__ import print_function
from __future__ import division
from __future__ import unicode_literals
__author__ = "Bharath Ramsundar"
__copyright__ = "Copyright 2016, Stanford University"
__license__ = "GPL"
from deepchem.feat.base_classes import Fe... | """
Making it easy to import in classes.
"""
from __future__ import print_function
from __future__ import division
from __future__ import unicode_literals
__author__ = "Bharath Ramsundar"
__copyright__ = "Copyright 2016, Stanford University"
__license__ = "GPL"
from deepchem.feat.base_classes import Featurizer
from d... | """
Making it easy to import in classes.
"""
from __future__ import print_function
from __future__ import division
from __future__ import unicode_literals
__author__ = "Bharath Ramsundar"
__copyright__ = "Copyright 2016, Stanford University"
__license__ = "GPL"
from deepchem.feat.base_classes import Featurizer
from d... | <commit_before>"""
Making it easy to import in classes.
"""
from __future__ import print_function
from __future__ import division
from __future__ import unicode_literals
__author__ = "Bharath Ramsundar"
__copyright__ = "Copyright 2016, Stanford University"
__license__ = "GPL"
from deepchem.feat.base_classes import Fe... |
a65eea671a605bdeef70160e2d967a59888fcd1b | molml/features.py | molml/features.py | from .atom import * # NOQA
from .molecule import * # NOQA
| from .atom import * # NOQA
from .molecule import * # NOQA
from .crystal import * # NOQA
from .kernel import * # NOQA
| Add default import for crystal and kernel | Add default import for crystal and kernel
| Python | mit | crcollins/molml | from .atom import * # NOQA
from .molecule import * # NOQA
Add default import for crystal and kernel | from .atom import * # NOQA
from .molecule import * # NOQA
from .crystal import * # NOQA
from .kernel import * # NOQA
| <commit_before>from .atom import * # NOQA
from .molecule import * # NOQA
<commit_msg>Add default import for crystal and kernel<commit_after> | from .atom import * # NOQA
from .molecule import * # NOQA
from .crystal import * # NOQA
from .kernel import * # NOQA
| from .atom import * # NOQA
from .molecule import * # NOQA
Add default import for crystal and kernelfrom .atom import * # NOQA
from .molecule import * # NOQA
from .crystal import * # NOQA
from .kernel import * # NOQA
| <commit_before>from .atom import * # NOQA
from .molecule import * # NOQA
<commit_msg>Add default import for crystal and kernel<commit_after>from .atom import * # NOQA
from .molecule import * # NOQA
from .crystal import * # NOQA
from .kernel import * # NOQA
|
84bf7bd05b683890e817efb6d26f7176cf555f04 | rapydo/do/__main__.py | rapydo/do/__main__.py | # -*- coding: utf-8 -*-
"""
Command line script main
"""
from rapydo.do.app import Application
import better_exceptions as be
def main():
be # activate better exceptions
Application()
if __name__ == '__main__':
main()
| # -*- coding: utf-8 -*-
"""
Command line script: main function
"""
import better_exceptions as be
from rapydo.do.app import Application
from rapydo.utils.logs import get_logger
log = get_logger(__name__)
def main():
be # activate better exceptions
try:
Application()
except KeyboardInterrup... | Handle nicely keyboard interruption (ctrl+c) | Handle nicely keyboard interruption (ctrl+c)
| Python | mit | rapydo/do | # -*- coding: utf-8 -*-
"""
Command line script main
"""
from rapydo.do.app import Application
import better_exceptions as be
def main():
be # activate better exceptions
Application()
if __name__ == '__main__':
main()
Handle nicely keyboard interruption (ctrl+c) | # -*- coding: utf-8 -*-
"""
Command line script: main function
"""
import better_exceptions as be
from rapydo.do.app import Application
from rapydo.utils.logs import get_logger
log = get_logger(__name__)
def main():
be # activate better exceptions
try:
Application()
except KeyboardInterrup... | <commit_before># -*- coding: utf-8 -*-
"""
Command line script main
"""
from rapydo.do.app import Application
import better_exceptions as be
def main():
be # activate better exceptions
Application()
if __name__ == '__main__':
main()
<commit_msg>Handle nicely keyboard interruption (ctrl+c)<commit_a... | # -*- coding: utf-8 -*-
"""
Command line script: main function
"""
import better_exceptions as be
from rapydo.do.app import Application
from rapydo.utils.logs import get_logger
log = get_logger(__name__)
def main():
be # activate better exceptions
try:
Application()
except KeyboardInterrup... | # -*- coding: utf-8 -*-
"""
Command line script main
"""
from rapydo.do.app import Application
import better_exceptions as be
def main():
be # activate better exceptions
Application()
if __name__ == '__main__':
main()
Handle nicely keyboard interruption (ctrl+c)# -*- coding: utf-8 -*-
"""
Com... | <commit_before># -*- coding: utf-8 -*-
"""
Command line script main
"""
from rapydo.do.app import Application
import better_exceptions as be
def main():
be # activate better exceptions
Application()
if __name__ == '__main__':
main()
<commit_msg>Handle nicely keyboard interruption (ctrl+c)<commit_a... |
fe974197217eff350f1dc0bc5687c83066d6dd34 | kaggle_tools/features_engineering/dates_engineering.py | kaggle_tools/features_engineering/dates_engineering.py | import pandas as pd
def date_features(input_df, datetime_column='tms_gmt'):
"""
Given a datetime column, extracts useful date information
(minute, hour, dow...)
"""
df = input_df.copy()
return (df.set_index(time_column)
.assign(minute=lambda df: df.index.minute,
... | import pandas as pd
import pytz
def date_features(input_df, datetime_column='tms_gmt'):
"""
Given a datetime column, extracts useful date information
(minute, hour, dow...)
"""
df = input_df.copy()
return (df.set_index(time_column)
.assign(minute=lambda df: df.index.minute,
... | Add a datetime localization function | Add a datetime localization function
| Python | mit | yassineAlouini/kaggle-tools,yassineAlouini/kaggle-tools | import pandas as pd
def date_features(input_df, datetime_column='tms_gmt'):
"""
Given a datetime column, extracts useful date information
(minute, hour, dow...)
"""
df = input_df.copy()
return (df.set_index(time_column)
.assign(minute=lambda df: df.index.minute,
... | import pandas as pd
import pytz
def date_features(input_df, datetime_column='tms_gmt'):
"""
Given a datetime column, extracts useful date information
(minute, hour, dow...)
"""
df = input_df.copy()
return (df.set_index(time_column)
.assign(minute=lambda df: df.index.minute,
... | <commit_before>import pandas as pd
def date_features(input_df, datetime_column='tms_gmt'):
"""
Given a datetime column, extracts useful date information
(minute, hour, dow...)
"""
df = input_df.copy()
return (df.set_index(time_column)
.assign(minute=lambda df: df.index.minute,
... | import pandas as pd
import pytz
def date_features(input_df, datetime_column='tms_gmt'):
"""
Given a datetime column, extracts useful date information
(minute, hour, dow...)
"""
df = input_df.copy()
return (df.set_index(time_column)
.assign(minute=lambda df: df.index.minute,
... | import pandas as pd
def date_features(input_df, datetime_column='tms_gmt'):
"""
Given a datetime column, extracts useful date information
(minute, hour, dow...)
"""
df = input_df.copy()
return (df.set_index(time_column)
.assign(minute=lambda df: df.index.minute,
... | <commit_before>import pandas as pd
def date_features(input_df, datetime_column='tms_gmt'):
"""
Given a datetime column, extracts useful date information
(minute, hour, dow...)
"""
df = input_df.copy()
return (df.set_index(time_column)
.assign(minute=lambda df: df.index.minute,
... |
cdb10489382144f77dbe720f230ae92020ffb66c | messaging/test/test_message.py | messaging/test/test_message.py | """Tests the message framework."""
import threading
import time
import unittest
from messaging.message_consumer import consume_messages
from messaging.message_producer import MessageProducer
class TestMessage(unittest.TestCase):
"""Tests the message framework."""
EXCHANGE = 'test'
def setUp(self):
... | """Tests the message framework."""
import threading
import time
import unittest
from messaging.message_consumer import consume_messages
from messaging.message_producer import MessageProducer
class TestMessage(unittest.TestCase):
"""Tests the message framework."""
EXCHANGE = 'test'
def setUp(self):
... | Make messaging test more reliable | Make messaging test more reliable
| Python | mit | bskari/sparkfun-avc,bskari/sparkfun-avc,bskari/sparkfun-avc,bskari/sparkfun-avc,bskari/sparkfun-avc,bskari/sparkfun-avc | """Tests the message framework."""
import threading
import time
import unittest
from messaging.message_consumer import consume_messages
from messaging.message_producer import MessageProducer
class TestMessage(unittest.TestCase):
"""Tests the message framework."""
EXCHANGE = 'test'
def setUp(self):
... | """Tests the message framework."""
import threading
import time
import unittest
from messaging.message_consumer import consume_messages
from messaging.message_producer import MessageProducer
class TestMessage(unittest.TestCase):
"""Tests the message framework."""
EXCHANGE = 'test'
def setUp(self):
... | <commit_before>"""Tests the message framework."""
import threading
import time
import unittest
from messaging.message_consumer import consume_messages
from messaging.message_producer import MessageProducer
class TestMessage(unittest.TestCase):
"""Tests the message framework."""
EXCHANGE = 'test'
def s... | """Tests the message framework."""
import threading
import time
import unittest
from messaging.message_consumer import consume_messages
from messaging.message_producer import MessageProducer
class TestMessage(unittest.TestCase):
"""Tests the message framework."""
EXCHANGE = 'test'
def setUp(self):
... | """Tests the message framework."""
import threading
import time
import unittest
from messaging.message_consumer import consume_messages
from messaging.message_producer import MessageProducer
class TestMessage(unittest.TestCase):
"""Tests the message framework."""
EXCHANGE = 'test'
def setUp(self):
... | <commit_before>"""Tests the message framework."""
import threading
import time
import unittest
from messaging.message_consumer import consume_messages
from messaging.message_producer import MessageProducer
class TestMessage(unittest.TestCase):
"""Tests the message framework."""
EXCHANGE = 'test'
def s... |
41d379fcb1e3d1828e7898045cca0505cb47ae61 | xgds_data/defaultSettings.py | xgds_data/defaultSettings.py | # __BEGIN_LICENSE__
# Copyright (C) 2008-2010 United States Government as represented by
# the Administrator of the National Aeronautics and Space Administration.
# All Rights Reserved.
# __END_LICENSE__
"""
This app may define some new parameters that can be modified in the
Django settings module. Let's say one such... | # __BEGIN_LICENSE__
# Copyright (C) 2008-2010 United States Government as represented by
# the Administrator of the National Aeronautics and Space Administration.
# All Rights Reserved.
# __END_LICENSE__
"""
This app may define some new parameters that can be modified in the
Django settings module. Let's say one such... | Move log enabling out of submodule | Move log enabling out of submodule
| Python | apache-2.0 | xgds/xgds_data,xgds/xgds_data | # __BEGIN_LICENSE__
# Copyright (C) 2008-2010 United States Government as represented by
# the Administrator of the National Aeronautics and Space Administration.
# All Rights Reserved.
# __END_LICENSE__
"""
This app may define some new parameters that can be modified in the
Django settings module. Let's say one such... | # __BEGIN_LICENSE__
# Copyright (C) 2008-2010 United States Government as represented by
# the Administrator of the National Aeronautics and Space Administration.
# All Rights Reserved.
# __END_LICENSE__
"""
This app may define some new parameters that can be modified in the
Django settings module. Let's say one such... | <commit_before># __BEGIN_LICENSE__
# Copyright (C) 2008-2010 United States Government as represented by
# the Administrator of the National Aeronautics and Space Administration.
# All Rights Reserved.
# __END_LICENSE__
"""
This app may define some new parameters that can be modified in the
Django settings module. Let... | # __BEGIN_LICENSE__
# Copyright (C) 2008-2010 United States Government as represented by
# the Administrator of the National Aeronautics and Space Administration.
# All Rights Reserved.
# __END_LICENSE__
"""
This app may define some new parameters that can be modified in the
Django settings module. Let's say one such... | # __BEGIN_LICENSE__
# Copyright (C) 2008-2010 United States Government as represented by
# the Administrator of the National Aeronautics and Space Administration.
# All Rights Reserved.
# __END_LICENSE__
"""
This app may define some new parameters that can be modified in the
Django settings module. Let's say one such... | <commit_before># __BEGIN_LICENSE__
# Copyright (C) 2008-2010 United States Government as represented by
# the Administrator of the National Aeronautics and Space Administration.
# All Rights Reserved.
# __END_LICENSE__
"""
This app may define some new parameters that can be modified in the
Django settings module. Let... |
98df7851355f81f8b6119781c003dc2f84b4dc85 | django-ssheepdog/setup.py | django-ssheepdog/setup.py | from setuptools import setup
description = 'ssheepdog'
long_desc = description
setup(
name='ssheepdog',
version='0.0.1',
url='https://github.com/SheepDogInc/ssheepdog',
install_requires=[
'django-celery',
'django-kombu',
],
description=description,
long_description=long_des... | from setuptools import setup
description = 'ssheepdog'
long_desc = description
setup(
name='ssheepdog',
version='0.0.1',
url='https://github.com/SheepDogInc/ssheepdog',
install_requires=[
'django-celery',
'django-kombu',
'south',
'ssh'
],
description=description... | Add a couple of dependencies | Add a couple of dependencies
| Python | bsd-3-clause | SheepDogInc/ssheepdog,SheepDogInc/ssheepdog,SheepDogInc/ssheepdog | from setuptools import setup
description = 'ssheepdog'
long_desc = description
setup(
name='ssheepdog',
version='0.0.1',
url='https://github.com/SheepDogInc/ssheepdog',
install_requires=[
'django-celery',
'django-kombu',
],
description=description,
long_description=long_des... | from setuptools import setup
description = 'ssheepdog'
long_desc = description
setup(
name='ssheepdog',
version='0.0.1',
url='https://github.com/SheepDogInc/ssheepdog',
install_requires=[
'django-celery',
'django-kombu',
'south',
'ssh'
],
description=description... | <commit_before>from setuptools import setup
description = 'ssheepdog'
long_desc = description
setup(
name='ssheepdog',
version='0.0.1',
url='https://github.com/SheepDogInc/ssheepdog',
install_requires=[
'django-celery',
'django-kombu',
],
description=description,
long_descr... | from setuptools import setup
description = 'ssheepdog'
long_desc = description
setup(
name='ssheepdog',
version='0.0.1',
url='https://github.com/SheepDogInc/ssheepdog',
install_requires=[
'django-celery',
'django-kombu',
'south',
'ssh'
],
description=description... | from setuptools import setup
description = 'ssheepdog'
long_desc = description
setup(
name='ssheepdog',
version='0.0.1',
url='https://github.com/SheepDogInc/ssheepdog',
install_requires=[
'django-celery',
'django-kombu',
],
description=description,
long_description=long_des... | <commit_before>from setuptools import setup
description = 'ssheepdog'
long_desc = description
setup(
name='ssheepdog',
version='0.0.1',
url='https://github.com/SheepDogInc/ssheepdog',
install_requires=[
'django-celery',
'django-kombu',
],
description=description,
long_descr... |
3a781fe4b579af41b2c4f0cb7ef30a36085152ed | djconnectwise/__init__.py | djconnectwise/__init__.py | # -*- coding: utf-8 -*-
VERSION = (0, 0, 92, 'alpha')
# pragma: no cover
if VERSION[-1] != "final":
__version__ = '.'.join(map(str, VERSION))
else:
# pragma: no cover
__version__ = '.'.join(map(str, VERSION[:-1]))
| # -*- coding: utf-8 -*-
VERSION = (0, 0, 93, 'alpha')
# pragma: no cover
if VERSION[-1] != "final":
__version__ = '.'.join(map(str, VERSION))
else:
# pragma: no cover
__version__ = '.'.join(map(str, VERSION[:-1]))
| Update to 0.0.93, because PyPI didn't seem to let anyone download 0.0.92 even though it uploaded fine. | Update to 0.0.93, because PyPI didn't seem to let anyone download 0.0.92 even though it uploaded fine.
| Python | mit | KerkhoffTechnologies/django-connectwise,KerkhoffTechnologies/django-connectwise | # -*- coding: utf-8 -*-
VERSION = (0, 0, 92, 'alpha')
# pragma: no cover
if VERSION[-1] != "final":
__version__ = '.'.join(map(str, VERSION))
else:
# pragma: no cover
__version__ = '.'.join(map(str, VERSION[:-1]))
Update to 0.0.93, because PyPI didn't seem to let anyone download 0.0.92 even though it uploa... | # -*- coding: utf-8 -*-
VERSION = (0, 0, 93, 'alpha')
# pragma: no cover
if VERSION[-1] != "final":
__version__ = '.'.join(map(str, VERSION))
else:
# pragma: no cover
__version__ = '.'.join(map(str, VERSION[:-1]))
| <commit_before># -*- coding: utf-8 -*-
VERSION = (0, 0, 92, 'alpha')
# pragma: no cover
if VERSION[-1] != "final":
__version__ = '.'.join(map(str, VERSION))
else:
# pragma: no cover
__version__ = '.'.join(map(str, VERSION[:-1]))
<commit_msg>Update to 0.0.93, because PyPI didn't seem to let anyone download ... | # -*- coding: utf-8 -*-
VERSION = (0, 0, 93, 'alpha')
# pragma: no cover
if VERSION[-1] != "final":
__version__ = '.'.join(map(str, VERSION))
else:
# pragma: no cover
__version__ = '.'.join(map(str, VERSION[:-1]))
| # -*- coding: utf-8 -*-
VERSION = (0, 0, 92, 'alpha')
# pragma: no cover
if VERSION[-1] != "final":
__version__ = '.'.join(map(str, VERSION))
else:
# pragma: no cover
__version__ = '.'.join(map(str, VERSION[:-1]))
Update to 0.0.93, because PyPI didn't seem to let anyone download 0.0.92 even though it uploa... | <commit_before># -*- coding: utf-8 -*-
VERSION = (0, 0, 92, 'alpha')
# pragma: no cover
if VERSION[-1] != "final":
__version__ = '.'.join(map(str, VERSION))
else:
# pragma: no cover
__version__ = '.'.join(map(str, VERSION[:-1]))
<commit_msg>Update to 0.0.93, because PyPI didn't seem to let anyone download ... |
8b7d8919afa12f33bed096f49780914f8878163f | brew/__init__.py | brew/__init__.py | from flask import Flask
from flask.ext.pymongo import PyMongo
from flask.ext.babel import Babel
from flask.ext.cache import Cache
from brew.io import TemperatureController
from brew.state import Machine
app = Flask(__name__)
app.config.from_object('brew.settings')
babel = Babel(app)
cache = Cache(app)
mongo = PyMong... | from flask import Flask
from flask.ext.pymongo import PyMongo
from flask.ext.babel import Babel
from flask.ext.cache import Cache
from brew.io import TemperatureController
from brew.state import Machine
app = Flask(__name__)
app.config.from_object('brew.settings')
app.config.from_pyfile('brewmeister.cfg', silent=True... | Allow loading settings from brewmeister.cfg | Allow loading settings from brewmeister.cfg
| Python | mit | brewpeople/brewmeister,brewpeople/brewmeister,brewpeople/brewmeister | from flask import Flask
from flask.ext.pymongo import PyMongo
from flask.ext.babel import Babel
from flask.ext.cache import Cache
from brew.io import TemperatureController
from brew.state import Machine
app = Flask(__name__)
app.config.from_object('brew.settings')
babel = Babel(app)
cache = Cache(app)
mongo = PyMong... | from flask import Flask
from flask.ext.pymongo import PyMongo
from flask.ext.babel import Babel
from flask.ext.cache import Cache
from brew.io import TemperatureController
from brew.state import Machine
app = Flask(__name__)
app.config.from_object('brew.settings')
app.config.from_pyfile('brewmeister.cfg', silent=True... | <commit_before>from flask import Flask
from flask.ext.pymongo import PyMongo
from flask.ext.babel import Babel
from flask.ext.cache import Cache
from brew.io import TemperatureController
from brew.state import Machine
app = Flask(__name__)
app.config.from_object('brew.settings')
babel = Babel(app)
cache = Cache(app)... | from flask import Flask
from flask.ext.pymongo import PyMongo
from flask.ext.babel import Babel
from flask.ext.cache import Cache
from brew.io import TemperatureController
from brew.state import Machine
app = Flask(__name__)
app.config.from_object('brew.settings')
app.config.from_pyfile('brewmeister.cfg', silent=True... | from flask import Flask
from flask.ext.pymongo import PyMongo
from flask.ext.babel import Babel
from flask.ext.cache import Cache
from brew.io import TemperatureController
from brew.state import Machine
app = Flask(__name__)
app.config.from_object('brew.settings')
babel = Babel(app)
cache = Cache(app)
mongo = PyMong... | <commit_before>from flask import Flask
from flask.ext.pymongo import PyMongo
from flask.ext.babel import Babel
from flask.ext.cache import Cache
from brew.io import TemperatureController
from brew.state import Machine
app = Flask(__name__)
app.config.from_object('brew.settings')
babel = Babel(app)
cache = Cache(app)... |
e64acbdf756839adf28320641124ee696d38be54 | crispy_forms/tests/runtests.py | crispy_forms/tests/runtests.py | #!/usr/bin/env python
import os
import sys
cmds = [
'python runtests_bootstrap.py',
'python runtests_bootstrap3.py',
'python runtests_uniform.py',
]
for cmd in cmds:
retval = os.system(cmd)
if retval:
sys.exit(1)
| #!/usr/bin/env python
import os
import sys
import django
if django.VERSION < (1,6):
cmds = [
'python runtests_bootstrap_legacy.py',
'python runtests_bootstrap3_legacy.py',
'python runtests_uniform_legacy.py',
]
else:
cmds = [
'python runtests_bootstrap.py',
'python ... | Use old legacy runtest files for Django 1.4 | Use old legacy runtest files for Django 1.4
| Python | mit | ngenovictor/django-crispy-forms,jtyoung/django-crispy-forms,VishvajitP/django-crispy-forms,davidszotten/django-crispy-forms,jtyoung/django-crispy-forms,schrd/django-crispy-forms,django-crispy-forms/django-crispy-forms,dzhuang/django-crispy-forms,davidszotten/django-crispy-forms,ngenovictor/django-crispy-forms,RamezIssa... | #!/usr/bin/env python
import os
import sys
cmds = [
'python runtests_bootstrap.py',
'python runtests_bootstrap3.py',
'python runtests_uniform.py',
]
for cmd in cmds:
retval = os.system(cmd)
if retval:
sys.exit(1)
Use old legacy runtest files for Django 1.4 | #!/usr/bin/env python
import os
import sys
import django
if django.VERSION < (1,6):
cmds = [
'python runtests_bootstrap_legacy.py',
'python runtests_bootstrap3_legacy.py',
'python runtests_uniform_legacy.py',
]
else:
cmds = [
'python runtests_bootstrap.py',
'python ... | <commit_before>#!/usr/bin/env python
import os
import sys
cmds = [
'python runtests_bootstrap.py',
'python runtests_bootstrap3.py',
'python runtests_uniform.py',
]
for cmd in cmds:
retval = os.system(cmd)
if retval:
sys.exit(1)
<commit_msg>Use old legacy runtest files for Django 1.4<commi... | #!/usr/bin/env python
import os
import sys
import django
if django.VERSION < (1,6):
cmds = [
'python runtests_bootstrap_legacy.py',
'python runtests_bootstrap3_legacy.py',
'python runtests_uniform_legacy.py',
]
else:
cmds = [
'python runtests_bootstrap.py',
'python ... | #!/usr/bin/env python
import os
import sys
cmds = [
'python runtests_bootstrap.py',
'python runtests_bootstrap3.py',
'python runtests_uniform.py',
]
for cmd in cmds:
retval = os.system(cmd)
if retval:
sys.exit(1)
Use old legacy runtest files for Django 1.4#!/usr/bin/env python
import os
... | <commit_before>#!/usr/bin/env python
import os
import sys
cmds = [
'python runtests_bootstrap.py',
'python runtests_bootstrap3.py',
'python runtests_uniform.py',
]
for cmd in cmds:
retval = os.system(cmd)
if retval:
sys.exit(1)
<commit_msg>Use old legacy runtest files for Django 1.4<commi... |
ca6d0c5f0fc61ce7d939e49f276c36c5cb12a589 | backend/globaleaks/tests/utils/test_zipstream.py | backend/globaleaks/tests/utils/test_zipstream.py | # -*- encoding: utf-8 -*-
import os
from zipfile import ZipFile
from twisted.internet.defer import inlineCallbacks
from globaleaks.db.datainit import load_appdata
from globaleaks.settings import GLSettings
from globaleaks.tests import helpers
from globaleaks.utils.zipstream import ZipStream, get_compression_opts
cl... | # -*- encoding: utf-8 -*-
import os
from zipfile import ZipFile
from twisted.internet.defer import inlineCallbacks
from globaleaks.db.datainit import load_appdata
from globaleaks.settings import GLSettings
from globaleaks.tests import helpers
from globaleaks.utils.zipstream import ZipStream
class TestCollection(hel... | Simplify zipstream following the simplification of the zip routines implemented | Simplify zipstream following the simplification of the zip routines implemented
| Python | agpl-3.0 | vodkina/GlobaLeaks,vodkina/GlobaLeaks,vodkina/GlobaLeaks,vodkina/GlobaLeaks | # -*- encoding: utf-8 -*-
import os
from zipfile import ZipFile
from twisted.internet.defer import inlineCallbacks
from globaleaks.db.datainit import load_appdata
from globaleaks.settings import GLSettings
from globaleaks.tests import helpers
from globaleaks.utils.zipstream import ZipStream, get_compression_opts
cl... | # -*- encoding: utf-8 -*-
import os
from zipfile import ZipFile
from twisted.internet.defer import inlineCallbacks
from globaleaks.db.datainit import load_appdata
from globaleaks.settings import GLSettings
from globaleaks.tests import helpers
from globaleaks.utils.zipstream import ZipStream
class TestCollection(hel... | <commit_before># -*- encoding: utf-8 -*-
import os
from zipfile import ZipFile
from twisted.internet.defer import inlineCallbacks
from globaleaks.db.datainit import load_appdata
from globaleaks.settings import GLSettings
from globaleaks.tests import helpers
from globaleaks.utils.zipstream import ZipStream, get_compr... | # -*- encoding: utf-8 -*-
import os
from zipfile import ZipFile
from twisted.internet.defer import inlineCallbacks
from globaleaks.db.datainit import load_appdata
from globaleaks.settings import GLSettings
from globaleaks.tests import helpers
from globaleaks.utils.zipstream import ZipStream
class TestCollection(hel... | # -*- encoding: utf-8 -*-
import os
from zipfile import ZipFile
from twisted.internet.defer import inlineCallbacks
from globaleaks.db.datainit import load_appdata
from globaleaks.settings import GLSettings
from globaleaks.tests import helpers
from globaleaks.utils.zipstream import ZipStream, get_compression_opts
cl... | <commit_before># -*- encoding: utf-8 -*-
import os
from zipfile import ZipFile
from twisted.internet.defer import inlineCallbacks
from globaleaks.db.datainit import load_appdata
from globaleaks.settings import GLSettings
from globaleaks.tests import helpers
from globaleaks.utils.zipstream import ZipStream, get_compr... |
cdb66acf92dae34d1b17c2a429738c73fb06caad | scoring/checks/ldap.py | scoring/checks/ldap.py | from __future__ import absolute_import
from config import config
import ldap
# DEFAULTS
ldap_config = {
'timeout': 5
}
# /DEFAULTS
# CONFIG
if "ldap" in config:
ldap_config.update(config["ldap"])
# /CONFIG
def check_ldap_lookup(check, data):
check.addOutput("ScoreEngine: %s Check\n" % (check.getServiceName()))
c... | from __future__ import absolute_import
from config import config
import ldap
# DEFAULTS
ldap_config = {
'timeout': 5
}
# /DEFAULTS
# CONFIG
if "ldap" in config:
ldap_config.update(config["ldap"])
# /CONFIG
def check_ldap_lookup(check, data):
check.addOutput("ScoreEngine: %s Check\n" % (check.getServiceName()))
c... | Make LDAP check even better | Make LDAP check even better
| Python | mit | ubnetdef/scoreengine,ubnetdef/scoreengine | from __future__ import absolute_import
from config import config
import ldap
# DEFAULTS
ldap_config = {
'timeout': 5
}
# /DEFAULTS
# CONFIG
if "ldap" in config:
ldap_config.update(config["ldap"])
# /CONFIG
def check_ldap_lookup(check, data):
check.addOutput("ScoreEngine: %s Check\n" % (check.getServiceName()))
c... | from __future__ import absolute_import
from config import config
import ldap
# DEFAULTS
ldap_config = {
'timeout': 5
}
# /DEFAULTS
# CONFIG
if "ldap" in config:
ldap_config.update(config["ldap"])
# /CONFIG
def check_ldap_lookup(check, data):
check.addOutput("ScoreEngine: %s Check\n" % (check.getServiceName()))
c... | <commit_before>from __future__ import absolute_import
from config import config
import ldap
# DEFAULTS
ldap_config = {
'timeout': 5
}
# /DEFAULTS
# CONFIG
if "ldap" in config:
ldap_config.update(config["ldap"])
# /CONFIG
def check_ldap_lookup(check, data):
check.addOutput("ScoreEngine: %s Check\n" % (check.getSer... | from __future__ import absolute_import
from config import config
import ldap
# DEFAULTS
ldap_config = {
'timeout': 5
}
# /DEFAULTS
# CONFIG
if "ldap" in config:
ldap_config.update(config["ldap"])
# /CONFIG
def check_ldap_lookup(check, data):
check.addOutput("ScoreEngine: %s Check\n" % (check.getServiceName()))
c... | from __future__ import absolute_import
from config import config
import ldap
# DEFAULTS
ldap_config = {
'timeout': 5
}
# /DEFAULTS
# CONFIG
if "ldap" in config:
ldap_config.update(config["ldap"])
# /CONFIG
def check_ldap_lookup(check, data):
check.addOutput("ScoreEngine: %s Check\n" % (check.getServiceName()))
c... | <commit_before>from __future__ import absolute_import
from config import config
import ldap
# DEFAULTS
ldap_config = {
'timeout': 5
}
# /DEFAULTS
# CONFIG
if "ldap" in config:
ldap_config.update(config["ldap"])
# /CONFIG
def check_ldap_lookup(check, data):
check.addOutput("ScoreEngine: %s Check\n" % (check.getSer... |
7576d63bc2061074a41685c69546a4a5d57bc3fb | unihan_db/__about__.py | unihan_db/__about__.py | __title__ = 'unihan-db'
__package_name__ = 'unihan_db'
__description__ = 'SQLAlchemy models for UNIHAN database'
__version__ = '0.1.0'
__author__ = 'Tony Narlock'
__github__ = 'https://github.com/cihai/unihan-db'
__pypi__ = 'https://pypi.org/project/unihan-db/'
__email__ = 'cihai@git-pull.com'
__license__ = 'MIT'
__cop... | __title__ = 'unihan-db'
__package_name__ = 'unihan_db'
__description__ = 'SQLAlchemy models for UNIHAN database'
__version__ = '0.1.0'
__author__ = 'Tony Narlock'
__github__ = 'https://github.com/cihai/unihan-db'
__docs__ = 'https://unihan-db.git-pull.com'
__tracker__ = 'https://github.com/cihai/unihan-db/issues'
__pyp... | Add docs and tracker to metadata | Add docs and tracker to metadata
| Python | mit | cihai/unihan-db | __title__ = 'unihan-db'
__package_name__ = 'unihan_db'
__description__ = 'SQLAlchemy models for UNIHAN database'
__version__ = '0.1.0'
__author__ = 'Tony Narlock'
__github__ = 'https://github.com/cihai/unihan-db'
__pypi__ = 'https://pypi.org/project/unihan-db/'
__email__ = 'cihai@git-pull.com'
__license__ = 'MIT'
__cop... | __title__ = 'unihan-db'
__package_name__ = 'unihan_db'
__description__ = 'SQLAlchemy models for UNIHAN database'
__version__ = '0.1.0'
__author__ = 'Tony Narlock'
__github__ = 'https://github.com/cihai/unihan-db'
__docs__ = 'https://unihan-db.git-pull.com'
__tracker__ = 'https://github.com/cihai/unihan-db/issues'
__pyp... | <commit_before>__title__ = 'unihan-db'
__package_name__ = 'unihan_db'
__description__ = 'SQLAlchemy models for UNIHAN database'
__version__ = '0.1.0'
__author__ = 'Tony Narlock'
__github__ = 'https://github.com/cihai/unihan-db'
__pypi__ = 'https://pypi.org/project/unihan-db/'
__email__ = 'cihai@git-pull.com'
__license_... | __title__ = 'unihan-db'
__package_name__ = 'unihan_db'
__description__ = 'SQLAlchemy models for UNIHAN database'
__version__ = '0.1.0'
__author__ = 'Tony Narlock'
__github__ = 'https://github.com/cihai/unihan-db'
__docs__ = 'https://unihan-db.git-pull.com'
__tracker__ = 'https://github.com/cihai/unihan-db/issues'
__pyp... | __title__ = 'unihan-db'
__package_name__ = 'unihan_db'
__description__ = 'SQLAlchemy models for UNIHAN database'
__version__ = '0.1.0'
__author__ = 'Tony Narlock'
__github__ = 'https://github.com/cihai/unihan-db'
__pypi__ = 'https://pypi.org/project/unihan-db/'
__email__ = 'cihai@git-pull.com'
__license__ = 'MIT'
__cop... | <commit_before>__title__ = 'unihan-db'
__package_name__ = 'unihan_db'
__description__ = 'SQLAlchemy models for UNIHAN database'
__version__ = '0.1.0'
__author__ = 'Tony Narlock'
__github__ = 'https://github.com/cihai/unihan-db'
__pypi__ = 'https://pypi.org/project/unihan-db/'
__email__ = 'cihai@git-pull.com'
__license_... |
6b97c1bdcb7d7152c7c0a14833caadbf3aa5ad04 | lms/djangoapps/coursewarehistoryextended/fields.py | lms/djangoapps/coursewarehistoryextended/fields.py | """
Custom fields for use in the coursewarehistoryextended django app.
"""
from django.db.models.fields import AutoField
class UnsignedBigIntAutoField(AutoField):
"""
An unsigned 8-byte integer for auto-incrementing primary keys.
"""
def db_type(self, connection):
if connection.settings_dict[... | """
Custom fields for use in the coursewarehistoryextended django app.
"""
from django.db.models.fields import AutoField
class UnsignedBigIntAutoField(AutoField):
"""
An unsigned 8-byte integer for auto-incrementing primary keys.
"""
def db_type(self, connection):
if connection.settings_dict[... | Add a rel_db_type to UnsignedBigIntAutoField | Add a rel_db_type to UnsignedBigIntAutoField
| Python | agpl-3.0 | proversity-org/edx-platform,angelapper/edx-platform,gymnasium/edx-platform,kmoocdev2/edx-platform,jolyonb/edx-platform,TeachAtTUM/edx-platform,cpennington/edx-platform,kmoocdev2/edx-platform,edx/edx-platform,eduNEXT/edunext-platform,angelapper/edx-platform,ahmedaljazzar/edx-platform,kmoocdev2/edx-platform,hastexo/edx-p... | """
Custom fields for use in the coursewarehistoryextended django app.
"""
from django.db.models.fields import AutoField
class UnsignedBigIntAutoField(AutoField):
"""
An unsigned 8-byte integer for auto-incrementing primary keys.
"""
def db_type(self, connection):
if connection.settings_dict[... | """
Custom fields for use in the coursewarehistoryextended django app.
"""
from django.db.models.fields import AutoField
class UnsignedBigIntAutoField(AutoField):
"""
An unsigned 8-byte integer for auto-incrementing primary keys.
"""
def db_type(self, connection):
if connection.settings_dict[... | <commit_before>"""
Custom fields for use in the coursewarehistoryextended django app.
"""
from django.db.models.fields import AutoField
class UnsignedBigIntAutoField(AutoField):
"""
An unsigned 8-byte integer for auto-incrementing primary keys.
"""
def db_type(self, connection):
if connection... | """
Custom fields for use in the coursewarehistoryextended django app.
"""
from django.db.models.fields import AutoField
class UnsignedBigIntAutoField(AutoField):
"""
An unsigned 8-byte integer for auto-incrementing primary keys.
"""
def db_type(self, connection):
if connection.settings_dict[... | """
Custom fields for use in the coursewarehistoryextended django app.
"""
from django.db.models.fields import AutoField
class UnsignedBigIntAutoField(AutoField):
"""
An unsigned 8-byte integer for auto-incrementing primary keys.
"""
def db_type(self, connection):
if connection.settings_dict[... | <commit_before>"""
Custom fields for use in the coursewarehistoryextended django app.
"""
from django.db.models.fields import AutoField
class UnsignedBigIntAutoField(AutoField):
"""
An unsigned 8-byte integer for auto-incrementing primary keys.
"""
def db_type(self, connection):
if connection... |
dd32edc5d42550c57901923d110324e7980f961f | careers/careers/urls.py | careers/careers/urls.py | from django.conf.urls import url
from . import views
from .feeds import LatestPositionsFeed
urlpatterns = [
url(r'^position/(?P<source>[\w]+)/(?P<job_id>[\w]+)$', views.PositionDetailView.as_view(),
name='careers.position'),
url(r'^$', views.HomeView.as_view(), name='careers.home'),
url(r'^feed/$'... | from django.conf.urls import url
from . import views
from .feeds import LatestPositionsFeed
urlpatterns = [
url(r'^position/(?P<source>[\w]+)/(?P<job_id>[\w]+)/$', views.PositionDetailView.as_view(),
name='careers.position'),
url(r'^$', views.HomeView.as_view(), name='careers.home'),
url(r'^feed/$... | Add ending slash in position URLs. | Add ending slash in position URLs.
| Python | mpl-2.0 | mozilla/lumbergh,alexgibson/lumbergh,alexgibson/lumbergh,glogiotatidis/lumbergh,glogiotatidis/lumbergh,glogiotatidis/lumbergh,glogiotatidis/lumbergh,alexgibson/lumbergh,alexgibson/lumbergh,mozilla/lumbergh,mozilla/lumbergh,mozilla/lumbergh | from django.conf.urls import url
from . import views
from .feeds import LatestPositionsFeed
urlpatterns = [
url(r'^position/(?P<source>[\w]+)/(?P<job_id>[\w]+)$', views.PositionDetailView.as_view(),
name='careers.position'),
url(r'^$', views.HomeView.as_view(), name='careers.home'),
url(r'^feed/$'... | from django.conf.urls import url
from . import views
from .feeds import LatestPositionsFeed
urlpatterns = [
url(r'^position/(?P<source>[\w]+)/(?P<job_id>[\w]+)/$', views.PositionDetailView.as_view(),
name='careers.position'),
url(r'^$', views.HomeView.as_view(), name='careers.home'),
url(r'^feed/$... | <commit_before>from django.conf.urls import url
from . import views
from .feeds import LatestPositionsFeed
urlpatterns = [
url(r'^position/(?P<source>[\w]+)/(?P<job_id>[\w]+)$', views.PositionDetailView.as_view(),
name='careers.position'),
url(r'^$', views.HomeView.as_view(), name='careers.home'),
... | from django.conf.urls import url
from . import views
from .feeds import LatestPositionsFeed
urlpatterns = [
url(r'^position/(?P<source>[\w]+)/(?P<job_id>[\w]+)/$', views.PositionDetailView.as_view(),
name='careers.position'),
url(r'^$', views.HomeView.as_view(), name='careers.home'),
url(r'^feed/$... | from django.conf.urls import url
from . import views
from .feeds import LatestPositionsFeed
urlpatterns = [
url(r'^position/(?P<source>[\w]+)/(?P<job_id>[\w]+)$', views.PositionDetailView.as_view(),
name='careers.position'),
url(r'^$', views.HomeView.as_view(), name='careers.home'),
url(r'^feed/$'... | <commit_before>from django.conf.urls import url
from . import views
from .feeds import LatestPositionsFeed
urlpatterns = [
url(r'^position/(?P<source>[\w]+)/(?P<job_id>[\w]+)$', views.PositionDetailView.as_view(),
name='careers.position'),
url(r'^$', views.HomeView.as_view(), name='careers.home'),
... |
7ed3ba20aae568d0c12ec361210d1189ecd534cf | lazysignup/backends.py | lazysignup/backends.py | from django.contrib.auth.backends import ModelBackend
from django.contrib.auth.models import User
class LazySignupBackend(ModelBackend):
def authenticate(self, username=None):
users = [u for u in User.objects.filter(username=username)
if not u.has_usable_password()]
if len(users) ... | from django.contrib.auth.backends import ModelBackend
from lazysignup.models import LazyUser
class LazySignupBackend(ModelBackend):
def authenticate(self, username=None):
lazy_users = LazyUser.objects.filter(
user__username=username
).select_related('user')
try:
ret... | Remove the lazy signup backend's hard dependency on django.contrib.auth.user (and remove the inconsistency in checking for whether a user is lazy or not). | Remove the lazy signup backend's hard dependency on django.contrib.auth.user (and remove the inconsistency in checking for whether a user is lazy or not). | Python | bsd-3-clause | stefanklug/django-lazysignup,rwillmer/django-lazysignup,rwillmer/django-lazysignup,danfairs/django-lazysignup,stefanklug/django-lazysignup,danfairs/django-lazysignup | from django.contrib.auth.backends import ModelBackend
from django.contrib.auth.models import User
class LazySignupBackend(ModelBackend):
def authenticate(self, username=None):
users = [u for u in User.objects.filter(username=username)
if not u.has_usable_password()]
if len(users) ... | from django.contrib.auth.backends import ModelBackend
from lazysignup.models import LazyUser
class LazySignupBackend(ModelBackend):
def authenticate(self, username=None):
lazy_users = LazyUser.objects.filter(
user__username=username
).select_related('user')
try:
ret... | <commit_before>from django.contrib.auth.backends import ModelBackend
from django.contrib.auth.models import User
class LazySignupBackend(ModelBackend):
def authenticate(self, username=None):
users = [u for u in User.objects.filter(username=username)
if not u.has_usable_password()]
... | from django.contrib.auth.backends import ModelBackend
from lazysignup.models import LazyUser
class LazySignupBackend(ModelBackend):
def authenticate(self, username=None):
lazy_users = LazyUser.objects.filter(
user__username=username
).select_related('user')
try:
ret... | from django.contrib.auth.backends import ModelBackend
from django.contrib.auth.models import User
class LazySignupBackend(ModelBackend):
def authenticate(self, username=None):
users = [u for u in User.objects.filter(username=username)
if not u.has_usable_password()]
if len(users) ... | <commit_before>from django.contrib.auth.backends import ModelBackend
from django.contrib.auth.models import User
class LazySignupBackend(ModelBackend):
def authenticate(self, username=None):
users = [u for u in User.objects.filter(username=username)
if not u.has_usable_password()]
... |
501bcb9aab561f9155857e1601a303374ae5698c | byceps/typing.py | byceps/typing.py | """
byceps.typing
~~~~~~~~~~~~~
BYCEPS-specific type aliases for PEP 484 type hints
:Copyright: 2006-2017 Jochen Kupperschmidt
:License: Modified BSD, see LICENSE for details.
"""
from uuid import UUID
UserID = UUID
BrandID = str
PartyID = str
| """
byceps.typing
~~~~~~~~~~~~~
BYCEPS-specific type aliases for PEP 484 type hints
:Copyright: 2006-2017 Jochen Kupperschmidt
:License: Modified BSD, see LICENSE for details.
"""
from typing import NewType
from uuid import UUID
UserID = NewType('UserID', UUID)
BrandID = NewType('BrandID', str)
PartyID = NewType... | Make BYCEPS-specific types actual lightweight types | Make BYCEPS-specific types actual lightweight types
This makes mypy report the custom type names in error messages instead of the existing types the alias.
| Python | bsd-3-clause | homeworkprod/byceps,m-ober/byceps,m-ober/byceps,m-ober/byceps,homeworkprod/byceps,homeworkprod/byceps | """
byceps.typing
~~~~~~~~~~~~~
BYCEPS-specific type aliases for PEP 484 type hints
:Copyright: 2006-2017 Jochen Kupperschmidt
:License: Modified BSD, see LICENSE for details.
"""
from uuid import UUID
UserID = UUID
BrandID = str
PartyID = str
Make BYCEPS-specific types actual lightweight types
This makes mypy ... | """
byceps.typing
~~~~~~~~~~~~~
BYCEPS-specific type aliases for PEP 484 type hints
:Copyright: 2006-2017 Jochen Kupperschmidt
:License: Modified BSD, see LICENSE for details.
"""
from typing import NewType
from uuid import UUID
UserID = NewType('UserID', UUID)
BrandID = NewType('BrandID', str)
PartyID = NewType... | <commit_before>"""
byceps.typing
~~~~~~~~~~~~~
BYCEPS-specific type aliases for PEP 484 type hints
:Copyright: 2006-2017 Jochen Kupperschmidt
:License: Modified BSD, see LICENSE for details.
"""
from uuid import UUID
UserID = UUID
BrandID = str
PartyID = str
<commit_msg>Make BYCEPS-specific types actual lightwei... | """
byceps.typing
~~~~~~~~~~~~~
BYCEPS-specific type aliases for PEP 484 type hints
:Copyright: 2006-2017 Jochen Kupperschmidt
:License: Modified BSD, see LICENSE for details.
"""
from typing import NewType
from uuid import UUID
UserID = NewType('UserID', UUID)
BrandID = NewType('BrandID', str)
PartyID = NewType... | """
byceps.typing
~~~~~~~~~~~~~
BYCEPS-specific type aliases for PEP 484 type hints
:Copyright: 2006-2017 Jochen Kupperschmidt
:License: Modified BSD, see LICENSE for details.
"""
from uuid import UUID
UserID = UUID
BrandID = str
PartyID = str
Make BYCEPS-specific types actual lightweight types
This makes mypy ... | <commit_before>"""
byceps.typing
~~~~~~~~~~~~~
BYCEPS-specific type aliases for PEP 484 type hints
:Copyright: 2006-2017 Jochen Kupperschmidt
:License: Modified BSD, see LICENSE for details.
"""
from uuid import UUID
UserID = UUID
BrandID = str
PartyID = str
<commit_msg>Make BYCEPS-specific types actual lightwei... |
b66171d0b3d8cdf361f4341976d7eb0830fb38ce | dribdat/boxout/dribdat.py | dribdat/boxout/dribdat.py | """Boxout module for Dribdat projects."""
import pystache
TEMPLATE_PROJECT = r"""
<div class="onebox honeycomb">
<a href="{{link}}"
class="hexagon
{{#is_challenge}}challenge{{/is_challenge}}
{{^is_challenge}}project stage-{{progress}}{{/is_challenge}}">
<div class="hexagontent">
... | """Boxout module for Dribdat projects."""
import pystache
TEMPLATE_PROJECT = r"""
<div class="onebox honeycomb">
<a href="{{link}}"
class="hexagon
{{#is_challenge}}challenge{{/is_challenge}}
{{^is_challenge}}project stage-{{progress}}{{/is_challenge}}">
<div class="hexagontent">
... | Fix project links broken by anchor | Fix project links broken by anchor
| Python | mit | loleg/dribdat,loleg/dribdat,loleg/dribdat,loleg/dribdat | """Boxout module for Dribdat projects."""
import pystache
TEMPLATE_PROJECT = r"""
<div class="onebox honeycomb">
<a href="{{link}}"
class="hexagon
{{#is_challenge}}challenge{{/is_challenge}}
{{^is_challenge}}project stage-{{progress}}{{/is_challenge}}">
<div class="hexagontent">
... | """Boxout module for Dribdat projects."""
import pystache
TEMPLATE_PROJECT = r"""
<div class="onebox honeycomb">
<a href="{{link}}"
class="hexagon
{{#is_challenge}}challenge{{/is_challenge}}
{{^is_challenge}}project stage-{{progress}}{{/is_challenge}}">
<div class="hexagontent">
... | <commit_before>"""Boxout module for Dribdat projects."""
import pystache
TEMPLATE_PROJECT = r"""
<div class="onebox honeycomb">
<a href="{{link}}"
class="hexagon
{{#is_challenge}}challenge{{/is_challenge}}
{{^is_challenge}}project stage-{{progress}}{{/is_challenge}}">
<div class="he... | """Boxout module for Dribdat projects."""
import pystache
TEMPLATE_PROJECT = r"""
<div class="onebox honeycomb">
<a href="{{link}}"
class="hexagon
{{#is_challenge}}challenge{{/is_challenge}}
{{^is_challenge}}project stage-{{progress}}{{/is_challenge}}">
<div class="hexagontent">
... | """Boxout module for Dribdat projects."""
import pystache
TEMPLATE_PROJECT = r"""
<div class="onebox honeycomb">
<a href="{{link}}"
class="hexagon
{{#is_challenge}}challenge{{/is_challenge}}
{{^is_challenge}}project stage-{{progress}}{{/is_challenge}}">
<div class="hexagontent">
... | <commit_before>"""Boxout module for Dribdat projects."""
import pystache
TEMPLATE_PROJECT = r"""
<div class="onebox honeycomb">
<a href="{{link}}"
class="hexagon
{{#is_challenge}}challenge{{/is_challenge}}
{{^is_challenge}}project stage-{{progress}}{{/is_challenge}}">
<div class="he... |
a7058352df6cd8c0e411df5e1b0948729f8ffe60 | dezede/__init__.py | dezede/__init__.py | # coding: utf-8
from __future__ import unicode_literals
__version__ = 1, 8, 3
get_version = lambda: '.'.join(str(i) for i in __version__)
__verbose_name__ = 'Dezède'
| # coding: utf-8
from __future__ import unicode_literals
__version__ = 2, 0, 0, 'pre'
get_version = lambda: '.'.join(str(i) for i in __version__)
__verbose_name__ = 'Dezède'
| Change le numéro de version pour 2.0.0.pre | Change le numéro de version pour 2.0.0.pre
| Python | bsd-3-clause | dezede/dezede,dezede/dezede,dezede/dezede,dezede/dezede | # coding: utf-8
from __future__ import unicode_literals
__version__ = 1, 8, 3
get_version = lambda: '.'.join(str(i) for i in __version__)
__verbose_name__ = 'Dezède'
Change le numéro de version pour 2.0.0.pre | # coding: utf-8
from __future__ import unicode_literals
__version__ = 2, 0, 0, 'pre'
get_version = lambda: '.'.join(str(i) for i in __version__)
__verbose_name__ = 'Dezède'
| <commit_before># coding: utf-8
from __future__ import unicode_literals
__version__ = 1, 8, 3
get_version = lambda: '.'.join(str(i) for i in __version__)
__verbose_name__ = 'Dezède'
<commit_msg>Change le numéro de version pour 2.0.0.pre<commit_after> | # coding: utf-8
from __future__ import unicode_literals
__version__ = 2, 0, 0, 'pre'
get_version = lambda: '.'.join(str(i) for i in __version__)
__verbose_name__ = 'Dezède'
| # coding: utf-8
from __future__ import unicode_literals
__version__ = 1, 8, 3
get_version = lambda: '.'.join(str(i) for i in __version__)
__verbose_name__ = 'Dezède'
Change le numéro de version pour 2.0.0.pre# coding: utf-8
from __future__ import unicode_literals
__version__ = 2, 0, 0, 'pre'
get_version = lambda:... | <commit_before># coding: utf-8
from __future__ import unicode_literals
__version__ = 1, 8, 3
get_version = lambda: '.'.join(str(i) for i in __version__)
__verbose_name__ = 'Dezède'
<commit_msg>Change le numéro de version pour 2.0.0.pre<commit_after># coding: utf-8
from __future__ import unicode_literals
__version... |
a6b2aeb6a6f28e6b5a00719a34454894f933288e | lamana/__init__.py | lamana/__init__.py | # -----------------------------------------------------------------------------
__title__ = 'lamana'
__version__ = '0.4.10'
__author__ = 'P. Robinson II'
__license__ = 'BSD3'
__copyright__ = 'Copyright 2015 P. Robinson II'
# DEPRECATE: Renaming in 0.4.5b1+
##import LamAna.input_
##import LamAna.distributions
##import... | # -----------------------------------------------------------------------------
__title__ = 'lamana'
__version__ = '0.4.11'
__author__ = 'P. Robinson II'
__license__ = 'BSD3'
__copyright__ = 'Copyright 2015 P. Robinson II'
# DEPRECATE: Renaming in 0.4.5b1+
##import LamAna.input_
##import LamAna.distributions
##import... | Test hotfix with advanced develop and cloned repo | Test hotfix with advanced develop and cloned repo
| Python | bsd-3-clause | par2/lamana-test | # -----------------------------------------------------------------------------
__title__ = 'lamana'
__version__ = '0.4.10'
__author__ = 'P. Robinson II'
__license__ = 'BSD3'
__copyright__ = 'Copyright 2015 P. Robinson II'
# DEPRECATE: Renaming in 0.4.5b1+
##import LamAna.input_
##import LamAna.distributions
##import... | # -----------------------------------------------------------------------------
__title__ = 'lamana'
__version__ = '0.4.11'
__author__ = 'P. Robinson II'
__license__ = 'BSD3'
__copyright__ = 'Copyright 2015 P. Robinson II'
# DEPRECATE: Renaming in 0.4.5b1+
##import LamAna.input_
##import LamAna.distributions
##import... | <commit_before># -----------------------------------------------------------------------------
__title__ = 'lamana'
__version__ = '0.4.10'
__author__ = 'P. Robinson II'
__license__ = 'BSD3'
__copyright__ = 'Copyright 2015 P. Robinson II'
# DEPRECATE: Renaming in 0.4.5b1+
##import LamAna.input_
##import LamAna.distrib... | # -----------------------------------------------------------------------------
__title__ = 'lamana'
__version__ = '0.4.11'
__author__ = 'P. Robinson II'
__license__ = 'BSD3'
__copyright__ = 'Copyright 2015 P. Robinson II'
# DEPRECATE: Renaming in 0.4.5b1+
##import LamAna.input_
##import LamAna.distributions
##import... | # -----------------------------------------------------------------------------
__title__ = 'lamana'
__version__ = '0.4.10'
__author__ = 'P. Robinson II'
__license__ = 'BSD3'
__copyright__ = 'Copyright 2015 P. Robinson II'
# DEPRECATE: Renaming in 0.4.5b1+
##import LamAna.input_
##import LamAna.distributions
##import... | <commit_before># -----------------------------------------------------------------------------
__title__ = 'lamana'
__version__ = '0.4.10'
__author__ = 'P. Robinson II'
__license__ = 'BSD3'
__copyright__ = 'Copyright 2015 P. Robinson II'
# DEPRECATE: Renaming in 0.4.5b1+
##import LamAna.input_
##import LamAna.distrib... |
c93a7d6536b2a88ecf8c831714531837f4febd1b | {{cookiecutter.project_slug}}/{{cookiecutter.project_slug}}/urls.py | {{cookiecutter.project_slug}}/{{cookiecutter.project_slug}}/urls.py | from django.conf.urls import * # NOQA
from django.contrib.staticfiles.urls import staticfiles_urlpatterns
from django.contrib import admin
from django.conf import settings
import django.views.static
admin.autodiscover()
urlpatterns = [
url(r'^admin/', include(admin.site.urls)),
]
# This is only needed when usin... | from django.conf.urls import * # NOQA
from django.contrib.staticfiles.urls import staticfiles_urlpatterns
from django.contrib import admin
from django.conf import settings
import django.views.static
admin.autodiscover()
urlpatterns = [
url(r'^admin/', include(admin.site.urls)),
]
# This is only needed when usin... | Fix Django Debug Toolbar installation for new DjDT version | Fix Django Debug Toolbar installation for new DjDT version
| Python | mit | r0x73/django-template,r0x73/django-template,r0x73/django-template | from django.conf.urls import * # NOQA
from django.contrib.staticfiles.urls import staticfiles_urlpatterns
from django.contrib import admin
from django.conf import settings
import django.views.static
admin.autodiscover()
urlpatterns = [
url(r'^admin/', include(admin.site.urls)),
]
# This is only needed when usin... | from django.conf.urls import * # NOQA
from django.contrib.staticfiles.urls import staticfiles_urlpatterns
from django.contrib import admin
from django.conf import settings
import django.views.static
admin.autodiscover()
urlpatterns = [
url(r'^admin/', include(admin.site.urls)),
]
# This is only needed when usin... | <commit_before>from django.conf.urls import * # NOQA
from django.contrib.staticfiles.urls import staticfiles_urlpatterns
from django.contrib import admin
from django.conf import settings
import django.views.static
admin.autodiscover()
urlpatterns = [
url(r'^admin/', include(admin.site.urls)),
]
# This is only n... | from django.conf.urls import * # NOQA
from django.contrib.staticfiles.urls import staticfiles_urlpatterns
from django.contrib import admin
from django.conf import settings
import django.views.static
admin.autodiscover()
urlpatterns = [
url(r'^admin/', include(admin.site.urls)),
]
# This is only needed when usin... | from django.conf.urls import * # NOQA
from django.contrib.staticfiles.urls import staticfiles_urlpatterns
from django.contrib import admin
from django.conf import settings
import django.views.static
admin.autodiscover()
urlpatterns = [
url(r'^admin/', include(admin.site.urls)),
]
# This is only needed when usin... | <commit_before>from django.conf.urls import * # NOQA
from django.contrib.staticfiles.urls import staticfiles_urlpatterns
from django.contrib import admin
from django.conf import settings
import django.views.static
admin.autodiscover()
urlpatterns = [
url(r'^admin/', include(admin.site.urls)),
]
# This is only n... |
8f04b56a842fa1a84e704af3c5b724c14006315e | server/models/user.py | server/models/user.py | from app_factory import db
from models.session import Session
class User(db.Model):
__tablename__ = 'users'
id = db.Column(db.Integer, primary_key=True)
name = db.Column('name', db.String(50))
username = db.Column('username', db.String(50))
password = db.Column('password', db.String(50))
email... | from app_factory import db
from models.session import Session
class User(db.Model):
__tablename__ = 'users'
id = db.Column(db.Integer, primary_key=True)
name = db.Column('name', db.String(50))
username = db.Column('username', db.String(50))
password = db.Column('password', db.String(50))
email... | Implement properties and methods for the User model class to enable the Flask-Login module | Implement properties and methods for the User model class to enable the Flask-Login module
| Python | mit | ganemone/ontheside,ganemone/ontheside,ganemone/ontheside | from app_factory import db
from models.session import Session
class User(db.Model):
__tablename__ = 'users'
id = db.Column(db.Integer, primary_key=True)
name = db.Column('name', db.String(50))
username = db.Column('username', db.String(50))
password = db.Column('password', db.String(50))
email... | from app_factory import db
from models.session import Session
class User(db.Model):
__tablename__ = 'users'
id = db.Column(db.Integer, primary_key=True)
name = db.Column('name', db.String(50))
username = db.Column('username', db.String(50))
password = db.Column('password', db.String(50))
email... | <commit_before>from app_factory import db
from models.session import Session
class User(db.Model):
__tablename__ = 'users'
id = db.Column(db.Integer, primary_key=True)
name = db.Column('name', db.String(50))
username = db.Column('username', db.String(50))
password = db.Column('password', db.String... | from app_factory import db
from models.session import Session
class User(db.Model):
__tablename__ = 'users'
id = db.Column(db.Integer, primary_key=True)
name = db.Column('name', db.String(50))
username = db.Column('username', db.String(50))
password = db.Column('password', db.String(50))
email... | from app_factory import db
from models.session import Session
class User(db.Model):
__tablename__ = 'users'
id = db.Column(db.Integer, primary_key=True)
name = db.Column('name', db.String(50))
username = db.Column('username', db.String(50))
password = db.Column('password', db.String(50))
email... | <commit_before>from app_factory import db
from models.session import Session
class User(db.Model):
__tablename__ = 'users'
id = db.Column(db.Integer, primary_key=True)
name = db.Column('name', db.String(50))
username = db.Column('username', db.String(50))
password = db.Column('password', db.String... |
fe772c380c48eb14fc47bbd0a0c95888b9ea700a | jsonschema/__init__.py | jsonschema/__init__.py | """
An implementation of JSON Schema for Python
The main functionality is provided by the validator classes for each of the
supported JSON Schema versions.
Most commonly, `validate` is the quickest way to simply validate a given
instance under a schema, and will create a validator for you.
"""
from jsonschema.except... | """
An implementation of JSON Schema for Python
The main functionality is provided by the validator classes for each of the
supported JSON Schema versions.
Most commonly, `validate` is the quickest way to simply validate a given
instance under a schema, and will create a validator for you.
"""
from jsonschema.except... | Use importlib from std (if possible) | Use importlib from std (if possible) | Python | mit | Julian/jsonschema,Julian/jsonschema,python-jsonschema/jsonschema | """
An implementation of JSON Schema for Python
The main functionality is provided by the validator classes for each of the
supported JSON Schema versions.
Most commonly, `validate` is the quickest way to simply validate a given
instance under a schema, and will create a validator for you.
"""
from jsonschema.except... | """
An implementation of JSON Schema for Python
The main functionality is provided by the validator classes for each of the
supported JSON Schema versions.
Most commonly, `validate` is the quickest way to simply validate a given
instance under a schema, and will create a validator for you.
"""
from jsonschema.except... | <commit_before>"""
An implementation of JSON Schema for Python
The main functionality is provided by the validator classes for each of the
supported JSON Schema versions.
Most commonly, `validate` is the quickest way to simply validate a given
instance under a schema, and will create a validator for you.
"""
from js... | """
An implementation of JSON Schema for Python
The main functionality is provided by the validator classes for each of the
supported JSON Schema versions.
Most commonly, `validate` is the quickest way to simply validate a given
instance under a schema, and will create a validator for you.
"""
from jsonschema.except... | """
An implementation of JSON Schema for Python
The main functionality is provided by the validator classes for each of the
supported JSON Schema versions.
Most commonly, `validate` is the quickest way to simply validate a given
instance under a schema, and will create a validator for you.
"""
from jsonschema.except... | <commit_before>"""
An implementation of JSON Schema for Python
The main functionality is provided by the validator classes for each of the
supported JSON Schema versions.
Most commonly, `validate` is the quickest way to simply validate a given
instance under a schema, and will create a validator for you.
"""
from js... |
dfc885784a869dc3f3ef200557be4303aa2752e9 | ldap_sync/callbacks.py | ldap_sync/callbacks.py | def removed_user_deactivate(user):
if user.is_active:
user.is_active = False
user.save()
def removed_user_delete(user):
user.delete()
| def user_active_directory_deactivate(user, attributes, created, updated):
"""
Deactivate user accounts based on Active Directory's
userAccountControl flags. Requires 'userAccountControl'
to be included in LDAP_SYNC_USER_EXTRA_ATTRIBUTES.
"""
try:
user_account_control = int(attributes['us... | Add callback to disable users by AD userAccountControl flags | Add callback to disable users by AD userAccountControl flags
| Python | bsd-3-clause | jbittel/django-ldap-sync,alexsilva/django-ldap-sync,alexsilva/django-ldap-sync | def removed_user_deactivate(user):
if user.is_active:
user.is_active = False
user.save()
def removed_user_delete(user):
user.delete()
Add callback to disable users by AD userAccountControl flags | def user_active_directory_deactivate(user, attributes, created, updated):
"""
Deactivate user accounts based on Active Directory's
userAccountControl flags. Requires 'userAccountControl'
to be included in LDAP_SYNC_USER_EXTRA_ATTRIBUTES.
"""
try:
user_account_control = int(attributes['us... | <commit_before>def removed_user_deactivate(user):
if user.is_active:
user.is_active = False
user.save()
def removed_user_delete(user):
user.delete()
<commit_msg>Add callback to disable users by AD userAccountControl flags<commit_after> | def user_active_directory_deactivate(user, attributes, created, updated):
"""
Deactivate user accounts based on Active Directory's
userAccountControl flags. Requires 'userAccountControl'
to be included in LDAP_SYNC_USER_EXTRA_ATTRIBUTES.
"""
try:
user_account_control = int(attributes['us... | def removed_user_deactivate(user):
if user.is_active:
user.is_active = False
user.save()
def removed_user_delete(user):
user.delete()
Add callback to disable users by AD userAccountControl flagsdef user_active_directory_deactivate(user, attributes, created, updated):
"""
Deactivate use... | <commit_before>def removed_user_deactivate(user):
if user.is_active:
user.is_active = False
user.save()
def removed_user_delete(user):
user.delete()
<commit_msg>Add callback to disable users by AD userAccountControl flags<commit_after>def user_active_directory_deactivate(user, attributes, crea... |
1f6cb706d16153814ff5821998f0fb9216357573 | src/main.py | src/main.py | #!/usr/bin/env python
if __name__ == "__main__":
run()
| #!/usr/bin/env python
"""Simple Genetic Algorithm for solving TSP.
Usage:
main.py FILE --pop-size=POP_SIZE --max-gen=MAX_GENERATIONS --xover-rate=CROSSOVER_RATE --mute-rate=MUTATION_RATE --num-elites=NUM_ELITES --tournament-k=K
main.py (-h | --help)
main.py (-v | --version)
Options:
-h --help Show this s... | Build interface w/ docopt and add POD | Build interface w/ docopt and add POD
| Python | unlicense | dideler/intro-to-genetic-algorithms | #!/usr/bin/env python
if __name__ == "__main__":
run()
Build interface w/ docopt and add POD | #!/usr/bin/env python
"""Simple Genetic Algorithm for solving TSP.
Usage:
main.py FILE --pop-size=POP_SIZE --max-gen=MAX_GENERATIONS --xover-rate=CROSSOVER_RATE --mute-rate=MUTATION_RATE --num-elites=NUM_ELITES --tournament-k=K
main.py (-h | --help)
main.py (-v | --version)
Options:
-h --help Show this s... | <commit_before>#!/usr/bin/env python
if __name__ == "__main__":
run()
<commit_msg>Build interface w/ docopt and add POD<commit_after> | #!/usr/bin/env python
"""Simple Genetic Algorithm for solving TSP.
Usage:
main.py FILE --pop-size=POP_SIZE --max-gen=MAX_GENERATIONS --xover-rate=CROSSOVER_RATE --mute-rate=MUTATION_RATE --num-elites=NUM_ELITES --tournament-k=K
main.py (-h | --help)
main.py (-v | --version)
Options:
-h --help Show this s... | #!/usr/bin/env python
if __name__ == "__main__":
run()
Build interface w/ docopt and add POD#!/usr/bin/env python
"""Simple Genetic Algorithm for solving TSP.
Usage:
main.py FILE --pop-size=POP_SIZE --max-gen=MAX_GENERATIONS --xover-rate=CROSSOVER_RATE --mute-rate=MUTATION_RATE --num-elites=NUM_ELITES --tourna... | <commit_before>#!/usr/bin/env python
if __name__ == "__main__":
run()
<commit_msg>Build interface w/ docopt and add POD<commit_after>#!/usr/bin/env python
"""Simple Genetic Algorithm for solving TSP.
Usage:
main.py FILE --pop-size=POP_SIZE --max-gen=MAX_GENERATIONS --xover-rate=CROSSOVER_RATE --mute-rate=MUTAT... |
caf554698fd55f2911742b2cdfb7f1579c0738a5 | examples/prompts/autocompletion-like-readline.py | examples/prompts/autocompletion-like-readline.py | #!/usr/bin/env python
"""
Autocompletion example that displays the autocompletions like readline does by
binding a custom handler to the Tab key.
"""
from __future__ import unicode_literals
from prompt_toolkit.shortcuts import prompt, CompleteStyle
from prompt_toolkit.contrib.completers import WordCompleter
animal_c... | #!/usr/bin/env python
"""
Autocompletion example that displays the autocompletions like readline does by
binding a custom handler to the Tab key.
"""
from __future__ import unicode_literals
from prompt_toolkit.shortcuts import prompt, CompleteStyle
from prompt_toolkit.contrib.completers import WordCompleter
animal_c... | Fix typos: `dolphine` -> `dolphin`, `kangoroo` -> `kangaroo` | Fix typos: `dolphine` -> `dolphin`, `kangoroo` -> `kangaroo`
| Python | bsd-3-clause | jonathanslenders/python-prompt-toolkit | #!/usr/bin/env python
"""
Autocompletion example that displays the autocompletions like readline does by
binding a custom handler to the Tab key.
"""
from __future__ import unicode_literals
from prompt_toolkit.shortcuts import prompt, CompleteStyle
from prompt_toolkit.contrib.completers import WordCompleter
animal_c... | #!/usr/bin/env python
"""
Autocompletion example that displays the autocompletions like readline does by
binding a custom handler to the Tab key.
"""
from __future__ import unicode_literals
from prompt_toolkit.shortcuts import prompt, CompleteStyle
from prompt_toolkit.contrib.completers import WordCompleter
animal_c... | <commit_before>#!/usr/bin/env python
"""
Autocompletion example that displays the autocompletions like readline does by
binding a custom handler to the Tab key.
"""
from __future__ import unicode_literals
from prompt_toolkit.shortcuts import prompt, CompleteStyle
from prompt_toolkit.contrib.completers import WordCompl... | #!/usr/bin/env python
"""
Autocompletion example that displays the autocompletions like readline does by
binding a custom handler to the Tab key.
"""
from __future__ import unicode_literals
from prompt_toolkit.shortcuts import prompt, CompleteStyle
from prompt_toolkit.contrib.completers import WordCompleter
animal_c... | #!/usr/bin/env python
"""
Autocompletion example that displays the autocompletions like readline does by
binding a custom handler to the Tab key.
"""
from __future__ import unicode_literals
from prompt_toolkit.shortcuts import prompt, CompleteStyle
from prompt_toolkit.contrib.completers import WordCompleter
animal_c... | <commit_before>#!/usr/bin/env python
"""
Autocompletion example that displays the autocompletions like readline does by
binding a custom handler to the Tab key.
"""
from __future__ import unicode_literals
from prompt_toolkit.shortcuts import prompt, CompleteStyle
from prompt_toolkit.contrib.completers import WordCompl... |
f632c56310ce527d0773e64fed9fa4e7e0eae36a | test/on_yubikey/test_cli_misc.py | test/on_yubikey/test_cli_misc.py | import unittest
from .util import (DestructiveYubikeyTestCase, is_fips, ykman_cli)
class TestYkmanInfo(DestructiveYubikeyTestCase):
def test_ykman_info(self):
info = ykman_cli('info')
self.assertIn('Device type:', info)
self.assertIn('Serial number:', info)
self.assertIn('Firmwar... | import unittest
from .util import (DestructiveYubikeyTestCase, is_fips, ykman_cli)
class TestYkmanInfo(DestructiveYubikeyTestCase):
def test_ykman_info(self):
info = ykman_cli('info')
self.assertIn('Device type:', info)
self.assertIn('Serial number:', info)
self.assertIn('Firmwar... | Fix --check-fips invocation in test | Fix --check-fips invocation in test
| Python | bsd-2-clause | Yubico/yubikey-manager,Yubico/yubikey-manager | import unittest
from .util import (DestructiveYubikeyTestCase, is_fips, ykman_cli)
class TestYkmanInfo(DestructiveYubikeyTestCase):
def test_ykman_info(self):
info = ykman_cli('info')
self.assertIn('Device type:', info)
self.assertIn('Serial number:', info)
self.assertIn('Firmwar... | import unittest
from .util import (DestructiveYubikeyTestCase, is_fips, ykman_cli)
class TestYkmanInfo(DestructiveYubikeyTestCase):
def test_ykman_info(self):
info = ykman_cli('info')
self.assertIn('Device type:', info)
self.assertIn('Serial number:', info)
self.assertIn('Firmwar... | <commit_before>import unittest
from .util import (DestructiveYubikeyTestCase, is_fips, ykman_cli)
class TestYkmanInfo(DestructiveYubikeyTestCase):
def test_ykman_info(self):
info = ykman_cli('info')
self.assertIn('Device type:', info)
self.assertIn('Serial number:', info)
self.as... | import unittest
from .util import (DestructiveYubikeyTestCase, is_fips, ykman_cli)
class TestYkmanInfo(DestructiveYubikeyTestCase):
def test_ykman_info(self):
info = ykman_cli('info')
self.assertIn('Device type:', info)
self.assertIn('Serial number:', info)
self.assertIn('Firmwar... | import unittest
from .util import (DestructiveYubikeyTestCase, is_fips, ykman_cli)
class TestYkmanInfo(DestructiveYubikeyTestCase):
def test_ykman_info(self):
info = ykman_cli('info')
self.assertIn('Device type:', info)
self.assertIn('Serial number:', info)
self.assertIn('Firmwar... | <commit_before>import unittest
from .util import (DestructiveYubikeyTestCase, is_fips, ykman_cli)
class TestYkmanInfo(DestructiveYubikeyTestCase):
def test_ykman_info(self):
info = ykman_cli('info')
self.assertIn('Device type:', info)
self.assertIn('Serial number:', info)
self.as... |
47b346404f29c89ddc7e85cd3833564593823449 | zou/app/utils/query.py | zou/app/utils/query.py | def get_query_criterions_from_request(request):
"""
Turn request parameters into a dict where keys are attributes to filter and
values are values to filter.
"""
criterions = {}
for key, value in request.args.items():
if key not in ["page"]:
criterions[key] = value
return ... | import math
from zou.app import app
from zou.app.utils import fields
def get_query_criterions_from_request(request):
"""
Turn request parameters into a dict where keys are attributes to filter and
values are values to filter.
"""
criterions = {}
for key, value in request.args.items():
... | Add helper to paginate results | Add helper to paginate results
| Python | agpl-3.0 | cgwire/zou | def get_query_criterions_from_request(request):
"""
Turn request parameters into a dict where keys are attributes to filter and
values are values to filter.
"""
criterions = {}
for key, value in request.args.items():
if key not in ["page"]:
criterions[key] = value
return ... | import math
from zou.app import app
from zou.app.utils import fields
def get_query_criterions_from_request(request):
"""
Turn request parameters into a dict where keys are attributes to filter and
values are values to filter.
"""
criterions = {}
for key, value in request.args.items():
... | <commit_before>def get_query_criterions_from_request(request):
"""
Turn request parameters into a dict where keys are attributes to filter and
values are values to filter.
"""
criterions = {}
for key, value in request.args.items():
if key not in ["page"]:
criterions[key] = va... | import math
from zou.app import app
from zou.app.utils import fields
def get_query_criterions_from_request(request):
"""
Turn request parameters into a dict where keys are attributes to filter and
values are values to filter.
"""
criterions = {}
for key, value in request.args.items():
... | def get_query_criterions_from_request(request):
"""
Turn request parameters into a dict where keys are attributes to filter and
values are values to filter.
"""
criterions = {}
for key, value in request.args.items():
if key not in ["page"]:
criterions[key] = value
return ... | <commit_before>def get_query_criterions_from_request(request):
"""
Turn request parameters into a dict where keys are attributes to filter and
values are values to filter.
"""
criterions = {}
for key, value in request.args.items():
if key not in ["page"]:
criterions[key] = va... |
c688a587d49d6186462737ab00c429a30c0a4d4c | src/puzzle/problems/crossword/crossword_problem.py | src/puzzle/problems/crossword/crossword_problem.py | import collections
import re
from data import crossword, warehouse
from puzzle.problems.crossword import _base_crossword_problem
_CROSSWORD_REGEX = re.compile(r'^.*\(([\d\s,|]+)\)$')
_INTS = re.compile(r'(\d+)')
class CrosswordProblem(_base_crossword_problem._BaseCrosswordProblem):
@staticmethod
def score(lines... | import collections
from data import crossword, warehouse
from puzzle.problems.crossword import _base_crossword_problem
class CrosswordProblem(_base_crossword_problem._BaseCrosswordProblem):
@staticmethod
def score(lines):
return _base_crossword_problem.score(lines)
def _solve(self):
clue = ''.join(sel... | Delete unused module local constants. | Delete unused module local constants.
| Python | mit | PhilHarnish/forge,PhilHarnish/forge,PhilHarnish/forge,PhilHarnish/forge,PhilHarnish/forge,PhilHarnish/forge | import collections
import re
from data import crossword, warehouse
from puzzle.problems.crossword import _base_crossword_problem
_CROSSWORD_REGEX = re.compile(r'^.*\(([\d\s,|]+)\)$')
_INTS = re.compile(r'(\d+)')
class CrosswordProblem(_base_crossword_problem._BaseCrosswordProblem):
@staticmethod
def score(lines... | import collections
from data import crossword, warehouse
from puzzle.problems.crossword import _base_crossword_problem
class CrosswordProblem(_base_crossword_problem._BaseCrosswordProblem):
@staticmethod
def score(lines):
return _base_crossword_problem.score(lines)
def _solve(self):
clue = ''.join(sel... | <commit_before>import collections
import re
from data import crossword, warehouse
from puzzle.problems.crossword import _base_crossword_problem
_CROSSWORD_REGEX = re.compile(r'^.*\(([\d\s,|]+)\)$')
_INTS = re.compile(r'(\d+)')
class CrosswordProblem(_base_crossword_problem._BaseCrosswordProblem):
@staticmethod
... | import collections
from data import crossword, warehouse
from puzzle.problems.crossword import _base_crossword_problem
class CrosswordProblem(_base_crossword_problem._BaseCrosswordProblem):
@staticmethod
def score(lines):
return _base_crossword_problem.score(lines)
def _solve(self):
clue = ''.join(sel... | import collections
import re
from data import crossword, warehouse
from puzzle.problems.crossword import _base_crossword_problem
_CROSSWORD_REGEX = re.compile(r'^.*\(([\d\s,|]+)\)$')
_INTS = re.compile(r'(\d+)')
class CrosswordProblem(_base_crossword_problem._BaseCrosswordProblem):
@staticmethod
def score(lines... | <commit_before>import collections
import re
from data import crossword, warehouse
from puzzle.problems.crossword import _base_crossword_problem
_CROSSWORD_REGEX = re.compile(r'^.*\(([\d\s,|]+)\)$')
_INTS = re.compile(r'(\d+)')
class CrosswordProblem(_base_crossword_problem._BaseCrosswordProblem):
@staticmethod
... |
d478082c93125212f07a7b73e2d9d04d1b2c1058 | libthumbor/__init__.py | libthumbor/__init__.py | #!/usr/bin/python
# -*- coding: utf-8 -*-
# libthumbor - python extension to thumbor
# http://github.com/heynemann/libthumbor
# Licensed under the MIT license:
# http://www.opensource.org/licenses/mit-license
# Copyright (c) 2011 Bernardo Heynemann heynemann@gmail.com
'''libthumbor is the library used to access thum... | #!/usr/bin/python
# -*- coding: utf-8 -*-
# libthumbor - python extension to thumbor
# http://github.com/heynemann/libthumbor
# Licensed under the MIT license:
# http://www.opensource.org/licenses/mit-license
# Copyright (c) 2011 Bernardo Heynemann heynemann@gmail.com
'''libthumbor is the library used to access thum... | Fix verson number in tests | Fix verson number in tests
| Python | mit | APSL/libthumbor,thumbor/libthumbor,DomainGroupOSS/libthumbor | #!/usr/bin/python
# -*- coding: utf-8 -*-
# libthumbor - python extension to thumbor
# http://github.com/heynemann/libthumbor
# Licensed under the MIT license:
# http://www.opensource.org/licenses/mit-license
# Copyright (c) 2011 Bernardo Heynemann heynemann@gmail.com
'''libthumbor is the library used to access thum... | #!/usr/bin/python
# -*- coding: utf-8 -*-
# libthumbor - python extension to thumbor
# http://github.com/heynemann/libthumbor
# Licensed under the MIT license:
# http://www.opensource.org/licenses/mit-license
# Copyright (c) 2011 Bernardo Heynemann heynemann@gmail.com
'''libthumbor is the library used to access thum... | <commit_before>#!/usr/bin/python
# -*- coding: utf-8 -*-
# libthumbor - python extension to thumbor
# http://github.com/heynemann/libthumbor
# Licensed under the MIT license:
# http://www.opensource.org/licenses/mit-license
# Copyright (c) 2011 Bernardo Heynemann heynemann@gmail.com
'''libthumbor is the library used... | #!/usr/bin/python
# -*- coding: utf-8 -*-
# libthumbor - python extension to thumbor
# http://github.com/heynemann/libthumbor
# Licensed under the MIT license:
# http://www.opensource.org/licenses/mit-license
# Copyright (c) 2011 Bernardo Heynemann heynemann@gmail.com
'''libthumbor is the library used to access thum... | #!/usr/bin/python
# -*- coding: utf-8 -*-
# libthumbor - python extension to thumbor
# http://github.com/heynemann/libthumbor
# Licensed under the MIT license:
# http://www.opensource.org/licenses/mit-license
# Copyright (c) 2011 Bernardo Heynemann heynemann@gmail.com
'''libthumbor is the library used to access thum... | <commit_before>#!/usr/bin/python
# -*- coding: utf-8 -*-
# libthumbor - python extension to thumbor
# http://github.com/heynemann/libthumbor
# Licensed under the MIT license:
# http://www.opensource.org/licenses/mit-license
# Copyright (c) 2011 Bernardo Heynemann heynemann@gmail.com
'''libthumbor is the library used... |
4ed0e5f1c6505a80bce50e27f1969693a9a4cdad | alignak_backend_client/__init__.py | alignak_backend_client/__init__.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
Alignak REST backend client library
This module is a Python library used the REST API of the Alignak backend
"""
# Application version and manifest
VERSION = (0, 5, 1)
__application__ = u"Alignak Backend client"
__short_version__ = '.'.join((str(each) for ea... | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
Alignak REST backend client library
This module is a Python library used the REST API of the Alignak backend
"""
# Application version and manifest
VERSION = (0, 5, 2)
__application__ = u"Alignak Backend client"
__short_version__ = '.'.join((str(each) for ea... | Set version to 0.5.2 to publish on Pypi | Set version to 0.5.2 to publish on Pypi
| Python | agpl-3.0 | Alignak-monitoring-contrib/alignak-backend-client,Alignak-monitoring-contrib/alignakbackend-api-client,Alignak-monitoring-contrib/alignakbackend-api-client,Alignak-monitoring-contrib/alignak-backend-client | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
Alignak REST backend client library
This module is a Python library used the REST API of the Alignak backend
"""
# Application version and manifest
VERSION = (0, 5, 1)
__application__ = u"Alignak Backend client"
__short_version__ = '.'.join((str(each) for ea... | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
Alignak REST backend client library
This module is a Python library used the REST API of the Alignak backend
"""
# Application version and manifest
VERSION = (0, 5, 2)
__application__ = u"Alignak Backend client"
__short_version__ = '.'.join((str(each) for ea... | <commit_before>#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
Alignak REST backend client library
This module is a Python library used the REST API of the Alignak backend
"""
# Application version and manifest
VERSION = (0, 5, 1)
__application__ = u"Alignak Backend client"
__short_version__ = '.'.join((s... | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
Alignak REST backend client library
This module is a Python library used the REST API of the Alignak backend
"""
# Application version and manifest
VERSION = (0, 5, 2)
__application__ = u"Alignak Backend client"
__short_version__ = '.'.join((str(each) for ea... | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
Alignak REST backend client library
This module is a Python library used the REST API of the Alignak backend
"""
# Application version and manifest
VERSION = (0, 5, 1)
__application__ = u"Alignak Backend client"
__short_version__ = '.'.join((str(each) for ea... | <commit_before>#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
Alignak REST backend client library
This module is a Python library used the REST API of the Alignak backend
"""
# Application version and manifest
VERSION = (0, 5, 1)
__application__ = u"Alignak Backend client"
__short_version__ = '.'.join((s... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.