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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
62cee7d5a625bb3515eddaddbe940239a41ba31c | rest_framework_msgpack/parsers.py | rest_framework_msgpack/parsers.py | import decimal
import msgpack
from dateutil.parser import parse
from rest_framework.parsers import BaseParser
from rest_framework.exceptions import ParseError
class MessagePackDecoder(object):
def decode(self, obj):
if '__class__' in obj:
decode_func = getattr(self, 'decode_%s' % obj['__clas... | import decimal
import msgpack
from dateutil.parser import parse
from django.utils.six import text_type
from rest_framework.parsers import BaseParser
from rest_framework.exceptions import ParseError
class MessagePackDecoder(object):
def decode(self, obj):
if '__class__' in obj:
decode_func =... | Use six.text_type for python3 compat | Use six.text_type for python3 compat | Python | bsd-3-clause | juanriaza/django-rest-framework-msgpack | import decimal
import msgpack
from dateutil.parser import parse
from rest_framework.parsers import BaseParser
from rest_framework.exceptions import ParseError
class MessagePackDecoder(object):
def decode(self, obj):
if '__class__' in obj:
decode_func = getattr(self, 'decode_%s' % obj['__clas... | import decimal
import msgpack
from dateutil.parser import parse
from django.utils.six import text_type
from rest_framework.parsers import BaseParser
from rest_framework.exceptions import ParseError
class MessagePackDecoder(object):
def decode(self, obj):
if '__class__' in obj:
decode_func =... | <commit_before>import decimal
import msgpack
from dateutil.parser import parse
from rest_framework.parsers import BaseParser
from rest_framework.exceptions import ParseError
class MessagePackDecoder(object):
def decode(self, obj):
if '__class__' in obj:
decode_func = getattr(self, 'decode_%s... | import decimal
import msgpack
from dateutil.parser import parse
from django.utils.six import text_type
from rest_framework.parsers import BaseParser
from rest_framework.exceptions import ParseError
class MessagePackDecoder(object):
def decode(self, obj):
if '__class__' in obj:
decode_func =... | import decimal
import msgpack
from dateutil.parser import parse
from rest_framework.parsers import BaseParser
from rest_framework.exceptions import ParseError
class MessagePackDecoder(object):
def decode(self, obj):
if '__class__' in obj:
decode_func = getattr(self, 'decode_%s' % obj['__clas... | <commit_before>import decimal
import msgpack
from dateutil.parser import parse
from rest_framework.parsers import BaseParser
from rest_framework.exceptions import ParseError
class MessagePackDecoder(object):
def decode(self, obj):
if '__class__' in obj:
decode_func = getattr(self, 'decode_%s... |
ecf8b600868534e82056a83f9b86f27db8812e0f | setup.py | setup.py | #!/usr/bin/env python3
from setuptools import setup, find_packages
setup(
name="portinus",
version="1.0.10",
author="Justin Dray",
author_email="justin@dray.be",
url="https://github.com/justin8/portinus",
description="This utility creates a systemd service file for a docker-compose file",
p... | #!/usr/bin/env python3
from setuptools import setup, find_packages
setup(
name="portinus",
version="1.0.10",
author="Justin Dray",
author_email="justin@dray.be",
url="https://github.com/justin8/portinus",
description="This utility creates a systemd service file for a docker-compose file",
p... | Add a dependency on docker-compose | Add a dependency on docker-compose
| Python | mit | justin8/portinus,justin8/portinus | #!/usr/bin/env python3
from setuptools import setup, find_packages
setup(
name="portinus",
version="1.0.10",
author="Justin Dray",
author_email="justin@dray.be",
url="https://github.com/justin8/portinus",
description="This utility creates a systemd service file for a docker-compose file",
p... | #!/usr/bin/env python3
from setuptools import setup, find_packages
setup(
name="portinus",
version="1.0.10",
author="Justin Dray",
author_email="justin@dray.be",
url="https://github.com/justin8/portinus",
description="This utility creates a systemd service file for a docker-compose file",
p... | <commit_before>#!/usr/bin/env python3
from setuptools import setup, find_packages
setup(
name="portinus",
version="1.0.10",
author="Justin Dray",
author_email="justin@dray.be",
url="https://github.com/justin8/portinus",
description="This utility creates a systemd service file for a docker-compo... | #!/usr/bin/env python3
from setuptools import setup, find_packages
setup(
name="portinus",
version="1.0.10",
author="Justin Dray",
author_email="justin@dray.be",
url="https://github.com/justin8/portinus",
description="This utility creates a systemd service file for a docker-compose file",
p... | #!/usr/bin/env python3
from setuptools import setup, find_packages
setup(
name="portinus",
version="1.0.10",
author="Justin Dray",
author_email="justin@dray.be",
url="https://github.com/justin8/portinus",
description="This utility creates a systemd service file for a docker-compose file",
p... | <commit_before>#!/usr/bin/env python3
from setuptools import setup, find_packages
setup(
name="portinus",
version="1.0.10",
author="Justin Dray",
author_email="justin@dray.be",
url="https://github.com/justin8/portinus",
description="This utility creates a systemd service file for a docker-compo... |
9d58310b2106e3ed5fc140a8479e003a4a647e82 | setup.py | setup.py | #!/usr/bin/env python
from setuptools import setup, find_packages
README = 'README.md'
def long_desc():
try:
import pypandoc
except ImportError:
with open(README) as f:
return f.read()
else:
return pypandoc.convert(README, 'rst')
setup(
name='ecmcli',
version... | #!/usr/bin/env python
from setuptools import setup, find_packages
README = 'README.md'
def long_desc():
try:
import pypandoc
except ImportError:
with open(README) as f:
return f.read()
else:
return pypandoc.convert(README, 'rst')
setup(
name='ecmcli',
version... | Fix shellish requirement bump rev to 2.3.1 | Fix shellish requirement bump rev to 2.3.1
| Python | mit | mayfield/ecmcli | #!/usr/bin/env python
from setuptools import setup, find_packages
README = 'README.md'
def long_desc():
try:
import pypandoc
except ImportError:
with open(README) as f:
return f.read()
else:
return pypandoc.convert(README, 'rst')
setup(
name='ecmcli',
version... | #!/usr/bin/env python
from setuptools import setup, find_packages
README = 'README.md'
def long_desc():
try:
import pypandoc
except ImportError:
with open(README) as f:
return f.read()
else:
return pypandoc.convert(README, 'rst')
setup(
name='ecmcli',
version... | <commit_before>#!/usr/bin/env python
from setuptools import setup, find_packages
README = 'README.md'
def long_desc():
try:
import pypandoc
except ImportError:
with open(README) as f:
return f.read()
else:
return pypandoc.convert(README, 'rst')
setup(
name='ecmcl... | #!/usr/bin/env python
from setuptools import setup, find_packages
README = 'README.md'
def long_desc():
try:
import pypandoc
except ImportError:
with open(README) as f:
return f.read()
else:
return pypandoc.convert(README, 'rst')
setup(
name='ecmcli',
version... | #!/usr/bin/env python
from setuptools import setup, find_packages
README = 'README.md'
def long_desc():
try:
import pypandoc
except ImportError:
with open(README) as f:
return f.read()
else:
return pypandoc.convert(README, 'rst')
setup(
name='ecmcli',
version... | <commit_before>#!/usr/bin/env python
from setuptools import setup, find_packages
README = 'README.md'
def long_desc():
try:
import pypandoc
except ImportError:
with open(README) as f:
return f.read()
else:
return pypandoc.convert(README, 'rst')
setup(
name='ecmcl... |
3db4d85164a2a2c41503b568505077cf2af86e90 | setup.py | setup.py | from setuptools import setup
setup(
name='django-simpleimages',
version='1.0.0',
author='Saul Shanabrook',
author_email='s.shanabrook@gmail.com',
packages=['simpleimages', ],
url='https://www.github.com/saulshanabrook/django-simpleimages',
license=open('LICENSE.txt').read(),
descriptio... | from setuptools import setup
setup(
name='django-simpleimages',
version='1.0.0',
author='Saul Shanabrook',
author_email='s.shanabrook@gmail.com',
packages=['simpleimages', 'simpleimages.management.commands'],
url='https://www.github.com/saulshanabrook/django-simpleimages',
license=open('LI... | Add management file to packages so django can find it | Add management file to packages so django can find it
| Python | mit | saulshanabrook/django-simpleimages | from setuptools import setup
setup(
name='django-simpleimages',
version='1.0.0',
author='Saul Shanabrook',
author_email='s.shanabrook@gmail.com',
packages=['simpleimages', ],
url='https://www.github.com/saulshanabrook/django-simpleimages',
license=open('LICENSE.txt').read(),
descriptio... | from setuptools import setup
setup(
name='django-simpleimages',
version='1.0.0',
author='Saul Shanabrook',
author_email='s.shanabrook@gmail.com',
packages=['simpleimages', 'simpleimages.management.commands'],
url='https://www.github.com/saulshanabrook/django-simpleimages',
license=open('LI... | <commit_before>from setuptools import setup
setup(
name='django-simpleimages',
version='1.0.0',
author='Saul Shanabrook',
author_email='s.shanabrook@gmail.com',
packages=['simpleimages', ],
url='https://www.github.com/saulshanabrook/django-simpleimages',
license=open('LICENSE.txt').read(),... | from setuptools import setup
setup(
name='django-simpleimages',
version='1.0.0',
author='Saul Shanabrook',
author_email='s.shanabrook@gmail.com',
packages=['simpleimages', 'simpleimages.management.commands'],
url='https://www.github.com/saulshanabrook/django-simpleimages',
license=open('LI... | from setuptools import setup
setup(
name='django-simpleimages',
version='1.0.0',
author='Saul Shanabrook',
author_email='s.shanabrook@gmail.com',
packages=['simpleimages', ],
url='https://www.github.com/saulshanabrook/django-simpleimages',
license=open('LICENSE.txt').read(),
descriptio... | <commit_before>from setuptools import setup
setup(
name='django-simpleimages',
version='1.0.0',
author='Saul Shanabrook',
author_email='s.shanabrook@gmail.com',
packages=['simpleimages', ],
url='https://www.github.com/saulshanabrook/django-simpleimages',
license=open('LICENSE.txt').read(),... |
57e4d45d24b39287de12407350ce6c359332ac34 | setup.py | setup.py | #!/usr/bin/env python
# Copyright 2014 OpenMarket Ltd
#
# 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... | #!/usr/bin/env python
# Copyright 2014 OpenMarket Ltd
#
# 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... | Mark syweb as not being zip safe so that bundled files are accessible from the filesystem | Mark syweb as not being zip safe so that bundled files are accessible from the filesystem
| Python | apache-2.0 | williamboman/matrix-angular-sdk,williamboman/matrix-angular-sdk,matrix-org/matrix-angular-sdk,matrix-org/matrix-angular-sdk,matrix-org/matrix-angular-sdk,williamboman/matrix-angular-sdk | #!/usr/bin/env python
# Copyright 2014 OpenMarket Ltd
#
# 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... | #!/usr/bin/env python
# Copyright 2014 OpenMarket Ltd
#
# 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... | <commit_before>#!/usr/bin/env python
# Copyright 2014 OpenMarket Ltd
#
# 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... | #!/usr/bin/env python
# Copyright 2014 OpenMarket Ltd
#
# 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... | #!/usr/bin/env python
# Copyright 2014 OpenMarket Ltd
#
# 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... | <commit_before>#!/usr/bin/env python
# Copyright 2014 OpenMarket Ltd
#
# 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... |
4580bf5e1c4ada62f09bc4a33fae2b971c6fb3c1 | setup.py | setup.py | from setuptools import setup
with open("README.md", "r") as fh:
long_description = fh.read()
setup(
name = 'invokust',
version = '0.7',
author = 'Max Williams',
author_email = 'futuresharks@gmail.com',
description = 'A small wrapper for locust to allow running load tests from within Python or ... | from setuptools import setup
with open("README.md", "r") as fh:
long_description = fh.read()
setup(
name = 'invokust',
version = '0.71',
author = 'Max Williams',
author_email = 'futuresharks@gmail.com',
description = 'A small wrapper for locust to allow running load tests from within Python or... | Fix version number to be higher | Fix version number to be higher
| Python | mit | FutureSharks/invokust,FutureSharks/invokust | from setuptools import setup
with open("README.md", "r") as fh:
long_description = fh.read()
setup(
name = 'invokust',
version = '0.7',
author = 'Max Williams',
author_email = 'futuresharks@gmail.com',
description = 'A small wrapper for locust to allow running load tests from within Python or ... | from setuptools import setup
with open("README.md", "r") as fh:
long_description = fh.read()
setup(
name = 'invokust',
version = '0.71',
author = 'Max Williams',
author_email = 'futuresharks@gmail.com',
description = 'A small wrapper for locust to allow running load tests from within Python or... | <commit_before>from setuptools import setup
with open("README.md", "r") as fh:
long_description = fh.read()
setup(
name = 'invokust',
version = '0.7',
author = 'Max Williams',
author_email = 'futuresharks@gmail.com',
description = 'A small wrapper for locust to allow running load tests from wi... | from setuptools import setup
with open("README.md", "r") as fh:
long_description = fh.read()
setup(
name = 'invokust',
version = '0.71',
author = 'Max Williams',
author_email = 'futuresharks@gmail.com',
description = 'A small wrapper for locust to allow running load tests from within Python or... | from setuptools import setup
with open("README.md", "r") as fh:
long_description = fh.read()
setup(
name = 'invokust',
version = '0.7',
author = 'Max Williams',
author_email = 'futuresharks@gmail.com',
description = 'A small wrapper for locust to allow running load tests from within Python or ... | <commit_before>from setuptools import setup
with open("README.md", "r") as fh:
long_description = fh.read()
setup(
name = 'invokust',
version = '0.7',
author = 'Max Williams',
author_email = 'futuresharks@gmail.com',
description = 'A small wrapper for locust to allow running load tests from wi... |
eeb85c110bc9a723eeac4deb10d36e5b912035af | corehq/apps/accounting/management/commands/make_domain_enterprise_level.py | corehq/apps/accounting/management/commands/make_domain_enterprise_level.py | from django.core.management import BaseCommand
from corehq.apps.domain.forms import DimagiOnlyEnterpriseForm
from corehq.apps.domain.models import Domain
from corehq.util.decorators import require_debug_true
class Command(BaseCommand):
help = ('Create a billing account and an enterprise level subscription '
... | from django.core.management import BaseCommand
from corehq.apps.domain.forms import DimagiOnlyEnterpriseForm
from corehq.apps.domain.models import Domain
from corehq.util.decorators import require_debug_true
class Command(BaseCommand):
help = ('Create a billing account and an enterprise level subscription '
... | Use parser to add command line arg | Use parser to add command line arg
| Python | bsd-3-clause | dimagi/commcare-hq,dimagi/commcare-hq,dimagi/commcare-hq,dimagi/commcare-hq,dimagi/commcare-hq | from django.core.management import BaseCommand
from corehq.apps.domain.forms import DimagiOnlyEnterpriseForm
from corehq.apps.domain.models import Domain
from corehq.util.decorators import require_debug_true
class Command(BaseCommand):
help = ('Create a billing account and an enterprise level subscription '
... | from django.core.management import BaseCommand
from corehq.apps.domain.forms import DimagiOnlyEnterpriseForm
from corehq.apps.domain.models import Domain
from corehq.util.decorators import require_debug_true
class Command(BaseCommand):
help = ('Create a billing account and an enterprise level subscription '
... | <commit_before>from django.core.management import BaseCommand
from corehq.apps.domain.forms import DimagiOnlyEnterpriseForm
from corehq.apps.domain.models import Domain
from corehq.util.decorators import require_debug_true
class Command(BaseCommand):
help = ('Create a billing account and an enterprise level subs... | from django.core.management import BaseCommand
from corehq.apps.domain.forms import DimagiOnlyEnterpriseForm
from corehq.apps.domain.models import Domain
from corehq.util.decorators import require_debug_true
class Command(BaseCommand):
help = ('Create a billing account and an enterprise level subscription '
... | from django.core.management import BaseCommand
from corehq.apps.domain.forms import DimagiOnlyEnterpriseForm
from corehq.apps.domain.models import Domain
from corehq.util.decorators import require_debug_true
class Command(BaseCommand):
help = ('Create a billing account and an enterprise level subscription '
... | <commit_before>from django.core.management import BaseCommand
from corehq.apps.domain.forms import DimagiOnlyEnterpriseForm
from corehq.apps.domain.models import Domain
from corehq.util.decorators import require_debug_true
class Command(BaseCommand):
help = ('Create a billing account and an enterprise level subs... |
c86efe7d1598cc9f7afc82c3118ec4cc20483312 | src/hamcrest/__init__.py | src/hamcrest/__init__.py | from __future__ import absolute_import
from hamcrest.core import *
from hamcrest.library import *
__version__ = "2.0.0a1"
__author__ = "Chris Rose"
__copyright__ = "Copyright 2014 hamcrest.org"
__license__ = "BSD, see License.txt"
| from __future__ import absolute_import
from hamcrest.core import *
from hamcrest.library import *
__version__ = "1.8.0"
__author__ = "Chris Rose"
__copyright__ = "Copyright 2013 hamcrest.org"
__license__ = "BSD, see License.txt"
| Revert "Version move to 2.0.0a1" | Revert "Version move to 2.0.0a1"
This reverts commit 4cd7d3062037dab13c99f0dd9b44f08fbd894ffa.
| Python | bsd-3-clause | nitishr/PyHamcrest,msabramo/PyHamcrest,msabramo/PyHamcrest,nitishr/PyHamcrest | from __future__ import absolute_import
from hamcrest.core import *
from hamcrest.library import *
__version__ = "2.0.0a1"
__author__ = "Chris Rose"
__copyright__ = "Copyright 2014 hamcrest.org"
__license__ = "BSD, see License.txt"
Revert "Version move to 2.0.0a1"
This reverts commit 4cd7d3062037dab13c99f0dd9b44f08fbd... | from __future__ import absolute_import
from hamcrest.core import *
from hamcrest.library import *
__version__ = "1.8.0"
__author__ = "Chris Rose"
__copyright__ = "Copyright 2013 hamcrest.org"
__license__ = "BSD, see License.txt"
| <commit_before>from __future__ import absolute_import
from hamcrest.core import *
from hamcrest.library import *
__version__ = "2.0.0a1"
__author__ = "Chris Rose"
__copyright__ = "Copyright 2014 hamcrest.org"
__license__ = "BSD, see License.txt"
<commit_msg>Revert "Version move to 2.0.0a1"
This reverts commit 4cd7d30... | from __future__ import absolute_import
from hamcrest.core import *
from hamcrest.library import *
__version__ = "1.8.0"
__author__ = "Chris Rose"
__copyright__ = "Copyright 2013 hamcrest.org"
__license__ = "BSD, see License.txt"
| from __future__ import absolute_import
from hamcrest.core import *
from hamcrest.library import *
__version__ = "2.0.0a1"
__author__ = "Chris Rose"
__copyright__ = "Copyright 2014 hamcrest.org"
__license__ = "BSD, see License.txt"
Revert "Version move to 2.0.0a1"
This reverts commit 4cd7d3062037dab13c99f0dd9b44f08fbd... | <commit_before>from __future__ import absolute_import
from hamcrest.core import *
from hamcrest.library import *
__version__ = "2.0.0a1"
__author__ = "Chris Rose"
__copyright__ = "Copyright 2014 hamcrest.org"
__license__ = "BSD, see License.txt"
<commit_msg>Revert "Version move to 2.0.0a1"
This reverts commit 4cd7d30... |
19bae697bc6e017a97eef77d1425d1ccfbe27ff6 | vprof/__main__.py | vprof/__main__.py | """Visual profiler for Python."""
import argparse
import functools
import json
import profile
import stats_server
import subprocess
import sys
_MODULE_DESC = 'Python visual profiler.'
_HOST = 'localhost'
_PORT = 8000
def main():
parser = argparse.ArgumentParser(description=_MODULE_DESC)
parser.add_argument('... | """Visual profiler for Python."""
import argparse
import functools
import json
import profile
import stats_server
import subprocess
import sys
_MODULE_DESC = 'Python visual profiler.'
_HOST = 'localhost'
_PORT = 8000
_PROFILE_MAP = {
'c': profile.CProfile
}
def main():
parser = argparse.ArgumentParser(descri... | Add profilers selection as CLI option. | Add profilers selection as CLI option.
| Python | bsd-2-clause | nvdv/vprof,nvdv/vprof,nvdv/vprof | """Visual profiler for Python."""
import argparse
import functools
import json
import profile
import stats_server
import subprocess
import sys
_MODULE_DESC = 'Python visual profiler.'
_HOST = 'localhost'
_PORT = 8000
def main():
parser = argparse.ArgumentParser(description=_MODULE_DESC)
parser.add_argument('... | """Visual profiler for Python."""
import argparse
import functools
import json
import profile
import stats_server
import subprocess
import sys
_MODULE_DESC = 'Python visual profiler.'
_HOST = 'localhost'
_PORT = 8000
_PROFILE_MAP = {
'c': profile.CProfile
}
def main():
parser = argparse.ArgumentParser(descri... | <commit_before>"""Visual profiler for Python."""
import argparse
import functools
import json
import profile
import stats_server
import subprocess
import sys
_MODULE_DESC = 'Python visual profiler.'
_HOST = 'localhost'
_PORT = 8000
def main():
parser = argparse.ArgumentParser(description=_MODULE_DESC)
parser... | """Visual profiler for Python."""
import argparse
import functools
import json
import profile
import stats_server
import subprocess
import sys
_MODULE_DESC = 'Python visual profiler.'
_HOST = 'localhost'
_PORT = 8000
_PROFILE_MAP = {
'c': profile.CProfile
}
def main():
parser = argparse.ArgumentParser(descri... | """Visual profiler for Python."""
import argparse
import functools
import json
import profile
import stats_server
import subprocess
import sys
_MODULE_DESC = 'Python visual profiler.'
_HOST = 'localhost'
_PORT = 8000
def main():
parser = argparse.ArgumentParser(description=_MODULE_DESC)
parser.add_argument('... | <commit_before>"""Visual profiler for Python."""
import argparse
import functools
import json
import profile
import stats_server
import subprocess
import sys
_MODULE_DESC = 'Python visual profiler.'
_HOST = 'localhost'
_PORT = 8000
def main():
parser = argparse.ArgumentParser(description=_MODULE_DESC)
parser... |
e7fec5ccb9e70bf17b7878e63052a874afa06856 | recipe_modules/runtime/api.py | recipe_modules/runtime/api.py | # Copyright 2017 The LUCI Authors. All rights reserved.
# Use of this source code is governed under the Apache License, Version 2.0
# that can be found in the LICENSE file.
from recipe_engine import recipe_api
class RuntimeApi(recipe_api.RecipeApi):
"""This module assists in experimenting with production recipes.
... | # Copyright 2017 The LUCI Authors. All rights reserved.
# Use of this source code is governed under the Apache License, Version 2.0
# that can be found in the LICENSE file.
from recipe_engine import recipe_api
class RuntimeApi(recipe_api.RecipeApi):
"""This module assists in experimenting with production recipes.
... | Change is_luci default to True. | Change is_luci default to True.
Most things should be on LUCI now, so this better reflects reality, and
might help shakeout any obsolete non-LUCI handling.
Bug: 993137
Recipe-Nontrivial-Roll: build
Recipe-Nontrivial-Roll: build_limited_scripts_slave
Recipe-Nontrivial-Roll: chromiumos
Recipe-Nontrivial-Roll: depot_too... | Python | apache-2.0 | luci/recipes-py,luci/recipes-py | # Copyright 2017 The LUCI Authors. All rights reserved.
# Use of this source code is governed under the Apache License, Version 2.0
# that can be found in the LICENSE file.
from recipe_engine import recipe_api
class RuntimeApi(recipe_api.RecipeApi):
"""This module assists in experimenting with production recipes.
... | # Copyright 2017 The LUCI Authors. All rights reserved.
# Use of this source code is governed under the Apache License, Version 2.0
# that can be found in the LICENSE file.
from recipe_engine import recipe_api
class RuntimeApi(recipe_api.RecipeApi):
"""This module assists in experimenting with production recipes.
... | <commit_before># Copyright 2017 The LUCI Authors. All rights reserved.
# Use of this source code is governed under the Apache License, Version 2.0
# that can be found in the LICENSE file.
from recipe_engine import recipe_api
class RuntimeApi(recipe_api.RecipeApi):
"""This module assists in experimenting with produ... | # Copyright 2017 The LUCI Authors. All rights reserved.
# Use of this source code is governed under the Apache License, Version 2.0
# that can be found in the LICENSE file.
from recipe_engine import recipe_api
class RuntimeApi(recipe_api.RecipeApi):
"""This module assists in experimenting with production recipes.
... | # Copyright 2017 The LUCI Authors. All rights reserved.
# Use of this source code is governed under the Apache License, Version 2.0
# that can be found in the LICENSE file.
from recipe_engine import recipe_api
class RuntimeApi(recipe_api.RecipeApi):
"""This module assists in experimenting with production recipes.
... | <commit_before># Copyright 2017 The LUCI Authors. All rights reserved.
# Use of this source code is governed under the Apache License, Version 2.0
# that can be found in the LICENSE file.
from recipe_engine import recipe_api
class RuntimeApi(recipe_api.RecipeApi):
"""This module assists in experimenting with produ... |
5e7cce09a6e6a847dad1714973fddb53d60c4c3f | yawf_sample/simple/models.py | yawf_sample/simple/models.py | from django.db import models
import reversion
from yawf.revision import RevisionModelMixin
class WINDOW_OPEN_STATUS:
MINIMIZED = 'minimized'
MAXIMIZED = 'maximized'
NORMAL = 'normal'
types = (MINIMIZED, MAXIMIZED, NORMAL)
choices = zip(types, types)
@reversion.register
class Window(RevisionMo... | from django.db import models
import reversion
from yawf.revision import RevisionModelMixin
class WINDOW_OPEN_STATUS:
MINIMIZED = 'minimized'
MAXIMIZED = 'maximized'
NORMAL = 'normal'
types = (MINIMIZED, MAXIMIZED, NORMAL)
choices = zip(types, types)
class Window(RevisionModelMixin, models.Mod... | Fix reversion register in sample app | Fix reversion register in sample app
| Python | mit | freevoid/yawf | from django.db import models
import reversion
from yawf.revision import RevisionModelMixin
class WINDOW_OPEN_STATUS:
MINIMIZED = 'minimized'
MAXIMIZED = 'maximized'
NORMAL = 'normal'
types = (MINIMIZED, MAXIMIZED, NORMAL)
choices = zip(types, types)
@reversion.register
class Window(RevisionMo... | from django.db import models
import reversion
from yawf.revision import RevisionModelMixin
class WINDOW_OPEN_STATUS:
MINIMIZED = 'minimized'
MAXIMIZED = 'maximized'
NORMAL = 'normal'
types = (MINIMIZED, MAXIMIZED, NORMAL)
choices = zip(types, types)
class Window(RevisionModelMixin, models.Mod... | <commit_before>from django.db import models
import reversion
from yawf.revision import RevisionModelMixin
class WINDOW_OPEN_STATUS:
MINIMIZED = 'minimized'
MAXIMIZED = 'maximized'
NORMAL = 'normal'
types = (MINIMIZED, MAXIMIZED, NORMAL)
choices = zip(types, types)
@reversion.register
class Wi... | from django.db import models
import reversion
from yawf.revision import RevisionModelMixin
class WINDOW_OPEN_STATUS:
MINIMIZED = 'minimized'
MAXIMIZED = 'maximized'
NORMAL = 'normal'
types = (MINIMIZED, MAXIMIZED, NORMAL)
choices = zip(types, types)
class Window(RevisionModelMixin, models.Mod... | from django.db import models
import reversion
from yawf.revision import RevisionModelMixin
class WINDOW_OPEN_STATUS:
MINIMIZED = 'minimized'
MAXIMIZED = 'maximized'
NORMAL = 'normal'
types = (MINIMIZED, MAXIMIZED, NORMAL)
choices = zip(types, types)
@reversion.register
class Window(RevisionMo... | <commit_before>from django.db import models
import reversion
from yawf.revision import RevisionModelMixin
class WINDOW_OPEN_STATUS:
MINIMIZED = 'minimized'
MAXIMIZED = 'maximized'
NORMAL = 'normal'
types = (MINIMIZED, MAXIMIZED, NORMAL)
choices = zip(types, types)
@reversion.register
class Wi... |
d970f2e4dc1d040bd352a68f6ebe4d3df93d19f7 | web/celSearch/api/scripts/query_wikipedia.py | web/celSearch/api/scripts/query_wikipedia.py | '''
Script used to query Wikipedia for summary of object
'''
import sys
import wikipedia
def main():
# Check that we have the right number of arguments
if (len(sys.argv) != 2):
print 'Incorrect number of arguments; please pass in only one string that contains the subject'
return 'Banana'
print wikipedia... | '''
Script used to query Wikipedia for summary of object
'''
import sys
import wikipedia
import nltk
def main():
# Check that we have the right number of arguments
if (len(sys.argv) != 2):
print 'Incorrect number of arguments; please pass in only one string that contains the query'
return 'Banana'
# Ge... | Send query from android device to server | Send query from android device to server
| Python | apache-2.0 | christopher18/Celsearch,christopher18/Celsearch,christopher18/Celsearch | '''
Script used to query Wikipedia for summary of object
'''
import sys
import wikipedia
def main():
# Check that we have the right number of arguments
if (len(sys.argv) != 2):
print 'Incorrect number of arguments; please pass in only one string that contains the subject'
return 'Banana'
print wikipedia... | '''
Script used to query Wikipedia for summary of object
'''
import sys
import wikipedia
import nltk
def main():
# Check that we have the right number of arguments
if (len(sys.argv) != 2):
print 'Incorrect number of arguments; please pass in only one string that contains the query'
return 'Banana'
# Ge... | <commit_before>'''
Script used to query Wikipedia for summary of object
'''
import sys
import wikipedia
def main():
# Check that we have the right number of arguments
if (len(sys.argv) != 2):
print 'Incorrect number of arguments; please pass in only one string that contains the subject'
return 'Banana'
... | '''
Script used to query Wikipedia for summary of object
'''
import sys
import wikipedia
import nltk
def main():
# Check that we have the right number of arguments
if (len(sys.argv) != 2):
print 'Incorrect number of arguments; please pass in only one string that contains the query'
return 'Banana'
# Ge... | '''
Script used to query Wikipedia for summary of object
'''
import sys
import wikipedia
def main():
# Check that we have the right number of arguments
if (len(sys.argv) != 2):
print 'Incorrect number of arguments; please pass in only one string that contains the subject'
return 'Banana'
print wikipedia... | <commit_before>'''
Script used to query Wikipedia for summary of object
'''
import sys
import wikipedia
def main():
# Check that we have the right number of arguments
if (len(sys.argv) != 2):
print 'Incorrect number of arguments; please pass in only one string that contains the subject'
return 'Banana'
... |
d15f6df74b8fe188a7a80c3491aeec62c35ce415 | policy.py | policy.py | from __future__ import unicode_literals
class PolicyError(RuntimeError):
def __init__(self, message, url):
self.message = message
self.url = url
def __str__(self):
return "{}: {}".format(self.message, self.url)
class RedirectLimitPolicy(object):
def __init__(self, max_redirects):... | from __future__ import unicode_literals
class PolicyError(RuntimeError):
def __init__(self, message, url):
self.message = message
self.url = url
def __str__(self):
return "{}: {}".format(self.message, self.url)
class RedirectLimitPolicy(object):
def __init__(self, max_redirects):... | Check for the first part of the version string | Check for the first part of the version string
Older CentOS Linux images only used the xxxx part of the full xxxx.yy
version string from Atlas.
| Python | mit | lpancescu/atlas-lint | from __future__ import unicode_literals
class PolicyError(RuntimeError):
def __init__(self, message, url):
self.message = message
self.url = url
def __str__(self):
return "{}: {}".format(self.message, self.url)
class RedirectLimitPolicy(object):
def __init__(self, max_redirects):... | from __future__ import unicode_literals
class PolicyError(RuntimeError):
def __init__(self, message, url):
self.message = message
self.url = url
def __str__(self):
return "{}: {}".format(self.message, self.url)
class RedirectLimitPolicy(object):
def __init__(self, max_redirects):... | <commit_before>from __future__ import unicode_literals
class PolicyError(RuntimeError):
def __init__(self, message, url):
self.message = message
self.url = url
def __str__(self):
return "{}: {}".format(self.message, self.url)
class RedirectLimitPolicy(object):
def __init__(self, ... | from __future__ import unicode_literals
class PolicyError(RuntimeError):
def __init__(self, message, url):
self.message = message
self.url = url
def __str__(self):
return "{}: {}".format(self.message, self.url)
class RedirectLimitPolicy(object):
def __init__(self, max_redirects):... | from __future__ import unicode_literals
class PolicyError(RuntimeError):
def __init__(self, message, url):
self.message = message
self.url = url
def __str__(self):
return "{}: {}".format(self.message, self.url)
class RedirectLimitPolicy(object):
def __init__(self, max_redirects):... | <commit_before>from __future__ import unicode_literals
class PolicyError(RuntimeError):
def __init__(self, message, url):
self.message = message
self.url = url
def __str__(self):
return "{}: {}".format(self.message, self.url)
class RedirectLimitPolicy(object):
def __init__(self, ... |
ebfb9290f5afdc07489be117f9ccb6df34e4023a | src/sentry/web/frontend/generic.py | src/sentry/web/frontend/generic.py | """
sentry.web.frontend.generic
~~~~~~~~~~~~~~~~~~~~~~~~~~~
:copyright: (c) 2010-2014 by the Sentry Team, see AUTHORS for more details.
:license: BSD, see LICENSE for more details.
"""
from __future__ import absolute_import
from django.views.generic import TemplateView as BaseTemplateView
from sentry.web.helpers imp... | """
sentry.web.frontend.generic
~~~~~~~~~~~~~~~~~~~~~~~~~~~
:copyright: (c) 2010-2014 by the Sentry Team, see AUTHORS for more details.
:license: BSD, see LICENSE for more details.
"""
from __future__ import absolute_import
from django.views.generic import TemplateView as BaseTemplateView
from sentry.web.helpers imp... | Add CORS headers to js files for local dev | Add CORS headers to js files for local dev
| Python | bsd-3-clause | alexm92/sentry,daevaorn/sentry,ifduyue/sentry,daevaorn/sentry,mvaled/sentry,gencer/sentry,looker/sentry,beeftornado/sentry,ifduyue/sentry,zenefits/sentry,zenefits/sentry,gencer/sentry,looker/sentry,daevaorn/sentry,JackDanger/sentry,looker/sentry,mitsuhiko/sentry,looker/sentry,ifduyue/sentry,zenefits/sentry,jean/sentry,... | """
sentry.web.frontend.generic
~~~~~~~~~~~~~~~~~~~~~~~~~~~
:copyright: (c) 2010-2014 by the Sentry Team, see AUTHORS for more details.
:license: BSD, see LICENSE for more details.
"""
from __future__ import absolute_import
from django.views.generic import TemplateView as BaseTemplateView
from sentry.web.helpers imp... | """
sentry.web.frontend.generic
~~~~~~~~~~~~~~~~~~~~~~~~~~~
:copyright: (c) 2010-2014 by the Sentry Team, see AUTHORS for more details.
:license: BSD, see LICENSE for more details.
"""
from __future__ import absolute_import
from django.views.generic import TemplateView as BaseTemplateView
from sentry.web.helpers imp... | <commit_before>"""
sentry.web.frontend.generic
~~~~~~~~~~~~~~~~~~~~~~~~~~~
:copyright: (c) 2010-2014 by the Sentry Team, see AUTHORS for more details.
:license: BSD, see LICENSE for more details.
"""
from __future__ import absolute_import
from django.views.generic import TemplateView as BaseTemplateView
from sentry.... | """
sentry.web.frontend.generic
~~~~~~~~~~~~~~~~~~~~~~~~~~~
:copyright: (c) 2010-2014 by the Sentry Team, see AUTHORS for more details.
:license: BSD, see LICENSE for more details.
"""
from __future__ import absolute_import
from django.views.generic import TemplateView as BaseTemplateView
from sentry.web.helpers imp... | """
sentry.web.frontend.generic
~~~~~~~~~~~~~~~~~~~~~~~~~~~
:copyright: (c) 2010-2014 by the Sentry Team, see AUTHORS for more details.
:license: BSD, see LICENSE for more details.
"""
from __future__ import absolute_import
from django.views.generic import TemplateView as BaseTemplateView
from sentry.web.helpers imp... | <commit_before>"""
sentry.web.frontend.generic
~~~~~~~~~~~~~~~~~~~~~~~~~~~
:copyright: (c) 2010-2014 by the Sentry Team, see AUTHORS for more details.
:license: BSD, see LICENSE for more details.
"""
from __future__ import absolute_import
from django.views.generic import TemplateView as BaseTemplateView
from sentry.... |
1cae75108cc3ec12911fc66b18875bf521baf00f | server/ntb/macros/npk_metadata.py | server/ntb/macros/npk_metadata.py | """
NPKSisteNytt Metadata Macro will perform the following changes to current content item:
- change the byline to "(NPK-NTB)"
- change the signoff to "npk@npk.no"
- change the body footer to "(©NPK)" - NB: copyrightsign, not @
- change the service to "NPKSisteNytt"
"""
def npk_metadata_m... | """
NPKSisteNytt Metadata Macro will perform the following changes to current content item:
- change the byline to "(NPK-NTB)"
- change the signoff to "npk@npk.no"
- change the body footer to "(©NPK)" - NB: copyrightsign, not @
- change the service to "NPKSisteNytt"
"""
def npk_metadata_m... | Change the byline format for NPK MAcro | fix(macro): Change the byline format for NPK MAcro
| Python | agpl-3.0 | petrjasek/superdesk-ntb,superdesk/superdesk-ntb,petrjasek/superdesk-ntb,petrjasek/superdesk-ntb,petrjasek/superdesk-ntb,ioanpocol/superdesk-ntb,superdesk/superdesk-ntb,ioanpocol/superdesk-ntb,superdesk/superdesk-ntb,ioanpocol/superdesk-ntb,superdesk/superdesk-ntb | """
NPKSisteNytt Metadata Macro will perform the following changes to current content item:
- change the byline to "(NPK-NTB)"
- change the signoff to "npk@npk.no"
- change the body footer to "(©NPK)" - NB: copyrightsign, not @
- change the service to "NPKSisteNytt"
"""
def npk_metadata_m... | """
NPKSisteNytt Metadata Macro will perform the following changes to current content item:
- change the byline to "(NPK-NTB)"
- change the signoff to "npk@npk.no"
- change the body footer to "(©NPK)" - NB: copyrightsign, not @
- change the service to "NPKSisteNytt"
"""
def npk_metadata_m... | <commit_before>"""
NPKSisteNytt Metadata Macro will perform the following changes to current content item:
- change the byline to "(NPK-NTB)"
- change the signoff to "npk@npk.no"
- change the body footer to "(©NPK)" - NB: copyrightsign, not @
- change the service to "NPKSisteNytt"
"""
def... | """
NPKSisteNytt Metadata Macro will perform the following changes to current content item:
- change the byline to "(NPK-NTB)"
- change the signoff to "npk@npk.no"
- change the body footer to "(©NPK)" - NB: copyrightsign, not @
- change the service to "NPKSisteNytt"
"""
def npk_metadata_m... | """
NPKSisteNytt Metadata Macro will perform the following changes to current content item:
- change the byline to "(NPK-NTB)"
- change the signoff to "npk@npk.no"
- change the body footer to "(©NPK)" - NB: copyrightsign, not @
- change the service to "NPKSisteNytt"
"""
def npk_metadata_m... | <commit_before>"""
NPKSisteNytt Metadata Macro will perform the following changes to current content item:
- change the byline to "(NPK-NTB)"
- change the signoff to "npk@npk.no"
- change the body footer to "(©NPK)" - NB: copyrightsign, not @
- change the service to "NPKSisteNytt"
"""
def... |
c7ba0ecbbe263fbf7378edbc45fcbbefb150a8fb | tests/test_probabilistic_interleave_speed.py | tests/test_probabilistic_interleave_speed.py | import interleaving as il
import numpy as np
import pytest
np.random.seed(0)
from .test_methods import TestMethods
class TestProbabilisticInterleaveSpeed(TestMethods):
def test_interleave(self):
r1 = list(range(100))
r2 = list(range(100, 200))
for i in range(1000):
method = il.... | import interleaving as il
import numpy as np
import pytest
np.random.seed(0)
from .test_methods import TestMethods
class TestProbabilisticInterleaveSpeed(TestMethods):
def test_interleave(self):
r1 = list(range(100))
r2 = list(range(50, 150))
r3 = list(range(100, 200))
r4 = list(ra... | Add tests for measuring the speed of probabilistic interleaving | Add tests for measuring the speed of probabilistic interleaving
| Python | mit | mpkato/interleaving | import interleaving as il
import numpy as np
import pytest
np.random.seed(0)
from .test_methods import TestMethods
class TestProbabilisticInterleaveSpeed(TestMethods):
def test_interleave(self):
r1 = list(range(100))
r2 = list(range(100, 200))
for i in range(1000):
method = il.... | import interleaving as il
import numpy as np
import pytest
np.random.seed(0)
from .test_methods import TestMethods
class TestProbabilisticInterleaveSpeed(TestMethods):
def test_interleave(self):
r1 = list(range(100))
r2 = list(range(50, 150))
r3 = list(range(100, 200))
r4 = list(ra... | <commit_before>import interleaving as il
import numpy as np
import pytest
np.random.seed(0)
from .test_methods import TestMethods
class TestProbabilisticInterleaveSpeed(TestMethods):
def test_interleave(self):
r1 = list(range(100))
r2 = list(range(100, 200))
for i in range(1000):
... | import interleaving as il
import numpy as np
import pytest
np.random.seed(0)
from .test_methods import TestMethods
class TestProbabilisticInterleaveSpeed(TestMethods):
def test_interleave(self):
r1 = list(range(100))
r2 = list(range(50, 150))
r3 = list(range(100, 200))
r4 = list(ra... | import interleaving as il
import numpy as np
import pytest
np.random.seed(0)
from .test_methods import TestMethods
class TestProbabilisticInterleaveSpeed(TestMethods):
def test_interleave(self):
r1 = list(range(100))
r2 = list(range(100, 200))
for i in range(1000):
method = il.... | <commit_before>import interleaving as il
import numpy as np
import pytest
np.random.seed(0)
from .test_methods import TestMethods
class TestProbabilisticInterleaveSpeed(TestMethods):
def test_interleave(self):
r1 = list(range(100))
r2 = list(range(100, 200))
for i in range(1000):
... |
5c3bd2ebdfd1abdacc0e2603fbba0f4e5b3eb5e3 | tests/test_reshape_image.py | tests/test_reshape_image.py | import numpy as np
import rasterio
def test_reshape():
with rasterio.open('tests/data/RGB.byte.tif') as src:
im_data = rasterio.plot.reshape_as_image(src)
assert im_data.shape == (718, 791, 3)
def test_toundtrip_reshape():
with rasterio.open('tests/data/RGB.byte.tif') as src:
data = sr... | import numpy as np
import rasterio
def test_reshape():
with rasterio.open('tests/data/RGB.byte.tif') as src:
im_data = rasterio.plot.reshape_as_image(src.read())
assert im_data.shape == (718, 791, 3)
def test_toundtrip_reshape():
with rasterio.open('tests/data/RGB.byte.tif') as src:
da... | Update reshape_image test for new decoupled io function | Update reshape_image test for new decoupled io function
| Python | bsd-3-clause | kapadia/rasterio,brendan-ward/rasterio,kapadia/rasterio,kapadia/rasterio,brendan-ward/rasterio,brendan-ward/rasterio | import numpy as np
import rasterio
def test_reshape():
with rasterio.open('tests/data/RGB.byte.tif') as src:
im_data = rasterio.plot.reshape_as_image(src)
assert im_data.shape == (718, 791, 3)
def test_toundtrip_reshape():
with rasterio.open('tests/data/RGB.byte.tif') as src:
data = sr... | import numpy as np
import rasterio
def test_reshape():
with rasterio.open('tests/data/RGB.byte.tif') as src:
im_data = rasterio.plot.reshape_as_image(src.read())
assert im_data.shape == (718, 791, 3)
def test_toundtrip_reshape():
with rasterio.open('tests/data/RGB.byte.tif') as src:
da... | <commit_before>import numpy as np
import rasterio
def test_reshape():
with rasterio.open('tests/data/RGB.byte.tif') as src:
im_data = rasterio.plot.reshape_as_image(src)
assert im_data.shape == (718, 791, 3)
def test_toundtrip_reshape():
with rasterio.open('tests/data/RGB.byte.tif') as src:
... | import numpy as np
import rasterio
def test_reshape():
with rasterio.open('tests/data/RGB.byte.tif') as src:
im_data = rasterio.plot.reshape_as_image(src.read())
assert im_data.shape == (718, 791, 3)
def test_toundtrip_reshape():
with rasterio.open('tests/data/RGB.byte.tif') as src:
da... | import numpy as np
import rasterio
def test_reshape():
with rasterio.open('tests/data/RGB.byte.tif') as src:
im_data = rasterio.plot.reshape_as_image(src)
assert im_data.shape == (718, 791, 3)
def test_toundtrip_reshape():
with rasterio.open('tests/data/RGB.byte.tif') as src:
data = sr... | <commit_before>import numpy as np
import rasterio
def test_reshape():
with rasterio.open('tests/data/RGB.byte.tif') as src:
im_data = rasterio.plot.reshape_as_image(src)
assert im_data.shape == (718, 791, 3)
def test_toundtrip_reshape():
with rasterio.open('tests/data/RGB.byte.tif') as src:
... |
2965891b46e89e0d7222ec16a2327f2bdef86f52 | chemex/util.py | chemex/util.py | """The util module contains a variety of utility functions."""
import configparser
import sys
def read_cfg_file(filename):
"""Read and parse the experiment configuration file with configparser."""
config = configparser.ConfigParser(inline_comment_prefixes=("#", ";"))
config.optionxform = str
try:
... | """The util module contains a variety of utility functions."""
import configparser
import sys
def listfloat(text):
return [float(val) for val in text.strip("[]").split(",")]
def read_cfg_file(filename=None):
"""Read and parse the experiment configuration file with configparser."""
config = configparser... | Update settings for reading config files | Update settings for reading config files
Update the definition of comments, now only allowing the use of "#"
for comments. Add a converter function to parse list of floats,
such as:
list_of_floats = [1.0, 2.0, 3.0]
| Python | bsd-3-clause | gbouvignies/chemex | """The util module contains a variety of utility functions."""
import configparser
import sys
def read_cfg_file(filename):
"""Read and parse the experiment configuration file with configparser."""
config = configparser.ConfigParser(inline_comment_prefixes=("#", ";"))
config.optionxform = str
try:
... | """The util module contains a variety of utility functions."""
import configparser
import sys
def listfloat(text):
return [float(val) for val in text.strip("[]").split(",")]
def read_cfg_file(filename=None):
"""Read and parse the experiment configuration file with configparser."""
config = configparser... | <commit_before>"""The util module contains a variety of utility functions."""
import configparser
import sys
def read_cfg_file(filename):
"""Read and parse the experiment configuration file with configparser."""
config = configparser.ConfigParser(inline_comment_prefixes=("#", ";"))
config.optionxform = s... | """The util module contains a variety of utility functions."""
import configparser
import sys
def listfloat(text):
return [float(val) for val in text.strip("[]").split(",")]
def read_cfg_file(filename=None):
"""Read and parse the experiment configuration file with configparser."""
config = configparser... | """The util module contains a variety of utility functions."""
import configparser
import sys
def read_cfg_file(filename):
"""Read and parse the experiment configuration file with configparser."""
config = configparser.ConfigParser(inline_comment_prefixes=("#", ";"))
config.optionxform = str
try:
... | <commit_before>"""The util module contains a variety of utility functions."""
import configparser
import sys
def read_cfg_file(filename):
"""Read and parse the experiment configuration file with configparser."""
config = configparser.ConfigParser(inline_comment_prefixes=("#", ";"))
config.optionxform = s... |
b6e9e37350a4b435df00a54b2ccd9da70a4db788 | nogotofail/mitm/util/ip.py | nogotofail/mitm/util/ip.py | r'''
Copyright 2014 Google Inc. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to i... | r'''
Copyright 2014 Google Inc. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to i... | Fix local interface addr parsing | Fix local interface addr parsing
On Fedora 21 the format of ifconfig is a little different.
Fixes #17
| Python | apache-2.0 | google/nogotofail,leasual/nogotofail,mkenne11/nogotofail,joshcooper/nogotofail,digideskio/nogotofail,mkenne11/nogotofail-pii,joshcooper/nogotofail,google/nogotofail,mkenne11/nogotofail,digideskio/nogotofail,leasual/nogotofail,mkenne11/nogotofail-pii | r'''
Copyright 2014 Google Inc. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to i... | r'''
Copyright 2014 Google Inc. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to i... | <commit_before>r'''
Copyright 2014 Google Inc. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law... | r'''
Copyright 2014 Google Inc. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to i... | r'''
Copyright 2014 Google Inc. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to i... | <commit_before>r'''
Copyright 2014 Google Inc. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law... |
79b5227deaf830a9ce51d18387372fe6cf88e51d | monasca_setup/detection/plugins/neutron.py | monasca_setup/detection/plugins/neutron.py | import monasca_setup.detection
class Neutron(monasca_setup.detection.ServicePlugin):
"""Detect Neutron daemons and setup configuration to monitor them.
"""
def __init__(self, template_dir, overwrite=True, args=None):
service_params = {
'args': args,
'template_dir': templ... | import monasca_setup.detection
class Neutron(monasca_setup.detection.ServicePlugin):
"""Detect Neutron daemons and setup configuration to monitor them.
"""
def __init__(self, template_dir, overwrite=True, args=None):
service_params = {
'args': args,
'template_dir': templ... | Remove vendor-specific paths on LBaaS agent executables | Remove vendor-specific paths on LBaaS agent executables
The monasca agent uses simple string matching in the process detection
plugin. This can result in false positive matches in the case where a
process name appears elsehwere in the "ps" output. In particular,
"neutron-lbaas-agent" is used for both process and log... | Python | bsd-3-clause | sapcc/monasca-agent,sapcc/monasca-agent,sapcc/monasca-agent | import monasca_setup.detection
class Neutron(monasca_setup.detection.ServicePlugin):
"""Detect Neutron daemons and setup configuration to monitor them.
"""
def __init__(self, template_dir, overwrite=True, args=None):
service_params = {
'args': args,
'template_dir': templ... | import monasca_setup.detection
class Neutron(monasca_setup.detection.ServicePlugin):
"""Detect Neutron daemons and setup configuration to monitor them.
"""
def __init__(self, template_dir, overwrite=True, args=None):
service_params = {
'args': args,
'template_dir': templ... | <commit_before>import monasca_setup.detection
class Neutron(monasca_setup.detection.ServicePlugin):
"""Detect Neutron daemons and setup configuration to monitor them.
"""
def __init__(self, template_dir, overwrite=True, args=None):
service_params = {
'args': args,
'templ... | import monasca_setup.detection
class Neutron(monasca_setup.detection.ServicePlugin):
"""Detect Neutron daemons and setup configuration to monitor them.
"""
def __init__(self, template_dir, overwrite=True, args=None):
service_params = {
'args': args,
'template_dir': templ... | import monasca_setup.detection
class Neutron(monasca_setup.detection.ServicePlugin):
"""Detect Neutron daemons and setup configuration to monitor them.
"""
def __init__(self, template_dir, overwrite=True, args=None):
service_params = {
'args': args,
'template_dir': templ... | <commit_before>import monasca_setup.detection
class Neutron(monasca_setup.detection.ServicePlugin):
"""Detect Neutron daemons and setup configuration to monitor them.
"""
def __init__(self, template_dir, overwrite=True, args=None):
service_params = {
'args': args,
'templ... |
91f5db6ddf6e26cec27917109689c200498dc85f | statsmodels/formula/try_formula.py | statsmodels/formula/try_formula.py | import statsmodels.api as sm
import numpy as np
star98 = sm.datasets.star98.load_pandas().data
formula = 'SUCCESS ~ LOWINC + PERASIAN + PERBLACK + PERHISP + PCTCHRT '
formula += '+ PCTYRRND + PERMINTE*AVYRSEXP*AVSALK + PERSPENK*PTRATIO*PCTAF'
dta = star98[["NABOVE", "NBELOW", "LOWINC", "PERASIAN", "PERBLACK", "PERHI... | import statsmodels.api as sm
import numpy as np
star98 = sm.datasets.star98.load_pandas().data
formula = 'SUCCESS ~ LOWINC + PERASIAN + PERBLACK + PERHISP + PCTCHRT '
formula += '+ PCTYRRND + PERMINTE*AVYRSEXP*AVSALK + PERSPENK*PTRATIO*PCTAF'
dta = star98[["NABOVE", "NBELOW", "LOWINC", "PERASIAN", "PERBLACK", "PERHI... | Add example for injecting user transform | ENH: Add example for injecting user transform
| Python | bsd-3-clause | bert9bert/statsmodels,YihaoLu/statsmodels,cbmoore/statsmodels,hlin117/statsmodels,bavardage/statsmodels,detrout/debian-statsmodels,hainm/statsmodels,statsmodels/statsmodels,jstoxrocky/statsmodels,statsmodels/statsmodels,astocko/statsmodels,DonBeo/statsmodels,bzero/statsmodels,Averroes/statsmodels,gef756/statsmodels,jos... | import statsmodels.api as sm
import numpy as np
star98 = sm.datasets.star98.load_pandas().data
formula = 'SUCCESS ~ LOWINC + PERASIAN + PERBLACK + PERHISP + PCTCHRT '
formula += '+ PCTYRRND + PERMINTE*AVYRSEXP*AVSALK + PERSPENK*PTRATIO*PCTAF'
dta = star98[["NABOVE", "NBELOW", "LOWINC", "PERASIAN", "PERBLACK", "PERHI... | import statsmodels.api as sm
import numpy as np
star98 = sm.datasets.star98.load_pandas().data
formula = 'SUCCESS ~ LOWINC + PERASIAN + PERBLACK + PERHISP + PCTCHRT '
formula += '+ PCTYRRND + PERMINTE*AVYRSEXP*AVSALK + PERSPENK*PTRATIO*PCTAF'
dta = star98[["NABOVE", "NBELOW", "LOWINC", "PERASIAN", "PERBLACK", "PERHI... | <commit_before>import statsmodels.api as sm
import numpy as np
star98 = sm.datasets.star98.load_pandas().data
formula = 'SUCCESS ~ LOWINC + PERASIAN + PERBLACK + PERHISP + PCTCHRT '
formula += '+ PCTYRRND + PERMINTE*AVYRSEXP*AVSALK + PERSPENK*PTRATIO*PCTAF'
dta = star98[["NABOVE", "NBELOW", "LOWINC", "PERASIAN", "PE... | import statsmodels.api as sm
import numpy as np
star98 = sm.datasets.star98.load_pandas().data
formula = 'SUCCESS ~ LOWINC + PERASIAN + PERBLACK + PERHISP + PCTCHRT '
formula += '+ PCTYRRND + PERMINTE*AVYRSEXP*AVSALK + PERSPENK*PTRATIO*PCTAF'
dta = star98[["NABOVE", "NBELOW", "LOWINC", "PERASIAN", "PERBLACK", "PERHI... | import statsmodels.api as sm
import numpy as np
star98 = sm.datasets.star98.load_pandas().data
formula = 'SUCCESS ~ LOWINC + PERASIAN + PERBLACK + PERHISP + PCTCHRT '
formula += '+ PCTYRRND + PERMINTE*AVYRSEXP*AVSALK + PERSPENK*PTRATIO*PCTAF'
dta = star98[["NABOVE", "NBELOW", "LOWINC", "PERASIAN", "PERBLACK", "PERHI... | <commit_before>import statsmodels.api as sm
import numpy as np
star98 = sm.datasets.star98.load_pandas().data
formula = 'SUCCESS ~ LOWINC + PERASIAN + PERBLACK + PERHISP + PCTCHRT '
formula += '+ PCTYRRND + PERMINTE*AVYRSEXP*AVSALK + PERSPENK*PTRATIO*PCTAF'
dta = star98[["NABOVE", "NBELOW", "LOWINC", "PERASIAN", "PE... |
5e7c99844a0687125e34104cf2c7ee87ca69c0de | mopidy_soundcloud/__init__.py | mopidy_soundcloud/__init__.py | import os
from mopidy import config, ext
from mopidy.exceptions import ExtensionError
__version__ = "2.1.0"
class Extension(ext.Extension):
dist_name = "Mopidy-SoundCloud"
ext_name = "soundcloud"
version = __version__
def get_default_config(self):
conf_file = os.path.join(os.path.dirname(_... | import pathlib
from mopidy import config, ext
from mopidy.exceptions import ExtensionError
__version__ = "2.1.0"
class Extension(ext.Extension):
dist_name = "Mopidy-SoundCloud"
ext_name = "soundcloud"
version = __version__
def get_default_config(self):
return config.read(pathlib.Path(__fil... | Use pathlib to read ext.conf | Use pathlib to read ext.conf
| Python | mit | mopidy/mopidy-soundcloud | import os
from mopidy import config, ext
from mopidy.exceptions import ExtensionError
__version__ = "2.1.0"
class Extension(ext.Extension):
dist_name = "Mopidy-SoundCloud"
ext_name = "soundcloud"
version = __version__
def get_default_config(self):
conf_file = os.path.join(os.path.dirname(_... | import pathlib
from mopidy import config, ext
from mopidy.exceptions import ExtensionError
__version__ = "2.1.0"
class Extension(ext.Extension):
dist_name = "Mopidy-SoundCloud"
ext_name = "soundcloud"
version = __version__
def get_default_config(self):
return config.read(pathlib.Path(__fil... | <commit_before>import os
from mopidy import config, ext
from mopidy.exceptions import ExtensionError
__version__ = "2.1.0"
class Extension(ext.Extension):
dist_name = "Mopidy-SoundCloud"
ext_name = "soundcloud"
version = __version__
def get_default_config(self):
conf_file = os.path.join(os... | import pathlib
from mopidy import config, ext
from mopidy.exceptions import ExtensionError
__version__ = "2.1.0"
class Extension(ext.Extension):
dist_name = "Mopidy-SoundCloud"
ext_name = "soundcloud"
version = __version__
def get_default_config(self):
return config.read(pathlib.Path(__fil... | import os
from mopidy import config, ext
from mopidy.exceptions import ExtensionError
__version__ = "2.1.0"
class Extension(ext.Extension):
dist_name = "Mopidy-SoundCloud"
ext_name = "soundcloud"
version = __version__
def get_default_config(self):
conf_file = os.path.join(os.path.dirname(_... | <commit_before>import os
from mopidy import config, ext
from mopidy.exceptions import ExtensionError
__version__ = "2.1.0"
class Extension(ext.Extension):
dist_name = "Mopidy-SoundCloud"
ext_name = "soundcloud"
version = __version__
def get_default_config(self):
conf_file = os.path.join(os... |
d6551b93f5900eca3f44af6e45cf96ba9573fe0e | shub/fetch_eggs.py | shub/fetch_eggs.py | import click
import requests
from shub.utils import find_api_key
from shub.click_utils import log
@click.command(help="Download a project's eggs from the Scrapy Cloud")
@click.argument("project_id", required=True)
def cli(project_id):
auth = (find_api_key(), '')
url = "https://staging.scrapinghub.com/api/egg... | import click
import requests
from shub.utils import find_api_key
from shub.click_utils import log
@click.command(help="Download a project's eggs from the Scrapy Cloud")
@click.argument("project_id", required=True)
def cli(project_id):
auth = (find_api_key(), '')
url = "https://dash.scrapinghub.com/api/eggs/b... | Use production dashboard API endpoint | Use production dashboard API endpoint | Python | bsd-3-clause | scrapinghub/shub | import click
import requests
from shub.utils import find_api_key
from shub.click_utils import log
@click.command(help="Download a project's eggs from the Scrapy Cloud")
@click.argument("project_id", required=True)
def cli(project_id):
auth = (find_api_key(), '')
url = "https://staging.scrapinghub.com/api/egg... | import click
import requests
from shub.utils import find_api_key
from shub.click_utils import log
@click.command(help="Download a project's eggs from the Scrapy Cloud")
@click.argument("project_id", required=True)
def cli(project_id):
auth = (find_api_key(), '')
url = "https://dash.scrapinghub.com/api/eggs/b... | <commit_before>import click
import requests
from shub.utils import find_api_key
from shub.click_utils import log
@click.command(help="Download a project's eggs from the Scrapy Cloud")
@click.argument("project_id", required=True)
def cli(project_id):
auth = (find_api_key(), '')
url = "https://staging.scraping... | import click
import requests
from shub.utils import find_api_key
from shub.click_utils import log
@click.command(help="Download a project's eggs from the Scrapy Cloud")
@click.argument("project_id", required=True)
def cli(project_id):
auth = (find_api_key(), '')
url = "https://dash.scrapinghub.com/api/eggs/b... | import click
import requests
from shub.utils import find_api_key
from shub.click_utils import log
@click.command(help="Download a project's eggs from the Scrapy Cloud")
@click.argument("project_id", required=True)
def cli(project_id):
auth = (find_api_key(), '')
url = "https://staging.scrapinghub.com/api/egg... | <commit_before>import click
import requests
from shub.utils import find_api_key
from shub.click_utils import log
@click.command(help="Download a project's eggs from the Scrapy Cloud")
@click.argument("project_id", required=True)
def cli(project_id):
auth = (find_api_key(), '')
url = "https://staging.scraping... |
94ec7d4816d2a243b8a2b0a0f2dc8a55a7347122 | tests/saltunittest.py | tests/saltunittest.py | """
This file provides a single interface to unittest objects for our
tests while supporting python < 2.7 via unittest2.
If you need something from the unittest namespace it should be
imported here from the relevant module and then imported into your
test from here
"""
# Import python libs
import os
import sys
# sup... | """
This file provides a single interface to unittest objects for our
tests while supporting python < 2.7 via unittest2.
If you need something from the unittest namespace it should be
imported here from the relevant module and then imported into your
test from here
"""
# Import python libs
import os
import sys
# sup... | Make an error go to stderr and remove net 1 LOC | Make an error go to stderr and remove net 1 LOC
| Python | apache-2.0 | saltstack/salt,saltstack/salt,saltstack/salt,saltstack/salt,saltstack/salt | """
This file provides a single interface to unittest objects for our
tests while supporting python < 2.7 via unittest2.
If you need something from the unittest namespace it should be
imported here from the relevant module and then imported into your
test from here
"""
# Import python libs
import os
import sys
# sup... | """
This file provides a single interface to unittest objects for our
tests while supporting python < 2.7 via unittest2.
If you need something from the unittest namespace it should be
imported here from the relevant module and then imported into your
test from here
"""
# Import python libs
import os
import sys
# sup... | <commit_before>"""
This file provides a single interface to unittest objects for our
tests while supporting python < 2.7 via unittest2.
If you need something from the unittest namespace it should be
imported here from the relevant module and then imported into your
test from here
"""
# Import python libs
import os
im... | """
This file provides a single interface to unittest objects for our
tests while supporting python < 2.7 via unittest2.
If you need something from the unittest namespace it should be
imported here from the relevant module and then imported into your
test from here
"""
# Import python libs
import os
import sys
# sup... | """
This file provides a single interface to unittest objects for our
tests while supporting python < 2.7 via unittest2.
If you need something from the unittest namespace it should be
imported here from the relevant module and then imported into your
test from here
"""
# Import python libs
import os
import sys
# sup... | <commit_before>"""
This file provides a single interface to unittest objects for our
tests while supporting python < 2.7 via unittest2.
If you need something from the unittest namespace it should be
imported here from the relevant module and then imported into your
test from here
"""
# Import python libs
import os
im... |
b6737b91938d527872eff1d645a205cacf94e15d | tests/test_gobject.py | tests/test_gobject.py | # -*- Mode: Python -*-
import unittest
import gobject
import testhelper
class TestGObjectAPI(unittest.TestCase):
def testGObjectModule(self):
obj = gobject.GObject()
self.assertEquals(obj.__module__,
'gobject._gobject')
self.assertEquals(obj.__grefcount__, 1)
... | # -*- Mode: Python -*-
import unittest
import gobject
import testhelper
class TestGObjectAPI(unittest.TestCase):
def testGObjectModule(self):
obj = gobject.GObject()
self.assertEquals(obj.__module__,
'gobject._gobject')
class TestReferenceCounting(unittest.TestCase):
... | Add a test to check for regular object reference count | Add a test to check for regular object reference count
https://bugzilla.gnome.org/show_bug.cgi?id=639949
| Python | lgpl-2.1 | alexef/pygobject,Distrotech/pygobject,davidmalcolm/pygobject,davibe/pygobject,jdahlin/pygobject,choeger/pygobject-cmake,MathieuDuponchelle/pygobject,choeger/pygobject-cmake,davidmalcolm/pygobject,davibe/pygobject,pexip/pygobject,Distrotech/pygobject,alexef/pygobject,sfeltman/pygobject,jdahlin/pygobject,GNOME/pygobject,... | # -*- Mode: Python -*-
import unittest
import gobject
import testhelper
class TestGObjectAPI(unittest.TestCase):
def testGObjectModule(self):
obj = gobject.GObject()
self.assertEquals(obj.__module__,
'gobject._gobject')
self.assertEquals(obj.__grefcount__, 1)
... | # -*- Mode: Python -*-
import unittest
import gobject
import testhelper
class TestGObjectAPI(unittest.TestCase):
def testGObjectModule(self):
obj = gobject.GObject()
self.assertEquals(obj.__module__,
'gobject._gobject')
class TestReferenceCounting(unittest.TestCase):
... | <commit_before># -*- Mode: Python -*-
import unittest
import gobject
import testhelper
class TestGObjectAPI(unittest.TestCase):
def testGObjectModule(self):
obj = gobject.GObject()
self.assertEquals(obj.__module__,
'gobject._gobject')
self.assertEquals(obj.__gre... | # -*- Mode: Python -*-
import unittest
import gobject
import testhelper
class TestGObjectAPI(unittest.TestCase):
def testGObjectModule(self):
obj = gobject.GObject()
self.assertEquals(obj.__module__,
'gobject._gobject')
class TestReferenceCounting(unittest.TestCase):
... | # -*- Mode: Python -*-
import unittest
import gobject
import testhelper
class TestGObjectAPI(unittest.TestCase):
def testGObjectModule(self):
obj = gobject.GObject()
self.assertEquals(obj.__module__,
'gobject._gobject')
self.assertEquals(obj.__grefcount__, 1)
... | <commit_before># -*- Mode: Python -*-
import unittest
import gobject
import testhelper
class TestGObjectAPI(unittest.TestCase):
def testGObjectModule(self):
obj = gobject.GObject()
self.assertEquals(obj.__module__,
'gobject._gobject')
self.assertEquals(obj.__gre... |
5cf0b19d67a667d4e0d48a12f0ee94f3387cfa37 | tests/test_helpers.py | tests/test_helpers.py | # -*- encoding: utf-8 -*-
#
# Copyright 2013 Jay Pipes
#
# 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 la... | # -*- encoding: utf-8 -*-
#
# Copyright 2013 Jay Pipes
#
# 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 la... | Add test to ensure talons.helpers.import_function returns a callable | Add test to ensure talons.helpers.import_function returns a callable
| Python | apache-2.0 | talons/talons,jaypipes/talons | # -*- encoding: utf-8 -*-
#
# Copyright 2013 Jay Pipes
#
# 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 la... | # -*- encoding: utf-8 -*-
#
# Copyright 2013 Jay Pipes
#
# 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 la... | <commit_before># -*- encoding: utf-8 -*-
#
# Copyright 2013 Jay Pipes
#
# 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 b... | # -*- encoding: utf-8 -*-
#
# Copyright 2013 Jay Pipes
#
# 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 la... | # -*- encoding: utf-8 -*-
#
# Copyright 2013 Jay Pipes
#
# 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 la... | <commit_before># -*- encoding: utf-8 -*-
#
# Copyright 2013 Jay Pipes
#
# 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 b... |
73dfb1fc4ff62705f37b1128e0684e88be416d8f | src/webmention/models.py | src/webmention/models.py | from django.db import models
class WebMentionResponse(models.Model):
response_body = models.TextField()
response_to = models.URLField()
source = models.URLField()
reviewed = models.BooleanField(default=False)
current = models.BooleanField(default=True)
date_created = models.DateTimeField(auto_... | from django.db import models
class WebMentionResponse(models.Model):
response_body = models.TextField()
response_to = models.URLField()
source = models.URLField()
reviewed = models.BooleanField(default=False)
current = models.BooleanField(default=True)
date_created = models.DateTimeField(auto_... | Update deprecated allow_tags to format_html | Update deprecated allow_tags to format_html
| Python | mit | easy-as-python/django-webmention | from django.db import models
class WebMentionResponse(models.Model):
response_body = models.TextField()
response_to = models.URLField()
source = models.URLField()
reviewed = models.BooleanField(default=False)
current = models.BooleanField(default=True)
date_created = models.DateTimeField(auto_... | from django.db import models
class WebMentionResponse(models.Model):
response_body = models.TextField()
response_to = models.URLField()
source = models.URLField()
reviewed = models.BooleanField(default=False)
current = models.BooleanField(default=True)
date_created = models.DateTimeField(auto_... | <commit_before>from django.db import models
class WebMentionResponse(models.Model):
response_body = models.TextField()
response_to = models.URLField()
source = models.URLField()
reviewed = models.BooleanField(default=False)
current = models.BooleanField(default=True)
date_created = models.Date... | from django.db import models
class WebMentionResponse(models.Model):
response_body = models.TextField()
response_to = models.URLField()
source = models.URLField()
reviewed = models.BooleanField(default=False)
current = models.BooleanField(default=True)
date_created = models.DateTimeField(auto_... | from django.db import models
class WebMentionResponse(models.Model):
response_body = models.TextField()
response_to = models.URLField()
source = models.URLField()
reviewed = models.BooleanField(default=False)
current = models.BooleanField(default=True)
date_created = models.DateTimeField(auto_... | <commit_before>from django.db import models
class WebMentionResponse(models.Model):
response_body = models.TextField()
response_to = models.URLField()
source = models.URLField()
reviewed = models.BooleanField(default=False)
current = models.BooleanField(default=True)
date_created = models.Date... |
9c0d79d5d019c941806c09ccb79593b96f5e9fbe | discoverage/settings.py | discoverage/settings.py | from django.conf import settings
# The name of the iterable ``django-discoverage`` looks for in the discovery
# process
TESTED_APPS_VAR_NAME = getattr(settings, 'TESTED_APPS_VAR_NAME', 'TESTS_APPS')
# Modules not to trace
COVERAGE_OMIT_MODULES = getattr(settings, 'COVERAGE_OMIT_MODULES', ['*test*'])
COVERAGE_EXCLUDE_... | from django.conf import settings
# The name of the iterable ``django-discoverage`` looks for in the discovery
# process
TESTED_APPS_VAR_NAME = getattr(settings, 'TESTED_APPS_VAR_NAME', 'TESTS_APPS')
# Modules not to trace
COVERAGE_OMIT_MODULES = getattr(settings, 'COVERAGE_OMIT_MODULES', ['*test*'])
COVERAGE_EXCLUDE_... | Move exclude pattern to its own line. | Move exclude pattern to its own line.
| Python | bsd-2-clause | ryankask/django-discoverage,ryankask/django-discoverage | from django.conf import settings
# The name of the iterable ``django-discoverage`` looks for in the discovery
# process
TESTED_APPS_VAR_NAME = getattr(settings, 'TESTED_APPS_VAR_NAME', 'TESTS_APPS')
# Modules not to trace
COVERAGE_OMIT_MODULES = getattr(settings, 'COVERAGE_OMIT_MODULES', ['*test*'])
COVERAGE_EXCLUDE_... | from django.conf import settings
# The name of the iterable ``django-discoverage`` looks for in the discovery
# process
TESTED_APPS_VAR_NAME = getattr(settings, 'TESTED_APPS_VAR_NAME', 'TESTS_APPS')
# Modules not to trace
COVERAGE_OMIT_MODULES = getattr(settings, 'COVERAGE_OMIT_MODULES', ['*test*'])
COVERAGE_EXCLUDE_... | <commit_before>from django.conf import settings
# The name of the iterable ``django-discoverage`` looks for in the discovery
# process
TESTED_APPS_VAR_NAME = getattr(settings, 'TESTED_APPS_VAR_NAME', 'TESTS_APPS')
# Modules not to trace
COVERAGE_OMIT_MODULES = getattr(settings, 'COVERAGE_OMIT_MODULES', ['*test*'])
CO... | from django.conf import settings
# The name of the iterable ``django-discoverage`` looks for in the discovery
# process
TESTED_APPS_VAR_NAME = getattr(settings, 'TESTED_APPS_VAR_NAME', 'TESTS_APPS')
# Modules not to trace
COVERAGE_OMIT_MODULES = getattr(settings, 'COVERAGE_OMIT_MODULES', ['*test*'])
COVERAGE_EXCLUDE_... | from django.conf import settings
# The name of the iterable ``django-discoverage`` looks for in the discovery
# process
TESTED_APPS_VAR_NAME = getattr(settings, 'TESTED_APPS_VAR_NAME', 'TESTS_APPS')
# Modules not to trace
COVERAGE_OMIT_MODULES = getattr(settings, 'COVERAGE_OMIT_MODULES', ['*test*'])
COVERAGE_EXCLUDE_... | <commit_before>from django.conf import settings
# The name of the iterable ``django-discoverage`` looks for in the discovery
# process
TESTED_APPS_VAR_NAME = getattr(settings, 'TESTED_APPS_VAR_NAME', 'TESTS_APPS')
# Modules not to trace
COVERAGE_OMIT_MODULES = getattr(settings, 'COVERAGE_OMIT_MODULES', ['*test*'])
CO... |
e612a742caeedf5398522365c984a39c505e7872 | warehouse/exceptions.py | warehouse/exceptions.py | class FailedSynchronization(Exception):
pass
class SynchronizationTimeout(Exception):
"""
A synchronization for a particular project took longer than the timeout.
"""
| from __future__ import absolute_import
from __future__ import division
from __future__ import unicode_literals
class FailedSynchronization(Exception):
pass
class SynchronizationTimeout(Exception):
"""
A synchronization for a particular project took longer than the timeout.
"""
| Add the standard __future__ imports | Add the standard __future__ imports
| Python | bsd-2-clause | davidfischer/warehouse | class FailedSynchronization(Exception):
pass
class SynchronizationTimeout(Exception):
"""
A synchronization for a particular project took longer than the timeout.
"""
Add the standard __future__ imports | from __future__ import absolute_import
from __future__ import division
from __future__ import unicode_literals
class FailedSynchronization(Exception):
pass
class SynchronizationTimeout(Exception):
"""
A synchronization for a particular project took longer than the timeout.
"""
| <commit_before>class FailedSynchronization(Exception):
pass
class SynchronizationTimeout(Exception):
"""
A synchronization for a particular project took longer than the timeout.
"""
<commit_msg>Add the standard __future__ imports<commit_after> | from __future__ import absolute_import
from __future__ import division
from __future__ import unicode_literals
class FailedSynchronization(Exception):
pass
class SynchronizationTimeout(Exception):
"""
A synchronization for a particular project took longer than the timeout.
"""
| class FailedSynchronization(Exception):
pass
class SynchronizationTimeout(Exception):
"""
A synchronization for a particular project took longer than the timeout.
"""
Add the standard __future__ importsfrom __future__ import absolute_import
from __future__ import division
from __future__ import unicod... | <commit_before>class FailedSynchronization(Exception):
pass
class SynchronizationTimeout(Exception):
"""
A synchronization for a particular project took longer than the timeout.
"""
<commit_msg>Add the standard __future__ imports<commit_after>from __future__ import absolute_import
from __future__ impo... |
34c427200c6ab50fb64fa0d6116366a8fa9186a3 | netman/core/objects/bond.py | netman/core/objects/bond.py | # Copyright 2015 Internap.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, so... | # Copyright 2015 Internap.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, so... | Support deprecated use of the interface property of Bond. | Support deprecated use of the interface property of Bond.
| Python | apache-2.0 | idjaw/netman,internaphosting/netman,internap/netman,godp1301/netman,mat128/netman,lindycoder/netman | # Copyright 2015 Internap.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, so... | # Copyright 2015 Internap.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, so... | <commit_before># Copyright 2015 Internap.
#
# 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... | # Copyright 2015 Internap.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, so... | # Copyright 2015 Internap.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, so... | <commit_before># Copyright 2015 Internap.
#
# 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... |
071004d9e70b769df2303ed9be1a4d494197667c | 39_string_slice.py | 39_string_slice.py | musketeersName = 'Tom Dick Harry'
print 'Three musketeers are', musketeersName
musketeer_1 = musketeersName[0:3]
print 'First musketeer :', musketeer_1
musketeer_2 = musketeersName[4:8]
print 'Second musketeer :', musketeer_2
musketeer_3 = musketeersName[9:14]
print 'Third musketeer :', musketeer_3
print "\n-------... | musketeersName = 'Tom Dick Harry'
print 'Three musketeers are', musketeersName
musketeer_1 = musketeersName[0:3]
print 'First musketeer :', musketeer_1
musketeer_2 = musketeersName[4:8]
print 'Second musketeer :', musketeer_2
musketeer_3 = musketeersName[9:14]
print 'Third musketeer :', musketeer_3
print "\n-------... | Update the put put text | Update the put put text
| Python | mit | rahulbohra/Python-Basic | musketeersName = 'Tom Dick Harry'
print 'Three musketeers are', musketeersName
musketeer_1 = musketeersName[0:3]
print 'First musketeer :', musketeer_1
musketeer_2 = musketeersName[4:8]
print 'Second musketeer :', musketeer_2
musketeer_3 = musketeersName[9:14]
print 'Third musketeer :', musketeer_3
print "\n-------... | musketeersName = 'Tom Dick Harry'
print 'Three musketeers are', musketeersName
musketeer_1 = musketeersName[0:3]
print 'First musketeer :', musketeer_1
musketeer_2 = musketeersName[4:8]
print 'Second musketeer :', musketeer_2
musketeer_3 = musketeersName[9:14]
print 'Third musketeer :', musketeer_3
print "\n-------... | <commit_before>musketeersName = 'Tom Dick Harry'
print 'Three musketeers are', musketeersName
musketeer_1 = musketeersName[0:3]
print 'First musketeer :', musketeer_1
musketeer_2 = musketeersName[4:8]
print 'Second musketeer :', musketeer_2
musketeer_3 = musketeersName[9:14]
print 'Third musketeer :', musketeer_3
p... | musketeersName = 'Tom Dick Harry'
print 'Three musketeers are', musketeersName
musketeer_1 = musketeersName[0:3]
print 'First musketeer :', musketeer_1
musketeer_2 = musketeersName[4:8]
print 'Second musketeer :', musketeer_2
musketeer_3 = musketeersName[9:14]
print 'Third musketeer :', musketeer_3
print "\n-------... | musketeersName = 'Tom Dick Harry'
print 'Three musketeers are', musketeersName
musketeer_1 = musketeersName[0:3]
print 'First musketeer :', musketeer_1
musketeer_2 = musketeersName[4:8]
print 'Second musketeer :', musketeer_2
musketeer_3 = musketeersName[9:14]
print 'Third musketeer :', musketeer_3
print "\n-------... | <commit_before>musketeersName = 'Tom Dick Harry'
print 'Three musketeers are', musketeersName
musketeer_1 = musketeersName[0:3]
print 'First musketeer :', musketeer_1
musketeer_2 = musketeersName[4:8]
print 'Second musketeer :', musketeer_2
musketeer_3 = musketeersName[9:14]
print 'Third musketeer :', musketeer_3
p... |
962b1a7e0258db1bd6d8e5b37d32f8012684792a | spoppy/__init__.py | spoppy/__init__.py | import logging
import click
from lockfile import LockFile, LockTimeout
logger = logging.getLogger('spoppy.main')
def get_version():
return '1.1.0'
@click.command()
@click.argument('username', required=False)
@click.argument('password', required=False)
def main(username, password):
# Ignore error, logging ... | import logging
try:
import click
from lockfile import LockFile, LockTimeout
except ImportError:
click = None
logger = logging.getLogger('spoppy.main')
def get_version():
return '1.1.0'
if click:
@click.command()
@click.argument('username', required=False)
@click.argument('password', req... | Handle importerrors when f.x. we are installing | Handle importerrors when f.x. we are installing
| Python | mit | sindrig/spoppy,sindrig/spoppy | import logging
import click
from lockfile import LockFile, LockTimeout
logger = logging.getLogger('spoppy.main')
def get_version():
return '1.1.0'
@click.command()
@click.argument('username', required=False)
@click.argument('password', required=False)
def main(username, password):
# Ignore error, logging ... | import logging
try:
import click
from lockfile import LockFile, LockTimeout
except ImportError:
click = None
logger = logging.getLogger('spoppy.main')
def get_version():
return '1.1.0'
if click:
@click.command()
@click.argument('username', required=False)
@click.argument('password', req... | <commit_before>import logging
import click
from lockfile import LockFile, LockTimeout
logger = logging.getLogger('spoppy.main')
def get_version():
return '1.1.0'
@click.command()
@click.argument('username', required=False)
@click.argument('password', required=False)
def main(username, password):
# Ignore ... | import logging
try:
import click
from lockfile import LockFile, LockTimeout
except ImportError:
click = None
logger = logging.getLogger('spoppy.main')
def get_version():
return '1.1.0'
if click:
@click.command()
@click.argument('username', required=False)
@click.argument('password', req... | import logging
import click
from lockfile import LockFile, LockTimeout
logger = logging.getLogger('spoppy.main')
def get_version():
return '1.1.0'
@click.command()
@click.argument('username', required=False)
@click.argument('password', required=False)
def main(username, password):
# Ignore error, logging ... | <commit_before>import logging
import click
from lockfile import LockFile, LockTimeout
logger = logging.getLogger('spoppy.main')
def get_version():
return '1.1.0'
@click.command()
@click.argument('username', required=False)
@click.argument('password', required=False)
def main(username, password):
# Ignore ... |
ab06e871a6c820845da2d4d60bb6b1874350cf16 | circuits/web/__init__.py | circuits/web/__init__.py | # Module: __init__
# Date: 3rd October 2008
# Author: James Mills, prologic at shortcircuit dot net dot au
"""Circuits Library - Web
circuits.web contains the circuits full stack web server that is HTTP
and WSGI compliant.
"""
from loggers import Logger
from core import Controller
from sessions import Sessions
from... | # Module: __init__
# Date: 3rd October 2008
# Author: James Mills, prologic at shortcircuit dot net dot au
"""Circuits Library - Web
circuits.web contains the circuits full stack web server that is HTTP
and WSGI compliant.
"""
from utils import url
from loggers import Logger
from sessions import Sessions
from core ... | Add url and expose to this namesapce | circuits.web: Add url and expose to this namesapce
| Python | mit | eriol/circuits,eriol/circuits,nizox/circuits,treemo/circuits,treemo/circuits,eriol/circuits,treemo/circuits | # Module: __init__
# Date: 3rd October 2008
# Author: James Mills, prologic at shortcircuit dot net dot au
"""Circuits Library - Web
circuits.web contains the circuits full stack web server that is HTTP
and WSGI compliant.
"""
from loggers import Logger
from core import Controller
from sessions import Sessions
from... | # Module: __init__
# Date: 3rd October 2008
# Author: James Mills, prologic at shortcircuit dot net dot au
"""Circuits Library - Web
circuits.web contains the circuits full stack web server that is HTTP
and WSGI compliant.
"""
from utils import url
from loggers import Logger
from sessions import Sessions
from core ... | <commit_before># Module: __init__
# Date: 3rd October 2008
# Author: James Mills, prologic at shortcircuit dot net dot au
"""Circuits Library - Web
circuits.web contains the circuits full stack web server that is HTTP
and WSGI compliant.
"""
from loggers import Logger
from core import Controller
from sessions impor... | # Module: __init__
# Date: 3rd October 2008
# Author: James Mills, prologic at shortcircuit dot net dot au
"""Circuits Library - Web
circuits.web contains the circuits full stack web server that is HTTP
and WSGI compliant.
"""
from utils import url
from loggers import Logger
from sessions import Sessions
from core ... | # Module: __init__
# Date: 3rd October 2008
# Author: James Mills, prologic at shortcircuit dot net dot au
"""Circuits Library - Web
circuits.web contains the circuits full stack web server that is HTTP
and WSGI compliant.
"""
from loggers import Logger
from core import Controller
from sessions import Sessions
from... | <commit_before># Module: __init__
# Date: 3rd October 2008
# Author: James Mills, prologic at shortcircuit dot net dot au
"""Circuits Library - Web
circuits.web contains the circuits full stack web server that is HTTP
and WSGI compliant.
"""
from loggers import Logger
from core import Controller
from sessions impor... |
1e484c288bb95dc10b15c0c73d5c8146f1b92627 | rynda/Rynda/settings/local.py | rynda/Rynda/settings/local.py | # coding: utf-8
from .base import *
DEBUG = True
TEMPLATE_DEBUG = True
DATABASES = {
'default': {
'ENGINE': 'django.contrib.gis.db.backends.postgis',
'NAME': 'devrynda',
'USER': 'devrynda',
'PASSWORD': 'devrynda',
'HOST': 'localhost',
'PORT': '',
}
}
INSTALLED... | # coding: utf-8
import re
import debug_toolbar
from .base import *
DEBUG = True
TEMPLATE_DEBUG = True
DATABASES = {
'default': {
'ENGINE': 'django.contrib.gis.db.backends.postgis',
'NAME': 'devrynda',
'USER': 'devrynda',
'PASSWORD': 'devrynda',
'HOST': 'localhost',
... | Hide debug_toolbar in admin application | Hide debug_toolbar in admin application
| Python | mit | sarutobi/ritmserdtsa,sarutobi/flowofkindness,sarutobi/flowofkindness,sarutobi/ritmserdtsa,sarutobi/Rynda,sarutobi/ritmserdtsa,sarutobi/flowofkindness,sarutobi/flowofkindness,sarutobi/Rynda,sarutobi/Rynda,sarutobi/Rynda,sarutobi/ritmserdtsa | # coding: utf-8
from .base import *
DEBUG = True
TEMPLATE_DEBUG = True
DATABASES = {
'default': {
'ENGINE': 'django.contrib.gis.db.backends.postgis',
'NAME': 'devrynda',
'USER': 'devrynda',
'PASSWORD': 'devrynda',
'HOST': 'localhost',
'PORT': '',
}
}
INSTALLED... | # coding: utf-8
import re
import debug_toolbar
from .base import *
DEBUG = True
TEMPLATE_DEBUG = True
DATABASES = {
'default': {
'ENGINE': 'django.contrib.gis.db.backends.postgis',
'NAME': 'devrynda',
'USER': 'devrynda',
'PASSWORD': 'devrynda',
'HOST': 'localhost',
... | <commit_before># coding: utf-8
from .base import *
DEBUG = True
TEMPLATE_DEBUG = True
DATABASES = {
'default': {
'ENGINE': 'django.contrib.gis.db.backends.postgis',
'NAME': 'devrynda',
'USER': 'devrynda',
'PASSWORD': 'devrynda',
'HOST': 'localhost',
'PORT': '',
... | # coding: utf-8
import re
import debug_toolbar
from .base import *
DEBUG = True
TEMPLATE_DEBUG = True
DATABASES = {
'default': {
'ENGINE': 'django.contrib.gis.db.backends.postgis',
'NAME': 'devrynda',
'USER': 'devrynda',
'PASSWORD': 'devrynda',
'HOST': 'localhost',
... | # coding: utf-8
from .base import *
DEBUG = True
TEMPLATE_DEBUG = True
DATABASES = {
'default': {
'ENGINE': 'django.contrib.gis.db.backends.postgis',
'NAME': 'devrynda',
'USER': 'devrynda',
'PASSWORD': 'devrynda',
'HOST': 'localhost',
'PORT': '',
}
}
INSTALLED... | <commit_before># coding: utf-8
from .base import *
DEBUG = True
TEMPLATE_DEBUG = True
DATABASES = {
'default': {
'ENGINE': 'django.contrib.gis.db.backends.postgis',
'NAME': 'devrynda',
'USER': 'devrynda',
'PASSWORD': 'devrynda',
'HOST': 'localhost',
'PORT': '',
... |
04c92e1fe7efa38f7d99d501286d3b7e627e73ca | scripts/slave/chromium/dart_buildbot_run.py | scripts/slave/chromium/dart_buildbot_run.py | #!/usr/bin/env python
# Copyright (c) 2012 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.
"""Entry point for the dartium buildbots.
This script is called from buildbot and reports results using the buildbot
annotation sc... | #!/usr/bin/env python
# Copyright (c) 2012 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.
"""Entry point for the dartium buildbots.
This script is called from buildbot and reports results using the buildbot
annotation sc... | Use exitcode of running the annotated steps script | Use exitcode of running the annotated steps script
If there is an error in the annotated steps we will still have a green bot!!!!
Example:
http://chromegw.corp.google.com/i/client.dart/builders/dartium-lucid64-full-be/builds/3566/steps/annotated_steps/logs/stdio
TBR=whesse
Review URL: https://codereview.chromium.or... | Python | bsd-3-clause | eunchong/build,eunchong/build,eunchong/build,eunchong/build | #!/usr/bin/env python
# Copyright (c) 2012 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.
"""Entry point for the dartium buildbots.
This script is called from buildbot and reports results using the buildbot
annotation sc... | #!/usr/bin/env python
# Copyright (c) 2012 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.
"""Entry point for the dartium buildbots.
This script is called from buildbot and reports results using the buildbot
annotation sc... | <commit_before>#!/usr/bin/env python
# Copyright (c) 2012 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.
"""Entry point for the dartium buildbots.
This script is called from buildbot and reports results using the buildbo... | #!/usr/bin/env python
# Copyright (c) 2012 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.
"""Entry point for the dartium buildbots.
This script is called from buildbot and reports results using the buildbot
annotation sc... | #!/usr/bin/env python
# Copyright (c) 2012 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.
"""Entry point for the dartium buildbots.
This script is called from buildbot and reports results using the buildbot
annotation sc... | <commit_before>#!/usr/bin/env python
# Copyright (c) 2012 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.
"""Entry point for the dartium buildbots.
This script is called from buildbot and reports results using the buildbo... |
5dd07cdc94a479b5c274a2335a50815b957cffe6 | zoe_web/web/__init__.py | zoe_web/web/__init__.py | # Copyright (c) 2015, Daniele Venzano
#
# 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 w... | # Copyright (c) 2015, Daniele Venzano
#
# 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 w... | Fix version in web pages | Fix version in web pages
| Python | apache-2.0 | DistributedSystemsGroup/zoe,DistributedSystemsGroup/zoe,DistributedSystemsGroup/zoe,DistributedSystemsGroup/zoe,DistributedSystemsGroup/zoe | # Copyright (c) 2015, Daniele Venzano
#
# 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 w... | # Copyright (c) 2015, Daniele Venzano
#
# 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 w... | <commit_before># Copyright (c) 2015, Daniele Venzano
#
# 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... | # Copyright (c) 2015, Daniele Venzano
#
# 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 w... | # Copyright (c) 2015, Daniele Venzano
#
# 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 w... | <commit_before># Copyright (c) 2015, Daniele Venzano
#
# 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... |
fa7aecae90026037c9f5ce2ffef37184ee83f679 | nova/objects/__init__.py | nova/objects/__init__.py | # Copyright 2013 IBM Corp.
#
# 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 agree... | # Copyright 2013 IBM Corp.
#
# 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 agree... | Use Instance Objects for Start/Stop | Use Instance Objects for Start/Stop
This patch makes the start and stop operations use the Instance
object instead of passing SQLA-derived dicts over RPC. Until
something more sophisticated is needed (and developed), it also
adds a nova.object.register_all() function which just triggers
imports of all the object model... | Python | apache-2.0 | citrix-openstack-build/oslo.versionedobjects,openstack/oslo.versionedobjects | # Copyright 2013 IBM Corp.
#
# 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 agree... | # Copyright 2013 IBM Corp.
#
# 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 agree... | <commit_before># Copyright 2013 IBM Corp.
#
# 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 applicab... | # Copyright 2013 IBM Corp.
#
# 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 agree... | # Copyright 2013 IBM Corp.
#
# 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 agree... | <commit_before># Copyright 2013 IBM Corp.
#
# 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 applicab... |
59371c5951f476e1684022744f4a37eb6fe62c98 | DebianDevelChangesBot/utils/tidy_bug_title.py | DebianDevelChangesBot/utils/tidy_bug_title.py | # -*- coding: utf-8 -*-
#
# Debian Changes Bot
# Copyright (C) 2008 Chris Lamb <chris@chris-lamb.co.uk>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the... | # -*- coding: utf-8 -*-
#
# Debian Changes Bot
# Copyright (C) 2008 Chris Lamb <chris@chris-lamb.co.uk>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the... | Remove extra whitespace from bug title | Remove extra whitespace from bug title
Signed-off-by: Chris Lamb <711c73f64afdce07b7e38039a96d2224209e9a6c@chris-lamb.co.uk>
| Python | agpl-3.0 | lamby/debian-devel-changes-bot,sebastinas/debian-devel-changes-bot,xtaran/debian-devel-changes-bot,lamby/debian-devel-changes-bot,xtaran/debian-devel-changes-bot,lamby/debian-devel-changes-bot | # -*- coding: utf-8 -*-
#
# Debian Changes Bot
# Copyright (C) 2008 Chris Lamb <chris@chris-lamb.co.uk>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the... | # -*- coding: utf-8 -*-
#
# Debian Changes Bot
# Copyright (C) 2008 Chris Lamb <chris@chris-lamb.co.uk>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the... | <commit_before># -*- coding: utf-8 -*-
#
# Debian Changes Bot
# Copyright (C) 2008 Chris Lamb <chris@chris-lamb.co.uk>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either v... | # -*- coding: utf-8 -*-
#
# Debian Changes Bot
# Copyright (C) 2008 Chris Lamb <chris@chris-lamb.co.uk>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the... | # -*- coding: utf-8 -*-
#
# Debian Changes Bot
# Copyright (C) 2008 Chris Lamb <chris@chris-lamb.co.uk>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the... | <commit_before># -*- coding: utf-8 -*-
#
# Debian Changes Bot
# Copyright (C) 2008 Chris Lamb <chris@chris-lamb.co.uk>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either v... |
186a2c3f235264c3c71396efcbb8a33924758db9 | scrape.py | scrape.py | import discord
import asyncio
from tqdm import tqdm
import argparse
parser = argparse.ArgumentParser(description='Discord channel scraper')
requiredNamed = parser.add_argument_group('Required arguments:')
requiredNamed.add_argument('-c', '--channel', type=str, help='Channel to scrape. Requires the channel ID.',... | import discord
import asyncio
from tqdm import tqdm
import argparse
parser = argparse.ArgumentParser(description='Discord channel scraper')
requiredNamed = parser.add_argument_group('Required arguments:')
requiredNamed.add_argument('-c', '--channel', type=str, help='Channel to scrape. Requires the channel ID.',... | Update to use token instead of email+pass | Update to use token instead of email+pass
| Python | mit | suclearnub/discordgrapher | import discord
import asyncio
from tqdm import tqdm
import argparse
parser = argparse.ArgumentParser(description='Discord channel scraper')
requiredNamed = parser.add_argument_group('Required arguments:')
requiredNamed.add_argument('-c', '--channel', type=str, help='Channel to scrape. Requires the channel ID.',... | import discord
import asyncio
from tqdm import tqdm
import argparse
parser = argparse.ArgumentParser(description='Discord channel scraper')
requiredNamed = parser.add_argument_group('Required arguments:')
requiredNamed.add_argument('-c', '--channel', type=str, help='Channel to scrape. Requires the channel ID.',... | <commit_before>import discord
import asyncio
from tqdm import tqdm
import argparse
parser = argparse.ArgumentParser(description='Discord channel scraper')
requiredNamed = parser.add_argument_group('Required arguments:')
requiredNamed.add_argument('-c', '--channel', type=str, help='Channel to scrape. Requires th... | import discord
import asyncio
from tqdm import tqdm
import argparse
parser = argparse.ArgumentParser(description='Discord channel scraper')
requiredNamed = parser.add_argument_group('Required arguments:')
requiredNamed.add_argument('-c', '--channel', type=str, help='Channel to scrape. Requires the channel ID.',... | import discord
import asyncio
from tqdm import tqdm
import argparse
parser = argparse.ArgumentParser(description='Discord channel scraper')
requiredNamed = parser.add_argument_group('Required arguments:')
requiredNamed.add_argument('-c', '--channel', type=str, help='Channel to scrape. Requires the channel ID.',... | <commit_before>import discord
import asyncio
from tqdm import tqdm
import argparse
parser = argparse.ArgumentParser(description='Discord channel scraper')
requiredNamed = parser.add_argument_group('Required arguments:')
requiredNamed.add_argument('-c', '--channel', type=str, help='Channel to scrape. Requires th... |
3ddad0538430499182c583a0a7f877884038c0a5 | Lib/test/test_symtable.py | Lib/test/test_symtable.py | from test.test_support import vereq, TestFailed
import symtable
symbols = symtable.symtable("def f(x): return x", "?", "exec")
## XXX
## Test disabled because symtable module needs to be rewritten for new compiler
##vereq(symbols[0].name, "global")
##vereq(len([ste for ste in symbols.values() if ste.name == "f"]), ... | from test import test_support
import symtable
import unittest
## XXX
## Test disabled because symtable module needs to be rewritten for new compiler
##vereq(symbols[0].name, "global")
##vereq(len([ste for ste in symbols.values() if ste.name == "f"]), 1)
### Bug tickler: SyntaxError file name correct whether error ... | Use unittest and make sure a few other cases don't crash | Use unittest and make sure a few other cases don't crash
| Python | mit | sk-/python2.7-type-annotator,sk-/python2.7-type-annotator,sk-/python2.7-type-annotator | from test.test_support import vereq, TestFailed
import symtable
symbols = symtable.symtable("def f(x): return x", "?", "exec")
## XXX
## Test disabled because symtable module needs to be rewritten for new compiler
##vereq(symbols[0].name, "global")
##vereq(len([ste for ste in symbols.values() if ste.name == "f"]), ... | from test import test_support
import symtable
import unittest
## XXX
## Test disabled because symtable module needs to be rewritten for new compiler
##vereq(symbols[0].name, "global")
##vereq(len([ste for ste in symbols.values() if ste.name == "f"]), 1)
### Bug tickler: SyntaxError file name correct whether error ... | <commit_before>from test.test_support import vereq, TestFailed
import symtable
symbols = symtable.symtable("def f(x): return x", "?", "exec")
## XXX
## Test disabled because symtable module needs to be rewritten for new compiler
##vereq(symbols[0].name, "global")
##vereq(len([ste for ste in symbols.values() if ste.... | from test import test_support
import symtable
import unittest
## XXX
## Test disabled because symtable module needs to be rewritten for new compiler
##vereq(symbols[0].name, "global")
##vereq(len([ste for ste in symbols.values() if ste.name == "f"]), 1)
### Bug tickler: SyntaxError file name correct whether error ... | from test.test_support import vereq, TestFailed
import symtable
symbols = symtable.symtable("def f(x): return x", "?", "exec")
## XXX
## Test disabled because symtable module needs to be rewritten for new compiler
##vereq(symbols[0].name, "global")
##vereq(len([ste for ste in symbols.values() if ste.name == "f"]), ... | <commit_before>from test.test_support import vereq, TestFailed
import symtable
symbols = symtable.symtable("def f(x): return x", "?", "exec")
## XXX
## Test disabled because symtable module needs to be rewritten for new compiler
##vereq(symbols[0].name, "global")
##vereq(len([ste for ste in symbols.values() if ste.... |
f559001d2c46fade2d9b62f9cb7a3f8053e8b80f | OMDB_api_scrape.py | OMDB_api_scrape.py | #!/usr/bin/python3
# OMDB_api_scrape.py - parses a movie and year from the command line, grabs the
# JSON and saves a copy for later
import json, requests, sys, os
URL_BASE = 'http://www.omdbapi.com/?'
if len(sys.argv) > 1:
# Get address from command line.
mTitle = '+'.join(sys.argv[1:-1])
... | #!/usr/bin/python3
# OMDB_api_scrape.py - parses a movie and year from the command line, grabs the
# xml and saves a copy for later
import requests, sys, os
import lxml.etree
URL_BASE = 'http://www.omdbapi.com/?'
if len(sys.argv) > 1:
# Get address from command line.
mTitle = '+'.join(sys.a... | Convert OMDB scrapper to grab xml | Convert OMDB scrapper to grab xml
| Python | mit | samcheck/PyMedia,samcheck/PyMedia,samcheck/PyMedia | #!/usr/bin/python3
# OMDB_api_scrape.py - parses a movie and year from the command line, grabs the
# JSON and saves a copy for later
import json, requests, sys, os
URL_BASE = 'http://www.omdbapi.com/?'
if len(sys.argv) > 1:
# Get address from command line.
mTitle = '+'.join(sys.argv[1:-1])
... | #!/usr/bin/python3
# OMDB_api_scrape.py - parses a movie and year from the command line, grabs the
# xml and saves a copy for later
import requests, sys, os
import lxml.etree
URL_BASE = 'http://www.omdbapi.com/?'
if len(sys.argv) > 1:
# Get address from command line.
mTitle = '+'.join(sys.a... | <commit_before>#!/usr/bin/python3
# OMDB_api_scrape.py - parses a movie and year from the command line, grabs the
# JSON and saves a copy for later
import json, requests, sys, os
URL_BASE = 'http://www.omdbapi.com/?'
if len(sys.argv) > 1:
# Get address from command line.
mTitle = '+'.join(s... | #!/usr/bin/python3
# OMDB_api_scrape.py - parses a movie and year from the command line, grabs the
# xml and saves a copy for later
import requests, sys, os
import lxml.etree
URL_BASE = 'http://www.omdbapi.com/?'
if len(sys.argv) > 1:
# Get address from command line.
mTitle = '+'.join(sys.a... | #!/usr/bin/python3
# OMDB_api_scrape.py - parses a movie and year from the command line, grabs the
# JSON and saves a copy for later
import json, requests, sys, os
URL_BASE = 'http://www.omdbapi.com/?'
if len(sys.argv) > 1:
# Get address from command line.
mTitle = '+'.join(sys.argv[1:-1])
... | <commit_before>#!/usr/bin/python3
# OMDB_api_scrape.py - parses a movie and year from the command line, grabs the
# JSON and saves a copy for later
import json, requests, sys, os
URL_BASE = 'http://www.omdbapi.com/?'
if len(sys.argv) > 1:
# Get address from command line.
mTitle = '+'.join(s... |
8ac20f5bec2d94e71b92e48568d18fd74be4e5d4 | fabfile.py | fabfile.py | from fabric.api import task, local
@task
def up():
"""
Deploy new release to pypi. Using twine util
"""
local("rm -rf dist")
local("rm -rf pgup.egg-info")
local("python ./setup.py sdist")
local("twine upload dist/{}".format(local("ls dist", capture=True).strip()))
@task
def docs():
... | from fabric.api import task, local, execute
@task
def up():
"""
Deploy new release to pypi. Using twine util
"""
local("rm -rf dist")
local("rm -rf pgup.egg-info")
local("python ./setup.py sdist")
local("twine upload dist/{}".format(local("ls dist", capture=True).strip()))
execute(s... | Add fab task for syncing pgup with mezzo | Add fab task for syncing pgup with mezzo
| Python | mit | stepan-perlov/pgup | from fabric.api import task, local
@task
def up():
"""
Deploy new release to pypi. Using twine util
"""
local("rm -rf dist")
local("rm -rf pgup.egg-info")
local("python ./setup.py sdist")
local("twine upload dist/{}".format(local("ls dist", capture=True).strip()))
@task
def docs():
... | from fabric.api import task, local, execute
@task
def up():
"""
Deploy new release to pypi. Using twine util
"""
local("rm -rf dist")
local("rm -rf pgup.egg-info")
local("python ./setup.py sdist")
local("twine upload dist/{}".format(local("ls dist", capture=True).strip()))
execute(s... | <commit_before>from fabric.api import task, local
@task
def up():
"""
Deploy new release to pypi. Using twine util
"""
local("rm -rf dist")
local("rm -rf pgup.egg-info")
local("python ./setup.py sdist")
local("twine upload dist/{}".format(local("ls dist", capture=True).strip()))
@task
... | from fabric.api import task, local, execute
@task
def up():
"""
Deploy new release to pypi. Using twine util
"""
local("rm -rf dist")
local("rm -rf pgup.egg-info")
local("python ./setup.py sdist")
local("twine upload dist/{}".format(local("ls dist", capture=True).strip()))
execute(s... | from fabric.api import task, local
@task
def up():
"""
Deploy new release to pypi. Using twine util
"""
local("rm -rf dist")
local("rm -rf pgup.egg-info")
local("python ./setup.py sdist")
local("twine upload dist/{}".format(local("ls dist", capture=True).strip()))
@task
def docs():
... | <commit_before>from fabric.api import task, local
@task
def up():
"""
Deploy new release to pypi. Using twine util
"""
local("rm -rf dist")
local("rm -rf pgup.egg-info")
local("python ./setup.py sdist")
local("twine upload dist/{}".format(local("ls dist", capture=True).strip()))
@task
... |
c3c26c15895a192fba22482306182950c0ccd57c | python/simple-linked-list/simple_linked_list.py | python/simple-linked-list/simple_linked_list.py | class Node(object):
def __init__(self, value):
pass
def value(self):
pass
def next(self):
pass
class LinkedList(object):
def __init__(self, values=[]):
self.size = 0
for value in values:
self.push(value)
def __len__(self):
return self.... | class Node(object):
def __init__(self, value):
pass
def value(self):
pass
def next(self):
pass
class LinkedList(object):
def __init__(self, values=[]):
self._size = 0
self._head = None
for value in values:
self.push(value)
def __len__... | Mark instance variables private with leading _ | Mark instance variables private with leading _
| Python | mit | rootulp/exercism,rootulp/exercism,rootulp/exercism,rootulp/exercism,rootulp/exercism,rootulp/exercism,rootulp/exercism,rootulp/exercism | class Node(object):
def __init__(self, value):
pass
def value(self):
pass
def next(self):
pass
class LinkedList(object):
def __init__(self, values=[]):
self.size = 0
for value in values:
self.push(value)
def __len__(self):
return self.... | class Node(object):
def __init__(self, value):
pass
def value(self):
pass
def next(self):
pass
class LinkedList(object):
def __init__(self, values=[]):
self._size = 0
self._head = None
for value in values:
self.push(value)
def __len__... | <commit_before>class Node(object):
def __init__(self, value):
pass
def value(self):
pass
def next(self):
pass
class LinkedList(object):
def __init__(self, values=[]):
self.size = 0
for value in values:
self.push(value)
def __len__(self):
... | class Node(object):
def __init__(self, value):
pass
def value(self):
pass
def next(self):
pass
class LinkedList(object):
def __init__(self, values=[]):
self._size = 0
self._head = None
for value in values:
self.push(value)
def __len__... | class Node(object):
def __init__(self, value):
pass
def value(self):
pass
def next(self):
pass
class LinkedList(object):
def __init__(self, values=[]):
self.size = 0
for value in values:
self.push(value)
def __len__(self):
return self.... | <commit_before>class Node(object):
def __init__(self, value):
pass
def value(self):
pass
def next(self):
pass
class LinkedList(object):
def __init__(self, values=[]):
self.size = 0
for value in values:
self.push(value)
def __len__(self):
... |
fa609681c2732e655cde9075182af918983ccc1f | photutils/utils/_misc.py | photutils/utils/_misc.py | # Licensed under a 3-clause BSD style license - see LICENSE.rst
"""
This module provides tools to return the installed astropy and photutils
versions.
"""
from datetime import datetime, timezone
def _get_version_info():
"""
Return a dictionary of the installed version numbers for photutils
and its depende... | # Licensed under a 3-clause BSD style license - see LICENSE.rst
"""
This module provides tools to return the installed astropy and photutils
versions.
"""
from datetime import datetime, timezone
import sys
def _get_version_info():
"""
Return a dictionary of the installed version numbers for photutils
and ... | Add all optional dependencies to version info dict | Add all optional dependencies to version info dict
| Python | bsd-3-clause | larrybradley/photutils,astropy/photutils | # Licensed under a 3-clause BSD style license - see LICENSE.rst
"""
This module provides tools to return the installed astropy and photutils
versions.
"""
from datetime import datetime, timezone
def _get_version_info():
"""
Return a dictionary of the installed version numbers for photutils
and its depende... | # Licensed under a 3-clause BSD style license - see LICENSE.rst
"""
This module provides tools to return the installed astropy and photutils
versions.
"""
from datetime import datetime, timezone
import sys
def _get_version_info():
"""
Return a dictionary of the installed version numbers for photutils
and ... | <commit_before># Licensed under a 3-clause BSD style license - see LICENSE.rst
"""
This module provides tools to return the installed astropy and photutils
versions.
"""
from datetime import datetime, timezone
def _get_version_info():
"""
Return a dictionary of the installed version numbers for photutils
... | # Licensed under a 3-clause BSD style license - see LICENSE.rst
"""
This module provides tools to return the installed astropy and photutils
versions.
"""
from datetime import datetime, timezone
import sys
def _get_version_info():
"""
Return a dictionary of the installed version numbers for photutils
and ... | # Licensed under a 3-clause BSD style license - see LICENSE.rst
"""
This module provides tools to return the installed astropy and photutils
versions.
"""
from datetime import datetime, timezone
def _get_version_info():
"""
Return a dictionary of the installed version numbers for photutils
and its depende... | <commit_before># Licensed under a 3-clause BSD style license - see LICENSE.rst
"""
This module provides tools to return the installed astropy and photutils
versions.
"""
from datetime import datetime, timezone
def _get_version_info():
"""
Return a dictionary of the installed version numbers for photutils
... |
1a51b2e2043a3b3eb4fa9d356ebaa43461d7d464 | tests/on_the_fly_selector_tests.py | tests/on_the_fly_selector_tests.py | """
This module contains tests of code from the file named
`../forecastonishing/selection/on_the_fly_selector.py`.
@author: Nikolay Lysenko
"""
import unittest
import numpy as np
import pandas as pd
from forecastonishing.selection.on_the_fly_selector import OnTheFlySelector
from forecastonishing.miscellaneous.simp... | Create stub of fit testing | test: Create stub of fit testing
| Python | mit | osahp/forecastonishing | test: Create stub of fit testing | """
This module contains tests of code from the file named
`../forecastonishing/selection/on_the_fly_selector.py`.
@author: Nikolay Lysenko
"""
import unittest
import numpy as np
import pandas as pd
from forecastonishing.selection.on_the_fly_selector import OnTheFlySelector
from forecastonishing.miscellaneous.simp... | <commit_before><commit_msg>test: Create stub of fit testing<commit_after> | """
This module contains tests of code from the file named
`../forecastonishing/selection/on_the_fly_selector.py`.
@author: Nikolay Lysenko
"""
import unittest
import numpy as np
import pandas as pd
from forecastonishing.selection.on_the_fly_selector import OnTheFlySelector
from forecastonishing.miscellaneous.simp... | test: Create stub of fit testing"""
This module contains tests of code from the file named
`../forecastonishing/selection/on_the_fly_selector.py`.
@author: Nikolay Lysenko
"""
import unittest
import numpy as np
import pandas as pd
from forecastonishing.selection.on_the_fly_selector import OnTheFlySelector
from for... | <commit_before><commit_msg>test: Create stub of fit testing<commit_after>"""
This module contains tests of code from the file named
`../forecastonishing/selection/on_the_fly_selector.py`.
@author: Nikolay Lysenko
"""
import unittest
import numpy as np
import pandas as pd
from forecastonishing.selection.on_the_fly_... | |
a346eb2b19f3a0b72dc6565e9d0c4fabf3c5784a | migrations/versions/0014_add_template_version.py | migrations/versions/0014_add_template_version.py | """empty message
Revision ID: 0014_add_template_version
Revises: 0013_add_loadtest_client
Create Date: 2016-05-11 16:00:51.478012
"""
# revision identifiers, used by Alembic.
revision = '0014_add_template_version'
down_revision = '0013_add_loadtest_client'
from alembic import op
import sqlalchemy as sa
from sqlalch... | """empty message
Revision ID: 0014_add_template_version
Revises: 0013_add_loadtest_client
Create Date: 2016-05-11 16:00:51.478012
"""
# revision identifiers, used by Alembic.
revision = '0014_add_template_version'
down_revision = '0013_add_loadtest_client'
from alembic import op
import sqlalchemy as sa
from sqlalch... | Add a update query to fix templates_history where the created_by_id is missing. | Add a update query to fix templates_history where the created_by_id is missing.
| Python | mit | alphagov/notifications-api,alphagov/notifications-api | """empty message
Revision ID: 0014_add_template_version
Revises: 0013_add_loadtest_client
Create Date: 2016-05-11 16:00:51.478012
"""
# revision identifiers, used by Alembic.
revision = '0014_add_template_version'
down_revision = '0013_add_loadtest_client'
from alembic import op
import sqlalchemy as sa
from sqlalch... | """empty message
Revision ID: 0014_add_template_version
Revises: 0013_add_loadtest_client
Create Date: 2016-05-11 16:00:51.478012
"""
# revision identifiers, used by Alembic.
revision = '0014_add_template_version'
down_revision = '0013_add_loadtest_client'
from alembic import op
import sqlalchemy as sa
from sqlalch... | <commit_before>"""empty message
Revision ID: 0014_add_template_version
Revises: 0013_add_loadtest_client
Create Date: 2016-05-11 16:00:51.478012
"""
# revision identifiers, used by Alembic.
revision = '0014_add_template_version'
down_revision = '0013_add_loadtest_client'
from alembic import op
import sqlalchemy as ... | """empty message
Revision ID: 0014_add_template_version
Revises: 0013_add_loadtest_client
Create Date: 2016-05-11 16:00:51.478012
"""
# revision identifiers, used by Alembic.
revision = '0014_add_template_version'
down_revision = '0013_add_loadtest_client'
from alembic import op
import sqlalchemy as sa
from sqlalch... | """empty message
Revision ID: 0014_add_template_version
Revises: 0013_add_loadtest_client
Create Date: 2016-05-11 16:00:51.478012
"""
# revision identifiers, used by Alembic.
revision = '0014_add_template_version'
down_revision = '0013_add_loadtest_client'
from alembic import op
import sqlalchemy as sa
from sqlalch... | <commit_before>"""empty message
Revision ID: 0014_add_template_version
Revises: 0013_add_loadtest_client
Create Date: 2016-05-11 16:00:51.478012
"""
# revision identifiers, used by Alembic.
revision = '0014_add_template_version'
down_revision = '0013_add_loadtest_client'
from alembic import op
import sqlalchemy as ... |
e7fad19d22d90a4fe04d7e9c064b386686600938 | plugins/FileHandlers/STLWriter/__init__.py | plugins/FileHandlers/STLWriter/__init__.py | # Copyright (c) 2015 Ultimaker B.V.
# Uranium is released under the terms of the AGPLv3 or higher.
from . import STLWriter
from UM.i18n import i18nCatalog
i18n_catalog = i18nCatalog("uranium")
def getMetaData():
return {
"type": "mesh_writer",
"plugin": {
"name": "STL Writer",
... | # Copyright (c) 2015 Ultimaker B.V.
# Uranium is released under the terms of the AGPLv3 or higher.
from . import STLWriter
from UM.i18n import i18nCatalog
i18n_catalog = i18nCatalog("uranium")
def getMetaData():
return {
"type": "mesh_writer",
"plugin": {
"name": "STL Writer",
... | Fix STL Writer to properly advertise itself as mesh writer | Fix STL Writer to properly advertise itself as mesh writer
This makes the STL writer show up correctly
| Python | agpl-3.0 | onitake/Uranium,onitake/Uranium | # Copyright (c) 2015 Ultimaker B.V.
# Uranium is released under the terms of the AGPLv3 or higher.
from . import STLWriter
from UM.i18n import i18nCatalog
i18n_catalog = i18nCatalog("uranium")
def getMetaData():
return {
"type": "mesh_writer",
"plugin": {
"name": "STL Writer",
... | # Copyright (c) 2015 Ultimaker B.V.
# Uranium is released under the terms of the AGPLv3 or higher.
from . import STLWriter
from UM.i18n import i18nCatalog
i18n_catalog = i18nCatalog("uranium")
def getMetaData():
return {
"type": "mesh_writer",
"plugin": {
"name": "STL Writer",
... | <commit_before># Copyright (c) 2015 Ultimaker B.V.
# Uranium is released under the terms of the AGPLv3 or higher.
from . import STLWriter
from UM.i18n import i18nCatalog
i18n_catalog = i18nCatalog("uranium")
def getMetaData():
return {
"type": "mesh_writer",
"plugin": {
"name": "STL W... | # Copyright (c) 2015 Ultimaker B.V.
# Uranium is released under the terms of the AGPLv3 or higher.
from . import STLWriter
from UM.i18n import i18nCatalog
i18n_catalog = i18nCatalog("uranium")
def getMetaData():
return {
"type": "mesh_writer",
"plugin": {
"name": "STL Writer",
... | # Copyright (c) 2015 Ultimaker B.V.
# Uranium is released under the terms of the AGPLv3 or higher.
from . import STLWriter
from UM.i18n import i18nCatalog
i18n_catalog = i18nCatalog("uranium")
def getMetaData():
return {
"type": "mesh_writer",
"plugin": {
"name": "STL Writer",
... | <commit_before># Copyright (c) 2015 Ultimaker B.V.
# Uranium is released under the terms of the AGPLv3 or higher.
from . import STLWriter
from UM.i18n import i18nCatalog
i18n_catalog = i18nCatalog("uranium")
def getMetaData():
return {
"type": "mesh_writer",
"plugin": {
"name": "STL W... |
587e22c86f8f811f94e1172a1f6cd60f3b0899de | src/keybar/core/auth.py | src/keybar/core/auth.py | from rest_framework_httpsignature.authentication import SignatureAuthentication
from keybar.models.user import User
class KeybarApiSignatureAuthentication(SignatureAuthentication):
API_KEY_HEADER = 'X-Api-Key'
def fetch_user_data(self, api_key):
try:
user = User.objects.get(api_key=api_k... | from rest_framework_httpsignature.authentication import SignatureAuthentication
from keybar.models.user import User
class KeybarApiSignatureAuthentication(SignatureAuthentication):
API_KEY_HEADER = 'X-Api-Key'
def fetch_user_data(self, api_key):
try:
user = User.objects.get(api_key=api_k... | Fix return value in case user was not found | Fix return value in case user was not found
| Python | bsd-3-clause | keybar/keybar | from rest_framework_httpsignature.authentication import SignatureAuthentication
from keybar.models.user import User
class KeybarApiSignatureAuthentication(SignatureAuthentication):
API_KEY_HEADER = 'X-Api-Key'
def fetch_user_data(self, api_key):
try:
user = User.objects.get(api_key=api_k... | from rest_framework_httpsignature.authentication import SignatureAuthentication
from keybar.models.user import User
class KeybarApiSignatureAuthentication(SignatureAuthentication):
API_KEY_HEADER = 'X-Api-Key'
def fetch_user_data(self, api_key):
try:
user = User.objects.get(api_key=api_k... | <commit_before>from rest_framework_httpsignature.authentication import SignatureAuthentication
from keybar.models.user import User
class KeybarApiSignatureAuthentication(SignatureAuthentication):
API_KEY_HEADER = 'X-Api-Key'
def fetch_user_data(self, api_key):
try:
user = User.objects.ge... | from rest_framework_httpsignature.authentication import SignatureAuthentication
from keybar.models.user import User
class KeybarApiSignatureAuthentication(SignatureAuthentication):
API_KEY_HEADER = 'X-Api-Key'
def fetch_user_data(self, api_key):
try:
user = User.objects.get(api_key=api_k... | from rest_framework_httpsignature.authentication import SignatureAuthentication
from keybar.models.user import User
class KeybarApiSignatureAuthentication(SignatureAuthentication):
API_KEY_HEADER = 'X-Api-Key'
def fetch_user_data(self, api_key):
try:
user = User.objects.get(api_key=api_k... | <commit_before>from rest_framework_httpsignature.authentication import SignatureAuthentication
from keybar.models.user import User
class KeybarApiSignatureAuthentication(SignatureAuthentication):
API_KEY_HEADER = 'X-Api-Key'
def fetch_user_data(self, api_key):
try:
user = User.objects.ge... |
64010f5151c03cbc99ff702b825f0e2ad4b96692 | product_configurator_mrp/models/product.py | product_configurator_mrp/models/product.py | # -*- coding: utf-8 -*-
from odoo import models, api
class ProductTemplate(models.Model):
_inherit = 'product.template'
@api.multi
def create_variant(self, value_ids, custom_values=None):
"""Add bill of matrials to the configured variant."""
if custom_values is None:
custom_v... | # -*- coding: utf-8 -*-
from odoo import models, api
class ProductTemplate(models.Model):
_inherit = 'product.template'
@api.multi
def create_get_variant(self, value_ids, custom_values=None):
"""Add bill of matrials to the configured variant."""
if custom_values is None:
cust... | Fix creation of BOM when create Variant | Fix creation of BOM when create Variant
| Python | agpl-3.0 | richard-willdooit/odoo-product-configurator,microcom/odoo-product-configurator,richard-willdooit/odoo-product-configurator,microcom/odoo-product-configurator,richard-willdooit/odoo-product-configurator,microcom/odoo-product-configurator | # -*- coding: utf-8 -*-
from odoo import models, api
class ProductTemplate(models.Model):
_inherit = 'product.template'
@api.multi
def create_variant(self, value_ids, custom_values=None):
"""Add bill of matrials to the configured variant."""
if custom_values is None:
custom_v... | # -*- coding: utf-8 -*-
from odoo import models, api
class ProductTemplate(models.Model):
_inherit = 'product.template'
@api.multi
def create_get_variant(self, value_ids, custom_values=None):
"""Add bill of matrials to the configured variant."""
if custom_values is None:
cust... | <commit_before># -*- coding: utf-8 -*-
from odoo import models, api
class ProductTemplate(models.Model):
_inherit = 'product.template'
@api.multi
def create_variant(self, value_ids, custom_values=None):
"""Add bill of matrials to the configured variant."""
if custom_values is None:
... | # -*- coding: utf-8 -*-
from odoo import models, api
class ProductTemplate(models.Model):
_inherit = 'product.template'
@api.multi
def create_get_variant(self, value_ids, custom_values=None):
"""Add bill of matrials to the configured variant."""
if custom_values is None:
cust... | # -*- coding: utf-8 -*-
from odoo import models, api
class ProductTemplate(models.Model):
_inherit = 'product.template'
@api.multi
def create_variant(self, value_ids, custom_values=None):
"""Add bill of matrials to the configured variant."""
if custom_values is None:
custom_v... | <commit_before># -*- coding: utf-8 -*-
from odoo import models, api
class ProductTemplate(models.Model):
_inherit = 'product.template'
@api.multi
def create_variant(self, value_ids, custom_values=None):
"""Add bill of matrials to the configured variant."""
if custom_values is None:
... |
af17bc003e486f27d9801ae56bb2e91c4fe6abc0 | config.py | config.py | from os import getenv
class Config(object):
DEBUG = False
TESTING = False
SQLALCHEMY_DATABASE_URI = getenv('DATABASE_URL')
STRIP_WWW_PREFIX = True
API_KEY = getenv('API_KEY')
class ProductionConfig(Config):
DEBUG = False
class DevelopmentConfig(Config):
DEBUG = True
SQLALCHEMY_DATABAS... | from os import getenv
class Config(object):
DEBUG = False
TESTING = False
SQLALCHEMY_DATABASE_URI = getenv('DATABASE_URL', 'sqlite:///app.db')
STRIP_WWW_PREFIX = True
API_KEY = getenv('API_KEY')
class ProductionConfig(Config):
DEBUG = False
class DevelopmentConfig(Config):
DEBUG = True
c... | Allow overriding the DATABASE_URL with an environment varible if in development mode | Allow overriding the DATABASE_URL with an environment varible if in development mode
| Python | mit | taeram/idiocy,taeram/idiocy,taeram/idiocy | from os import getenv
class Config(object):
DEBUG = False
TESTING = False
SQLALCHEMY_DATABASE_URI = getenv('DATABASE_URL')
STRIP_WWW_PREFIX = True
API_KEY = getenv('API_KEY')
class ProductionConfig(Config):
DEBUG = False
class DevelopmentConfig(Config):
DEBUG = True
SQLALCHEMY_DATABAS... | from os import getenv
class Config(object):
DEBUG = False
TESTING = False
SQLALCHEMY_DATABASE_URI = getenv('DATABASE_URL', 'sqlite:///app.db')
STRIP_WWW_PREFIX = True
API_KEY = getenv('API_KEY')
class ProductionConfig(Config):
DEBUG = False
class DevelopmentConfig(Config):
DEBUG = True
c... | <commit_before>from os import getenv
class Config(object):
DEBUG = False
TESTING = False
SQLALCHEMY_DATABASE_URI = getenv('DATABASE_URL')
STRIP_WWW_PREFIX = True
API_KEY = getenv('API_KEY')
class ProductionConfig(Config):
DEBUG = False
class DevelopmentConfig(Config):
DEBUG = True
SQL... | from os import getenv
class Config(object):
DEBUG = False
TESTING = False
SQLALCHEMY_DATABASE_URI = getenv('DATABASE_URL', 'sqlite:///app.db')
STRIP_WWW_PREFIX = True
API_KEY = getenv('API_KEY')
class ProductionConfig(Config):
DEBUG = False
class DevelopmentConfig(Config):
DEBUG = True
c... | from os import getenv
class Config(object):
DEBUG = False
TESTING = False
SQLALCHEMY_DATABASE_URI = getenv('DATABASE_URL')
STRIP_WWW_PREFIX = True
API_KEY = getenv('API_KEY')
class ProductionConfig(Config):
DEBUG = False
class DevelopmentConfig(Config):
DEBUG = True
SQLALCHEMY_DATABAS... | <commit_before>from os import getenv
class Config(object):
DEBUG = False
TESTING = False
SQLALCHEMY_DATABASE_URI = getenv('DATABASE_URL')
STRIP_WWW_PREFIX = True
API_KEY = getenv('API_KEY')
class ProductionConfig(Config):
DEBUG = False
class DevelopmentConfig(Config):
DEBUG = True
SQL... |
df000e724ce1f307a478fcf4790404183df13610 | _setup_database.py | _setup_database.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from setup.create_teams import migrate_teams
from setup.create_divisions import create_divisions
if __name__ == '__main__':
# migrating teams from json file to database
migrate_teams(simulation=True)
# creating divisions from division configuration file
c... | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from setup.create_teams import migrate_teams
from setup.create_divisions import create_divisions
from setup.create_players import migrate_players
if __name__ == '__main__':
# migrating teams from json file to database
migrate_teams(simulation=True)
# creating... | Include player data migration in setup | Include player data migration in setup
| Python | mit | leaffan/pynhldb | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from setup.create_teams import migrate_teams
from setup.create_divisions import create_divisions
if __name__ == '__main__':
# migrating teams from json file to database
migrate_teams(simulation=True)
# creating divisions from division configuration file
c... | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from setup.create_teams import migrate_teams
from setup.create_divisions import create_divisions
from setup.create_players import migrate_players
if __name__ == '__main__':
# migrating teams from json file to database
migrate_teams(simulation=True)
# creating... | <commit_before>#!/usr/bin/env python
# -*- coding: utf-8 -*-
from setup.create_teams import migrate_teams
from setup.create_divisions import create_divisions
if __name__ == '__main__':
# migrating teams from json file to database
migrate_teams(simulation=True)
# creating divisions from division configura... | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from setup.create_teams import migrate_teams
from setup.create_divisions import create_divisions
from setup.create_players import migrate_players
if __name__ == '__main__':
# migrating teams from json file to database
migrate_teams(simulation=True)
# creating... | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from setup.create_teams import migrate_teams
from setup.create_divisions import create_divisions
if __name__ == '__main__':
# migrating teams from json file to database
migrate_teams(simulation=True)
# creating divisions from division configuration file
c... | <commit_before>#!/usr/bin/env python
# -*- coding: utf-8 -*-
from setup.create_teams import migrate_teams
from setup.create_divisions import create_divisions
if __name__ == '__main__':
# migrating teams from json file to database
migrate_teams(simulation=True)
# creating divisions from division configura... |
c0d9a94899af84e8a075cfc7cfb054a934470e3a | static_precompiler/tests/test_templatetags.py | static_precompiler/tests/test_templatetags.py | import django.template
import django.template.loader
import pretend
def test_compile_filter(monkeypatch):
compile_static = pretend.call_recorder(lambda source_path: "compiled")
monkeypatch.setattr("static_precompiler.utils.compile_static", compile_static)
template = django.template.loader.get_template_fr... | import django.template
import pretend
def test_compile_filter(monkeypatch):
compile_static = pretend.call_recorder(lambda source_path: "compiled")
monkeypatch.setattr("static_precompiler.utils.compile_static", compile_static)
template = django.template.Template("""{% load compile_static %}{{ "source"|com... | Fix tests for Django 1.8 | Fix tests for Django 1.8
| Python | mit | liumengjun/django-static-precompiler,liumengjun/django-static-precompiler,liumengjun/django-static-precompiler,liumengjun/django-static-precompiler,jaheba/django-static-precompiler,liumengjun/django-static-precompiler,jaheba/django-static-precompiler,jaheba/django-static-precompiler,jaheba/django-static-precompiler | import django.template
import django.template.loader
import pretend
def test_compile_filter(monkeypatch):
compile_static = pretend.call_recorder(lambda source_path: "compiled")
monkeypatch.setattr("static_precompiler.utils.compile_static", compile_static)
template = django.template.loader.get_template_fr... | import django.template
import pretend
def test_compile_filter(monkeypatch):
compile_static = pretend.call_recorder(lambda source_path: "compiled")
monkeypatch.setattr("static_precompiler.utils.compile_static", compile_static)
template = django.template.Template("""{% load compile_static %}{{ "source"|com... | <commit_before>import django.template
import django.template.loader
import pretend
def test_compile_filter(monkeypatch):
compile_static = pretend.call_recorder(lambda source_path: "compiled")
monkeypatch.setattr("static_precompiler.utils.compile_static", compile_static)
template = django.template.loader.... | import django.template
import pretend
def test_compile_filter(monkeypatch):
compile_static = pretend.call_recorder(lambda source_path: "compiled")
monkeypatch.setattr("static_precompiler.utils.compile_static", compile_static)
template = django.template.Template("""{% load compile_static %}{{ "source"|com... | import django.template
import django.template.loader
import pretend
def test_compile_filter(monkeypatch):
compile_static = pretend.call_recorder(lambda source_path: "compiled")
monkeypatch.setattr("static_precompiler.utils.compile_static", compile_static)
template = django.template.loader.get_template_fr... | <commit_before>import django.template
import django.template.loader
import pretend
def test_compile_filter(monkeypatch):
compile_static = pretend.call_recorder(lambda source_path: "compiled")
monkeypatch.setattr("static_precompiler.utils.compile_static", compile_static)
template = django.template.loader.... |
eaa4de2ecbcf29c9e56ebf2fa69099055e469fbc | tests/test_conversion.py | tests/test_conversion.py | from asciisciit import conversions as conv
import numpy as np
def test_lookup_method_equivalency():
img = np.random.randint(0, 255, (300,300), dtype=np.uint8)
pil_ascii = conv.apply_lut_pil(img)
np_ascii = conv.apply_lut_numpy(img)
assert(pil_ascii == np_ascii)
pil_ascii = conv.apply_lut_pil(img... | import itertools
from asciisciit import conversions as conv
import numpy as np
import pytest
@pytest.mark.parametrize("invert,equalize,lut,lookup_func",
itertools.product((True, False),
(True, False),
("simp... | Add tests to minimally exercise basic conversion functionality | Add tests to minimally exercise basic conversion functionality
| Python | mit | derricw/asciisciit | from asciisciit import conversions as conv
import numpy as np
def test_lookup_method_equivalency():
img = np.random.randint(0, 255, (300,300), dtype=np.uint8)
pil_ascii = conv.apply_lut_pil(img)
np_ascii = conv.apply_lut_numpy(img)
assert(pil_ascii == np_ascii)
pil_ascii = conv.apply_lut_pil(img... | import itertools
from asciisciit import conversions as conv
import numpy as np
import pytest
@pytest.mark.parametrize("invert,equalize,lut,lookup_func",
itertools.product((True, False),
(True, False),
("simp... | <commit_before>from asciisciit import conversions as conv
import numpy as np
def test_lookup_method_equivalency():
img = np.random.randint(0, 255, (300,300), dtype=np.uint8)
pil_ascii = conv.apply_lut_pil(img)
np_ascii = conv.apply_lut_numpy(img)
assert(pil_ascii == np_ascii)
pil_ascii = conv.ap... | import itertools
from asciisciit import conversions as conv
import numpy as np
import pytest
@pytest.mark.parametrize("invert,equalize,lut,lookup_func",
itertools.product((True, False),
(True, False),
("simp... | from asciisciit import conversions as conv
import numpy as np
def test_lookup_method_equivalency():
img = np.random.randint(0, 255, (300,300), dtype=np.uint8)
pil_ascii = conv.apply_lut_pil(img)
np_ascii = conv.apply_lut_numpy(img)
assert(pil_ascii == np_ascii)
pil_ascii = conv.apply_lut_pil(img... | <commit_before>from asciisciit import conversions as conv
import numpy as np
def test_lookup_method_equivalency():
img = np.random.randint(0, 255, (300,300), dtype=np.uint8)
pil_ascii = conv.apply_lut_pil(img)
np_ascii = conv.apply_lut_numpy(img)
assert(pil_ascii == np_ascii)
pil_ascii = conv.ap... |
a0420b066e0a5064ebe0944a16348debf107a9a4 | speech.py | speech.py | """Export long monologues for Nao.
Functions:
introduction -- Make Nao introduce itself.
"""
import time
from say import say
def introduction(tts):
"""Make Nao introduce itself.
Keyword arguments:
tts - Nao proxy.
"""
say("Hello world!", tts)
say("Computer Science is one of the coolest subj... | """Export long monologues for Nao.
Functions:
introduction -- Make Nao introduce itself.
"""
import time
from say import say
def introduction(tts):
"""Make Nao introduce itself.
Keyword arguments:
tts - Nao proxy.
"""
say("Hello world!", tts)
say("I'm Leyva and I will teach you how to progr... | Make Nao say its name and the programming language | Make Nao say its name and the programming language
| Python | mit | AliGhahraei/nao-classroom | """Export long monologues for Nao.
Functions:
introduction -- Make Nao introduce itself.
"""
import time
from say import say
def introduction(tts):
"""Make Nao introduce itself.
Keyword arguments:
tts - Nao proxy.
"""
say("Hello world!", tts)
say("Computer Science is one of the coolest subj... | """Export long monologues for Nao.
Functions:
introduction -- Make Nao introduce itself.
"""
import time
from say import say
def introduction(tts):
"""Make Nao introduce itself.
Keyword arguments:
tts - Nao proxy.
"""
say("Hello world!", tts)
say("I'm Leyva and I will teach you how to progr... | <commit_before>"""Export long monologues for Nao.
Functions:
introduction -- Make Nao introduce itself.
"""
import time
from say import say
def introduction(tts):
"""Make Nao introduce itself.
Keyword arguments:
tts - Nao proxy.
"""
say("Hello world!", tts)
say("Computer Science is one of t... | """Export long monologues for Nao.
Functions:
introduction -- Make Nao introduce itself.
"""
import time
from say import say
def introduction(tts):
"""Make Nao introduce itself.
Keyword arguments:
tts - Nao proxy.
"""
say("Hello world!", tts)
say("I'm Leyva and I will teach you how to progr... | """Export long monologues for Nao.
Functions:
introduction -- Make Nao introduce itself.
"""
import time
from say import say
def introduction(tts):
"""Make Nao introduce itself.
Keyword arguments:
tts - Nao proxy.
"""
say("Hello world!", tts)
say("Computer Science is one of the coolest subj... | <commit_before>"""Export long monologues for Nao.
Functions:
introduction -- Make Nao introduce itself.
"""
import time
from say import say
def introduction(tts):
"""Make Nao introduce itself.
Keyword arguments:
tts - Nao proxy.
"""
say("Hello world!", tts)
say("Computer Science is one of t... |
40122e169e6a887caa6371a0ff3029c35ce265d5 | third_party/node/node.py | third_party/node/node.py | #!/usr/bin/env vpython
# Copyright 2017 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 os import path as os_path
import platform
import subprocess
import sys
import os
def GetBinaryPath():
return os_path.join(
... | #!/usr/bin/env vpython
# Copyright 2017 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 os import path as os_path
import platform
import subprocess
import sys
import os
def GetBinaryPath():
return os_path.join(
... | Fix line ending printing on Python 3 | Fix line ending printing on Python 3
To reflect the changes in
https://chromium-review.googlesource.com/c/chromium/src/+/2896248/8/third_party/node/node.py
R=993fcadce4d04090da2fefd557a0995e7966c8d5@chromium.org
Bug: none
Change-Id: I25ba29042f537bfef57fba93115be2c194649864
Reviewed-on: https://chromium-review.googl... | Python | bsd-3-clause | ChromeDevTools/devtools-frontend,ChromeDevTools/devtools-frontend,ChromeDevTools/devtools-frontend,ChromeDevTools/devtools-frontend,ChromeDevTools/devtools-frontend,ChromeDevTools/devtools-frontend | #!/usr/bin/env vpython
# Copyright 2017 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 os import path as os_path
import platform
import subprocess
import sys
import os
def GetBinaryPath():
return os_path.join(
... | #!/usr/bin/env vpython
# Copyright 2017 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 os import path as os_path
import platform
import subprocess
import sys
import os
def GetBinaryPath():
return os_path.join(
... | <commit_before>#!/usr/bin/env vpython
# Copyright 2017 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 os import path as os_path
import platform
import subprocess
import sys
import os
def GetBinaryPath():
return... | #!/usr/bin/env vpython
# Copyright 2017 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 os import path as os_path
import platform
import subprocess
import sys
import os
def GetBinaryPath():
return os_path.join(
... | #!/usr/bin/env vpython
# Copyright 2017 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 os import path as os_path
import platform
import subprocess
import sys
import os
def GetBinaryPath():
return os_path.join(
... | <commit_before>#!/usr/bin/env vpython
# Copyright 2017 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 os import path as os_path
import platform
import subprocess
import sys
import os
def GetBinaryPath():
return... |
91b0bcad27f12c29681235079960ee272275e0bd | src/main/python/dlfa/solvers/__init__.py | src/main/python/dlfa/solvers/__init__.py | from .nn_solver import NNSolver
from .lstm_solver import LSTMSolver
from .tree_lstm_solver import TreeLSTMSolver
from .memory_network import MemoryNetworkSolver
from .differentiable_search import DifferentiableSearchSolver
concrete_solvers = { # pylint: disable=invalid-name
'LSTMSolver': LSTMSolver,
'... | from .nn_solver import NNSolver
from .lstm_solver import LSTMSolver
from .tree_lstm_solver import TreeLSTMSolver
from .memory_network import MemoryNetworkSolver
from .differentiable_search import DifferentiableSearchSolver
from .multiple_choice_memory_network import MultipleChoiceMemoryNetworkSolver
concrete_solvers =... | Add MCMemoryNetwork as a usable solver | Add MCMemoryNetwork as a usable solver
| Python | apache-2.0 | allenai/deep_qa,matt-gardner/deep_qa,DeNeutoy/deep_qa,allenai/deep_qa,DeNeutoy/deep_qa,matt-gardner/deep_qa | from .nn_solver import NNSolver
from .lstm_solver import LSTMSolver
from .tree_lstm_solver import TreeLSTMSolver
from .memory_network import MemoryNetworkSolver
from .differentiable_search import DifferentiableSearchSolver
concrete_solvers = { # pylint: disable=invalid-name
'LSTMSolver': LSTMSolver,
'... | from .nn_solver import NNSolver
from .lstm_solver import LSTMSolver
from .tree_lstm_solver import TreeLSTMSolver
from .memory_network import MemoryNetworkSolver
from .differentiable_search import DifferentiableSearchSolver
from .multiple_choice_memory_network import MultipleChoiceMemoryNetworkSolver
concrete_solvers =... | <commit_before>from .nn_solver import NNSolver
from .lstm_solver import LSTMSolver
from .tree_lstm_solver import TreeLSTMSolver
from .memory_network import MemoryNetworkSolver
from .differentiable_search import DifferentiableSearchSolver
concrete_solvers = { # pylint: disable=invalid-name
'LSTMSolver': LSTMSo... | from .nn_solver import NNSolver
from .lstm_solver import LSTMSolver
from .tree_lstm_solver import TreeLSTMSolver
from .memory_network import MemoryNetworkSolver
from .differentiable_search import DifferentiableSearchSolver
from .multiple_choice_memory_network import MultipleChoiceMemoryNetworkSolver
concrete_solvers =... | from .nn_solver import NNSolver
from .lstm_solver import LSTMSolver
from .tree_lstm_solver import TreeLSTMSolver
from .memory_network import MemoryNetworkSolver
from .differentiable_search import DifferentiableSearchSolver
concrete_solvers = { # pylint: disable=invalid-name
'LSTMSolver': LSTMSolver,
'... | <commit_before>from .nn_solver import NNSolver
from .lstm_solver import LSTMSolver
from .tree_lstm_solver import TreeLSTMSolver
from .memory_network import MemoryNetworkSolver
from .differentiable_search import DifferentiableSearchSolver
concrete_solvers = { # pylint: disable=invalid-name
'LSTMSolver': LSTMSo... |
0fd6a6e3281bc49addd1131ae30b1985b9da30f9 | tests/benchmark/plugins/clear_buffer_cache.py | tests/benchmark/plugins/clear_buffer_cache.py | #!/usr/bin/env python
# Copyright (c) 2012 Cloudera, Inc. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless requir... | #!/usr/bin/env python
# Copyright (c) 2012 Cloudera, Inc. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless requir... | Update clear buffer cache plugin to only flush page cache. | Update clear buffer cache plugin to only flush page cache.
More detail: http://linux-mm.org/Drop_Caches
Change-Id: I7fa675ccdc81f375d88e9cfab330fca3bc983ec8
Reviewed-on: http://gerrit.ent.cloudera.com:8080/1157
Reviewed-by: Alex Behm <fe1626037acfc2dc542d2aa723a6d14f2464a20c@cloudera.com>
Reviewed-by: Lenni Kuff <724... | Python | apache-2.0 | brightchen/Impala,rampage644/impala-cut,brightchen/Impala,XiaominZhang/Impala,caseyching/Impala,cgvarela/Impala,ImpalaToGo/ImpalaToGo,caseyching/Impala,tempbottle/Impala,cchanning/Impala,scalingdata/Impala,tempbottle/Impala,AtScaleInc/Impala,scalingdata/Impala,gistic/PublicSpatialImpala,rampage644/impala-cut,bowlofstew... | #!/usr/bin/env python
# Copyright (c) 2012 Cloudera, Inc. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless requir... | #!/usr/bin/env python
# Copyright (c) 2012 Cloudera, Inc. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless requir... | <commit_before>#!/usr/bin/env python
# Copyright (c) 2012 Cloudera, Inc. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
... | #!/usr/bin/env python
# Copyright (c) 2012 Cloudera, Inc. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless requir... | #!/usr/bin/env python
# Copyright (c) 2012 Cloudera, Inc. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless requir... | <commit_before>#!/usr/bin/env python
# Copyright (c) 2012 Cloudera, Inc. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
... |
385879b90d3aaa7452931108c999cbbc5e41a1b2 | pyhmsa/gui/util/human.py | pyhmsa/gui/util/human.py | """
Convert code to human readable text
"""
# Standard library modules.
import re
# Third party modules.
# Local modules.
# Globals and constants variables.
_CAMELCASE_TO_WORDS_PATTERN = re.compile('([A-Z][a-z0-9]*)')
def camelcase_to_words(text):
words = _CAMELCASE_TO_WORDS_PATTERN.split(text)
return [wor... | """
Convert code to human readable text
"""
# Standard library modules.
import re
# Third party modules.
# Local modules.
# Globals and constants variables.
_CAMELCASE_TO_WORDS_PATTERN = re.compile('([A-Z][a-z0-9]*)')
def camelcase_to_words(text):
words = _CAMELCASE_TO_WORDS_PATTERN.split(text)
return tupl... | Return tuple instead of list. | Return tuple instead of list. | Python | mit | pyhmsa/pyhmsa-gui | """
Convert code to human readable text
"""
# Standard library modules.
import re
# Third party modules.
# Local modules.
# Globals and constants variables.
_CAMELCASE_TO_WORDS_PATTERN = re.compile('([A-Z][a-z0-9]*)')
def camelcase_to_words(text):
words = _CAMELCASE_TO_WORDS_PATTERN.split(text)
return [wor... | """
Convert code to human readable text
"""
# Standard library modules.
import re
# Third party modules.
# Local modules.
# Globals and constants variables.
_CAMELCASE_TO_WORDS_PATTERN = re.compile('([A-Z][a-z0-9]*)')
def camelcase_to_words(text):
words = _CAMELCASE_TO_WORDS_PATTERN.split(text)
return tupl... | <commit_before>"""
Convert code to human readable text
"""
# Standard library modules.
import re
# Third party modules.
# Local modules.
# Globals and constants variables.
_CAMELCASE_TO_WORDS_PATTERN = re.compile('([A-Z][a-z0-9]*)')
def camelcase_to_words(text):
words = _CAMELCASE_TO_WORDS_PATTERN.split(text)
... | """
Convert code to human readable text
"""
# Standard library modules.
import re
# Third party modules.
# Local modules.
# Globals and constants variables.
_CAMELCASE_TO_WORDS_PATTERN = re.compile('([A-Z][a-z0-9]*)')
def camelcase_to_words(text):
words = _CAMELCASE_TO_WORDS_PATTERN.split(text)
return tupl... | """
Convert code to human readable text
"""
# Standard library modules.
import re
# Third party modules.
# Local modules.
# Globals and constants variables.
_CAMELCASE_TO_WORDS_PATTERN = re.compile('([A-Z][a-z0-9]*)')
def camelcase_to_words(text):
words = _CAMELCASE_TO_WORDS_PATTERN.split(text)
return [wor... | <commit_before>"""
Convert code to human readable text
"""
# Standard library modules.
import re
# Third party modules.
# Local modules.
# Globals and constants variables.
_CAMELCASE_TO_WORDS_PATTERN = re.compile('([A-Z][a-z0-9]*)')
def camelcase_to_words(text):
words = _CAMELCASE_TO_WORDS_PATTERN.split(text)
... |
b94458b5dc184798580ade159ace700a46ab5877 | enigma.py | enigma.py | import string
class Steckerbrett:
def __init__(self):
pass
class Umkehrwalze:
def __init__(self, wiring):
self.wiring = wiring
def encode(self, letter):
return self.wiring[string.ascii_uppercase.index(letter)]
class Walzen:
def __init__(self):
pass
class Enigma:
... | import string
class Steckerbrett:
def __init__(self):
pass
class Umkehrwalze:
def __init__(self, wiring):
self.wiring = wiring
def encode(self, letter):
return self.wiring[string.ascii_uppercase.index(letter)]
class Walzen:
def __init__(self, notch, wiring):
assert... | Initialize rotors with notches and wiring data | Initialize rotors with notches and wiring data
| Python | mit | ranisalt/enigma | import string
class Steckerbrett:
def __init__(self):
pass
class Umkehrwalze:
def __init__(self, wiring):
self.wiring = wiring
def encode(self, letter):
return self.wiring[string.ascii_uppercase.index(letter)]
class Walzen:
def __init__(self):
pass
class Enigma:
... | import string
class Steckerbrett:
def __init__(self):
pass
class Umkehrwalze:
def __init__(self, wiring):
self.wiring = wiring
def encode(self, letter):
return self.wiring[string.ascii_uppercase.index(letter)]
class Walzen:
def __init__(self, notch, wiring):
assert... | <commit_before>import string
class Steckerbrett:
def __init__(self):
pass
class Umkehrwalze:
def __init__(self, wiring):
self.wiring = wiring
def encode(self, letter):
return self.wiring[string.ascii_uppercase.index(letter)]
class Walzen:
def __init__(self):
pass
... | import string
class Steckerbrett:
def __init__(self):
pass
class Umkehrwalze:
def __init__(self, wiring):
self.wiring = wiring
def encode(self, letter):
return self.wiring[string.ascii_uppercase.index(letter)]
class Walzen:
def __init__(self, notch, wiring):
assert... | import string
class Steckerbrett:
def __init__(self):
pass
class Umkehrwalze:
def __init__(self, wiring):
self.wiring = wiring
def encode(self, letter):
return self.wiring[string.ascii_uppercase.index(letter)]
class Walzen:
def __init__(self):
pass
class Enigma:
... | <commit_before>import string
class Steckerbrett:
def __init__(self):
pass
class Umkehrwalze:
def __init__(self, wiring):
self.wiring = wiring
def encode(self, letter):
return self.wiring[string.ascii_uppercase.index(letter)]
class Walzen:
def __init__(self):
pass
... |
e650c319b109ca554c2d66f2d9446ef62440cc0f | anna/model/utils.py | anna/model/utils.py | import tensorflow as tf
def rnn_cell(num_units, dropout, mode, residual=False, name=None, reuse=None):
dropout = dropout if mode == tf.contrib.learn.ModeKeys.TRAIN else 0.0
cell = tf.nn.rnn_cell.GRUCell(num_units, name=name, reuse=reuse)
if dropout > 0.0:
keep_prop = (1.0 - dropout)
cell... | import tensorflow as tf
def rnn_cell(num_units, dropout, mode, residual=False, name=None, reuse=None):
dropout = dropout if mode == tf.estimator.ModeKeys.TRAIN else 0.0
cell = tf.nn.rnn_cell.GRUCell(num_units, name=name, reuse=reuse)
if dropout > 0.0:
keep_prop = (1.0 - dropout)
cell = t... | Fix bug in RNN dropout | Fix bug in RNN dropout
| Python | mit | jpbottaro/anna | import tensorflow as tf
def rnn_cell(num_units, dropout, mode, residual=False, name=None, reuse=None):
dropout = dropout if mode == tf.contrib.learn.ModeKeys.TRAIN else 0.0
cell = tf.nn.rnn_cell.GRUCell(num_units, name=name, reuse=reuse)
if dropout > 0.0:
keep_prop = (1.0 - dropout)
cell... | import tensorflow as tf
def rnn_cell(num_units, dropout, mode, residual=False, name=None, reuse=None):
dropout = dropout if mode == tf.estimator.ModeKeys.TRAIN else 0.0
cell = tf.nn.rnn_cell.GRUCell(num_units, name=name, reuse=reuse)
if dropout > 0.0:
keep_prop = (1.0 - dropout)
cell = t... | <commit_before>import tensorflow as tf
def rnn_cell(num_units, dropout, mode, residual=False, name=None, reuse=None):
dropout = dropout if mode == tf.contrib.learn.ModeKeys.TRAIN else 0.0
cell = tf.nn.rnn_cell.GRUCell(num_units, name=name, reuse=reuse)
if dropout > 0.0:
keep_prop = (1.0 - dropou... | import tensorflow as tf
def rnn_cell(num_units, dropout, mode, residual=False, name=None, reuse=None):
dropout = dropout if mode == tf.estimator.ModeKeys.TRAIN else 0.0
cell = tf.nn.rnn_cell.GRUCell(num_units, name=name, reuse=reuse)
if dropout > 0.0:
keep_prop = (1.0 - dropout)
cell = t... | import tensorflow as tf
def rnn_cell(num_units, dropout, mode, residual=False, name=None, reuse=None):
dropout = dropout if mode == tf.contrib.learn.ModeKeys.TRAIN else 0.0
cell = tf.nn.rnn_cell.GRUCell(num_units, name=name, reuse=reuse)
if dropout > 0.0:
keep_prop = (1.0 - dropout)
cell... | <commit_before>import tensorflow as tf
def rnn_cell(num_units, dropout, mode, residual=False, name=None, reuse=None):
dropout = dropout if mode == tf.contrib.learn.ModeKeys.TRAIN else 0.0
cell = tf.nn.rnn_cell.GRUCell(num_units, name=name, reuse=reuse)
if dropout > 0.0:
keep_prop = (1.0 - dropou... |
7add1c5a43c6bef29613167ca430ad7ff0e26670 | src/ocspdash/web/blueprints/ui.py | src/ocspdash/web/blueprints/ui.py | # -*- coding: utf-8 -*-
import base64
import json
from nacl.encoding import URLSafeBase64Encoder
import nacl.exceptions
import nacl.signing
from flask import Blueprint, abort, current_app, render_template, request
from nacl.signing import VerifyKey
__all__ = [
'ui',
]
ui = Blueprint('ui', __name__)
@ui.route(... | # -*- coding: utf-8 -*-
# import nacl.exceptions
# import nacl.signing
from flask import Blueprint, current_app, render_template
# from nacl.encoding import URLSafeBase64Encoder
# from nacl.signing import VerifyKey
__all__ = [
'ui',
]
ui = Blueprint('ui', __name__)
@ui.route('/')
def home():
"""Show the u... | Remove /submit endpoint from UI blueprint for now | Remove /submit endpoint from UI blueprint for now
| Python | mit | scolby33/OCSPdash,scolby33/OCSPdash,scolby33/OCSPdash | # -*- coding: utf-8 -*-
import base64
import json
from nacl.encoding import URLSafeBase64Encoder
import nacl.exceptions
import nacl.signing
from flask import Blueprint, abort, current_app, render_template, request
from nacl.signing import VerifyKey
__all__ = [
'ui',
]
ui = Blueprint('ui', __name__)
@ui.route(... | # -*- coding: utf-8 -*-
# import nacl.exceptions
# import nacl.signing
from flask import Blueprint, current_app, render_template
# from nacl.encoding import URLSafeBase64Encoder
# from nacl.signing import VerifyKey
__all__ = [
'ui',
]
ui = Blueprint('ui', __name__)
@ui.route('/')
def home():
"""Show the u... | <commit_before># -*- coding: utf-8 -*-
import base64
import json
from nacl.encoding import URLSafeBase64Encoder
import nacl.exceptions
import nacl.signing
from flask import Blueprint, abort, current_app, render_template, request
from nacl.signing import VerifyKey
__all__ = [
'ui',
]
ui = Blueprint('ui', __name_... | # -*- coding: utf-8 -*-
# import nacl.exceptions
# import nacl.signing
from flask import Blueprint, current_app, render_template
# from nacl.encoding import URLSafeBase64Encoder
# from nacl.signing import VerifyKey
__all__ = [
'ui',
]
ui = Blueprint('ui', __name__)
@ui.route('/')
def home():
"""Show the u... | # -*- coding: utf-8 -*-
import base64
import json
from nacl.encoding import URLSafeBase64Encoder
import nacl.exceptions
import nacl.signing
from flask import Blueprint, abort, current_app, render_template, request
from nacl.signing import VerifyKey
__all__ = [
'ui',
]
ui = Blueprint('ui', __name__)
@ui.route(... | <commit_before># -*- coding: utf-8 -*-
import base64
import json
from nacl.encoding import URLSafeBase64Encoder
import nacl.exceptions
import nacl.signing
from flask import Blueprint, abort, current_app, render_template, request
from nacl.signing import VerifyKey
__all__ = [
'ui',
]
ui = Blueprint('ui', __name_... |
d4356b7aa879a345939c1885742efc3deceeb08f | lib/aquilon/__init__.py | lib/aquilon/__init__.py | # -*- cpy-indent-level: 4; indent-tabs-mode: nil -*-
# ex: set expandtab softtabstop=4 shiftwidth=4:
#
# Copyright (C) 2008,2009,2010,2013 Contributor
#
# 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 Li... | # -*- cpy-indent-level: 4; indent-tabs-mode: nil -*-
# ex: set expandtab softtabstop=4 shiftwidth=4:
#
# Copyright (C) 2008,2009,2010,2013 Contributor
#
# 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 Li... | Make aquilon a namespace package | Make aquilon a namespace package
In the future we may want to import the protocols as "from
aquilon.protocols import blah", and that needs both the broker and the
protocols to be marked as namespace packages.
Change-Id: Ib3b712e727b0dd176c231a396bec4e7168a0039e
Reviewed-by: Dave Reeve <6a84ee3ae0690d4584b99406fb30763... | Python | apache-2.0 | guillaume-philippon/aquilon,quattor/aquilon,quattor/aquilon,guillaume-philippon/aquilon,guillaume-philippon/aquilon,quattor/aquilon | # -*- cpy-indent-level: 4; indent-tabs-mode: nil -*-
# ex: set expandtab softtabstop=4 shiftwidth=4:
#
# Copyright (C) 2008,2009,2010,2013 Contributor
#
# 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 Li... | # -*- cpy-indent-level: 4; indent-tabs-mode: nil -*-
# ex: set expandtab softtabstop=4 shiftwidth=4:
#
# Copyright (C) 2008,2009,2010,2013 Contributor
#
# 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 Li... | <commit_before># -*- cpy-indent-level: 4; indent-tabs-mode: nil -*-
# ex: set expandtab softtabstop=4 shiftwidth=4:
#
# Copyright (C) 2008,2009,2010,2013 Contributor
#
# 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... | # -*- cpy-indent-level: 4; indent-tabs-mode: nil -*-
# ex: set expandtab softtabstop=4 shiftwidth=4:
#
# Copyright (C) 2008,2009,2010,2013 Contributor
#
# 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 Li... | # -*- cpy-indent-level: 4; indent-tabs-mode: nil -*-
# ex: set expandtab softtabstop=4 shiftwidth=4:
#
# Copyright (C) 2008,2009,2010,2013 Contributor
#
# 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 Li... | <commit_before># -*- cpy-indent-level: 4; indent-tabs-mode: nil -*-
# ex: set expandtab softtabstop=4 shiftwidth=4:
#
# Copyright (C) 2008,2009,2010,2013 Contributor
#
# 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... |
68e51fd9772aaf4bd382ffe05721e27da6bddde6 | argus/exceptions.py | argus/exceptions.py | # Copyright 2014 Cloudbase Solutions Srl
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless r... | # Copyright 2014 Cloudbase Solutions Srl
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless r... | Add exception for Logic Errors | Add exception for Logic Errors
| Python | apache-2.0 | stefan-caraiman/cloudbase-init-ci,cloudbase/cloudbase-init-ci,micumatei/cloudbase-init-ci | # Copyright 2014 Cloudbase Solutions Srl
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless r... | # Copyright 2014 Cloudbase Solutions Srl
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless r... | <commit_before># Copyright 2014 Cloudbase Solutions Srl
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
... | # Copyright 2014 Cloudbase Solutions Srl
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless r... | # Copyright 2014 Cloudbase Solutions Srl
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless r... | <commit_before># Copyright 2014 Cloudbase Solutions Srl
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
... |
2eb4fcb2d75e6f93f33b1ae41098919f6d4ebc92 | neovim/__init__.py | neovim/__init__.py | from client import Client
from uv_stream import UvStream
__all__ = ['Client', 'UvStream', 'c']
| from client import Client
from uv_stream import UvStream
__all__ = ['connect']
def connect(address, port=None):
client = Client(UvStream(address, port))
client.discover_api()
return client.vim
| Add helper function for connecting with Neovim | Add helper function for connecting with Neovim
| Python | apache-2.0 | fwalch/python-client,Shougo/python-client,bfredl/python-client,brcolow/python-client,starcraftman/python-client,traverseda/python-client,justinmk/python-client,neovim/python-client,meitham/python-client,meitham/python-client,0x90sled/python-client,justinmk/python-client,zchee/python-client,traverseda/python-client,bfre... | from client import Client
from uv_stream import UvStream
__all__ = ['Client', 'UvStream', 'c']
Add helper function for connecting with Neovim | from client import Client
from uv_stream import UvStream
__all__ = ['connect']
def connect(address, port=None):
client = Client(UvStream(address, port))
client.discover_api()
return client.vim
| <commit_before>from client import Client
from uv_stream import UvStream
__all__ = ['Client', 'UvStream', 'c']
<commit_msg>Add helper function for connecting with Neovim<commit_after> | from client import Client
from uv_stream import UvStream
__all__ = ['connect']
def connect(address, port=None):
client = Client(UvStream(address, port))
client.discover_api()
return client.vim
| from client import Client
from uv_stream import UvStream
__all__ = ['Client', 'UvStream', 'c']
Add helper function for connecting with Neovimfrom client import Client
from uv_stream import UvStream
__all__ = ['connect']
def connect(address, port=None):
client = Client(UvStream(address, port))
client.discover... | <commit_before>from client import Client
from uv_stream import UvStream
__all__ = ['Client', 'UvStream', 'c']
<commit_msg>Add helper function for connecting with Neovim<commit_after>from client import Client
from uv_stream import UvStream
__all__ = ['connect']
def connect(address, port=None):
client = Client(UvS... |
f71897270d9a040930bfb41801bf955ea3d0a36e | slave/skia_slave_scripts/android_run_gm.py | slave/skia_slave_scripts/android_run_gm.py | #!/usr/bin/env python
# Copyright (c) 2013 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.
""" Run GM on an Android device. """
from android_build_step import AndroidBuildStep
from build_step import BuildStep
from run_gm ... | #!/usr/bin/env python
# Copyright (c) 2013 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.
""" Run GM on an Android device. """
from android_build_step import AndroidBuildStep
from build_step import BuildStep
from run_gm ... | Increase timeout for GM on Android | Increase timeout for GM on Android
Unreviewed.
(SkipBuildbotRuns)
Review URL: https://codereview.chromium.org/18845002
git-svn-id: 32fc27f4dcfb6c0385cd9719852b95fe6680452d@9906 2bbb7eff-a529-9590-31e7-b0007b416f81
| Python | bsd-3-clause | google/skia-buildbot,Tiger66639/skia-buildbot,google/skia-buildbot,Tiger66639/skia-buildbot,google/skia-buildbot,google/skia-buildbot,Tiger66639/skia-buildbot,google/skia-buildbot,Tiger66639/skia-buildbot,google/skia-buildbot,Tiger66639/skia-buildbot,google/skia-buildbot,Tiger66639/skia-buildbot,google/skia-buildbot,Ti... | #!/usr/bin/env python
# Copyright (c) 2013 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.
""" Run GM on an Android device. """
from android_build_step import AndroidBuildStep
from build_step import BuildStep
from run_gm ... | #!/usr/bin/env python
# Copyright (c) 2013 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.
""" Run GM on an Android device. """
from android_build_step import AndroidBuildStep
from build_step import BuildStep
from run_gm ... | <commit_before>#!/usr/bin/env python
# Copyright (c) 2013 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.
""" Run GM on an Android device. """
from android_build_step import AndroidBuildStep
from build_step import BuildSt... | #!/usr/bin/env python
# Copyright (c) 2013 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.
""" Run GM on an Android device. """
from android_build_step import AndroidBuildStep
from build_step import BuildStep
from run_gm ... | #!/usr/bin/env python
# Copyright (c) 2013 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.
""" Run GM on an Android device. """
from android_build_step import AndroidBuildStep
from build_step import BuildStep
from run_gm ... | <commit_before>#!/usr/bin/env python
# Copyright (c) 2013 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.
""" Run GM on an Android device. """
from android_build_step import AndroidBuildStep
from build_step import BuildSt... |
3e1033637d0bb5dd8856052ffd1667df0ccceb5d | entity.py | entity.py | """This module contains base classes for defining game objects as well
as their individual components and behaviours.
"""
from pygame.sprite import Sprite
class Entity(Sprite):
"""An object within the game.
It contains several Component objects that are used to define how it
is handled graphically and ph... | """This module contains base classes for defining game objects as well
as their individual components and behaviours.
"""
from pygame.sprite import Sprite
class Entity(Sprite):
"""An object within the game.
It contains several Component objects that are used to define how it
is handled graphically and ph... | Remove components as class attribute | Entity: Remove components as class attribute
It is meant to be an instance attribute and should be defined in
init() instead.
| Python | unlicense | MarquisLP/gamehappy | """This module contains base classes for defining game objects as well
as their individual components and behaviours.
"""
from pygame.sprite import Sprite
class Entity(Sprite):
"""An object within the game.
It contains several Component objects that are used to define how it
is handled graphically and ph... | """This module contains base classes for defining game objects as well
as their individual components and behaviours.
"""
from pygame.sprite import Sprite
class Entity(Sprite):
"""An object within the game.
It contains several Component objects that are used to define how it
is handled graphically and ph... | <commit_before>"""This module contains base classes for defining game objects as well
as their individual components and behaviours.
"""
from pygame.sprite import Sprite
class Entity(Sprite):
"""An object within the game.
It contains several Component objects that are used to define how it
is handled gra... | """This module contains base classes for defining game objects as well
as their individual components and behaviours.
"""
from pygame.sprite import Sprite
class Entity(Sprite):
"""An object within the game.
It contains several Component objects that are used to define how it
is handled graphically and ph... | """This module contains base classes for defining game objects as well
as their individual components and behaviours.
"""
from pygame.sprite import Sprite
class Entity(Sprite):
"""An object within the game.
It contains several Component objects that are used to define how it
is handled graphically and ph... | <commit_before>"""This module contains base classes for defining game objects as well
as their individual components and behaviours.
"""
from pygame.sprite import Sprite
class Entity(Sprite):
"""An object within the game.
It contains several Component objects that are used to define how it
is handled gra... |
a2182bf8360b6c13983fc0abb2b058ab0273d54c | tensorflow/python/ops/ragged/__init__.py | tensorflow/python/ops/ragged/__init__.py | # Copyright 2018 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... | # Copyright 2018 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... | Fix broken link to ragged tensor guide | Fix broken link to ragged tensor guide
PiperOrigin-RevId: 368443422
Change-Id: I69818413b7ed8cf2f372580878860a469b9735a8
| Python | apache-2.0 | paolodedios/tensorflow,tensorflow/tensorflow-pywrap_saved_model,paolodedios/tensorflow,frreiss/tensorflow-fred,karllessard/tensorflow,tensorflow/tensorflow-experimental_link_static_libraries_once,Intel-Corporation/tensorflow,tensorflow/tensorflow,tensorflow/tensorflow,tensorflow/tensorflow-pywrap_tf_optimizer,tensorflo... | # Copyright 2018 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... | # Copyright 2018 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... | <commit_before># Copyright 2018 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless requ... | # Copyright 2018 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... | # Copyright 2018 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... | <commit_before># Copyright 2018 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless requ... |
ec91f28dfe4e1f48f7ff92f1fe499944aa366763 | tools/checkdependencies.py | tools/checkdependencies.py | #!/usr/bin/env python
import sys, os
# list of (packagename, filename)
DEPENDENCIES = [
('zlib1g-dev / zlib-devel', '/usr/include/zlib.h'),
('g++ / gcc-c++', '/usr/bin/g++'),
('wget', '/usr/bin/wget'),
('libsqlite3-dev / sqlite-devel', '/usr/include/sqlite3.h'),
]
if os.environ.get('BOOST_INCLUDE', ''):
D... | #!/usr/bin/env python
import sys, os
# list of (packagename, filename)
DEPENDENCIES = [
('zlib1g-dev / zlib-devel', '/usr/include/zlib.h'),
('libbz2-dev / bzip2-devel', '/usr/include/bzlib.h'),
('g++ / gcc-c++', '/usr/bin/g++'),
('wget', '/usr/bin/wget'),
('libsqlite3-dev / sqlite-devel', '/usr/include/sql... | Add libbz2-dev dependency for PinPlay | [build] Add libbz2-dev dependency for PinPlay
| Python | mit | abanaiyan/sniper,abanaiyan/sniper,abanaiyan/sniper,abanaiyan/sniper,abanaiyan/sniper | #!/usr/bin/env python
import sys, os
# list of (packagename, filename)
DEPENDENCIES = [
('zlib1g-dev / zlib-devel', '/usr/include/zlib.h'),
('g++ / gcc-c++', '/usr/bin/g++'),
('wget', '/usr/bin/wget'),
('libsqlite3-dev / sqlite-devel', '/usr/include/sqlite3.h'),
]
if os.environ.get('BOOST_INCLUDE', ''):
D... | #!/usr/bin/env python
import sys, os
# list of (packagename, filename)
DEPENDENCIES = [
('zlib1g-dev / zlib-devel', '/usr/include/zlib.h'),
('libbz2-dev / bzip2-devel', '/usr/include/bzlib.h'),
('g++ / gcc-c++', '/usr/bin/g++'),
('wget', '/usr/bin/wget'),
('libsqlite3-dev / sqlite-devel', '/usr/include/sql... | <commit_before>#!/usr/bin/env python
import sys, os
# list of (packagename, filename)
DEPENDENCIES = [
('zlib1g-dev / zlib-devel', '/usr/include/zlib.h'),
('g++ / gcc-c++', '/usr/bin/g++'),
('wget', '/usr/bin/wget'),
('libsqlite3-dev / sqlite-devel', '/usr/include/sqlite3.h'),
]
if os.environ.get('BOOST_INC... | #!/usr/bin/env python
import sys, os
# list of (packagename, filename)
DEPENDENCIES = [
('zlib1g-dev / zlib-devel', '/usr/include/zlib.h'),
('libbz2-dev / bzip2-devel', '/usr/include/bzlib.h'),
('g++ / gcc-c++', '/usr/bin/g++'),
('wget', '/usr/bin/wget'),
('libsqlite3-dev / sqlite-devel', '/usr/include/sql... | #!/usr/bin/env python
import sys, os
# list of (packagename, filename)
DEPENDENCIES = [
('zlib1g-dev / zlib-devel', '/usr/include/zlib.h'),
('g++ / gcc-c++', '/usr/bin/g++'),
('wget', '/usr/bin/wget'),
('libsqlite3-dev / sqlite-devel', '/usr/include/sqlite3.h'),
]
if os.environ.get('BOOST_INCLUDE', ''):
D... | <commit_before>#!/usr/bin/env python
import sys, os
# list of (packagename, filename)
DEPENDENCIES = [
('zlib1g-dev / zlib-devel', '/usr/include/zlib.h'),
('g++ / gcc-c++', '/usr/bin/g++'),
('wget', '/usr/bin/wget'),
('libsqlite3-dev / sqlite-devel', '/usr/include/sqlite3.h'),
]
if os.environ.get('BOOST_INC... |
368e2d6407cb021d80fe3679c65737581c3cc221 | bliski_publikator/institutions/serializers.py | bliski_publikator/institutions/serializers.py | from rest_framework import serializers
from .models import Institution
class InstitutionSerializer(serializers.HyperlinkedModelSerializer):
on_site = serializers.CharField(source='get_absolute_url', read_only=True)
class Meta:
model = Institution
fields = ('on_site',
'url',... | from rest_framework import serializers
from .models import Institution
class InstitutionSerializer(serializers.HyperlinkedModelSerializer):
on_site = serializers.CharField(source='get_absolute_url', read_only=True)
class Meta:
model = Institution
fields = ('on_site',
'url',... | Make user field read-only in InstitutionSerializer | Make user field read-only in InstitutionSerializer
| Python | mit | watchdogpolska/bliski_publikator,watchdogpolska/bliski_publikator,watchdogpolska/bliski_publikator,watchdogpolska/bliski_publikator | from rest_framework import serializers
from .models import Institution
class InstitutionSerializer(serializers.HyperlinkedModelSerializer):
on_site = serializers.CharField(source='get_absolute_url', read_only=True)
class Meta:
model = Institution
fields = ('on_site',
'url',... | from rest_framework import serializers
from .models import Institution
class InstitutionSerializer(serializers.HyperlinkedModelSerializer):
on_site = serializers.CharField(source='get_absolute_url', read_only=True)
class Meta:
model = Institution
fields = ('on_site',
'url',... | <commit_before>from rest_framework import serializers
from .models import Institution
class InstitutionSerializer(serializers.HyperlinkedModelSerializer):
on_site = serializers.CharField(source='get_absolute_url', read_only=True)
class Meta:
model = Institution
fields = ('on_site',
... | from rest_framework import serializers
from .models import Institution
class InstitutionSerializer(serializers.HyperlinkedModelSerializer):
on_site = serializers.CharField(source='get_absolute_url', read_only=True)
class Meta:
model = Institution
fields = ('on_site',
'url',... | from rest_framework import serializers
from .models import Institution
class InstitutionSerializer(serializers.HyperlinkedModelSerializer):
on_site = serializers.CharField(source='get_absolute_url', read_only=True)
class Meta:
model = Institution
fields = ('on_site',
'url',... | <commit_before>from rest_framework import serializers
from .models import Institution
class InstitutionSerializer(serializers.HyperlinkedModelSerializer):
on_site = serializers.CharField(source='get_absolute_url', read_only=True)
class Meta:
model = Institution
fields = ('on_site',
... |
5cadfe1b0a8da0f46950ff63786bf79c42af9b90 | tutorials/forms.py | tutorials/forms.py | from django import forms
from .models import Tutorial
class TutorialForm(forms.ModelForm):
# ToDO: Set required fields??
class Meta:
model = Tutorial
fields = ('title', 'html', 'markdown') | from django import forms
from .models import Tutorial
class TutorialForm(forms.ModelForm):
# ToDO: Set required fields??
class Meta:
model = Tutorial
fields = ('category', 'title', 'markdown', 'level')
| Add new model fields to form | Add new model fields to form
| Python | agpl-3.0 | openego/oeplatform,openego/oeplatform,openego/oeplatform,openego/oeplatform | from django import forms
from .models import Tutorial
class TutorialForm(forms.ModelForm):
# ToDO: Set required fields??
class Meta:
model = Tutorial
fields = ('title', 'html', 'markdown')Add new model fields to form | from django import forms
from .models import Tutorial
class TutorialForm(forms.ModelForm):
# ToDO: Set required fields??
class Meta:
model = Tutorial
fields = ('category', 'title', 'markdown', 'level')
| <commit_before>from django import forms
from .models import Tutorial
class TutorialForm(forms.ModelForm):
# ToDO: Set required fields??
class Meta:
model = Tutorial
fields = ('title', 'html', 'markdown')<commit_msg>Add new model fields to form<commit_after> | from django import forms
from .models import Tutorial
class TutorialForm(forms.ModelForm):
# ToDO: Set required fields??
class Meta:
model = Tutorial
fields = ('category', 'title', 'markdown', 'level')
| from django import forms
from .models import Tutorial
class TutorialForm(forms.ModelForm):
# ToDO: Set required fields??
class Meta:
model = Tutorial
fields = ('title', 'html', 'markdown')Add new model fields to formfrom django import forms
from .models import Tutorial
class TutorialForm(fo... | <commit_before>from django import forms
from .models import Tutorial
class TutorialForm(forms.ModelForm):
# ToDO: Set required fields??
class Meta:
model = Tutorial
fields = ('title', 'html', 'markdown')<commit_msg>Add new model fields to form<commit_after>from django import forms
from .model... |
9b4333f25f22269f02f605579d4756da43701241 | manage.py | manage.py | # -*- coding: utf-8 -*-
from flask import current_app, g
from flask.ext.script import Manager, Server, prompt_bool
from massa import create_app
manager = Manager(create_app)
manager.add_option('-c', '--config', dest='config', required=False)
manager.add_command('runserver', Server(
use_debugger = True,
use_... | # -*- coding: utf-8 -*-
from flask import current_app, g
from flask.ext.script import Manager, Server, prompt_bool
from massa import create_app
manager = Manager(create_app)
manager.add_option('-c', '--config', dest='config', required=False)
manager.add_command('runserver', Server(
use_debugger = True,
use_... | Add a reset task to drop and recreate the db tables with one command. | Add a reset task to drop and recreate the db tables with one command. | Python | mit | jaapverloop/massa | # -*- coding: utf-8 -*-
from flask import current_app, g
from flask.ext.script import Manager, Server, prompt_bool
from massa import create_app
manager = Manager(create_app)
manager.add_option('-c', '--config', dest='config', required=False)
manager.add_command('runserver', Server(
use_debugger = True,
use_... | # -*- coding: utf-8 -*-
from flask import current_app, g
from flask.ext.script import Manager, Server, prompt_bool
from massa import create_app
manager = Manager(create_app)
manager.add_option('-c', '--config', dest='config', required=False)
manager.add_command('runserver', Server(
use_debugger = True,
use_... | <commit_before># -*- coding: utf-8 -*-
from flask import current_app, g
from flask.ext.script import Manager, Server, prompt_bool
from massa import create_app
manager = Manager(create_app)
manager.add_option('-c', '--config', dest='config', required=False)
manager.add_command('runserver', Server(
use_debugger =... | # -*- coding: utf-8 -*-
from flask import current_app, g
from flask.ext.script import Manager, Server, prompt_bool
from massa import create_app
manager = Manager(create_app)
manager.add_option('-c', '--config', dest='config', required=False)
manager.add_command('runserver', Server(
use_debugger = True,
use_... | # -*- coding: utf-8 -*-
from flask import current_app, g
from flask.ext.script import Manager, Server, prompt_bool
from massa import create_app
manager = Manager(create_app)
manager.add_option('-c', '--config', dest='config', required=False)
manager.add_command('runserver', Server(
use_debugger = True,
use_... | <commit_before># -*- coding: utf-8 -*-
from flask import current_app, g
from flask.ext.script import Manager, Server, prompt_bool
from massa import create_app
manager = Manager(create_app)
manager.add_option('-c', '--config', dest='config', required=False)
manager.add_command('runserver', Server(
use_debugger =... |
2353c00e76d841b10e7c27750c4ce973d536f453 | manage.py | manage.py | # Set the path
import os, sys
sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), '..')))
from flask.ext.script import Manager, Server
from maproulette import app
manager = Manager(app)
# Turn on debugger by default and reloader
manager.add_command("runserver", Server(
use_debugger = True,
... | # Set the path
import os, sys
sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), '..')))
from flask.ext.script import Manager, Server
from maproulette import app
manager = Manager(app)
# Turn on debugger by default and reloader
manager.add_command("runserver", Server(
use_debugger = True,
... | Manage can now clean up pyc files | Manage can now clean up pyc files
| Python | apache-2.0 | mvexel/maproulette,mvexel/mr-tnav,Crashfreak/maproulette,mvexel/maproulette,osmlab/maproulette,osmlab/maproulette,osmlab/maproulette,mvexel/maproulette,osmlab/maproulette,Crashfreak/maproulette,mvexel/mr-tnav,mvexel/maproulette,Crashfreak/maproulette,Crashfreak/maproulette | # Set the path
import os, sys
sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), '..')))
from flask.ext.script import Manager, Server
from maproulette import app
manager = Manager(app)
# Turn on debugger by default and reloader
manager.add_command("runserver", Server(
use_debugger = True,
... | # Set the path
import os, sys
sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), '..')))
from flask.ext.script import Manager, Server
from maproulette import app
manager = Manager(app)
# Turn on debugger by default and reloader
manager.add_command("runserver", Server(
use_debugger = True,
... | <commit_before># Set the path
import os, sys
sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), '..')))
from flask.ext.script import Manager, Server
from maproulette import app
manager = Manager(app)
# Turn on debugger by default and reloader
manager.add_command("runserver", Server(
use_debu... | # Set the path
import os, sys
sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), '..')))
from flask.ext.script import Manager, Server
from maproulette import app
manager = Manager(app)
# Turn on debugger by default and reloader
manager.add_command("runserver", Server(
use_debugger = True,
... | # Set the path
import os, sys
sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), '..')))
from flask.ext.script import Manager, Server
from maproulette import app
manager = Manager(app)
# Turn on debugger by default and reloader
manager.add_command("runserver", Server(
use_debugger = True,
... | <commit_before># Set the path
import os, sys
sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), '..')))
from flask.ext.script import Manager, Server
from maproulette import app
manager = Manager(app)
# Turn on debugger by default and reloader
manager.add_command("runserver", Server(
use_debu... |
1abb838a1fa56af25b9c6369dff93c65e17fbc3a | manage.py | manage.py | import os
COV = None
if os.environ.get('FLASK_COVERAGE'):
import coverage
COV = coverage.coverage(branch=True, include='app/*')
COV.start()
from flask_script import Manager
from flask_migrate import Migrate, MigrateCommand
from app import app, db
from config import BASE_DIR
app.config.from_object(os.ge... | import os
COV = None
if os.environ.get('FLASK_COVERAGE'):
import coverage
COV = coverage.coverage(branch=True, include='app/*')
COV.start()
from flask_script import Manager
from flask_migrate import Migrate, MigrateCommand
from app import app, db
from config import BASE_DIR
app.config.from_object(os.ge... | Remove erase of coverage file as it's needed by coveralls | Remove erase of coverage file as it's needed by coveralls
| Python | apache-2.0 | atindale/business-glossary,atindale/business-glossary | import os
COV = None
if os.environ.get('FLASK_COVERAGE'):
import coverage
COV = coverage.coverage(branch=True, include='app/*')
COV.start()
from flask_script import Manager
from flask_migrate import Migrate, MigrateCommand
from app import app, db
from config import BASE_DIR
app.config.from_object(os.ge... | import os
COV = None
if os.environ.get('FLASK_COVERAGE'):
import coverage
COV = coverage.coverage(branch=True, include='app/*')
COV.start()
from flask_script import Manager
from flask_migrate import Migrate, MigrateCommand
from app import app, db
from config import BASE_DIR
app.config.from_object(os.ge... | <commit_before>import os
COV = None
if os.environ.get('FLASK_COVERAGE'):
import coverage
COV = coverage.coverage(branch=True, include='app/*')
COV.start()
from flask_script import Manager
from flask_migrate import Migrate, MigrateCommand
from app import app, db
from config import BASE_DIR
app.config.fr... | import os
COV = None
if os.environ.get('FLASK_COVERAGE'):
import coverage
COV = coverage.coverage(branch=True, include='app/*')
COV.start()
from flask_script import Manager
from flask_migrate import Migrate, MigrateCommand
from app import app, db
from config import BASE_DIR
app.config.from_object(os.ge... | import os
COV = None
if os.environ.get('FLASK_COVERAGE'):
import coverage
COV = coverage.coverage(branch=True, include='app/*')
COV.start()
from flask_script import Manager
from flask_migrate import Migrate, MigrateCommand
from app import app, db
from config import BASE_DIR
app.config.from_object(os.ge... | <commit_before>import os
COV = None
if os.environ.get('FLASK_COVERAGE'):
import coverage
COV = coverage.coverage(branch=True, include='app/*')
COV.start()
from flask_script import Manager
from flask_migrate import Migrate, MigrateCommand
from app import app, db
from config import BASE_DIR
app.config.fr... |
873b7d7e7de770b9407840f6ccd662929b5dd3b6 | src/modularframework/login.py | src/modularframework/login.py | '''
Created on 01.06.2014
@author: ionitadaniel19
'''
from selenium.webdriver.support.wait import WebDriverWait
from selenium.webdriver.support import expected_conditions as EC
from selenium.webdriver.common.by import By
class LoginPage():
def __init__(self,driver,url="http://localhost/autframeworks/i... | '''
Created on 01.06.2014
@author: ionitadaniel19
'''
from selenium.webdriver.support.wait import WebDriverWait
from selenium.webdriver.support import expected_conditions as EC
from selenium.webdriver.common.by import By
class LoginPage():
def __init__(self,driver,url="http://localhost:81/autframework... | Update the default url port | Update the default url port | Python | mit | ionitadaniel19/testframeworksevolution | '''
Created on 01.06.2014
@author: ionitadaniel19
'''
from selenium.webdriver.support.wait import WebDriverWait
from selenium.webdriver.support import expected_conditions as EC
from selenium.webdriver.common.by import By
class LoginPage():
def __init__(self,driver,url="http://localhost/autframeworks/i... | '''
Created on 01.06.2014
@author: ionitadaniel19
'''
from selenium.webdriver.support.wait import WebDriverWait
from selenium.webdriver.support import expected_conditions as EC
from selenium.webdriver.common.by import By
class LoginPage():
def __init__(self,driver,url="http://localhost:81/autframework... | <commit_before>'''
Created on 01.06.2014
@author: ionitadaniel19
'''
from selenium.webdriver.support.wait import WebDriverWait
from selenium.webdriver.support import expected_conditions as EC
from selenium.webdriver.common.by import By
class LoginPage():
def __init__(self,driver,url="http://localhost/... | '''
Created on 01.06.2014
@author: ionitadaniel19
'''
from selenium.webdriver.support.wait import WebDriverWait
from selenium.webdriver.support import expected_conditions as EC
from selenium.webdriver.common.by import By
class LoginPage():
def __init__(self,driver,url="http://localhost:81/autframework... | '''
Created on 01.06.2014
@author: ionitadaniel19
'''
from selenium.webdriver.support.wait import WebDriverWait
from selenium.webdriver.support import expected_conditions as EC
from selenium.webdriver.common.by import By
class LoginPage():
def __init__(self,driver,url="http://localhost/autframeworks/i... | <commit_before>'''
Created on 01.06.2014
@author: ionitadaniel19
'''
from selenium.webdriver.support.wait import WebDriverWait
from selenium.webdriver.support import expected_conditions as EC
from selenium.webdriver.common.by import By
class LoginPage():
def __init__(self,driver,url="http://localhost/... |
1be8c268f2da618e9e9e13d55d53599d637d3a6a | abel/tests/test_tools.py | abel/tests/test_tools.py | from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import os.path
import numpy as np
from numpy.testing import assert_allclose
from abel.tools import calculate_speeds
DATA_DIR = os.path.join(os.path.split(__file__)[0], 'data')
def assert_equal(x, y, messa... | from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import os.path
import numpy as np
from numpy.testing import assert_allclose, assert_equal
from abel.tools import calculate_speeds, center_image
DATA_DIR = os.path.join(os.path.split(__file__)[0], 'data')
... | Test to enforce that center_image preserves shape | Test to enforce that center_image preserves shape
| Python | mit | rth/PyAbel,huletlab/PyAbel,DhrubajyotiDas/PyAbel,PyAbel/PyAbel,stggh/PyAbel | from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import os.path
import numpy as np
from numpy.testing import assert_allclose
from abel.tools import calculate_speeds
DATA_DIR = os.path.join(os.path.split(__file__)[0], 'data')
def assert_equal(x, y, messa... | from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import os.path
import numpy as np
from numpy.testing import assert_allclose, assert_equal
from abel.tools import calculate_speeds, center_image
DATA_DIR = os.path.join(os.path.split(__file__)[0], 'data')
... | <commit_before>from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import os.path
import numpy as np
from numpy.testing import assert_allclose
from abel.tools import calculate_speeds
DATA_DIR = os.path.join(os.path.split(__file__)[0], 'data')
def assert_eq... | from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import os.path
import numpy as np
from numpy.testing import assert_allclose, assert_equal
from abel.tools import calculate_speeds, center_image
DATA_DIR = os.path.join(os.path.split(__file__)[0], 'data')
... | from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import os.path
import numpy as np
from numpy.testing import assert_allclose
from abel.tools import calculate_speeds
DATA_DIR = os.path.join(os.path.split(__file__)[0], 'data')
def assert_equal(x, y, messa... | <commit_before>from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import os.path
import numpy as np
from numpy.testing import assert_allclose
from abel.tools import calculate_speeds
DATA_DIR = os.path.join(os.path.split(__file__)[0], 'data')
def assert_eq... |
92d61a641cfade2ed323576719cfc0ff54d34cbd | test/repository_test.py | test/repository_test.py | import unittest
from jip.repository import MavenFileSystemRepos
from jip.maven import Artifact
from contextlib import contextmanager
import shutil
import tempfile
import errno
import os
@contextmanager
def tmpdir():
dirname = tempfile.mkdtemp()
try:
yield dirname
finally:
shutil.rmtre... | import unittest
from jip.repository import MavenFileSystemRepos
from jip.maven import Artifact
from contextlib import contextmanager
import shutil
import tempfile
import errno
import os
@contextmanager
def tmpdir():
dirname = tempfile.mkdtemp()
try:
yield dirname
finally:
shutil.rmtre... | Fix test for Python 3 | Fix test for Python 3
| Python | mit | sunng87/jip,sunng87/jip | import unittest
from jip.repository import MavenFileSystemRepos
from jip.maven import Artifact
from contextlib import contextmanager
import shutil
import tempfile
import errno
import os
@contextmanager
def tmpdir():
dirname = tempfile.mkdtemp()
try:
yield dirname
finally:
shutil.rmtre... | import unittest
from jip.repository import MavenFileSystemRepos
from jip.maven import Artifact
from contextlib import contextmanager
import shutil
import tempfile
import errno
import os
@contextmanager
def tmpdir():
dirname = tempfile.mkdtemp()
try:
yield dirname
finally:
shutil.rmtre... | <commit_before>import unittest
from jip.repository import MavenFileSystemRepos
from jip.maven import Artifact
from contextlib import contextmanager
import shutil
import tempfile
import errno
import os
@contextmanager
def tmpdir():
dirname = tempfile.mkdtemp()
try:
yield dirname
finally:
... | import unittest
from jip.repository import MavenFileSystemRepos
from jip.maven import Artifact
from contextlib import contextmanager
import shutil
import tempfile
import errno
import os
@contextmanager
def tmpdir():
dirname = tempfile.mkdtemp()
try:
yield dirname
finally:
shutil.rmtre... | import unittest
from jip.repository import MavenFileSystemRepos
from jip.maven import Artifact
from contextlib import contextmanager
import shutil
import tempfile
import errno
import os
@contextmanager
def tmpdir():
dirname = tempfile.mkdtemp()
try:
yield dirname
finally:
shutil.rmtre... | <commit_before>import unittest
from jip.repository import MavenFileSystemRepos
from jip.maven import Artifact
from contextlib import contextmanager
import shutil
import tempfile
import errno
import os
@contextmanager
def tmpdir():
dirname = tempfile.mkdtemp()
try:
yield dirname
finally:
... |
3e77090b2142e7802203b5e37f81b5d4cbb6f40d | rest_framework/urlpatterns.py | rest_framework/urlpatterns.py | from django.conf.urls.defaults import url
from rest_framework.settings import api_settings
def format_suffix_patterns(urlpatterns, suffix_required=False, suffix_kwarg=None):
"""
Supplement existing urlpatterns with corrosponding patterns that also
include a '.format' suffix. Retains urlpattern ordering.
... | from django.conf.urls.defaults import url
from rest_framework.settings import api_settings
def format_suffix_patterns(urlpatterns, suffix_required=False, suffix_kwarg=None):
"""
Supplement existing urlpatterns with corrosponding patterns that also
include a '.format' suffix. Retains urlpattern ordering.
... | Fix bug in format suffix patterns | Fix bug in format suffix patterns
| Python | bsd-2-clause | delinhabit/django-rest-framework,abdulhaq-e/django-rest-framework,pombredanne/django-rest-framework,werthen/django-rest-framework,sbellem/django-rest-framework,hunter007/django-rest-framework,waytai/django-rest-framework,arpheno/django-rest-framework,kgeorgy/django-rest-framework,arpheno/django-rest-framework,adambain-... | from django.conf.urls.defaults import url
from rest_framework.settings import api_settings
def format_suffix_patterns(urlpatterns, suffix_required=False, suffix_kwarg=None):
"""
Supplement existing urlpatterns with corrosponding patterns that also
include a '.format' suffix. Retains urlpattern ordering.
... | from django.conf.urls.defaults import url
from rest_framework.settings import api_settings
def format_suffix_patterns(urlpatterns, suffix_required=False, suffix_kwarg=None):
"""
Supplement existing urlpatterns with corrosponding patterns that also
include a '.format' suffix. Retains urlpattern ordering.
... | <commit_before>from django.conf.urls.defaults import url
from rest_framework.settings import api_settings
def format_suffix_patterns(urlpatterns, suffix_required=False, suffix_kwarg=None):
"""
Supplement existing urlpatterns with corrosponding patterns that also
include a '.format' suffix. Retains urlpat... | from django.conf.urls.defaults import url
from rest_framework.settings import api_settings
def format_suffix_patterns(urlpatterns, suffix_required=False, suffix_kwarg=None):
"""
Supplement existing urlpatterns with corrosponding patterns that also
include a '.format' suffix. Retains urlpattern ordering.
... | from django.conf.urls.defaults import url
from rest_framework.settings import api_settings
def format_suffix_patterns(urlpatterns, suffix_required=False, suffix_kwarg=None):
"""
Supplement existing urlpatterns with corrosponding patterns that also
include a '.format' suffix. Retains urlpattern ordering.
... | <commit_before>from django.conf.urls.defaults import url
from rest_framework.settings import api_settings
def format_suffix_patterns(urlpatterns, suffix_required=False, suffix_kwarg=None):
"""
Supplement existing urlpatterns with corrosponding patterns that also
include a '.format' suffix. Retains urlpat... |
85a873c79e3c3c7289a23da6fe3673259fac9cbd | sympy/sets/conditionset.py | sympy/sets/conditionset.py | from __future__ import print_function, division
from sympy.core.basic import Basic
from sympy.logic.boolalg import And, Or, Not, true, false
from sympy.sets.sets import (Set, Interval, Intersection, EmptySet, Union,
FiniteSet)
from sympy.core.singleton import Singleton, S
from sympy.core.s... | from __future__ import print_function, division
from sympy.core.basic import Basic
from sympy.logic.boolalg import And, Or, Not, true, false
from sympy.sets.sets import (Set, Interval, Intersection, EmptySet, Union,
FiniteSet)
from sympy.core.singleton import Singleton, S
from sympy.core.s... | Remove redundant _is_multivariate in ConditionSet | Remove redundant _is_multivariate in ConditionSet
Signed-off-by: Harsh Gupta <c4bd8559369e527b4bb1785ff84e8ff50fde87c0@gmail.com>
| Python | bsd-3-clause | sampadsaha5/sympy,VaibhavAgarwalVA/sympy,mcdaniel67/sympy,MechCoder/sympy,farhaanbukhsh/sympy,abhiii5459/sympy,MechCoder/sympy,madan96/sympy,kaushik94/sympy,jaimahajan1997/sympy,skidzo/sympy,ahhda/sympy,abhiii5459/sympy,mafiya69/sympy,Curious72/sympy,shikil/sympy,aktech/sympy,hargup/sympy,Vishluck/sympy,oliverlee/sympy... | from __future__ import print_function, division
from sympy.core.basic import Basic
from sympy.logic.boolalg import And, Or, Not, true, false
from sympy.sets.sets import (Set, Interval, Intersection, EmptySet, Union,
FiniteSet)
from sympy.core.singleton import Singleton, S
from sympy.core.s... | from __future__ import print_function, division
from sympy.core.basic import Basic
from sympy.logic.boolalg import And, Or, Not, true, false
from sympy.sets.sets import (Set, Interval, Intersection, EmptySet, Union,
FiniteSet)
from sympy.core.singleton import Singleton, S
from sympy.core.s... | <commit_before>from __future__ import print_function, division
from sympy.core.basic import Basic
from sympy.logic.boolalg import And, Or, Not, true, false
from sympy.sets.sets import (Set, Interval, Intersection, EmptySet, Union,
FiniteSet)
from sympy.core.singleton import Singleton, S
fr... | from __future__ import print_function, division
from sympy.core.basic import Basic
from sympy.logic.boolalg import And, Or, Not, true, false
from sympy.sets.sets import (Set, Interval, Intersection, EmptySet, Union,
FiniteSet)
from sympy.core.singleton import Singleton, S
from sympy.core.s... | from __future__ import print_function, division
from sympy.core.basic import Basic
from sympy.logic.boolalg import And, Or, Not, true, false
from sympy.sets.sets import (Set, Interval, Intersection, EmptySet, Union,
FiniteSet)
from sympy.core.singleton import Singleton, S
from sympy.core.s... | <commit_before>from __future__ import print_function, division
from sympy.core.basic import Basic
from sympy.logic.boolalg import And, Or, Not, true, false
from sympy.sets.sets import (Set, Interval, Intersection, EmptySet, Union,
FiniteSet)
from sympy.core.singleton import Singleton, S
fr... |
647562550e2932a1eb5f89ff3bc4be84fa894dea | tba_config.py | tba_config.py | import json
import os
DEBUG = os.environ.get('SERVER_SOFTWARE', '').startswith('Dev')
# For choosing what the main landing page displays
KICKOFF = 1
BUILDSEASON = 2
COMPETITIONSEASON = 3
OFFSEASON = 4
# The CONFIG variables should have exactly the same structure between environments
# Eventually a test environment s... | import json
import os
DEBUG = os.environ.get('SERVER_SOFTWARE', '').startswith('Dev')
# For choosing what the main landing page displays
KICKOFF = 1
BUILDSEASON = 2
COMPETITIONSEASON = 3
OFFSEASON = 4
# The CONFIG variables should have exactly the same structure between environments
# Eventually a test environment s... | Increment static resource to account for CDN JS | Increment static resource to account for CDN JS
| Python | mit | josephbisch/the-blue-alliance,bvisness/the-blue-alliance,josephbisch/the-blue-alliance,tsteward/the-blue-alliance,nwalters512/the-blue-alliance,1fish2/the-blue-alliance,tsteward/the-blue-alliance,phil-lopreiato/the-blue-alliance,jaredhasenklein/the-blue-alliance,verycumbersome/the-blue-alliance,synth3tk/the-blue-allian... | import json
import os
DEBUG = os.environ.get('SERVER_SOFTWARE', '').startswith('Dev')
# For choosing what the main landing page displays
KICKOFF = 1
BUILDSEASON = 2
COMPETITIONSEASON = 3
OFFSEASON = 4
# The CONFIG variables should have exactly the same structure between environments
# Eventually a test environment s... | import json
import os
DEBUG = os.environ.get('SERVER_SOFTWARE', '').startswith('Dev')
# For choosing what the main landing page displays
KICKOFF = 1
BUILDSEASON = 2
COMPETITIONSEASON = 3
OFFSEASON = 4
# The CONFIG variables should have exactly the same structure between environments
# Eventually a test environment s... | <commit_before>import json
import os
DEBUG = os.environ.get('SERVER_SOFTWARE', '').startswith('Dev')
# For choosing what the main landing page displays
KICKOFF = 1
BUILDSEASON = 2
COMPETITIONSEASON = 3
OFFSEASON = 4
# The CONFIG variables should have exactly the same structure between environments
# Eventually a tes... | import json
import os
DEBUG = os.environ.get('SERVER_SOFTWARE', '').startswith('Dev')
# For choosing what the main landing page displays
KICKOFF = 1
BUILDSEASON = 2
COMPETITIONSEASON = 3
OFFSEASON = 4
# The CONFIG variables should have exactly the same structure between environments
# Eventually a test environment s... | import json
import os
DEBUG = os.environ.get('SERVER_SOFTWARE', '').startswith('Dev')
# For choosing what the main landing page displays
KICKOFF = 1
BUILDSEASON = 2
COMPETITIONSEASON = 3
OFFSEASON = 4
# The CONFIG variables should have exactly the same structure between environments
# Eventually a test environment s... | <commit_before>import json
import os
DEBUG = os.environ.get('SERVER_SOFTWARE', '').startswith('Dev')
# For choosing what the main landing page displays
KICKOFF = 1
BUILDSEASON = 2
COMPETITIONSEASON = 3
OFFSEASON = 4
# The CONFIG variables should have exactly the same structure between environments
# Eventually a tes... |
14c86e3c93bd5114b74c125fdb8213b22342c95c | tests/manual_cleanup.py | tests/manual_cleanup.py | from globus_cli.services.transfer import get_client as get_tc
from tests.framework.cli_testcase import default_test_config
try:
from mock import patch
except ImportError:
from unittest.mock import patch
def cleanup_bookmarks(tc):
for bm in tc.bookmark_list():
tc.delete_bookmark(bm['id'])
@patch... | #!/usr/bin/env python
import click
from globus_cli.services.transfer import get_client as get_tc
from tests.framework.cli_testcase import default_test_config
try:
from mock import patch
except ImportError:
from unittest.mock import patch
def cleanup_bookmarks(tc):
for bm in tc.bookmark_list():
t... | Add `--cancel-jobs` to manual cleanup script | Add `--cancel-jobs` to manual cleanup script
Add an option to this script to cancel all ACTIVE,INACTIVE tasks (i.e.
not SUCCEDED,FAILED).
While this can disrupt a run of the tests pretty badly if you run it
while the tets are running, it's pretty much the only way to "fix it" if
the tests go off the rails because of a... | Python | apache-2.0 | globus/globus-cli,globus/globus-cli | from globus_cli.services.transfer import get_client as get_tc
from tests.framework.cli_testcase import default_test_config
try:
from mock import patch
except ImportError:
from unittest.mock import patch
def cleanup_bookmarks(tc):
for bm in tc.bookmark_list():
tc.delete_bookmark(bm['id'])
@patch... | #!/usr/bin/env python
import click
from globus_cli.services.transfer import get_client as get_tc
from tests.framework.cli_testcase import default_test_config
try:
from mock import patch
except ImportError:
from unittest.mock import patch
def cleanup_bookmarks(tc):
for bm in tc.bookmark_list():
t... | <commit_before>from globus_cli.services.transfer import get_client as get_tc
from tests.framework.cli_testcase import default_test_config
try:
from mock import patch
except ImportError:
from unittest.mock import patch
def cleanup_bookmarks(tc):
for bm in tc.bookmark_list():
tc.delete_bookmark(bm[... | #!/usr/bin/env python
import click
from globus_cli.services.transfer import get_client as get_tc
from tests.framework.cli_testcase import default_test_config
try:
from mock import patch
except ImportError:
from unittest.mock import patch
def cleanup_bookmarks(tc):
for bm in tc.bookmark_list():
t... | from globus_cli.services.transfer import get_client as get_tc
from tests.framework.cli_testcase import default_test_config
try:
from mock import patch
except ImportError:
from unittest.mock import patch
def cleanup_bookmarks(tc):
for bm in tc.bookmark_list():
tc.delete_bookmark(bm['id'])
@patch... | <commit_before>from globus_cli.services.transfer import get_client as get_tc
from tests.framework.cli_testcase import default_test_config
try:
from mock import patch
except ImportError:
from unittest.mock import patch
def cleanup_bookmarks(tc):
for bm in tc.bookmark_list():
tc.delete_bookmark(bm[... |
a3d087b2d7ec42eb5afe9f0064785d25500af11b | bitforge/errors.py | bitforge/errors.py |
class BitforgeError(Exception):
def __init__(self, *args, **kwargs):
self.cause = kwargs.pop('cause', None)
self.prepare(*args, **kwargs)
self.message = self.__doc__.format(**self.__dict__)
def prepare(self):
pass
def __str__(self):
return self.message
class Obje... |
class BitforgeError(Exception):
def __init__(self, *args, **kwargs):
self.cause = kwargs.pop('cause', None)
self.prepare(*args, **kwargs)
message = self.__doc__.format(**self.__dict__)
super(BitforgeError, self).__init__(message)
def prepare(self):
pass
def __str__... | Call super constructor for BitforgeError | Call super constructor for BitforgeError
| Python | mit | muun/bitforge,coinforge/bitforge |
class BitforgeError(Exception):
def __init__(self, *args, **kwargs):
self.cause = kwargs.pop('cause', None)
self.prepare(*args, **kwargs)
self.message = self.__doc__.format(**self.__dict__)
def prepare(self):
pass
def __str__(self):
return self.message
class Obje... |
class BitforgeError(Exception):
def __init__(self, *args, **kwargs):
self.cause = kwargs.pop('cause', None)
self.prepare(*args, **kwargs)
message = self.__doc__.format(**self.__dict__)
super(BitforgeError, self).__init__(message)
def prepare(self):
pass
def __str__... | <commit_before>
class BitforgeError(Exception):
def __init__(self, *args, **kwargs):
self.cause = kwargs.pop('cause', None)
self.prepare(*args, **kwargs)
self.message = self.__doc__.format(**self.__dict__)
def prepare(self):
pass
def __str__(self):
return self.messa... |
class BitforgeError(Exception):
def __init__(self, *args, **kwargs):
self.cause = kwargs.pop('cause', None)
self.prepare(*args, **kwargs)
message = self.__doc__.format(**self.__dict__)
super(BitforgeError, self).__init__(message)
def prepare(self):
pass
def __str__... |
class BitforgeError(Exception):
def __init__(self, *args, **kwargs):
self.cause = kwargs.pop('cause', None)
self.prepare(*args, **kwargs)
self.message = self.__doc__.format(**self.__dict__)
def prepare(self):
pass
def __str__(self):
return self.message
class Obje... | <commit_before>
class BitforgeError(Exception):
def __init__(self, *args, **kwargs):
self.cause = kwargs.pop('cause', None)
self.prepare(*args, **kwargs)
self.message = self.__doc__.format(**self.__dict__)
def prepare(self):
pass
def __str__(self):
return self.messa... |
c19a64ecdbde5a387a84dec880c2ebea1013c3d6 | canopus/auth/token_factory.py | canopus/auth/token_factory.py | from datetime import datetime, timedelta
from ..schema import UserSchema
class TokenFactory(object):
def __init__(self, request, user):
self.user = user
self.request = request
def create_access_token(self):
user = self.user
if user.last_signed_in is None:
user.wel... | from datetime import datetime, timedelta
from ..schema import UserSchema
class TokenFactory(object):
def __init__(self, request, user):
self.user = user
self.request = request
def create_access_token(self):
user = self.user
user.last_signed_in = datetime.now()
token ... | Include user in create_access_token return value | Include user in create_access_token return value
| Python | mit | josuemontano/api-starter,josuemontano/API-platform,josuemontano/pyramid-angularjs-starter,josuemontano/API-platform,josuemontano/API-platform,josuemontano/api-starter,josuemontano/api-starter,josuemontano/pyramid-angularjs-starter,josuemontano/pyramid-angularjs-starter,josuemontano/API-platform | from datetime import datetime, timedelta
from ..schema import UserSchema
class TokenFactory(object):
def __init__(self, request, user):
self.user = user
self.request = request
def create_access_token(self):
user = self.user
if user.last_signed_in is None:
user.wel... | from datetime import datetime, timedelta
from ..schema import UserSchema
class TokenFactory(object):
def __init__(self, request, user):
self.user = user
self.request = request
def create_access_token(self):
user = self.user
user.last_signed_in = datetime.now()
token ... | <commit_before>from datetime import datetime, timedelta
from ..schema import UserSchema
class TokenFactory(object):
def __init__(self, request, user):
self.user = user
self.request = request
def create_access_token(self):
user = self.user
if user.last_signed_in is None:
... | from datetime import datetime, timedelta
from ..schema import UserSchema
class TokenFactory(object):
def __init__(self, request, user):
self.user = user
self.request = request
def create_access_token(self):
user = self.user
user.last_signed_in = datetime.now()
token ... | from datetime import datetime, timedelta
from ..schema import UserSchema
class TokenFactory(object):
def __init__(self, request, user):
self.user = user
self.request = request
def create_access_token(self):
user = self.user
if user.last_signed_in is None:
user.wel... | <commit_before>from datetime import datetime, timedelta
from ..schema import UserSchema
class TokenFactory(object):
def __init__(self, request, user):
self.user = user
self.request = request
def create_access_token(self):
user = self.user
if user.last_signed_in is None:
... |
b3f5aed7097241adffd54d9b1ff705cd44455165 | examples/python/setup.py | examples/python/setup.py |
try:
from setuptools import setup
except ImportError:
from distutils.core import setup
config = {
'description': 'Python Connector for Mongrel2',
'author': 'Zed A. Shaw',
'url': 'http://pypi.python.org/pypi/mongrel2-python',
'download_url': 'http://pypi.python.org/pypi/mongrel2-python',
'a... |
try:
from setuptools import setup
except ImportError:
from distutils.core import setup
config = {
'description': 'Python Connector for Mongrel2',
'author': 'Zed A. Shaw',
'url': 'http://pypi.python.org/pypi/mongrel2-python',
'download_url': 'http://pypi.python.org/pypi/mongrel2-python',
'a... | Make m2sh have the same version number as mongrel2. | Make m2sh have the same version number as mongrel2. | Python | bsd-3-clause | ged/mongrel2,ged/mongrel2,ged/mongrel2,ged/mongrel2 |
try:
from setuptools import setup
except ImportError:
from distutils.core import setup
config = {
'description': 'Python Connector for Mongrel2',
'author': 'Zed A. Shaw',
'url': 'http://pypi.python.org/pypi/mongrel2-python',
'download_url': 'http://pypi.python.org/pypi/mongrel2-python',
'a... |
try:
from setuptools import setup
except ImportError:
from distutils.core import setup
config = {
'description': 'Python Connector for Mongrel2',
'author': 'Zed A. Shaw',
'url': 'http://pypi.python.org/pypi/mongrel2-python',
'download_url': 'http://pypi.python.org/pypi/mongrel2-python',
'a... | <commit_before>
try:
from setuptools import setup
except ImportError:
from distutils.core import setup
config = {
'description': 'Python Connector for Mongrel2',
'author': 'Zed A. Shaw',
'url': 'http://pypi.python.org/pypi/mongrel2-python',
'download_url': 'http://pypi.python.org/pypi/mongrel2-... |
try:
from setuptools import setup
except ImportError:
from distutils.core import setup
config = {
'description': 'Python Connector for Mongrel2',
'author': 'Zed A. Shaw',
'url': 'http://pypi.python.org/pypi/mongrel2-python',
'download_url': 'http://pypi.python.org/pypi/mongrel2-python',
'a... |
try:
from setuptools import setup
except ImportError:
from distutils.core import setup
config = {
'description': 'Python Connector for Mongrel2',
'author': 'Zed A. Shaw',
'url': 'http://pypi.python.org/pypi/mongrel2-python',
'download_url': 'http://pypi.python.org/pypi/mongrel2-python',
'a... | <commit_before>
try:
from setuptools import setup
except ImportError:
from distutils.core import setup
config = {
'description': 'Python Connector for Mongrel2',
'author': 'Zed A. Shaw',
'url': 'http://pypi.python.org/pypi/mongrel2-python',
'download_url': 'http://pypi.python.org/pypi/mongrel2-... |
72f03f05adc39a3d920ee8372f4108b5c8c8671c | modules/pwnchecker.py | modules/pwnchecker.py | #!/usr/bin/python3
import requests
import pprint
import argparse
parser = argparse.ArgumentParser(description='A tool to check if your email account has been in a breach By Jay Townsend')
parser.add_argument('-e', '--email-account', help='Email account to lookup', required=True)
args = parser.parse_args()
headers = ... | #!/usr/bin/python3
import requests
import pprint
import argparse
parser = argparse.ArgumentParser(description='A tool to check if your email account has been in a breach By Jay Townsend')
parser.add_argument('-e', '--email-account', help='Email account to lookup', required=True)
parser.add_argument('-k', '--api-key',... | Update to the v3 api | Update to the v3 api
| Python | bsd-3-clause | L1ghtn1ng/usaf,L1ghtn1ng/usaf | #!/usr/bin/python3
import requests
import pprint
import argparse
parser = argparse.ArgumentParser(description='A tool to check if your email account has been in a breach By Jay Townsend')
parser.add_argument('-e', '--email-account', help='Email account to lookup', required=True)
args = parser.parse_args()
headers = ... | #!/usr/bin/python3
import requests
import pprint
import argparse
parser = argparse.ArgumentParser(description='A tool to check if your email account has been in a breach By Jay Townsend')
parser.add_argument('-e', '--email-account', help='Email account to lookup', required=True)
parser.add_argument('-k', '--api-key',... | <commit_before>#!/usr/bin/python3
import requests
import pprint
import argparse
parser = argparse.ArgumentParser(description='A tool to check if your email account has been in a breach By Jay Townsend')
parser.add_argument('-e', '--email-account', help='Email account to lookup', required=True)
args = parser.parse_arg... | #!/usr/bin/python3
import requests
import pprint
import argparse
parser = argparse.ArgumentParser(description='A tool to check if your email account has been in a breach By Jay Townsend')
parser.add_argument('-e', '--email-account', help='Email account to lookup', required=True)
parser.add_argument('-k', '--api-key',... | #!/usr/bin/python3
import requests
import pprint
import argparse
parser = argparse.ArgumentParser(description='A tool to check if your email account has been in a breach By Jay Townsend')
parser.add_argument('-e', '--email-account', help='Email account to lookup', required=True)
args = parser.parse_args()
headers = ... | <commit_before>#!/usr/bin/python3
import requests
import pprint
import argparse
parser = argparse.ArgumentParser(description='A tool to check if your email account has been in a breach By Jay Townsend')
parser.add_argument('-e', '--email-account', help='Email account to lookup', required=True)
args = parser.parse_arg... |
5cd459485fee2611eb96229b0a600b3a21f4fc13 | stagecraft/apps/datasets/admin/backdrop_user.py | stagecraft/apps/datasets/admin/backdrop_user.py | from __future__ import unicode_literals
from django.contrib import admin
from django.db import models
import reversion
from stagecraft.apps.datasets.models.backdrop_user import BackdropUser
from stagecraft.apps.datasets.models.data_set import DataSet
class DataSetInline(admin.StackedInline):
model = DataSet
f... | from __future__ import unicode_literals
from django.contrib import admin
from django.db import models
import reversion
from stagecraft.apps.datasets.models.backdrop_user import BackdropUser
from stagecraft.apps.datasets.models.data_set import DataSet
class DataSetInline(admin.StackedInline):
model = DataSet
f... | Fix typo in BackdropUser admin model | Fix typo in BackdropUser admin model
| Python | mit | alphagov/stagecraft,alphagov/stagecraft,alphagov/stagecraft,alphagov/stagecraft | from __future__ import unicode_literals
from django.contrib import admin
from django.db import models
import reversion
from stagecraft.apps.datasets.models.backdrop_user import BackdropUser
from stagecraft.apps.datasets.models.data_set import DataSet
class DataSetInline(admin.StackedInline):
model = DataSet
f... | from __future__ import unicode_literals
from django.contrib import admin
from django.db import models
import reversion
from stagecraft.apps.datasets.models.backdrop_user import BackdropUser
from stagecraft.apps.datasets.models.data_set import DataSet
class DataSetInline(admin.StackedInline):
model = DataSet
f... | <commit_before>from __future__ import unicode_literals
from django.contrib import admin
from django.db import models
import reversion
from stagecraft.apps.datasets.models.backdrop_user import BackdropUser
from stagecraft.apps.datasets.models.data_set import DataSet
class DataSetInline(admin.StackedInline):
model ... | from __future__ import unicode_literals
from django.contrib import admin
from django.db import models
import reversion
from stagecraft.apps.datasets.models.backdrop_user import BackdropUser
from stagecraft.apps.datasets.models.data_set import DataSet
class DataSetInline(admin.StackedInline):
model = DataSet
f... | from __future__ import unicode_literals
from django.contrib import admin
from django.db import models
import reversion
from stagecraft.apps.datasets.models.backdrop_user import BackdropUser
from stagecraft.apps.datasets.models.data_set import DataSet
class DataSetInline(admin.StackedInline):
model = DataSet
f... | <commit_before>from __future__ import unicode_literals
from django.contrib import admin
from django.db import models
import reversion
from stagecraft.apps.datasets.models.backdrop_user import BackdropUser
from stagecraft.apps.datasets.models.data_set import DataSet
class DataSetInline(admin.StackedInline):
model ... |
31a9b285a0445c895aeff02b2abbeda12bf7f3d7 | wagtail/admin/tests/pages/test_content_type_use_view.py | wagtail/admin/tests/pages/test_content_type_use_view.py | from django.test import TestCase
from django.urls import reverse
from wagtail.tests.utils import WagtailTestUtils
class TestContentTypeUse(TestCase, WagtailTestUtils):
fixtures = ['test.json']
def setUp(self):
self.user = self.login()
def test_content_type_use(self):
# Get use of event ... | from django.test import TestCase
from django.urls import reverse
from django.utils.http import urlencode
from wagtail.tests.testapp.models import EventPage
from wagtail.tests.utils import WagtailTestUtils
class TestContentTypeUse(TestCase, WagtailTestUtils):
fixtures = ['test.json']
def setUp(self):
... | Add test for button URLs including a 'next' parameter | Add test for button URLs including a 'next' parameter
| Python | bsd-3-clause | torchbox/wagtail,FlipperPA/wagtail,gasman/wagtail,gasman/wagtail,mixxorz/wagtail,thenewguy/wagtail,mixxorz/wagtail,torchbox/wagtail,torchbox/wagtail,thenewguy/wagtail,gasman/wagtail,rsalmaso/wagtail,mixxorz/wagtail,wagtail/wagtail,takeflight/wagtail,FlipperPA/wagtail,torchbox/wagtail,zerolab/wagtail,thenewguy/wagtail,t... | from django.test import TestCase
from django.urls import reverse
from wagtail.tests.utils import WagtailTestUtils
class TestContentTypeUse(TestCase, WagtailTestUtils):
fixtures = ['test.json']
def setUp(self):
self.user = self.login()
def test_content_type_use(self):
# Get use of event ... | from django.test import TestCase
from django.urls import reverse
from django.utils.http import urlencode
from wagtail.tests.testapp.models import EventPage
from wagtail.tests.utils import WagtailTestUtils
class TestContentTypeUse(TestCase, WagtailTestUtils):
fixtures = ['test.json']
def setUp(self):
... | <commit_before>from django.test import TestCase
from django.urls import reverse
from wagtail.tests.utils import WagtailTestUtils
class TestContentTypeUse(TestCase, WagtailTestUtils):
fixtures = ['test.json']
def setUp(self):
self.user = self.login()
def test_content_type_use(self):
# Ge... | from django.test import TestCase
from django.urls import reverse
from django.utils.http import urlencode
from wagtail.tests.testapp.models import EventPage
from wagtail.tests.utils import WagtailTestUtils
class TestContentTypeUse(TestCase, WagtailTestUtils):
fixtures = ['test.json']
def setUp(self):
... | from django.test import TestCase
from django.urls import reverse
from wagtail.tests.utils import WagtailTestUtils
class TestContentTypeUse(TestCase, WagtailTestUtils):
fixtures = ['test.json']
def setUp(self):
self.user = self.login()
def test_content_type_use(self):
# Get use of event ... | <commit_before>from django.test import TestCase
from django.urls import reverse
from wagtail.tests.utils import WagtailTestUtils
class TestContentTypeUse(TestCase, WagtailTestUtils):
fixtures = ['test.json']
def setUp(self):
self.user = self.login()
def test_content_type_use(self):
# Ge... |
f001bf192e1f0c40eee8c744f83aa55e1846d765 | main/models.py | main/models.py | from django.contrib.postgres.fields import ArrayField
from django.db import models
class Track(models.Model):
"""
This model help us to store midi files.
It will be easier for everyone to have one place to listen
to the midi without having to install codecs, timidity or whatever
"""
title = mo... | from django.contrib.postgres.fields import ArrayField
from django.db import models
class Track(models.Model):
"""
This model help us to store midi files.
It will be easier for everyone to have one place to listen
to the midi without having to install codecs, timidity or whatever
"""
title = mo... | Fix end_date management with Question Page | Fix end_date management with Question Page
| Python | mit | adrienbrunet/fanfare_cuc,adrienbrunet/fanfare_cuc,adrienbrunet/fanfare_cuc | from django.contrib.postgres.fields import ArrayField
from django.db import models
class Track(models.Model):
"""
This model help us to store midi files.
It will be easier for everyone to have one place to listen
to the midi without having to install codecs, timidity or whatever
"""
title = mo... | from django.contrib.postgres.fields import ArrayField
from django.db import models
class Track(models.Model):
"""
This model help us to store midi files.
It will be easier for everyone to have one place to listen
to the midi without having to install codecs, timidity or whatever
"""
title = mo... | <commit_before>from django.contrib.postgres.fields import ArrayField
from django.db import models
class Track(models.Model):
"""
This model help us to store midi files.
It will be easier for everyone to have one place to listen
to the midi without having to install codecs, timidity or whatever
"""... | from django.contrib.postgres.fields import ArrayField
from django.db import models
class Track(models.Model):
"""
This model help us to store midi files.
It will be easier for everyone to have one place to listen
to the midi without having to install codecs, timidity or whatever
"""
title = mo... | from django.contrib.postgres.fields import ArrayField
from django.db import models
class Track(models.Model):
"""
This model help us to store midi files.
It will be easier for everyone to have one place to listen
to the midi without having to install codecs, timidity or whatever
"""
title = mo... | <commit_before>from django.contrib.postgres.fields import ArrayField
from django.db import models
class Track(models.Model):
"""
This model help us to store midi files.
It will be easier for everyone to have one place to listen
to the midi without having to install codecs, timidity or whatever
"""... |
11fd3e5c8a2c7f591dff1ba1949508d178d1e5d5 | byceps/util/irc.py | byceps/util/irc.py | """
byceps.util.irc
~~~~~~~~~~~~~~~
Send IRC messages to a bot via HTTP.
:Copyright: 2006-2020 Jochen Kupperschmidt
:License: Modified BSD, see LICENSE for details.
"""
from time import sleep
from typing import List
from flask import current_app
import requests
DEFAULT_BOT_URL = 'http://127.0.0.1:12345/'
DEFAULT_... | """
byceps.util.irc
~~~~~~~~~~~~~~~
Send IRC messages to a bot via HTTP.
:Copyright: 2006-2020 Jochen Kupperschmidt
:License: Modified BSD, see LICENSE for details.
"""
from time import sleep
from typing import List
from flask import current_app
import requests
DEFAULT_BOT_URL = 'http://127.0.0.1:12345/'
DEFAULT_... | Make IRC message delay configurable | Make IRC message delay configurable
| Python | bsd-3-clause | homeworkprod/byceps,homeworkprod/byceps,homeworkprod/byceps | """
byceps.util.irc
~~~~~~~~~~~~~~~
Send IRC messages to a bot via HTTP.
:Copyright: 2006-2020 Jochen Kupperschmidt
:License: Modified BSD, see LICENSE for details.
"""
from time import sleep
from typing import List
from flask import current_app
import requests
DEFAULT_BOT_URL = 'http://127.0.0.1:12345/'
DEFAULT_... | """
byceps.util.irc
~~~~~~~~~~~~~~~
Send IRC messages to a bot via HTTP.
:Copyright: 2006-2020 Jochen Kupperschmidt
:License: Modified BSD, see LICENSE for details.
"""
from time import sleep
from typing import List
from flask import current_app
import requests
DEFAULT_BOT_URL = 'http://127.0.0.1:12345/'
DEFAULT_... | <commit_before>"""
byceps.util.irc
~~~~~~~~~~~~~~~
Send IRC messages to a bot via HTTP.
:Copyright: 2006-2020 Jochen Kupperschmidt
:License: Modified BSD, see LICENSE for details.
"""
from time import sleep
from typing import List
from flask import current_app
import requests
DEFAULT_BOT_URL = 'http://127.0.0.1:1... | """
byceps.util.irc
~~~~~~~~~~~~~~~
Send IRC messages to a bot via HTTP.
:Copyright: 2006-2020 Jochen Kupperschmidt
:License: Modified BSD, see LICENSE for details.
"""
from time import sleep
from typing import List
from flask import current_app
import requests
DEFAULT_BOT_URL = 'http://127.0.0.1:12345/'
DEFAULT_... | """
byceps.util.irc
~~~~~~~~~~~~~~~
Send IRC messages to a bot via HTTP.
:Copyright: 2006-2020 Jochen Kupperschmidt
:License: Modified BSD, see LICENSE for details.
"""
from time import sleep
from typing import List
from flask import current_app
import requests
DEFAULT_BOT_URL = 'http://127.0.0.1:12345/'
DEFAULT_... | <commit_before>"""
byceps.util.irc
~~~~~~~~~~~~~~~
Send IRC messages to a bot via HTTP.
:Copyright: 2006-2020 Jochen Kupperschmidt
:License: Modified BSD, see LICENSE for details.
"""
from time import sleep
from typing import List
from flask import current_app
import requests
DEFAULT_BOT_URL = 'http://127.0.0.1:1... |
6942497dc04683e2d627042b168476fd756dcbda | tasks/check_rd2_enablement.py | tasks/check_rd2_enablement.py | import simple_salesforce
from cumulusci.tasks.salesforce import BaseSalesforceApiTask
class is_rd2_enabled(BaseSalesforceApiTask):
def _run_task(self):
try:
settings = self.sf.query(
"SELECT npsp__IsRecurringDonations2Enabled__c "
"FROM npe03__Recurring_Donations... | import simple_salesforce
from cumulusci.tasks.salesforce import BaseSalesforceApiTask
class is_rd2_enabled(BaseSalesforceApiTask):
def _run_task(self):
try:
settings = self.sf.query(
"SELECT IsRecurringDonations2Enabled__c "
"FROM npe03__Recurring_Donations_Setti... | Remove namespace from RD2 enablement check | Remove namespace from RD2 enablement check
| Python | bsd-3-clause | SalesforceFoundation/Cumulus,SalesforceFoundation/Cumulus,SalesforceFoundation/Cumulus,SalesforceFoundation/Cumulus | import simple_salesforce
from cumulusci.tasks.salesforce import BaseSalesforceApiTask
class is_rd2_enabled(BaseSalesforceApiTask):
def _run_task(self):
try:
settings = self.sf.query(
"SELECT npsp__IsRecurringDonations2Enabled__c "
"FROM npe03__Recurring_Donations... | import simple_salesforce
from cumulusci.tasks.salesforce import BaseSalesforceApiTask
class is_rd2_enabled(BaseSalesforceApiTask):
def _run_task(self):
try:
settings = self.sf.query(
"SELECT IsRecurringDonations2Enabled__c "
"FROM npe03__Recurring_Donations_Setti... | <commit_before>import simple_salesforce
from cumulusci.tasks.salesforce import BaseSalesforceApiTask
class is_rd2_enabled(BaseSalesforceApiTask):
def _run_task(self):
try:
settings = self.sf.query(
"SELECT npsp__IsRecurringDonations2Enabled__c "
"FROM npe03__Recu... | import simple_salesforce
from cumulusci.tasks.salesforce import BaseSalesforceApiTask
class is_rd2_enabled(BaseSalesforceApiTask):
def _run_task(self):
try:
settings = self.sf.query(
"SELECT IsRecurringDonations2Enabled__c "
"FROM npe03__Recurring_Donations_Setti... | import simple_salesforce
from cumulusci.tasks.salesforce import BaseSalesforceApiTask
class is_rd2_enabled(BaseSalesforceApiTask):
def _run_task(self):
try:
settings = self.sf.query(
"SELECT npsp__IsRecurringDonations2Enabled__c "
"FROM npe03__Recurring_Donations... | <commit_before>import simple_salesforce
from cumulusci.tasks.salesforce import BaseSalesforceApiTask
class is_rd2_enabled(BaseSalesforceApiTask):
def _run_task(self):
try:
settings = self.sf.query(
"SELECT npsp__IsRecurringDonations2Enabled__c "
"FROM npe03__Recu... |
0c42909e5649b78260d9efa4e6ff7b77c82b1934 | runtests.py | runtests.py | #!/usr/bin/env python
# coding: utf-8
import sys
from os.path import abspath
from os.path import dirname
# Load Django-related settings; necessary for tests to run and for Django
# imports to work.
import local_settings
from django.test.simple import DjangoTestSuiteRunner
def runtests():
parent_dir = dirname(ab... | #!/usr/bin/env python
# coding: utf-8
import sys
from argparse import ArgumentParser
from os.path import abspath
from os.path import dirname
# Load Django-related settings; necessary for tests to run and for Django
# imports to work.
import local_settings
# Now, imports from Django will work properly without raising e... | Allow testing of specific apps. | Allow testing of specific apps.
| Python | mit | seler/djoauth2,seler/djoauth2,vden/djoauth2-ng,Locu/djoauth2,vden/djoauth2-ng,Locu/djoauth2 | #!/usr/bin/env python
# coding: utf-8
import sys
from os.path import abspath
from os.path import dirname
# Load Django-related settings; necessary for tests to run and for Django
# imports to work.
import local_settings
from django.test.simple import DjangoTestSuiteRunner
def runtests():
parent_dir = dirname(ab... | #!/usr/bin/env python
# coding: utf-8
import sys
from argparse import ArgumentParser
from os.path import abspath
from os.path import dirname
# Load Django-related settings; necessary for tests to run and for Django
# imports to work.
import local_settings
# Now, imports from Django will work properly without raising e... | <commit_before>#!/usr/bin/env python
# coding: utf-8
import sys
from os.path import abspath
from os.path import dirname
# Load Django-related settings; necessary for tests to run and for Django
# imports to work.
import local_settings
from django.test.simple import DjangoTestSuiteRunner
def runtests():
parent_d... | #!/usr/bin/env python
# coding: utf-8
import sys
from argparse import ArgumentParser
from os.path import abspath
from os.path import dirname
# Load Django-related settings; necessary for tests to run and for Django
# imports to work.
import local_settings
# Now, imports from Django will work properly without raising e... | #!/usr/bin/env python
# coding: utf-8
import sys
from os.path import abspath
from os.path import dirname
# Load Django-related settings; necessary for tests to run and for Django
# imports to work.
import local_settings
from django.test.simple import DjangoTestSuiteRunner
def runtests():
parent_dir = dirname(ab... | <commit_before>#!/usr/bin/env python
# coding: utf-8
import sys
from os.path import abspath
from os.path import dirname
# Load Django-related settings; necessary for tests to run and for Django
# imports to work.
import local_settings
from django.test.simple import DjangoTestSuiteRunner
def runtests():
parent_d... |
d9844f5bcf6d48bde1a60d32998ccdaa87e99676 | cloud_browser/__init__.py | cloud_browser/__init__.py | """Cloud browser application.
Provides a simple filesystem-like browser interface for cloud blob datastores.
"""
VERSION = (0, 2, 1)
__version__ = ".".join(str(v) for v in VERSION)
__version_full__ = __version__ + "".join(str(v) for v in VERSION)
| """Cloud browser application.
Provides a simple filesystem-like browser interface for cloud blob datastores.
"""
VERSION = (0, 2, 1)
__version__ = ".".join(str(v) for v in VERSION)
__version_full__ = __version__
| Fix __version_full__ for new scheme. | Version: Fix __version_full__ for new scheme.
| Python | mit | ryan-roemer/django-cloud-browser,UrbanDaddy/django-cloud-browser,UrbanDaddy/django-cloud-browser,ryan-roemer/django-cloud-browser,ryan-roemer/django-cloud-browser | """Cloud browser application.
Provides a simple filesystem-like browser interface for cloud blob datastores.
"""
VERSION = (0, 2, 1)
__version__ = ".".join(str(v) for v in VERSION)
__version_full__ = __version__ + "".join(str(v) for v in VERSION)
Version: Fix __version_full__ for new scheme. | """Cloud browser application.
Provides a simple filesystem-like browser interface for cloud blob datastores.
"""
VERSION = (0, 2, 1)
__version__ = ".".join(str(v) for v in VERSION)
__version_full__ = __version__
| <commit_before>"""Cloud browser application.
Provides a simple filesystem-like browser interface for cloud blob datastores.
"""
VERSION = (0, 2, 1)
__version__ = ".".join(str(v) for v in VERSION)
__version_full__ = __version__ + "".join(str(v) for v in VERSION)
<commit_msg>Version: Fix __version_full__ for new schem... | """Cloud browser application.
Provides a simple filesystem-like browser interface for cloud blob datastores.
"""
VERSION = (0, 2, 1)
__version__ = ".".join(str(v) for v in VERSION)
__version_full__ = __version__
| """Cloud browser application.
Provides a simple filesystem-like browser interface for cloud blob datastores.
"""
VERSION = (0, 2, 1)
__version__ = ".".join(str(v) for v in VERSION)
__version_full__ = __version__ + "".join(str(v) for v in VERSION)
Version: Fix __version_full__ for new scheme."""Cloud browser applicat... | <commit_before>"""Cloud browser application.
Provides a simple filesystem-like browser interface for cloud blob datastores.
"""
VERSION = (0, 2, 1)
__version__ = ".".join(str(v) for v in VERSION)
__version_full__ = __version__ + "".join(str(v) for v in VERSION)
<commit_msg>Version: Fix __version_full__ for new schem... |
e9b3865e37c1f4a275c323dcbf778696a27d69bd | testapp/testapp/management.py | testapp/testapp/management.py | from bitcategory import models
from django.dispatch import receiver
from django.db.models.signals import post_syncdb
@receiver(post_syncdb, sender=models)
def load_test_categories(sender, **kwargs):
r1, c = models.Category.objects.get_or_create(name="root1")
r2, c = models.Category.objects.get_or_create(name=... | from bitcategory import models
from django.dispatch import receiver
from django.db.models.signals import post_migrate
@receiver(post_migrate, sender=models)
def load_test_categories(sender, **kwargs):
r1, c = models.Category.objects.get_or_create(name="root1")
r2, c = models.Category.objects.get_or_create(nam... | Update tests to work under django 1.8+ | Update tests to work under django 1.8+
| Python | bsd-3-clause | atheiste/django-bit-category,atheiste/django-bit-category,atheiste/django-bit-category | from bitcategory import models
from django.dispatch import receiver
from django.db.models.signals import post_syncdb
@receiver(post_syncdb, sender=models)
def load_test_categories(sender, **kwargs):
r1, c = models.Category.objects.get_or_create(name="root1")
r2, c = models.Category.objects.get_or_create(name=... | from bitcategory import models
from django.dispatch import receiver
from django.db.models.signals import post_migrate
@receiver(post_migrate, sender=models)
def load_test_categories(sender, **kwargs):
r1, c = models.Category.objects.get_or_create(name="root1")
r2, c = models.Category.objects.get_or_create(nam... | <commit_before>from bitcategory import models
from django.dispatch import receiver
from django.db.models.signals import post_syncdb
@receiver(post_syncdb, sender=models)
def load_test_categories(sender, **kwargs):
r1, c = models.Category.objects.get_or_create(name="root1")
r2, c = models.Category.objects.get_... | from bitcategory import models
from django.dispatch import receiver
from django.db.models.signals import post_migrate
@receiver(post_migrate, sender=models)
def load_test_categories(sender, **kwargs):
r1, c = models.Category.objects.get_or_create(name="root1")
r2, c = models.Category.objects.get_or_create(nam... | from bitcategory import models
from django.dispatch import receiver
from django.db.models.signals import post_syncdb
@receiver(post_syncdb, sender=models)
def load_test_categories(sender, **kwargs):
r1, c = models.Category.objects.get_or_create(name="root1")
r2, c = models.Category.objects.get_or_create(name=... | <commit_before>from bitcategory import models
from django.dispatch import receiver
from django.db.models.signals import post_syncdb
@receiver(post_syncdb, sender=models)
def load_test_categories(sender, **kwargs):
r1, c = models.Category.objects.get_or_create(name="root1")
r2, c = models.Category.objects.get_... |
67b50cde0fa1885dce936b95d58d82fc64316c85 | src/satosa/micro_services/processors/scope_extractor_processor.py | src/satosa/micro_services/processors/scope_extractor_processor.py | from ..attribute_processor import AttributeProcessorError
from .base_processor import BaseProcessor
CONFIG_KEY_MAPPEDATTRIBUTE = 'mapped_attribute'
CONFIG_DEFAULT_MAPPEDATTRIBUTE = ''
class ScopeExtractorProcessor(BaseProcessor):
"""
Extracts the scope from a scoped attribute and maps that to
another a... | from ..attribute_processor import AttributeProcessorError, AttributeProcessorWarning
from .base_processor import BaseProcessor
CONFIG_KEY_MAPPEDATTRIBUTE = 'mapped_attribute'
CONFIG_DEFAULT_MAPPEDATTRIBUTE = ''
class ScopeExtractorProcessor(BaseProcessor):
"""
Extracts the scope from a scoped attribute and ... | Allow processor to handle the fact that the attribute might have no values, or that they are not scoped | Allow processor to handle the fact that the attribute might have no values, or that they are not scoped
| Python | apache-2.0 | SUNET/SATOSA,its-dirg/SATOSA,irtnog/SATOSA,SUNET/SATOSA,irtnog/SATOSA | from ..attribute_processor import AttributeProcessorError
from .base_processor import BaseProcessor
CONFIG_KEY_MAPPEDATTRIBUTE = 'mapped_attribute'
CONFIG_DEFAULT_MAPPEDATTRIBUTE = ''
class ScopeExtractorProcessor(BaseProcessor):
"""
Extracts the scope from a scoped attribute and maps that to
another a... | from ..attribute_processor import AttributeProcessorError, AttributeProcessorWarning
from .base_processor import BaseProcessor
CONFIG_KEY_MAPPEDATTRIBUTE = 'mapped_attribute'
CONFIG_DEFAULT_MAPPEDATTRIBUTE = ''
class ScopeExtractorProcessor(BaseProcessor):
"""
Extracts the scope from a scoped attribute and ... | <commit_before>from ..attribute_processor import AttributeProcessorError
from .base_processor import BaseProcessor
CONFIG_KEY_MAPPEDATTRIBUTE = 'mapped_attribute'
CONFIG_DEFAULT_MAPPEDATTRIBUTE = ''
class ScopeExtractorProcessor(BaseProcessor):
"""
Extracts the scope from a scoped attribute and maps that to... | from ..attribute_processor import AttributeProcessorError, AttributeProcessorWarning
from .base_processor import BaseProcessor
CONFIG_KEY_MAPPEDATTRIBUTE = 'mapped_attribute'
CONFIG_DEFAULT_MAPPEDATTRIBUTE = ''
class ScopeExtractorProcessor(BaseProcessor):
"""
Extracts the scope from a scoped attribute and ... | from ..attribute_processor import AttributeProcessorError
from .base_processor import BaseProcessor
CONFIG_KEY_MAPPEDATTRIBUTE = 'mapped_attribute'
CONFIG_DEFAULT_MAPPEDATTRIBUTE = ''
class ScopeExtractorProcessor(BaseProcessor):
"""
Extracts the scope from a scoped attribute and maps that to
another a... | <commit_before>from ..attribute_processor import AttributeProcessorError
from .base_processor import BaseProcessor
CONFIG_KEY_MAPPEDATTRIBUTE = 'mapped_attribute'
CONFIG_DEFAULT_MAPPEDATTRIBUTE = ''
class ScopeExtractorProcessor(BaseProcessor):
"""
Extracts the scope from a scoped attribute and maps that to... |
a934303f40d835626cdd42096c869acb536d788d | examples/prompts/autocompletion.py | examples/prompts/autocompletion.py | #!/usr/bin/env python
"""
Autocompletion example.
Press [Tab] to complete the current word.
- The first Tab press fills in the common part of all completions
and shows all the completions. (In the menu)
- Any following tab press cycles through all the possible completions.
"""
from __future__ import unicode_litera... | #!/usr/bin/env python
"""
Autocompletion example.
Press [Tab] to complete the current word.
- The first Tab press fills in the common part of all completions
and shows all the completions. (In the menu)
- Any following tab press cycles through all the possible completions.
"""
from __future__ import unicode_litera... | Fix typo: `dolphine` -> `dolphin` | Fix typo: `dolphine` -> `dolphin`
| Python | bsd-3-clause | jonathanslenders/python-prompt-toolkit | #!/usr/bin/env python
"""
Autocompletion example.
Press [Tab] to complete the current word.
- The first Tab press fills in the common part of all completions
and shows all the completions. (In the menu)
- Any following tab press cycles through all the possible completions.
"""
from __future__ import unicode_litera... | #!/usr/bin/env python
"""
Autocompletion example.
Press [Tab] to complete the current word.
- The first Tab press fills in the common part of all completions
and shows all the completions. (In the menu)
- Any following tab press cycles through all the possible completions.
"""
from __future__ import unicode_litera... | <commit_before>#!/usr/bin/env python
"""
Autocompletion example.
Press [Tab] to complete the current word.
- The first Tab press fills in the common part of all completions
and shows all the completions. (In the menu)
- Any following tab press cycles through all the possible completions.
"""
from __future__ import... | #!/usr/bin/env python
"""
Autocompletion example.
Press [Tab] to complete the current word.
- The first Tab press fills in the common part of all completions
and shows all the completions. (In the menu)
- Any following tab press cycles through all the possible completions.
"""
from __future__ import unicode_litera... | #!/usr/bin/env python
"""
Autocompletion example.
Press [Tab] to complete the current word.
- The first Tab press fills in the common part of all completions
and shows all the completions. (In the menu)
- Any following tab press cycles through all the possible completions.
"""
from __future__ import unicode_litera... | <commit_before>#!/usr/bin/env python
"""
Autocompletion example.
Press [Tab] to complete the current word.
- The first Tab press fills in the common part of all completions
and shows all the completions. (In the menu)
- Any following tab press cycles through all the possible completions.
"""
from __future__ import... |
5749d976dee7d8a51e25842b528448a077a8f800 | report_compassion/models/ir_actions_report.py | report_compassion/models/ir_actions_report.py | # Copyright (c) 2018 Emanuel Cino <ecino@compassion.ch>
from odoo import models, api
class IrActionsReport(models.Model):
_inherit = "ir.actions.report"
@api.multi
def behaviour(self):
"""
Change behaviour to return user preference in priority.
:return: report action for printin... | # Copyright (c) 2018 Emanuel Cino <ecino@compassion.ch>
from odoo import models, api
class IrActionsReport(models.Model):
_inherit = "ir.actions.report"
@api.multi
def behaviour(self):
"""
Change behaviour to return user preference in priority.
:return: report action for printin... | FIX default behaviour of printing | FIX default behaviour of printing
| Python | agpl-3.0 | CompassionCH/compassion-switzerland,eicher31/compassion-switzerland,eicher31/compassion-switzerland,CompassionCH/compassion-switzerland,CompassionCH/compassion-switzerland,eicher31/compassion-switzerland | # Copyright (c) 2018 Emanuel Cino <ecino@compassion.ch>
from odoo import models, api
class IrActionsReport(models.Model):
_inherit = "ir.actions.report"
@api.multi
def behaviour(self):
"""
Change behaviour to return user preference in priority.
:return: report action for printin... | # Copyright (c) 2018 Emanuel Cino <ecino@compassion.ch>
from odoo import models, api
class IrActionsReport(models.Model):
_inherit = "ir.actions.report"
@api.multi
def behaviour(self):
"""
Change behaviour to return user preference in priority.
:return: report action for printin... | <commit_before># Copyright (c) 2018 Emanuel Cino <ecino@compassion.ch>
from odoo import models, api
class IrActionsReport(models.Model):
_inherit = "ir.actions.report"
@api.multi
def behaviour(self):
"""
Change behaviour to return user preference in priority.
:return: report act... | # Copyright (c) 2018 Emanuel Cino <ecino@compassion.ch>
from odoo import models, api
class IrActionsReport(models.Model):
_inherit = "ir.actions.report"
@api.multi
def behaviour(self):
"""
Change behaviour to return user preference in priority.
:return: report action for printin... | # Copyright (c) 2018 Emanuel Cino <ecino@compassion.ch>
from odoo import models, api
class IrActionsReport(models.Model):
_inherit = "ir.actions.report"
@api.multi
def behaviour(self):
"""
Change behaviour to return user preference in priority.
:return: report action for printin... | <commit_before># Copyright (c) 2018 Emanuel Cino <ecino@compassion.ch>
from odoo import models, api
class IrActionsReport(models.Model):
_inherit = "ir.actions.report"
@api.multi
def behaviour(self):
"""
Change behaviour to return user preference in priority.
:return: report act... |
a1a8ef302ac24d56a36d0671eb692943d14c4ddf | whats_open/website/urls.py | whats_open/website/urls.py | # Future Imports
from __future__ import (absolute_import, division, print_function,
unicode_literals)
# Django Imports
from django.conf.urls import include, url
# App Imports
from .views import CategoryViewSet, FacilityViewSet, ScheduleViewSet
# Other Imports
from rest_framework.routers impor... | # Future Imports
from __future__ import (absolute_import, division, print_function,
unicode_literals)
# Django Imports
from django.conf.urls import include, url
from django.views.generic.base import RedirectView
# App Imports
from .views import CategoryViewSet, FacilityViewSet, ScheduleViewSet... | Add a redirect for / -> /api | refactor: Add a redirect for / -> /api
- This got really annoying in development to remember to go to /api all the time
- Potentially in the future we will build a test landing page on / to test that
the API works instead of having to rely on third party tools or just manual clicks
- Until then, this will make life e... | Python | apache-2.0 | srct/whats-open,srct/whats-open,srct/whats-open | # Future Imports
from __future__ import (absolute_import, division, print_function,
unicode_literals)
# Django Imports
from django.conf.urls import include, url
# App Imports
from .views import CategoryViewSet, FacilityViewSet, ScheduleViewSet
# Other Imports
from rest_framework.routers impor... | # Future Imports
from __future__ import (absolute_import, division, print_function,
unicode_literals)
# Django Imports
from django.conf.urls import include, url
from django.views.generic.base import RedirectView
# App Imports
from .views import CategoryViewSet, FacilityViewSet, ScheduleViewSet... | <commit_before># Future Imports
from __future__ import (absolute_import, division, print_function,
unicode_literals)
# Django Imports
from django.conf.urls import include, url
# App Imports
from .views import CategoryViewSet, FacilityViewSet, ScheduleViewSet
# Other Imports
from rest_framewor... | # Future Imports
from __future__ import (absolute_import, division, print_function,
unicode_literals)
# Django Imports
from django.conf.urls import include, url
from django.views.generic.base import RedirectView
# App Imports
from .views import CategoryViewSet, FacilityViewSet, ScheduleViewSet... | # Future Imports
from __future__ import (absolute_import, division, print_function,
unicode_literals)
# Django Imports
from django.conf.urls import include, url
# App Imports
from .views import CategoryViewSet, FacilityViewSet, ScheduleViewSet
# Other Imports
from rest_framework.routers impor... | <commit_before># Future Imports
from __future__ import (absolute_import, division, print_function,
unicode_literals)
# Django Imports
from django.conf.urls import include, url
# App Imports
from .views import CategoryViewSet, FacilityViewSet, ScheduleViewSet
# Other Imports
from rest_framewor... |
d3f4d43b36b8d21a3102389d53bf3f1af4e00d79 | st2common/st2common/runners/base_action.py | st2common/st2common/runners/base_action.py | # Licensed to the StackStorm, Inc ('StackStorm') under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not use th... | # Licensed to the StackStorm, Inc ('StackStorm') under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not use th... | Add _all__ to the module. | Add _all__ to the module.
| Python | apache-2.0 | StackStorm/st2,nzlosh/st2,Plexxi/st2,nzlosh/st2,Plexxi/st2,nzlosh/st2,Plexxi/st2,Plexxi/st2,StackStorm/st2,StackStorm/st2,nzlosh/st2,StackStorm/st2 | # Licensed to the StackStorm, Inc ('StackStorm') under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not use th... | # Licensed to the StackStorm, Inc ('StackStorm') under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not use th... | <commit_before># Licensed to the StackStorm, Inc ('StackStorm') under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you... | # Licensed to the StackStorm, Inc ('StackStorm') under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not use th... | # Licensed to the StackStorm, Inc ('StackStorm') under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not use th... | <commit_before># Licensed to the StackStorm, Inc ('StackStorm') under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you... |
d5a54a7fe207c0fde76774cdc8a11e12fcc3218a | core/data_loader.py | core/data_loader.py | import json
import os
import sys
import dateparser
__DATA_DIR = '../data/'
def harmonize_data( data ):
## make dates as date objects
data2 = []
for d in data:
if 'created_time' in d:
d['date'] = dateparser.parse( d['created_time'] ) ## should take care of the various formats
... | import json
import os
import sys
#import dateparser
from datetime import datetime
__DATA_DIR = '../data/'
def harmonize_data( data ):
## make dates as date objects
data2 = []
for d in data:
if 'created_time' in d:
#d['date'] = dateparser.parse( d['created_time'] ) ## should take care o... | Change dateparser to datetime to use with Jupyter | Change dateparser to datetime to use with Jupyter
| Python | mit | HIIT/hybra-core,HIIT/hybra-core,HIIT/hybra-core,HIIT/hybra-core,HIIT/hybra-core | import json
import os
import sys
import dateparser
__DATA_DIR = '../data/'
def harmonize_data( data ):
## make dates as date objects
data2 = []
for d in data:
if 'created_time' in d:
d['date'] = dateparser.parse( d['created_time'] ) ## should take care of the various formats
... | import json
import os
import sys
#import dateparser
from datetime import datetime
__DATA_DIR = '../data/'
def harmonize_data( data ):
## make dates as date objects
data2 = []
for d in data:
if 'created_time' in d:
#d['date'] = dateparser.parse( d['created_time'] ) ## should take care o... | <commit_before>import json
import os
import sys
import dateparser
__DATA_DIR = '../data/'
def harmonize_data( data ):
## make dates as date objects
data2 = []
for d in data:
if 'created_time' in d:
d['date'] = dateparser.parse( d['created_time'] ) ## should take care of the various for... | import json
import os
import sys
#import dateparser
from datetime import datetime
__DATA_DIR = '../data/'
def harmonize_data( data ):
## make dates as date objects
data2 = []
for d in data:
if 'created_time' in d:
#d['date'] = dateparser.parse( d['created_time'] ) ## should take care o... | import json
import os
import sys
import dateparser
__DATA_DIR = '../data/'
def harmonize_data( data ):
## make dates as date objects
data2 = []
for d in data:
if 'created_time' in d:
d['date'] = dateparser.parse( d['created_time'] ) ## should take care of the various formats
... | <commit_before>import json
import os
import sys
import dateparser
__DATA_DIR = '../data/'
def harmonize_data( data ):
## make dates as date objects
data2 = []
for d in data:
if 'created_time' in d:
d['date'] = dateparser.parse( d['created_time'] ) ## should take care of the various for... |
715733fce547aa010ae94239bf856453b9b62869 | containers/default/pythia.py | containers/default/pythia.py | import json
import sys
import shutil
import os
#Copy /ro/task (which is read-only) in /task. Everything will be executed there
shutil.copytree("/ro/task","/task")
#Change directory to /task
os.chdir("/task")
#Parse input to return stupid output
input = json.loads(sys.stdin.readline())
problems = {}
for boxId in inpu... | import json
import sys
import shutil
import os
import resource
import subprocess
#Copy /ro/task (which is read-only) in /task. Everything will be executed there
shutil.copytree("/ro/task","/task")
#Change directory to /task
os.chdir("/task")
#Parse input to return stupid output
input = json.loads(sys.stdin.readline(... | Insert a valid test task | Insert a valid test task
| Python | agpl-3.0 | GuillaumeDerval/INGInious,GuillaumeDerval/INGInious,layus/INGInious,layus/INGInious,layus/INGInious,GuillaumeDerval/INGInious,GuillaumeDerval/INGInious,layus/INGInious | import json
import sys
import shutil
import os
#Copy /ro/task (which is read-only) in /task. Everything will be executed there
shutil.copytree("/ro/task","/task")
#Change directory to /task
os.chdir("/task")
#Parse input to return stupid output
input = json.loads(sys.stdin.readline())
problems = {}
for boxId in inpu... | import json
import sys
import shutil
import os
import resource
import subprocess
#Copy /ro/task (which is read-only) in /task. Everything will be executed there
shutil.copytree("/ro/task","/task")
#Change directory to /task
os.chdir("/task")
#Parse input to return stupid output
input = json.loads(sys.stdin.readline(... | <commit_before>import json
import sys
import shutil
import os
#Copy /ro/task (which is read-only) in /task. Everything will be executed there
shutil.copytree("/ro/task","/task")
#Change directory to /task
os.chdir("/task")
#Parse input to return stupid output
input = json.loads(sys.stdin.readline())
problems = {}
fo... | import json
import sys
import shutil
import os
import resource
import subprocess
#Copy /ro/task (which is read-only) in /task. Everything will be executed there
shutil.copytree("/ro/task","/task")
#Change directory to /task
os.chdir("/task")
#Parse input to return stupid output
input = json.loads(sys.stdin.readline(... | import json
import sys
import shutil
import os
#Copy /ro/task (which is read-only) in /task. Everything will be executed there
shutil.copytree("/ro/task","/task")
#Change directory to /task
os.chdir("/task")
#Parse input to return stupid output
input = json.loads(sys.stdin.readline())
problems = {}
for boxId in inpu... | <commit_before>import json
import sys
import shutil
import os
#Copy /ro/task (which is read-only) in /task. Everything will be executed there
shutil.copytree("/ro/task","/task")
#Change directory to /task
os.chdir("/task")
#Parse input to return stupid output
input = json.loads(sys.stdin.readline())
problems = {}
fo... |
873833d777536de5aa716a509e590ad1b076198a | scripts/examples/OpenMV/99-Tests/unittests.py | scripts/examples/OpenMV/99-Tests/unittests.py | # OpenMV Unit Tests.
#
import os, sensor, gc
TEST_DIR = "unittest"
TEMP_DIR = "unittest/temp"
DATA_DIR = "unittest/data"
SCRIPT_DIR = "unittest/script"
if not (TEST_DIR in os.listdir("")):
raise Exception('Unittest dir not found!')
print("")
test_failed = False
def print_result(test, result):
s = ... | # OpenMV Unit Tests.
#
import os, sensor, gc
TEST_DIR = "unittest"
TEMP_DIR = "unittest/temp"
DATA_DIR = "unittest/data"
SCRIPT_DIR = "unittest/script"
if not (TEST_DIR in os.listdir("")):
raise Exception('Unittest dir not found!')
print("")
test_failed = False
def print_result(test, result):
s = ... | Fix unit-test failing on disabled functions. | Fix unit-test failing on disabled functions.
| Python | mit | kwagyeman/openmv,openmv/openmv,iabdalkader/openmv,openmv/openmv,openmv/openmv,iabdalkader/openmv,iabdalkader/openmv,openmv/openmv,kwagyeman/openmv,kwagyeman/openmv,kwagyeman/openmv,iabdalkader/openmv | # OpenMV Unit Tests.
#
import os, sensor, gc
TEST_DIR = "unittest"
TEMP_DIR = "unittest/temp"
DATA_DIR = "unittest/data"
SCRIPT_DIR = "unittest/script"
if not (TEST_DIR in os.listdir("")):
raise Exception('Unittest dir not found!')
print("")
test_failed = False
def print_result(test, result):
s = ... | # OpenMV Unit Tests.
#
import os, sensor, gc
TEST_DIR = "unittest"
TEMP_DIR = "unittest/temp"
DATA_DIR = "unittest/data"
SCRIPT_DIR = "unittest/script"
if not (TEST_DIR in os.listdir("")):
raise Exception('Unittest dir not found!')
print("")
test_failed = False
def print_result(test, result):
s = ... | <commit_before># OpenMV Unit Tests.
#
import os, sensor, gc
TEST_DIR = "unittest"
TEMP_DIR = "unittest/temp"
DATA_DIR = "unittest/data"
SCRIPT_DIR = "unittest/script"
if not (TEST_DIR in os.listdir("")):
raise Exception('Unittest dir not found!')
print("")
test_failed = False
def print_result(test, re... | # OpenMV Unit Tests.
#
import os, sensor, gc
TEST_DIR = "unittest"
TEMP_DIR = "unittest/temp"
DATA_DIR = "unittest/data"
SCRIPT_DIR = "unittest/script"
if not (TEST_DIR in os.listdir("")):
raise Exception('Unittest dir not found!')
print("")
test_failed = False
def print_result(test, result):
s = ... | # OpenMV Unit Tests.
#
import os, sensor, gc
TEST_DIR = "unittest"
TEMP_DIR = "unittest/temp"
DATA_DIR = "unittest/data"
SCRIPT_DIR = "unittest/script"
if not (TEST_DIR in os.listdir("")):
raise Exception('Unittest dir not found!')
print("")
test_failed = False
def print_result(test, result):
s = ... | <commit_before># OpenMV Unit Tests.
#
import os, sensor, gc
TEST_DIR = "unittest"
TEMP_DIR = "unittest/temp"
DATA_DIR = "unittest/data"
SCRIPT_DIR = "unittest/script"
if not (TEST_DIR in os.listdir("")):
raise Exception('Unittest dir not found!')
print("")
test_failed = False
def print_result(test, re... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.