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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
219eddef46d17486324240856005dc2be40083a4 | newparp/tasks/__init__.py | newparp/tasks/__init__.py | import os
import raven
from celery import Celery, Task
from classtools import reify
from redis import StrictRedis
from raven.contrib.celery import register_signal, register_logger_signal
from newparp.model import sm
from newparp.model.connections import redis_pool
celery = Celery("newparp", include=[
"newparp.ta... | import os
import raven
from celery import Celery, Task
from classtools import reify
from redis import StrictRedis
from raven.contrib.celery import register_signal, register_logger_signal
from newparp.model import sm
from newparp.model.connections import redis_pool
celery = Celery("newparp", include=[
"newparp.ta... | Add test tasks to the celery includes. | Add test tasks to the celery includes.
| Python | agpl-3.0 | MSPARP/newparp,MSPARP/newparp,MSPARP/newparp | import os
import raven
from celery import Celery, Task
from classtools import reify
from redis import StrictRedis
from raven.contrib.celery import register_signal, register_logger_signal
from newparp.model import sm
from newparp.model.connections import redis_pool
celery = Celery("newparp", include=[
"newparp.ta... | import os
import raven
from celery import Celery, Task
from classtools import reify
from redis import StrictRedis
from raven.contrib.celery import register_signal, register_logger_signal
from newparp.model import sm
from newparp.model.connections import redis_pool
celery = Celery("newparp", include=[
"newparp.ta... | <commit_before>import os
import raven
from celery import Celery, Task
from classtools import reify
from redis import StrictRedis
from raven.contrib.celery import register_signal, register_logger_signal
from newparp.model import sm
from newparp.model.connections import redis_pool
celery = Celery("newparp", include=[
... | import os
import raven
from celery import Celery, Task
from classtools import reify
from redis import StrictRedis
from raven.contrib.celery import register_signal, register_logger_signal
from newparp.model import sm
from newparp.model.connections import redis_pool
celery = Celery("newparp", include=[
"newparp.ta... | import os
import raven
from celery import Celery, Task
from classtools import reify
from redis import StrictRedis
from raven.contrib.celery import register_signal, register_logger_signal
from newparp.model import sm
from newparp.model.connections import redis_pool
celery = Celery("newparp", include=[
"newparp.ta... | <commit_before>import os
import raven
from celery import Celery, Task
from classtools import reify
from redis import StrictRedis
from raven.contrib.celery import register_signal, register_logger_signal
from newparp.model import sm
from newparp.model.connections import redis_pool
celery = Celery("newparp", include=[
... |
455783a2ef4c47a5bc9933d48e7d44dcf3c41dc0 | tests/integration/grains/test_core.py | tests/integration/grains/test_core.py | # -*- coding: utf-8 -*-
'''
Test the core grains
'''
# Import python libs
from __future__ import absolute_import
# Import Salt Testing libs
import tests.integration as integration
from tests.support.unit import skipIf
# Import salt libs
import salt.utils
if salt.utils.is_windows():
try:
import salt.modul... | # -*- coding: utf-8 -*-
'''
Test the core grains
'''
# Import python libs
from __future__ import absolute_import
# Import Salt Testing libs
import tests.integration as integration
from tests.support.unit import skipIf
# Import salt libs
import salt.utils
if salt.utils.is_windows():
try:
import salt.modul... | Add ImportError to exception instead of bare "except" | Add ImportError to exception instead of bare "except"
Fixes lint error on develop.
| Python | apache-2.0 | saltstack/salt,saltstack/salt,saltstack/salt,saltstack/salt,saltstack/salt | # -*- coding: utf-8 -*-
'''
Test the core grains
'''
# Import python libs
from __future__ import absolute_import
# Import Salt Testing libs
import tests.integration as integration
from tests.support.unit import skipIf
# Import salt libs
import salt.utils
if salt.utils.is_windows():
try:
import salt.modul... | # -*- coding: utf-8 -*-
'''
Test the core grains
'''
# Import python libs
from __future__ import absolute_import
# Import Salt Testing libs
import tests.integration as integration
from tests.support.unit import skipIf
# Import salt libs
import salt.utils
if salt.utils.is_windows():
try:
import salt.modul... | <commit_before># -*- coding: utf-8 -*-
'''
Test the core grains
'''
# Import python libs
from __future__ import absolute_import
# Import Salt Testing libs
import tests.integration as integration
from tests.support.unit import skipIf
# Import salt libs
import salt.utils
if salt.utils.is_windows():
try:
im... | # -*- coding: utf-8 -*-
'''
Test the core grains
'''
# Import python libs
from __future__ import absolute_import
# Import Salt Testing libs
import tests.integration as integration
from tests.support.unit import skipIf
# Import salt libs
import salt.utils
if salt.utils.is_windows():
try:
import salt.modul... | # -*- coding: utf-8 -*-
'''
Test the core grains
'''
# Import python libs
from __future__ import absolute_import
# Import Salt Testing libs
import tests.integration as integration
from tests.support.unit import skipIf
# Import salt libs
import salt.utils
if salt.utils.is_windows():
try:
import salt.modul... | <commit_before># -*- coding: utf-8 -*-
'''
Test the core grains
'''
# Import python libs
from __future__ import absolute_import
# Import Salt Testing libs
import tests.integration as integration
from tests.support.unit import skipIf
# Import salt libs
import salt.utils
if salt.utils.is_windows():
try:
im... |
a07c3db369fec32507a7f51b96927bfe383597bc | tests/PexpectTestCase.py | tests/PexpectTestCase.py |
'''
PEXPECT LICENSE
This license is approved by the OSI and FSF as GPL-compatible.
http://opensource.org/licenses/isc-license.txt
Copyright (c) 2012, Noah Spurrier <noah@noah.org>
PERMISSION TO USE, COPY, MODIFY, AND/OR DISTRIBUTE THIS SOFTWARE FOR ANY
PURPOSE WITH OR WITHOUT FEE IS HEREBY GR... |
'''
PEXPECT LICENSE
This license is approved by the OSI and FSF as GPL-compatible.
http://opensource.org/licenses/isc-license.txt
Copyright (c) 2012, Noah Spurrier <noah@noah.org>
PERMISSION TO USE, COPY, MODIFY, AND/OR DISTRIBUTE THIS SOFTWARE FOR ANY
PURPOSE WITH OR WITHOUT FEE IS HEREBY GR... | Make test case base compatible with Python 3 | Make test case base compatible with Python 3
| Python | isc | Wakeupbuddy/pexpect,dongguangming/pexpect,nodish/pexpect,Depado/pexpect,bangi123/pexpect,bangi123/pexpect,Depado/pexpect,quatanium/pexpect,dongguangming/pexpect,bangi123/pexpect,nodish/pexpect,blink1073/pexpect,Depado/pexpect,Wakeupbuddy/pexpect,dongguangming/pexpect,Wakeupbuddy/pexpect,crdoconnor/pexpect,blink1073/pex... |
'''
PEXPECT LICENSE
This license is approved by the OSI and FSF as GPL-compatible.
http://opensource.org/licenses/isc-license.txt
Copyright (c) 2012, Noah Spurrier <noah@noah.org>
PERMISSION TO USE, COPY, MODIFY, AND/OR DISTRIBUTE THIS SOFTWARE FOR ANY
PURPOSE WITH OR WITHOUT FEE IS HEREBY GR... |
'''
PEXPECT LICENSE
This license is approved by the OSI and FSF as GPL-compatible.
http://opensource.org/licenses/isc-license.txt
Copyright (c) 2012, Noah Spurrier <noah@noah.org>
PERMISSION TO USE, COPY, MODIFY, AND/OR DISTRIBUTE THIS SOFTWARE FOR ANY
PURPOSE WITH OR WITHOUT FEE IS HEREBY GR... | <commit_before>
'''
PEXPECT LICENSE
This license is approved by the OSI and FSF as GPL-compatible.
http://opensource.org/licenses/isc-license.txt
Copyright (c) 2012, Noah Spurrier <noah@noah.org>
PERMISSION TO USE, COPY, MODIFY, AND/OR DISTRIBUTE THIS SOFTWARE FOR ANY
PURPOSE WITH OR WITHOUT F... |
'''
PEXPECT LICENSE
This license is approved by the OSI and FSF as GPL-compatible.
http://opensource.org/licenses/isc-license.txt
Copyright (c) 2012, Noah Spurrier <noah@noah.org>
PERMISSION TO USE, COPY, MODIFY, AND/OR DISTRIBUTE THIS SOFTWARE FOR ANY
PURPOSE WITH OR WITHOUT FEE IS HEREBY GR... |
'''
PEXPECT LICENSE
This license is approved by the OSI and FSF as GPL-compatible.
http://opensource.org/licenses/isc-license.txt
Copyright (c) 2012, Noah Spurrier <noah@noah.org>
PERMISSION TO USE, COPY, MODIFY, AND/OR DISTRIBUTE THIS SOFTWARE FOR ANY
PURPOSE WITH OR WITHOUT FEE IS HEREBY GR... | <commit_before>
'''
PEXPECT LICENSE
This license is approved by the OSI and FSF as GPL-compatible.
http://opensource.org/licenses/isc-license.txt
Copyright (c) 2012, Noah Spurrier <noah@noah.org>
PERMISSION TO USE, COPY, MODIFY, AND/OR DISTRIBUTE THIS SOFTWARE FOR ANY
PURPOSE WITH OR WITHOUT F... |
cd59731f1b62265b699f82359a2e3c146feb7845 | oslo_cache/_i18n.py | oslo_cache/_i18n.py | # Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# d... | # Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# d... | Update the documentation link for doc migration | Update the documentation link for doc migration
This patch is proposed according to the Direction 10 of doc
migration(https://etherpad.openstack.org/p/doc-migration-tracking).
Change-Id: I62ae28d10f70d63ba693ac0ab6581faf85f1bf6e
| Python | apache-2.0 | openstack/oslo.cache,openstack/oslo.cache | # Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# d... | # Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# d... | <commit_before># Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, ... | # Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# d... | # Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# d... | <commit_before># Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, ... |
8732b76c56b25d77e7972706f3a335acf3986f14 | pod_manager/utils.py | pod_manager/utils.py | import logging
__all__ = [
'get_logger'
]
def get_logger(name):
logger = logging.getLogger(name)
# TODO: set level, add handler
return logger
| import sys
import logging
from libcloud.compute.types import Provider
from libcloud.compute.providers import get_driver as get_libcloud_driver
from pod_manager.settings import LOG_LEVEL, LOG_FORMAT
from pod_manager.settings import PROVIDER, PROVIDER_CREDENTIALS, PROVIDER_KWARGS
__all__ = [
'get_logger',
'get... | Modify get_logger to set level and formatter, add get_driver method. | Modify get_logger to set level and formatter, add get_driver method.
| Python | apache-2.0 | racker/pod-manager | import logging
__all__ = [
'get_logger'
]
def get_logger(name):
logger = logging.getLogger(name)
# TODO: set level, add handler
return logger
Modify get_logger to set level and formatter, add get_driver method. | import sys
import logging
from libcloud.compute.types import Provider
from libcloud.compute.providers import get_driver as get_libcloud_driver
from pod_manager.settings import LOG_LEVEL, LOG_FORMAT
from pod_manager.settings import PROVIDER, PROVIDER_CREDENTIALS, PROVIDER_KWARGS
__all__ = [
'get_logger',
'get... | <commit_before>import logging
__all__ = [
'get_logger'
]
def get_logger(name):
logger = logging.getLogger(name)
# TODO: set level, add handler
return logger
<commit_msg>Modify get_logger to set level and formatter, add get_driver method.<commit_after> | import sys
import logging
from libcloud.compute.types import Provider
from libcloud.compute.providers import get_driver as get_libcloud_driver
from pod_manager.settings import LOG_LEVEL, LOG_FORMAT
from pod_manager.settings import PROVIDER, PROVIDER_CREDENTIALS, PROVIDER_KWARGS
__all__ = [
'get_logger',
'get... | import logging
__all__ = [
'get_logger'
]
def get_logger(name):
logger = logging.getLogger(name)
# TODO: set level, add handler
return logger
Modify get_logger to set level and formatter, add get_driver method.import sys
import logging
from libcloud.compute.types import Provider
from libcloud.compute... | <commit_before>import logging
__all__ = [
'get_logger'
]
def get_logger(name):
logger = logging.getLogger(name)
# TODO: set level, add handler
return logger
<commit_msg>Modify get_logger to set level and formatter, add get_driver method.<commit_after>import sys
import logging
from libcloud.compute.ty... |
7ff0e821b2d5e04f5d4edd198ae913a2e8e1da6e | micronota/db/test/test_tigrfam.py | micronota/db/test/test_tigrfam.py | #!/usr/bin/env python
# ----------------------------------------------------------------------------
# Copyright (c) 2015--, micronota development team.
#
# Distributed under the terms of the Modified BSD License.
#
# The full license is in the file COPYING.txt, distributed with this software.
# ----------------------... | #!/usr/bin/env python
# ----------------------------------------------------------------------------
# Copyright (c) 2015--, micronota development team.
#
# Distributed under the terms of the Modified BSD License.
#
# The full license is in the file COPYING.txt, distributed with this software.
# ----------------------... | Update the equality test for database files | Update the equality test for database files
| Python | bsd-3-clause | RNAer/micronota,tkosciol/micronota,mortonjt/micronota,mortonjt/micronota,RNAer/micronota,biocore/micronota,biocore/micronota,tkosciol/micronota | #!/usr/bin/env python
# ----------------------------------------------------------------------------
# Copyright (c) 2015--, micronota development team.
#
# Distributed under the terms of the Modified BSD License.
#
# The full license is in the file COPYING.txt, distributed with this software.
# ----------------------... | #!/usr/bin/env python
# ----------------------------------------------------------------------------
# Copyright (c) 2015--, micronota development team.
#
# Distributed under the terms of the Modified BSD License.
#
# The full license is in the file COPYING.txt, distributed with this software.
# ----------------------... | <commit_before>#!/usr/bin/env python
# ----------------------------------------------------------------------------
# Copyright (c) 2015--, micronota development team.
#
# Distributed under the terms of the Modified BSD License.
#
# The full license is in the file COPYING.txt, distributed with this software.
# -------... | #!/usr/bin/env python
# ----------------------------------------------------------------------------
# Copyright (c) 2015--, micronota development team.
#
# Distributed under the terms of the Modified BSD License.
#
# The full license is in the file COPYING.txt, distributed with this software.
# ----------------------... | #!/usr/bin/env python
# ----------------------------------------------------------------------------
# Copyright (c) 2015--, micronota development team.
#
# Distributed under the terms of the Modified BSD License.
#
# The full license is in the file COPYING.txt, distributed with this software.
# ----------------------... | <commit_before>#!/usr/bin/env python
# ----------------------------------------------------------------------------
# Copyright (c) 2015--, micronota development team.
#
# Distributed under the terms of the Modified BSD License.
#
# The full license is in the file COPYING.txt, distributed with this software.
# -------... |
c74b3a4d80b8d7002b6836a421cf2b3032377545 | filterable.py | filterable.py | class Filterable:
no_delays_filter = lambda filterable: filterable.condition.record_id == str(6)
query_delay_filter = lambda filterable: filterable.condition.record_id == str(7)
document_delay_filter = lambda filterable: filterable.condition.record_id == str(8)
combined_delay_filter = lambda filterable: filtera... | class Filterable:
no_delays_filter = lambda filterable: filterable.condition.record_id == str(6)
query_delay_filter = lambda filterable: filterable.condition.record_id == str(7)
document_delay_filter = lambda filterable: filterable.condition.record_id == str(8)
combined_delay_filter = lambda filterable: filtera... | Add filter for rejecting practice topic | Add filter for rejecting practice topic
| Python | mit | fire-uta/iiix-data-parser | class Filterable:
no_delays_filter = lambda filterable: filterable.condition.record_id == str(6)
query_delay_filter = lambda filterable: filterable.condition.record_id == str(7)
document_delay_filter = lambda filterable: filterable.condition.record_id == str(8)
combined_delay_filter = lambda filterable: filtera... | class Filterable:
no_delays_filter = lambda filterable: filterable.condition.record_id == str(6)
query_delay_filter = lambda filterable: filterable.condition.record_id == str(7)
document_delay_filter = lambda filterable: filterable.condition.record_id == str(8)
combined_delay_filter = lambda filterable: filtera... | <commit_before>class Filterable:
no_delays_filter = lambda filterable: filterable.condition.record_id == str(6)
query_delay_filter = lambda filterable: filterable.condition.record_id == str(7)
document_delay_filter = lambda filterable: filterable.condition.record_id == str(8)
combined_delay_filter = lambda filt... | class Filterable:
no_delays_filter = lambda filterable: filterable.condition.record_id == str(6)
query_delay_filter = lambda filterable: filterable.condition.record_id == str(7)
document_delay_filter = lambda filterable: filterable.condition.record_id == str(8)
combined_delay_filter = lambda filterable: filtera... | class Filterable:
no_delays_filter = lambda filterable: filterable.condition.record_id == str(6)
query_delay_filter = lambda filterable: filterable.condition.record_id == str(7)
document_delay_filter = lambda filterable: filterable.condition.record_id == str(8)
combined_delay_filter = lambda filterable: filtera... | <commit_before>class Filterable:
no_delays_filter = lambda filterable: filterable.condition.record_id == str(6)
query_delay_filter = lambda filterable: filterable.condition.record_id == str(7)
document_delay_filter = lambda filterable: filterable.condition.record_id == str(8)
combined_delay_filter = lambda filt... |
5f62db4246e67cec6ac39f27960d6f17e9f163c5 | test/functional/rpc_deprecated.py | test/functional/rpc_deprecated.py | #!/usr/bin/env python3
# Copyright (c) 2017 The Bitcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
"""Test deprecation of RPC calls."""
from test_framework.test_framework import BitcoinTestFramework
from test_f... | #!/usr/bin/env python3
# Copyright (c) 2017 The Bitcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
"""Test deprecation of RPC calls."""
from test_framework.test_framework import BitcoinTestFramework
class Depr... | Remove test for deprecated createmultsig option | [tests] Remove test for deprecated createmultsig option
| Python | mit | chaincoin/chaincoin,chaincoin/chaincoin,chaincoin/chaincoin,chaincoin/chaincoin,chaincoin/chaincoin,chaincoin/chaincoin | #!/usr/bin/env python3
# Copyright (c) 2017 The Bitcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
"""Test deprecation of RPC calls."""
from test_framework.test_framework import BitcoinTestFramework
from test_f... | #!/usr/bin/env python3
# Copyright (c) 2017 The Bitcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
"""Test deprecation of RPC calls."""
from test_framework.test_framework import BitcoinTestFramework
class Depr... | <commit_before>#!/usr/bin/env python3
# Copyright (c) 2017 The Bitcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
"""Test deprecation of RPC calls."""
from test_framework.test_framework import BitcoinTestFramew... | #!/usr/bin/env python3
# Copyright (c) 2017 The Bitcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
"""Test deprecation of RPC calls."""
from test_framework.test_framework import BitcoinTestFramework
class Depr... | #!/usr/bin/env python3
# Copyright (c) 2017 The Bitcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
"""Test deprecation of RPC calls."""
from test_framework.test_framework import BitcoinTestFramework
from test_f... | <commit_before>#!/usr/bin/env python3
# Copyright (c) 2017 The Bitcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
"""Test deprecation of RPC calls."""
from test_framework.test_framework import BitcoinTestFramew... |
fd2c03b2e6f48dac071b813b20cc2f70a2658f24 | tests/test_path_paths.py | tests/test_path_paths.py | import nose
from nose.tools import raises
import dpath.path
import dpath.exceptions
import dpath.options
@raises(dpath.exceptions.InvalidKeyName)
def test_path_paths_invalid_keyname():
tdict = {
"I/contain/the/separator": 0
}
for x in dpath.path.paths(tdict):
pass
@raises(dpath.excepti... | import nose
from nose.tools import raises
import dpath.path
import dpath.exceptions
import dpath.options
@raises(dpath.exceptions.InvalidKeyName)
def test_path_paths_invalid_keyname():
tdict = {
"I/contain/the/separator": 0
}
for x in dpath.path.paths(tdict):
pass
@raises(dpath.excepti... | Print statement was breaking python 3 builds | Print statement was breaking python 3 builds | Python | mit | akesterson/dpath-python,calebcase/dpath-python,benthomasson/dpath-python,lexhung/dpath-python,pombredanne/dpath-python | import nose
from nose.tools import raises
import dpath.path
import dpath.exceptions
import dpath.options
@raises(dpath.exceptions.InvalidKeyName)
def test_path_paths_invalid_keyname():
tdict = {
"I/contain/the/separator": 0
}
for x in dpath.path.paths(tdict):
pass
@raises(dpath.excepti... | import nose
from nose.tools import raises
import dpath.path
import dpath.exceptions
import dpath.options
@raises(dpath.exceptions.InvalidKeyName)
def test_path_paths_invalid_keyname():
tdict = {
"I/contain/the/separator": 0
}
for x in dpath.path.paths(tdict):
pass
@raises(dpath.excepti... | <commit_before>import nose
from nose.tools import raises
import dpath.path
import dpath.exceptions
import dpath.options
@raises(dpath.exceptions.InvalidKeyName)
def test_path_paths_invalid_keyname():
tdict = {
"I/contain/the/separator": 0
}
for x in dpath.path.paths(tdict):
pass
@raise... | import nose
from nose.tools import raises
import dpath.path
import dpath.exceptions
import dpath.options
@raises(dpath.exceptions.InvalidKeyName)
def test_path_paths_invalid_keyname():
tdict = {
"I/contain/the/separator": 0
}
for x in dpath.path.paths(tdict):
pass
@raises(dpath.excepti... | import nose
from nose.tools import raises
import dpath.path
import dpath.exceptions
import dpath.options
@raises(dpath.exceptions.InvalidKeyName)
def test_path_paths_invalid_keyname():
tdict = {
"I/contain/the/separator": 0
}
for x in dpath.path.paths(tdict):
pass
@raises(dpath.excepti... | <commit_before>import nose
from nose.tools import raises
import dpath.path
import dpath.exceptions
import dpath.options
@raises(dpath.exceptions.InvalidKeyName)
def test_path_paths_invalid_keyname():
tdict = {
"I/contain/the/separator": 0
}
for x in dpath.path.paths(tdict):
pass
@raise... |
53dd7c112d3f1781e8b7c662ba52c805a6afa568 | scripts/3-create-database.py | scripts/3-create-database.py | """Creates an SQLite database detailing all the K2 target pixel files.
TODO
----
* Sort the final table by EPIC ID.
* Add an index to the sqlite table?
"""
import glob
import logging
import sqlite3
import pandas as pd
log = logging.getLogger(__name__)
log.setLevel("INFO")
CSV_FILENAME = "../k2-target-pixel-files.... | """Creates an SQLite database detailing all the K2 target pixel files.
TODO
----
* Add an index to the sqlite table?
"""
import glob
import logging
import sqlite3
import pandas as pd
log = logging.getLogger(__name__)
log.setLevel("INFO")
CSV_FILENAME = "../k2-target-pixel-files.csv"
SQLITE_FILENAME = "../k2-targe... | Sort the final table by keplerid | Sort the final table by keplerid
| Python | mit | barentsen/K2metadata,KeplerGO/K2metadata,barentsen/k2-target-index | """Creates an SQLite database detailing all the K2 target pixel files.
TODO
----
* Sort the final table by EPIC ID.
* Add an index to the sqlite table?
"""
import glob
import logging
import sqlite3
import pandas as pd
log = logging.getLogger(__name__)
log.setLevel("INFO")
CSV_FILENAME = "../k2-target-pixel-files.... | """Creates an SQLite database detailing all the K2 target pixel files.
TODO
----
* Add an index to the sqlite table?
"""
import glob
import logging
import sqlite3
import pandas as pd
log = logging.getLogger(__name__)
log.setLevel("INFO")
CSV_FILENAME = "../k2-target-pixel-files.csv"
SQLITE_FILENAME = "../k2-targe... | <commit_before>"""Creates an SQLite database detailing all the K2 target pixel files.
TODO
----
* Sort the final table by EPIC ID.
* Add an index to the sqlite table?
"""
import glob
import logging
import sqlite3
import pandas as pd
log = logging.getLogger(__name__)
log.setLevel("INFO")
CSV_FILENAME = "../k2-targ... | """Creates an SQLite database detailing all the K2 target pixel files.
TODO
----
* Add an index to the sqlite table?
"""
import glob
import logging
import sqlite3
import pandas as pd
log = logging.getLogger(__name__)
log.setLevel("INFO")
CSV_FILENAME = "../k2-target-pixel-files.csv"
SQLITE_FILENAME = "../k2-targe... | """Creates an SQLite database detailing all the K2 target pixel files.
TODO
----
* Sort the final table by EPIC ID.
* Add an index to the sqlite table?
"""
import glob
import logging
import sqlite3
import pandas as pd
log = logging.getLogger(__name__)
log.setLevel("INFO")
CSV_FILENAME = "../k2-target-pixel-files.... | <commit_before>"""Creates an SQLite database detailing all the K2 target pixel files.
TODO
----
* Sort the final table by EPIC ID.
* Add an index to the sqlite table?
"""
import glob
import logging
import sqlite3
import pandas as pd
log = logging.getLogger(__name__)
log.setLevel("INFO")
CSV_FILENAME = "../k2-targ... |
0da5820816187dd6b6d6ebbd554fc9646853e0fc | tests/git_code_debt/logic_test.py | tests/git_code_debt/logic_test.py |
import testify as T
from git_code_debt.create_tables import get_metric_ids
from git_code_debt.discovery import get_metric_parsers
from git_code_debt.logic import get_metric_mapping
from testing.base_classes.sandbox_test_case import SandboxTestCase
class TestLogic(SandboxTestCase):
def test_get_metric_mapping(s... |
import testify as T
from git_code_debt.create_tables import get_metric_ids
from git_code_debt.discovery import get_metric_parsers
from git_code_debt.logic import get_metric_mapping
from git_code_debt.logic import get_metric_values
from git_code_debt.logic import get_previous_sha
from git_code_debt.logic import insert... | Add more tests to logic test | Add more tests to logic test
| Python | mit | ucarion/git-code-debt,ucarion/git-code-debt,Yelp/git-code-debt,Yelp/git-code-debt,Yelp/git-code-debt,ucarion/git-code-debt,Yelp/git-code-debt |
import testify as T
from git_code_debt.create_tables import get_metric_ids
from git_code_debt.discovery import get_metric_parsers
from git_code_debt.logic import get_metric_mapping
from testing.base_classes.sandbox_test_case import SandboxTestCase
class TestLogic(SandboxTestCase):
def test_get_metric_mapping(s... |
import testify as T
from git_code_debt.create_tables import get_metric_ids
from git_code_debt.discovery import get_metric_parsers
from git_code_debt.logic import get_metric_mapping
from git_code_debt.logic import get_metric_values
from git_code_debt.logic import get_previous_sha
from git_code_debt.logic import insert... | <commit_before>
import testify as T
from git_code_debt.create_tables import get_metric_ids
from git_code_debt.discovery import get_metric_parsers
from git_code_debt.logic import get_metric_mapping
from testing.base_classes.sandbox_test_case import SandboxTestCase
class TestLogic(SandboxTestCase):
def test_get_m... |
import testify as T
from git_code_debt.create_tables import get_metric_ids
from git_code_debt.discovery import get_metric_parsers
from git_code_debt.logic import get_metric_mapping
from git_code_debt.logic import get_metric_values
from git_code_debt.logic import get_previous_sha
from git_code_debt.logic import insert... |
import testify as T
from git_code_debt.create_tables import get_metric_ids
from git_code_debt.discovery import get_metric_parsers
from git_code_debt.logic import get_metric_mapping
from testing.base_classes.sandbox_test_case import SandboxTestCase
class TestLogic(SandboxTestCase):
def test_get_metric_mapping(s... | <commit_before>
import testify as T
from git_code_debt.create_tables import get_metric_ids
from git_code_debt.discovery import get_metric_parsers
from git_code_debt.logic import get_metric_mapping
from testing.base_classes.sandbox_test_case import SandboxTestCase
class TestLogic(SandboxTestCase):
def test_get_m... |
48e14060eefd09976624e939eb924405a9b247e4 | chatterbot/__init__.py | chatterbot/__init__.py | """
ChatterBot is a machine learning, conversational dialog engine.
"""
from .chatterbot import ChatBot
__version__ = '0.5.1'
__author__ = 'Gunther Cox'
__email__ = 'gunthercx@gmail.com'
__url__ = 'https://github.com/gunthercox/ChatterBot'
| """
ChatterBot is a machine learning, conversational dialog engine.
"""
from .chatterbot import ChatBot
__version__ = '0.5.2'
__author__ = 'Gunther Cox'
__email__ = 'gunthercx@gmail.com'
__url__ = 'https://github.com/gunthercox/ChatterBot'
| Update release version to 0.5.2 | Update release version to 0.5.2
| Python | bsd-3-clause | Reinaesaya/OUIRL-ChatBot,maclogan/VirtualPenPal,Gustavo6046/ChatterBot,Reinaesaya/OUIRL-ChatBot,gunthercox/ChatterBot,davizucon/ChatterBot,vkosuri/ChatterBot | """
ChatterBot is a machine learning, conversational dialog engine.
"""
from .chatterbot import ChatBot
__version__ = '0.5.1'
__author__ = 'Gunther Cox'
__email__ = 'gunthercx@gmail.com'
__url__ = 'https://github.com/gunthercox/ChatterBot'
Update release version to 0.5.2 | """
ChatterBot is a machine learning, conversational dialog engine.
"""
from .chatterbot import ChatBot
__version__ = '0.5.2'
__author__ = 'Gunther Cox'
__email__ = 'gunthercx@gmail.com'
__url__ = 'https://github.com/gunthercox/ChatterBot'
| <commit_before>"""
ChatterBot is a machine learning, conversational dialog engine.
"""
from .chatterbot import ChatBot
__version__ = '0.5.1'
__author__ = 'Gunther Cox'
__email__ = 'gunthercx@gmail.com'
__url__ = 'https://github.com/gunthercox/ChatterBot'
<commit_msg>Update release version to 0.5.2<commit_after> | """
ChatterBot is a machine learning, conversational dialog engine.
"""
from .chatterbot import ChatBot
__version__ = '0.5.2'
__author__ = 'Gunther Cox'
__email__ = 'gunthercx@gmail.com'
__url__ = 'https://github.com/gunthercox/ChatterBot'
| """
ChatterBot is a machine learning, conversational dialog engine.
"""
from .chatterbot import ChatBot
__version__ = '0.5.1'
__author__ = 'Gunther Cox'
__email__ = 'gunthercx@gmail.com'
__url__ = 'https://github.com/gunthercox/ChatterBot'
Update release version to 0.5.2"""
ChatterBot is a machine learning, conversati... | <commit_before>"""
ChatterBot is a machine learning, conversational dialog engine.
"""
from .chatterbot import ChatBot
__version__ = '0.5.1'
__author__ = 'Gunther Cox'
__email__ = 'gunthercx@gmail.com'
__url__ = 'https://github.com/gunthercox/ChatterBot'
<commit_msg>Update release version to 0.5.2<commit_after>"""
Cha... |
7a09460a7a15cfc81f35f9944939314bf5255898 | corehq/motech/repeaters/const.py | corehq/motech/repeaters/const.py | from datetime import timedelta
MAX_RETRY_WAIT = timedelta(days=7)
MIN_RETRY_WAIT = timedelta(minutes=60)
CHECK_REPEATERS_INTERVAL = timedelta(minutes=5)
CHECK_REPEATERS_KEY = 'check-repeaters-key'
POST_TIMEOUT = 45 # seconds
RECORD_PENDING_STATE = 'PENDING'
RECORD_SUCCESS_STATE = 'SUCCESS'
RECORD_FAILURE_STATE = '... | from datetime import timedelta
MAX_RETRY_WAIT = timedelta(days=7)
MIN_RETRY_WAIT = timedelta(minutes=60)
CHECK_REPEATERS_INTERVAL = timedelta(minutes=5)
CHECK_REPEATERS_KEY = 'check-repeaters-key'
POST_TIMEOUT = 75 # seconds
RECORD_PENDING_STATE = 'PENDING'
RECORD_SUCCESS_STATE = 'SUCCESS'
RECORD_FAILURE_STATE = '... | Increase repeater post timeout to 75 seconds | Increase repeater post timeout to 75 seconds
99DOTS responses sometimes take ~60s to process, which leads us to mark those
records as failed
| Python | bsd-3-clause | dimagi/commcare-hq,dimagi/commcare-hq,dimagi/commcare-hq,dimagi/commcare-hq,dimagi/commcare-hq | from datetime import timedelta
MAX_RETRY_WAIT = timedelta(days=7)
MIN_RETRY_WAIT = timedelta(minutes=60)
CHECK_REPEATERS_INTERVAL = timedelta(minutes=5)
CHECK_REPEATERS_KEY = 'check-repeaters-key'
POST_TIMEOUT = 45 # seconds
RECORD_PENDING_STATE = 'PENDING'
RECORD_SUCCESS_STATE = 'SUCCESS'
RECORD_FAILURE_STATE = '... | from datetime import timedelta
MAX_RETRY_WAIT = timedelta(days=7)
MIN_RETRY_WAIT = timedelta(minutes=60)
CHECK_REPEATERS_INTERVAL = timedelta(minutes=5)
CHECK_REPEATERS_KEY = 'check-repeaters-key'
POST_TIMEOUT = 75 # seconds
RECORD_PENDING_STATE = 'PENDING'
RECORD_SUCCESS_STATE = 'SUCCESS'
RECORD_FAILURE_STATE = '... | <commit_before>from datetime import timedelta
MAX_RETRY_WAIT = timedelta(days=7)
MIN_RETRY_WAIT = timedelta(minutes=60)
CHECK_REPEATERS_INTERVAL = timedelta(minutes=5)
CHECK_REPEATERS_KEY = 'check-repeaters-key'
POST_TIMEOUT = 45 # seconds
RECORD_PENDING_STATE = 'PENDING'
RECORD_SUCCESS_STATE = 'SUCCESS'
RECORD_FA... | from datetime import timedelta
MAX_RETRY_WAIT = timedelta(days=7)
MIN_RETRY_WAIT = timedelta(minutes=60)
CHECK_REPEATERS_INTERVAL = timedelta(minutes=5)
CHECK_REPEATERS_KEY = 'check-repeaters-key'
POST_TIMEOUT = 75 # seconds
RECORD_PENDING_STATE = 'PENDING'
RECORD_SUCCESS_STATE = 'SUCCESS'
RECORD_FAILURE_STATE = '... | from datetime import timedelta
MAX_RETRY_WAIT = timedelta(days=7)
MIN_RETRY_WAIT = timedelta(minutes=60)
CHECK_REPEATERS_INTERVAL = timedelta(minutes=5)
CHECK_REPEATERS_KEY = 'check-repeaters-key'
POST_TIMEOUT = 45 # seconds
RECORD_PENDING_STATE = 'PENDING'
RECORD_SUCCESS_STATE = 'SUCCESS'
RECORD_FAILURE_STATE = '... | <commit_before>from datetime import timedelta
MAX_RETRY_WAIT = timedelta(days=7)
MIN_RETRY_WAIT = timedelta(minutes=60)
CHECK_REPEATERS_INTERVAL = timedelta(minutes=5)
CHECK_REPEATERS_KEY = 'check-repeaters-key'
POST_TIMEOUT = 45 # seconds
RECORD_PENDING_STATE = 'PENDING'
RECORD_SUCCESS_STATE = 'SUCCESS'
RECORD_FA... |
ce3fa12a6fc497264529d5f44e3f4a20b5317fcd | gapipy/resources/booking/customer.py | gapipy/resources/booking/customer.py | from __future__ import unicode_literals
from ..base import Resource
class Customer(Resource):
_resource_name = 'customers'
_is_listable = False
_is_parent_resource = True
_as_is_fields = [
'id', 'href', 'place_of_birth', 'meal_preference', 'meal_notes',
'emergency_contacts', 'medical... | from __future__ import unicode_literals
from ..base import Resource
class Customer(Resource):
_resource_name = 'customers'
_is_listable = False
_is_parent_resource = True
_as_is_fields = [
'id', 'href', 'place_of_birth', 'meal_preference', 'meal_notes',
'emergency_contacts', 'medical... | Add gender to Customer model. | Add gender to Customer model.
| Python | mit | gadventures/gapipy | from __future__ import unicode_literals
from ..base import Resource
class Customer(Resource):
_resource_name = 'customers'
_is_listable = False
_is_parent_resource = True
_as_is_fields = [
'id', 'href', 'place_of_birth', 'meal_preference', 'meal_notes',
'emergency_contacts', 'medical... | from __future__ import unicode_literals
from ..base import Resource
class Customer(Resource):
_resource_name = 'customers'
_is_listable = False
_is_parent_resource = True
_as_is_fields = [
'id', 'href', 'place_of_birth', 'meal_preference', 'meal_notes',
'emergency_contacts', 'medical... | <commit_before>from __future__ import unicode_literals
from ..base import Resource
class Customer(Resource):
_resource_name = 'customers'
_is_listable = False
_is_parent_resource = True
_as_is_fields = [
'id', 'href', 'place_of_birth', 'meal_preference', 'meal_notes',
'emergency_cont... | from __future__ import unicode_literals
from ..base import Resource
class Customer(Resource):
_resource_name = 'customers'
_is_listable = False
_is_parent_resource = True
_as_is_fields = [
'id', 'href', 'place_of_birth', 'meal_preference', 'meal_notes',
'emergency_contacts', 'medical... | from __future__ import unicode_literals
from ..base import Resource
class Customer(Resource):
_resource_name = 'customers'
_is_listable = False
_is_parent_resource = True
_as_is_fields = [
'id', 'href', 'place_of_birth', 'meal_preference', 'meal_notes',
'emergency_contacts', 'medical... | <commit_before>from __future__ import unicode_literals
from ..base import Resource
class Customer(Resource):
_resource_name = 'customers'
_is_listable = False
_is_parent_resource = True
_as_is_fields = [
'id', 'href', 'place_of_birth', 'meal_preference', 'meal_notes',
'emergency_cont... |
aed959a0593558b6063e70c3b594feb6caa4bdda | tests/runner/compose/init_test.py | tests/runner/compose/init_test.py | import os
import tempfile
import shutil
from unittest import TestCase
import yaml
from dusty import constants
from dusty.runner.compose import _write_composefile
class TestComposeRunner(TestCase):
def setUp(self):
self.temp_compose_dir = tempfile.mkdtemp()
self.temp_compose_path = os.path.join(se... | import os
import tempfile
import shutil
from unittest import TestCase
from mock import patch
import yaml
from dusty import constants
from dusty.runner.compose import _write_composefile, _get_docker_env
class TestComposeRunner(TestCase):
def setUp(self):
self.temp_compose_dir = tempfile.mkdtemp()
... | Add a test for _get_docker_env | Add a test for _get_docker_env
| Python | mit | gamechanger/dusty,gamechanger/dusty,gamechanger/dusty,gamechanger/dusty,gamechanger/dusty | import os
import tempfile
import shutil
from unittest import TestCase
import yaml
from dusty import constants
from dusty.runner.compose import _write_composefile
class TestComposeRunner(TestCase):
def setUp(self):
self.temp_compose_dir = tempfile.mkdtemp()
self.temp_compose_path = os.path.join(se... | import os
import tempfile
import shutil
from unittest import TestCase
from mock import patch
import yaml
from dusty import constants
from dusty.runner.compose import _write_composefile, _get_docker_env
class TestComposeRunner(TestCase):
def setUp(self):
self.temp_compose_dir = tempfile.mkdtemp()
... | <commit_before>import os
import tempfile
import shutil
from unittest import TestCase
import yaml
from dusty import constants
from dusty.runner.compose import _write_composefile
class TestComposeRunner(TestCase):
def setUp(self):
self.temp_compose_dir = tempfile.mkdtemp()
self.temp_compose_path = ... | import os
import tempfile
import shutil
from unittest import TestCase
from mock import patch
import yaml
from dusty import constants
from dusty.runner.compose import _write_composefile, _get_docker_env
class TestComposeRunner(TestCase):
def setUp(self):
self.temp_compose_dir = tempfile.mkdtemp()
... | import os
import tempfile
import shutil
from unittest import TestCase
import yaml
from dusty import constants
from dusty.runner.compose import _write_composefile
class TestComposeRunner(TestCase):
def setUp(self):
self.temp_compose_dir = tempfile.mkdtemp()
self.temp_compose_path = os.path.join(se... | <commit_before>import os
import tempfile
import shutil
from unittest import TestCase
import yaml
from dusty import constants
from dusty.runner.compose import _write_composefile
class TestComposeRunner(TestCase):
def setUp(self):
self.temp_compose_dir = tempfile.mkdtemp()
self.temp_compose_path = ... |
a75ece6d38ccc5377092b37da9486b39594cae8b | sal/urls.py | sal/urls.py | import django.contrib.auth.views as auth_views
from django.conf import settings
from django.conf.urls import include, url
from django.conf.urls.static import static
from django.contrib import admin
from django.contrib.staticfiles import views
admin.autodiscover()
urlpatterns = [
url(r'^login/*$', auth_views.Login... | import django.contrib.auth.views as auth_views
from django.conf import settings
from django.conf.urls import include, url
from django.conf.urls.static import static
from django.contrib import admin
from django.contrib.staticfiles import views
admin.autodiscover()
urlpatterns = [
url(r'^login/*$', auth_views.Login... | Fix URLs for login/logout, and password changes. | Fix URLs for login/logout, and password changes.
| Python | apache-2.0 | salopensource/sal,salopensource/sal,sheagcraig/sal,salopensource/sal,sheagcraig/sal,sheagcraig/sal,sheagcraig/sal,salopensource/sal | import django.contrib.auth.views as auth_views
from django.conf import settings
from django.conf.urls import include, url
from django.conf.urls.static import static
from django.contrib import admin
from django.contrib.staticfiles import views
admin.autodiscover()
urlpatterns = [
url(r'^login/*$', auth_views.Login... | import django.contrib.auth.views as auth_views
from django.conf import settings
from django.conf.urls import include, url
from django.conf.urls.static import static
from django.contrib import admin
from django.contrib.staticfiles import views
admin.autodiscover()
urlpatterns = [
url(r'^login/*$', auth_views.Login... | <commit_before>import django.contrib.auth.views as auth_views
from django.conf import settings
from django.conf.urls import include, url
from django.conf.urls.static import static
from django.contrib import admin
from django.contrib.staticfiles import views
admin.autodiscover()
urlpatterns = [
url(r'^login/*$', a... | import django.contrib.auth.views as auth_views
from django.conf import settings
from django.conf.urls import include, url
from django.conf.urls.static import static
from django.contrib import admin
from django.contrib.staticfiles import views
admin.autodiscover()
urlpatterns = [
url(r'^login/*$', auth_views.Login... | import django.contrib.auth.views as auth_views
from django.conf import settings
from django.conf.urls import include, url
from django.conf.urls.static import static
from django.contrib import admin
from django.contrib.staticfiles import views
admin.autodiscover()
urlpatterns = [
url(r'^login/*$', auth_views.Login... | <commit_before>import django.contrib.auth.views as auth_views
from django.conf import settings
from django.conf.urls import include, url
from django.conf.urls.static import static
from django.contrib import admin
from django.contrib.staticfiles import views
admin.autodiscover()
urlpatterns = [
url(r'^login/*$', a... |
4c74a02b669efd7ec66dbc217d8e55f149cd94d1 | tests/test_parse.py | tests/test_parse.py | from hypothesis_auto import auto_pytest_magic
from isort import parse
auto_pytest_magic(parse.import_comment)
| from hypothesis_auto import auto_pytest_magic
from isort import parse
from isort.finders import FindersManager
from isort.settings import DEFAULT_SECTIONS, default
TEST_CONTENTS = """
import xyz
import abc
def function():
pass
"""
auto_pytest_magic(parse.import_comment)
auto_pytest_magic(parse.import_type)
auto... | Add test cases for parse modue | Add test cases for parse modue
| Python | mit | PyCQA/isort,PyCQA/isort | from hypothesis_auto import auto_pytest_magic
from isort import parse
auto_pytest_magic(parse.import_comment)
Add test cases for parse modue | from hypothesis_auto import auto_pytest_magic
from isort import parse
from isort.finders import FindersManager
from isort.settings import DEFAULT_SECTIONS, default
TEST_CONTENTS = """
import xyz
import abc
def function():
pass
"""
auto_pytest_magic(parse.import_comment)
auto_pytest_magic(parse.import_type)
auto... | <commit_before>from hypothesis_auto import auto_pytest_magic
from isort import parse
auto_pytest_magic(parse.import_comment)
<commit_msg>Add test cases for parse modue<commit_after> | from hypothesis_auto import auto_pytest_magic
from isort import parse
from isort.finders import FindersManager
from isort.settings import DEFAULT_SECTIONS, default
TEST_CONTENTS = """
import xyz
import abc
def function():
pass
"""
auto_pytest_magic(parse.import_comment)
auto_pytest_magic(parse.import_type)
auto... | from hypothesis_auto import auto_pytest_magic
from isort import parse
auto_pytest_magic(parse.import_comment)
Add test cases for parse moduefrom hypothesis_auto import auto_pytest_magic
from isort import parse
from isort.finders import FindersManager
from isort.settings import DEFAULT_SECTIONS, default
TEST_CONTENT... | <commit_before>from hypothesis_auto import auto_pytest_magic
from isort import parse
auto_pytest_magic(parse.import_comment)
<commit_msg>Add test cases for parse modue<commit_after>from hypothesis_auto import auto_pytest_magic
from isort import parse
from isort.finders import FindersManager
from isort.settings impor... |
78585c783013c6f06f7e20eee6a654759b70e99c | tests/test_ttfmt.py | tests/test_ttfmt.py | import unittest
class TestTtFmt(unittest.TestCase):
def testName(self):
pass
if __name__ == "__main__":
unittest.main() | import unittest
import tt.fmttools.ttfmt as ttfmt
class TestTtFmt(unittest.TestCase):
def test_get_vars(self):
data_provider = {
# Simple test cases
"F = A and B" : ["F", "A", "B"],
"F = A and B or C" : ["F", "A", "B", "... | Add basic tests for ttfmt get_vars method | Add basic tests for ttfmt get_vars method | Python | mit | welchbj/tt,welchbj/tt,welchbj/tt | import unittest
class TestTtFmt(unittest.TestCase):
def testName(self):
pass
if __name__ == "__main__":
unittest.main()Add basic tests for ttfmt get_vars method | import unittest
import tt.fmttools.ttfmt as ttfmt
class TestTtFmt(unittest.TestCase):
def test_get_vars(self):
data_provider = {
# Simple test cases
"F = A and B" : ["F", "A", "B"],
"F = A and B or C" : ["F", "A", "B", "... | <commit_before>import unittest
class TestTtFmt(unittest.TestCase):
def testName(self):
pass
if __name__ == "__main__":
unittest.main()<commit_msg>Add basic tests for ttfmt get_vars method<commit_after> | import unittest
import tt.fmttools.ttfmt as ttfmt
class TestTtFmt(unittest.TestCase):
def test_get_vars(self):
data_provider = {
# Simple test cases
"F = A and B" : ["F", "A", "B"],
"F = A and B or C" : ["F", "A", "B", "... | import unittest
class TestTtFmt(unittest.TestCase):
def testName(self):
pass
if __name__ == "__main__":
unittest.main()Add basic tests for ttfmt get_vars methodimport unittest
import tt.fmttools.ttfmt as ttfmt
class TestTtFmt(unittest.TestCase):
def test_get_vars(self):
... | <commit_before>import unittest
class TestTtFmt(unittest.TestCase):
def testName(self):
pass
if __name__ == "__main__":
unittest.main()<commit_msg>Add basic tests for ttfmt get_vars method<commit_after>import unittest
import tt.fmttools.ttfmt as ttfmt
class TestTtFmt(unittest.TestCase):
... |
c2eeb0a7d8d3a2692537f2004052b9fad9b1527a | tests/test_utils.py | tests/test_utils.py | import os
from unittest import TestCase
import requests
from furikura import utils
def test_request():
requests.get('https://example.com')
class TestUtils(TestCase):
def test_get_file(self):
self.assertEqual(utils.get_file("testfile"), "/usr/share/testfile")
def test_check_connection(self):
... | import os
from unittest import TestCase
import requests
from furikura import utils
def test_request():
requests.get('https://example.com')
class TestUtils(TestCase):
def test_get_file(self):
self.assertEqual(utils.get_file("testfile"), "/usr/share/testfile")
def test_check_connection(self):
... | Create autostart folder for tests | Create autostart folder for tests
| Python | mit | benjamindean/furi-kura,benjamindean/furi-kura | import os
from unittest import TestCase
import requests
from furikura import utils
def test_request():
requests.get('https://example.com')
class TestUtils(TestCase):
def test_get_file(self):
self.assertEqual(utils.get_file("testfile"), "/usr/share/testfile")
def test_check_connection(self):
... | import os
from unittest import TestCase
import requests
from furikura import utils
def test_request():
requests.get('https://example.com')
class TestUtils(TestCase):
def test_get_file(self):
self.assertEqual(utils.get_file("testfile"), "/usr/share/testfile")
def test_check_connection(self):
... | <commit_before>import os
from unittest import TestCase
import requests
from furikura import utils
def test_request():
requests.get('https://example.com')
class TestUtils(TestCase):
def test_get_file(self):
self.assertEqual(utils.get_file("testfile"), "/usr/share/testfile")
def test_check_conne... | import os
from unittest import TestCase
import requests
from furikura import utils
def test_request():
requests.get('https://example.com')
class TestUtils(TestCase):
def test_get_file(self):
self.assertEqual(utils.get_file("testfile"), "/usr/share/testfile")
def test_check_connection(self):
... | import os
from unittest import TestCase
import requests
from furikura import utils
def test_request():
requests.get('https://example.com')
class TestUtils(TestCase):
def test_get_file(self):
self.assertEqual(utils.get_file("testfile"), "/usr/share/testfile")
def test_check_connection(self):
... | <commit_before>import os
from unittest import TestCase
import requests
from furikura import utils
def test_request():
requests.get('https://example.com')
class TestUtils(TestCase):
def test_get_file(self):
self.assertEqual(utils.get_file("testfile"), "/usr/share/testfile")
def test_check_conne... |
fc8c949c58caaa012f166f1d0266e896f4ab0e3f | getTwitter.py | getTwitter.py | print 'This script will be used to get the page and information from tiwtter'
| import urllib2
print 'Welcome to the Get Twitter tool. This tool will allow you to download a page from Twitter to be used to extract the data'
userResponse = raw_input("Please enter the full URL from the Tweet page")
response = urllib2.urlopen(userResponse)
html = response.read()
| Allow user to input url | Allow user to input url
Allows the user to input a URL which will then be retrieved | Python | artistic-2.0 | christaylortf/FinalYearProject | print 'This script will be used to get the page and information from tiwtter'
Allow user to input url
Allows the user to input a URL which will then be retrieved | import urllib2
print 'Welcome to the Get Twitter tool. This tool will allow you to download a page from Twitter to be used to extract the data'
userResponse = raw_input("Please enter the full URL from the Tweet page")
response = urllib2.urlopen(userResponse)
html = response.read()
| <commit_before>print 'This script will be used to get the page and information from tiwtter'
<commit_msg>Allow user to input url
Allows the user to input a URL which will then be retrieved<commit_after> | import urllib2
print 'Welcome to the Get Twitter tool. This tool will allow you to download a page from Twitter to be used to extract the data'
userResponse = raw_input("Please enter the full URL from the Tweet page")
response = urllib2.urlopen(userResponse)
html = response.read()
| print 'This script will be used to get the page and information from tiwtter'
Allow user to input url
Allows the user to input a URL which will then be retrievedimport urllib2
print 'Welcome to the Get Twitter tool. This tool will allow you to download a page from Twitter to be used to extract the data'
userResponse... | <commit_before>print 'This script will be used to get the page and information from tiwtter'
<commit_msg>Allow user to input url
Allows the user to input a URL which will then be retrieved<commit_after>import urllib2
print 'Welcome to the Get Twitter tool. This tool will allow you to download a page from Twitter to b... |
dd68fbb86100d0d3da08172505e7c564cc5bd3e7 | monitor-notifier-slack.py | monitor-notifier-slack.py | #!/usr/bin/env python
import pika
import json
import requests
SLACK_WEBHOOK_URL = os.environ["SLACK_WEBHOOK_URL"]
RABBIT_MQ_SERVER = os.environ["RABBIT_MQ_SERVER"]
connection = pika.BlockingConnection(pika.ConnectionParameters(
RABBIT_MQ_SERVER))
channel = connection.channel()
channel.queue_declare(que... | #!/usr/bin/env python
import pika
import json
import requests
import os
RABBIT_MQ_SERVER = os.environ["RABBIT_MQ_SERVER"]
RABBIT_MQ_USER = os.environ["RABBIT_MQ_USER"]
RABBIT_MQ_PWD = os.environ["RABBIT_MQ_PWD"]
credentials = pika.PlainCredentials(RABBIT_MQ_USER, RABBIT_MQ_PWD)
connection = pika.BlockingConnection(p... | Add credentials + read webhook_url from notifier arguments | Add credentials + read webhook_url from notifier arguments
| Python | mit | observer-hackaton/monitor-notifier-slack | #!/usr/bin/env python
import pika
import json
import requests
SLACK_WEBHOOK_URL = os.environ["SLACK_WEBHOOK_URL"]
RABBIT_MQ_SERVER = os.environ["RABBIT_MQ_SERVER"]
connection = pika.BlockingConnection(pika.ConnectionParameters(
RABBIT_MQ_SERVER))
channel = connection.channel()
channel.queue_declare(que... | #!/usr/bin/env python
import pika
import json
import requests
import os
RABBIT_MQ_SERVER = os.environ["RABBIT_MQ_SERVER"]
RABBIT_MQ_USER = os.environ["RABBIT_MQ_USER"]
RABBIT_MQ_PWD = os.environ["RABBIT_MQ_PWD"]
credentials = pika.PlainCredentials(RABBIT_MQ_USER, RABBIT_MQ_PWD)
connection = pika.BlockingConnection(p... | <commit_before>#!/usr/bin/env python
import pika
import json
import requests
SLACK_WEBHOOK_URL = os.environ["SLACK_WEBHOOK_URL"]
RABBIT_MQ_SERVER = os.environ["RABBIT_MQ_SERVER"]
connection = pika.BlockingConnection(pika.ConnectionParameters(
RABBIT_MQ_SERVER))
channel = connection.channel()
channel.qu... | #!/usr/bin/env python
import pika
import json
import requests
import os
RABBIT_MQ_SERVER = os.environ["RABBIT_MQ_SERVER"]
RABBIT_MQ_USER = os.environ["RABBIT_MQ_USER"]
RABBIT_MQ_PWD = os.environ["RABBIT_MQ_PWD"]
credentials = pika.PlainCredentials(RABBIT_MQ_USER, RABBIT_MQ_PWD)
connection = pika.BlockingConnection(p... | #!/usr/bin/env python
import pika
import json
import requests
SLACK_WEBHOOK_URL = os.environ["SLACK_WEBHOOK_URL"]
RABBIT_MQ_SERVER = os.environ["RABBIT_MQ_SERVER"]
connection = pika.BlockingConnection(pika.ConnectionParameters(
RABBIT_MQ_SERVER))
channel = connection.channel()
channel.queue_declare(que... | <commit_before>#!/usr/bin/env python
import pika
import json
import requests
SLACK_WEBHOOK_URL = os.environ["SLACK_WEBHOOK_URL"]
RABBIT_MQ_SERVER = os.environ["RABBIT_MQ_SERVER"]
connection = pika.BlockingConnection(pika.ConnectionParameters(
RABBIT_MQ_SERVER))
channel = connection.channel()
channel.qu... |
275cec3a846093769eaddda87b753a7e5c224f59 | odbc2csv.py | odbc2csv.py | import pypyodbc
import csv
conn = pypyodbc.connect("DSN=HOSS_DB")
cur = conn.cursor()
tables = []
cur.execute("select * from sys.tables")
for row in cur.fetchall():
tables.append(row[0])
for table in tables:
print(table)
cur.execute("select * from {}".format(table))
column_names = []
for d i... | import pypyodbc
import csv
conn = pypyodbc.connect("DSN=HOSS_DB")
cur = conn.cursor()
tables = []
cur.execute("select * from sys.tables")
for row in cur.fetchall():
tables.append(row[0])
for table in tables:
print(table)
cur.execute("select * from {}".format(table))
column_names = []
for d i... | Use just newline for file terminator. | Use just newline for file terminator. | Python | isc | wablair/misc_scripts,wablair/misc_scripts,wablair/misc_scripts,wablair/misc_scripts | import pypyodbc
import csv
conn = pypyodbc.connect("DSN=HOSS_DB")
cur = conn.cursor()
tables = []
cur.execute("select * from sys.tables")
for row in cur.fetchall():
tables.append(row[0])
for table in tables:
print(table)
cur.execute("select * from {}".format(table))
column_names = []
for d i... | import pypyodbc
import csv
conn = pypyodbc.connect("DSN=HOSS_DB")
cur = conn.cursor()
tables = []
cur.execute("select * from sys.tables")
for row in cur.fetchall():
tables.append(row[0])
for table in tables:
print(table)
cur.execute("select * from {}".format(table))
column_names = []
for d i... | <commit_before>import pypyodbc
import csv
conn = pypyodbc.connect("DSN=HOSS_DB")
cur = conn.cursor()
tables = []
cur.execute("select * from sys.tables")
for row in cur.fetchall():
tables.append(row[0])
for table in tables:
print(table)
cur.execute("select * from {}".format(table))
column_names = ... | import pypyodbc
import csv
conn = pypyodbc.connect("DSN=HOSS_DB")
cur = conn.cursor()
tables = []
cur.execute("select * from sys.tables")
for row in cur.fetchall():
tables.append(row[0])
for table in tables:
print(table)
cur.execute("select * from {}".format(table))
column_names = []
for d i... | import pypyodbc
import csv
conn = pypyodbc.connect("DSN=HOSS_DB")
cur = conn.cursor()
tables = []
cur.execute("select * from sys.tables")
for row in cur.fetchall():
tables.append(row[0])
for table in tables:
print(table)
cur.execute("select * from {}".format(table))
column_names = []
for d i... | <commit_before>import pypyodbc
import csv
conn = pypyodbc.connect("DSN=HOSS_DB")
cur = conn.cursor()
tables = []
cur.execute("select * from sys.tables")
for row in cur.fetchall():
tables.append(row[0])
for table in tables:
print(table)
cur.execute("select * from {}".format(table))
column_names = ... |
c345e73ac22be8dde7e0230121e0e02b581d1209 | uncertainty/lib/nlp/summarizer.py | uncertainty/lib/nlp/summarizer.py | from . import chunktagger, lemmatizer, postagger, stemmer, tokenizer
class Summarizer(object):
def __init__(self, text):
self.text = text
def execute(self):
tokens = tokenizer.NLTKTokenizer(self.text).execute()
stems = stemmer.Stemmer(tokens).execute()
pos = postagger.PosTagge... | from . import chunktagger, lemmatizer, postagger, stemmer, tokenizer
class Summarizer(object):
def __init__(self, text):
self.text = text
def execute(self):
tokens = tokenizer.NLTKTokenizer(self.text).execute()
stems = stemmer.Stemmer(tokens).execute()
pos = postagger.PosTagge... | Fix bug that returned a zip object instead of list | Fix bug that returned a zip object instead of list
| Python | mit | meyersbs/uncertainty | from . import chunktagger, lemmatizer, postagger, stemmer, tokenizer
class Summarizer(object):
def __init__(self, text):
self.text = text
def execute(self):
tokens = tokenizer.NLTKTokenizer(self.text).execute()
stems = stemmer.Stemmer(tokens).execute()
pos = postagger.PosTagge... | from . import chunktagger, lemmatizer, postagger, stemmer, tokenizer
class Summarizer(object):
def __init__(self, text):
self.text = text
def execute(self):
tokens = tokenizer.NLTKTokenizer(self.text).execute()
stems = stemmer.Stemmer(tokens).execute()
pos = postagger.PosTagge... | <commit_before>from . import chunktagger, lemmatizer, postagger, stemmer, tokenizer
class Summarizer(object):
def __init__(self, text):
self.text = text
def execute(self):
tokens = tokenizer.NLTKTokenizer(self.text).execute()
stems = stemmer.Stemmer(tokens).execute()
pos = pos... | from . import chunktagger, lemmatizer, postagger, stemmer, tokenizer
class Summarizer(object):
def __init__(self, text):
self.text = text
def execute(self):
tokens = tokenizer.NLTKTokenizer(self.text).execute()
stems = stemmer.Stemmer(tokens).execute()
pos = postagger.PosTagge... | from . import chunktagger, lemmatizer, postagger, stemmer, tokenizer
class Summarizer(object):
def __init__(self, text):
self.text = text
def execute(self):
tokens = tokenizer.NLTKTokenizer(self.text).execute()
stems = stemmer.Stemmer(tokens).execute()
pos = postagger.PosTagge... | <commit_before>from . import chunktagger, lemmatizer, postagger, stemmer, tokenizer
class Summarizer(object):
def __init__(self, text):
self.text = text
def execute(self):
tokens = tokenizer.NLTKTokenizer(self.text).execute()
stems = stemmer.Stemmer(tokens).execute()
pos = pos... |
e22886416b04d3900bed76c699bbfcdb20534ea2 | semillas_backend/users/serializers.py | semillas_backend/users/serializers.py | #from phonenumber_field.serializerfields import PhoneNumberField
from rest_framework import serializers
from drf_extra_fields.geo_fields import PointField
from .models import User
class UserSerializer(serializers.ModelSerializer):
""" Usage:
from rest_framework.renderers import JSONRenderer
from ... | #from phonenumber_field.serializerfields import PhoneNumberField
from rest_framework import serializers
from drf_extra_fields.geo_fields import PointField
from .models import User
class UserSerializer(serializers.ModelSerializer):
""" Usage:
from rest_framework.renderers import JSONRenderer
from ... | Add is_staff to user serializer | Add is_staff to user serializer
| Python | mit | Semillas/semillas_platform,Semillas/semillas_platform,Semillas/semillas_backend,Semillas/semillas_platform,Semillas/semillas_platform,Semillas/semillas_backend,Semillas/semillas_backend,Semillas/semillas_backend | #from phonenumber_field.serializerfields import PhoneNumberField
from rest_framework import serializers
from drf_extra_fields.geo_fields import PointField
from .models import User
class UserSerializer(serializers.ModelSerializer):
""" Usage:
from rest_framework.renderers import JSONRenderer
from ... | #from phonenumber_field.serializerfields import PhoneNumberField
from rest_framework import serializers
from drf_extra_fields.geo_fields import PointField
from .models import User
class UserSerializer(serializers.ModelSerializer):
""" Usage:
from rest_framework.renderers import JSONRenderer
from ... | <commit_before>#from phonenumber_field.serializerfields import PhoneNumberField
from rest_framework import serializers
from drf_extra_fields.geo_fields import PointField
from .models import User
class UserSerializer(serializers.ModelSerializer):
""" Usage:
from rest_framework.renderers import JSONRendere... | #from phonenumber_field.serializerfields import PhoneNumberField
from rest_framework import serializers
from drf_extra_fields.geo_fields import PointField
from .models import User
class UserSerializer(serializers.ModelSerializer):
""" Usage:
from rest_framework.renderers import JSONRenderer
from ... | #from phonenumber_field.serializerfields import PhoneNumberField
from rest_framework import serializers
from drf_extra_fields.geo_fields import PointField
from .models import User
class UserSerializer(serializers.ModelSerializer):
""" Usage:
from rest_framework.renderers import JSONRenderer
from ... | <commit_before>#from phonenumber_field.serializerfields import PhoneNumberField
from rest_framework import serializers
from drf_extra_fields.geo_fields import PointField
from .models import User
class UserSerializer(serializers.ModelSerializer):
""" Usage:
from rest_framework.renderers import JSONRendere... |
dd50adfa567f7be04b3c000508f3f649147be387 | scripts/update_vv.py | scripts/update_vv.py | #!/usr/bin/env python
import mica.vv
mica.vv.update()
| #!/usr/bin/env python
import matplotlib
matplotlib.use('Agg')
import mica.vv
mica.vv.update()
| Set vv cron script to use Agg backend | Set vv cron script to use Agg backend
| Python | bsd-3-clause | sot/mica,sot/mica | #!/usr/bin/env python
import mica.vv
mica.vv.update()
Set vv cron script to use Agg backend | #!/usr/bin/env python
import matplotlib
matplotlib.use('Agg')
import mica.vv
mica.vv.update()
| <commit_before>#!/usr/bin/env python
import mica.vv
mica.vv.update()
<commit_msg>Set vv cron script to use Agg backend<commit_after> | #!/usr/bin/env python
import matplotlib
matplotlib.use('Agg')
import mica.vv
mica.vv.update()
| #!/usr/bin/env python
import mica.vv
mica.vv.update()
Set vv cron script to use Agg backend#!/usr/bin/env python
import matplotlib
matplotlib.use('Agg')
import mica.vv
mica.vv.update()
| <commit_before>#!/usr/bin/env python
import mica.vv
mica.vv.update()
<commit_msg>Set vv cron script to use Agg backend<commit_after>#!/usr/bin/env python
import matplotlib
matplotlib.use('Agg')
import mica.vv
mica.vv.update()
|
d2520f8834c7010d0896414ed9e49c8c65ef6df5 | altair/vegalite/v2/examples/connected_scatterplot.py | altair/vegalite/v2/examples/connected_scatterplot.py | """
Connected Scatterplot (Lines with Custom Paths)
-----------------------------------------------
This example show how the order encoding can be used to draw a custom path. The dataset tracks miles driven per capita along with gas prices annually from 1956 to 2010. It is based on Hannah Fairfield's article 'Driving... | """
Connected Scatterplot (Lines with Custom Paths)
-----------------------------------------------
This example show how the order encoding can be used to draw a custom path. The dataset tracks miles driven per capita along with gas prices annually from 1956 to 2010.
It is based on Hannah Fairfield's article 'Drivin... | Add line break to connect scatter plot doc string | DOC: Add line break to connect scatter plot doc string
| Python | bsd-3-clause | altair-viz/altair,jakevdp/altair | """
Connected Scatterplot (Lines with Custom Paths)
-----------------------------------------------
This example show how the order encoding can be used to draw a custom path. The dataset tracks miles driven per capita along with gas prices annually from 1956 to 2010. It is based on Hannah Fairfield's article 'Driving... | """
Connected Scatterplot (Lines with Custom Paths)
-----------------------------------------------
This example show how the order encoding can be used to draw a custom path. The dataset tracks miles driven per capita along with gas prices annually from 1956 to 2010.
It is based on Hannah Fairfield's article 'Drivin... | <commit_before>"""
Connected Scatterplot (Lines with Custom Paths)
-----------------------------------------------
This example show how the order encoding can be used to draw a custom path. The dataset tracks miles driven per capita along with gas prices annually from 1956 to 2010. It is based on Hannah Fairfield's a... | """
Connected Scatterplot (Lines with Custom Paths)
-----------------------------------------------
This example show how the order encoding can be used to draw a custom path. The dataset tracks miles driven per capita along with gas prices annually from 1956 to 2010.
It is based on Hannah Fairfield's article 'Drivin... | """
Connected Scatterplot (Lines with Custom Paths)
-----------------------------------------------
This example show how the order encoding can be used to draw a custom path. The dataset tracks miles driven per capita along with gas prices annually from 1956 to 2010. It is based on Hannah Fairfield's article 'Driving... | <commit_before>"""
Connected Scatterplot (Lines with Custom Paths)
-----------------------------------------------
This example show how the order encoding can be used to draw a custom path. The dataset tracks miles driven per capita along with gas prices annually from 1956 to 2010. It is based on Hannah Fairfield's a... |
51854e2f437c3abc2a89d4e31e10aa6b36eef2e1 | pylons/__init__.py | pylons/__init__.py | """Base objects to be exported for use in Controllers"""
from paste.registry import StackedObjectProxy
from pylons.configuration import config
__all__ = ['app_globals', 'cache', 'config', 'request', 'response',
'session', 'tmpl_context', 'url']
def __figure_version():
try:
from pkg_resources i... | """Base objects to be exported for use in Controllers"""
# Import pkg_resources first so namespace handling is properly done so the
# paste imports work
import pkg_resources
from paste.registry import StackedObjectProxy
from pylons.configuration import config
__all__ = ['app_globals', 'cache', 'config', 'request', '... | Handle namespacing properly so pylons imports without errors. | Handle namespacing properly so pylons imports without errors.
--HG--
branch : trunk
| Python | bsd-3-clause | Pylons/pylons,Pylons/pylons,moreati/pylons,Pylons/pylons,moreati/pylons,moreati/pylons | """Base objects to be exported for use in Controllers"""
from paste.registry import StackedObjectProxy
from pylons.configuration import config
__all__ = ['app_globals', 'cache', 'config', 'request', 'response',
'session', 'tmpl_context', 'url']
def __figure_version():
try:
from pkg_resources i... | """Base objects to be exported for use in Controllers"""
# Import pkg_resources first so namespace handling is properly done so the
# paste imports work
import pkg_resources
from paste.registry import StackedObjectProxy
from pylons.configuration import config
__all__ = ['app_globals', 'cache', 'config', 'request', '... | <commit_before>"""Base objects to be exported for use in Controllers"""
from paste.registry import StackedObjectProxy
from pylons.configuration import config
__all__ = ['app_globals', 'cache', 'config', 'request', 'response',
'session', 'tmpl_context', 'url']
def __figure_version():
try:
from ... | """Base objects to be exported for use in Controllers"""
# Import pkg_resources first so namespace handling is properly done so the
# paste imports work
import pkg_resources
from paste.registry import StackedObjectProxy
from pylons.configuration import config
__all__ = ['app_globals', 'cache', 'config', 'request', '... | """Base objects to be exported for use in Controllers"""
from paste.registry import StackedObjectProxy
from pylons.configuration import config
__all__ = ['app_globals', 'cache', 'config', 'request', 'response',
'session', 'tmpl_context', 'url']
def __figure_version():
try:
from pkg_resources i... | <commit_before>"""Base objects to be exported for use in Controllers"""
from paste.registry import StackedObjectProxy
from pylons.configuration import config
__all__ = ['app_globals', 'cache', 'config', 'request', 'response',
'session', 'tmpl_context', 'url']
def __figure_version():
try:
from ... |
bc4486063325fc18bee00ba3ee8ba4e5e2323bee | doc/tools/make_cookbook.py | doc/tools/make_cookbook.py | """
Generate the rst files for the cookbook from the recipes.
"""
import sys
import os
body = r"""
.. raw:: html
[<a href="{code}">source code</a>]
.. literalinclude:: {code}
:language: python
:linenos:
"""
def recipe_to_rst(recipe):
"""
Convert a .py recipe to a .rst entry for sphinx
"""
... | """
Generate the rst files for the cookbook from the recipes.
"""
import sys
import os
body = r"""
**Download** source code: :download:`{recipe}<{code}>`
.. literalinclude:: {code}
:language: python
"""
def recipe_to_rst(recipe):
"""
Convert a .py recipe to a .rst entry for sphinx
"""
sys.stderr... | Remove line numbers from recipe code | Remove line numbers from recipe code
The larger font made the numbers not match the code.
Added better link text to download the recipe.
| Python | bsd-3-clause | santis19/fatiando,rafaelmds/fatiando,drandykass/fatiando,eusoubrasileiro/fatiando,eusoubrasileiro/fatiando,eusoubrasileiro/fatiando_seismic,fatiando/fatiando,eusoubrasileiro/fatiando_seismic,victortxa/fatiando,fatiando/fatiando,rafaelmds/fatiando,victortxa/fatiando,cmeessen/fatiando,santis19/fatiando,mtb-za/fatiando,eu... | """
Generate the rst files for the cookbook from the recipes.
"""
import sys
import os
body = r"""
.. raw:: html
[<a href="{code}">source code</a>]
.. literalinclude:: {code}
:language: python
:linenos:
"""
def recipe_to_rst(recipe):
"""
Convert a .py recipe to a .rst entry for sphinx
"""
... | """
Generate the rst files for the cookbook from the recipes.
"""
import sys
import os
body = r"""
**Download** source code: :download:`{recipe}<{code}>`
.. literalinclude:: {code}
:language: python
"""
def recipe_to_rst(recipe):
"""
Convert a .py recipe to a .rst entry for sphinx
"""
sys.stderr... | <commit_before>"""
Generate the rst files for the cookbook from the recipes.
"""
import sys
import os
body = r"""
.. raw:: html
[<a href="{code}">source code</a>]
.. literalinclude:: {code}
:language: python
:linenos:
"""
def recipe_to_rst(recipe):
"""
Convert a .py recipe to a .rst entry for sp... | """
Generate the rst files for the cookbook from the recipes.
"""
import sys
import os
body = r"""
**Download** source code: :download:`{recipe}<{code}>`
.. literalinclude:: {code}
:language: python
"""
def recipe_to_rst(recipe):
"""
Convert a .py recipe to a .rst entry for sphinx
"""
sys.stderr... | """
Generate the rst files for the cookbook from the recipes.
"""
import sys
import os
body = r"""
.. raw:: html
[<a href="{code}">source code</a>]
.. literalinclude:: {code}
:language: python
:linenos:
"""
def recipe_to_rst(recipe):
"""
Convert a .py recipe to a .rst entry for sphinx
"""
... | <commit_before>"""
Generate the rst files for the cookbook from the recipes.
"""
import sys
import os
body = r"""
.. raw:: html
[<a href="{code}">source code</a>]
.. literalinclude:: {code}
:language: python
:linenos:
"""
def recipe_to_rst(recipe):
"""
Convert a .py recipe to a .rst entry for sp... |
bfbdf34e2efd1d22ee6f15f4655334764106725c | locksmith/lightauth/common.py | locksmith/lightauth/common.py | from locksmith.common import apicall
try:
from django.conf import settings
SIGNING_KEY = settings.LOCKSMITH_SIGNING_KEY,
API_NAME = settings.LOCKSMITH_API_NAME
ENDPOINT = settings.LOCKSMITH_HUB_URL.replace('analytics', 'accounts') + 'checkkey/'
except:
SIGNING_KEY = ""
API_NAME = ""
ENDPOIN... | from locksmith.common import apicall
import urllib2
try:
from django.conf import settings
SIGNING_KEY = settings.LOCKSMITH_SIGNING_KEY
API_NAME = settings.LOCKSMITH_API_NAME
ENDPOINT = settings.LOCKSMITH_HUB_URL.replace('analytics', 'accounts') + 'checkkey/'
except:
SIGNING_KEY = ""
API_NAME = ... | Make client key checking actually work. | Make client key checking actually work.
| Python | bsd-3-clause | sunlightlabs/django-locksmith,sunlightlabs/django-locksmith,sunlightlabs/django-locksmith | from locksmith.common import apicall
try:
from django.conf import settings
SIGNING_KEY = settings.LOCKSMITH_SIGNING_KEY,
API_NAME = settings.LOCKSMITH_API_NAME
ENDPOINT = settings.LOCKSMITH_HUB_URL.replace('analytics', 'accounts') + 'checkkey/'
except:
SIGNING_KEY = ""
API_NAME = ""
ENDPOIN... | from locksmith.common import apicall
import urllib2
try:
from django.conf import settings
SIGNING_KEY = settings.LOCKSMITH_SIGNING_KEY
API_NAME = settings.LOCKSMITH_API_NAME
ENDPOINT = settings.LOCKSMITH_HUB_URL.replace('analytics', 'accounts') + 'checkkey/'
except:
SIGNING_KEY = ""
API_NAME = ... | <commit_before>from locksmith.common import apicall
try:
from django.conf import settings
SIGNING_KEY = settings.LOCKSMITH_SIGNING_KEY,
API_NAME = settings.LOCKSMITH_API_NAME
ENDPOINT = settings.LOCKSMITH_HUB_URL.replace('analytics', 'accounts') + 'checkkey/'
except:
SIGNING_KEY = ""
API_NAME =... | from locksmith.common import apicall
import urllib2
try:
from django.conf import settings
SIGNING_KEY = settings.LOCKSMITH_SIGNING_KEY
API_NAME = settings.LOCKSMITH_API_NAME
ENDPOINT = settings.LOCKSMITH_HUB_URL.replace('analytics', 'accounts') + 'checkkey/'
except:
SIGNING_KEY = ""
API_NAME = ... | from locksmith.common import apicall
try:
from django.conf import settings
SIGNING_KEY = settings.LOCKSMITH_SIGNING_KEY,
API_NAME = settings.LOCKSMITH_API_NAME
ENDPOINT = settings.LOCKSMITH_HUB_URL.replace('analytics', 'accounts') + 'checkkey/'
except:
SIGNING_KEY = ""
API_NAME = ""
ENDPOIN... | <commit_before>from locksmith.common import apicall
try:
from django.conf import settings
SIGNING_KEY = settings.LOCKSMITH_SIGNING_KEY,
API_NAME = settings.LOCKSMITH_API_NAME
ENDPOINT = settings.LOCKSMITH_HUB_URL.replace('analytics', 'accounts') + 'checkkey/'
except:
SIGNING_KEY = ""
API_NAME =... |
eecb3468b581b4854f2162c2b62ac06ea744045e | malcolm/core/attributemeta.py | malcolm/core/attributemeta.py | from collections import OrderedDict
from malcolm.core.serializable import Serializable
class AttributeMeta(Serializable):
"""Abstract base class for Meta objects"""
# Type constants
SCALAR = "scalar"
TABLE = "table"
SCALARARRAY = "scalar_array"
def __init__(self, name, description, *args):
... | from collections import OrderedDict
from malcolm.core.serializable import Serializable
class AttributeMeta(Serializable):
"""Abstract base class for Meta objects"""
def __init__(self, name, description, *args):
super(AttributeMeta, self).__init__(name, *args)
self.description = description
... | Remove unused AttributeMeta type constants | Remove unused AttributeMeta type constants
| Python | apache-2.0 | dls-controls/pymalcolm,dls-controls/pymalcolm,dls-controls/pymalcolm | from collections import OrderedDict
from malcolm.core.serializable import Serializable
class AttributeMeta(Serializable):
"""Abstract base class for Meta objects"""
# Type constants
SCALAR = "scalar"
TABLE = "table"
SCALARARRAY = "scalar_array"
def __init__(self, name, description, *args):
... | from collections import OrderedDict
from malcolm.core.serializable import Serializable
class AttributeMeta(Serializable):
"""Abstract base class for Meta objects"""
def __init__(self, name, description, *args):
super(AttributeMeta, self).__init__(name, *args)
self.description = description
... | <commit_before>from collections import OrderedDict
from malcolm.core.serializable import Serializable
class AttributeMeta(Serializable):
"""Abstract base class for Meta objects"""
# Type constants
SCALAR = "scalar"
TABLE = "table"
SCALARARRAY = "scalar_array"
def __init__(self, name, descri... | from collections import OrderedDict
from malcolm.core.serializable import Serializable
class AttributeMeta(Serializable):
"""Abstract base class for Meta objects"""
def __init__(self, name, description, *args):
super(AttributeMeta, self).__init__(name, *args)
self.description = description
... | from collections import OrderedDict
from malcolm.core.serializable import Serializable
class AttributeMeta(Serializable):
"""Abstract base class for Meta objects"""
# Type constants
SCALAR = "scalar"
TABLE = "table"
SCALARARRAY = "scalar_array"
def __init__(self, name, description, *args):
... | <commit_before>from collections import OrderedDict
from malcolm.core.serializable import Serializable
class AttributeMeta(Serializable):
"""Abstract base class for Meta objects"""
# Type constants
SCALAR = "scalar"
TABLE = "table"
SCALARARRAY = "scalar_array"
def __init__(self, name, descri... |
cb72ad84b9fdb15d7311220eb1762c8c2fe94fab | wagtailmenus/settings.py | wagtailmenus/settings.py | # -*- coding: utf-8 -*-
from django.conf import settings
ACTIVE_CLASS = getattr(
settings, 'WAGTAILMENUS_ACTIVE_CLASS', 'active')
ACTIVE_ANCESTOR_CLASS = getattr(
settings, 'WAGTAILMENUS_ACTIVE_ANCESTOR_CLASS', 'ancestor')
MAINMENU_MENU_ICON = getattr(
settings, 'WAGTAILMENUS_MAINMENU_MENU_ICON', 'list-ol')
FLAT... | # -*- coding: utf-8 -*-
from django.conf import settings
ACTIVE_CLASS = getattr(
settings, 'WAGTAILMENUS_ACTIVE_CLASS', 'active')
ACTIVE_ANCESTOR_CLASS = getattr(
settings, 'WAGTAILMENUS_ACTIVE_ANCESTOR_CLASS', 'ancestor')
MAINMENU_MENU_ICON = getattr(
settings, 'WAGTAILMENUS_MAINMENU_MENU_ICON', 'list-ol')
FLAT... | Fix setting reference for FLATMENU_MENU_ICON | Fix setting reference for FLATMENU_MENU_ICON
| Python | mit | ababic/wagtailmenus,ababic/wagtailmenus,frague59/wagtailmenus,frague59/wagtailmenus,frague59/wagtailmenus,rkhleics/wagtailmenus,ababic/wagtailmenus,rkhleics/wagtailmenus,rkhleics/wagtailmenus | # -*- coding: utf-8 -*-
from django.conf import settings
ACTIVE_CLASS = getattr(
settings, 'WAGTAILMENUS_ACTIVE_CLASS', 'active')
ACTIVE_ANCESTOR_CLASS = getattr(
settings, 'WAGTAILMENUS_ACTIVE_ANCESTOR_CLASS', 'ancestor')
MAINMENU_MENU_ICON = getattr(
settings, 'WAGTAILMENUS_MAINMENU_MENU_ICON', 'list-ol')
FLAT... | # -*- coding: utf-8 -*-
from django.conf import settings
ACTIVE_CLASS = getattr(
settings, 'WAGTAILMENUS_ACTIVE_CLASS', 'active')
ACTIVE_ANCESTOR_CLASS = getattr(
settings, 'WAGTAILMENUS_ACTIVE_ANCESTOR_CLASS', 'ancestor')
MAINMENU_MENU_ICON = getattr(
settings, 'WAGTAILMENUS_MAINMENU_MENU_ICON', 'list-ol')
FLAT... | <commit_before># -*- coding: utf-8 -*-
from django.conf import settings
ACTIVE_CLASS = getattr(
settings, 'WAGTAILMENUS_ACTIVE_CLASS', 'active')
ACTIVE_ANCESTOR_CLASS = getattr(
settings, 'WAGTAILMENUS_ACTIVE_ANCESTOR_CLASS', 'ancestor')
MAINMENU_MENU_ICON = getattr(
settings, 'WAGTAILMENUS_MAINMENU_MENU_ICON', '... | # -*- coding: utf-8 -*-
from django.conf import settings
ACTIVE_CLASS = getattr(
settings, 'WAGTAILMENUS_ACTIVE_CLASS', 'active')
ACTIVE_ANCESTOR_CLASS = getattr(
settings, 'WAGTAILMENUS_ACTIVE_ANCESTOR_CLASS', 'ancestor')
MAINMENU_MENU_ICON = getattr(
settings, 'WAGTAILMENUS_MAINMENU_MENU_ICON', 'list-ol')
FLAT... | # -*- coding: utf-8 -*-
from django.conf import settings
ACTIVE_CLASS = getattr(
settings, 'WAGTAILMENUS_ACTIVE_CLASS', 'active')
ACTIVE_ANCESTOR_CLASS = getattr(
settings, 'WAGTAILMENUS_ACTIVE_ANCESTOR_CLASS', 'ancestor')
MAINMENU_MENU_ICON = getattr(
settings, 'WAGTAILMENUS_MAINMENU_MENU_ICON', 'list-ol')
FLAT... | <commit_before># -*- coding: utf-8 -*-
from django.conf import settings
ACTIVE_CLASS = getattr(
settings, 'WAGTAILMENUS_ACTIVE_CLASS', 'active')
ACTIVE_ANCESTOR_CLASS = getattr(
settings, 'WAGTAILMENUS_ACTIVE_ANCESTOR_CLASS', 'ancestor')
MAINMENU_MENU_ICON = getattr(
settings, 'WAGTAILMENUS_MAINMENU_MENU_ICON', '... |
a49a3c133478c01774adfe8853b608e110a5a2e6 | examples/test_double_click.py | examples/test_double_click.py | from seleniumbase import BaseCase
class MyTestClass(BaseCase):
def test_double_click(self):
self.open("https://www.w3schools.com/jsref"
"/tryit.asp?filename=tryjsref_ondblclick")
self.switch_to_frame("iframeResult")
self.double_click('[ondblclick="myFunction()"]')
... | from seleniumbase import BaseCase
class MyTestClass(BaseCase):
def test_double_click_and_switch_to_frame(self):
self.open("https://www.w3schools.com/jsref"
"/tryit.asp?filename=tryjsref_ondblclick")
self.ad_block()
self.switch_to_frame("#iframeResult")
self.doubl... | Update a test for entering iframes and double-clicking | Update a test for entering iframes and double-clicking
| Python | mit | seleniumbase/SeleniumBase,mdmintz/SeleniumBase,seleniumbase/SeleniumBase,seleniumbase/SeleniumBase,mdmintz/SeleniumBase,mdmintz/SeleniumBase,seleniumbase/SeleniumBase,mdmintz/SeleniumBase | from seleniumbase import BaseCase
class MyTestClass(BaseCase):
def test_double_click(self):
self.open("https://www.w3schools.com/jsref"
"/tryit.asp?filename=tryjsref_ondblclick")
self.switch_to_frame("iframeResult")
self.double_click('[ondblclick="myFunction()"]')
... | from seleniumbase import BaseCase
class MyTestClass(BaseCase):
def test_double_click_and_switch_to_frame(self):
self.open("https://www.w3schools.com/jsref"
"/tryit.asp?filename=tryjsref_ondblclick")
self.ad_block()
self.switch_to_frame("#iframeResult")
self.doubl... | <commit_before>from seleniumbase import BaseCase
class MyTestClass(BaseCase):
def test_double_click(self):
self.open("https://www.w3schools.com/jsref"
"/tryit.asp?filename=tryjsref_ondblclick")
self.switch_to_frame("iframeResult")
self.double_click('[ondblclick="myFuncti... | from seleniumbase import BaseCase
class MyTestClass(BaseCase):
def test_double_click_and_switch_to_frame(self):
self.open("https://www.w3schools.com/jsref"
"/tryit.asp?filename=tryjsref_ondblclick")
self.ad_block()
self.switch_to_frame("#iframeResult")
self.doubl... | from seleniumbase import BaseCase
class MyTestClass(BaseCase):
def test_double_click(self):
self.open("https://www.w3schools.com/jsref"
"/tryit.asp?filename=tryjsref_ondblclick")
self.switch_to_frame("iframeResult")
self.double_click('[ondblclick="myFunction()"]')
... | <commit_before>from seleniumbase import BaseCase
class MyTestClass(BaseCase):
def test_double_click(self):
self.open("https://www.w3schools.com/jsref"
"/tryit.asp?filename=tryjsref_ondblclick")
self.switch_to_frame("iframeResult")
self.double_click('[ondblclick="myFuncti... |
6d43df828cb34c8949c8f87c256bde2e6ccb7d3c | atamatracker/moviefile.py | atamatracker/moviefile.py | """Movie module for atamaTracker
"""
import cv2
class Movie(object):
"""Movie file object.
"""
def __init__(self, file_path):
self.__capture = cv2.VideoCapture(file_path)
def __del__(self):
self.__capture.release()
def load_image(self, time_sec):
"""Load image at the de... | """Movie module for atamaTracker
"""
import cv2
class Movie(object):
"""Movie file object.
Public properties:
fps (read-only) -- [float] frames per second
width (read-only) -- [int] frame dimension
height (read-only) -- [int] frame dimension
"""
def __init__(self, file_path):
ca... | Add some useful read-only properties to Movie class | Add some useful read-only properties to Movie class
| Python | mit | ptsg/AtamaTracker | """Movie module for atamaTracker
"""
import cv2
class Movie(object):
"""Movie file object.
"""
def __init__(self, file_path):
self.__capture = cv2.VideoCapture(file_path)
def __del__(self):
self.__capture.release()
def load_image(self, time_sec):
"""Load image at the de... | """Movie module for atamaTracker
"""
import cv2
class Movie(object):
"""Movie file object.
Public properties:
fps (read-only) -- [float] frames per second
width (read-only) -- [int] frame dimension
height (read-only) -- [int] frame dimension
"""
def __init__(self, file_path):
ca... | <commit_before>"""Movie module for atamaTracker
"""
import cv2
class Movie(object):
"""Movie file object.
"""
def __init__(self, file_path):
self.__capture = cv2.VideoCapture(file_path)
def __del__(self):
self.__capture.release()
def load_image(self, time_sec):
"""Load ... | """Movie module for atamaTracker
"""
import cv2
class Movie(object):
"""Movie file object.
Public properties:
fps (read-only) -- [float] frames per second
width (read-only) -- [int] frame dimension
height (read-only) -- [int] frame dimension
"""
def __init__(self, file_path):
ca... | """Movie module for atamaTracker
"""
import cv2
class Movie(object):
"""Movie file object.
"""
def __init__(self, file_path):
self.__capture = cv2.VideoCapture(file_path)
def __del__(self):
self.__capture.release()
def load_image(self, time_sec):
"""Load image at the de... | <commit_before>"""Movie module for atamaTracker
"""
import cv2
class Movie(object):
"""Movie file object.
"""
def __init__(self, file_path):
self.__capture = cv2.VideoCapture(file_path)
def __del__(self):
self.__capture.release()
def load_image(self, time_sec):
"""Load ... |
0a7dfca0e4783abc24a6ec9d0bd9b84219593a1f | common/djangoapps/util/json_request.py | common/djangoapps/util/json_request.py | from functools import wraps
import copy
import json
def expect_json(view_function):
@wraps(view_function)
def expect_json_with_cloned_request(request, *args, **kwargs):
if request.META['CONTENT_TYPE'] == "application/json":
cloned_request = copy.copy(request)
cloned_request.POS... | from functools import wraps
import copy
import json
def expect_json(view_function):
@wraps(view_function)
def expect_json_with_cloned_request(request, *args, **kwargs):
# cdodge: fix postback errors in CMS. The POST 'content-type' header can include additional information
# e.g. 'charset', so ... | Fix JSON postback error where the content-type header line can contain more info than just the application/json descriptor. Now we just to a compare on the start of the header value. | Fix JSON postback error where the content-type header line can contain more info than just the application/json descriptor. Now we just to a compare on the start of the header value.
| Python | agpl-3.0 | deepsrijit1105/edx-platform,waheedahmed/edx-platform,jamesblunt/edx-platform,pku9104038/edx-platform,prarthitm/edxplatform,rismalrv/edx-platform,kamalx/edx-platform,LICEF/edx-platform,miptliot/edx-platform,abdoosh00/edraak,RPI-OPENEDX/edx-platform,shubhdev/edxOnBaadal,mtlchun/edx,Ayub-Khan/edx-platform,rationalAgent/ed... | from functools import wraps
import copy
import json
def expect_json(view_function):
@wraps(view_function)
def expect_json_with_cloned_request(request, *args, **kwargs):
if request.META['CONTENT_TYPE'] == "application/json":
cloned_request = copy.copy(request)
cloned_request.POS... | from functools import wraps
import copy
import json
def expect_json(view_function):
@wraps(view_function)
def expect_json_with_cloned_request(request, *args, **kwargs):
# cdodge: fix postback errors in CMS. The POST 'content-type' header can include additional information
# e.g. 'charset', so ... | <commit_before>from functools import wraps
import copy
import json
def expect_json(view_function):
@wraps(view_function)
def expect_json_with_cloned_request(request, *args, **kwargs):
if request.META['CONTENT_TYPE'] == "application/json":
cloned_request = copy.copy(request)
clo... | from functools import wraps
import copy
import json
def expect_json(view_function):
@wraps(view_function)
def expect_json_with_cloned_request(request, *args, **kwargs):
# cdodge: fix postback errors in CMS. The POST 'content-type' header can include additional information
# e.g. 'charset', so ... | from functools import wraps
import copy
import json
def expect_json(view_function):
@wraps(view_function)
def expect_json_with_cloned_request(request, *args, **kwargs):
if request.META['CONTENT_TYPE'] == "application/json":
cloned_request = copy.copy(request)
cloned_request.POS... | <commit_before>from functools import wraps
import copy
import json
def expect_json(view_function):
@wraps(view_function)
def expect_json_with_cloned_request(request, *args, **kwargs):
if request.META['CONTENT_TYPE'] == "application/json":
cloned_request = copy.copy(request)
clo... |
7af8ee5ca8a036ae2339187b689507989d43aaa6 | elmo/moon_tracker/utils.py | elmo/moon_tracker/utils.py | def user_can_view_scans(user, moon):
return (
user_can_delete_scans(user, moon) or
user.has_perm('eve_sde.can_view_scans', moon.planet.system) or
user.has_perm('eve_sde.can_view_scans', moon.planet.system.constellation) or
user.has_perm('eve_sde.can_view_scans', moon.planet.system.co... | def user_can_view_scans(user, moon):
return (
user_can_delete_scans(user, moon) or
user.has_perm('eve_sde.sys_can_view_scans', moon.planet.system) or
user.has_perm('eve_sde.con_can_view_scans', moon.planet.system.constellation) or
user.has_perm('eve_sde.reg_can_view_scans', moon.plan... | Update the permission helper functions. | Update the permission helper functions.
| Python | mit | StephenSwat/eve_lunar_mining_organiser,StephenSwat/eve_lunar_mining_organiser | def user_can_view_scans(user, moon):
return (
user_can_delete_scans(user, moon) or
user.has_perm('eve_sde.can_view_scans', moon.planet.system) or
user.has_perm('eve_sde.can_view_scans', moon.planet.system.constellation) or
user.has_perm('eve_sde.can_view_scans', moon.planet.system.co... | def user_can_view_scans(user, moon):
return (
user_can_delete_scans(user, moon) or
user.has_perm('eve_sde.sys_can_view_scans', moon.planet.system) or
user.has_perm('eve_sde.con_can_view_scans', moon.planet.system.constellation) or
user.has_perm('eve_sde.reg_can_view_scans', moon.plan... | <commit_before>def user_can_view_scans(user, moon):
return (
user_can_delete_scans(user, moon) or
user.has_perm('eve_sde.can_view_scans', moon.planet.system) or
user.has_perm('eve_sde.can_view_scans', moon.planet.system.constellation) or
user.has_perm('eve_sde.can_view_scans', moon.p... | def user_can_view_scans(user, moon):
return (
user_can_delete_scans(user, moon) or
user.has_perm('eve_sde.sys_can_view_scans', moon.planet.system) or
user.has_perm('eve_sde.con_can_view_scans', moon.planet.system.constellation) or
user.has_perm('eve_sde.reg_can_view_scans', moon.plan... | def user_can_view_scans(user, moon):
return (
user_can_delete_scans(user, moon) or
user.has_perm('eve_sde.can_view_scans', moon.planet.system) or
user.has_perm('eve_sde.can_view_scans', moon.planet.system.constellation) or
user.has_perm('eve_sde.can_view_scans', moon.planet.system.co... | <commit_before>def user_can_view_scans(user, moon):
return (
user_can_delete_scans(user, moon) or
user.has_perm('eve_sde.can_view_scans', moon.planet.system) or
user.has_perm('eve_sde.can_view_scans', moon.planet.system.constellation) or
user.has_perm('eve_sde.can_view_scans', moon.p... |
184cc6448a7bed4c945b0c5cb1e3739c3fb9c7f8 | examples/list_vmss_pips.py | examples/list_vmss_pips.py | import azurerm
import json
import sys
# check for single command argument
if len(sys.argv) == 3:
rg = sys.argv[1]
vmss = sys.argv[2]
else:
sys.exit('Expecting resource group name and vmss name as arguments.')
# Load Azure app defaults
try:
with open('azurermconfig.json') as configFile:
c... | import argparse
import azurerm
import json
import re
import sys
# validate command line arguments
argParser = argparse.ArgumentParser()
argParser.add_argument('--vmssname', '-n', required=True,
action='store', help='VMSS Name')
argParser.add_argument('--rgname', '-g', required=True,
... | Improve list VMSS public IP example | Improve list VMSS public IP example
| Python | mit | gbowerman/azurerm | import azurerm
import json
import sys
# check for single command argument
if len(sys.argv) == 3:
rg = sys.argv[1]
vmss = sys.argv[2]
else:
sys.exit('Expecting resource group name and vmss name as arguments.')
# Load Azure app defaults
try:
with open('azurermconfig.json') as configFile:
c... | import argparse
import azurerm
import json
import re
import sys
# validate command line arguments
argParser = argparse.ArgumentParser()
argParser.add_argument('--vmssname', '-n', required=True,
action='store', help='VMSS Name')
argParser.add_argument('--rgname', '-g', required=True,
... | <commit_before>import azurerm
import json
import sys
# check for single command argument
if len(sys.argv) == 3:
rg = sys.argv[1]
vmss = sys.argv[2]
else:
sys.exit('Expecting resource group name and vmss name as arguments.')
# Load Azure app defaults
try:
with open('azurermconfig.json') as config... | import argparse
import azurerm
import json
import re
import sys
# validate command line arguments
argParser = argparse.ArgumentParser()
argParser.add_argument('--vmssname', '-n', required=True,
action='store', help='VMSS Name')
argParser.add_argument('--rgname', '-g', required=True,
... | import azurerm
import json
import sys
# check for single command argument
if len(sys.argv) == 3:
rg = sys.argv[1]
vmss = sys.argv[2]
else:
sys.exit('Expecting resource group name and vmss name as arguments.')
# Load Azure app defaults
try:
with open('azurermconfig.json') as configFile:
c... | <commit_before>import azurerm
import json
import sys
# check for single command argument
if len(sys.argv) == 3:
rg = sys.argv[1]
vmss = sys.argv[2]
else:
sys.exit('Expecting resource group name and vmss name as arguments.')
# Load Azure app defaults
try:
with open('azurermconfig.json') as config... |
cc7b8f5dc95d09af619e588aea8042376be6edfc | secondhand/urls.py | secondhand/urls.py | from django.conf.urls import patterns, include, url
from tastypie.api import Api
from tracker.api import UserResource, TaskResource, WorkSessionResource, \
ApiTokenResource
from tracker.views import SignupView
# Uncomment the next two lines to enable the admin:
# from django.contrib import admin
# admin.autodiscov... | from django.conf.urls import patterns, include, url
from tastypie.api import Api
from tracker.api import TaskResource, WorkSessionResource, \
ApiTokenResource, ProjectResource
from tracker.views import SignupView
# Uncomment the next two lines to enable the admin:
# from django.contrib import admin
# admin.autodis... | Remove UserResource from the API and add ProjectResource. | Remove UserResource from the API and add ProjectResource.
| Python | mit | GeneralMaximus/secondhand | from django.conf.urls import patterns, include, url
from tastypie.api import Api
from tracker.api import UserResource, TaskResource, WorkSessionResource, \
ApiTokenResource
from tracker.views import SignupView
# Uncomment the next two lines to enable the admin:
# from django.contrib import admin
# admin.autodiscov... | from django.conf.urls import patterns, include, url
from tastypie.api import Api
from tracker.api import TaskResource, WorkSessionResource, \
ApiTokenResource, ProjectResource
from tracker.views import SignupView
# Uncomment the next two lines to enable the admin:
# from django.contrib import admin
# admin.autodis... | <commit_before>from django.conf.urls import patterns, include, url
from tastypie.api import Api
from tracker.api import UserResource, TaskResource, WorkSessionResource, \
ApiTokenResource
from tracker.views import SignupView
# Uncomment the next two lines to enable the admin:
# from django.contrib import admin
# a... | from django.conf.urls import patterns, include, url
from tastypie.api import Api
from tracker.api import TaskResource, WorkSessionResource, \
ApiTokenResource, ProjectResource
from tracker.views import SignupView
# Uncomment the next two lines to enable the admin:
# from django.contrib import admin
# admin.autodis... | from django.conf.urls import patterns, include, url
from tastypie.api import Api
from tracker.api import UserResource, TaskResource, WorkSessionResource, \
ApiTokenResource
from tracker.views import SignupView
# Uncomment the next two lines to enable the admin:
# from django.contrib import admin
# admin.autodiscov... | <commit_before>from django.conf.urls import patterns, include, url
from tastypie.api import Api
from tracker.api import UserResource, TaskResource, WorkSessionResource, \
ApiTokenResource
from tracker.views import SignupView
# Uncomment the next two lines to enable the admin:
# from django.contrib import admin
# a... |
f840af6621fd63dd9021fcb68a32ba14c925fcf7 | wellknown/models.py | wellknown/models.py | from django.db import models
from django.db.models.signals import post_save
import mimetypes
import wellknown
#
# create default host-meta handler
#
from wellknown.resources import HostMeta
wellknown.register('host-meta', handler=HostMeta(), content_type='application/xrd+xml')
#
# resource model
#
class Resource(mo... | from django.db import models
from django.db.models.signals import post_save
import mimetypes
import wellknown
#
# create default host-meta handler
#
from wellknown.resources import HostMeta
try:
wellknown.register('host-meta', handler=HostMeta(),
content_type='application/xrd+xml')
except ... | Check for an existing handler before registering default host-meta handler. | Check for an existing handler before registering default host-meta handler.
| Python | bsd-3-clause | jcarbaugh/django-wellknown | from django.db import models
from django.db.models.signals import post_save
import mimetypes
import wellknown
#
# create default host-meta handler
#
from wellknown.resources import HostMeta
wellknown.register('host-meta', handler=HostMeta(), content_type='application/xrd+xml')
#
# resource model
#
class Resource(mo... | from django.db import models
from django.db.models.signals import post_save
import mimetypes
import wellknown
#
# create default host-meta handler
#
from wellknown.resources import HostMeta
try:
wellknown.register('host-meta', handler=HostMeta(),
content_type='application/xrd+xml')
except ... | <commit_before>from django.db import models
from django.db.models.signals import post_save
import mimetypes
import wellknown
#
# create default host-meta handler
#
from wellknown.resources import HostMeta
wellknown.register('host-meta', handler=HostMeta(), content_type='application/xrd+xml')
#
# resource model
#
cl... | from django.db import models
from django.db.models.signals import post_save
import mimetypes
import wellknown
#
# create default host-meta handler
#
from wellknown.resources import HostMeta
try:
wellknown.register('host-meta', handler=HostMeta(),
content_type='application/xrd+xml')
except ... | from django.db import models
from django.db.models.signals import post_save
import mimetypes
import wellknown
#
# create default host-meta handler
#
from wellknown.resources import HostMeta
wellknown.register('host-meta', handler=HostMeta(), content_type='application/xrd+xml')
#
# resource model
#
class Resource(mo... | <commit_before>from django.db import models
from django.db.models.signals import post_save
import mimetypes
import wellknown
#
# create default host-meta handler
#
from wellknown.resources import HostMeta
wellknown.register('host-meta', handler=HostMeta(), content_type='application/xrd+xml')
#
# resource model
#
cl... |
06ead54d0d4b93038df32cbbe622ea5f5fc8288a | boardinghouse/__init__.py | boardinghouse/__init__.py | """
"""
__version__ = '0.1'
__release__ = '0.1a3'
def inject_app_defaults():
"""
Automatically inject the default settings for this app.
If settings has already been configured, then we need to add
our defaults to that (if not overridden), and in all cases we
also want to inject our settings i... | """
"""
__version__ = '0.2'
__release__ = '0.2a1'
def inject_app_defaults():
"""
Automatically inject the default settings for this app.
If settings has already been configured, then we need to add
our defaults to that (if not overridden), and in all cases we
also want to inject our settings into ... | Bump version number (so readthedocs picks it up). | Bump version number (so readthedocs picks it up).
| Python | bsd-3-clause | luzfcb/django-boardinghouse,luzfcb/django-boardinghouse,luzfcb/django-boardinghouse | """
"""
__version__ = '0.1'
__release__ = '0.1a3'
def inject_app_defaults():
"""
Automatically inject the default settings for this app.
If settings has already been configured, then we need to add
our defaults to that (if not overridden), and in all cases we
also want to inject our settings i... | """
"""
__version__ = '0.2'
__release__ = '0.2a1'
def inject_app_defaults():
"""
Automatically inject the default settings for this app.
If settings has already been configured, then we need to add
our defaults to that (if not overridden), and in all cases we
also want to inject our settings into ... | <commit_before>"""
"""
__version__ = '0.1'
__release__ = '0.1a3'
def inject_app_defaults():
"""
Automatically inject the default settings for this app.
If settings has already been configured, then we need to add
our defaults to that (if not overridden), and in all cases we
also want to inject... | """
"""
__version__ = '0.2'
__release__ = '0.2a1'
def inject_app_defaults():
"""
Automatically inject the default settings for this app.
If settings has already been configured, then we need to add
our defaults to that (if not overridden), and in all cases we
also want to inject our settings into ... | """
"""
__version__ = '0.1'
__release__ = '0.1a3'
def inject_app_defaults():
"""
Automatically inject the default settings for this app.
If settings has already been configured, then we need to add
our defaults to that (if not overridden), and in all cases we
also want to inject our settings i... | <commit_before>"""
"""
__version__ = '0.1'
__release__ = '0.1a3'
def inject_app_defaults():
"""
Automatically inject the default settings for this app.
If settings has already been configured, then we need to add
our defaults to that (if not overridden), and in all cases we
also want to inject... |
fadac685c4ba7bb094fea0e0b471cbef9ac0e91a | scheduler/schedule.py | scheduler/schedule.py | import sys
import time
import logging
logging.basicConfig(level=logging.DEBUG)
from redis import StrictRedis
from rq import Queue
from apscheduler.schedulers.blocking import BlockingScheduler
from d1lod import jobs
conn = StrictRedis(host='redis', port='6379')
q = Queue(connection=conn)
sched = BlockingScheduler()
... | import sys
import time
import logging
logging.basicConfig(level=logging.DEBUG)
from redis import StrictRedis
from rq import Queue
from apscheduler.schedulers.blocking import BlockingScheduler
from d1lod import jobs
conn = StrictRedis(host='redis', port='6379')
q = Queue(connection=conn)
sched = BlockingScheduler()
... | Set a 1hr timeout for the update job | Set a 1hr timeout for the update job
| Python | apache-2.0 | ec-geolink/d1lod,ec-geolink/d1lod,ec-geolink/d1lod,ec-geolink/d1lod | import sys
import time
import logging
logging.basicConfig(level=logging.DEBUG)
from redis import StrictRedis
from rq import Queue
from apscheduler.schedulers.blocking import BlockingScheduler
from d1lod import jobs
conn = StrictRedis(host='redis', port='6379')
q = Queue(connection=conn)
sched = BlockingScheduler()
... | import sys
import time
import logging
logging.basicConfig(level=logging.DEBUG)
from redis import StrictRedis
from rq import Queue
from apscheduler.schedulers.blocking import BlockingScheduler
from d1lod import jobs
conn = StrictRedis(host='redis', port='6379')
q = Queue(connection=conn)
sched = BlockingScheduler()
... | <commit_before>import sys
import time
import logging
logging.basicConfig(level=logging.DEBUG)
from redis import StrictRedis
from rq import Queue
from apscheduler.schedulers.blocking import BlockingScheduler
from d1lod import jobs
conn = StrictRedis(host='redis', port='6379')
q = Queue(connection=conn)
sched = Block... | import sys
import time
import logging
logging.basicConfig(level=logging.DEBUG)
from redis import StrictRedis
from rq import Queue
from apscheduler.schedulers.blocking import BlockingScheduler
from d1lod import jobs
conn = StrictRedis(host='redis', port='6379')
q = Queue(connection=conn)
sched = BlockingScheduler()
... | import sys
import time
import logging
logging.basicConfig(level=logging.DEBUG)
from redis import StrictRedis
from rq import Queue
from apscheduler.schedulers.blocking import BlockingScheduler
from d1lod import jobs
conn = StrictRedis(host='redis', port='6379')
q = Queue(connection=conn)
sched = BlockingScheduler()
... | <commit_before>import sys
import time
import logging
logging.basicConfig(level=logging.DEBUG)
from redis import StrictRedis
from rq import Queue
from apscheduler.schedulers.blocking import BlockingScheduler
from d1lod import jobs
conn = StrictRedis(host='redis', port='6379')
q = Queue(connection=conn)
sched = Block... |
693b904a9053fbddc6c93cfab1d6448c4b644d1c | scripts/travis_build_dependent_projects.py | scripts/travis_build_dependent_projects.py | # -*- coding: utf-8 -*-
import os
from click import echo
from travispy import travispy
from travispy import TravisPy
def main():
restarted = []
building = []
for domain in [travispy.PUBLIC, travispy.PRIVATE]:
echo("Enumerate repos on {!r}".format(domain))
conn = TravisPy.github_auth(o... | # -*- coding: utf-8 -*-
import os
from click import echo
from travispy import travispy
from travispy import TravisPy
def main():
restarted = []
building = []
for domain in [travispy.PUBLIC, travispy.PRIVATE]:
echo("Enumerate repos on {!r}".format(domain))
conn = TravisPy.github_auth(o... | Fix Travis dependant build trigger | Fix Travis dependant build trigger
| Python | mit | dgnorth/drift,dgnorth/drift,dgnorth/drift | # -*- coding: utf-8 -*-
import os
from click import echo
from travispy import travispy
from travispy import TravisPy
def main():
restarted = []
building = []
for domain in [travispy.PUBLIC, travispy.PRIVATE]:
echo("Enumerate repos on {!r}".format(domain))
conn = TravisPy.github_auth(o... | # -*- coding: utf-8 -*-
import os
from click import echo
from travispy import travispy
from travispy import TravisPy
def main():
restarted = []
building = []
for domain in [travispy.PUBLIC, travispy.PRIVATE]:
echo("Enumerate repos on {!r}".format(domain))
conn = TravisPy.github_auth(o... | <commit_before># -*- coding: utf-8 -*-
import os
from click import echo
from travispy import travispy
from travispy import TravisPy
def main():
restarted = []
building = []
for domain in [travispy.PUBLIC, travispy.PRIVATE]:
echo("Enumerate repos on {!r}".format(domain))
conn = TravisP... | # -*- coding: utf-8 -*-
import os
from click import echo
from travispy import travispy
from travispy import TravisPy
def main():
restarted = []
building = []
for domain in [travispy.PUBLIC, travispy.PRIVATE]:
echo("Enumerate repos on {!r}".format(domain))
conn = TravisPy.github_auth(o... | # -*- coding: utf-8 -*-
import os
from click import echo
from travispy import travispy
from travispy import TravisPy
def main():
restarted = []
building = []
for domain in [travispy.PUBLIC, travispy.PRIVATE]:
echo("Enumerate repos on {!r}".format(domain))
conn = TravisPy.github_auth(o... | <commit_before># -*- coding: utf-8 -*-
import os
from click import echo
from travispy import travispy
from travispy import TravisPy
def main():
restarted = []
building = []
for domain in [travispy.PUBLIC, travispy.PRIVATE]:
echo("Enumerate repos on {!r}".format(domain))
conn = TravisP... |
aed4ddb9cd50baf318822830ba49d5b994e4e518 | youmap/views.py | youmap/views.py | from django.views.generic import TemplateView
from chickpea.models import Map
class Home(TemplateView):
template_name = "youmap/home.html"
list_template_name = "chickpea/map_list.html"
def get_context_data(self, **kwargs):
maps = Map.objects.all()[:100]
return {
"maps": maps
... | from django.views.generic import TemplateView
from chickpea.models import Map
class Home(TemplateView):
template_name = "youmap/home.html"
list_template_name = "chickpea/map_list.html"
def get_context_data(self, **kwargs):
maps = Map.objects.order_by('-modified_at')[:100]
return {
... | Order map by modified_at desc in list | Order map by modified_at desc in list
| Python | agpl-3.0 | diraol/umap | from django.views.generic import TemplateView
from chickpea.models import Map
class Home(TemplateView):
template_name = "youmap/home.html"
list_template_name = "chickpea/map_list.html"
def get_context_data(self, **kwargs):
maps = Map.objects.all()[:100]
return {
"maps": maps
... | from django.views.generic import TemplateView
from chickpea.models import Map
class Home(TemplateView):
template_name = "youmap/home.html"
list_template_name = "chickpea/map_list.html"
def get_context_data(self, **kwargs):
maps = Map.objects.order_by('-modified_at')[:100]
return {
... | <commit_before>from django.views.generic import TemplateView
from chickpea.models import Map
class Home(TemplateView):
template_name = "youmap/home.html"
list_template_name = "chickpea/map_list.html"
def get_context_data(self, **kwargs):
maps = Map.objects.all()[:100]
return {
... | from django.views.generic import TemplateView
from chickpea.models import Map
class Home(TemplateView):
template_name = "youmap/home.html"
list_template_name = "chickpea/map_list.html"
def get_context_data(self, **kwargs):
maps = Map.objects.order_by('-modified_at')[:100]
return {
... | from django.views.generic import TemplateView
from chickpea.models import Map
class Home(TemplateView):
template_name = "youmap/home.html"
list_template_name = "chickpea/map_list.html"
def get_context_data(self, **kwargs):
maps = Map.objects.all()[:100]
return {
"maps": maps
... | <commit_before>from django.views.generic import TemplateView
from chickpea.models import Map
class Home(TemplateView):
template_name = "youmap/home.html"
list_template_name = "chickpea/map_list.html"
def get_context_data(self, **kwargs):
maps = Map.objects.all()[:100]
return {
... |
42339932811493bdd398fda4f7a2322a94bdc2e9 | saleor/shipping/migrations/0018_default_zones_countries.py | saleor/shipping/migrations/0018_default_zones_countries.py | # Generated by Django 3.0.6 on 2020-06-05 14:35
from django.db import migrations
from ..utils import get_countries_without_shipping_zone
def assign_countries_in_default_shipping_zone(apps, schema_editor):
ShippingZone = apps.get_model("shipping", "ShippingZone")
qs = ShippingZone.objects.filter(default=True... | # Generated by Django 3.0.6 on 2020-06-05 14:35
from django.db import migrations
from django_countries import countries
def get_countries_without_shipping_zone(ShippingZone):
"""Return countries that are not assigned to any shipping zone."""
covered_countries = set()
for zone in ShippingZone.objects.all(... | Move utility function to migration | Move utility function to migration
| Python | bsd-3-clause | mociepka/saleor,mociepka/saleor,mociepka/saleor | # Generated by Django 3.0.6 on 2020-06-05 14:35
from django.db import migrations
from ..utils import get_countries_without_shipping_zone
def assign_countries_in_default_shipping_zone(apps, schema_editor):
ShippingZone = apps.get_model("shipping", "ShippingZone")
qs = ShippingZone.objects.filter(default=True... | # Generated by Django 3.0.6 on 2020-06-05 14:35
from django.db import migrations
from django_countries import countries
def get_countries_without_shipping_zone(ShippingZone):
"""Return countries that are not assigned to any shipping zone."""
covered_countries = set()
for zone in ShippingZone.objects.all(... | <commit_before># Generated by Django 3.0.6 on 2020-06-05 14:35
from django.db import migrations
from ..utils import get_countries_without_shipping_zone
def assign_countries_in_default_shipping_zone(apps, schema_editor):
ShippingZone = apps.get_model("shipping", "ShippingZone")
qs = ShippingZone.objects.filt... | # Generated by Django 3.0.6 on 2020-06-05 14:35
from django.db import migrations
from django_countries import countries
def get_countries_without_shipping_zone(ShippingZone):
"""Return countries that are not assigned to any shipping zone."""
covered_countries = set()
for zone in ShippingZone.objects.all(... | # Generated by Django 3.0.6 on 2020-06-05 14:35
from django.db import migrations
from ..utils import get_countries_without_shipping_zone
def assign_countries_in_default_shipping_zone(apps, schema_editor):
ShippingZone = apps.get_model("shipping", "ShippingZone")
qs = ShippingZone.objects.filter(default=True... | <commit_before># Generated by Django 3.0.6 on 2020-06-05 14:35
from django.db import migrations
from ..utils import get_countries_without_shipping_zone
def assign_countries_in_default_shipping_zone(apps, schema_editor):
ShippingZone = apps.get_model("shipping", "ShippingZone")
qs = ShippingZone.objects.filt... |
c85d3cddcc55b427b1d0cd536fb45a28b5f05aff | pytest_blink1/__init__.py | pytest_blink1/__init__.py | from urllib.request import urlopen, URLError
def pytest_terminal_summary(terminalreporter, exitstatus): # pylint: disable=unused-argument
_add_patterns()
if exitstatus == 0:
_pattern('pytest-success')
else:
_pattern('pytest-failure')
def _add_patterns():
_blink('pattern/add?pname=pytes... | from urllib.request import urlopen, URLError
def pytest_terminal_summary(terminalreporter, exitstatus=None): # pylint: disable=unused-argument
_add_patterns()
if exitstatus == 0:
_pattern('pytest-success')
else:
_pattern('pytest-failure')
def _add_patterns():
_blink('pattern/add?pname=... | Fix `exitstatus` sometimes not provided | Fix `exitstatus` sometimes not provided
| Python | mit | vmalloc/pytest-blink1 | from urllib.request import urlopen, URLError
def pytest_terminal_summary(terminalreporter, exitstatus): # pylint: disable=unused-argument
_add_patterns()
if exitstatus == 0:
_pattern('pytest-success')
else:
_pattern('pytest-failure')
def _add_patterns():
_blink('pattern/add?pname=pytes... | from urllib.request import urlopen, URLError
def pytest_terminal_summary(terminalreporter, exitstatus=None): # pylint: disable=unused-argument
_add_patterns()
if exitstatus == 0:
_pattern('pytest-success')
else:
_pattern('pytest-failure')
def _add_patterns():
_blink('pattern/add?pname=... | <commit_before>from urllib.request import urlopen, URLError
def pytest_terminal_summary(terminalreporter, exitstatus): # pylint: disable=unused-argument
_add_patterns()
if exitstatus == 0:
_pattern('pytest-success')
else:
_pattern('pytest-failure')
def _add_patterns():
_blink('pattern/... | from urllib.request import urlopen, URLError
def pytest_terminal_summary(terminalreporter, exitstatus=None): # pylint: disable=unused-argument
_add_patterns()
if exitstatus == 0:
_pattern('pytest-success')
else:
_pattern('pytest-failure')
def _add_patterns():
_blink('pattern/add?pname=... | from urllib.request import urlopen, URLError
def pytest_terminal_summary(terminalreporter, exitstatus): # pylint: disable=unused-argument
_add_patterns()
if exitstatus == 0:
_pattern('pytest-success')
else:
_pattern('pytest-failure')
def _add_patterns():
_blink('pattern/add?pname=pytes... | <commit_before>from urllib.request import urlopen, URLError
def pytest_terminal_summary(terminalreporter, exitstatus): # pylint: disable=unused-argument
_add_patterns()
if exitstatus == 0:
_pattern('pytest-success')
else:
_pattern('pytest-failure')
def _add_patterns():
_blink('pattern/... |
208c17449b42dc7d87ac24a04675612e17a31984 | sierra_adapter/s3_demultiplexer/src/s3_demultiplexer.py | sierra_adapter/s3_demultiplexer/src/s3_demultiplexer.py | # -*- encoding: utf-8 -*-
import json
import os
import boto3
from wellcome_aws_utils import s3_utils, sns_utils
def main(event, _):
print(f'event = {event!r}')
topic_arn = os.environ["TOPIC_ARN"]
s3_events = s3_utils.parse_s3_record(event=event)
assert len(s3_events) == 1
s3_event = s3_events... | # -*- encoding: utf-8 -*-
"""
We have a sierra_reader that reads records from Sierra, and uploads them
to files in S3. Each file in S3 contains multiple records.
Our downstream applications want to process records one at a time, so this
demultiplexer receives the event stream of PUTs from S3, and splits each
file int... | Add a comment explaining the purpose of the demultiplexer | Add a comment explaining the purpose of the demultiplexer
| Python | mit | wellcometrust/platform-api,wellcometrust/platform-api,wellcometrust/platform-api,wellcometrust/platform-api | # -*- encoding: utf-8 -*-
import json
import os
import boto3
from wellcome_aws_utils import s3_utils, sns_utils
def main(event, _):
print(f'event = {event!r}')
topic_arn = os.environ["TOPIC_ARN"]
s3_events = s3_utils.parse_s3_record(event=event)
assert len(s3_events) == 1
s3_event = s3_events... | # -*- encoding: utf-8 -*-
"""
We have a sierra_reader that reads records from Sierra, and uploads them
to files in S3. Each file in S3 contains multiple records.
Our downstream applications want to process records one at a time, so this
demultiplexer receives the event stream of PUTs from S3, and splits each
file int... | <commit_before># -*- encoding: utf-8 -*-
import json
import os
import boto3
from wellcome_aws_utils import s3_utils, sns_utils
def main(event, _):
print(f'event = {event!r}')
topic_arn = os.environ["TOPIC_ARN"]
s3_events = s3_utils.parse_s3_record(event=event)
assert len(s3_events) == 1
s3_ev... | # -*- encoding: utf-8 -*-
"""
We have a sierra_reader that reads records from Sierra, and uploads them
to files in S3. Each file in S3 contains multiple records.
Our downstream applications want to process records one at a time, so this
demultiplexer receives the event stream of PUTs from S3, and splits each
file int... | # -*- encoding: utf-8 -*-
import json
import os
import boto3
from wellcome_aws_utils import s3_utils, sns_utils
def main(event, _):
print(f'event = {event!r}')
topic_arn = os.environ["TOPIC_ARN"]
s3_events = s3_utils.parse_s3_record(event=event)
assert len(s3_events) == 1
s3_event = s3_events... | <commit_before># -*- encoding: utf-8 -*-
import json
import os
import boto3
from wellcome_aws_utils import s3_utils, sns_utils
def main(event, _):
print(f'event = {event!r}')
topic_arn = os.environ["TOPIC_ARN"]
s3_events = s3_utils.parse_s3_record(event=event)
assert len(s3_events) == 1
s3_ev... |
8f93bad77371fbc0d7dc75548472c7715eb8a2ee | climlab/tests/test_rcm.py | climlab/tests/test_rcm.py | from __future__ import division
import numpy as np
import climlab
import pytest
@pytest.fixture()
def rcm():
# initial state (temperatures)
state = climlab.column_state(num_lev=num_lev, num_lat=1, water_depth=5.)
## Create individual physical process models:
# fixed relative humidity
h2o = climlab... | from __future__ import division
import numpy as np
import climlab
import pytest
@pytest.fixture()
def rcm():
# initial state (temperatures)
state = climlab.column_state(num_lev=num_lev, num_lat=1, water_depth=5.)
## Create individual physical process models:
# fixed relative humidity
h2o = climlab... | Mark rcm test as fast so it executes during build and test | Mark rcm test as fast so it executes during build and test
| Python | mit | cjcardinale/climlab,cjcardinale/climlab,brian-rose/climlab,cjcardinale/climlab,brian-rose/climlab | from __future__ import division
import numpy as np
import climlab
import pytest
@pytest.fixture()
def rcm():
# initial state (temperatures)
state = climlab.column_state(num_lev=num_lev, num_lat=1, water_depth=5.)
## Create individual physical process models:
# fixed relative humidity
h2o = climlab... | from __future__ import division
import numpy as np
import climlab
import pytest
@pytest.fixture()
def rcm():
# initial state (temperatures)
state = climlab.column_state(num_lev=num_lev, num_lat=1, water_depth=5.)
## Create individual physical process models:
# fixed relative humidity
h2o = climlab... | <commit_before>from __future__ import division
import numpy as np
import climlab
import pytest
@pytest.fixture()
def rcm():
# initial state (temperatures)
state = climlab.column_state(num_lev=num_lev, num_lat=1, water_depth=5.)
## Create individual physical process models:
# fixed relative humidity
... | from __future__ import division
import numpy as np
import climlab
import pytest
@pytest.fixture()
def rcm():
# initial state (temperatures)
state = climlab.column_state(num_lev=num_lev, num_lat=1, water_depth=5.)
## Create individual physical process models:
# fixed relative humidity
h2o = climlab... | from __future__ import division
import numpy as np
import climlab
import pytest
@pytest.fixture()
def rcm():
# initial state (temperatures)
state = climlab.column_state(num_lev=num_lev, num_lat=1, water_depth=5.)
## Create individual physical process models:
# fixed relative humidity
h2o = climlab... | <commit_before>from __future__ import division
import numpy as np
import climlab
import pytest
@pytest.fixture()
def rcm():
# initial state (temperatures)
state = climlab.column_state(num_lev=num_lev, num_lat=1, water_depth=5.)
## Create individual physical process models:
# fixed relative humidity
... |
54ec54d3a7c5f198bd4b9ca9d4cd613108ac4987 | ichnaea/tests/test_util.py | ichnaea/tests/test_util.py | from datetime import datetime
import pytest
from pytz import UTC
from ichnaea.exceptions import GZIPDecodeError
from ichnaea import util
class TestUtil(object):
gzip_foo = (
b"\x1f\x8b\x08\x00\xed\x7f\x9aU\x02\xffK"
b"\xcb\xcf\x07\x00!es\x8c\x03\x00\x00\x00"
)
def test_utcnow(self):
... | from datetime import datetime
import pytest
from pytz import UTC
from ichnaea.exceptions import GZIPDecodeError
from ichnaea import util
class TestUtil(object):
gzip_foo = (
b"\x1f\x8b\x08\x00\xed\x7f\x9aU\x00\xffK"
b"\xcb\xcf\x07\x00!es\x8c\x03\x00\x00\x00"
)
def test_utcnow(self):
... | Update gzip output for Python 3.8.2 | Update gzip output for Python 3.8.2
Python 3.8.2 includes a fix for https://bugs.python.org/issue39389.
Previously, the extra flags byte was always set to 0x02, claiming
maximum compression. It now reflects the actual compression setting.
Since our default is neither fastest or maximum, the expected test
output is 0x0... | Python | apache-2.0 | mozilla/ichnaea,mozilla/ichnaea,mozilla/ichnaea,mozilla/ichnaea | from datetime import datetime
import pytest
from pytz import UTC
from ichnaea.exceptions import GZIPDecodeError
from ichnaea import util
class TestUtil(object):
gzip_foo = (
b"\x1f\x8b\x08\x00\xed\x7f\x9aU\x02\xffK"
b"\xcb\xcf\x07\x00!es\x8c\x03\x00\x00\x00"
)
def test_utcnow(self):
... | from datetime import datetime
import pytest
from pytz import UTC
from ichnaea.exceptions import GZIPDecodeError
from ichnaea import util
class TestUtil(object):
gzip_foo = (
b"\x1f\x8b\x08\x00\xed\x7f\x9aU\x00\xffK"
b"\xcb\xcf\x07\x00!es\x8c\x03\x00\x00\x00"
)
def test_utcnow(self):
... | <commit_before>from datetime import datetime
import pytest
from pytz import UTC
from ichnaea.exceptions import GZIPDecodeError
from ichnaea import util
class TestUtil(object):
gzip_foo = (
b"\x1f\x8b\x08\x00\xed\x7f\x9aU\x02\xffK"
b"\xcb\xcf\x07\x00!es\x8c\x03\x00\x00\x00"
)
def test_u... | from datetime import datetime
import pytest
from pytz import UTC
from ichnaea.exceptions import GZIPDecodeError
from ichnaea import util
class TestUtil(object):
gzip_foo = (
b"\x1f\x8b\x08\x00\xed\x7f\x9aU\x00\xffK"
b"\xcb\xcf\x07\x00!es\x8c\x03\x00\x00\x00"
)
def test_utcnow(self):
... | from datetime import datetime
import pytest
from pytz import UTC
from ichnaea.exceptions import GZIPDecodeError
from ichnaea import util
class TestUtil(object):
gzip_foo = (
b"\x1f\x8b\x08\x00\xed\x7f\x9aU\x02\xffK"
b"\xcb\xcf\x07\x00!es\x8c\x03\x00\x00\x00"
)
def test_utcnow(self):
... | <commit_before>from datetime import datetime
import pytest
from pytz import UTC
from ichnaea.exceptions import GZIPDecodeError
from ichnaea import util
class TestUtil(object):
gzip_foo = (
b"\x1f\x8b\x08\x00\xed\x7f\x9aU\x02\xffK"
b"\xcb\xcf\x07\x00!es\x8c\x03\x00\x00\x00"
)
def test_u... |
2fff4600d701d6f5ac9675d96916ca74cf3cfdbd | riker/worker/apps.py | riker/worker/apps.py | from __future__ import unicode_literals
from django.apps import AppConfig
from worker.utils import LircListener
class WorkerConfig(AppConfig):
name = 'worker'
def ready(self):
lirc_name = getattr(settings, 'RIKER_LIRC_LISTENER_NAME', 'riker')
LircListener(lirc_name=lirc_name).start()
| from __future__ import unicode_literals
from django.apps import AppConfig
from worker.utils import LircListener
class WorkerConfig(AppConfig):
name = 'worker'
| Remove prematurely inserted 'ready' method | Remove prematurely inserted 'ready' method
| Python | mit | haikuginger/riker | from __future__ import unicode_literals
from django.apps import AppConfig
from worker.utils import LircListener
class WorkerConfig(AppConfig):
name = 'worker'
def ready(self):
lirc_name = getattr(settings, 'RIKER_LIRC_LISTENER_NAME', 'riker')
LircListener(lirc_name=lirc_name).start()
Remove... | from __future__ import unicode_literals
from django.apps import AppConfig
from worker.utils import LircListener
class WorkerConfig(AppConfig):
name = 'worker'
| <commit_before>from __future__ import unicode_literals
from django.apps import AppConfig
from worker.utils import LircListener
class WorkerConfig(AppConfig):
name = 'worker'
def ready(self):
lirc_name = getattr(settings, 'RIKER_LIRC_LISTENER_NAME', 'riker')
LircListener(lirc_name=lirc_name)... | from __future__ import unicode_literals
from django.apps import AppConfig
from worker.utils import LircListener
class WorkerConfig(AppConfig):
name = 'worker'
| from __future__ import unicode_literals
from django.apps import AppConfig
from worker.utils import LircListener
class WorkerConfig(AppConfig):
name = 'worker'
def ready(self):
lirc_name = getattr(settings, 'RIKER_LIRC_LISTENER_NAME', 'riker')
LircListener(lirc_name=lirc_name).start()
Remove... | <commit_before>from __future__ import unicode_literals
from django.apps import AppConfig
from worker.utils import LircListener
class WorkerConfig(AppConfig):
name = 'worker'
def ready(self):
lirc_name = getattr(settings, 'RIKER_LIRC_LISTENER_NAME', 'riker')
LircListener(lirc_name=lirc_name)... |
93149023bb28319d05213a122c7f4e59a8589e38 | pirx/base.py | pirx/base.py | import collections
class Settings(object):
def __init__(self):
self._settings = collections.OrderedDict()
def __setattr__(self, name, value):
if name.startswith('_'):
super(Settings, self).__setattr__(name, value)
else:
self._settings[name] = value
def __s... | import collections
import datetime
class Settings(object):
docstring = 'Settings built with Pirx on %(datetime)s'
def __init__(self):
self._settings = collections.OrderedDict()
docstring = self.docstring % {
'datetime': datetime.datetime.now()
}
self._set_raw_v... | Insert customizable docstring at the beginning of settings file | Insert customizable docstring at the beginning of settings file
| Python | mit | piotrekw/pirx | import collections
class Settings(object):
def __init__(self):
self._settings = collections.OrderedDict()
def __setattr__(self, name, value):
if name.startswith('_'):
super(Settings, self).__setattr__(name, value)
else:
self._settings[name] = value
def __s... | import collections
import datetime
class Settings(object):
docstring = 'Settings built with Pirx on %(datetime)s'
def __init__(self):
self._settings = collections.OrderedDict()
docstring = self.docstring % {
'datetime': datetime.datetime.now()
}
self._set_raw_v... | <commit_before>import collections
class Settings(object):
def __init__(self):
self._settings = collections.OrderedDict()
def __setattr__(self, name, value):
if name.startswith('_'):
super(Settings, self).__setattr__(name, value)
else:
self._settings[name] = val... | import collections
import datetime
class Settings(object):
docstring = 'Settings built with Pirx on %(datetime)s'
def __init__(self):
self._settings = collections.OrderedDict()
docstring = self.docstring % {
'datetime': datetime.datetime.now()
}
self._set_raw_v... | import collections
class Settings(object):
def __init__(self):
self._settings = collections.OrderedDict()
def __setattr__(self, name, value):
if name.startswith('_'):
super(Settings, self).__setattr__(name, value)
else:
self._settings[name] = value
def __s... | <commit_before>import collections
class Settings(object):
def __init__(self):
self._settings = collections.OrderedDict()
def __setattr__(self, name, value):
if name.startswith('_'):
super(Settings, self).__setattr__(name, value)
else:
self._settings[name] = val... |
749219a1282a347133ba73127ed7cc8d8009897d | anchore_engine/clients/syft_wrapper.py | anchore_engine/clients/syft_wrapper.py | import json
import os
import shlex
from anchore_engine.utils import run_check
def run_syft(image):
proc_env = os.environ.copy()
syft_env = {
"SYFT_CHECK_FOR_APP_UPDATE": "0",
"SYFT_LOG_STRUCTURED": "1",
}
proc_env.update(syft_env)
cmd = "syft -vv -o json oci-dir:{image}".format... | import json
import os
import shlex
from anchore_engine.utils import run_check
def run_syft(image):
proc_env = os.environ.copy()
syft_env = {
"SYFT_CHECK_FOR_APP_UPDATE": "0",
"SYFT_LOG_STRUCTURED": "1",
}
proc_env.update(syft_env)
cmd = "syft -vv -o json oci-dir:{image}".format... | Make the syft invocation only log the full output at spew level instead of debug. | Make the syft invocation only log the full output at spew level instead
of debug.
The syft json output for very large images can be 100s of MB and
cause the analyzer to be unusable due to the logging itself. This
changes that call to only dump output at "spew" level logging.
Signed-off-by: Zach Hill <9de8c4480303b533... | Python | apache-2.0 | anchore/anchore-engine,anchore/anchore-engine,anchore/anchore-engine | import json
import os
import shlex
from anchore_engine.utils import run_check
def run_syft(image):
proc_env = os.environ.copy()
syft_env = {
"SYFT_CHECK_FOR_APP_UPDATE": "0",
"SYFT_LOG_STRUCTURED": "1",
}
proc_env.update(syft_env)
cmd = "syft -vv -o json oci-dir:{image}".format... | import json
import os
import shlex
from anchore_engine.utils import run_check
def run_syft(image):
proc_env = os.environ.copy()
syft_env = {
"SYFT_CHECK_FOR_APP_UPDATE": "0",
"SYFT_LOG_STRUCTURED": "1",
}
proc_env.update(syft_env)
cmd = "syft -vv -o json oci-dir:{image}".format... | <commit_before>import json
import os
import shlex
from anchore_engine.utils import run_check
def run_syft(image):
proc_env = os.environ.copy()
syft_env = {
"SYFT_CHECK_FOR_APP_UPDATE": "0",
"SYFT_LOG_STRUCTURED": "1",
}
proc_env.update(syft_env)
cmd = "syft -vv -o json oci-dir:... | import json
import os
import shlex
from anchore_engine.utils import run_check
def run_syft(image):
proc_env = os.environ.copy()
syft_env = {
"SYFT_CHECK_FOR_APP_UPDATE": "0",
"SYFT_LOG_STRUCTURED": "1",
}
proc_env.update(syft_env)
cmd = "syft -vv -o json oci-dir:{image}".format... | import json
import os
import shlex
from anchore_engine.utils import run_check
def run_syft(image):
proc_env = os.environ.copy()
syft_env = {
"SYFT_CHECK_FOR_APP_UPDATE": "0",
"SYFT_LOG_STRUCTURED": "1",
}
proc_env.update(syft_env)
cmd = "syft -vv -o json oci-dir:{image}".format... | <commit_before>import json
import os
import shlex
from anchore_engine.utils import run_check
def run_syft(image):
proc_env = os.environ.copy()
syft_env = {
"SYFT_CHECK_FOR_APP_UPDATE": "0",
"SYFT_LOG_STRUCTURED": "1",
}
proc_env.update(syft_env)
cmd = "syft -vv -o json oci-dir:... |
a800bacf217ef903fd266e1fbf8103365ab64c94 | source/segue/frontend/exporter.py | source/segue/frontend/exporter.py | # :coding: utf-8
# :copyright: Copyright (c) 2013 Martin Pengelly-Phillips
# :license: See LICENSE.txt.
from PySide import QtGui
from .selector import SelectorWidget
from .options import OptionsWidget
class ExporterWidget(QtGui.QWidget):
'''Manage exporting.'''
def __init__(self, host, parent=None):
... | # :coding: utf-8
# :copyright: Copyright (c) 2013 Martin Pengelly-Phillips
# :license: See LICENSE.txt.
from PySide import QtGui
from .selector import SelectorWidget
from .options import OptionsWidget
class ExporterWidget(QtGui.QWidget):
'''Manage exporting.'''
def __init__(self, host, parent=None):
... | Add basic validation of ui state. | Add basic validation of ui state.
| Python | apache-2.0 | 4degrees/segue | # :coding: utf-8
# :copyright: Copyright (c) 2013 Martin Pengelly-Phillips
# :license: See LICENSE.txt.
from PySide import QtGui
from .selector import SelectorWidget
from .options import OptionsWidget
class ExporterWidget(QtGui.QWidget):
'''Manage exporting.'''
def __init__(self, host, parent=None):
... | # :coding: utf-8
# :copyright: Copyright (c) 2013 Martin Pengelly-Phillips
# :license: See LICENSE.txt.
from PySide import QtGui
from .selector import SelectorWidget
from .options import OptionsWidget
class ExporterWidget(QtGui.QWidget):
'''Manage exporting.'''
def __init__(self, host, parent=None):
... | <commit_before># :coding: utf-8
# :copyright: Copyright (c) 2013 Martin Pengelly-Phillips
# :license: See LICENSE.txt.
from PySide import QtGui
from .selector import SelectorWidget
from .options import OptionsWidget
class ExporterWidget(QtGui.QWidget):
'''Manage exporting.'''
def __init__(self, host, ... | # :coding: utf-8
# :copyright: Copyright (c) 2013 Martin Pengelly-Phillips
# :license: See LICENSE.txt.
from PySide import QtGui
from .selector import SelectorWidget
from .options import OptionsWidget
class ExporterWidget(QtGui.QWidget):
'''Manage exporting.'''
def __init__(self, host, parent=None):
... | # :coding: utf-8
# :copyright: Copyright (c) 2013 Martin Pengelly-Phillips
# :license: See LICENSE.txt.
from PySide import QtGui
from .selector import SelectorWidget
from .options import OptionsWidget
class ExporterWidget(QtGui.QWidget):
'''Manage exporting.'''
def __init__(self, host, parent=None):
... | <commit_before># :coding: utf-8
# :copyright: Copyright (c) 2013 Martin Pengelly-Phillips
# :license: See LICENSE.txt.
from PySide import QtGui
from .selector import SelectorWidget
from .options import OptionsWidget
class ExporterWidget(QtGui.QWidget):
'''Manage exporting.'''
def __init__(self, host, ... |
461d364b3973be071d3d6ef891fbfa55e95dcfa9 | megascops/settings/testing.py | megascops/settings/testing.py | from base import * # noqa
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.sqlite3',
'NAME': ':memory:',
}
}
DEBUG = False
| from base import * # noqa
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.sqlite3',
'NAME': ':memory:',
}
}
INSTALLED_APPS += [
'django_jenkins'
]
DEBUG = False
| Add django_jenkins to installed apps | Add django_jenkins to installed apps
| Python | agpl-3.0 | strycore/megascops,strycore/megascops,strycore/megascops,strycore/megascops | from base import * # noqa
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.sqlite3',
'NAME': ':memory:',
}
}
DEBUG = False
Add django_jenkins to installed apps | from base import * # noqa
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.sqlite3',
'NAME': ':memory:',
}
}
INSTALLED_APPS += [
'django_jenkins'
]
DEBUG = False
| <commit_before>from base import * # noqa
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.sqlite3',
'NAME': ':memory:',
}
}
DEBUG = False
<commit_msg>Add django_jenkins to installed apps<commit_after> | from base import * # noqa
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.sqlite3',
'NAME': ':memory:',
}
}
INSTALLED_APPS += [
'django_jenkins'
]
DEBUG = False
| from base import * # noqa
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.sqlite3',
'NAME': ':memory:',
}
}
DEBUG = False
Add django_jenkins to installed appsfrom base import * # noqa
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.sqlite3',
'NAME': ':memo... | <commit_before>from base import * # noqa
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.sqlite3',
'NAME': ':memory:',
}
}
DEBUG = False
<commit_msg>Add django_jenkins to installed apps<commit_after>from base import * # noqa
DATABASES = {
'default': {
'ENGINE': 'django.db.... |
73e5fe29074f52e0b769fd2a6c40669040bef330 | app/notify_client/invite_api_client.py | app/notify_client/invite_api_client.py |
from notifications_python_client.base import BaseAPIClient
from app.notify_client.models import User
class InviteApiClient(BaseAPIClient):
def __init__(self, base_url=None, client_id=None, secret=None):
super(self.__class__, self).__init__(base_url=base_url or 'base_url',
... |
from notifications_python_client.base import BaseAPIClient
from app.notify_client.models import User
class InviteApiClient(BaseAPIClient):
def __init__(self, base_url=None, client_id=None, secret=None):
super(self.__class__, self).__init__(base_url=base_url or 'base_url',
... | Change cancel_invited_user client to not return anything. | Change cancel_invited_user client to not return anything.
| Python | mit | alphagov/notifications-admin,gov-cjwaszczuk/notifications-admin,alphagov/notifications-admin,gov-cjwaszczuk/notifications-admin,gov-cjwaszczuk/notifications-admin,alphagov/notifications-admin,alphagov/notifications-admin,gov-cjwaszczuk/notifications-admin |
from notifications_python_client.base import BaseAPIClient
from app.notify_client.models import User
class InviteApiClient(BaseAPIClient):
def __init__(self, base_url=None, client_id=None, secret=None):
super(self.__class__, self).__init__(base_url=base_url or 'base_url',
... |
from notifications_python_client.base import BaseAPIClient
from app.notify_client.models import User
class InviteApiClient(BaseAPIClient):
def __init__(self, base_url=None, client_id=None, secret=None):
super(self.__class__, self).__init__(base_url=base_url or 'base_url',
... | <commit_before>
from notifications_python_client.base import BaseAPIClient
from app.notify_client.models import User
class InviteApiClient(BaseAPIClient):
def __init__(self, base_url=None, client_id=None, secret=None):
super(self.__class__, self).__init__(base_url=base_url or 'base_url',
... |
from notifications_python_client.base import BaseAPIClient
from app.notify_client.models import User
class InviteApiClient(BaseAPIClient):
def __init__(self, base_url=None, client_id=None, secret=None):
super(self.__class__, self).__init__(base_url=base_url or 'base_url',
... |
from notifications_python_client.base import BaseAPIClient
from app.notify_client.models import User
class InviteApiClient(BaseAPIClient):
def __init__(self, base_url=None, client_id=None, secret=None):
super(self.__class__, self).__init__(base_url=base_url or 'base_url',
... | <commit_before>
from notifications_python_client.base import BaseAPIClient
from app.notify_client.models import User
class InviteApiClient(BaseAPIClient):
def __init__(self, base_url=None, client_id=None, secret=None):
super(self.__class__, self).__init__(base_url=base_url or 'base_url',
... |
6fc304f21d762d692188057fcded195fa6c5675a | test/test_amqp_message.py | test/test_amqp_message.py | import unittest
from amqp import Message
from mock import patch
from sir.amqp.message import (InvalidMessageContentException,
Message as PMessage,
MESSAGE_TYPES)
class AmqpMessageTest(unittest.TestCase):
@staticmethod
def _parsed_message(body="artis... | import unittest
from amqp import Message
from mock import patch
from sir.amqp.message import (InvalidMessageContentException,
Message as PMessage,
MESSAGE_TYPES)
class AmqpMessageTest(unittest.TestCase):
@staticmethod
def _parsed_message(body="artis... | Remove a reference to search.update | Remove a reference to search.update
| Python | mit | jeffweeksio/sir | import unittest
from amqp import Message
from mock import patch
from sir.amqp.message import (InvalidMessageContentException,
Message as PMessage,
MESSAGE_TYPES)
class AmqpMessageTest(unittest.TestCase):
@staticmethod
def _parsed_message(body="artis... | import unittest
from amqp import Message
from mock import patch
from sir.amqp.message import (InvalidMessageContentException,
Message as PMessage,
MESSAGE_TYPES)
class AmqpMessageTest(unittest.TestCase):
@staticmethod
def _parsed_message(body="artis... | <commit_before>import unittest
from amqp import Message
from mock import patch
from sir.amqp.message import (InvalidMessageContentException,
Message as PMessage,
MESSAGE_TYPES)
class AmqpMessageTest(unittest.TestCase):
@staticmethod
def _parsed_mess... | import unittest
from amqp import Message
from mock import patch
from sir.amqp.message import (InvalidMessageContentException,
Message as PMessage,
MESSAGE_TYPES)
class AmqpMessageTest(unittest.TestCase):
@staticmethod
def _parsed_message(body="artis... | import unittest
from amqp import Message
from mock import patch
from sir.amqp.message import (InvalidMessageContentException,
Message as PMessage,
MESSAGE_TYPES)
class AmqpMessageTest(unittest.TestCase):
@staticmethod
def _parsed_message(body="artis... | <commit_before>import unittest
from amqp import Message
from mock import patch
from sir.amqp.message import (InvalidMessageContentException,
Message as PMessage,
MESSAGE_TYPES)
class AmqpMessageTest(unittest.TestCase):
@staticmethod
def _parsed_mess... |
2e361627ca94b3a3b1cdd9583d22ca8ff81a0591 | rpn/util.py | rpn/util.py | from functools import wraps
import subprocess
_SELECTIONS = {
'+': 'clipboard',
'*': 'primary',
}
def _store_selection(data, selection):
with subprocess.Popen(['xclip',
'-selection', selection],
stdin=subprocess.PIPE) as xclip:
xclip.stdin.wri... | from functools import wraps
import subprocess
_SELECTIONS = {
'+': 'clipboard',
'*': 'primary',
}
def _store_selection(data, selection):
with subprocess.Popen(['xclip',
'-selection', selection],
stdin=subprocess.PIPE) as xclip:
xclip.stdin.wri... | Fix typo resulting in NameError | Fix typo resulting in NameError
| Python | isc | pilona/RPN,pilona/RPN | from functools import wraps
import subprocess
_SELECTIONS = {
'+': 'clipboard',
'*': 'primary',
}
def _store_selection(data, selection):
with subprocess.Popen(['xclip',
'-selection', selection],
stdin=subprocess.PIPE) as xclip:
xclip.stdin.wri... | from functools import wraps
import subprocess
_SELECTIONS = {
'+': 'clipboard',
'*': 'primary',
}
def _store_selection(data, selection):
with subprocess.Popen(['xclip',
'-selection', selection],
stdin=subprocess.PIPE) as xclip:
xclip.stdin.wri... | <commit_before>from functools import wraps
import subprocess
_SELECTIONS = {
'+': 'clipboard',
'*': 'primary',
}
def _store_selection(data, selection):
with subprocess.Popen(['xclip',
'-selection', selection],
stdin=subprocess.PIPE) as xclip:
... | from functools import wraps
import subprocess
_SELECTIONS = {
'+': 'clipboard',
'*': 'primary',
}
def _store_selection(data, selection):
with subprocess.Popen(['xclip',
'-selection', selection],
stdin=subprocess.PIPE) as xclip:
xclip.stdin.wri... | from functools import wraps
import subprocess
_SELECTIONS = {
'+': 'clipboard',
'*': 'primary',
}
def _store_selection(data, selection):
with subprocess.Popen(['xclip',
'-selection', selection],
stdin=subprocess.PIPE) as xclip:
xclip.stdin.wri... | <commit_before>from functools import wraps
import subprocess
_SELECTIONS = {
'+': 'clipboard',
'*': 'primary',
}
def _store_selection(data, selection):
with subprocess.Popen(['xclip',
'-selection', selection],
stdin=subprocess.PIPE) as xclip:
... |
de7e36f6b83c6d41c46b222ea94eff3b6f1909e6 | ser2file/ser2file.py | ser2file/ser2file.py | #!/usr/bin/env python3
import sys
import serial
import datetime
if __name__=='__main__':
try:
ser = serial.Serial('COM1', 115200, timeout=1)
print("opened " + ser.portstr)
except serial.SerialException:
print('could not open port')
sys.exit(1)
pass
f = open(datetime.datetime.now().strftime("%y-%m-%d_%H-%M... | #!/usr/bin/env python3
import sys
import serial
import datetime
if __name__=='__main__':
try:
ser = serial.Serial('COM1', 115200, timeout=1)
print("opened " + ser.portstr)
except serial.SerialException:
print('could not open port')
sys.exit(1)
pass
f = open(datetime.datetime.now().strftime("%y-%m-%d_%H-%M... | Use TAB instead of ; | Use TAB instead of ;
| Python | mit | Make-O-Matic/experiments | #!/usr/bin/env python3
import sys
import serial
import datetime
if __name__=='__main__':
try:
ser = serial.Serial('COM1', 115200, timeout=1)
print("opened " + ser.portstr)
except serial.SerialException:
print('could not open port')
sys.exit(1)
pass
f = open(datetime.datetime.now().strftime("%y-%m-%d_%H-%M... | #!/usr/bin/env python3
import sys
import serial
import datetime
if __name__=='__main__':
try:
ser = serial.Serial('COM1', 115200, timeout=1)
print("opened " + ser.portstr)
except serial.SerialException:
print('could not open port')
sys.exit(1)
pass
f = open(datetime.datetime.now().strftime("%y-%m-%d_%H-%M... | <commit_before>#!/usr/bin/env python3
import sys
import serial
import datetime
if __name__=='__main__':
try:
ser = serial.Serial('COM1', 115200, timeout=1)
print("opened " + ser.portstr)
except serial.SerialException:
print('could not open port')
sys.exit(1)
pass
f = open(datetime.datetime.now().strftime(... | #!/usr/bin/env python3
import sys
import serial
import datetime
if __name__=='__main__':
try:
ser = serial.Serial('COM1', 115200, timeout=1)
print("opened " + ser.portstr)
except serial.SerialException:
print('could not open port')
sys.exit(1)
pass
f = open(datetime.datetime.now().strftime("%y-%m-%d_%H-%M... | #!/usr/bin/env python3
import sys
import serial
import datetime
if __name__=='__main__':
try:
ser = serial.Serial('COM1', 115200, timeout=1)
print("opened " + ser.portstr)
except serial.SerialException:
print('could not open port')
sys.exit(1)
pass
f = open(datetime.datetime.now().strftime("%y-%m-%d_%H-%M... | <commit_before>#!/usr/bin/env python3
import sys
import serial
import datetime
if __name__=='__main__':
try:
ser = serial.Serial('COM1', 115200, timeout=1)
print("opened " + ser.portstr)
except serial.SerialException:
print('could not open port')
sys.exit(1)
pass
f = open(datetime.datetime.now().strftime(... |
1a5e589597b101ff4d6c7aa14b747f7143ced8a3 | test_hpack_integration.py | test_hpack_integration.py | # -*- coding: utf-8 -*-
"""
This module defines substantial HPACK integration tests. These can take a very
long time to run, so they're outside the main test suite, but they need to be
run before every change to HPACK.
"""
from hyper.http20.hpack import Decoder
from binascii import unhexlify
class TestHPACKDecoderInte... | # -*- coding: utf-8 -*-
"""
This module defines substantial HPACK integration tests. These can take a very
long time to run, so they're outside the main test suite, but they need to be
run before every change to HPACK.
"""
from hyper.http20.hpack import Decoder
from binascii import unhexlify
class TestHPACKDecoderInte... | Test for sets, not dicts. | Test for sets, not dicts.
| Python | mit | lawnmowerlatte/hyper,jdecuyper/hyper,fredthomsen/hyper,irvind/hyper,lawnmowerlatte/hyper,masaori335/hyper,fredthomsen/hyper,Lukasa/hyper,Lukasa/hyper,masaori335/hyper,plucury/hyper,irvind/hyper,plucury/hyper,jdecuyper/hyper | # -*- coding: utf-8 -*-
"""
This module defines substantial HPACK integration tests. These can take a very
long time to run, so they're outside the main test suite, but they need to be
run before every change to HPACK.
"""
from hyper.http20.hpack import Decoder
from binascii import unhexlify
class TestHPACKDecoderInte... | # -*- coding: utf-8 -*-
"""
This module defines substantial HPACK integration tests. These can take a very
long time to run, so they're outside the main test suite, but they need to be
run before every change to HPACK.
"""
from hyper.http20.hpack import Decoder
from binascii import unhexlify
class TestHPACKDecoderInte... | <commit_before># -*- coding: utf-8 -*-
"""
This module defines substantial HPACK integration tests. These can take a very
long time to run, so they're outside the main test suite, but they need to be
run before every change to HPACK.
"""
from hyper.http20.hpack import Decoder
from binascii import unhexlify
class TestH... | # -*- coding: utf-8 -*-
"""
This module defines substantial HPACK integration tests. These can take a very
long time to run, so they're outside the main test suite, but they need to be
run before every change to HPACK.
"""
from hyper.http20.hpack import Decoder
from binascii import unhexlify
class TestHPACKDecoderInte... | # -*- coding: utf-8 -*-
"""
This module defines substantial HPACK integration tests. These can take a very
long time to run, so they're outside the main test suite, but they need to be
run before every change to HPACK.
"""
from hyper.http20.hpack import Decoder
from binascii import unhexlify
class TestHPACKDecoderInte... | <commit_before># -*- coding: utf-8 -*-
"""
This module defines substantial HPACK integration tests. These can take a very
long time to run, so they're outside the main test suite, but they need to be
run before every change to HPACK.
"""
from hyper.http20.hpack import Decoder
from binascii import unhexlify
class TestH... |
75ad8c1167bae3d63f2b50da8a7cc8d8d64cca4d | tests/test_application.py | tests/test_application.py | # Copyright 2013 Donald Stufft
#
# 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 2013 Donald Stufft
#
# 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... | Remove a test for removed features | Remove a test for removed features
| Python | apache-2.0 | mattrobenolt/warehouse,techtonik/warehouse,techtonik/warehouse,robhudson/warehouse,mattrobenolt/warehouse,robhudson/warehouse,mattrobenolt/warehouse | # Copyright 2013 Donald Stufft
#
# 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 2013 Donald Stufft
#
# 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 2013 Donald Stufft
#
# 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 2013 Donald Stufft
#
# 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 2013 Donald Stufft
#
# 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 2013 Donald Stufft
#
# 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... |
a15bbbd22d8fa32abd7b10179a3289f1ec396c3a | tests/test_ultrametric.py | tests/test_ultrametric.py | from viridis import tree
from six.moves import range
import pytest
@pytest.fixture
def base_tree():
t = tree.Ultrametric(list(range(6)))
t.merge(0, 1, 0.1)
t.merge(6, 2, 0.2)
t.merge(3, 4, 0.3)
t.merge(8, 5, 0.4)
t.merge(7, 8, 0.5)
return t
def test_split(base_tree):
t = base_tree
... | from viridis import tree
from six.moves import range
import pytest
@pytest.fixture
def base_tree():
t = tree.Ultrametric(list(range(6)))
t.merge(0, 1, 0.1)
t.merge(6, 2, 0.2)
t.merge(3, 4, 0.3)
t.merge(8, 5, 0.4)
t.merge(7, 8, 0.5)
return t
def test_split(base_tree):
t = base_tree
... | Use num_leaves function in tests | Use num_leaves function in tests
| Python | mit | jni/viridis | from viridis import tree
from six.moves import range
import pytest
@pytest.fixture
def base_tree():
t = tree.Ultrametric(list(range(6)))
t.merge(0, 1, 0.1)
t.merge(6, 2, 0.2)
t.merge(3, 4, 0.3)
t.merge(8, 5, 0.4)
t.merge(7, 8, 0.5)
return t
def test_split(base_tree):
t = base_tree
... | from viridis import tree
from six.moves import range
import pytest
@pytest.fixture
def base_tree():
t = tree.Ultrametric(list(range(6)))
t.merge(0, 1, 0.1)
t.merge(6, 2, 0.2)
t.merge(3, 4, 0.3)
t.merge(8, 5, 0.4)
t.merge(7, 8, 0.5)
return t
def test_split(base_tree):
t = base_tree
... | <commit_before>from viridis import tree
from six.moves import range
import pytest
@pytest.fixture
def base_tree():
t = tree.Ultrametric(list(range(6)))
t.merge(0, 1, 0.1)
t.merge(6, 2, 0.2)
t.merge(3, 4, 0.3)
t.merge(8, 5, 0.4)
t.merge(7, 8, 0.5)
return t
def test_split(base_tree):
t... | from viridis import tree
from six.moves import range
import pytest
@pytest.fixture
def base_tree():
t = tree.Ultrametric(list(range(6)))
t.merge(0, 1, 0.1)
t.merge(6, 2, 0.2)
t.merge(3, 4, 0.3)
t.merge(8, 5, 0.4)
t.merge(7, 8, 0.5)
return t
def test_split(base_tree):
t = base_tree
... | from viridis import tree
from six.moves import range
import pytest
@pytest.fixture
def base_tree():
t = tree.Ultrametric(list(range(6)))
t.merge(0, 1, 0.1)
t.merge(6, 2, 0.2)
t.merge(3, 4, 0.3)
t.merge(8, 5, 0.4)
t.merge(7, 8, 0.5)
return t
def test_split(base_tree):
t = base_tree
... | <commit_before>from viridis import tree
from six.moves import range
import pytest
@pytest.fixture
def base_tree():
t = tree.Ultrametric(list(range(6)))
t.merge(0, 1, 0.1)
t.merge(6, 2, 0.2)
t.merge(3, 4, 0.3)
t.merge(8, 5, 0.4)
t.merge(7, 8, 0.5)
return t
def test_split(base_tree):
t... |
024b862bdd4ae3bf4c3058ef32b6016b280a4cf6 | tests/web/test_request.py | tests/web/test_request.py | import unittest
from performance.web import Request, RequestTypeError, RequestTimeError
class RequestTestCase(unittest.TestCase):
def setUp(self):
self.url = 'http://www.google.com'
def test_constants(self):
self.assertEqual('get', Request.GET)
self.assertEqual('post', Request.POST)
... | import unittest
from performance.web import Request, RequestTypeError, RequestTimeError
class RequestTestCase(unittest.TestCase):
def setUp(self):
self.host = 'http://www.google.com'
def test_constants(self):
self.assertEqual('get', Request.GET)
self.assertEqual('post', Request.POST)
... | Remove tests for response_time, update variable names | Remove tests for response_time, update variable names
| Python | mit | BakeCode/performance-testing,BakeCode/performance-testing | import unittest
from performance.web import Request, RequestTypeError, RequestTimeError
class RequestTestCase(unittest.TestCase):
def setUp(self):
self.url = 'http://www.google.com'
def test_constants(self):
self.assertEqual('get', Request.GET)
self.assertEqual('post', Request.POST)
... | import unittest
from performance.web import Request, RequestTypeError, RequestTimeError
class RequestTestCase(unittest.TestCase):
def setUp(self):
self.host = 'http://www.google.com'
def test_constants(self):
self.assertEqual('get', Request.GET)
self.assertEqual('post', Request.POST)
... | <commit_before>import unittest
from performance.web import Request, RequestTypeError, RequestTimeError
class RequestTestCase(unittest.TestCase):
def setUp(self):
self.url = 'http://www.google.com'
def test_constants(self):
self.assertEqual('get', Request.GET)
self.assertEqual('post', ... | import unittest
from performance.web import Request, RequestTypeError, RequestTimeError
class RequestTestCase(unittest.TestCase):
def setUp(self):
self.host = 'http://www.google.com'
def test_constants(self):
self.assertEqual('get', Request.GET)
self.assertEqual('post', Request.POST)
... | import unittest
from performance.web import Request, RequestTypeError, RequestTimeError
class RequestTestCase(unittest.TestCase):
def setUp(self):
self.url = 'http://www.google.com'
def test_constants(self):
self.assertEqual('get', Request.GET)
self.assertEqual('post', Request.POST)
... | <commit_before>import unittest
from performance.web import Request, RequestTypeError, RequestTimeError
class RequestTestCase(unittest.TestCase):
def setUp(self):
self.url = 'http://www.google.com'
def test_constants(self):
self.assertEqual('get', Request.GET)
self.assertEqual('post', ... |
8b351036f6431bd760565b23d9e887e7d8a73840 | mysql_statsd/thread_manager.py | mysql_statsd/thread_manager.py | import Queue
import signal
import threading
import time
class ThreadManager():
"""Knows how to manage dem threads"""
quit = False
quitting = False
threads = []
def __init__(self, queue=Queue.Queue(), threads=[], config={}):
"""Program entry point"""
# Set up queue
self.qu... | import Queue
import signal
import threading
import time
class ThreadManager():
"""Knows how to manage dem threads"""
quit = False
quitting = False
threads = []
def __init__(self, threads=[]):
"""Program entry point"""
self.threads = threads
self.register_signal_handlers()
... | Remove config handling from threadmanager (was unused) | Remove config handling from threadmanager (was unused)
| Python | bsd-3-clause | spilgames/mysql-statsd,medvedik/mysql-statsd,art-spilgames/mysql-statsd,db-art/mysql-statsd,medvedik/mysql-statsd,bnkr/mysql-statsd | import Queue
import signal
import threading
import time
class ThreadManager():
"""Knows how to manage dem threads"""
quit = False
quitting = False
threads = []
def __init__(self, queue=Queue.Queue(), threads=[], config={}):
"""Program entry point"""
# Set up queue
self.qu... | import Queue
import signal
import threading
import time
class ThreadManager():
"""Knows how to manage dem threads"""
quit = False
quitting = False
threads = []
def __init__(self, threads=[]):
"""Program entry point"""
self.threads = threads
self.register_signal_handlers()
... | <commit_before>import Queue
import signal
import threading
import time
class ThreadManager():
"""Knows how to manage dem threads"""
quit = False
quitting = False
threads = []
def __init__(self, queue=Queue.Queue(), threads=[], config={}):
"""Program entry point"""
# Set up queue
... | import Queue
import signal
import threading
import time
class ThreadManager():
"""Knows how to manage dem threads"""
quit = False
quitting = False
threads = []
def __init__(self, threads=[]):
"""Program entry point"""
self.threads = threads
self.register_signal_handlers()
... | import Queue
import signal
import threading
import time
class ThreadManager():
"""Knows how to manage dem threads"""
quit = False
quitting = False
threads = []
def __init__(self, queue=Queue.Queue(), threads=[], config={}):
"""Program entry point"""
# Set up queue
self.qu... | <commit_before>import Queue
import signal
import threading
import time
class ThreadManager():
"""Knows how to manage dem threads"""
quit = False
quitting = False
threads = []
def __init__(self, queue=Queue.Queue(), threads=[], config={}):
"""Program entry point"""
# Set up queue
... |
d37555f71d61aa2f40b6d959833d7dd08bc269d4 | tmserver/jtui/__init__.py | tmserver/jtui/__init__.py | import logging
from flask import Blueprint, current_app, jsonify
from tmserver.error import register_http_error_classes
jtui = Blueprint('jtui', __name__)
logger = logging.getLogger(__name__)
def register_error(cls):
"""Decorator to register exception classes as errors that can be
serialized to JSON"""
... | import logging
from flask import Blueprint
jtui = Blueprint('jtui', __name__)
logger = logging.getLogger(__name__)
import tmserver.jtui.api
| Remove jtui blueprint specific error handler | Remove jtui blueprint specific error handler
| Python | agpl-3.0 | TissueMAPS/TmServer | import logging
from flask import Blueprint, current_app, jsonify
from tmserver.error import register_http_error_classes
jtui = Blueprint('jtui', __name__)
logger = logging.getLogger(__name__)
def register_error(cls):
"""Decorator to register exception classes as errors that can be
serialized to JSON"""
... | import logging
from flask import Blueprint
jtui = Blueprint('jtui', __name__)
logger = logging.getLogger(__name__)
import tmserver.jtui.api
| <commit_before>import logging
from flask import Blueprint, current_app, jsonify
from tmserver.error import register_http_error_classes
jtui = Blueprint('jtui', __name__)
logger = logging.getLogger(__name__)
def register_error(cls):
"""Decorator to register exception classes as errors that can be
serialized... | import logging
from flask import Blueprint
jtui = Blueprint('jtui', __name__)
logger = logging.getLogger(__name__)
import tmserver.jtui.api
| import logging
from flask import Blueprint, current_app, jsonify
from tmserver.error import register_http_error_classes
jtui = Blueprint('jtui', __name__)
logger = logging.getLogger(__name__)
def register_error(cls):
"""Decorator to register exception classes as errors that can be
serialized to JSON"""
... | <commit_before>import logging
from flask import Blueprint, current_app, jsonify
from tmserver.error import register_http_error_classes
jtui = Blueprint('jtui', __name__)
logger = logging.getLogger(__name__)
def register_error(cls):
"""Decorator to register exception classes as errors that can be
serialized... |
ee8dc8b97cf70c06504f0572d9ee7e18e273b470 | scheduler.py | scheduler.py | # -*- coding: utf-8 -*-
#
# dp for Tornado
# YoungYong Park (youngyongpark@gmail.com)
# 2015.03.09
#
import os
import sys
import inspect
import importlib
path = os.path.dirname(os.path.abspath(inspect.getfile(inspect.currentframe())))
sys.path.append(path)
if __name__ == '__main__':
if len(sys.argv)... | # -*- coding: utf-8 -*-
#
# dp for Tornado
# YoungYong Park (youngyongpark@gmail.com)
# 2015.03.09
#
import os
import sys
import inspect
import importlib
path = os.path.dirname(os.path.abspath(inspect.getfile(inspect.currentframe())))
sys.path.append(path)
if __name__ == '__main__':
if len(sys.argv)... | Support python3 and PEP8 rules. | Support python3 and PEP8 rules.
| Python | mit | why2pac/dp-tornado,why2pac/dp-tornado,why2pac/dp-tornado,why2pac/dp-tornado | # -*- coding: utf-8 -*-
#
# dp for Tornado
# YoungYong Park (youngyongpark@gmail.com)
# 2015.03.09
#
import os
import sys
import inspect
import importlib
path = os.path.dirname(os.path.abspath(inspect.getfile(inspect.currentframe())))
sys.path.append(path)
if __name__ == '__main__':
if len(sys.argv)... | # -*- coding: utf-8 -*-
#
# dp for Tornado
# YoungYong Park (youngyongpark@gmail.com)
# 2015.03.09
#
import os
import sys
import inspect
import importlib
path = os.path.dirname(os.path.abspath(inspect.getfile(inspect.currentframe())))
sys.path.append(path)
if __name__ == '__main__':
if len(sys.argv)... | <commit_before># -*- coding: utf-8 -*-
#
# dp for Tornado
# YoungYong Park (youngyongpark@gmail.com)
# 2015.03.09
#
import os
import sys
import inspect
import importlib
path = os.path.dirname(os.path.abspath(inspect.getfile(inspect.currentframe())))
sys.path.append(path)
if __name__ == '__main__':
i... | # -*- coding: utf-8 -*-
#
# dp for Tornado
# YoungYong Park (youngyongpark@gmail.com)
# 2015.03.09
#
import os
import sys
import inspect
import importlib
path = os.path.dirname(os.path.abspath(inspect.getfile(inspect.currentframe())))
sys.path.append(path)
if __name__ == '__main__':
if len(sys.argv)... | # -*- coding: utf-8 -*-
#
# dp for Tornado
# YoungYong Park (youngyongpark@gmail.com)
# 2015.03.09
#
import os
import sys
import inspect
import importlib
path = os.path.dirname(os.path.abspath(inspect.getfile(inspect.currentframe())))
sys.path.append(path)
if __name__ == '__main__':
if len(sys.argv)... | <commit_before># -*- coding: utf-8 -*-
#
# dp for Tornado
# YoungYong Park (youngyongpark@gmail.com)
# 2015.03.09
#
import os
import sys
import inspect
import importlib
path = os.path.dirname(os.path.abspath(inspect.getfile(inspect.currentframe())))
sys.path.append(path)
if __name__ == '__main__':
i... |
d17dc6285d2eab6662230313ed4ff8fa63ab2994 | demetsiiify/blueprints/__init__.py | demetsiiify/blueprints/__init__.py | from .api import api
from .auth import auth
from .iiif import iiif
from .view import view
__all__ = [api, auth, iiif, view]
| from .api import api
from .iiif import iiif
from .view import view
__all__ = [api, iiif, view]
| Fix accidental import from other branch | Fix accidental import from other branch
| Python | agpl-3.0 | jbaiter/demetsiiify,jbaiter/demetsiiify,jbaiter/demetsiiify | from .api import api
from .auth import auth
from .iiif import iiif
from .view import view
__all__ = [api, auth, iiif, view]
Fix accidental import from other branch | from .api import api
from .iiif import iiif
from .view import view
__all__ = [api, iiif, view]
| <commit_before>from .api import api
from .auth import auth
from .iiif import iiif
from .view import view
__all__ = [api, auth, iiif, view]
<commit_msg>Fix accidental import from other branch<commit_after> | from .api import api
from .iiif import iiif
from .view import view
__all__ = [api, iiif, view]
| from .api import api
from .auth import auth
from .iiif import iiif
from .view import view
__all__ = [api, auth, iiif, view]
Fix accidental import from other branchfrom .api import api
from .iiif import iiif
from .view import view
__all__ = [api, iiif, view]
| <commit_before>from .api import api
from .auth import auth
from .iiif import iiif
from .view import view
__all__ = [api, auth, iiif, view]
<commit_msg>Fix accidental import from other branch<commit_after>from .api import api
from .iiif import iiif
from .view import view
__all__ = [api, iiif, view]
|
b167b1d9ff4278d142c1eeffc5ef443b11459cd9 | lamson-server/config/settings.py | lamson-server/config/settings.py | # This file contains python variables that configure Lamson for email processing.
import logging
import pymongo
hostnames = ['kasm.clayadavis.net', 'openkasm.com', 'remixmail.com']
# You may add additional parameters such as `username' and `password' if your
# relay server requires authentication, `starttls' (boolean)... | # This file contains python variables that configure Lamson for email processing.
import logging
import pymongo
hostnames = ['kasm.clayadavis.net',
'openkasm.com',
#'remixmail.com',
]
# You may add additional parameters such as `username' and `password' if your
# relay server req... | Remove remixmail from hosts for now | Remove remixmail from hosts for now
| Python | mit | clayadavis/OpenKasm,clayadavis/OpenKasm | # This file contains python variables that configure Lamson for email processing.
import logging
import pymongo
hostnames = ['kasm.clayadavis.net', 'openkasm.com', 'remixmail.com']
# You may add additional parameters such as `username' and `password' if your
# relay server requires authentication, `starttls' (boolean)... | # This file contains python variables that configure Lamson for email processing.
import logging
import pymongo
hostnames = ['kasm.clayadavis.net',
'openkasm.com',
#'remixmail.com',
]
# You may add additional parameters such as `username' and `password' if your
# relay server req... | <commit_before># This file contains python variables that configure Lamson for email processing.
import logging
import pymongo
hostnames = ['kasm.clayadavis.net', 'openkasm.com', 'remixmail.com']
# You may add additional parameters such as `username' and `password' if your
# relay server requires authentication, `star... | # This file contains python variables that configure Lamson for email processing.
import logging
import pymongo
hostnames = ['kasm.clayadavis.net',
'openkasm.com',
#'remixmail.com',
]
# You may add additional parameters such as `username' and `password' if your
# relay server req... | # This file contains python variables that configure Lamson for email processing.
import logging
import pymongo
hostnames = ['kasm.clayadavis.net', 'openkasm.com', 'remixmail.com']
# You may add additional parameters such as `username' and `password' if your
# relay server requires authentication, `starttls' (boolean)... | <commit_before># This file contains python variables that configure Lamson for email processing.
import logging
import pymongo
hostnames = ['kasm.clayadavis.net', 'openkasm.com', 'remixmail.com']
# You may add additional parameters such as `username' and `password' if your
# relay server requires authentication, `star... |
d866dc0f6a33925e2a8cd910a8b6226f8b7ed50d | pytablereader/__init__.py | pytablereader/__init__.py | # encoding: utf-8
"""
.. codeauthor:: Tsuyoshi Hombashi <tsuyoshi.hombashi@gmail.com>
"""
from __future__ import absolute_import
from tabledata import (
DataError,
EmptyDataError,
InvalidDataError,
InvalidHeaderNameError,
InvalidTableNameError,
)
from .__version__ import __author__, __copyright_... | # encoding: utf-8
"""
.. codeauthor:: Tsuyoshi Hombashi <tsuyoshi.hombashi@gmail.com>
"""
from __future__ import absolute_import
from tabledata import DataError, InvalidHeaderNameError, InvalidTableNameError
from .__version__ import __author__, __copyright__, __email__, __license__, __version__
from ._constant impo... | Remove an import that deprecated and unused | Remove an import that deprecated and unused
| Python | mit | thombashi/pytablereader,thombashi/pytablereader,thombashi/pytablereader | # encoding: utf-8
"""
.. codeauthor:: Tsuyoshi Hombashi <tsuyoshi.hombashi@gmail.com>
"""
from __future__ import absolute_import
from tabledata import (
DataError,
EmptyDataError,
InvalidDataError,
InvalidHeaderNameError,
InvalidTableNameError,
)
from .__version__ import __author__, __copyright_... | # encoding: utf-8
"""
.. codeauthor:: Tsuyoshi Hombashi <tsuyoshi.hombashi@gmail.com>
"""
from __future__ import absolute_import
from tabledata import DataError, InvalidHeaderNameError, InvalidTableNameError
from .__version__ import __author__, __copyright__, __email__, __license__, __version__
from ._constant impo... | <commit_before># encoding: utf-8
"""
.. codeauthor:: Tsuyoshi Hombashi <tsuyoshi.hombashi@gmail.com>
"""
from __future__ import absolute_import
from tabledata import (
DataError,
EmptyDataError,
InvalidDataError,
InvalidHeaderNameError,
InvalidTableNameError,
)
from .__version__ import __author_... | # encoding: utf-8
"""
.. codeauthor:: Tsuyoshi Hombashi <tsuyoshi.hombashi@gmail.com>
"""
from __future__ import absolute_import
from tabledata import DataError, InvalidHeaderNameError, InvalidTableNameError
from .__version__ import __author__, __copyright__, __email__, __license__, __version__
from ._constant impo... | # encoding: utf-8
"""
.. codeauthor:: Tsuyoshi Hombashi <tsuyoshi.hombashi@gmail.com>
"""
from __future__ import absolute_import
from tabledata import (
DataError,
EmptyDataError,
InvalidDataError,
InvalidHeaderNameError,
InvalidTableNameError,
)
from .__version__ import __author__, __copyright_... | <commit_before># encoding: utf-8
"""
.. codeauthor:: Tsuyoshi Hombashi <tsuyoshi.hombashi@gmail.com>
"""
from __future__ import absolute_import
from tabledata import (
DataError,
EmptyDataError,
InvalidDataError,
InvalidHeaderNameError,
InvalidTableNameError,
)
from .__version__ import __author_... |
5eb7558873a62739edcc5c633561c45e9781384e | migrations/versions/1d91199c02c5_.py | migrations/versions/1d91199c02c5_.py | """empty message
Revision ID: 1d91199c02c5
Revises:
Create Date: 2017-05-01 23:02:26.034481
"""
from alembic import op
import sqlalchemy as sa
# revision identifiers, used by Alembic.
revision = '1d91199c02c5'
down_revision = None
branch_labels = None
depends_on = None
def upgrade():
# ### commands auto gener... | """Add user banned column
Revision ID: 1d91199c02c5
Revises:
Create Date: 2017-05-01 23:02:26.034481
"""
from alembic import op
import sqlalchemy as sa
# revision identifiers, used by Alembic.
revision = '1d91199c02c5'
down_revision = None
branch_labels = None
depends_on = None
def upgrade():
# ### commands a... | Add message to user ban migration | Add message to user ban migration
| Python | agpl-3.0 | CMU-Senate/tcc-room-reservation,CMU-Senate/tcc-room-reservation,CMU-Senate/tcc-room-reservation | """empty message
Revision ID: 1d91199c02c5
Revises:
Create Date: 2017-05-01 23:02:26.034481
"""
from alembic import op
import sqlalchemy as sa
# revision identifiers, used by Alembic.
revision = '1d91199c02c5'
down_revision = None
branch_labels = None
depends_on = None
def upgrade():
# ### commands auto gener... | """Add user banned column
Revision ID: 1d91199c02c5
Revises:
Create Date: 2017-05-01 23:02:26.034481
"""
from alembic import op
import sqlalchemy as sa
# revision identifiers, used by Alembic.
revision = '1d91199c02c5'
down_revision = None
branch_labels = None
depends_on = None
def upgrade():
# ### commands a... | <commit_before>"""empty message
Revision ID: 1d91199c02c5
Revises:
Create Date: 2017-05-01 23:02:26.034481
"""
from alembic import op
import sqlalchemy as sa
# revision identifiers, used by Alembic.
revision = '1d91199c02c5'
down_revision = None
branch_labels = None
depends_on = None
def upgrade():
# ### comm... | """Add user banned column
Revision ID: 1d91199c02c5
Revises:
Create Date: 2017-05-01 23:02:26.034481
"""
from alembic import op
import sqlalchemy as sa
# revision identifiers, used by Alembic.
revision = '1d91199c02c5'
down_revision = None
branch_labels = None
depends_on = None
def upgrade():
# ### commands a... | """empty message
Revision ID: 1d91199c02c5
Revises:
Create Date: 2017-05-01 23:02:26.034481
"""
from alembic import op
import sqlalchemy as sa
# revision identifiers, used by Alembic.
revision = '1d91199c02c5'
down_revision = None
branch_labels = None
depends_on = None
def upgrade():
# ### commands auto gener... | <commit_before>"""empty message
Revision ID: 1d91199c02c5
Revises:
Create Date: 2017-05-01 23:02:26.034481
"""
from alembic import op
import sqlalchemy as sa
# revision identifiers, used by Alembic.
revision = '1d91199c02c5'
down_revision = None
branch_labels = None
depends_on = None
def upgrade():
# ### comm... |
374feca1d714a09b23f152308bf3a1878c79a3f9 | mysite/profile/management/commands/profile_daily_tasks.py | mysite/profile/management/commands/profile_daily_tasks.py | # This file is part of OpenHatch.
# Copyright (C) 2010 OpenHatch, Inc.
#
# 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 License, or
# (at your option) any later v... | # This file is part of OpenHatch.
# Copyright (C) 2010 OpenHatch, Inc.
#
# 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 License, or
# (at your option) any later v... | Call the right method on the send_weekly_emails Command. | Call the right method on the send_weekly_emails Command.
| Python | agpl-3.0 | heeraj123/oh-mainline,nirmeshk/oh-mainline,mzdaniel/oh-mainline,mzdaniel/oh-mainline,ojengwa/oh-mainline,waseem18/oh-mainline,nirmeshk/oh-mainline,SnappleCap/oh-mainline,ehashman/oh-mainline,nirmeshk/oh-mainline,openhatch/oh-mainline,jledbetter/openhatch,SnappleCap/oh-mainline,mzdaniel/oh-mainline,ojengwa/oh-mainline,h... | # This file is part of OpenHatch.
# Copyright (C) 2010 OpenHatch, Inc.
#
# 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 License, or
# (at your option) any later v... | # This file is part of OpenHatch.
# Copyright (C) 2010 OpenHatch, Inc.
#
# 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 License, or
# (at your option) any later v... | <commit_before># This file is part of OpenHatch.
# Copyright (C) 2010 OpenHatch, Inc.
#
# 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 License, or
# (at your opti... | # This file is part of OpenHatch.
# Copyright (C) 2010 OpenHatch, Inc.
#
# 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 License, or
# (at your option) any later v... | # This file is part of OpenHatch.
# Copyright (C) 2010 OpenHatch, Inc.
#
# 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 License, or
# (at your option) any later v... | <commit_before># This file is part of OpenHatch.
# Copyright (C) 2010 OpenHatch, Inc.
#
# 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 License, or
# (at your opti... |
699a2d8d97d8c526f9fb269245d5fb593d47d3ca | rasa/nlu/tokenizers/__init__.py | rasa/nlu/tokenizers/__init__.py | class Tokenizer:
pass
class Token:
def __init__(self, text, offset, data=None):
self.offset = offset
self.text = text
self.end = offset + len(text)
self.data = data if data else {}
def set(self, prop, info):
self.data[prop] = info
def get(self, prop, default=N... | import functools
class Tokenizer:
pass
@functools.total_ordering
class Token:
def __init__(self, text, offset, data=None):
self.offset = offset
self.text = text
self.end = offset + len(text)
self.data = data if data else {}
def set(self, prop, info):
self.data[pr... | Fix to make sanitize_examples() be able to sort tokens | Fix to make sanitize_examples() be able to sort tokens
| Python | apache-2.0 | RasaHQ/rasa_nlu,RasaHQ/rasa_nlu,RasaHQ/rasa_nlu | class Tokenizer:
pass
class Token:
def __init__(self, text, offset, data=None):
self.offset = offset
self.text = text
self.end = offset + len(text)
self.data = data if data else {}
def set(self, prop, info):
self.data[prop] = info
def get(self, prop, default=N... | import functools
class Tokenizer:
pass
@functools.total_ordering
class Token:
def __init__(self, text, offset, data=None):
self.offset = offset
self.text = text
self.end = offset + len(text)
self.data = data if data else {}
def set(self, prop, info):
self.data[pr... | <commit_before>class Tokenizer:
pass
class Token:
def __init__(self, text, offset, data=None):
self.offset = offset
self.text = text
self.end = offset + len(text)
self.data = data if data else {}
def set(self, prop, info):
self.data[prop] = info
def get(self, ... | import functools
class Tokenizer:
pass
@functools.total_ordering
class Token:
def __init__(self, text, offset, data=None):
self.offset = offset
self.text = text
self.end = offset + len(text)
self.data = data if data else {}
def set(self, prop, info):
self.data[pr... | class Tokenizer:
pass
class Token:
def __init__(self, text, offset, data=None):
self.offset = offset
self.text = text
self.end = offset + len(text)
self.data = data if data else {}
def set(self, prop, info):
self.data[prop] = info
def get(self, prop, default=N... | <commit_before>class Tokenizer:
pass
class Token:
def __init__(self, text, offset, data=None):
self.offset = offset
self.text = text
self.end = offset + len(text)
self.data = data if data else {}
def set(self, prop, info):
self.data[prop] = info
def get(self, ... |
75402ed564a0e37732bceb2b44261630e69bc250 | src/smsfly/util.py | src/smsfly/util.py | from functools import wraps
from bs4 import BeautifulSoup as bs
from errors import XMLError, PhoneError, StartTimeError, EndTimeError, LifetimeError, SpeedError,
AlphanameError, TextError, InsufficientFundsError
ERROR_MAP = {
'XMLERROR': XMLError,
'ERRPHONES': PhoneError,
'ERRSTARTTIME': StartTime... | from functools import wraps
from bs4 import BeautifulSoup as bs
from .errors import (
XMLError, PhoneError, StartTimeError,
EndTimeError, LifetimeError, SpeedError,
AlphanameError, TextError, InsufficientFundsError
)
ERROR_MAP = {
'XMLERROR': XMLError,
'ERRPHONES': PhoneError,
'ERRSTARTTIME':... | Fix import of error classes | Fix import of error classes
| Python | mit | wk-tech/python-smsfly | from functools import wraps
from bs4 import BeautifulSoup as bs
from errors import XMLError, PhoneError, StartTimeError, EndTimeError, LifetimeError, SpeedError,
AlphanameError, TextError, InsufficientFundsError
ERROR_MAP = {
'XMLERROR': XMLError,
'ERRPHONES': PhoneError,
'ERRSTARTTIME': StartTime... | from functools import wraps
from bs4 import BeautifulSoup as bs
from .errors import (
XMLError, PhoneError, StartTimeError,
EndTimeError, LifetimeError, SpeedError,
AlphanameError, TextError, InsufficientFundsError
)
ERROR_MAP = {
'XMLERROR': XMLError,
'ERRPHONES': PhoneError,
'ERRSTARTTIME':... | <commit_before>from functools import wraps
from bs4 import BeautifulSoup as bs
from errors import XMLError, PhoneError, StartTimeError, EndTimeError, LifetimeError, SpeedError,
AlphanameError, TextError, InsufficientFundsError
ERROR_MAP = {
'XMLERROR': XMLError,
'ERRPHONES': PhoneError,
'ERRSTARTT... | from functools import wraps
from bs4 import BeautifulSoup as bs
from .errors import (
XMLError, PhoneError, StartTimeError,
EndTimeError, LifetimeError, SpeedError,
AlphanameError, TextError, InsufficientFundsError
)
ERROR_MAP = {
'XMLERROR': XMLError,
'ERRPHONES': PhoneError,
'ERRSTARTTIME':... | from functools import wraps
from bs4 import BeautifulSoup as bs
from errors import XMLError, PhoneError, StartTimeError, EndTimeError, LifetimeError, SpeedError,
AlphanameError, TextError, InsufficientFundsError
ERROR_MAP = {
'XMLERROR': XMLError,
'ERRPHONES': PhoneError,
'ERRSTARTTIME': StartTime... | <commit_before>from functools import wraps
from bs4 import BeautifulSoup as bs
from errors import XMLError, PhoneError, StartTimeError, EndTimeError, LifetimeError, SpeedError,
AlphanameError, TextError, InsufficientFundsError
ERROR_MAP = {
'XMLERROR': XMLError,
'ERRPHONES': PhoneError,
'ERRSTARTT... |
4eade25270273d4a779034fef3818f15066ee647 | src/streaming-programs/car-average-speeds.py | src/streaming-programs/car-average-speeds.py | #!/usr/bin/python
import sys
import json
# Count average speeds for links
def main(locationdata_dictionary_file):
locationdata = {}
with open(locationdata_dictionary_file, "r") as dictionary_file:
locationdata = json.load(dictionary_file)
for input_line in sys.stdin:
data = json.loads(in... | #!/usr/bin/python
import sys
import json
# Count average speeds for links
def main(locationdata_dictionary_file):
locationdata = {}
with open(locationdata_dictionary_file, "r") as dictionary_file:
locationdata = json.load(dictionary_file)
for input_line in sys.stdin:
data = json.loads(in... | Test average speed calculation by tracking sum and count separately | Test average speed calculation by tracking sum and count separately
| Python | mit | gofore/aws-emr,gofore/aws-emr,gofore/aws-emr,gofore/aws-emr | #!/usr/bin/python
import sys
import json
# Count average speeds for links
def main(locationdata_dictionary_file):
locationdata = {}
with open(locationdata_dictionary_file, "r") as dictionary_file:
locationdata = json.load(dictionary_file)
for input_line in sys.stdin:
data = json.loads(in... | #!/usr/bin/python
import sys
import json
# Count average speeds for links
def main(locationdata_dictionary_file):
locationdata = {}
with open(locationdata_dictionary_file, "r") as dictionary_file:
locationdata = json.load(dictionary_file)
for input_line in sys.stdin:
data = json.loads(in... | <commit_before>#!/usr/bin/python
import sys
import json
# Count average speeds for links
def main(locationdata_dictionary_file):
locationdata = {}
with open(locationdata_dictionary_file, "r") as dictionary_file:
locationdata = json.load(dictionary_file)
for input_line in sys.stdin:
data ... | #!/usr/bin/python
import sys
import json
# Count average speeds for links
def main(locationdata_dictionary_file):
locationdata = {}
with open(locationdata_dictionary_file, "r") as dictionary_file:
locationdata = json.load(dictionary_file)
for input_line in sys.stdin:
data = json.loads(in... | #!/usr/bin/python
import sys
import json
# Count average speeds for links
def main(locationdata_dictionary_file):
locationdata = {}
with open(locationdata_dictionary_file, "r") as dictionary_file:
locationdata = json.load(dictionary_file)
for input_line in sys.stdin:
data = json.loads(in... | <commit_before>#!/usr/bin/python
import sys
import json
# Count average speeds for links
def main(locationdata_dictionary_file):
locationdata = {}
with open(locationdata_dictionary_file, "r") as dictionary_file:
locationdata = json.load(dictionary_file)
for input_line in sys.stdin:
data ... |
fa3605047619495be3ddc3de8a3c3579d57deca4 | djedi/tests/test_admin.py | djedi/tests/test_admin.py | from django.core.urlresolvers import reverse
from djedi.tests.base import ClientTest
class PanelTest(ClientTest):
def test_admin_panel(self):
url = reverse('index')
response = self.client.get(url)
self.assertIn(u'Djedi Test', response.content)
self.assertIn(u'window.DJEDI_NODES', ... | from django.core.urlresolvers import reverse
from django.utils.encoding import smart_unicode
from djedi.tests.base import ClientTest
class PanelTest(ClientTest):
def test_embed(self):
url = reverse('index')
response = self.client.get(url)
self.assertIn(u'Djedi Test', response.content)
... | Add tests for rendering cms admin | Add tests for rendering cms admin | Python | bsd-3-clause | andreif/djedi-cms,andreif/djedi-cms,5monkeys/djedi-cms,andreif/djedi-cms,joar/djedi-cms,joar/djedi-cms,5monkeys/djedi-cms,5monkeys/djedi-cms,joar/djedi-cms | from django.core.urlresolvers import reverse
from djedi.tests.base import ClientTest
class PanelTest(ClientTest):
def test_admin_panel(self):
url = reverse('index')
response = self.client.get(url)
self.assertIn(u'Djedi Test', response.content)
self.assertIn(u'window.DJEDI_NODES', ... | from django.core.urlresolvers import reverse
from django.utils.encoding import smart_unicode
from djedi.tests.base import ClientTest
class PanelTest(ClientTest):
def test_embed(self):
url = reverse('index')
response = self.client.get(url)
self.assertIn(u'Djedi Test', response.content)
... | <commit_before>from django.core.urlresolvers import reverse
from djedi.tests.base import ClientTest
class PanelTest(ClientTest):
def test_admin_panel(self):
url = reverse('index')
response = self.client.get(url)
self.assertIn(u'Djedi Test', response.content)
self.assertIn(u'window... | from django.core.urlresolvers import reverse
from django.utils.encoding import smart_unicode
from djedi.tests.base import ClientTest
class PanelTest(ClientTest):
def test_embed(self):
url = reverse('index')
response = self.client.get(url)
self.assertIn(u'Djedi Test', response.content)
... | from django.core.urlresolvers import reverse
from djedi.tests.base import ClientTest
class PanelTest(ClientTest):
def test_admin_panel(self):
url = reverse('index')
response = self.client.get(url)
self.assertIn(u'Djedi Test', response.content)
self.assertIn(u'window.DJEDI_NODES', ... | <commit_before>from django.core.urlresolvers import reverse
from djedi.tests.base import ClientTest
class PanelTest(ClientTest):
def test_admin_panel(self):
url = reverse('index')
response = self.client.get(url)
self.assertIn(u'Djedi Test', response.content)
self.assertIn(u'window... |
583e3bc4ba82191e34b715485650248398afc2b6 | src/endpoints/base.py | src/endpoints/base.py | class Base:
def __init__(self, client):
self.client = client
| class Base:
def __init__(self, client):
self.client = client
def build_query(self, query):
if query is None:
query_string = ''
else:
query_string = '?'
for key, value in query.items():
if not query_string.endswith('?'):
query_string = query_string + '&'
query_string = query_string + key ... | Add method to build a query string to every class | Add method to build a query string to every class
| Python | mit | Vaelor/python-mattermost-driver | class Base:
def __init__(self, client):
self.client = client
Add method to build a query string to every class | class Base:
def __init__(self, client):
self.client = client
def build_query(self, query):
if query is None:
query_string = ''
else:
query_string = '?'
for key, value in query.items():
if not query_string.endswith('?'):
query_string = query_string + '&'
query_string = query_string + key ... | <commit_before>class Base:
def __init__(self, client):
self.client = client
<commit_msg>Add method to build a query string to every class<commit_after> | class Base:
def __init__(self, client):
self.client = client
def build_query(self, query):
if query is None:
query_string = ''
else:
query_string = '?'
for key, value in query.items():
if not query_string.endswith('?'):
query_string = query_string + '&'
query_string = query_string + key ... | class Base:
def __init__(self, client):
self.client = client
Add method to build a query string to every classclass Base:
def __init__(self, client):
self.client = client
def build_query(self, query):
if query is None:
query_string = ''
else:
query_string = '?'
for key, value in query.items():
... | <commit_before>class Base:
def __init__(self, client):
self.client = client
<commit_msg>Add method to build a query string to every class<commit_after>class Base:
def __init__(self, client):
self.client = client
def build_query(self, query):
if query is None:
query_string = ''
else:
query_string = '?'... |
140e75fb3d96de3784c4ccc7272bbfa0e6b67d39 | pinax/invitations/__init__.py | pinax/invitations/__init__.py | import pkg_resources
__version__ = pkg_resources.get_distribution("pinax-invitations").version
| import pkg_resources
__version__ = pkg_resources.get_distribution("pinax-invitations").version
default_app_config = "pinax.invitations.apps.AppConfig"
| Set default_app_config to point to the correct AppConfig | Set default_app_config to point to the correct AppConfig
| Python | unknown | pinax/pinax-invitations,jacobwegner/pinax-invitations,eldarion/kaleo,rizumu/pinax-invitations | import pkg_resources
__version__ = pkg_resources.get_distribution("pinax-invitations").version
Set default_app_config to point to the correct AppConfig | import pkg_resources
__version__ = pkg_resources.get_distribution("pinax-invitations").version
default_app_config = "pinax.invitations.apps.AppConfig"
| <commit_before>import pkg_resources
__version__ = pkg_resources.get_distribution("pinax-invitations").version
<commit_msg>Set default_app_config to point to the correct AppConfig<commit_after> | import pkg_resources
__version__ = pkg_resources.get_distribution("pinax-invitations").version
default_app_config = "pinax.invitations.apps.AppConfig"
| import pkg_resources
__version__ = pkg_resources.get_distribution("pinax-invitations").version
Set default_app_config to point to the correct AppConfigimport pkg_resources
__version__ = pkg_resources.get_distribution("pinax-invitations").version
default_app_config = "pinax.invitations.apps.AppConfig"
| <commit_before>import pkg_resources
__version__ = pkg_resources.get_distribution("pinax-invitations").version
<commit_msg>Set default_app_config to point to the correct AppConfig<commit_after>import pkg_resources
__version__ = pkg_resources.get_distribution("pinax-invitations").version
default_app_config = "pinax.i... |
9fe573614e2f3ca9a6e738afb7f1af84b541092c | invertedindex.py | invertedindex.py | #!/usr/bin/env python3
# -*- coding: utf8 -*-
# import
class InvertedIndex:
def __init__(self):
self.index = dict()
def add_mail(self, mail):
for key in ["simple_terms_body", "complexe_terms_body"]:
for terms in mail[key]:
if terms in self.index.keys():
... | #!/usr/bin/env python3
# -*- coding: utf8 -*-
# import
class InvertedIndex:
def __init__(self):
self.index = dict()
def add_mail(self, mail):
for key in ["simple_terms_body", "complexe_terms_body"]:
for terms in mail[key]:
if terms in self.index.keys():
... | Add some access function to inverted index | Add some access function to inverted index
| Python | mit | Nedgang/adt_project | #!/usr/bin/env python3
# -*- coding: utf8 -*-
# import
class InvertedIndex:
def __init__(self):
self.index = dict()
def add_mail(self, mail):
for key in ["simple_terms_body", "complexe_terms_body"]:
for terms in mail[key]:
if terms in self.index.keys():
... | #!/usr/bin/env python3
# -*- coding: utf8 -*-
# import
class InvertedIndex:
def __init__(self):
self.index = dict()
def add_mail(self, mail):
for key in ["simple_terms_body", "complexe_terms_body"]:
for terms in mail[key]:
if terms in self.index.keys():
... | <commit_before>#!/usr/bin/env python3
# -*- coding: utf8 -*-
# import
class InvertedIndex:
def __init__(self):
self.index = dict()
def add_mail(self, mail):
for key in ["simple_terms_body", "complexe_terms_body"]:
for terms in mail[key]:
if terms in self.index.ke... | #!/usr/bin/env python3
# -*- coding: utf8 -*-
# import
class InvertedIndex:
def __init__(self):
self.index = dict()
def add_mail(self, mail):
for key in ["simple_terms_body", "complexe_terms_body"]:
for terms in mail[key]:
if terms in self.index.keys():
... | #!/usr/bin/env python3
# -*- coding: utf8 -*-
# import
class InvertedIndex:
def __init__(self):
self.index = dict()
def add_mail(self, mail):
for key in ["simple_terms_body", "complexe_terms_body"]:
for terms in mail[key]:
if terms in self.index.keys():
... | <commit_before>#!/usr/bin/env python3
# -*- coding: utf8 -*-
# import
class InvertedIndex:
def __init__(self):
self.index = dict()
def add_mail(self, mail):
for key in ["simple_terms_body", "complexe_terms_body"]:
for terms in mail[key]:
if terms in self.index.ke... |
d86fc7edd64eba36bf91fc9ad718bb77c7e2b862 | yubico_client/__init__.py | yubico_client/__init__.py | __version__ = (1, 6, 3)
| __version__ = (1, 6, 3)
__all__ = [
'Yubico'
]
from yubico_client.yubico import Yubico
| Allow users to directly do from yubico_client import Yubico. | Allow users to directly do from yubico_client import Yubico.
| Python | bsd-3-clause | Kami/python-yubico-client | __version__ = (1, 6, 3)
Allow users to directly do from yubico_client import Yubico. | __version__ = (1, 6, 3)
__all__ = [
'Yubico'
]
from yubico_client.yubico import Yubico
| <commit_before>__version__ = (1, 6, 3)
<commit_msg>Allow users to directly do from yubico_client import Yubico.<commit_after> | __version__ = (1, 6, 3)
__all__ = [
'Yubico'
]
from yubico_client.yubico import Yubico
| __version__ = (1, 6, 3)
Allow users to directly do from yubico_client import Yubico.__version__ = (1, 6, 3)
__all__ = [
'Yubico'
]
from yubico_client.yubico import Yubico
| <commit_before>__version__ = (1, 6, 3)
<commit_msg>Allow users to directly do from yubico_client import Yubico.<commit_after>__version__ = (1, 6, 3)
__all__ = [
'Yubico'
]
from yubico_client.yubico import Yubico
|
bf41f23d71491050dc79a2975b26ffe210b45505 | examples/test_contains_selector.py | examples/test_contains_selector.py | from seleniumbase import BaseCase
class ContainsSelectorTests(BaseCase):
def test_contains_selector(self):
self.open("https://xkcd.com/2207/")
self.assert_text("Math Work", "#ctitle")
self.click('a:contains("Next")')
self.assert_text("Drone Fishing", "#ctitle")
| from seleniumbase import BaseCase
class ContainsSelectorTests(BaseCase):
def test_contains_selector(self):
self.open("https://xkcd.com/2207/")
self.assert_element('div.box div:contains("Math Work")')
self.click('a:contains("Next")')
self.assert_element('div div:contains("Dr... | Update an example that uses the ":contains()" selector | Update an example that uses the ":contains()" selector
| Python | mit | seleniumbase/SeleniumBase,seleniumbase/SeleniumBase,mdmintz/SeleniumBase,mdmintz/SeleniumBase,seleniumbase/SeleniumBase,mdmintz/SeleniumBase,seleniumbase/SeleniumBase,mdmintz/SeleniumBase | from seleniumbase import BaseCase
class ContainsSelectorTests(BaseCase):
def test_contains_selector(self):
self.open("https://xkcd.com/2207/")
self.assert_text("Math Work", "#ctitle")
self.click('a:contains("Next")')
self.assert_text("Drone Fishing", "#ctitle")
Update an e... | from seleniumbase import BaseCase
class ContainsSelectorTests(BaseCase):
def test_contains_selector(self):
self.open("https://xkcd.com/2207/")
self.assert_element('div.box div:contains("Math Work")')
self.click('a:contains("Next")')
self.assert_element('div div:contains("Dr... | <commit_before>from seleniumbase import BaseCase
class ContainsSelectorTests(BaseCase):
def test_contains_selector(self):
self.open("https://xkcd.com/2207/")
self.assert_text("Math Work", "#ctitle")
self.click('a:contains("Next")')
self.assert_text("Drone Fishing", "#ctitle... | from seleniumbase import BaseCase
class ContainsSelectorTests(BaseCase):
def test_contains_selector(self):
self.open("https://xkcd.com/2207/")
self.assert_element('div.box div:contains("Math Work")')
self.click('a:contains("Next")')
self.assert_element('div div:contains("Dr... | from seleniumbase import BaseCase
class ContainsSelectorTests(BaseCase):
def test_contains_selector(self):
self.open("https://xkcd.com/2207/")
self.assert_text("Math Work", "#ctitle")
self.click('a:contains("Next")')
self.assert_text("Drone Fishing", "#ctitle")
Update an e... | <commit_before>from seleniumbase import BaseCase
class ContainsSelectorTests(BaseCase):
def test_contains_selector(self):
self.open("https://xkcd.com/2207/")
self.assert_text("Math Work", "#ctitle")
self.click('a:contains("Next")')
self.assert_text("Drone Fishing", "#ctitle... |
517c8978c33d7e9f0251985f2ca39b6f2514ae9e | hack/boxee/skin/boxee/720p/scripts/boxeehack_clear_cache.py | hack/boxee/skin/boxee/720p/scripts/boxeehack_clear_cache.py | import os,mc
import xbmc, xbmcgui
def fanart_function():
if mc.ShowDialogConfirm("Clear fanart cache", "Are you sure you want to clear the fanart cache?", "Cancel", "OK"):
pass
def thumbnail_function():
if mc.ShowDialogConfirm("Clear thumbnail cache", "Are you sure you want to clear the thumbnail cach... | import os,mc
import xbmc, xbmcgui
def fanart_function():
if mc.ShowDialogConfirm("Clear fanart cache", "Are you sure you want to clear the fanart cache?", "Cancel", "OK"):
pass
def thumbnail_function():
if mc.ShowDialogConfirm("Clear thumbnail cache", "Are you sure you want to clear the thumbnail cach... | Correct clearing of fanart cache | Correct clearing of fanart cache
| Python | mit | cigamit/boxeehack,cigamit/boxeehack,vLBrian/boxeehack-cigamit,vLBrian/boxeehack-cigamit | import os,mc
import xbmc, xbmcgui
def fanart_function():
if mc.ShowDialogConfirm("Clear fanart cache", "Are you sure you want to clear the fanart cache?", "Cancel", "OK"):
pass
def thumbnail_function():
if mc.ShowDialogConfirm("Clear thumbnail cache", "Are you sure you want to clear the thumbnail cach... | import os,mc
import xbmc, xbmcgui
def fanart_function():
if mc.ShowDialogConfirm("Clear fanart cache", "Are you sure you want to clear the fanart cache?", "Cancel", "OK"):
pass
def thumbnail_function():
if mc.ShowDialogConfirm("Clear thumbnail cache", "Are you sure you want to clear the thumbnail cach... | <commit_before>import os,mc
import xbmc, xbmcgui
def fanart_function():
if mc.ShowDialogConfirm("Clear fanart cache", "Are you sure you want to clear the fanart cache?", "Cancel", "OK"):
pass
def thumbnail_function():
if mc.ShowDialogConfirm("Clear thumbnail cache", "Are you sure you want to clear the... | import os,mc
import xbmc, xbmcgui
def fanart_function():
if mc.ShowDialogConfirm("Clear fanart cache", "Are you sure you want to clear the fanart cache?", "Cancel", "OK"):
pass
def thumbnail_function():
if mc.ShowDialogConfirm("Clear thumbnail cache", "Are you sure you want to clear the thumbnail cach... | import os,mc
import xbmc, xbmcgui
def fanart_function():
if mc.ShowDialogConfirm("Clear fanart cache", "Are you sure you want to clear the fanart cache?", "Cancel", "OK"):
pass
def thumbnail_function():
if mc.ShowDialogConfirm("Clear thumbnail cache", "Are you sure you want to clear the thumbnail cach... | <commit_before>import os,mc
import xbmc, xbmcgui
def fanart_function():
if mc.ShowDialogConfirm("Clear fanart cache", "Are you sure you want to clear the fanart cache?", "Cancel", "OK"):
pass
def thumbnail_function():
if mc.ShowDialogConfirm("Clear thumbnail cache", "Are you sure you want to clear the... |
fa5d6537b94ed06853cddce9afd5e5dfc009384a | statsd/__init__.py | statsd/__init__.py | import socket
import os
try:
from django.conf import settings
except ImportError:
settings = None
from client import StatsClient
__all__ = ['StatsClient', 'statsd']
VERSION = (0, 4, 0)
__version__ = '.'.join(map(str, VERSION))
if settings:
try:
host = getattr(settings, 'STATSD_HOST', 'localho... | import socket
import os
try:
from django.conf import settings
except ImportError:
settings = None
from client import StatsClient
__all__ = ['StatsClient', 'statsd']
VERSION = (0, 4, 0)
__version__ = '.'.join(map(str, VERSION))
if settings:
try:
host = getattr(settings, 'STATSD_HOST', 'localho... | Make sure port is an int | Make sure port is an int
| Python | mit | smarkets/pystatsd,lyft/pystatsd,jsocol/pystatsd,wujuguang/pystatsd,Khan/pystatsd,lyft/pystatsd,deathowl/pystatsd,Khan/pystatsd | import socket
import os
try:
from django.conf import settings
except ImportError:
settings = None
from client import StatsClient
__all__ = ['StatsClient', 'statsd']
VERSION = (0, 4, 0)
__version__ = '.'.join(map(str, VERSION))
if settings:
try:
host = getattr(settings, 'STATSD_HOST', 'localho... | import socket
import os
try:
from django.conf import settings
except ImportError:
settings = None
from client import StatsClient
__all__ = ['StatsClient', 'statsd']
VERSION = (0, 4, 0)
__version__ = '.'.join(map(str, VERSION))
if settings:
try:
host = getattr(settings, 'STATSD_HOST', 'localho... | <commit_before>import socket
import os
try:
from django.conf import settings
except ImportError:
settings = None
from client import StatsClient
__all__ = ['StatsClient', 'statsd']
VERSION = (0, 4, 0)
__version__ = '.'.join(map(str, VERSION))
if settings:
try:
host = getattr(settings, 'STATSD_... | import socket
import os
try:
from django.conf import settings
except ImportError:
settings = None
from client import StatsClient
__all__ = ['StatsClient', 'statsd']
VERSION = (0, 4, 0)
__version__ = '.'.join(map(str, VERSION))
if settings:
try:
host = getattr(settings, 'STATSD_HOST', 'localho... | import socket
import os
try:
from django.conf import settings
except ImportError:
settings = None
from client import StatsClient
__all__ = ['StatsClient', 'statsd']
VERSION = (0, 4, 0)
__version__ = '.'.join(map(str, VERSION))
if settings:
try:
host = getattr(settings, 'STATSD_HOST', 'localho... | <commit_before>import socket
import os
try:
from django.conf import settings
except ImportError:
settings = None
from client import StatsClient
__all__ = ['StatsClient', 'statsd']
VERSION = (0, 4, 0)
__version__ = '.'.join(map(str, VERSION))
if settings:
try:
host = getattr(settings, 'STATSD_... |
a15813399992fb8bbf951854a218e30e4cddd717 | prime-factors/prime_factors.py | prime-factors/prime_factors.py | # File: prime_factors.py
# Purpose: Compute the prime factors of a given natural number.
# Programmer: Amal Shehu
# Course: Exercism
# Date: Monday 26 September 2016, 12:05 AM
def prime_factors(number):
factors = []
if number > 1:
for num in range(2, number):
if (nu... | # File: prime_factors.py
# Purpose: Compute the prime factors of a given natural number.
# Programmer: Amal Shehu
# Course: Exercism
# Date: Monday 26 September 2016, 12:05 AM
def prime_factors(number, n=2, factors=None):
if factors is None:
factors = []
for num in range(n, num... | Add two more arguments with function | Add two more arguments with function
| Python | mit | amalshehu/exercism-python | # File: prime_factors.py
# Purpose: Compute the prime factors of a given natural number.
# Programmer: Amal Shehu
# Course: Exercism
# Date: Monday 26 September 2016, 12:05 AM
def prime_factors(number):
factors = []
if number > 1:
for num in range(2, number):
if (nu... | # File: prime_factors.py
# Purpose: Compute the prime factors of a given natural number.
# Programmer: Amal Shehu
# Course: Exercism
# Date: Monday 26 September 2016, 12:05 AM
def prime_factors(number, n=2, factors=None):
if factors is None:
factors = []
for num in range(n, num... | <commit_before># File: prime_factors.py
# Purpose: Compute the prime factors of a given natural number.
# Programmer: Amal Shehu
# Course: Exercism
# Date: Monday 26 September 2016, 12:05 AM
def prime_factors(number):
factors = []
if number > 1:
for num in range(2, number):
... | # File: prime_factors.py
# Purpose: Compute the prime factors of a given natural number.
# Programmer: Amal Shehu
# Course: Exercism
# Date: Monday 26 September 2016, 12:05 AM
def prime_factors(number, n=2, factors=None):
if factors is None:
factors = []
for num in range(n, num... | # File: prime_factors.py
# Purpose: Compute the prime factors of a given natural number.
# Programmer: Amal Shehu
# Course: Exercism
# Date: Monday 26 September 2016, 12:05 AM
def prime_factors(number):
factors = []
if number > 1:
for num in range(2, number):
if (nu... | <commit_before># File: prime_factors.py
# Purpose: Compute the prime factors of a given natural number.
# Programmer: Amal Shehu
# Course: Exercism
# Date: Monday 26 September 2016, 12:05 AM
def prime_factors(number):
factors = []
if number > 1:
for num in range(2, number):
... |
2d2c368f9ece2235a4c972197e6c0406031fbcb3 | versions.py | versions.py | #!/usr/bin/env python
import os
import warnings
warnings.filterwarnings('ignore', category=DeprecationWarning)
def test_for_version(filename):
stdin, stdout = os.popen4('%s --version' % filename, 'r')
response = stdout.read()
return '.'.join(response.strip().split(' ')[1].split('.')[:-1])
versions = ['p... | #!/usr/bin/env python
import os
import warnings
warnings.filterwarnings('ignore', category=DeprecationWarning)
def test_for_version(filename):
stdin, stdout = os.popen4('%s -V' % filename, 'r')
response = stdout.read()
return '.'.join(response.strip().split(' ')[1].split('.')[:-1])
versions = ['python',... | Change to use short flag for 2.4 | Change to use short flag for 2.4
| Python | mpl-2.0 | fkarb/pika-python3,vrtsystems/pika,renshawbay/pika-python3,benjamin9999/pika,shinji-s/pika,zixiliuyue/pika,skftn/pika,knowsis/pika,jstnlef/pika,hugoxia/pika,Zephor5/pika,pika/pika,vitaly-krugl/pika,reddec/pika,Tarsbot/pika | #!/usr/bin/env python
import os
import warnings
warnings.filterwarnings('ignore', category=DeprecationWarning)
def test_for_version(filename):
stdin, stdout = os.popen4('%s --version' % filename, 'r')
response = stdout.read()
return '.'.join(response.strip().split(' ')[1].split('.')[:-1])
versions = ['p... | #!/usr/bin/env python
import os
import warnings
warnings.filterwarnings('ignore', category=DeprecationWarning)
def test_for_version(filename):
stdin, stdout = os.popen4('%s -V' % filename, 'r')
response = stdout.read()
return '.'.join(response.strip().split(' ')[1].split('.')[:-1])
versions = ['python',... | <commit_before>#!/usr/bin/env python
import os
import warnings
warnings.filterwarnings('ignore', category=DeprecationWarning)
def test_for_version(filename):
stdin, stdout = os.popen4('%s --version' % filename, 'r')
response = stdout.read()
return '.'.join(response.strip().split(' ')[1].split('.')[:-1])
... | #!/usr/bin/env python
import os
import warnings
warnings.filterwarnings('ignore', category=DeprecationWarning)
def test_for_version(filename):
stdin, stdout = os.popen4('%s -V' % filename, 'r')
response = stdout.read()
return '.'.join(response.strip().split(' ')[1].split('.')[:-1])
versions = ['python',... | #!/usr/bin/env python
import os
import warnings
warnings.filterwarnings('ignore', category=DeprecationWarning)
def test_for_version(filename):
stdin, stdout = os.popen4('%s --version' % filename, 'r')
response = stdout.read()
return '.'.join(response.strip().split(' ')[1].split('.')[:-1])
versions = ['p... | <commit_before>#!/usr/bin/env python
import os
import warnings
warnings.filterwarnings('ignore', category=DeprecationWarning)
def test_for_version(filename):
stdin, stdout = os.popen4('%s --version' % filename, 'r')
response = stdout.read()
return '.'.join(response.strip().split(' ')[1].split('.')[:-1])
... |
339622ea314656c1055d08d863ceb1bb0a82faf1 | mne/beamformer/__init__.py | mne/beamformer/__init__.py | """Beamformers for source localization
"""
from ._lcmv import lcmv, lcmv_epochs, lcmv_raw
from ._dics import dics_epochs
| """Beamformers for source localization
"""
from ._lcmv import lcmv, lcmv_epochs, lcmv_raw
from ._dics import dics, dics_epochs
| Add dics to init for beamformer module | Add dics to init for beamformer module
| Python | bsd-3-clause | effigies/mne-python,jmontoyam/mne-python,ARudiuk/mne-python,bloyl/mne-python,leggitta/mne-python,wmvanvliet/mne-python,mne-tools/mne-python,drammock/mne-python,mne-tools/mne-python,Teekuningas/mne-python,andyh616/mne-python,effigies/mne-python,wronk/mne-python,drammock/mne-python,teonlamont/mne-python,yousrabk/mne-pyth... | """Beamformers for source localization
"""
from ._lcmv import lcmv, lcmv_epochs, lcmv_raw
from ._dics import dics_epochs
Add dics to init for beamformer module | """Beamformers for source localization
"""
from ._lcmv import lcmv, lcmv_epochs, lcmv_raw
from ._dics import dics, dics_epochs
| <commit_before>"""Beamformers for source localization
"""
from ._lcmv import lcmv, lcmv_epochs, lcmv_raw
from ._dics import dics_epochs
<commit_msg>Add dics to init for beamformer module<commit_after> | """Beamformers for source localization
"""
from ._lcmv import lcmv, lcmv_epochs, lcmv_raw
from ._dics import dics, dics_epochs
| """Beamformers for source localization
"""
from ._lcmv import lcmv, lcmv_epochs, lcmv_raw
from ._dics import dics_epochs
Add dics to init for beamformer module"""Beamformers for source localization
"""
from ._lcmv import lcmv, lcmv_epochs, lcmv_raw
from ._dics import dics, dics_epochs
| <commit_before>"""Beamformers for source localization
"""
from ._lcmv import lcmv, lcmv_epochs, lcmv_raw
from ._dics import dics_epochs
<commit_msg>Add dics to init for beamformer module<commit_after>"""Beamformers for source localization
"""
from ._lcmv import lcmv, lcmv_epochs, lcmv_raw
from ._dics import dics, dic... |
9311cbe8ed7a434adb46340640895b48e8cc4027 | examples/pi-montecarlo/pi_distarray.py | examples/pi-montecarlo/pi_distarray.py | """
Estimate pi using a Monte Carlo method with distarray.
Usage:
$ python pi_distarray.py <number of points>
"""
import sys
from distarray.client import RandomModule, Context
from util import timer
context = Context()
random = RandomModule(context)
@timer
def calc_pi(n):
"""Estimate pi using distributed Num... | """
Estimate pi using a Monte Carlo method with distarray.
Usage:
$ python pi_distarray.py <number of points>
"""
import sys
from distarray.random import Random
from distarray.client import Context
from util import timer
context = Context()
random = Random(context)
@timer
def calc_pi(n):
"""Estimate pi usi... | Change to reflect recent API changes. | Change to reflect recent API changes.
| Python | bsd-3-clause | RaoUmer/distarray,enthought/distarray,RaoUmer/distarray,enthought/distarray | """
Estimate pi using a Monte Carlo method with distarray.
Usage:
$ python pi_distarray.py <number of points>
"""
import sys
from distarray.client import RandomModule, Context
from util import timer
context = Context()
random = RandomModule(context)
@timer
def calc_pi(n):
"""Estimate pi using distributed Num... | """
Estimate pi using a Monte Carlo method with distarray.
Usage:
$ python pi_distarray.py <number of points>
"""
import sys
from distarray.random import Random
from distarray.client import Context
from util import timer
context = Context()
random = Random(context)
@timer
def calc_pi(n):
"""Estimate pi usi... | <commit_before>"""
Estimate pi using a Monte Carlo method with distarray.
Usage:
$ python pi_distarray.py <number of points>
"""
import sys
from distarray.client import RandomModule, Context
from util import timer
context = Context()
random = RandomModule(context)
@timer
def calc_pi(n):
"""Estimate pi using ... | """
Estimate pi using a Monte Carlo method with distarray.
Usage:
$ python pi_distarray.py <number of points>
"""
import sys
from distarray.random import Random
from distarray.client import Context
from util import timer
context = Context()
random = Random(context)
@timer
def calc_pi(n):
"""Estimate pi usi... | """
Estimate pi using a Monte Carlo method with distarray.
Usage:
$ python pi_distarray.py <number of points>
"""
import sys
from distarray.client import RandomModule, Context
from util import timer
context = Context()
random = RandomModule(context)
@timer
def calc_pi(n):
"""Estimate pi using distributed Num... | <commit_before>"""
Estimate pi using a Monte Carlo method with distarray.
Usage:
$ python pi_distarray.py <number of points>
"""
import sys
from distarray.client import RandomModule, Context
from util import timer
context = Context()
random = RandomModule(context)
@timer
def calc_pi(n):
"""Estimate pi using ... |
108768166c660b0ba38da07b21f687d5813734f2 | jsonconfigparser/__init__.py | jsonconfigparser/__init__.py | from .configparser import JSONConfigParser
from .utils import convert_input, dict_, list_, fieldtypes
from .commands import view, add_file, add_field, delete, edit
version = '0.0.1'
| from .configparser import JSONConfigParser
from .utils import dict_, list_, fieldtypes, command, call
from .commands import add_file, add_field, view, edit, delete, append
version = '0.0.1'
| Make sure correct functions are imported | Make sure correct functions are imported
| Python | mit | justanr/JSONConfigParser | from .configparser import JSONConfigParser
from .utils import convert_input, dict_, list_, fieldtypes
from .commands import view, add_file, add_field, delete, edit
version = '0.0.1'
Make sure correct functions are imported | from .configparser import JSONConfigParser
from .utils import dict_, list_, fieldtypes, command, call
from .commands import add_file, add_field, view, edit, delete, append
version = '0.0.1'
| <commit_before>from .configparser import JSONConfigParser
from .utils import convert_input, dict_, list_, fieldtypes
from .commands import view, add_file, add_field, delete, edit
version = '0.0.1'
<commit_msg>Make sure correct functions are imported<commit_after> | from .configparser import JSONConfigParser
from .utils import dict_, list_, fieldtypes, command, call
from .commands import add_file, add_field, view, edit, delete, append
version = '0.0.1'
| from .configparser import JSONConfigParser
from .utils import convert_input, dict_, list_, fieldtypes
from .commands import view, add_file, add_field, delete, edit
version = '0.0.1'
Make sure correct functions are importedfrom .configparser import JSONConfigParser
from .utils import dict_, list_, fieldtypes, command, ... | <commit_before>from .configparser import JSONConfigParser
from .utils import convert_input, dict_, list_, fieldtypes
from .commands import view, add_file, add_field, delete, edit
version = '0.0.1'
<commit_msg>Make sure correct functions are imported<commit_after>from .configparser import JSONConfigParser
from .utils i... |
9d37d1a08f3d99786db1ccd81f08c8ab24011d7d | runtests.py | runtests.py | #!/usr/bin/env python
import sys
from os.path import dirname, abspath
from django.conf import settings
if not settings.configured:
settings.configure(
DATABASE_ENGINE='django.db.backends.postgresql_psycopg2',
DATABASE_NAME='bitfield_test',
INSTALLED_APPS=[
'bitfield',
... | #!/usr/bin/env python
import sys
from os.path import dirname, abspath
from django.conf import settings
if not settings.configured:
settings.configure(
DATABASE_ENGINE='django.db.backends.postgresql_psycopg2',
DATABASE_NAME='bitfield_test',
INSTALLED_APPS=[
'django.contrib.conte... | Test suite seems to require ContentType to exist | Test suite seems to require ContentType to exist
| Python | apache-2.0 | disqus/django-bitfield,budlight/django-bitfield,moggers87/django-bitfield,joshowen/django-bitfield,Elec/django-bitfield,mattcaldwell/django-bitfield | #!/usr/bin/env python
import sys
from os.path import dirname, abspath
from django.conf import settings
if not settings.configured:
settings.configure(
DATABASE_ENGINE='django.db.backends.postgresql_psycopg2',
DATABASE_NAME='bitfield_test',
INSTALLED_APPS=[
'bitfield',
... | #!/usr/bin/env python
import sys
from os.path import dirname, abspath
from django.conf import settings
if not settings.configured:
settings.configure(
DATABASE_ENGINE='django.db.backends.postgresql_psycopg2',
DATABASE_NAME='bitfield_test',
INSTALLED_APPS=[
'django.contrib.conte... | <commit_before>#!/usr/bin/env python
import sys
from os.path import dirname, abspath
from django.conf import settings
if not settings.configured:
settings.configure(
DATABASE_ENGINE='django.db.backends.postgresql_psycopg2',
DATABASE_NAME='bitfield_test',
INSTALLED_APPS=[
'bitfi... | #!/usr/bin/env python
import sys
from os.path import dirname, abspath
from django.conf import settings
if not settings.configured:
settings.configure(
DATABASE_ENGINE='django.db.backends.postgresql_psycopg2',
DATABASE_NAME='bitfield_test',
INSTALLED_APPS=[
'django.contrib.conte... | #!/usr/bin/env python
import sys
from os.path import dirname, abspath
from django.conf import settings
if not settings.configured:
settings.configure(
DATABASE_ENGINE='django.db.backends.postgresql_psycopg2',
DATABASE_NAME='bitfield_test',
INSTALLED_APPS=[
'bitfield',
... | <commit_before>#!/usr/bin/env python
import sys
from os.path import dirname, abspath
from django.conf import settings
if not settings.configured:
settings.configure(
DATABASE_ENGINE='django.db.backends.postgresql_psycopg2',
DATABASE_NAME='bitfield_test',
INSTALLED_APPS=[
'bitfi... |
67186bff0a37d941e5cfb3420dbd1c0ac010c7b6 | gconvert.py | gconvert.py | #!/usr/bin/env python
import json
import re
from urllib import urlopen
api = 'http://www.google.com/ig/calculator?hl=en&q={}{}=?{}'
def convert(value, src_units, dst_units):
url = api.format(value, src_units, dst_units)
data = urlopen(url).read().decode('utf-8', 'ignore')
# Convert to valid JSON: {foo:... | #!/usr/bin/env python
import json
import re
from urllib import urlopen
api = 'http://www.google.com/ig/calculator?hl=en&q={}{}=?{}'
def convert(value, src_units, dst_units):
url = api.format(value, src_units, dst_units)
# read and preprocess the response
resp = urlopen(url).read()
resp = resp.repl... | Handle scientific notation in response | Handle scientific notation in response
| Python | mit | jason0x43/jc-units | #!/usr/bin/env python
import json
import re
from urllib import urlopen
api = 'http://www.google.com/ig/calculator?hl=en&q={}{}=?{}'
def convert(value, src_units, dst_units):
url = api.format(value, src_units, dst_units)
data = urlopen(url).read().decode('utf-8', 'ignore')
# Convert to valid JSON: {foo:... | #!/usr/bin/env python
import json
import re
from urllib import urlopen
api = 'http://www.google.com/ig/calculator?hl=en&q={}{}=?{}'
def convert(value, src_units, dst_units):
url = api.format(value, src_units, dst_units)
# read and preprocess the response
resp = urlopen(url).read()
resp = resp.repl... | <commit_before>#!/usr/bin/env python
import json
import re
from urllib import urlopen
api = 'http://www.google.com/ig/calculator?hl=en&q={}{}=?{}'
def convert(value, src_units, dst_units):
url = api.format(value, src_units, dst_units)
data = urlopen(url).read().decode('utf-8', 'ignore')
# Convert to va... | #!/usr/bin/env python
import json
import re
from urllib import urlopen
api = 'http://www.google.com/ig/calculator?hl=en&q={}{}=?{}'
def convert(value, src_units, dst_units):
url = api.format(value, src_units, dst_units)
# read and preprocess the response
resp = urlopen(url).read()
resp = resp.repl... | #!/usr/bin/env python
import json
import re
from urllib import urlopen
api = 'http://www.google.com/ig/calculator?hl=en&q={}{}=?{}'
def convert(value, src_units, dst_units):
url = api.format(value, src_units, dst_units)
data = urlopen(url).read().decode('utf-8', 'ignore')
# Convert to valid JSON: {foo:... | <commit_before>#!/usr/bin/env python
import json
import re
from urllib import urlopen
api = 'http://www.google.com/ig/calculator?hl=en&q={}{}=?{}'
def convert(value, src_units, dst_units):
url = api.format(value, src_units, dst_units)
data = urlopen(url).read().decode('utf-8', 'ignore')
# Convert to va... |
ce3371edbd852ba226eb57817b3a04d164d64f7c | h5py/_stub.py | h5py/_stub.py |
# Cython has limits on what you can declare inside control structures. This
# native-Python module is a shim to allow things like dynamic class
# definitions and functional closures.
def generate_class(cls1, cls2):
""" Create a new class from two bases. The new name is the concatenation
of cls2.__name__ wit... |
# Cython has limits on what you can declare inside control structures. This
# native-Python module is a shim to allow things like dynamic class
# definitions and functional closures.
def generate_class(cls1, cls2):
""" Create a new class from two bases. The new name is the concatenation
of cls2.__name__ wit... | Drop H5 suffix for exceptions | Drop H5 suffix for exceptions
| Python | bsd-3-clause | h5py/h5py,h5py/h5py,h5py/h5py |
# Cython has limits on what you can declare inside control structures. This
# native-Python module is a shim to allow things like dynamic class
# definitions and functional closures.
def generate_class(cls1, cls2):
""" Create a new class from two bases. The new name is the concatenation
of cls2.__name__ wit... |
# Cython has limits on what you can declare inside control structures. This
# native-Python module is a shim to allow things like dynamic class
# definitions and functional closures.
def generate_class(cls1, cls2):
""" Create a new class from two bases. The new name is the concatenation
of cls2.__name__ wit... | <commit_before>
# Cython has limits on what you can declare inside control structures. This
# native-Python module is a shim to allow things like dynamic class
# definitions and functional closures.
def generate_class(cls1, cls2):
""" Create a new class from two bases. The new name is the concatenation
of cl... |
# Cython has limits on what you can declare inside control structures. This
# native-Python module is a shim to allow things like dynamic class
# definitions and functional closures.
def generate_class(cls1, cls2):
""" Create a new class from two bases. The new name is the concatenation
of cls2.__name__ wit... |
# Cython has limits on what you can declare inside control structures. This
# native-Python module is a shim to allow things like dynamic class
# definitions and functional closures.
def generate_class(cls1, cls2):
""" Create a new class from two bases. The new name is the concatenation
of cls2.__name__ wit... | <commit_before>
# Cython has limits on what you can declare inside control structures. This
# native-Python module is a shim to allow things like dynamic class
# definitions and functional closures.
def generate_class(cls1, cls2):
""" Create a new class from two bases. The new name is the concatenation
of cl... |
e8c9762cbfac6dbb4dab252bd9cdf0a4e01f3a36 | scipy/ndimage/tests/test_regression.py | scipy/ndimage/tests/test_regression.py | import numpy as np
from numpy.testing import *
import scipy.ndimage as ndimage
def test_byte_order_median():
"""Regression test for #413: median_filter does not handle bytes orders."""
a = np.arange(9, dtype='<f4').reshape(3, 3)
ref = ndimage.filters.median_filter(a,(3, 3))
b = np.arange(9, dtype='>f4... | import numpy as np
from numpy.testing import *
import scipy.ndimage as ndimage
def test_byte_order_median():
"""Regression test for #413: median_filter does not handle bytes orders."""
a = np.arange(9, dtype='<f4').reshape(3, 3)
ref = ndimage.filters.median_filter(a,(3, 3))
b = np.arange(9, dtype='>f4... | Use run_module_suite instead of deprecated NumpyTest. | Use run_module_suite instead of deprecated NumpyTest.
git-svn-id: 003f22d385e25de9cff933a5ea4efd77cb5e7b28@5310 d6536bca-fef9-0310-8506-e4c0a848fbcf
| Python | bsd-3-clause | jasonmccampbell/scipy-refactor,lesserwhirls/scipy-cwt,scipy/scipy-svn,lesserwhirls/scipy-cwt,scipy/scipy-svn,scipy/scipy-svn,jasonmccampbell/scipy-refactor,jasonmccampbell/scipy-refactor,lesserwhirls/scipy-cwt,lesserwhirls/scipy-cwt,jasonmccampbell/scipy-refactor,scipy/scipy-svn | import numpy as np
from numpy.testing import *
import scipy.ndimage as ndimage
def test_byte_order_median():
"""Regression test for #413: median_filter does not handle bytes orders."""
a = np.arange(9, dtype='<f4').reshape(3, 3)
ref = ndimage.filters.median_filter(a,(3, 3))
b = np.arange(9, dtype='>f4... | import numpy as np
from numpy.testing import *
import scipy.ndimage as ndimage
def test_byte_order_median():
"""Regression test for #413: median_filter does not handle bytes orders."""
a = np.arange(9, dtype='<f4').reshape(3, 3)
ref = ndimage.filters.median_filter(a,(3, 3))
b = np.arange(9, dtype='>f4... | <commit_before>import numpy as np
from numpy.testing import *
import scipy.ndimage as ndimage
def test_byte_order_median():
"""Regression test for #413: median_filter does not handle bytes orders."""
a = np.arange(9, dtype='<f4').reshape(3, 3)
ref = ndimage.filters.median_filter(a,(3, 3))
b = np.arang... | import numpy as np
from numpy.testing import *
import scipy.ndimage as ndimage
def test_byte_order_median():
"""Regression test for #413: median_filter does not handle bytes orders."""
a = np.arange(9, dtype='<f4').reshape(3, 3)
ref = ndimage.filters.median_filter(a,(3, 3))
b = np.arange(9, dtype='>f4... | import numpy as np
from numpy.testing import *
import scipy.ndimage as ndimage
def test_byte_order_median():
"""Regression test for #413: median_filter does not handle bytes orders."""
a = np.arange(9, dtype='<f4').reshape(3, 3)
ref = ndimage.filters.median_filter(a,(3, 3))
b = np.arange(9, dtype='>f4... | <commit_before>import numpy as np
from numpy.testing import *
import scipy.ndimage as ndimage
def test_byte_order_median():
"""Regression test for #413: median_filter does not handle bytes orders."""
a = np.arange(9, dtype='<f4').reshape(3, 3)
ref = ndimage.filters.median_filter(a,(3, 3))
b = np.arang... |
bdc8ac1db8681dd45d4498ccd9735be5b1cdb1b7 | hash_table.py | hash_table.py | #!/usr/bin/env python
'''Implementation of a simple hash table.
The table has `hash`, `get` and `set` methods.
The hash function uses a very basic hash algorithm to insert the value
into the table.
'''
class HashItem(object):
def __init__(self, key, value):
self.key = key
self.value = value
cla... | #!/usr/bin/env python
'''Implementation of a simple hash table.
The table has `hash`, `get` and `set` methods.
The hash function uses a very basic hash algorithm to insert the value
into the table.
'''
class HashItem(object):
def __init__(self, key, value):
self.key = key
self.value = value
cla... | Add handling for duplicate keys in set; fix bug in hash function (was calling ord on key instead of character); change name of class to HashTable from Hash | Add handling for duplicate keys in set; fix bug in hash function (was calling ord on key instead of character); change name of class to HashTable from Hash
| Python | mit | jwarren116/data-structures-deux | #!/usr/bin/env python
'''Implementation of a simple hash table.
The table has `hash`, `get` and `set` methods.
The hash function uses a very basic hash algorithm to insert the value
into the table.
'''
class HashItem(object):
def __init__(self, key, value):
self.key = key
self.value = value
cla... | #!/usr/bin/env python
'''Implementation of a simple hash table.
The table has `hash`, `get` and `set` methods.
The hash function uses a very basic hash algorithm to insert the value
into the table.
'''
class HashItem(object):
def __init__(self, key, value):
self.key = key
self.value = value
cla... | <commit_before>#!/usr/bin/env python
'''Implementation of a simple hash table.
The table has `hash`, `get` and `set` methods.
The hash function uses a very basic hash algorithm to insert the value
into the table.
'''
class HashItem(object):
def __init__(self, key, value):
self.key = key
self.valu... | #!/usr/bin/env python
'''Implementation of a simple hash table.
The table has `hash`, `get` and `set` methods.
The hash function uses a very basic hash algorithm to insert the value
into the table.
'''
class HashItem(object):
def __init__(self, key, value):
self.key = key
self.value = value
cla... | #!/usr/bin/env python
'''Implementation of a simple hash table.
The table has `hash`, `get` and `set` methods.
The hash function uses a very basic hash algorithm to insert the value
into the table.
'''
class HashItem(object):
def __init__(self, key, value):
self.key = key
self.value = value
cla... | <commit_before>#!/usr/bin/env python
'''Implementation of a simple hash table.
The table has `hash`, `get` and `set` methods.
The hash function uses a very basic hash algorithm to insert the value
into the table.
'''
class HashItem(object):
def __init__(self, key, value):
self.key = key
self.valu... |
7dec24bb55b7c33133f62f8f124fde0948d417a8 | snippet/example/python/utils.py | snippet/example/python/utils.py | #!/usr/bin/env python
# encoding: utf-8
from __future__ import absolute_import, unicode_literals, print_function, division
import sys
if sys.version_info[0] < 3:
PY3, Unicode, Bytes = False, unicode, str
else:
PY3, Unicode, Bytes = True, str, bytes
to_bytes = lambda v, e="utf-8": v.encode(e) if isinstance(v... | #!/usr/bin/env python
# encoding: utf-8
from __future__ import absolute_import, unicode_literals, print_function, division
import sys
if sys.version_info[0] < 3:
PY3, Unicode, Bytes = False, unicode, str
else:
PY3, Unicode, Bytes = True, str, bytes
to_bytes = lambda v, e="utf-8": v.encode(e) if isinstance(v... | Add the python example ObjectDict | Add the python example ObjectDict
| Python | mit | xgfone/snippet,xgfone/snippet,xgfone/snippet,xgfone/snippet,xgfone/snippet,xgfone/snippet,xgfone/snippet | #!/usr/bin/env python
# encoding: utf-8
from __future__ import absolute_import, unicode_literals, print_function, division
import sys
if sys.version_info[0] < 3:
PY3, Unicode, Bytes = False, unicode, str
else:
PY3, Unicode, Bytes = True, str, bytes
to_bytes = lambda v, e="utf-8": v.encode(e) if isinstance(v... | #!/usr/bin/env python
# encoding: utf-8
from __future__ import absolute_import, unicode_literals, print_function, division
import sys
if sys.version_info[0] < 3:
PY3, Unicode, Bytes = False, unicode, str
else:
PY3, Unicode, Bytes = True, str, bytes
to_bytes = lambda v, e="utf-8": v.encode(e) if isinstance(v... | <commit_before>#!/usr/bin/env python
# encoding: utf-8
from __future__ import absolute_import, unicode_literals, print_function, division
import sys
if sys.version_info[0] < 3:
PY3, Unicode, Bytes = False, unicode, str
else:
PY3, Unicode, Bytes = True, str, bytes
to_bytes = lambda v, e="utf-8": v.encode(e) ... | #!/usr/bin/env python
# encoding: utf-8
from __future__ import absolute_import, unicode_literals, print_function, division
import sys
if sys.version_info[0] < 3:
PY3, Unicode, Bytes = False, unicode, str
else:
PY3, Unicode, Bytes = True, str, bytes
to_bytes = lambda v, e="utf-8": v.encode(e) if isinstance(v... | #!/usr/bin/env python
# encoding: utf-8
from __future__ import absolute_import, unicode_literals, print_function, division
import sys
if sys.version_info[0] < 3:
PY3, Unicode, Bytes = False, unicode, str
else:
PY3, Unicode, Bytes = True, str, bytes
to_bytes = lambda v, e="utf-8": v.encode(e) if isinstance(v... | <commit_before>#!/usr/bin/env python
# encoding: utf-8
from __future__ import absolute_import, unicode_literals, print_function, division
import sys
if sys.version_info[0] < 3:
PY3, Unicode, Bytes = False, unicode, str
else:
PY3, Unicode, Bytes = True, str, bytes
to_bytes = lambda v, e="utf-8": v.encode(e) ... |
c5c77ba407e195e3cc98bb75a961fe112736fca6 | homebrew/command_line.py | homebrew/command_line.py | # -*- coding: utf-8 -*-
from .homebrew import HomeBrew
def main():
HomeBrew().log_info()
| # -*- coding: utf-8 -*-
import argparse
from .homebrew import HomeBrew
def main():
argparse.ArgumentParser(description='Get homebrew info').parse_args()
HomeBrew().log_info()
| Add argparse for info on hb command | Add argparse for info on hb command
| Python | isc | igroen/homebrew | # -*- coding: utf-8 -*-
from .homebrew import HomeBrew
def main():
HomeBrew().log_info()
Add argparse for info on hb command | # -*- coding: utf-8 -*-
import argparse
from .homebrew import HomeBrew
def main():
argparse.ArgumentParser(description='Get homebrew info').parse_args()
HomeBrew().log_info()
| <commit_before># -*- coding: utf-8 -*-
from .homebrew import HomeBrew
def main():
HomeBrew().log_info()
<commit_msg>Add argparse for info on hb command<commit_after> | # -*- coding: utf-8 -*-
import argparse
from .homebrew import HomeBrew
def main():
argparse.ArgumentParser(description='Get homebrew info').parse_args()
HomeBrew().log_info()
| # -*- coding: utf-8 -*-
from .homebrew import HomeBrew
def main():
HomeBrew().log_info()
Add argparse for info on hb command# -*- coding: utf-8 -*-
import argparse
from .homebrew import HomeBrew
def main():
argparse.ArgumentParser(description='Get homebrew info').parse_args()
HomeBrew().log_info()
| <commit_before># -*- coding: utf-8 -*-
from .homebrew import HomeBrew
def main():
HomeBrew().log_info()
<commit_msg>Add argparse for info on hb command<commit_after># -*- coding: utf-8 -*-
import argparse
from .homebrew import HomeBrew
def main():
argparse.ArgumentParser(description='Get homebrew info').pa... |
207a1a8fad79ccfa0c244aa0a1d0d25fee87c438 | testfixtures/tests/test_docs.py | testfixtures/tests/test_docs.py | # Copyright (c) 2009-2012 Simplistix Ltd
#
# See license.txt for more details.
from doctest import REPORT_NDIFF,ELLIPSIS
from glob import glob
from manuel import doctest, capture
from manuel.testing import TestSuite
from nose.plugins.skip import SkipTest
from os.path import dirname, join, pardir
import os
from . imp... | # Copyright (c) 2009-2012 Simplistix Ltd
#
# See license.txt for more details.
from doctest import REPORT_NDIFF,ELLIPSIS
from glob import glob
from manuel import doctest, capture
from manuel.testing import TestSuite
from nose.plugins.skip import SkipTest
from os.path import dirname, join, pardir
import os
from . imp... | Use a WORKSPACE to make life easier in Jenkins. | Use a WORKSPACE to make life easier in Jenkins. | Python | mit | nebulans/testfixtures,Simplistix/testfixtures | # Copyright (c) 2009-2012 Simplistix Ltd
#
# See license.txt for more details.
from doctest import REPORT_NDIFF,ELLIPSIS
from glob import glob
from manuel import doctest, capture
from manuel.testing import TestSuite
from nose.plugins.skip import SkipTest
from os.path import dirname, join, pardir
import os
from . imp... | # Copyright (c) 2009-2012 Simplistix Ltd
#
# See license.txt for more details.
from doctest import REPORT_NDIFF,ELLIPSIS
from glob import glob
from manuel import doctest, capture
from manuel.testing import TestSuite
from nose.plugins.skip import SkipTest
from os.path import dirname, join, pardir
import os
from . imp... | <commit_before># Copyright (c) 2009-2012 Simplistix Ltd
#
# See license.txt for more details.
from doctest import REPORT_NDIFF,ELLIPSIS
from glob import glob
from manuel import doctest, capture
from manuel.testing import TestSuite
from nose.plugins.skip import SkipTest
from os.path import dirname, join, pardir
import... | # Copyright (c) 2009-2012 Simplistix Ltd
#
# See license.txt for more details.
from doctest import REPORT_NDIFF,ELLIPSIS
from glob import glob
from manuel import doctest, capture
from manuel.testing import TestSuite
from nose.plugins.skip import SkipTest
from os.path import dirname, join, pardir
import os
from . imp... | # Copyright (c) 2009-2012 Simplistix Ltd
#
# See license.txt for more details.
from doctest import REPORT_NDIFF,ELLIPSIS
from glob import glob
from manuel import doctest, capture
from manuel.testing import TestSuite
from nose.plugins.skip import SkipTest
from os.path import dirname, join, pardir
import os
from . imp... | <commit_before># Copyright (c) 2009-2012 Simplistix Ltd
#
# See license.txt for more details.
from doctest import REPORT_NDIFF,ELLIPSIS
from glob import glob
from manuel import doctest, capture
from manuel.testing import TestSuite
from nose.plugins.skip import SkipTest
from os.path import dirname, join, pardir
import... |
6a9fb4f8ad3c8fda2b12688be5058e95d5e995e7 | tests/test_main.py | tests/test_main.py | import os
def test_qt_api():
"""
If QT_API is specified, we check that the correct Qt wrapper was used
"""
from qtpy import QtCore, QtGui, QtWidgets, QtWebEngineWidgets
QT_API = os.environ.get('QT_API', None)
if QT_API == 'pyside':
import PySide
assert QtCore.QEvent is PySid... | import os
from qtpy import QtCore, QtGui, QtWidgets, QtWebEngineWidgets
def assert_pyside():
import PySide
assert QtCore.QEvent is PySide.QtCore.QEvent
assert QtGui.QPainter is PySide.QtGui.QPainter
assert QtWidgets.QWidget is PySide.QtGui.QWidget
assert QtWebEngineWidgets.QWebEnginePage is PySid... | Check that the priority order is respected if QT_API or USE_QT_API are not specified. | Check that the priority order is respected if QT_API or USE_QT_API are not specified. | Python | mit | goanpeca/qtpy,davvid/qtpy,davvid/qtpy,goanpeca/qtpy,spyder-ide/qtpy | import os
def test_qt_api():
"""
If QT_API is specified, we check that the correct Qt wrapper was used
"""
from qtpy import QtCore, QtGui, QtWidgets, QtWebEngineWidgets
QT_API = os.environ.get('QT_API', None)
if QT_API == 'pyside':
import PySide
assert QtCore.QEvent is PySid... | import os
from qtpy import QtCore, QtGui, QtWidgets, QtWebEngineWidgets
def assert_pyside():
import PySide
assert QtCore.QEvent is PySide.QtCore.QEvent
assert QtGui.QPainter is PySide.QtGui.QPainter
assert QtWidgets.QWidget is PySide.QtGui.QWidget
assert QtWebEngineWidgets.QWebEnginePage is PySid... | <commit_before>import os
def test_qt_api():
"""
If QT_API is specified, we check that the correct Qt wrapper was used
"""
from qtpy import QtCore, QtGui, QtWidgets, QtWebEngineWidgets
QT_API = os.environ.get('QT_API', None)
if QT_API == 'pyside':
import PySide
assert QtCore.... | import os
from qtpy import QtCore, QtGui, QtWidgets, QtWebEngineWidgets
def assert_pyside():
import PySide
assert QtCore.QEvent is PySide.QtCore.QEvent
assert QtGui.QPainter is PySide.QtGui.QPainter
assert QtWidgets.QWidget is PySide.QtGui.QWidget
assert QtWebEngineWidgets.QWebEnginePage is PySid... | import os
def test_qt_api():
"""
If QT_API is specified, we check that the correct Qt wrapper was used
"""
from qtpy import QtCore, QtGui, QtWidgets, QtWebEngineWidgets
QT_API = os.environ.get('QT_API', None)
if QT_API == 'pyside':
import PySide
assert QtCore.QEvent is PySid... | <commit_before>import os
def test_qt_api():
"""
If QT_API is specified, we check that the correct Qt wrapper was used
"""
from qtpy import QtCore, QtGui, QtWidgets, QtWebEngineWidgets
QT_API = os.environ.get('QT_API', None)
if QT_API == 'pyside':
import PySide
assert QtCore.... |
66420e5b72f58652aca1cf0353897bd43ee57aef | nipype/testing/__init__.py | nipype/testing/__init__.py | """Simple utility to pull in all the testing functions we're likely to use.
"""
import numpy as np
from distutils.version import LooseVersion
from nose.tools import (assert_true, assert_false, assert_not_equal,
assert_raises)
from nose import SkipTest
if LooseVersion(np.__version__) >= '1.2':... | """Simple utility to pull in all the testing functions we're likely to use.
"""
import numpy as np
from distutils.version import LooseVersion
from nose.tools import (assert_true, assert_false, assert_not_equal,
assert_raises)
from nose import SkipTest, with_setup
if LooseVersion(np.__version_... | Add import of with_setup that got lost in the numpy testing merge. | Add import of with_setup that got lost in the numpy testing merge.
git-svn-id: 24f545668198cdd163a527378499f2123e59bf9f@1236 ead46cd0-7350-4e37-8683-fc4c6f79bf00
| Python | bsd-3-clause | carolFrohlich/nipype,FCP-INDI/nipype,gerddie/nipype,JohnGriffiths/nipype,FCP-INDI/nipype,Leoniela/nipype,mick-d/nipype_source,fprados/nipype,FredLoney/nipype,christianbrodbeck/nipype,carolFrohlich/nipype,carolFrohlich/nipype,wanderine/nipype,wanderine/nipype,gerddie/nipype,wanderine/nipype,mick-d/nipype,sgiavasis/nipyp... | """Simple utility to pull in all the testing functions we're likely to use.
"""
import numpy as np
from distutils.version import LooseVersion
from nose.tools import (assert_true, assert_false, assert_not_equal,
assert_raises)
from nose import SkipTest
if LooseVersion(np.__version__) >= '1.2':... | """Simple utility to pull in all the testing functions we're likely to use.
"""
import numpy as np
from distutils.version import LooseVersion
from nose.tools import (assert_true, assert_false, assert_not_equal,
assert_raises)
from nose import SkipTest, with_setup
if LooseVersion(np.__version_... | <commit_before>"""Simple utility to pull in all the testing functions we're likely to use.
"""
import numpy as np
from distutils.version import LooseVersion
from nose.tools import (assert_true, assert_false, assert_not_equal,
assert_raises)
from nose import SkipTest
if LooseVersion(np.__versi... | """Simple utility to pull in all the testing functions we're likely to use.
"""
import numpy as np
from distutils.version import LooseVersion
from nose.tools import (assert_true, assert_false, assert_not_equal,
assert_raises)
from nose import SkipTest, with_setup
if LooseVersion(np.__version_... | """Simple utility to pull in all the testing functions we're likely to use.
"""
import numpy as np
from distutils.version import LooseVersion
from nose.tools import (assert_true, assert_false, assert_not_equal,
assert_raises)
from nose import SkipTest
if LooseVersion(np.__version__) >= '1.2':... | <commit_before>"""Simple utility to pull in all the testing functions we're likely to use.
"""
import numpy as np
from distutils.version import LooseVersion
from nose.tools import (assert_true, assert_false, assert_not_equal,
assert_raises)
from nose import SkipTest
if LooseVersion(np.__versi... |
45325a43cf4525ef39afec86c03451525f907e92 | hiro/utils.py | hiro/utils.py | """
random utility functions
"""
import datetime
import functools
import time
from .errors import InvalidTypeError
def timedelta_to_seconds(delta):
"""
converts a timedelta object to seconds
"""
seconds = delta.microseconds
seconds += (delta.seconds + delta.days * 24 * 3600) * 10 ** 6
return f... | """
random utility functions
"""
import calendar
import datetime
import functools
from .errors import InvalidTypeError
def timedelta_to_seconds(delta):
"""
converts a timedelta object to seconds
"""
seconds = delta.microseconds
seconds += (delta.seconds + delta.days * 24 * 3600) * 10 ** 6
retu... | Fix TZ-dependent return values from time_in_seconds() | Fix TZ-dependent return values from time_in_seconds()
time.mktime assumes that the time tuple is in local time, rather than UTC. Use
calendar.timegm instead for consistency.
| Python | mit | alisaifee/hiro,alisaifee/hiro | """
random utility functions
"""
import datetime
import functools
import time
from .errors import InvalidTypeError
def timedelta_to_seconds(delta):
"""
converts a timedelta object to seconds
"""
seconds = delta.microseconds
seconds += (delta.seconds + delta.days * 24 * 3600) * 10 ** 6
return f... | """
random utility functions
"""
import calendar
import datetime
import functools
from .errors import InvalidTypeError
def timedelta_to_seconds(delta):
"""
converts a timedelta object to seconds
"""
seconds = delta.microseconds
seconds += (delta.seconds + delta.days * 24 * 3600) * 10 ** 6
retu... | <commit_before>"""
random utility functions
"""
import datetime
import functools
import time
from .errors import InvalidTypeError
def timedelta_to_seconds(delta):
"""
converts a timedelta object to seconds
"""
seconds = delta.microseconds
seconds += (delta.seconds + delta.days * 24 * 3600) * 10 **... | """
random utility functions
"""
import calendar
import datetime
import functools
from .errors import InvalidTypeError
def timedelta_to_seconds(delta):
"""
converts a timedelta object to seconds
"""
seconds = delta.microseconds
seconds += (delta.seconds + delta.days * 24 * 3600) * 10 ** 6
retu... | """
random utility functions
"""
import datetime
import functools
import time
from .errors import InvalidTypeError
def timedelta_to_seconds(delta):
"""
converts a timedelta object to seconds
"""
seconds = delta.microseconds
seconds += (delta.seconds + delta.days * 24 * 3600) * 10 ** 6
return f... | <commit_before>"""
random utility functions
"""
import datetime
import functools
import time
from .errors import InvalidTypeError
def timedelta_to_seconds(delta):
"""
converts a timedelta object to seconds
"""
seconds = delta.microseconds
seconds += (delta.seconds + delta.days * 24 * 3600) * 10 **... |
4ca420de76b2c385b07f46681a779b160f2af62f | mpl_style_gallery/__main__.py | mpl_style_gallery/__main__.py | from argparse import ArgumentParser
from . import app
from . import build
parser = ArgumentParser()
parser.add_argument('action', nargs='?', default='build',
choices=['build', 'display'])
args = parser.parse_args()
if args.action == 'build':
build.save_all_plots()
if args.action in ('build'... | #!/usr/bin/env python
"""
Create Matplotlib style gallery for all Matplotlib stylesheets and display in
the browser. By default, all plots are rebuilt, but this can be avoided using
the `--skip-build` (`-s`) flag.
"""
import argparse
from . import app
from . import build
def main():
formatter = argparse.Argument... | Clean up API for main module | Clean up API for main module
| Python | bsd-3-clause | tonysyu/matplotlib-style-gallery,tonysyu/matplotlib-style-gallery,tonysyu/matplotlib-style-gallery | from argparse import ArgumentParser
from . import app
from . import build
parser = ArgumentParser()
parser.add_argument('action', nargs='?', default='build',
choices=['build', 'display'])
args = parser.parse_args()
if args.action == 'build':
build.save_all_plots()
if args.action in ('build'... | #!/usr/bin/env python
"""
Create Matplotlib style gallery for all Matplotlib stylesheets and display in
the browser. By default, all plots are rebuilt, but this can be avoided using
the `--skip-build` (`-s`) flag.
"""
import argparse
from . import app
from . import build
def main():
formatter = argparse.Argument... | <commit_before>from argparse import ArgumentParser
from . import app
from . import build
parser = ArgumentParser()
parser.add_argument('action', nargs='?', default='build',
choices=['build', 'display'])
args = parser.parse_args()
if args.action == 'build':
build.save_all_plots()
if args.act... | #!/usr/bin/env python
"""
Create Matplotlib style gallery for all Matplotlib stylesheets and display in
the browser. By default, all plots are rebuilt, but this can be avoided using
the `--skip-build` (`-s`) flag.
"""
import argparse
from . import app
from . import build
def main():
formatter = argparse.Argument... | from argparse import ArgumentParser
from . import app
from . import build
parser = ArgumentParser()
parser.add_argument('action', nargs='?', default='build',
choices=['build', 'display'])
args = parser.parse_args()
if args.action == 'build':
build.save_all_plots()
if args.action in ('build'... | <commit_before>from argparse import ArgumentParser
from . import app
from . import build
parser = ArgumentParser()
parser.add_argument('action', nargs='?', default='build',
choices=['build', 'display'])
args = parser.parse_args()
if args.action == 'build':
build.save_all_plots()
if args.act... |
f0a6a091e4b2d3943cdd582d3183602ad50b9729 | httpDissec.py | httpDissec.py | # sudo apt-get install python-scapy
from scapy.all import *
# sudo pip install scapy_http
from scapy.layers import http
from scapy.layers.http import HTTPResponse
import sys
packets = rdpcap("task07_f1.pcap")
requests = []
answers = []
def has_http_header(packet):
return packet.haslayer(HTTPResponse)
def extra... | # sudo apt-get install python-scapy
from scapy.all import *
# sudo pip install scapy_http
from scapy.layers import http
from scapy.layers.http import HTTPResponse
import sys
packets = rdpcap("task07_f1.pcap")
requests = []
answers = []
def has_http_header(packet):
return packet.haslayer(HTTPResponse)
def extra... | Set name of stored file | Set name of stored file
| Python | mit | alexst07/http_dissector | # sudo apt-get install python-scapy
from scapy.all import *
# sudo pip install scapy_http
from scapy.layers import http
from scapy.layers.http import HTTPResponse
import sys
packets = rdpcap("task07_f1.pcap")
requests = []
answers = []
def has_http_header(packet):
return packet.haslayer(HTTPResponse)
def extra... | # sudo apt-get install python-scapy
from scapy.all import *
# sudo pip install scapy_http
from scapy.layers import http
from scapy.layers.http import HTTPResponse
import sys
packets = rdpcap("task07_f1.pcap")
requests = []
answers = []
def has_http_header(packet):
return packet.haslayer(HTTPResponse)
def extra... | <commit_before># sudo apt-get install python-scapy
from scapy.all import *
# sudo pip install scapy_http
from scapy.layers import http
from scapy.layers.http import HTTPResponse
import sys
packets = rdpcap("task07_f1.pcap")
requests = []
answers = []
def has_http_header(packet):
return packet.haslayer(HTTPRespon... | # sudo apt-get install python-scapy
from scapy.all import *
# sudo pip install scapy_http
from scapy.layers import http
from scapy.layers.http import HTTPResponse
import sys
packets = rdpcap("task07_f1.pcap")
requests = []
answers = []
def has_http_header(packet):
return packet.haslayer(HTTPResponse)
def extra... | # sudo apt-get install python-scapy
from scapy.all import *
# sudo pip install scapy_http
from scapy.layers import http
from scapy.layers.http import HTTPResponse
import sys
packets = rdpcap("task07_f1.pcap")
requests = []
answers = []
def has_http_header(packet):
return packet.haslayer(HTTPResponse)
def extra... | <commit_before># sudo apt-get install python-scapy
from scapy.all import *
# sudo pip install scapy_http
from scapy.layers import http
from scapy.layers.http import HTTPResponse
import sys
packets = rdpcap("task07_f1.pcap")
requests = []
answers = []
def has_http_header(packet):
return packet.haslayer(HTTPRespon... |
b8f948b58b06648c94fb746ae519a44a7e96ae15 | tools/perf/perf_tools/kraken.py | tools/perf/perf_tools/kraken.py | # 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.
from telemetry import multi_page_benchmark
from telemetry import util
def _Mean(l):
return float(sum(l)) / len(l) if len(l) > 0 else 0.0
class Kraken... | # 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.
from telemetry import multi_page_benchmark
from telemetry import util
def _Mean(l):
return float(sum(l)) / len(l) if len(l) > 0 else 0.0
class Kraken... | Increase Kraken timeout to allow it to pass on Android. | [Telemetry] Increase Kraken timeout to allow it to pass on Android.
BUG=163680
TEST=tools/perf/run_multipage_benchmarks --browser=android-content-shell kraken tools/perf/page_sets/kraken.json
Review URL: https://chromiumcodereview.appspot.com/11519015
git-svn-id: de016e52bd170d2d4f2344f9bf92d50478b649e0@172374 0039... | Python | bsd-3-clause | ChromiumWebApps/chromium,fujunwei/chromium-crosswalk,bright-sparks/chromium-spacewalk,bright-sparks/chromium-spacewalk,Chilledheart/chromium,crosswalk-project/chromium-crosswalk-efl,dushu1203/chromium.src,M4sse/chromium.src,mogoweb/chromium-crosswalk,mohamed--abdel-maksoud/chromium.src,anirudhSK/chromium,Fireblend/chro... | # 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.
from telemetry import multi_page_benchmark
from telemetry import util
def _Mean(l):
return float(sum(l)) / len(l) if len(l) > 0 else 0.0
class Kraken... | # 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.
from telemetry import multi_page_benchmark
from telemetry import util
def _Mean(l):
return float(sum(l)) / len(l) if len(l) > 0 else 0.0
class Kraken... | <commit_before># 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.
from telemetry import multi_page_benchmark
from telemetry import util
def _Mean(l):
return float(sum(l)) / len(l) if len(l) > 0 else 0.... | # 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.
from telemetry import multi_page_benchmark
from telemetry import util
def _Mean(l):
return float(sum(l)) / len(l) if len(l) > 0 else 0.0
class Kraken... | # 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.
from telemetry import multi_page_benchmark
from telemetry import util
def _Mean(l):
return float(sum(l)) / len(l) if len(l) > 0 else 0.0
class Kraken... | <commit_before># 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.
from telemetry import multi_page_benchmark
from telemetry import util
def _Mean(l):
return float(sum(l)) / len(l) if len(l) > 0 else 0.... |
1819f9cb080f847ea5d669571853b28d8fc1ce1c | Script/test_screenshot.py | Script/test_screenshot.py | import unittest
import os
import time
import shutil
import filecmp
import base64
import glob
import json
class ScreenShotTest(unittest.TestCase):
def test_screenshots(self):
generated_file_paths = glob.glob('build/Dev/Cpp/Test/Release/*.png')
for path in generated_file_paths:
name = os... | import sys
import unittest
import os
import time
import shutil
import filecmp
import base64
import glob
import json
class ScreenShotTest(unittest.TestCase):
def test_screenshots(self):
generated_file_paths = glob.glob('build/Dev/Cpp/Test/Release/*.png')
success = True
for path in generat... | Improve a script to test | Improve a script to test
| Python | mit | effekseer/Effekseer,effekseer/Effekseer,effekseer/Effekseer,effekseer/Effekseer,effekseer/Effekseer,effekseer/Effekseer,effekseer/Effekseer | import unittest
import os
import time
import shutil
import filecmp
import base64
import glob
import json
class ScreenShotTest(unittest.TestCase):
def test_screenshots(self):
generated_file_paths = glob.glob('build/Dev/Cpp/Test/Release/*.png')
for path in generated_file_paths:
name = os... | import sys
import unittest
import os
import time
import shutil
import filecmp
import base64
import glob
import json
class ScreenShotTest(unittest.TestCase):
def test_screenshots(self):
generated_file_paths = glob.glob('build/Dev/Cpp/Test/Release/*.png')
success = True
for path in generat... | <commit_before>import unittest
import os
import time
import shutil
import filecmp
import base64
import glob
import json
class ScreenShotTest(unittest.TestCase):
def test_screenshots(self):
generated_file_paths = glob.glob('build/Dev/Cpp/Test/Release/*.png')
for path in generated_file_paths:
... | import sys
import unittest
import os
import time
import shutil
import filecmp
import base64
import glob
import json
class ScreenShotTest(unittest.TestCase):
def test_screenshots(self):
generated_file_paths = glob.glob('build/Dev/Cpp/Test/Release/*.png')
success = True
for path in generat... | import unittest
import os
import time
import shutil
import filecmp
import base64
import glob
import json
class ScreenShotTest(unittest.TestCase):
def test_screenshots(self):
generated_file_paths = glob.glob('build/Dev/Cpp/Test/Release/*.png')
for path in generated_file_paths:
name = os... | <commit_before>import unittest
import os
import time
import shutil
import filecmp
import base64
import glob
import json
class ScreenShotTest(unittest.TestCase):
def test_screenshots(self):
generated_file_paths = glob.glob('build/Dev/Cpp/Test/Release/*.png')
for path in generated_file_paths:
... |
01d9496eb74e5536bf953b0710673ec590061622 | shuup/admin/modules/service_providers/views/_list.py | shuup/admin/modules/service_providers/views/_list.py | # -*- coding: utf-8 -*-
# This file is part of Shuup.
#
# Copyright (c) 2012-2016, Shoop Ltd. All rights reserved.
#
# This source code is licensed under the AGPLv3 license found in the
# LICENSE file in the root directory of this source tree.
from __future__ import unicode_literals
from django.utils.translation impor... | # -*- coding: utf-8 -*-
# This file is part of Shuup.
#
# Copyright (c) 2012-2016, Shoop Ltd. All rights reserved.
#
# This source code is licensed under the AGPLv3 license found in the
# LICENSE file in the root directory of this source tree.
from __future__ import unicode_literals
from django.utils.translation impor... | Modify service_providers for dynamic columns | Modify service_providers for dynamic columns
Refs SH-64
| Python | agpl-3.0 | suutari-ai/shoop,suutari-ai/shoop,shoopio/shoop,suutari/shoop,shoopio/shoop,shawnadelic/shuup,shawnadelic/shuup,suutari-ai/shoop,shoopio/shoop,suutari/shoop,shawnadelic/shuup,suutari/shoop | # -*- coding: utf-8 -*-
# This file is part of Shuup.
#
# Copyright (c) 2012-2016, Shoop Ltd. All rights reserved.
#
# This source code is licensed under the AGPLv3 license found in the
# LICENSE file in the root directory of this source tree.
from __future__ import unicode_literals
from django.utils.translation impor... | # -*- coding: utf-8 -*-
# This file is part of Shuup.
#
# Copyright (c) 2012-2016, Shoop Ltd. All rights reserved.
#
# This source code is licensed under the AGPLv3 license found in the
# LICENSE file in the root directory of this source tree.
from __future__ import unicode_literals
from django.utils.translation impor... | <commit_before># -*- coding: utf-8 -*-
# This file is part of Shuup.
#
# Copyright (c) 2012-2016, Shoop Ltd. All rights reserved.
#
# This source code is licensed under the AGPLv3 license found in the
# LICENSE file in the root directory of this source tree.
from __future__ import unicode_literals
from django.utils.tr... | # -*- coding: utf-8 -*-
# This file is part of Shuup.
#
# Copyright (c) 2012-2016, Shoop Ltd. All rights reserved.
#
# This source code is licensed under the AGPLv3 license found in the
# LICENSE file in the root directory of this source tree.
from __future__ import unicode_literals
from django.utils.translation impor... | # -*- coding: utf-8 -*-
# This file is part of Shuup.
#
# Copyright (c) 2012-2016, Shoop Ltd. All rights reserved.
#
# This source code is licensed under the AGPLv3 license found in the
# LICENSE file in the root directory of this source tree.
from __future__ import unicode_literals
from django.utils.translation impor... | <commit_before># -*- coding: utf-8 -*-
# This file is part of Shuup.
#
# Copyright (c) 2012-2016, Shoop Ltd. All rights reserved.
#
# This source code is licensed under the AGPLv3 license found in the
# LICENSE file in the root directory of this source tree.
from __future__ import unicode_literals
from django.utils.tr... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.