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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
244e760f27303fcfad220d364cd2d40f3de1cc99 | src/pose.py | src/pose.py | #!/usr/bin/env python
import rospy
from nav_msgs.msg import Odometry
publisher = None
def send_computed_control_actions(msg):
publisher.publish(msg)
if __name__ == '__main__':
rospy.init_node('pose')
subscriber = rospy.Subscriber('computed_pose', Odometry, send_computed_control_actions)
publishe... | #!/usr/bin/env python
import rospy
from geometry_msgs.msg import Twist
publisher = None
def send_computed_control_actions(msg):
publisher.publish(msg)
if __name__ == '__main__':
rospy.init_node('twist')
subscriber = rospy.Subscriber('computed_control_actions', Twist, send_computed_control_actions)
... | Change publisher and subscriber message type from Odometry to Twist | Change publisher and subscriber message type from Odometry to Twist
| Python | mit | bit0001/trajectory_tracking,bit0001/trajectory_tracking | #!/usr/bin/env python
import rospy
from nav_msgs.msg import Odometry
publisher = None
def send_computed_control_actions(msg):
publisher.publish(msg)
if __name__ == '__main__':
rospy.init_node('pose')
subscriber = rospy.Subscriber('computed_pose', Odometry, send_computed_control_actions)
publishe... | #!/usr/bin/env python
import rospy
from geometry_msgs.msg import Twist
publisher = None
def send_computed_control_actions(msg):
publisher.publish(msg)
if __name__ == '__main__':
rospy.init_node('twist')
subscriber = rospy.Subscriber('computed_control_actions', Twist, send_computed_control_actions)
... | <commit_before>#!/usr/bin/env python
import rospy
from nav_msgs.msg import Odometry
publisher = None
def send_computed_control_actions(msg):
publisher.publish(msg)
if __name__ == '__main__':
rospy.init_node('pose')
subscriber = rospy.Subscriber('computed_pose', Odometry, send_computed_control_action... | #!/usr/bin/env python
import rospy
from geometry_msgs.msg import Twist
publisher = None
def send_computed_control_actions(msg):
publisher.publish(msg)
if __name__ == '__main__':
rospy.init_node('twist')
subscriber = rospy.Subscriber('computed_control_actions', Twist, send_computed_control_actions)
... | #!/usr/bin/env python
import rospy
from nav_msgs.msg import Odometry
publisher = None
def send_computed_control_actions(msg):
publisher.publish(msg)
if __name__ == '__main__':
rospy.init_node('pose')
subscriber = rospy.Subscriber('computed_pose', Odometry, send_computed_control_actions)
publishe... | <commit_before>#!/usr/bin/env python
import rospy
from nav_msgs.msg import Odometry
publisher = None
def send_computed_control_actions(msg):
publisher.publish(msg)
if __name__ == '__main__':
rospy.init_node('pose')
subscriber = rospy.Subscriber('computed_pose', Odometry, send_computed_control_action... |
574a2d98733cbab814050d29d1a24cd5c6563c4f | Tools/scripts/fixps.py | Tools/scripts/fixps.py | #! /usr/bin/env python
# Fix Python script(s) to reference the interpreter via /usr/bin/env python.
import sys
import regex
import regsub
def main():
for file in sys.argv[1:]:
try:
f = open(file, 'r+')
except IOError:
print file, ': can\'t open for update'
continue
line = f.readline()
if regex.mat... | #!/usr/bin/env python
# Fix Python script(s) to reference the interpreter via /usr/bin/env python.
# Warning: this overwrites the file without making a backup.
import sys
import re
def main():
for file in sys.argv[1:]:
try:
f = open(file, 'r')
except IOError, msg:
print file, ': can\'t open :', msg
co... | Use re instead of regex. Don't rewrite the file in place. (Reported by Andy Dustman.) | Use re instead of regex.
Don't rewrite the file in place.
(Reported by Andy Dustman.)
| Python | mit | sk-/python2.7-type-annotator,sk-/python2.7-type-annotator,sk-/python2.7-type-annotator | #! /usr/bin/env python
# Fix Python script(s) to reference the interpreter via /usr/bin/env python.
import sys
import regex
import regsub
def main():
for file in sys.argv[1:]:
try:
f = open(file, 'r+')
except IOError:
print file, ': can\'t open for update'
continue
line = f.readline()
if regex.mat... | #!/usr/bin/env python
# Fix Python script(s) to reference the interpreter via /usr/bin/env python.
# Warning: this overwrites the file without making a backup.
import sys
import re
def main():
for file in sys.argv[1:]:
try:
f = open(file, 'r')
except IOError, msg:
print file, ': can\'t open :', msg
co... | <commit_before>#! /usr/bin/env python
# Fix Python script(s) to reference the interpreter via /usr/bin/env python.
import sys
import regex
import regsub
def main():
for file in sys.argv[1:]:
try:
f = open(file, 'r+')
except IOError:
print file, ': can\'t open for update'
continue
line = f.readline()... | #!/usr/bin/env python
# Fix Python script(s) to reference the interpreter via /usr/bin/env python.
# Warning: this overwrites the file without making a backup.
import sys
import re
def main():
for file in sys.argv[1:]:
try:
f = open(file, 'r')
except IOError, msg:
print file, ': can\'t open :', msg
co... | #! /usr/bin/env python
# Fix Python script(s) to reference the interpreter via /usr/bin/env python.
import sys
import regex
import regsub
def main():
for file in sys.argv[1:]:
try:
f = open(file, 'r+')
except IOError:
print file, ': can\'t open for update'
continue
line = f.readline()
if regex.mat... | <commit_before>#! /usr/bin/env python
# Fix Python script(s) to reference the interpreter via /usr/bin/env python.
import sys
import regex
import regsub
def main():
for file in sys.argv[1:]:
try:
f = open(file, 'r+')
except IOError:
print file, ': can\'t open for update'
continue
line = f.readline()... |
1bac187d32473e338e34bea5525e3384103113df | fireplace/cards/wog/warlock.py | fireplace/cards/wog/warlock.py | from ..utils import *
##
# Minions
class OG_121:
"Cho'gall"
play = Buff(CONTROLLER, "OG_121e")
class OG_121e:
events = OWN_SPELL_PLAY.on(Destroy(SELF))
update = Refresh(CONTROLLER, {GameTag.SPELLS_COST_HEALTH: True})
##
# Spells
class OG_116:
"Spreading Madness"
play = Hit(RANDOM_CHARACTER, 1) * 9
| from ..utils import *
##
# Minions
class OG_109:
"Darkshire Librarian"
play = Discard(RANDOM(FRIENDLY_HAND))
deathrattle = Draw(CONTROLLER)
class OG_113:
"Darkshire Councilman"
events = Summon(MINION, CONTROLLER).on(Buff(SELF, "OG_113e"))
OG_113e = buff(atk=1)
class OG_121:
"Cho'gall"
play = Buff(CONTROL... | Implement Darkshire Librarian, Darkshire Councilman, Possessed Villager | Implement Darkshire Librarian, Darkshire Councilman, Possessed Villager
| Python | agpl-3.0 | NightKev/fireplace,jleclanche/fireplace,beheh/fireplace | from ..utils import *
##
# Minions
class OG_121:
"Cho'gall"
play = Buff(CONTROLLER, "OG_121e")
class OG_121e:
events = OWN_SPELL_PLAY.on(Destroy(SELF))
update = Refresh(CONTROLLER, {GameTag.SPELLS_COST_HEALTH: True})
##
# Spells
class OG_116:
"Spreading Madness"
play = Hit(RANDOM_CHARACTER, 1) * 9
Implemen... | from ..utils import *
##
# Minions
class OG_109:
"Darkshire Librarian"
play = Discard(RANDOM(FRIENDLY_HAND))
deathrattle = Draw(CONTROLLER)
class OG_113:
"Darkshire Councilman"
events = Summon(MINION, CONTROLLER).on(Buff(SELF, "OG_113e"))
OG_113e = buff(atk=1)
class OG_121:
"Cho'gall"
play = Buff(CONTROL... | <commit_before>from ..utils import *
##
# Minions
class OG_121:
"Cho'gall"
play = Buff(CONTROLLER, "OG_121e")
class OG_121e:
events = OWN_SPELL_PLAY.on(Destroy(SELF))
update = Refresh(CONTROLLER, {GameTag.SPELLS_COST_HEALTH: True})
##
# Spells
class OG_116:
"Spreading Madness"
play = Hit(RANDOM_CHARACTER, ... | from ..utils import *
##
# Minions
class OG_109:
"Darkshire Librarian"
play = Discard(RANDOM(FRIENDLY_HAND))
deathrattle = Draw(CONTROLLER)
class OG_113:
"Darkshire Councilman"
events = Summon(MINION, CONTROLLER).on(Buff(SELF, "OG_113e"))
OG_113e = buff(atk=1)
class OG_121:
"Cho'gall"
play = Buff(CONTROL... | from ..utils import *
##
# Minions
class OG_121:
"Cho'gall"
play = Buff(CONTROLLER, "OG_121e")
class OG_121e:
events = OWN_SPELL_PLAY.on(Destroy(SELF))
update = Refresh(CONTROLLER, {GameTag.SPELLS_COST_HEALTH: True})
##
# Spells
class OG_116:
"Spreading Madness"
play = Hit(RANDOM_CHARACTER, 1) * 9
Implemen... | <commit_before>from ..utils import *
##
# Minions
class OG_121:
"Cho'gall"
play = Buff(CONTROLLER, "OG_121e")
class OG_121e:
events = OWN_SPELL_PLAY.on(Destroy(SELF))
update = Refresh(CONTROLLER, {GameTag.SPELLS_COST_HEALTH: True})
##
# Spells
class OG_116:
"Spreading Madness"
play = Hit(RANDOM_CHARACTER, ... |
1f124ca4c13a0e5ceb9796bb1df95e5f31c5bd04 | slot/users/models.py | slot/users/models.py | from flask_login import UserMixin
class User(UserMixin):
# proxy for a database of users
user_database = {"test": ("slot", "test"), "live": ("slot", "live")}
def __init__(self, username, password):
self.id = username
self.password = password
@classmethod
def get(cls, id):
... | from flask_login import UserMixin
class User(UserMixin):
def __init__(self, username, password):
self.id = username
self.password = password
| Remove redundant parts of User class. | Remove redundant parts of User class.
| Python | mit | nhshd-slot/SLOT,nhshd-slot/SLOT,nhshd-slot/SLOT | from flask_login import UserMixin
class User(UserMixin):
# proxy for a database of users
user_database = {"test": ("slot", "test"), "live": ("slot", "live")}
def __init__(self, username, password):
self.id = username
self.password = password
@classmethod
def get(cls, id):
... | from flask_login import UserMixin
class User(UserMixin):
def __init__(self, username, password):
self.id = username
self.password = password
| <commit_before>from flask_login import UserMixin
class User(UserMixin):
# proxy for a database of users
user_database = {"test": ("slot", "test"), "live": ("slot", "live")}
def __init__(self, username, password):
self.id = username
self.password = password
@classmethod
def get(cl... | from flask_login import UserMixin
class User(UserMixin):
def __init__(self, username, password):
self.id = username
self.password = password
| from flask_login import UserMixin
class User(UserMixin):
# proxy for a database of users
user_database = {"test": ("slot", "test"), "live": ("slot", "live")}
def __init__(self, username, password):
self.id = username
self.password = password
@classmethod
def get(cls, id):
... | <commit_before>from flask_login import UserMixin
class User(UserMixin):
# proxy for a database of users
user_database = {"test": ("slot", "test"), "live": ("slot", "live")}
def __init__(self, username, password):
self.id = username
self.password = password
@classmethod
def get(cl... |
116893350b3618c07e05c671ff52d6f972430565 | django_slack_oauth/__init__.py | django_slack_oauth/__init__.py | # -*- coding: utf-8 -*-
from django.conf import settings
__all__ = (
'settings',
)
default_settings = {
'SLACK_CLIENT_ID': None,
'SLACK_CLIENT_SECRET': None,
'SLACK_AUTHORIZATION_URL': 'https://slack.com/oauth/authorize',
'SLACK_OAUTH_ACCESS_URL': 'https://slack.com/api/oauth.access',
'SLAC... | # -*- coding: utf-8 -*-
from django.conf import settings
__all__ = (
'settings',
)
default_settings = {
'SLACK_CLIENT_ID': None,
'SLACK_CLIENT_SECRET': None,
'SLACK_AUTHORIZATION_URL': 'https://slack.com/oauth/authorize',
'SLACK_OAUTH_ACCESS_URL': 'https://slack.com/api/oauth.access',
'SLAC... | Fix to iterate over dictionary using items instead of iteritems to make it compatible with python3.x. | Fix to iterate over dictionary using items instead of iteritems to make it compatible with python3.x.
| Python | mit | izdi/django-slack-oauth,avelis/django-slack-oauth | # -*- coding: utf-8 -*-
from django.conf import settings
__all__ = (
'settings',
)
default_settings = {
'SLACK_CLIENT_ID': None,
'SLACK_CLIENT_SECRET': None,
'SLACK_AUTHORIZATION_URL': 'https://slack.com/oauth/authorize',
'SLACK_OAUTH_ACCESS_URL': 'https://slack.com/api/oauth.access',
'SLAC... | # -*- coding: utf-8 -*-
from django.conf import settings
__all__ = (
'settings',
)
default_settings = {
'SLACK_CLIENT_ID': None,
'SLACK_CLIENT_SECRET': None,
'SLACK_AUTHORIZATION_URL': 'https://slack.com/oauth/authorize',
'SLACK_OAUTH_ACCESS_URL': 'https://slack.com/api/oauth.access',
'SLAC... | <commit_before># -*- coding: utf-8 -*-
from django.conf import settings
__all__ = (
'settings',
)
default_settings = {
'SLACK_CLIENT_ID': None,
'SLACK_CLIENT_SECRET': None,
'SLACK_AUTHORIZATION_URL': 'https://slack.com/oauth/authorize',
'SLACK_OAUTH_ACCESS_URL': 'https://slack.com/api/oauth.acc... | # -*- coding: utf-8 -*-
from django.conf import settings
__all__ = (
'settings',
)
default_settings = {
'SLACK_CLIENT_ID': None,
'SLACK_CLIENT_SECRET': None,
'SLACK_AUTHORIZATION_URL': 'https://slack.com/oauth/authorize',
'SLACK_OAUTH_ACCESS_URL': 'https://slack.com/api/oauth.access',
'SLAC... | # -*- coding: utf-8 -*-
from django.conf import settings
__all__ = (
'settings',
)
default_settings = {
'SLACK_CLIENT_ID': None,
'SLACK_CLIENT_SECRET': None,
'SLACK_AUTHORIZATION_URL': 'https://slack.com/oauth/authorize',
'SLACK_OAUTH_ACCESS_URL': 'https://slack.com/api/oauth.access',
'SLAC... | <commit_before># -*- coding: utf-8 -*-
from django.conf import settings
__all__ = (
'settings',
)
default_settings = {
'SLACK_CLIENT_ID': None,
'SLACK_CLIENT_SECRET': None,
'SLACK_AUTHORIZATION_URL': 'https://slack.com/oauth/authorize',
'SLACK_OAUTH_ACCESS_URL': 'https://slack.com/api/oauth.acc... |
716282a16cefe1c34ae1bb1f8ffc6bb70879b5c2 | wrappers/python/setup.py | wrappers/python/setup.py | from distutils.core import setup
setup(
name='python3-indy',
version='0.0.1',
packages=['indy'],
url='https://github.com/hyperledger/indy-sdk',
license='MIT/Apache-2.0',
author='Vyacheslav Gudkov',
author_email='vyacheslav.gudkov@dsr-company.com',
description='This is the official SDK f... | from distutils.core import setup
setup(
name='python3-indy',
version='0.0.1',
packages=['indy'],
url='https://github.com/hyperledger/indy-sdk',
license='MIT/Apache-2.0',
author='Vyacheslav Gudkov',
author_email='vyacheslav.gudkov@dsr-company.com',
description='This is the official SDK f... | Revert install requre optimization in python wrapper. | Revert install requre optimization in python wrapper.
| Python | apache-2.0 | Artemkaaas/indy-sdk,anastasia-tarasova/indy-sdk,korsimoro/indy-sdk,srottem/indy-sdk,Artemkaaas/indy-sdk,srottem/indy-sdk,srottem/indy-sdk,Artemkaaas/indy-sdk,Artemkaaas/indy-sdk,korsimoro/indy-sdk,srottem/indy-sdk,peacekeeper/indy-sdk,srottem/indy-sdk,peacekeeper/indy-sdk,peacekeeper/indy-sdk,peacekeeper/indy-sdk,peace... | from distutils.core import setup
setup(
name='python3-indy',
version='0.0.1',
packages=['indy'],
url='https://github.com/hyperledger/indy-sdk',
license='MIT/Apache-2.0',
author='Vyacheslav Gudkov',
author_email='vyacheslav.gudkov@dsr-company.com',
description='This is the official SDK f... | from distutils.core import setup
setup(
name='python3-indy',
version='0.0.1',
packages=['indy'],
url='https://github.com/hyperledger/indy-sdk',
license='MIT/Apache-2.0',
author='Vyacheslav Gudkov',
author_email='vyacheslav.gudkov@dsr-company.com',
description='This is the official SDK f... | <commit_before>from distutils.core import setup
setup(
name='python3-indy',
version='0.0.1',
packages=['indy'],
url='https://github.com/hyperledger/indy-sdk',
license='MIT/Apache-2.0',
author='Vyacheslav Gudkov',
author_email='vyacheslav.gudkov@dsr-company.com',
description='This is the... | from distutils.core import setup
setup(
name='python3-indy',
version='0.0.1',
packages=['indy'],
url='https://github.com/hyperledger/indy-sdk',
license='MIT/Apache-2.0',
author='Vyacheslav Gudkov',
author_email='vyacheslav.gudkov@dsr-company.com',
description='This is the official SDK f... | from distutils.core import setup
setup(
name='python3-indy',
version='0.0.1',
packages=['indy'],
url='https://github.com/hyperledger/indy-sdk',
license='MIT/Apache-2.0',
author='Vyacheslav Gudkov',
author_email='vyacheslav.gudkov@dsr-company.com',
description='This is the official SDK f... | <commit_before>from distutils.core import setup
setup(
name='python3-indy',
version='0.0.1',
packages=['indy'],
url='https://github.com/hyperledger/indy-sdk',
license='MIT/Apache-2.0',
author='Vyacheslav Gudkov',
author_email='vyacheslav.gudkov@dsr-company.com',
description='This is the... |
736150f90d82a4583630b9999db94fa6afb47e10 | test_samples/test_simple.py | test_samples/test_simple.py | # -*- encoding: utf-8 -*-
"""
"""
import unittest
import time
class Case1(unittest.TestCase):
def test_success(self):
time.sleep(0.5)
self.assertEqual(1, 1)
def test_failure(self):
time.sleep(0.5)
self.assertEqual(1, 2)
@unittest.skip("because")
def test_skip(self):... | # -*- encoding: utf-8 -*-
"""
"""
import unittest
import time
class Case1(unittest.TestCase):
def test_success(self):
time.sleep(0.5)
self.assertEqual(1, 1)
def test_failure(self):
time.sleep(0.5)
self.assertEqual(1, 2)
@unittest.skip("because")
def test_skip(self):... | Add a sample of erroneous test. | Add a sample of erroneous test.
| Python | bsd-2-clause | nicolasdespres/hunittest | # -*- encoding: utf-8 -*-
"""
"""
import unittest
import time
class Case1(unittest.TestCase):
def test_success(self):
time.sleep(0.5)
self.assertEqual(1, 1)
def test_failure(self):
time.sleep(0.5)
self.assertEqual(1, 2)
@unittest.skip("because")
def test_skip(self):... | # -*- encoding: utf-8 -*-
"""
"""
import unittest
import time
class Case1(unittest.TestCase):
def test_success(self):
time.sleep(0.5)
self.assertEqual(1, 1)
def test_failure(self):
time.sleep(0.5)
self.assertEqual(1, 2)
@unittest.skip("because")
def test_skip(self):... | <commit_before># -*- encoding: utf-8 -*-
"""
"""
import unittest
import time
class Case1(unittest.TestCase):
def test_success(self):
time.sleep(0.5)
self.assertEqual(1, 1)
def test_failure(self):
time.sleep(0.5)
self.assertEqual(1, 2)
@unittest.skip("because")
def t... | # -*- encoding: utf-8 -*-
"""
"""
import unittest
import time
class Case1(unittest.TestCase):
def test_success(self):
time.sleep(0.5)
self.assertEqual(1, 1)
def test_failure(self):
time.sleep(0.5)
self.assertEqual(1, 2)
@unittest.skip("because")
def test_skip(self):... | # -*- encoding: utf-8 -*-
"""
"""
import unittest
import time
class Case1(unittest.TestCase):
def test_success(self):
time.sleep(0.5)
self.assertEqual(1, 1)
def test_failure(self):
time.sleep(0.5)
self.assertEqual(1, 2)
@unittest.skip("because")
def test_skip(self):... | <commit_before># -*- encoding: utf-8 -*-
"""
"""
import unittest
import time
class Case1(unittest.TestCase):
def test_success(self):
time.sleep(0.5)
self.assertEqual(1, 1)
def test_failure(self):
time.sleep(0.5)
self.assertEqual(1, 2)
@unittest.skip("because")
def t... |
5dec9add35697dc77e2351bb076da90c6b56ea8d | oauth2_provider/utils.py | oauth2_provider/utils.py | import uuid
import hashlib
def short_hash():
"""
Generate a unique short hash (40 bytes) which is suitable as a token, secret or id
"""
return hashlib.sha1(uuid.uuid1().get_bytes()).hexdigest()
def long_hash():
"""
Generate a unique long hash (128 bytes) which is suitable as a token, secret ... | import uuid
import hashlib
def short_hash():
"""
Generate a unique short hash (40 bytes) which is suitable as a token, secret or id
"""
return hashlib.sha1(uuid.uuid1().bytes).hexdigest()
def long_hash():
"""
Generate a unique long hash (128 bytes) which is suitable as a token, secret or id
... | Use bytes property with UUID objects | Use bytes property with UUID objects
| Python | bsd-2-clause | JensTimmerman/django-oauth-toolkit,trbs/django-oauth-toolkit,vmalavolta/django-oauth-toolkit,Gr1N/django-oauth-toolkit,cheif/django-oauth-toolkit,drgarcia1986/django-oauth-toolkit,Natgeoed/django-oauth-toolkit,JensTimmerman/django-oauth-toolkit,jensadne/django-oauth-toolkit,mjrulesamrat/django-oauth-toolkit,StepicOrg/d... | import uuid
import hashlib
def short_hash():
"""
Generate a unique short hash (40 bytes) which is suitable as a token, secret or id
"""
return hashlib.sha1(uuid.uuid1().get_bytes()).hexdigest()
def long_hash():
"""
Generate a unique long hash (128 bytes) which is suitable as a token, secret ... | import uuid
import hashlib
def short_hash():
"""
Generate a unique short hash (40 bytes) which is suitable as a token, secret or id
"""
return hashlib.sha1(uuid.uuid1().bytes).hexdigest()
def long_hash():
"""
Generate a unique long hash (128 bytes) which is suitable as a token, secret or id
... | <commit_before>import uuid
import hashlib
def short_hash():
"""
Generate a unique short hash (40 bytes) which is suitable as a token, secret or id
"""
return hashlib.sha1(uuid.uuid1().get_bytes()).hexdigest()
def long_hash():
"""
Generate a unique long hash (128 bytes) which is suitable as a... | import uuid
import hashlib
def short_hash():
"""
Generate a unique short hash (40 bytes) which is suitable as a token, secret or id
"""
return hashlib.sha1(uuid.uuid1().bytes).hexdigest()
def long_hash():
"""
Generate a unique long hash (128 bytes) which is suitable as a token, secret or id
... | import uuid
import hashlib
def short_hash():
"""
Generate a unique short hash (40 bytes) which is suitable as a token, secret or id
"""
return hashlib.sha1(uuid.uuid1().get_bytes()).hexdigest()
def long_hash():
"""
Generate a unique long hash (128 bytes) which is suitable as a token, secret ... | <commit_before>import uuid
import hashlib
def short_hash():
"""
Generate a unique short hash (40 bytes) which is suitable as a token, secret or id
"""
return hashlib.sha1(uuid.uuid1().get_bytes()).hexdigest()
def long_hash():
"""
Generate a unique long hash (128 bytes) which is suitable as a... |
f8292dced6aef64950280a33e9980a7998f07104 | tests/services/shop/base.py | tests/services/shop/base.py | """
:Copyright: 2006-2020 Jochen Kupperschmidt
:License: Modified BSD, see LICENSE for details.
"""
from testfixtures.shop_article import create_article
from testfixtures.shop_shop import create_shop
from tests.base import AbstractAppTestCase
from tests.helpers import DEFAULT_EMAIL_CONFIG_ID
class ShopTestBase(Abst... | """
:Copyright: 2006-2020 Jochen Kupperschmidt
:License: Modified BSD, see LICENSE for details.
"""
from byceps.services.shop.article import service as article_service
from testfixtures.shop_article import create_article
from testfixtures.shop_shop import create_shop
from tests.base import AbstractAppTestCase
from t... | Create test articles via service | Create test articles via service
| Python | bsd-3-clause | homeworkprod/byceps,homeworkprod/byceps,homeworkprod/byceps | """
:Copyright: 2006-2020 Jochen Kupperschmidt
:License: Modified BSD, see LICENSE for details.
"""
from testfixtures.shop_article import create_article
from testfixtures.shop_shop import create_shop
from tests.base import AbstractAppTestCase
from tests.helpers import DEFAULT_EMAIL_CONFIG_ID
class ShopTestBase(Abst... | """
:Copyright: 2006-2020 Jochen Kupperschmidt
:License: Modified BSD, see LICENSE for details.
"""
from byceps.services.shop.article import service as article_service
from testfixtures.shop_article import create_article
from testfixtures.shop_shop import create_shop
from tests.base import AbstractAppTestCase
from t... | <commit_before>"""
:Copyright: 2006-2020 Jochen Kupperschmidt
:License: Modified BSD, see LICENSE for details.
"""
from testfixtures.shop_article import create_article
from testfixtures.shop_shop import create_shop
from tests.base import AbstractAppTestCase
from tests.helpers import DEFAULT_EMAIL_CONFIG_ID
class Sh... | """
:Copyright: 2006-2020 Jochen Kupperschmidt
:License: Modified BSD, see LICENSE for details.
"""
from byceps.services.shop.article import service as article_service
from testfixtures.shop_article import create_article
from testfixtures.shop_shop import create_shop
from tests.base import AbstractAppTestCase
from t... | """
:Copyright: 2006-2020 Jochen Kupperschmidt
:License: Modified BSD, see LICENSE for details.
"""
from testfixtures.shop_article import create_article
from testfixtures.shop_shop import create_shop
from tests.base import AbstractAppTestCase
from tests.helpers import DEFAULT_EMAIL_CONFIG_ID
class ShopTestBase(Abst... | <commit_before>"""
:Copyright: 2006-2020 Jochen Kupperschmidt
:License: Modified BSD, see LICENSE for details.
"""
from testfixtures.shop_article import create_article
from testfixtures.shop_shop import create_shop
from tests.base import AbstractAppTestCase
from tests.helpers import DEFAULT_EMAIL_CONFIG_ID
class Sh... |
5d36f84fe96eb250760073ab186edc881217ae07 | tests/test_iati_standard.py | tests/test_iati_standard.py | from web_test_base import *
class TestIATIStandard(WebTestBase):
"""
TODO: Add tests to assert that:
- the number of activities and publishers roughly matches those displayed on the Registry
- the newsletter form is present
- a key string appears on the homepage
"""
requests_to_load = {
... | from web_test_base import *
class TestIATIStandard(WebTestBase):
"""
TODO: Add tests to assert that:
- the number of activities and publishers roughly matches those displayed on the Registry
- a key string appears on the homepage
"""
requests_to_load = {
'IATI Standard Homepage - no www... | Add iatistandard.org homepage test for the newsletter signup | Add iatistandard.org homepage test for the newsletter signup
| Python | mit | IATI/IATI-Website-Tests | from web_test_base import *
class TestIATIStandard(WebTestBase):
"""
TODO: Add tests to assert that:
- the number of activities and publishers roughly matches those displayed on the Registry
- the newsletter form is present
- a key string appears on the homepage
"""
requests_to_load = {
... | from web_test_base import *
class TestIATIStandard(WebTestBase):
"""
TODO: Add tests to assert that:
- the number of activities and publishers roughly matches those displayed on the Registry
- a key string appears on the homepage
"""
requests_to_load = {
'IATI Standard Homepage - no www... | <commit_before>from web_test_base import *
class TestIATIStandard(WebTestBase):
"""
TODO: Add tests to assert that:
- the number of activities and publishers roughly matches those displayed on the Registry
- the newsletter form is present
- a key string appears on the homepage
"""
requests_... | from web_test_base import *
class TestIATIStandard(WebTestBase):
"""
TODO: Add tests to assert that:
- the number of activities and publishers roughly matches those displayed on the Registry
- a key string appears on the homepage
"""
requests_to_load = {
'IATI Standard Homepage - no www... | from web_test_base import *
class TestIATIStandard(WebTestBase):
"""
TODO: Add tests to assert that:
- the number of activities and publishers roughly matches those displayed on the Registry
- the newsletter form is present
- a key string appears on the homepage
"""
requests_to_load = {
... | <commit_before>from web_test_base import *
class TestIATIStandard(WebTestBase):
"""
TODO: Add tests to assert that:
- the number of activities and publishers roughly matches those displayed on the Registry
- the newsletter form is present
- a key string appears on the homepage
"""
requests_... |
a7fdc9f834dec480236c397c03e7b929e74ccd80 | shuup/default_reports/mixins.py | shuup/default_reports/mixins.py | # -*- coding: utf-8 -*-
# This file is part of Shuup.
#
# Copyright (c) 2012-2017, Shoop Commerce Ltd. All rights reserved.
#
# This source code is licensed under the OSL-3.0 license found in the
# LICENSE file in the root directory of this source tree.
from django.db.models import Q
from shuup.core.models import Ord... | # -*- coding: utf-8 -*-
# This file is part of Shuup.
#
# Copyright (c) 2012-2017, Shoop Commerce Ltd. All rights reserved.
#
# This source code is licensed under the OSL-3.0 license found in the
# LICENSE file in the root directory of this source tree.
from datetime import timedelta
from django.db.models import Q
fr... | Include orders which are made during selected end date in reports | Include orders which are made during selected end date in reports
Comparing DateTimeField with date causes lack of precision which
can occur with range. This causes orders which order_date is
the same date than end_date will be not included in the queryset.
Fix this problem with adding one extra day to the end_date va... | Python | agpl-3.0 | shoopio/shoop,shoopio/shoop,shoopio/shoop | # -*- coding: utf-8 -*-
# This file is part of Shuup.
#
# Copyright (c) 2012-2017, Shoop Commerce Ltd. All rights reserved.
#
# This source code is licensed under the OSL-3.0 license found in the
# LICENSE file in the root directory of this source tree.
from django.db.models import Q
from shuup.core.models import Ord... | # -*- coding: utf-8 -*-
# This file is part of Shuup.
#
# Copyright (c) 2012-2017, Shoop Commerce Ltd. All rights reserved.
#
# This source code is licensed under the OSL-3.0 license found in the
# LICENSE file in the root directory of this source tree.
from datetime import timedelta
from django.db.models import Q
fr... | <commit_before># -*- coding: utf-8 -*-
# This file is part of Shuup.
#
# Copyright (c) 2012-2017, Shoop Commerce Ltd. All rights reserved.
#
# This source code is licensed under the OSL-3.0 license found in the
# LICENSE file in the root directory of this source tree.
from django.db.models import Q
from shuup.core.mo... | # -*- coding: utf-8 -*-
# This file is part of Shuup.
#
# Copyright (c) 2012-2017, Shoop Commerce Ltd. All rights reserved.
#
# This source code is licensed under the OSL-3.0 license found in the
# LICENSE file in the root directory of this source tree.
from datetime import timedelta
from django.db.models import Q
fr... | # -*- coding: utf-8 -*-
# This file is part of Shuup.
#
# Copyright (c) 2012-2017, Shoop Commerce Ltd. All rights reserved.
#
# This source code is licensed under the OSL-3.0 license found in the
# LICENSE file in the root directory of this source tree.
from django.db.models import Q
from shuup.core.models import Ord... | <commit_before># -*- coding: utf-8 -*-
# This file is part of Shuup.
#
# Copyright (c) 2012-2017, Shoop Commerce Ltd. All rights reserved.
#
# This source code is licensed under the OSL-3.0 license found in the
# LICENSE file in the root directory of this source tree.
from django.db.models import Q
from shuup.core.mo... |
1c9ce82c954ab206ec1b5387ef5cb49ab9c96208 | additional_scripts/image-get-datastore-list.py | additional_scripts/image-get-datastore-list.py | #!/bin/python3
import os
import xml.etree.ElementTree as ET
oneimage = os.popen("oneimage list --xml")
tree = ET.fromstring(oneimage.read())
#print(tree.tag)
for image in tree.findall('./IMAGE'):
imageid = image.find('./ID')
print(imageid.text)
for vmid in image.findall('./VMS/ID'):
print(image... | #!/bin/python3
import os
import xml.etree.ElementTree as ET
oneimage = os.popen("oneimage list --xml")
tree = ET.fromstring(oneimage.read())
#print(tree.tag)
for image in tree.findall('./IMAGE'):
imageid = image.find('./ID')
print(imageid.text)
is_persistent = image.find('./PERSISTENT')
if is_persi... | Exclude persistent images in list | Exclude persistent images in list
| Python | apache-2.0 | zhtlancer/addon-iscsi,zhtlancer/addon-iscsi | #!/bin/python3
import os
import xml.etree.ElementTree as ET
oneimage = os.popen("oneimage list --xml")
tree = ET.fromstring(oneimage.read())
#print(tree.tag)
for image in tree.findall('./IMAGE'):
imageid = image.find('./ID')
print(imageid.text)
for vmid in image.findall('./VMS/ID'):
print(image... | #!/bin/python3
import os
import xml.etree.ElementTree as ET
oneimage = os.popen("oneimage list --xml")
tree = ET.fromstring(oneimage.read())
#print(tree.tag)
for image in tree.findall('./IMAGE'):
imageid = image.find('./ID')
print(imageid.text)
is_persistent = image.find('./PERSISTENT')
if is_persi... | <commit_before>#!/bin/python3
import os
import xml.etree.ElementTree as ET
oneimage = os.popen("oneimage list --xml")
tree = ET.fromstring(oneimage.read())
#print(tree.tag)
for image in tree.findall('./IMAGE'):
imageid = image.find('./ID')
print(imageid.text)
for vmid in image.findall('./VMS/ID'):
... | #!/bin/python3
import os
import xml.etree.ElementTree as ET
oneimage = os.popen("oneimage list --xml")
tree = ET.fromstring(oneimage.read())
#print(tree.tag)
for image in tree.findall('./IMAGE'):
imageid = image.find('./ID')
print(imageid.text)
is_persistent = image.find('./PERSISTENT')
if is_persi... | #!/bin/python3
import os
import xml.etree.ElementTree as ET
oneimage = os.popen("oneimage list --xml")
tree = ET.fromstring(oneimage.read())
#print(tree.tag)
for image in tree.findall('./IMAGE'):
imageid = image.find('./ID')
print(imageid.text)
for vmid in image.findall('./VMS/ID'):
print(image... | <commit_before>#!/bin/python3
import os
import xml.etree.ElementTree as ET
oneimage = os.popen("oneimage list --xml")
tree = ET.fromstring(oneimage.read())
#print(tree.tag)
for image in tree.findall('./IMAGE'):
imageid = image.find('./ID')
print(imageid.text)
for vmid in image.findall('./VMS/ID'):
... |
66503b8d59a8bb5128bd05966c81fa949b4e5097 | __init__.py | __init__.py |
########################################################################
# #
# This script was written by Thomas Heavey in 2017. #
# theavey@bu.edu thomasjheavey@gmail.com #
# ... |
########################################################################
# #
# This script was written by Thomas Heavey in 2017. #
# theavey@bu.edu thomasjheavey@gmail.com #
# ... | Check python version and possibly only import some things | Check python version and possibly only import some things
| Python | apache-2.0 | theavey/ParaTemp,theavey/ParaTemp |
########################################################################
# #
# This script was written by Thomas Heavey in 2017. #
# theavey@bu.edu thomasjheavey@gmail.com #
# ... |
########################################################################
# #
# This script was written by Thomas Heavey in 2017. #
# theavey@bu.edu thomasjheavey@gmail.com #
# ... | <commit_before>
########################################################################
# #
# This script was written by Thomas Heavey in 2017. #
# theavey@bu.edu thomasjheavey@gmail.com #
# ... |
########################################################################
# #
# This script was written by Thomas Heavey in 2017. #
# theavey@bu.edu thomasjheavey@gmail.com #
# ... |
########################################################################
# #
# This script was written by Thomas Heavey in 2017. #
# theavey@bu.edu thomasjheavey@gmail.com #
# ... | <commit_before>
########################################################################
# #
# This script was written by Thomas Heavey in 2017. #
# theavey@bu.edu thomasjheavey@gmail.com #
# ... |
72298e52d3621740f7f7b02098080caa56da19e8 | asyncpgsa/__init__.py | asyncpgsa/__init__.py | from .pool import create_pool
from .pgsingleton import PG
from .connection import compile_query
__version__ = '0.11.0'
pg = PG()
| from .pool import create_pool
from .pgsingleton import PG
from .connection import compile_query
__version__ = '0.12.0'
pg = PG()
| Bump version to fix previous bad version | Bump version to fix previous bad version
| Python | apache-2.0 | CanopyTax/asyncpgsa | from .pool import create_pool
from .pgsingleton import PG
from .connection import compile_query
__version__ = '0.11.0'
pg = PG()
Bump version to fix previous bad version | from .pool import create_pool
from .pgsingleton import PG
from .connection import compile_query
__version__ = '0.12.0'
pg = PG()
| <commit_before>from .pool import create_pool
from .pgsingleton import PG
from .connection import compile_query
__version__ = '0.11.0'
pg = PG()
<commit_msg>Bump version to fix previous bad version<commit_after> | from .pool import create_pool
from .pgsingleton import PG
from .connection import compile_query
__version__ = '0.12.0'
pg = PG()
| from .pool import create_pool
from .pgsingleton import PG
from .connection import compile_query
__version__ = '0.11.0'
pg = PG()
Bump version to fix previous bad versionfrom .pool import create_pool
from .pgsingleton import PG
from .connection import compile_query
__version__ = '0.12.0'
pg = PG()
| <commit_before>from .pool import create_pool
from .pgsingleton import PG
from .connection import compile_query
__version__ = '0.11.0'
pg = PG()
<commit_msg>Bump version to fix previous bad version<commit_after>from .pool import create_pool
from .pgsingleton import PG
from .connection import compile_query
__version__... |
09dc09d88d04d2926e3ffc116cf5606aaf3dc681 | salt/modules/win_wusa.py | salt/modules/win_wusa.py | # -*- coding: utf-8 -*-
'''
Microsoft Update files management via wusa.exe
:maintainer: Thomas Lemarchand
:platform: Windows
:depends: PowerShell
'''
# Import python libs
from __future__ import absolute_import
import logging
# Import salt libs
import salt.utils.platform
log = logging.getLogger(__name... | # -*- coding: utf-8 -*-
'''
Microsoft Update files management via wusa.exe
:maintainer: Thomas Lemarchand
:platform: Windows
:depends: PowerShell
'''
# Import python libs
from __future__ import absolute_import
import logging
# Import salt libs
import salt.utils.platform
log = logging.getLogger(__name... | Disable powershell modules list Add list_kbs function | Disable powershell modules list
Add list_kbs function
| Python | apache-2.0 | saltstack/salt,saltstack/salt,saltstack/salt,saltstack/salt,saltstack/salt | # -*- coding: utf-8 -*-
'''
Microsoft Update files management via wusa.exe
:maintainer: Thomas Lemarchand
:platform: Windows
:depends: PowerShell
'''
# Import python libs
from __future__ import absolute_import
import logging
# Import salt libs
import salt.utils.platform
log = logging.getLogger(__name... | # -*- coding: utf-8 -*-
'''
Microsoft Update files management via wusa.exe
:maintainer: Thomas Lemarchand
:platform: Windows
:depends: PowerShell
'''
# Import python libs
from __future__ import absolute_import
import logging
# Import salt libs
import salt.utils.platform
log = logging.getLogger(__name... | <commit_before># -*- coding: utf-8 -*-
'''
Microsoft Update files management via wusa.exe
:maintainer: Thomas Lemarchand
:platform: Windows
:depends: PowerShell
'''
# Import python libs
from __future__ import absolute_import
import logging
# Import salt libs
import salt.utils.platform
log = logging.g... | # -*- coding: utf-8 -*-
'''
Microsoft Update files management via wusa.exe
:maintainer: Thomas Lemarchand
:platform: Windows
:depends: PowerShell
'''
# Import python libs
from __future__ import absolute_import
import logging
# Import salt libs
import salt.utils.platform
log = logging.getLogger(__name... | # -*- coding: utf-8 -*-
'''
Microsoft Update files management via wusa.exe
:maintainer: Thomas Lemarchand
:platform: Windows
:depends: PowerShell
'''
# Import python libs
from __future__ import absolute_import
import logging
# Import salt libs
import salt.utils.platform
log = logging.getLogger(__name... | <commit_before># -*- coding: utf-8 -*-
'''
Microsoft Update files management via wusa.exe
:maintainer: Thomas Lemarchand
:platform: Windows
:depends: PowerShell
'''
# Import python libs
from __future__ import absolute_import
import logging
# Import salt libs
import salt.utils.platform
log = logging.g... |
4f67141cfabe99af99434364e13fec91bef291a7 | grip/constants.py | grip/constants.py | # The supported extensions, as defined by https://github.com/github/markup
supported_extensions = ['.md', '.markdown']
# The default filenames when no file is provided
default_filenames = map(lambda ext: 'README' + ext, supported_extensions)
| # The supported extensions, as defined by https://github.com/github/markup
supported_extensions = [
'.markdown', '.mdown', '.mkdn', '.md',
'.textile',
'.rdoc',
'.org',
'.creole',
'.mediawiki', '.wiki',
'.rst',
'.asciidoc', '.adoc', '.asc',
'.pod',
]
# The default filenames when no ... | Add the GitHub-supported format extensions. | Add the GitHub-supported format extensions.
| Python | mit | ssundarraj/grip,joeyespo/grip,ssundarraj/grip,jbarreras/grip,jbarreras/grip,joeyespo/grip,mgoddard-pivotal/grip,mgoddard-pivotal/grip | # The supported extensions, as defined by https://github.com/github/markup
supported_extensions = ['.md', '.markdown']
# The default filenames when no file is provided
default_filenames = map(lambda ext: 'README' + ext, supported_extensions)
Add the GitHub-supported format extensions. | # The supported extensions, as defined by https://github.com/github/markup
supported_extensions = [
'.markdown', '.mdown', '.mkdn', '.md',
'.textile',
'.rdoc',
'.org',
'.creole',
'.mediawiki', '.wiki',
'.rst',
'.asciidoc', '.adoc', '.asc',
'.pod',
]
# The default filenames when no ... | <commit_before># The supported extensions, as defined by https://github.com/github/markup
supported_extensions = ['.md', '.markdown']
# The default filenames when no file is provided
default_filenames = map(lambda ext: 'README' + ext, supported_extensions)
<commit_msg>Add the GitHub-supported format extensions.<commit... | # The supported extensions, as defined by https://github.com/github/markup
supported_extensions = [
'.markdown', '.mdown', '.mkdn', '.md',
'.textile',
'.rdoc',
'.org',
'.creole',
'.mediawiki', '.wiki',
'.rst',
'.asciidoc', '.adoc', '.asc',
'.pod',
]
# The default filenames when no ... | # The supported extensions, as defined by https://github.com/github/markup
supported_extensions = ['.md', '.markdown']
# The default filenames when no file is provided
default_filenames = map(lambda ext: 'README' + ext, supported_extensions)
Add the GitHub-supported format extensions.# The supported extensions, as def... | <commit_before># The supported extensions, as defined by https://github.com/github/markup
supported_extensions = ['.md', '.markdown']
# The default filenames when no file is provided
default_filenames = map(lambda ext: 'README' + ext, supported_extensions)
<commit_msg>Add the GitHub-supported format extensions.<commit... |
0174384553e22046438305d9accb735cc4a8f273 | src/Flask/venv/demo/app/main.py | src/Flask/venv/demo/app/main.py | from flask import Flask, render_template
from flask_socketio import SocketIO, send, emit
app = Flask(__name__, template_folder='./templates')
# Websocket setting
app.config['SECRET_KEY'] = '12qwaszx'
socketio = SocketIO(app)
@app.route('/')
def index():
return render_template('index.html')
# @app.route('/<s... | from flask import Flask, render_template, request, jsonify
from flask_socketio import SocketIO, send, emit
import json
app = Flask(__name__, template_folder='./templates')
# Websocket setting
app.config['SECRET_KEY'] = '12qwaszx'
socketio = SocketIO(app)
@app.route('/')
def index():
return render_template('inde... | Create a broadcast api: send | Create a broadcast api: send
| Python | mit | KarateJB/Python.Practice,KarateJB/Python.Practice,KarateJB/Python.Practice,KarateJB/Python.Practice | from flask import Flask, render_template
from flask_socketio import SocketIO, send, emit
app = Flask(__name__, template_folder='./templates')
# Websocket setting
app.config['SECRET_KEY'] = '12qwaszx'
socketio = SocketIO(app)
@app.route('/')
def index():
return render_template('index.html')
# @app.route('/<s... | from flask import Flask, render_template, request, jsonify
from flask_socketio import SocketIO, send, emit
import json
app = Flask(__name__, template_folder='./templates')
# Websocket setting
app.config['SECRET_KEY'] = '12qwaszx'
socketio = SocketIO(app)
@app.route('/')
def index():
return render_template('inde... | <commit_before>from flask import Flask, render_template
from flask_socketio import SocketIO, send, emit
app = Flask(__name__, template_folder='./templates')
# Websocket setting
app.config['SECRET_KEY'] = '12qwaszx'
socketio = SocketIO(app)
@app.route('/')
def index():
return render_template('index.html')
# ... | from flask import Flask, render_template, request, jsonify
from flask_socketio import SocketIO, send, emit
import json
app = Flask(__name__, template_folder='./templates')
# Websocket setting
app.config['SECRET_KEY'] = '12qwaszx'
socketio = SocketIO(app)
@app.route('/')
def index():
return render_template('inde... | from flask import Flask, render_template
from flask_socketio import SocketIO, send, emit
app = Flask(__name__, template_folder='./templates')
# Websocket setting
app.config['SECRET_KEY'] = '12qwaszx'
socketio = SocketIO(app)
@app.route('/')
def index():
return render_template('index.html')
# @app.route('/<s... | <commit_before>from flask import Flask, render_template
from flask_socketio import SocketIO, send, emit
app = Flask(__name__, template_folder='./templates')
# Websocket setting
app.config['SECRET_KEY'] = '12qwaszx'
socketio = SocketIO(app)
@app.route('/')
def index():
return render_template('index.html')
# ... |
a40415604a9a8bbdc7833d850c4f74d66236d334 | systemvm/patches/debian/config/opt/cloud/bin/cs_staticroutes.py | systemvm/patches/debian/config/opt/cloud/bin/cs_staticroutes.py | # -- coding: utf-8 --
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "Li... | # -- coding: utf-8 --
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "Li... | Make deleting static routes in private gw work | CLOUDSTACK-9266: Make deleting static routes in private gw work
| Python | apache-2.0 | jcshen007/cloudstack,DaanHoogland/cloudstack,wido/cloudstack,GabrielBrascher/cloudstack,wido/cloudstack,wido/cloudstack,DaanHoogland/cloudstack,GabrielBrascher/cloudstack,DaanHoogland/cloudstack,GabrielBrascher/cloudstack,GabrielBrascher/cloudstack,GabrielBrascher/cloudstack,DaanHoogland/cloudstack,jcshen007/cloudstack... | # -- coding: utf-8 --
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "Li... | # -- coding: utf-8 --
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "Li... | <commit_before># -- coding: utf-8 --
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version... | # -- coding: utf-8 --
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "Li... | # -- coding: utf-8 --
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "Li... | <commit_before># -- coding: utf-8 --
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version... |
de3218c662f5fa98dac57e7f875cbe49efbc1b78 | time_lapse.py | time_lapse.py | #!/usr/bin/env python
import time
import picamera
from settings import Job, IMAGES_DIRECTORY
def main():
job = Job()
if job.exists():
resolution_x = job.image_settings.resolution_x
resolution_y = job.image_settings.resolution_y
image_quality = job.image_settings.quality
snap_i... | #!/usr/bin/env python
import time
import picamera
from settings import Job, IMAGES_DIRECTORY
def main():
job = Job()
if job.exists():
resolution_x = job.image_settings.resolution_x
resolution_y = job.image_settings.resolution_y
image_quality = job.image_settings.quality
snap_i... | Add image prefix for job settings | Add image prefix for job settings
| Python | mit | projectweekend/Pi-Camera-Time-Lapse,projectweekend/Pi-Camera-Time-Lapse | #!/usr/bin/env python
import time
import picamera
from settings import Job, IMAGES_DIRECTORY
def main():
job = Job()
if job.exists():
resolution_x = job.image_settings.resolution_x
resolution_y = job.image_settings.resolution_y
image_quality = job.image_settings.quality
snap_i... | #!/usr/bin/env python
import time
import picamera
from settings import Job, IMAGES_DIRECTORY
def main():
job = Job()
if job.exists():
resolution_x = job.image_settings.resolution_x
resolution_y = job.image_settings.resolution_y
image_quality = job.image_settings.quality
snap_i... | <commit_before>#!/usr/bin/env python
import time
import picamera
from settings import Job, IMAGES_DIRECTORY
def main():
job = Job()
if job.exists():
resolution_x = job.image_settings.resolution_x
resolution_y = job.image_settings.resolution_y
image_quality = job.image_settings.quality... | #!/usr/bin/env python
import time
import picamera
from settings import Job, IMAGES_DIRECTORY
def main():
job = Job()
if job.exists():
resolution_x = job.image_settings.resolution_x
resolution_y = job.image_settings.resolution_y
image_quality = job.image_settings.quality
snap_i... | #!/usr/bin/env python
import time
import picamera
from settings import Job, IMAGES_DIRECTORY
def main():
job = Job()
if job.exists():
resolution_x = job.image_settings.resolution_x
resolution_y = job.image_settings.resolution_y
image_quality = job.image_settings.quality
snap_i... | <commit_before>#!/usr/bin/env python
import time
import picamera
from settings import Job, IMAGES_DIRECTORY
def main():
job = Job()
if job.exists():
resolution_x = job.image_settings.resolution_x
resolution_y = job.image_settings.resolution_y
image_quality = job.image_settings.quality... |
fce5d034f007248b74f3d16843d4cdc0d2f50721 | postgres/search/views.py | postgres/search/views.py | import json
from django.http import HttpResponse
from django.core.urlresolvers import reverse
from django.utils.html import conditional_escape as escape
from .models import Search
def uikit(request):
searches = Search.objects.filter(term__matches='%s:*' % request.GET['search'])
return HttpResponse(json.dump... | import json
from django.http import HttpResponse
from django.core.urlresolvers import reverse
from django.utils.html import conditional_escape as escape
from .models import Search
def uikit(request):
searches = Search.objects.filter(term__matches='%s:*' % request.GET['search'].lower())
return HttpResponse(j... | Make search term lower case so capitals match. | Make search term lower case so capitals match.
| Python | bsd-3-clause | wlanslovenija/django-postgres | import json
from django.http import HttpResponse
from django.core.urlresolvers import reverse
from django.utils.html import conditional_escape as escape
from .models import Search
def uikit(request):
searches = Search.objects.filter(term__matches='%s:*' % request.GET['search'])
return HttpResponse(json.dump... | import json
from django.http import HttpResponse
from django.core.urlresolvers import reverse
from django.utils.html import conditional_escape as escape
from .models import Search
def uikit(request):
searches = Search.objects.filter(term__matches='%s:*' % request.GET['search'].lower())
return HttpResponse(j... | <commit_before>import json
from django.http import HttpResponse
from django.core.urlresolvers import reverse
from django.utils.html import conditional_escape as escape
from .models import Search
def uikit(request):
searches = Search.objects.filter(term__matches='%s:*' % request.GET['search'])
return HttpRes... | import json
from django.http import HttpResponse
from django.core.urlresolvers import reverse
from django.utils.html import conditional_escape as escape
from .models import Search
def uikit(request):
searches = Search.objects.filter(term__matches='%s:*' % request.GET['search'].lower())
return HttpResponse(j... | import json
from django.http import HttpResponse
from django.core.urlresolvers import reverse
from django.utils.html import conditional_escape as escape
from .models import Search
def uikit(request):
searches = Search.objects.filter(term__matches='%s:*' % request.GET['search'])
return HttpResponse(json.dump... | <commit_before>import json
from django.http import HttpResponse
from django.core.urlresolvers import reverse
from django.utils.html import conditional_escape as escape
from .models import Search
def uikit(request):
searches = Search.objects.filter(term__matches='%s:*' % request.GET['search'])
return HttpRes... |
3bd010690bdbc7ba64c1c15709880368fb78b3e8 | polyaxon/event_monitors/apps.py | polyaxon/event_monitors/apps.py | from django.apps import AppConfig
class EventsConfig(AppConfig):
name = 'event_monitors'
verbose_name = 'EventMonitors'
| from django.apps import AppConfig
class EventMonitorsConfig(AppConfig):
name = 'event_monitors'
verbose_name = 'EventMonitors'
| Fix event monitors app config | Fix event monitors app config
| Python | apache-2.0 | polyaxon/polyaxon,polyaxon/polyaxon,polyaxon/polyaxon | from django.apps import AppConfig
class EventsConfig(AppConfig):
name = 'event_monitors'
verbose_name = 'EventMonitors'
Fix event monitors app config | from django.apps import AppConfig
class EventMonitorsConfig(AppConfig):
name = 'event_monitors'
verbose_name = 'EventMonitors'
| <commit_before>from django.apps import AppConfig
class EventsConfig(AppConfig):
name = 'event_monitors'
verbose_name = 'EventMonitors'
<commit_msg>Fix event monitors app config<commit_after> | from django.apps import AppConfig
class EventMonitorsConfig(AppConfig):
name = 'event_monitors'
verbose_name = 'EventMonitors'
| from django.apps import AppConfig
class EventsConfig(AppConfig):
name = 'event_monitors'
verbose_name = 'EventMonitors'
Fix event monitors app configfrom django.apps import AppConfig
class EventMonitorsConfig(AppConfig):
name = 'event_monitors'
verbose_name = 'EventMonitors'
| <commit_before>from django.apps import AppConfig
class EventsConfig(AppConfig):
name = 'event_monitors'
verbose_name = 'EventMonitors'
<commit_msg>Fix event monitors app config<commit_after>from django.apps import AppConfig
class EventMonitorsConfig(AppConfig):
name = 'event_monitors'
verbose_name =... |
312c699491830daacd33f032a6d6fc6cc6ff0c96 | ports/esp32/modules/inisetup.py | ports/esp32/modules/inisetup.py | import uos
from flashbdev import bdev
def check_bootsec():
buf = bytearray(bdev.ioctl(5, 0)) # 5 is SEC_SIZE
bdev.readblocks(0, buf)
empty = True
for b in buf:
if b != 0xFF:
empty = False
break
if empty:
return True
fs_corrupted()
def fs_corrupted():
... | import uos
from flashbdev import bdev
def check_bootsec():
buf = bytearray(bdev.ioctl(5, 0)) # 5 is SEC_SIZE
bdev.readblocks(0, buf)
empty = True
for b in buf:
if b != 0xFF:
empty = False
break
if empty:
return True
fs_corrupted()
def fs_corrupted():
... | Change from FAT to littlefs v2 as default filesystem. | esp32: Change from FAT to littlefs v2 as default filesystem.
This commit changes the default filesystem type for esp32 to littlefs v2.
This port already enables both VfsFat and VfsLfs2, so either can be used
for the filesystem, and existing systems that use FAT will still work.
| Python | mit | pramasoul/micropython,MrSurly/micropython,tobbad/micropython,MrSurly/micropython,adafruit/circuitpython,MrSurly/micropython,adafruit/circuitpython,kerneltask/micropython,tobbad/micropython,adafruit/circuitpython,selste/micropython,pramasoul/micropython,henriknelson/micropython,henriknelson/micropython,selste/micropytho... | import uos
from flashbdev import bdev
def check_bootsec():
buf = bytearray(bdev.ioctl(5, 0)) # 5 is SEC_SIZE
bdev.readblocks(0, buf)
empty = True
for b in buf:
if b != 0xFF:
empty = False
break
if empty:
return True
fs_corrupted()
def fs_corrupted():
... | import uos
from flashbdev import bdev
def check_bootsec():
buf = bytearray(bdev.ioctl(5, 0)) # 5 is SEC_SIZE
bdev.readblocks(0, buf)
empty = True
for b in buf:
if b != 0xFF:
empty = False
break
if empty:
return True
fs_corrupted()
def fs_corrupted():
... | <commit_before>import uos
from flashbdev import bdev
def check_bootsec():
buf = bytearray(bdev.ioctl(5, 0)) # 5 is SEC_SIZE
bdev.readblocks(0, buf)
empty = True
for b in buf:
if b != 0xFF:
empty = False
break
if empty:
return True
fs_corrupted()
def f... | import uos
from flashbdev import bdev
def check_bootsec():
buf = bytearray(bdev.ioctl(5, 0)) # 5 is SEC_SIZE
bdev.readblocks(0, buf)
empty = True
for b in buf:
if b != 0xFF:
empty = False
break
if empty:
return True
fs_corrupted()
def fs_corrupted():
... | import uos
from flashbdev import bdev
def check_bootsec():
buf = bytearray(bdev.ioctl(5, 0)) # 5 is SEC_SIZE
bdev.readblocks(0, buf)
empty = True
for b in buf:
if b != 0xFF:
empty = False
break
if empty:
return True
fs_corrupted()
def fs_corrupted():
... | <commit_before>import uos
from flashbdev import bdev
def check_bootsec():
buf = bytearray(bdev.ioctl(5, 0)) # 5 is SEC_SIZE
bdev.readblocks(0, buf)
empty = True
for b in buf:
if b != 0xFF:
empty = False
break
if empty:
return True
fs_corrupted()
def f... |
4227bda80f6aa33356e527399e79c633ef018089 | mzgtfs/__init__.py | mzgtfs/__init__.py | """A simple GTFS library.
This package is used internally to read and process GTFS files and to create OnestopIds.
"""
__version__ = '0.10.3' | """A simple GTFS library.
This package is used internally to read and process GTFS files and to create OnestopIds.
"""
__version__ = 'master' | Set master version to 'master' | Set master version to 'master'
| Python | mit | brechtvdv/mapzen-gtfs,brennan-v-/mapzen-gtfs,transitland/mapzen-gtfs | """A simple GTFS library.
This package is used internally to read and process GTFS files and to create OnestopIds.
"""
__version__ = '0.10.3'Set master version to 'master' | """A simple GTFS library.
This package is used internally to read and process GTFS files and to create OnestopIds.
"""
__version__ = 'master' | <commit_before>"""A simple GTFS library.
This package is used internally to read and process GTFS files and to create OnestopIds.
"""
__version__ = '0.10.3'<commit_msg>Set master version to 'master'<commit_after> | """A simple GTFS library.
This package is used internally to read and process GTFS files and to create OnestopIds.
"""
__version__ = 'master' | """A simple GTFS library.
This package is used internally to read and process GTFS files and to create OnestopIds.
"""
__version__ = '0.10.3'Set master version to 'master'"""A simple GTFS library.
This package is used internally to read and process GTFS files and to create OnestopIds.
"""
__version__ = 'master' | <commit_before>"""A simple GTFS library.
This package is used internally to read and process GTFS files and to create OnestopIds.
"""
__version__ = '0.10.3'<commit_msg>Set master version to 'master'<commit_after>"""A simple GTFS library.
This package is used internally to read and process GTFS files and to create O... |
760ca4809259df4cf24d77385f35bf41ec1c5383 | kolibri/__init__.py | kolibri/__init__.py | from __future__ import absolute_import
from __future__ import print_function
from __future__ import unicode_literals
from .utils.version import get_version
#: This may not be the exact version as it's subject to modification with
#: get_version() - use ``kolibri.__version__`` for the exact version string.
VERSION = (... | from __future__ import absolute_import
from __future__ import print_function
from __future__ import unicode_literals
from .utils.version import get_version
#: This may not be the exact version as it's subject to modification with
#: get_version() - use ``kolibri.__version__`` for the exact version string.
VERSION = (... | Update 0.9 from alpha to beta | Update 0.9 from alpha to beta
| Python | mit | indirectlylit/kolibri,benjaoming/kolibri,learningequality/kolibri,christianmemije/kolibri,benjaoming/kolibri,benjaoming/kolibri,jonboiser/kolibri,christianmemije/kolibri,DXCanas/kolibri,lyw07/kolibri,indirectlylit/kolibri,learningequality/kolibri,jonboiser/kolibri,benjaoming/kolibri,DXCanas/kolibri,mrpau/kolibri,DXCana... | from __future__ import absolute_import
from __future__ import print_function
from __future__ import unicode_literals
from .utils.version import get_version
#: This may not be the exact version as it's subject to modification with
#: get_version() - use ``kolibri.__version__`` for the exact version string.
VERSION = (... | from __future__ import absolute_import
from __future__ import print_function
from __future__ import unicode_literals
from .utils.version import get_version
#: This may not be the exact version as it's subject to modification with
#: get_version() - use ``kolibri.__version__`` for the exact version string.
VERSION = (... | <commit_before>from __future__ import absolute_import
from __future__ import print_function
from __future__ import unicode_literals
from .utils.version import get_version
#: This may not be the exact version as it's subject to modification with
#: get_version() - use ``kolibri.__version__`` for the exact version stri... | from __future__ import absolute_import
from __future__ import print_function
from __future__ import unicode_literals
from .utils.version import get_version
#: This may not be the exact version as it's subject to modification with
#: get_version() - use ``kolibri.__version__`` for the exact version string.
VERSION = (... | from __future__ import absolute_import
from __future__ import print_function
from __future__ import unicode_literals
from .utils.version import get_version
#: This may not be the exact version as it's subject to modification with
#: get_version() - use ``kolibri.__version__`` for the exact version string.
VERSION = (... | <commit_before>from __future__ import absolute_import
from __future__ import print_function
from __future__ import unicode_literals
from .utils.version import get_version
#: This may not be the exact version as it's subject to modification with
#: get_version() - use ``kolibri.__version__`` for the exact version stri... |
ce4ee9558ed0c53e03cb31627c597d5388b56ffa | docs/examples/compute/cloudstack/start_interactive_shell_ikoula.py | docs/examples/compute/cloudstack/start_interactive_shell_ikoula.py | import os
from IPython.terminal.embed import InteractiveShellEmbed
from libcloud.compute.types import Provider
from libcloud.compute.providers import get_driver
import libcloud.security as sec
sec.VERIFY_SSL_CERT = False
apikey = os.getenv('IKOULA_API_KEY')
secretkey = os.getenv('IKOULA_SECRET_KEY')
Driver = get_d... | import os
from IPython.terminal.embed import InteractiveShellEmbed
from libcloud.compute.types import Provider
from libcloud.compute.providers import get_driver
apikey = os.getenv('IKOULA_API_KEY')
secretkey = os.getenv('IKOULA_SECRET_KEY')
Driver = get_driver(Provider.IKOULA)
conn = Driver(key=apikey, secret=secr... | Update example, no need to disable cert validation. | docs: Update example, no need to disable cert validation.
| Python | apache-2.0 | briancurtin/libcloud,Cloud-Elasticity-Services/as-libcloud,niteoweb/libcloud,lochiiconnectivity/libcloud,wrigri/libcloud,apache/libcloud,JamesGuthrie/libcloud,atsaki/libcloud,andrewsomething/libcloud,wido/libcloud,cryptickp/libcloud,Itxaka/libcloud,iPlantCollaborativeOpenSource/libcloud,mistio/libcloud,sahildua2305/lib... | import os
from IPython.terminal.embed import InteractiveShellEmbed
from libcloud.compute.types import Provider
from libcloud.compute.providers import get_driver
import libcloud.security as sec
sec.VERIFY_SSL_CERT = False
apikey = os.getenv('IKOULA_API_KEY')
secretkey = os.getenv('IKOULA_SECRET_KEY')
Driver = get_d... | import os
from IPython.terminal.embed import InteractiveShellEmbed
from libcloud.compute.types import Provider
from libcloud.compute.providers import get_driver
apikey = os.getenv('IKOULA_API_KEY')
secretkey = os.getenv('IKOULA_SECRET_KEY')
Driver = get_driver(Provider.IKOULA)
conn = Driver(key=apikey, secret=secr... | <commit_before>import os
from IPython.terminal.embed import InteractiveShellEmbed
from libcloud.compute.types import Provider
from libcloud.compute.providers import get_driver
import libcloud.security as sec
sec.VERIFY_SSL_CERT = False
apikey = os.getenv('IKOULA_API_KEY')
secretkey = os.getenv('IKOULA_SECRET_KEY')
... | import os
from IPython.terminal.embed import InteractiveShellEmbed
from libcloud.compute.types import Provider
from libcloud.compute.providers import get_driver
apikey = os.getenv('IKOULA_API_KEY')
secretkey = os.getenv('IKOULA_SECRET_KEY')
Driver = get_driver(Provider.IKOULA)
conn = Driver(key=apikey, secret=secr... | import os
from IPython.terminal.embed import InteractiveShellEmbed
from libcloud.compute.types import Provider
from libcloud.compute.providers import get_driver
import libcloud.security as sec
sec.VERIFY_SSL_CERT = False
apikey = os.getenv('IKOULA_API_KEY')
secretkey = os.getenv('IKOULA_SECRET_KEY')
Driver = get_d... | <commit_before>import os
from IPython.terminal.embed import InteractiveShellEmbed
from libcloud.compute.types import Provider
from libcloud.compute.providers import get_driver
import libcloud.security as sec
sec.VERIFY_SSL_CERT = False
apikey = os.getenv('IKOULA_API_KEY')
secretkey = os.getenv('IKOULA_SECRET_KEY')
... |
a0f9275912d3dfd9edd4e8d0377f04972c919338 | lino_book/projects/team/try_people_api.py | lino_book/projects/team/try_people_api.py | import requests
from apiclient.discovery import build
from lino.api import rt
user = rt.models.users.User.objects.get(username='luc')
social = user.social_auth.get(provider='google-plus')
print(social.provider)
response = requests.get(
'https://www.googleapis.com/plus/v1/people/me/people/collection',
# 'http... | from apiclient.discovery import build
from oauth2client.client import OAuth2Credentials
from django.conf import settings
from datetime import datetime
import httplib2
from lino.api import rt
user = rt.models.users.User.objects.get(username='8618a3571d8b4237a3e60d25671d8f')
social = user.social_auth.get(provider='goog... | Make the sample work by retrieving all contacts. | Make the sample work by retrieving all contacts.
| Python | unknown | lsaffre/lino_book,khchine5/book,lino-framework/book,lsaffre/lino_book,lino-framework/book,lino-framework/book,lino-framework/book,khchine5/book,khchine5/book,lsaffre/lino_book | import requests
from apiclient.discovery import build
from lino.api import rt
user = rt.models.users.User.objects.get(username='luc')
social = user.social_auth.get(provider='google-plus')
print(social.provider)
response = requests.get(
'https://www.googleapis.com/plus/v1/people/me/people/collection',
# 'http... | from apiclient.discovery import build
from oauth2client.client import OAuth2Credentials
from django.conf import settings
from datetime import datetime
import httplib2
from lino.api import rt
user = rt.models.users.User.objects.get(username='8618a3571d8b4237a3e60d25671d8f')
social = user.social_auth.get(provider='goog... | <commit_before>import requests
from apiclient.discovery import build
from lino.api import rt
user = rt.models.users.User.objects.get(username='luc')
social = user.social_auth.get(provider='google-plus')
print(social.provider)
response = requests.get(
'https://www.googleapis.com/plus/v1/people/me/people/collectio... | from apiclient.discovery import build
from oauth2client.client import OAuth2Credentials
from django.conf import settings
from datetime import datetime
import httplib2
from lino.api import rt
user = rt.models.users.User.objects.get(username='8618a3571d8b4237a3e60d25671d8f')
social = user.social_auth.get(provider='goog... | import requests
from apiclient.discovery import build
from lino.api import rt
user = rt.models.users.User.objects.get(username='luc')
social = user.social_auth.get(provider='google-plus')
print(social.provider)
response = requests.get(
'https://www.googleapis.com/plus/v1/people/me/people/collection',
# 'http... | <commit_before>import requests
from apiclient.discovery import build
from lino.api import rt
user = rt.models.users.User.objects.get(username='luc')
social = user.social_auth.get(provider='google-plus')
print(social.provider)
response = requests.get(
'https://www.googleapis.com/plus/v1/people/me/people/collectio... |
5d643a8f4a5e689cb2c5aaa0e98efcf17862fc3e | src/hydro/connectors/vertica.py | src/hydro/connectors/vertica.py | __author__ = 'moshebasanchig'
from hydro.connectors.base_classes import DBBaseConnector
import pyodbc
from hydro.exceptions import HydroException
DSN = 'dsn'
class VerticaConnector(DBBaseConnector):
"""
implementation of Vertica connector, base function that need to be implemented are _connect, _close and _... | __author__ = 'moshebasanchig'
from hydro.connectors.base_classes import DBBaseConnector, DSN
import pyodbc
from hydro.exceptions import HydroException
class VerticaConnector(DBBaseConnector):
"""
implementation of Vertica connector, base function that need to be implemented are _connect, _close and _execute
... | Define the DSN const in a central location | Define the DSN const in a central location
| Python | mit | Convertro/Hydro,Convertro/Hydro | __author__ = 'moshebasanchig'
from hydro.connectors.base_classes import DBBaseConnector
import pyodbc
from hydro.exceptions import HydroException
DSN = 'dsn'
class VerticaConnector(DBBaseConnector):
"""
implementation of Vertica connector, base function that need to be implemented are _connect, _close and _... | __author__ = 'moshebasanchig'
from hydro.connectors.base_classes import DBBaseConnector, DSN
import pyodbc
from hydro.exceptions import HydroException
class VerticaConnector(DBBaseConnector):
"""
implementation of Vertica connector, base function that need to be implemented are _connect, _close and _execute
... | <commit_before>__author__ = 'moshebasanchig'
from hydro.connectors.base_classes import DBBaseConnector
import pyodbc
from hydro.exceptions import HydroException
DSN = 'dsn'
class VerticaConnector(DBBaseConnector):
"""
implementation of Vertica connector, base function that need to be implemented are _connec... | __author__ = 'moshebasanchig'
from hydro.connectors.base_classes import DBBaseConnector, DSN
import pyodbc
from hydro.exceptions import HydroException
class VerticaConnector(DBBaseConnector):
"""
implementation of Vertica connector, base function that need to be implemented are _connect, _close and _execute
... | __author__ = 'moshebasanchig'
from hydro.connectors.base_classes import DBBaseConnector
import pyodbc
from hydro.exceptions import HydroException
DSN = 'dsn'
class VerticaConnector(DBBaseConnector):
"""
implementation of Vertica connector, base function that need to be implemented are _connect, _close and _... | <commit_before>__author__ = 'moshebasanchig'
from hydro.connectors.base_classes import DBBaseConnector
import pyodbc
from hydro.exceptions import HydroException
DSN = 'dsn'
class VerticaConnector(DBBaseConnector):
"""
implementation of Vertica connector, base function that need to be implemented are _connec... |
be2d33152c07594465c9b838c060edeaa8bc6ddc | tests/main.py | tests/main.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import unittest
from ParseArticleReferenceTest import ParseArticleReferenceTest
from SortReferencesVisitorTest import SortReferencesVisitorTest
from ParseEditTest import ParseEditTest
from ParseAlineaReferenceTest import ParseAlineaReferenceTest
from ParseAlineaDefinition... | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import unittest
from ParseArticleReferenceTest import ParseArticleReferenceTest
from SortReferencesVisitorTest import SortReferencesVisitorTest
from ParseEditTest import ParseEditTest
from ParseAlineaReferenceTest import ParseAlineaReferenceTest
from ParseAlineaDefinition... | Fix broken reference to ParseSentenceDefinitionTest. | Fix broken reference to ParseSentenceDefinitionTest.
| Python | mit | Legilibre/duralex | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import unittest
from ParseArticleReferenceTest import ParseArticleReferenceTest
from SortReferencesVisitorTest import SortReferencesVisitorTest
from ParseEditTest import ParseEditTest
from ParseAlineaReferenceTest import ParseAlineaReferenceTest
from ParseAlineaDefinition... | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import unittest
from ParseArticleReferenceTest import ParseArticleReferenceTest
from SortReferencesVisitorTest import SortReferencesVisitorTest
from ParseEditTest import ParseEditTest
from ParseAlineaReferenceTest import ParseAlineaReferenceTest
from ParseAlineaDefinition... | <commit_before>#!/usr/bin/env python
# -*- coding: utf-8 -*-
import unittest
from ParseArticleReferenceTest import ParseArticleReferenceTest
from SortReferencesVisitorTest import SortReferencesVisitorTest
from ParseEditTest import ParseEditTest
from ParseAlineaReferenceTest import ParseAlineaReferenceTest
from ParseA... | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import unittest
from ParseArticleReferenceTest import ParseArticleReferenceTest
from SortReferencesVisitorTest import SortReferencesVisitorTest
from ParseEditTest import ParseEditTest
from ParseAlineaReferenceTest import ParseAlineaReferenceTest
from ParseAlineaDefinition... | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import unittest
from ParseArticleReferenceTest import ParseArticleReferenceTest
from SortReferencesVisitorTest import SortReferencesVisitorTest
from ParseEditTest import ParseEditTest
from ParseAlineaReferenceTest import ParseAlineaReferenceTest
from ParseAlineaDefinition... | <commit_before>#!/usr/bin/env python
# -*- coding: utf-8 -*-
import unittest
from ParseArticleReferenceTest import ParseArticleReferenceTest
from SortReferencesVisitorTest import SortReferencesVisitorTest
from ParseEditTest import ParseEditTest
from ParseAlineaReferenceTest import ParseAlineaReferenceTest
from ParseA... |
e73409c17c89ef54f5c7e807059b229517e77617 | mailchute/smtpd/mailchute.py | mailchute/smtpd/mailchute.py | import datetime
import smtpd
from email.parser import Parser
from mailchute import db
from mailchute import settings
from mailchute.model import RawMessage, IncomingEmail
from logbook import Logger
logger = Logger(__name__)
class MessageProcessor(object):
def _should_persist(self, recipient):
allowed_re... | import datetime
import smtpd
from email.parser import Parser
from mailchute import db
from mailchute import settings
from mailchute.model import RawMessage, IncomingEmail
from logbook import Logger
logger = Logger(__name__)
class MessageProcessor(object):
def _should_persist(self, recipient):
recipient_... | Handle multiple receiver domain properly | Handle multiple receiver domain properly
| Python | bsd-3-clause | kevinjqiu/mailchute,kevinjqiu/mailchute | import datetime
import smtpd
from email.parser import Parser
from mailchute import db
from mailchute import settings
from mailchute.model import RawMessage, IncomingEmail
from logbook import Logger
logger = Logger(__name__)
class MessageProcessor(object):
def _should_persist(self, recipient):
allowed_re... | import datetime
import smtpd
from email.parser import Parser
from mailchute import db
from mailchute import settings
from mailchute.model import RawMessage, IncomingEmail
from logbook import Logger
logger = Logger(__name__)
class MessageProcessor(object):
def _should_persist(self, recipient):
recipient_... | <commit_before>import datetime
import smtpd
from email.parser import Parser
from mailchute import db
from mailchute import settings
from mailchute.model import RawMessage, IncomingEmail
from logbook import Logger
logger = Logger(__name__)
class MessageProcessor(object):
def _should_persist(self, recipient):
... | import datetime
import smtpd
from email.parser import Parser
from mailchute import db
from mailchute import settings
from mailchute.model import RawMessage, IncomingEmail
from logbook import Logger
logger = Logger(__name__)
class MessageProcessor(object):
def _should_persist(self, recipient):
recipient_... | import datetime
import smtpd
from email.parser import Parser
from mailchute import db
from mailchute import settings
from mailchute.model import RawMessage, IncomingEmail
from logbook import Logger
logger = Logger(__name__)
class MessageProcessor(object):
def _should_persist(self, recipient):
allowed_re... | <commit_before>import datetime
import smtpd
from email.parser import Parser
from mailchute import db
from mailchute import settings
from mailchute.model import RawMessage, IncomingEmail
from logbook import Logger
logger = Logger(__name__)
class MessageProcessor(object):
def _should_persist(self, recipient):
... |
cfc9c21121f06007dd582fe6cd0162e4df2a21d5 | tests/test_cle_gdb.py | tests/test_cle_gdb.py | import angr
import os
import nose
test_location = str(os.path.join(os.path.dirname(os.path.realpath(__file__)),
'../../binaries/tests'))
binpath = os.path.join(test_location, "x86_64/test_gdb_plugin")
def check_addrs(p):
libc = p.loader.shared_objects['libc.so.6']
ld = p.loade... | import angr
import os
import nose
test_location = str(os.path.join(os.path.dirname(os.path.realpath(__file__)),
'../../binaries/tests'))
binpath = os.path.join(test_location, "x86_64/test_gdb_plugin")
def check_addrs(p):
libc = p.loader.shared_objects['libc.so.6']
ld = p.loade... | Test fix. rebase_addr to mapped_base | fix: Test fix. rebase_addr to mapped_base
| Python | bsd-2-clause | schieb/angr,iamahuman/angr,iamahuman/angr,f-prettyland/angr,axt/angr,f-prettyland/angr,angr/angr,tyb0807/angr,chubbymaggie/angr,axt/angr,tyb0807/angr,schieb/angr,schieb/angr,angr/angr,tyb0807/angr,chubbymaggie/angr,chubbymaggie/angr,iamahuman/angr,angr/angr,f-prettyland/angr,axt/angr | import angr
import os
import nose
test_location = str(os.path.join(os.path.dirname(os.path.realpath(__file__)),
'../../binaries/tests'))
binpath = os.path.join(test_location, "x86_64/test_gdb_plugin")
def check_addrs(p):
libc = p.loader.shared_objects['libc.so.6']
ld = p.loade... | import angr
import os
import nose
test_location = str(os.path.join(os.path.dirname(os.path.realpath(__file__)),
'../../binaries/tests'))
binpath = os.path.join(test_location, "x86_64/test_gdb_plugin")
def check_addrs(p):
libc = p.loader.shared_objects['libc.so.6']
ld = p.loade... | <commit_before>import angr
import os
import nose
test_location = str(os.path.join(os.path.dirname(os.path.realpath(__file__)),
'../../binaries/tests'))
binpath = os.path.join(test_location, "x86_64/test_gdb_plugin")
def check_addrs(p):
libc = p.loader.shared_objects['libc.so.6']
... | import angr
import os
import nose
test_location = str(os.path.join(os.path.dirname(os.path.realpath(__file__)),
'../../binaries/tests'))
binpath = os.path.join(test_location, "x86_64/test_gdb_plugin")
def check_addrs(p):
libc = p.loader.shared_objects['libc.so.6']
ld = p.loade... | import angr
import os
import nose
test_location = str(os.path.join(os.path.dirname(os.path.realpath(__file__)),
'../../binaries/tests'))
binpath = os.path.join(test_location, "x86_64/test_gdb_plugin")
def check_addrs(p):
libc = p.loader.shared_objects['libc.so.6']
ld = p.loade... | <commit_before>import angr
import os
import nose
test_location = str(os.path.join(os.path.dirname(os.path.realpath(__file__)),
'../../binaries/tests'))
binpath = os.path.join(test_location, "x86_64/test_gdb_plugin")
def check_addrs(p):
libc = p.loader.shared_objects['libc.so.6']
... |
a3674958a046de711e37445d39afd4e529d8dd09 | bin/run_t2r_trainer.py | bin/run_t2r_trainer.py | # coding=utf-8
# Copyright 2020 The Tensor2Robot Authors.
#
# 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 ... | # coding=utf-8
# Copyright 2020 The Tensor2Robot Authors.
#
# 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 ... | Print gin config includes and imports when starting training. | Print gin config includes and imports when starting training.
PiperOrigin-RevId: 342367820
| Python | apache-2.0 | google-research/tensor2robot | # coding=utf-8
# Copyright 2020 The Tensor2Robot Authors.
#
# 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 ... | # coding=utf-8
# Copyright 2020 The Tensor2Robot Authors.
#
# 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 ... | <commit_before># coding=utf-8
# Copyright 2020 The Tensor2Robot Authors.
#
# 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... | # coding=utf-8
# Copyright 2020 The Tensor2Robot Authors.
#
# 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 ... | # coding=utf-8
# Copyright 2020 The Tensor2Robot Authors.
#
# 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 ... | <commit_before># coding=utf-8
# Copyright 2020 The Tensor2Robot Authors.
#
# 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... |
0068c9da4b8af1d51928ce3d2f326130dbf342f2 | _scripts/cfdoc_bootstrap.py | _scripts/cfdoc_bootstrap.py | #!/usr/bin/python
# The MIT License (MIT)
#
# Copyright (c) 2013 CFEngine AS
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# ... | #!/usr/bin/python
# The MIT License (MIT)
#
# Copyright (c) 2013 CFEngine AS
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# ... | Fix environment.validate() being called without branch name. | Fix environment.validate() being called without branch name.
| Python | mit | michaelclelland/documentation-generator,stweil/documentation-generator,stweil/documentation-generator,nickanderson/documentation-generator,cfengine/documentation-generator,michaelclelland/documentation-generator,cfengine/documentation-generator,nickanderson/documentation-generator,michaelclelland/documentation-generato... | #!/usr/bin/python
# The MIT License (MIT)
#
# Copyright (c) 2013 CFEngine AS
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# ... | #!/usr/bin/python
# The MIT License (MIT)
#
# Copyright (c) 2013 CFEngine AS
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# ... | <commit_before>#!/usr/bin/python
# The MIT License (MIT)
#
# Copyright (c) 2013 CFEngine AS
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitatio... | #!/usr/bin/python
# The MIT License (MIT)
#
# Copyright (c) 2013 CFEngine AS
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# ... | #!/usr/bin/python
# The MIT License (MIT)
#
# Copyright (c) 2013 CFEngine AS
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# ... | <commit_before>#!/usr/bin/python
# The MIT License (MIT)
#
# Copyright (c) 2013 CFEngine AS
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitatio... |
3364747195f0f3d2711169fb92c250fc10823d82 | default_settings.py | default_settings.py | # Copyright 2014 0xc0170
#
# 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, soft... | # Copyright 2014 0xc0170
#
# 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, soft... | Add message if you're using default settings | Add message if you're using default settings
| Python | apache-2.0 | 0xc0170/valinor,sarahmarshy/project_generator,autopulated/valinor,ARMmbed/valinor,sg-/project_generator,ohagendorf/project_generator,molejar/project_generator,aethaniel/project_generator,0xc0170/project_generator,sg-/project_generator,project-generator/project_generator,hwfwgrp/project_generator | # Copyright 2014 0xc0170
#
# 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, soft... | # Copyright 2014 0xc0170
#
# 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, soft... | <commit_before># Copyright 2014 0xc0170
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to i... | # Copyright 2014 0xc0170
#
# 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, soft... | # Copyright 2014 0xc0170
#
# 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, soft... | <commit_before># Copyright 2014 0xc0170
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to i... |
7f1ae8ac882dff05332e9f98f5b6396224392723 | api/libs/spec_validation.py | api/libs/spec_validation.py | # -*- coding: utf-8 -*-
from __future__ import absolute_import, division, print_function
from django.core.exceptions import ValidationError
from polyaxon_schemas.exceptions import PolyaxonfileError, PolyaxonConfigurationError
from polyaxon_schemas.polyaxonfile.specification import GroupSpecification
def validate_spe... | # -*- coding: utf-8 -*-
from __future__ import absolute_import, division, print_function
from django.core.exceptions import ValidationError
from polyaxon_schemas.exceptions import PolyaxonfileError, PolyaxonConfigurationError
from polyaxon_schemas.polyaxonfile.specification import GroupSpecification
def validate_spe... | Raise validation error if spec is in local run mode | Raise validation error if spec is in local run mode
| Python | apache-2.0 | polyaxon/polyaxon,polyaxon/polyaxon,polyaxon/polyaxon | # -*- coding: utf-8 -*-
from __future__ import absolute_import, division, print_function
from django.core.exceptions import ValidationError
from polyaxon_schemas.exceptions import PolyaxonfileError, PolyaxonConfigurationError
from polyaxon_schemas.polyaxonfile.specification import GroupSpecification
def validate_spe... | # -*- coding: utf-8 -*-
from __future__ import absolute_import, division, print_function
from django.core.exceptions import ValidationError
from polyaxon_schemas.exceptions import PolyaxonfileError, PolyaxonConfigurationError
from polyaxon_schemas.polyaxonfile.specification import GroupSpecification
def validate_spe... | <commit_before># -*- coding: utf-8 -*-
from __future__ import absolute_import, division, print_function
from django.core.exceptions import ValidationError
from polyaxon_schemas.exceptions import PolyaxonfileError, PolyaxonConfigurationError
from polyaxon_schemas.polyaxonfile.specification import GroupSpecification
d... | # -*- coding: utf-8 -*-
from __future__ import absolute_import, division, print_function
from django.core.exceptions import ValidationError
from polyaxon_schemas.exceptions import PolyaxonfileError, PolyaxonConfigurationError
from polyaxon_schemas.polyaxonfile.specification import GroupSpecification
def validate_spe... | # -*- coding: utf-8 -*-
from __future__ import absolute_import, division, print_function
from django.core.exceptions import ValidationError
from polyaxon_schemas.exceptions import PolyaxonfileError, PolyaxonConfigurationError
from polyaxon_schemas.polyaxonfile.specification import GroupSpecification
def validate_spe... | <commit_before># -*- coding: utf-8 -*-
from __future__ import absolute_import, division, print_function
from django.core.exceptions import ValidationError
from polyaxon_schemas.exceptions import PolyaxonfileError, PolyaxonConfigurationError
from polyaxon_schemas.polyaxonfile.specification import GroupSpecification
d... |
dc251707fdcd9fe021b6f8627ffbb139d42423b3 | cairis/test/CairisDaemonTestCase.py | cairis/test/CairisDaemonTestCase.py | # Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may... | # Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may... | Change database init script for daemon tests | Change database init script for daemon tests
| Python | apache-2.0 | nathanbjenx/cairis,nathanbjenx/cairis,nathanbjenx/cairis,failys/CAIRIS,failys/CAIRIS,failys/CAIRIS,nathanbjenx/cairis | # Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may... | # Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may... | <commit_before># Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "Lic... | # Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may... | # Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may... | <commit_before># Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "Lic... |
d705c4ffbe60a11a0cde55f5caa2324349366bab | irctest/optional_extensions.py | irctest/optional_extensions.py | import unittest
import operator
import itertools
class NotImplementedByController(unittest.SkipTest, NotImplementedError):
def __str__(self):
return 'Not implemented by controller: {}'.format(self.args[0])
class OptionalExtensionNotSupported(unittest.SkipTest):
def __str__(self):
return 'Unsup... | import unittest
import operator
import collections
class NotImplementedByController(unittest.SkipTest, NotImplementedError):
def __str__(self):
return 'Not implemented by controller: {}'.format(self.args[0])
class OptionalExtensionNotSupported(unittest.SkipTest):
def __str__(self):
return 'Uns... | Fix output of skipped tests. | Fix output of skipped tests.
| Python | mit | ProgVal/irctest | import unittest
import operator
import itertools
class NotImplementedByController(unittest.SkipTest, NotImplementedError):
def __str__(self):
return 'Not implemented by controller: {}'.format(self.args[0])
class OptionalExtensionNotSupported(unittest.SkipTest):
def __str__(self):
return 'Unsup... | import unittest
import operator
import collections
class NotImplementedByController(unittest.SkipTest, NotImplementedError):
def __str__(self):
return 'Not implemented by controller: {}'.format(self.args[0])
class OptionalExtensionNotSupported(unittest.SkipTest):
def __str__(self):
return 'Uns... | <commit_before>import unittest
import operator
import itertools
class NotImplementedByController(unittest.SkipTest, NotImplementedError):
def __str__(self):
return 'Not implemented by controller: {}'.format(self.args[0])
class OptionalExtensionNotSupported(unittest.SkipTest):
def __str__(self):
... | import unittest
import operator
import collections
class NotImplementedByController(unittest.SkipTest, NotImplementedError):
def __str__(self):
return 'Not implemented by controller: {}'.format(self.args[0])
class OptionalExtensionNotSupported(unittest.SkipTest):
def __str__(self):
return 'Uns... | import unittest
import operator
import itertools
class NotImplementedByController(unittest.SkipTest, NotImplementedError):
def __str__(self):
return 'Not implemented by controller: {}'.format(self.args[0])
class OptionalExtensionNotSupported(unittest.SkipTest):
def __str__(self):
return 'Unsup... | <commit_before>import unittest
import operator
import itertools
class NotImplementedByController(unittest.SkipTest, NotImplementedError):
def __str__(self):
return 'Not implemented by controller: {}'.format(self.args[0])
class OptionalExtensionNotSupported(unittest.SkipTest):
def __str__(self):
... |
448f412790220a48a26c595c9dd6f6a5f412d995 | pylons/__init__.py | pylons/__init__.py | """Base objects to be exported for use in Controllers"""
from paste.registry import StackedObjectProxy
from pylons.config import config
__all__ = ['app_globals', 'c', 'cache', 'config', 'g', 'request', 'response',
'session', 'tmpl_context', 'url']
def __figure_version():
try:
from pkg_resource... | """Base objects to be exported for use in Controllers"""
from paste.registry import StackedObjectProxy
from pylons.configuration import config
__all__ = ['app_globals', 'c', 'cache', 'config', 'g', 'request', 'response',
'session', 'tmpl_context', 'url']
def __figure_version():
try:
from pkg_r... | Fix an import error. pylons.config doesn't exist anymore, use pylons.configuration | Fix an import error. pylons.config doesn't exist anymore, use pylons.configuration
| Python | bsd-3-clause | obeattie/pylons,obeattie/pylons | """Base objects to be exported for use in Controllers"""
from paste.registry import StackedObjectProxy
from pylons.config import config
__all__ = ['app_globals', 'c', 'cache', 'config', 'g', 'request', 'response',
'session', 'tmpl_context', 'url']
def __figure_version():
try:
from pkg_resource... | """Base objects to be exported for use in Controllers"""
from paste.registry import StackedObjectProxy
from pylons.configuration import config
__all__ = ['app_globals', 'c', 'cache', 'config', 'g', 'request', 'response',
'session', 'tmpl_context', 'url']
def __figure_version():
try:
from pkg_r... | <commit_before>"""Base objects to be exported for use in Controllers"""
from paste.registry import StackedObjectProxy
from pylons.config import config
__all__ = ['app_globals', 'c', 'cache', 'config', 'g', 'request', 'response',
'session', 'tmpl_context', 'url']
def __figure_version():
try:
fr... | """Base objects to be exported for use in Controllers"""
from paste.registry import StackedObjectProxy
from pylons.configuration import config
__all__ = ['app_globals', 'c', 'cache', 'config', 'g', 'request', 'response',
'session', 'tmpl_context', 'url']
def __figure_version():
try:
from pkg_r... | """Base objects to be exported for use in Controllers"""
from paste.registry import StackedObjectProxy
from pylons.config import config
__all__ = ['app_globals', 'c', 'cache', 'config', 'g', 'request', 'response',
'session', 'tmpl_context', 'url']
def __figure_version():
try:
from pkg_resource... | <commit_before>"""Base objects to be exported for use in Controllers"""
from paste.registry import StackedObjectProxy
from pylons.config import config
__all__ = ['app_globals', 'c', 'cache', 'config', 'g', 'request', 'response',
'session', 'tmpl_context', 'url']
def __figure_version():
try:
fr... |
69f0b89c306b6a616e3db2716669a2aa04453222 | cogs/default.py | cogs/default.py | import time
from discord.ext import commands
class Default:
@commands.command(aliases=['p'])
async def ping(self, ctx):
"""Get the ping to the websocket."""
msg = await ctx.send("Pong! :ping_pong:")
before = time.monotonic()
await (await ctx.bot.ws.ping())
after = tim... | from discord.ext import commands
class Default:
@commands.command(aliases=['p'])
async def ping(self, ctx):
"""Get the ping to the websocket."""
await ctx.send(f'Pong! :ping_pong: **{ctx.bot.latency*1000:.0f}ms**')
@commands.command()
async def source(self, ctx):
"""Get the so... | Use bot.latency for ping time | Use bot.latency for ping time
| Python | mit | BeatButton/beattie,BeatButton/beattie-bot | import time
from discord.ext import commands
class Default:
@commands.command(aliases=['p'])
async def ping(self, ctx):
"""Get the ping to the websocket."""
msg = await ctx.send("Pong! :ping_pong:")
before = time.monotonic()
await (await ctx.bot.ws.ping())
after = tim... | from discord.ext import commands
class Default:
@commands.command(aliases=['p'])
async def ping(self, ctx):
"""Get the ping to the websocket."""
await ctx.send(f'Pong! :ping_pong: **{ctx.bot.latency*1000:.0f}ms**')
@commands.command()
async def source(self, ctx):
"""Get the so... | <commit_before>import time
from discord.ext import commands
class Default:
@commands.command(aliases=['p'])
async def ping(self, ctx):
"""Get the ping to the websocket."""
msg = await ctx.send("Pong! :ping_pong:")
before = time.monotonic()
await (await ctx.bot.ws.ping())
... | from discord.ext import commands
class Default:
@commands.command(aliases=['p'])
async def ping(self, ctx):
"""Get the ping to the websocket."""
await ctx.send(f'Pong! :ping_pong: **{ctx.bot.latency*1000:.0f}ms**')
@commands.command()
async def source(self, ctx):
"""Get the so... | import time
from discord.ext import commands
class Default:
@commands.command(aliases=['p'])
async def ping(self, ctx):
"""Get the ping to the websocket."""
msg = await ctx.send("Pong! :ping_pong:")
before = time.monotonic()
await (await ctx.bot.ws.ping())
after = tim... | <commit_before>import time
from discord.ext import commands
class Default:
@commands.command(aliases=['p'])
async def ping(self, ctx):
"""Get the ping to the websocket."""
msg = await ctx.send("Pong! :ping_pong:")
before = time.monotonic()
await (await ctx.bot.ws.ping())
... |
e40e30170b76ce7761a398d6c9ee7bac1f18a621 | organizer/forms.py | organizer/forms.py | from django import forms
from django.core.exceptions import ValidationError
from .models import Tag
class TagForm(forms.ModelForm):
class Meta:
model = Tag
exclude = tuple()
def clean_name(self):
return self.cleaned_data['name'].lower()
def clean_slug(self):
new_slug = (... | from django import forms
from django.core.exceptions import ValidationError
from .models import Tag
class TagForm(forms.ModelForm):
class Meta:
model = Tag
fields = '__all__'
def clean_name(self):
return self.cleaned_data['name'].lower()
def clean_slug(self):
new_slug = ... | Revert TagForm Meta fields option. | Ch07: Revert TagForm Meta fields option.
| Python | bsd-2-clause | jambonrose/DjangoUnleashed-1.8,jambonrose/DjangoUnleashed-1.8 | from django import forms
from django.core.exceptions import ValidationError
from .models import Tag
class TagForm(forms.ModelForm):
class Meta:
model = Tag
exclude = tuple()
def clean_name(self):
return self.cleaned_data['name'].lower()
def clean_slug(self):
new_slug = (... | from django import forms
from django.core.exceptions import ValidationError
from .models import Tag
class TagForm(forms.ModelForm):
class Meta:
model = Tag
fields = '__all__'
def clean_name(self):
return self.cleaned_data['name'].lower()
def clean_slug(self):
new_slug = ... | <commit_before>from django import forms
from django.core.exceptions import ValidationError
from .models import Tag
class TagForm(forms.ModelForm):
class Meta:
model = Tag
exclude = tuple()
def clean_name(self):
return self.cleaned_data['name'].lower()
def clean_slug(self):
... | from django import forms
from django.core.exceptions import ValidationError
from .models import Tag
class TagForm(forms.ModelForm):
class Meta:
model = Tag
fields = '__all__'
def clean_name(self):
return self.cleaned_data['name'].lower()
def clean_slug(self):
new_slug = ... | from django import forms
from django.core.exceptions import ValidationError
from .models import Tag
class TagForm(forms.ModelForm):
class Meta:
model = Tag
exclude = tuple()
def clean_name(self):
return self.cleaned_data['name'].lower()
def clean_slug(self):
new_slug = (... | <commit_before>from django import forms
from django.core.exceptions import ValidationError
from .models import Tag
class TagForm(forms.ModelForm):
class Meta:
model = Tag
exclude = tuple()
def clean_name(self):
return self.cleaned_data['name'].lower()
def clean_slug(self):
... |
ad7d39c472130e7f06c30d06a5aed465d2e5ab2c | linter.py | linter.py | from SublimeLinter.lint import Linter, util
class Cppcheck(Linter):
cmd = ('cppcheck', '--template={file}:{line}: {severity}: {message}', '--inline-suppr', '--quiet', '${args}', '${file}')
regex = (
r'^(?P<file>(:\\|[^:])+):(?P<line>\d+):((?P<col>\d+):)?\s+'
r'((?P<error>error)|(?P<warning>war... | from SublimeLinter.lint import Linter, util
class Cppcheck(Linter):
cmd = (
'cppcheck',
'--template={file}:{line}: {severity}: {message}',
'--inline-suppr',
'--quiet',
'${args}',
'${file}'
)
regex = (
r'^(?P<file>(:\\|[^:])+):(?P<line>\d+):((?P<col>\... | Reformat cmd to go under 120 character limit | Reformat cmd to go under 120 character limit | Python | mit | SublimeLinter/SublimeLinter-cppcheck | from SublimeLinter.lint import Linter, util
class Cppcheck(Linter):
cmd = ('cppcheck', '--template={file}:{line}: {severity}: {message}', '--inline-suppr', '--quiet', '${args}', '${file}')
regex = (
r'^(?P<file>(:\\|[^:])+):(?P<line>\d+):((?P<col>\d+):)?\s+'
r'((?P<error>error)|(?P<warning>war... | from SublimeLinter.lint import Linter, util
class Cppcheck(Linter):
cmd = (
'cppcheck',
'--template={file}:{line}: {severity}: {message}',
'--inline-suppr',
'--quiet',
'${args}',
'${file}'
)
regex = (
r'^(?P<file>(:\\|[^:])+):(?P<line>\d+):((?P<col>\... | <commit_before>from SublimeLinter.lint import Linter, util
class Cppcheck(Linter):
cmd = ('cppcheck', '--template={file}:{line}: {severity}: {message}', '--inline-suppr', '--quiet', '${args}', '${file}')
regex = (
r'^(?P<file>(:\\|[^:])+):(?P<line>\d+):((?P<col>\d+):)?\s+'
r'((?P<error>error)|... | from SublimeLinter.lint import Linter, util
class Cppcheck(Linter):
cmd = (
'cppcheck',
'--template={file}:{line}: {severity}: {message}',
'--inline-suppr',
'--quiet',
'${args}',
'${file}'
)
regex = (
r'^(?P<file>(:\\|[^:])+):(?P<line>\d+):((?P<col>\... | from SublimeLinter.lint import Linter, util
class Cppcheck(Linter):
cmd = ('cppcheck', '--template={file}:{line}: {severity}: {message}', '--inline-suppr', '--quiet', '${args}', '${file}')
regex = (
r'^(?P<file>(:\\|[^:])+):(?P<line>\d+):((?P<col>\d+):)?\s+'
r'((?P<error>error)|(?P<warning>war... | <commit_before>from SublimeLinter.lint import Linter, util
class Cppcheck(Linter):
cmd = ('cppcheck', '--template={file}:{line}: {severity}: {message}', '--inline-suppr', '--quiet', '${args}', '${file}')
regex = (
r'^(?P<file>(:\\|[^:])+):(?P<line>\d+):((?P<col>\d+):)?\s+'
r'((?P<error>error)|... |
cf948bd38a57b459db9f37ac584207f36cb3610e | linter.py | linter.py | #
# linter.py
# Linter for SublimeLinter3, a code checking framework for Sublime Text 3
#
# Written by Aparajita Fishman
# Contributors: Francis Gulotta, Josh Hagins
# Copyright (c) 2013 Aparajita Fishman
#
# License: MIT
#
"""This module exports the Rubocop plugin class."""
from SublimeLinter.lint import RubyLinter
... | #
# linter.py
# Linter for SublimeLinter3, a code checking framework for Sublime Text 3
#
# Written by Aparajita Fishman
# Contributors: Francis Gulotta, Josh Hagins
# Copyright (c) 2013 Aparajita Fishman
#
# License: MIT
#
"""This module exports the Rubocop plugin class."""
from SublimeLinter.lint import RubyLinter
... | Add support for RubyNext and RubyExperimental | Add support for RubyNext and RubyExperimental | Python | mit | SublimeLinter/SublimeLinter-rubocop | #
# linter.py
# Linter for SublimeLinter3, a code checking framework for Sublime Text 3
#
# Written by Aparajita Fishman
# Contributors: Francis Gulotta, Josh Hagins
# Copyright (c) 2013 Aparajita Fishman
#
# License: MIT
#
"""This module exports the Rubocop plugin class."""
from SublimeLinter.lint import RubyLinter
... | #
# linter.py
# Linter for SublimeLinter3, a code checking framework for Sublime Text 3
#
# Written by Aparajita Fishman
# Contributors: Francis Gulotta, Josh Hagins
# Copyright (c) 2013 Aparajita Fishman
#
# License: MIT
#
"""This module exports the Rubocop plugin class."""
from SublimeLinter.lint import RubyLinter
... | <commit_before>#
# linter.py
# Linter for SublimeLinter3, a code checking framework for Sublime Text 3
#
# Written by Aparajita Fishman
# Contributors: Francis Gulotta, Josh Hagins
# Copyright (c) 2013 Aparajita Fishman
#
# License: MIT
#
"""This module exports the Rubocop plugin class."""
from SublimeLinter.lint imp... | #
# linter.py
# Linter for SublimeLinter3, a code checking framework for Sublime Text 3
#
# Written by Aparajita Fishman
# Contributors: Francis Gulotta, Josh Hagins
# Copyright (c) 2013 Aparajita Fishman
#
# License: MIT
#
"""This module exports the Rubocop plugin class."""
from SublimeLinter.lint import RubyLinter
... | #
# linter.py
# Linter for SublimeLinter3, a code checking framework for Sublime Text 3
#
# Written by Aparajita Fishman
# Contributors: Francis Gulotta, Josh Hagins
# Copyright (c) 2013 Aparajita Fishman
#
# License: MIT
#
"""This module exports the Rubocop plugin class."""
from SublimeLinter.lint import RubyLinter
... | <commit_before>#
# linter.py
# Linter for SublimeLinter3, a code checking framework for Sublime Text 3
#
# Written by Aparajita Fishman
# Contributors: Francis Gulotta, Josh Hagins
# Copyright (c) 2013 Aparajita Fishman
#
# License: MIT
#
"""This module exports the Rubocop plugin class."""
from SublimeLinter.lint imp... |
2e9527d00358027a3f85d3087734ab4e87441fc4 | reporting_scripts/user_info.py | reporting_scripts/user_info.py | '''
This module will retrieve info about students registered in the course
Usage:
python user_info.py
'''
from collections import defaultdict
from base_edx import EdXConnection
from generate_csv_report import CSV
connection = EdXConnection('certificates_generatedcertificate', 'auth_userprofile')
collection = con... | '''
This module will retrieve info about students registered in the course
Usage:
python user_info.py
'''
from collections import defaultdict
from base_edx import EdXConnection
from generate_csv_report import CSV
connection = EdXConnection('certificates_generatedcertificate', 'auth_userprofile')
collection = con... | Update to handle users with no final grade | Update to handle users with no final grade
| Python | mit | andyzsf/edx_data_research,andyzsf/edx_data_research,McGillX/edx_data_research,McGillX/edx_data_research,McGillX/edx_data_research | '''
This module will retrieve info about students registered in the course
Usage:
python user_info.py
'''
from collections import defaultdict
from base_edx import EdXConnection
from generate_csv_report import CSV
connection = EdXConnection('certificates_generatedcertificate', 'auth_userprofile')
collection = con... | '''
This module will retrieve info about students registered in the course
Usage:
python user_info.py
'''
from collections import defaultdict
from base_edx import EdXConnection
from generate_csv_report import CSV
connection = EdXConnection('certificates_generatedcertificate', 'auth_userprofile')
collection = con... | <commit_before>'''
This module will retrieve info about students registered in the course
Usage:
python user_info.py
'''
from collections import defaultdict
from base_edx import EdXConnection
from generate_csv_report import CSV
connection = EdXConnection('certificates_generatedcertificate', 'auth_userprofile')
c... | '''
This module will retrieve info about students registered in the course
Usage:
python user_info.py
'''
from collections import defaultdict
from base_edx import EdXConnection
from generate_csv_report import CSV
connection = EdXConnection('certificates_generatedcertificate', 'auth_userprofile')
collection = con... | '''
This module will retrieve info about students registered in the course
Usage:
python user_info.py
'''
from collections import defaultdict
from base_edx import EdXConnection
from generate_csv_report import CSV
connection = EdXConnection('certificates_generatedcertificate', 'auth_userprofile')
collection = con... | <commit_before>'''
This module will retrieve info about students registered in the course
Usage:
python user_info.py
'''
from collections import defaultdict
from base_edx import EdXConnection
from generate_csv_report import CSV
connection = EdXConnection('certificates_generatedcertificate', 'auth_userprofile')
c... |
aada9a317eb8aed5dcd8ff6731692ef25ff52a67 | packtets/graph/generator.py | packtets/graph/generator.py | import igraph
def packing_graph(tets, vx, vy, vz, independent = 0):
N = len(tets)
g = igraph.Graph()
g.add_vertices(N)
for i in range(N):
for j in range(max(i, independent),N):
for s in tets[j].get_symetry(vx, vy, vz, include_self=(i != j)):
if tets[i].collision(s):
... | import igraph
def packing_graph(tets, vx, vy, vz, independent = 0):
N = len(tets)
for i in range(N-1, independent-1, -1):
for s in tets[i].get_symetry(vx, vy, vz, include_self=False):
if tets[i].collision(s):
del tets[i]
break
N = len(tets)
g = igraph.Graph... | Remove self-touching tets first to reduce collision load. | Remove self-touching tets first to reduce collision load.
| Python | mit | maxhutch/packtets,maxhutch/packtets | import igraph
def packing_graph(tets, vx, vy, vz, independent = 0):
N = len(tets)
g = igraph.Graph()
g.add_vertices(N)
for i in range(N):
for j in range(max(i, independent),N):
for s in tets[j].get_symetry(vx, vy, vz, include_self=(i != j)):
if tets[i].collision(s):
... | import igraph
def packing_graph(tets, vx, vy, vz, independent = 0):
N = len(tets)
for i in range(N-1, independent-1, -1):
for s in tets[i].get_symetry(vx, vy, vz, include_self=False):
if tets[i].collision(s):
del tets[i]
break
N = len(tets)
g = igraph.Graph... | <commit_before>import igraph
def packing_graph(tets, vx, vy, vz, independent = 0):
N = len(tets)
g = igraph.Graph()
g.add_vertices(N)
for i in range(N):
for j in range(max(i, independent),N):
for s in tets[j].get_symetry(vx, vy, vz, include_self=(i != j)):
if tets[i]... | import igraph
def packing_graph(tets, vx, vy, vz, independent = 0):
N = len(tets)
for i in range(N-1, independent-1, -1):
for s in tets[i].get_symetry(vx, vy, vz, include_self=False):
if tets[i].collision(s):
del tets[i]
break
N = len(tets)
g = igraph.Graph... | import igraph
def packing_graph(tets, vx, vy, vz, independent = 0):
N = len(tets)
g = igraph.Graph()
g.add_vertices(N)
for i in range(N):
for j in range(max(i, independent),N):
for s in tets[j].get_symetry(vx, vy, vz, include_self=(i != j)):
if tets[i].collision(s):
... | <commit_before>import igraph
def packing_graph(tets, vx, vy, vz, independent = 0):
N = len(tets)
g = igraph.Graph()
g.add_vertices(N)
for i in range(N):
for j in range(max(i, independent),N):
for s in tets[j].get_symetry(vx, vy, vz, include_self=(i != j)):
if tets[i]... |
a72cf5997439533d7ce74d6c4fc50d1189466c1b | peloid/app/shell/service.py | peloid/app/shell/service.py | from twisted.cred import portal
from twisted.conch.checkers import SSHPublicKeyDatabase
from carapace.util import ssh as util
from peloid.app import mud
from peloid.app.shell import gameshell, setupshell
def getGameShellFactory(**namespace):
"""
The "namespace" kwargs here contains the passed objects that w... | from twisted.cred import portal
from twisted.conch.checkers import SSHPublicKeyDatabase
from carapace.util import ssh as util
from peloid import const
from peloid.app import mud
from peloid.app.shell import gameshell, setupshell
def getGameShellFactory(**namespace):
"""
The "namespace" kwargs here contains ... | Set initial mode to lobby. | Set initial mode to lobby.
| Python | mit | oubiwann/peloid | from twisted.cred import portal
from twisted.conch.checkers import SSHPublicKeyDatabase
from carapace.util import ssh as util
from peloid.app import mud
from peloid.app.shell import gameshell, setupshell
def getGameShellFactory(**namespace):
"""
The "namespace" kwargs here contains the passed objects that w... | from twisted.cred import portal
from twisted.conch.checkers import SSHPublicKeyDatabase
from carapace.util import ssh as util
from peloid import const
from peloid.app import mud
from peloid.app.shell import gameshell, setupshell
def getGameShellFactory(**namespace):
"""
The "namespace" kwargs here contains ... | <commit_before>from twisted.cred import portal
from twisted.conch.checkers import SSHPublicKeyDatabase
from carapace.util import ssh as util
from peloid.app import mud
from peloid.app.shell import gameshell, setupshell
def getGameShellFactory(**namespace):
"""
The "namespace" kwargs here contains the passed... | from twisted.cred import portal
from twisted.conch.checkers import SSHPublicKeyDatabase
from carapace.util import ssh as util
from peloid import const
from peloid.app import mud
from peloid.app.shell import gameshell, setupshell
def getGameShellFactory(**namespace):
"""
The "namespace" kwargs here contains ... | from twisted.cred import portal
from twisted.conch.checkers import SSHPublicKeyDatabase
from carapace.util import ssh as util
from peloid.app import mud
from peloid.app.shell import gameshell, setupshell
def getGameShellFactory(**namespace):
"""
The "namespace" kwargs here contains the passed objects that w... | <commit_before>from twisted.cred import portal
from twisted.conch.checkers import SSHPublicKeyDatabase
from carapace.util import ssh as util
from peloid.app import mud
from peloid.app.shell import gameshell, setupshell
def getGameShellFactory(**namespace):
"""
The "namespace" kwargs here contains the passed... |
4c2cc3c8a37082fe4d87f0a522e440cead8d2b4f | geotrek/common/migrations/0011_attachment_add_is_image.py | geotrek/common/migrations/0011_attachment_add_is_image.py | # -*- coding: utf-8 -*-
# Generated by Django 1.11.14 on 2020-02-28 17:30
from __future__ import unicode_literals
from django.db import migrations
import mimetypes
def forward(apps, schema_editor):
AttachmentModel = apps.get_model('common', 'Attachment')
for attachment in AttachmentModel.objects.all():
... | # -*- coding: utf-8 -*-
# Generated by Django 1.11.14 on 2020-02-28 17:30
from __future__ import unicode_literals
from django.db import migrations
import mimetypes
def forward(apps, schema_editor):
AttachmentModel = apps.get_model('common', 'Attachment')
for attachment in AttachmentModel.objects.all():
... | Check if mt is None before spliting it | Check if mt is None before spliting it
| Python | bsd-2-clause | makinacorpus/Geotrek,makinacorpus/Geotrek,GeotrekCE/Geotrek-admin,makinacorpus/Geotrek,GeotrekCE/Geotrek-admin,GeotrekCE/Geotrek-admin,makinacorpus/Geotrek,GeotrekCE/Geotrek-admin | # -*- coding: utf-8 -*-
# Generated by Django 1.11.14 on 2020-02-28 17:30
from __future__ import unicode_literals
from django.db import migrations
import mimetypes
def forward(apps, schema_editor):
AttachmentModel = apps.get_model('common', 'Attachment')
for attachment in AttachmentModel.objects.all():
... | # -*- coding: utf-8 -*-
# Generated by Django 1.11.14 on 2020-02-28 17:30
from __future__ import unicode_literals
from django.db import migrations
import mimetypes
def forward(apps, schema_editor):
AttachmentModel = apps.get_model('common', 'Attachment')
for attachment in AttachmentModel.objects.all():
... | <commit_before># -*- coding: utf-8 -*-
# Generated by Django 1.11.14 on 2020-02-28 17:30
from __future__ import unicode_literals
from django.db import migrations
import mimetypes
def forward(apps, schema_editor):
AttachmentModel = apps.get_model('common', 'Attachment')
for attachment in AttachmentModel.obje... | # -*- coding: utf-8 -*-
# Generated by Django 1.11.14 on 2020-02-28 17:30
from __future__ import unicode_literals
from django.db import migrations
import mimetypes
def forward(apps, schema_editor):
AttachmentModel = apps.get_model('common', 'Attachment')
for attachment in AttachmentModel.objects.all():
... | # -*- coding: utf-8 -*-
# Generated by Django 1.11.14 on 2020-02-28 17:30
from __future__ import unicode_literals
from django.db import migrations
import mimetypes
def forward(apps, schema_editor):
AttachmentModel = apps.get_model('common', 'Attachment')
for attachment in AttachmentModel.objects.all():
... | <commit_before># -*- coding: utf-8 -*-
# Generated by Django 1.11.14 on 2020-02-28 17:30
from __future__ import unicode_literals
from django.db import migrations
import mimetypes
def forward(apps, schema_editor):
AttachmentModel = apps.get_model('common', 'Attachment')
for attachment in AttachmentModel.obje... |
8c19549071782f3a07f1a6f1656817bb36b00dbe | manage.py | manage.py | #!/usr/bin/env python
import os
import sys
if __name__ == "__main__":
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "feed_to_kippt.settings")
from django.core.management import execute_from_command_line
execute_from_command_line(sys.argv)
| #!/usr/bin/env python
import os
import sys
import re
def read_env():
"""Pulled from Honcho code with minor updates, reads local default
environment variables from a .env file located in the project root
directory.
"""
try:
with open('.env') as f:
content = f.read()
except ... | Read from local environment file if available | Read from local environment file if available | Python | mit | jpadilla/feedleap,jpadilla/feedleap | #!/usr/bin/env python
import os
import sys
if __name__ == "__main__":
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "feed_to_kippt.settings")
from django.core.management import execute_from_command_line
execute_from_command_line(sys.argv)
Read from local environment file if available | #!/usr/bin/env python
import os
import sys
import re
def read_env():
"""Pulled from Honcho code with minor updates, reads local default
environment variables from a .env file located in the project root
directory.
"""
try:
with open('.env') as f:
content = f.read()
except ... | <commit_before>#!/usr/bin/env python
import os
import sys
if __name__ == "__main__":
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "feed_to_kippt.settings")
from django.core.management import execute_from_command_line
execute_from_command_line(sys.argv)
<commit_msg>Read from local environment file if a... | #!/usr/bin/env python
import os
import sys
import re
def read_env():
"""Pulled from Honcho code with minor updates, reads local default
environment variables from a .env file located in the project root
directory.
"""
try:
with open('.env') as f:
content = f.read()
except ... | #!/usr/bin/env python
import os
import sys
if __name__ == "__main__":
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "feed_to_kippt.settings")
from django.core.management import execute_from_command_line
execute_from_command_line(sys.argv)
Read from local environment file if available#!/usr/bin/env pyth... | <commit_before>#!/usr/bin/env python
import os
import sys
if __name__ == "__main__":
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "feed_to_kippt.settings")
from django.core.management import execute_from_command_line
execute_from_command_line(sys.argv)
<commit_msg>Read from local environment file if a... |
64c31f5630975a30a8187ad51566b4ff723b4d28 | nengo_spinnaker/simulator.py | nengo_spinnaker/simulator.py | import sys
from pacman103.core import control
from pacman103 import conf
from . import builder
class Simulator(object):
def __init__(self, model, dt=0.001, seed=None, use_serial=False):
# Build the model
self.builder = builder.Builder(use_serial=use_serial)
self.dao = self.builder(model,... | import sys
from pacman103.core import control
from pacman103 import conf
from . import builder
class Simulator(object):
def __init__(self, model, dt=0.001, seed=None, use_serial=False):
# Build the model
self.builder = builder.Builder()
self.dao = self.builder(model, dt, seed, use_serial... | Correct `Builder.__call__` parameters when called by the `Simulator` | Correct `Builder.__call__` parameters when called by the `Simulator`
| Python | mit | ctn-archive/nengo_spinnaker_2014,ctn-archive/nengo_spinnaker_2014,ctn-archive/nengo_spinnaker_2014,ctn-archive/nengo_spinnaker_2014 | import sys
from pacman103.core import control
from pacman103 import conf
from . import builder
class Simulator(object):
def __init__(self, model, dt=0.001, seed=None, use_serial=False):
# Build the model
self.builder = builder.Builder(use_serial=use_serial)
self.dao = self.builder(model,... | import sys
from pacman103.core import control
from pacman103 import conf
from . import builder
class Simulator(object):
def __init__(self, model, dt=0.001, seed=None, use_serial=False):
# Build the model
self.builder = builder.Builder()
self.dao = self.builder(model, dt, seed, use_serial... | <commit_before>import sys
from pacman103.core import control
from pacman103 import conf
from . import builder
class Simulator(object):
def __init__(self, model, dt=0.001, seed=None, use_serial=False):
# Build the model
self.builder = builder.Builder(use_serial=use_serial)
self.dao = self... | import sys
from pacman103.core import control
from pacman103 import conf
from . import builder
class Simulator(object):
def __init__(self, model, dt=0.001, seed=None, use_serial=False):
# Build the model
self.builder = builder.Builder()
self.dao = self.builder(model, dt, seed, use_serial... | import sys
from pacman103.core import control
from pacman103 import conf
from . import builder
class Simulator(object):
def __init__(self, model, dt=0.001, seed=None, use_serial=False):
# Build the model
self.builder = builder.Builder(use_serial=use_serial)
self.dao = self.builder(model,... | <commit_before>import sys
from pacman103.core import control
from pacman103 import conf
from . import builder
class Simulator(object):
def __init__(self, model, dt=0.001, seed=None, use_serial=False):
# Build the model
self.builder = builder.Builder(use_serial=use_serial)
self.dao = self... |
71d227e96eeeac09dc7fc25298600f159cf338a0 | categories/serializers.py | categories/serializers.py | from .models import Category, Keyword, Subcategory
from rest_framework import serializers
class KeywordSerializer(serializers.ModelSerializer):
class Meta:
model = Keyword
fields = ('pk', 'name')
class KeywordListSerializer(serializers.ModelSerializer):
class Meta:
model ... | from .models import Category, Keyword, Subcategory
from rest_framework import serializers
class KeywordSerializer(serializers.ModelSerializer):
class Meta:
model = Keyword
fields = ('pk', 'name')
class KeywordListSerializer(serializers.ModelSerializer):
class Meta:
model ... | Add comment_required to category simple serializer | Add comment_required to category simple serializer
| Python | apache-2.0 | belatrix/BackendAllStars | from .models import Category, Keyword, Subcategory
from rest_framework import serializers
class KeywordSerializer(serializers.ModelSerializer):
class Meta:
model = Keyword
fields = ('pk', 'name')
class KeywordListSerializer(serializers.ModelSerializer):
class Meta:
model ... | from .models import Category, Keyword, Subcategory
from rest_framework import serializers
class KeywordSerializer(serializers.ModelSerializer):
class Meta:
model = Keyword
fields = ('pk', 'name')
class KeywordListSerializer(serializers.ModelSerializer):
class Meta:
model ... | <commit_before>from .models import Category, Keyword, Subcategory
from rest_framework import serializers
class KeywordSerializer(serializers.ModelSerializer):
class Meta:
model = Keyword
fields = ('pk', 'name')
class KeywordListSerializer(serializers.ModelSerializer):
class Meta:
... | from .models import Category, Keyword, Subcategory
from rest_framework import serializers
class KeywordSerializer(serializers.ModelSerializer):
class Meta:
model = Keyword
fields = ('pk', 'name')
class KeywordListSerializer(serializers.ModelSerializer):
class Meta:
model ... | from .models import Category, Keyword, Subcategory
from rest_framework import serializers
class KeywordSerializer(serializers.ModelSerializer):
class Meta:
model = Keyword
fields = ('pk', 'name')
class KeywordListSerializer(serializers.ModelSerializer):
class Meta:
model ... | <commit_before>from .models import Category, Keyword, Subcategory
from rest_framework import serializers
class KeywordSerializer(serializers.ModelSerializer):
class Meta:
model = Keyword
fields = ('pk', 'name')
class KeywordListSerializer(serializers.ModelSerializer):
class Meta:
... |
8fce8e72f5ff40e51605f3b14bcde5006f4eaa71 | molly/utils/i18n.py | molly/utils/i18n.py | from django.utils.translation import get_language
from django.db.models import Model
from django.conf import settings
try:
from django.utils.translation import override
except ImportError:
from django.utils.translation import activate, deactivate
class override(object):
def __init__(self, language,... | from django.utils.translation import get_language
from django.db.models import Model
from django.conf import settings
from django.core.exceptions import ObjectDoesNotExist
try:
from django.utils.translation import override
except ImportError:
from django.utils.translation import activate, deactivate
class ... | Fix bug in exception handling | Fix bug in exception handling
| Python | apache-2.0 | mollyproject/mollyproject,mollyproject/mollyproject,mollyproject/mollyproject | from django.utils.translation import get_language
from django.db.models import Model
from django.conf import settings
try:
from django.utils.translation import override
except ImportError:
from django.utils.translation import activate, deactivate
class override(object):
def __init__(self, language,... | from django.utils.translation import get_language
from django.db.models import Model
from django.conf import settings
from django.core.exceptions import ObjectDoesNotExist
try:
from django.utils.translation import override
except ImportError:
from django.utils.translation import activate, deactivate
class ... | <commit_before>from django.utils.translation import get_language
from django.db.models import Model
from django.conf import settings
try:
from django.utils.translation import override
except ImportError:
from django.utils.translation import activate, deactivate
class override(object):
def __init__(... | from django.utils.translation import get_language
from django.db.models import Model
from django.conf import settings
from django.core.exceptions import ObjectDoesNotExist
try:
from django.utils.translation import override
except ImportError:
from django.utils.translation import activate, deactivate
class ... | from django.utils.translation import get_language
from django.db.models import Model
from django.conf import settings
try:
from django.utils.translation import override
except ImportError:
from django.utils.translation import activate, deactivate
class override(object):
def __init__(self, language,... | <commit_before>from django.utils.translation import get_language
from django.db.models import Model
from django.conf import settings
try:
from django.utils.translation import override
except ImportError:
from django.utils.translation import activate, deactivate
class override(object):
def __init__(... |
57d95df9147de57be3652e633de394095b0de54f | test/bindertest/testdbconfig.py | test/bindertest/testdbconfig.py |
from binder import Sqlite3Connection
from binder import MysqlConnection
import os
# sqlite3
_bindertest_dir = os.path.dirname( __file__ )
DBFILE = os.path.join(_bindertest_dir, "test.db3")
def connect_sqlite3(read_only=None):
return Sqlite3Connection(DBFILE, read_only)
# MySQL - modify as needed
MYSQL_TESTDB = ... |
from binder import Sqlite3Connection
from binder import MysqlConnection
import os
# sqlite3
_bindertest_dir = os.path.dirname( __file__ )
DBFILE = os.path.join(_bindertest_dir, "test.db3")
def connect_sqlite3(read_only=None):
return Sqlite3Connection(DBFILE, read_only)
# MySQL - modify as needed
MYSQL_TESTDB = ... | Make SQLite the default test setup | Make SQLite the default test setup
| Python | mit | divtxt/binder |
from binder import Sqlite3Connection
from binder import MysqlConnection
import os
# sqlite3
_bindertest_dir = os.path.dirname( __file__ )
DBFILE = os.path.join(_bindertest_dir, "test.db3")
def connect_sqlite3(read_only=None):
return Sqlite3Connection(DBFILE, read_only)
# MySQL - modify as needed
MYSQL_TESTDB = ... |
from binder import Sqlite3Connection
from binder import MysqlConnection
import os
# sqlite3
_bindertest_dir = os.path.dirname( __file__ )
DBFILE = os.path.join(_bindertest_dir, "test.db3")
def connect_sqlite3(read_only=None):
return Sqlite3Connection(DBFILE, read_only)
# MySQL - modify as needed
MYSQL_TESTDB = ... | <commit_before>
from binder import Sqlite3Connection
from binder import MysqlConnection
import os
# sqlite3
_bindertest_dir = os.path.dirname( __file__ )
DBFILE = os.path.join(_bindertest_dir, "test.db3")
def connect_sqlite3(read_only=None):
return Sqlite3Connection(DBFILE, read_only)
# MySQL - modify as needed
... |
from binder import Sqlite3Connection
from binder import MysqlConnection
import os
# sqlite3
_bindertest_dir = os.path.dirname( __file__ )
DBFILE = os.path.join(_bindertest_dir, "test.db3")
def connect_sqlite3(read_only=None):
return Sqlite3Connection(DBFILE, read_only)
# MySQL - modify as needed
MYSQL_TESTDB = ... |
from binder import Sqlite3Connection
from binder import MysqlConnection
import os
# sqlite3
_bindertest_dir = os.path.dirname( __file__ )
DBFILE = os.path.join(_bindertest_dir, "test.db3")
def connect_sqlite3(read_only=None):
return Sqlite3Connection(DBFILE, read_only)
# MySQL - modify as needed
MYSQL_TESTDB = ... | <commit_before>
from binder import Sqlite3Connection
from binder import MysqlConnection
import os
# sqlite3
_bindertest_dir = os.path.dirname( __file__ )
DBFILE = os.path.join(_bindertest_dir, "test.db3")
def connect_sqlite3(read_only=None):
return Sqlite3Connection(DBFILE, read_only)
# MySQL - modify as needed
... |
4148feec637dbc1b6619cd45ed14b4d4fb6f4148 | sequencefinding.py | sequencefinding.py | """Finding a sequence.
Usage: sequencefinding.py NUMBERS...
Arguments:
NUMBERS your sequence of numbers
"""
import docopt
def differences(a):
return [t - s for s, t in zip(a, a[1:])]
def constant_difference(a):
if len(a) <= 1:
return None
if all(a[1] - a[0] == x for x in differences(a))... | """Finding a sequence.
Usage: sequencefinding.py NUMBERS...
Arguments:
NUMBERS your sequence of numbers
"""
import docopt
def differences(a):
return [t - s for s, t in zip(a, a[1:])]
def constant_difference(a):
if len(a) <= 1:
return None
if all(a[1] - a[0] == x for x in differences(a))... | Add fallback message when no sequence was found | Add fallback message when no sequence was found
| Python | mit | joostrijneveld/sequencefinder | """Finding a sequence.
Usage: sequencefinding.py NUMBERS...
Arguments:
NUMBERS your sequence of numbers
"""
import docopt
def differences(a):
return [t - s for s, t in zip(a, a[1:])]
def constant_difference(a):
if len(a) <= 1:
return None
if all(a[1] - a[0] == x for x in differences(a))... | """Finding a sequence.
Usage: sequencefinding.py NUMBERS...
Arguments:
NUMBERS your sequence of numbers
"""
import docopt
def differences(a):
return [t - s for s, t in zip(a, a[1:])]
def constant_difference(a):
if len(a) <= 1:
return None
if all(a[1] - a[0] == x for x in differences(a))... | <commit_before>"""Finding a sequence.
Usage: sequencefinding.py NUMBERS...
Arguments:
NUMBERS your sequence of numbers
"""
import docopt
def differences(a):
return [t - s for s, t in zip(a, a[1:])]
def constant_difference(a):
if len(a) <= 1:
return None
if all(a[1] - a[0] == x for x in ... | """Finding a sequence.
Usage: sequencefinding.py NUMBERS...
Arguments:
NUMBERS your sequence of numbers
"""
import docopt
def differences(a):
return [t - s for s, t in zip(a, a[1:])]
def constant_difference(a):
if len(a) <= 1:
return None
if all(a[1] - a[0] == x for x in differences(a))... | """Finding a sequence.
Usage: sequencefinding.py NUMBERS...
Arguments:
NUMBERS your sequence of numbers
"""
import docopt
def differences(a):
return [t - s for s, t in zip(a, a[1:])]
def constant_difference(a):
if len(a) <= 1:
return None
if all(a[1] - a[0] == x for x in differences(a))... | <commit_before>"""Finding a sequence.
Usage: sequencefinding.py NUMBERS...
Arguments:
NUMBERS your sequence of numbers
"""
import docopt
def differences(a):
return [t - s for s, t in zip(a, a[1:])]
def constant_difference(a):
if len(a) <= 1:
return None
if all(a[1] - a[0] == x for x in ... |
715e304de7a61e4cd14f26afe819d1eeb1d72f2e | server/api/serializers/rides.py | server/api/serializers/rides.py | import requests
from django.conf import settings
from rest_framework import serializers
from rest_framework.validators import UniqueTogetherValidator
from server.api.serializers.chapters import ChapterSerializer
from .riders import RiderSerializer
from server.core.models.rides import Ride, RideRiders
class RideSerial... | import requests
from django.conf import settings
from rest_framework import serializers
from rest_framework.validators import UniqueTogetherValidator
from server.api.serializers.chapters import ChapterSerializer
from .riders import RiderSerializer
from server.core.models.rides import Ride, RideRiders
class RideSerial... | Send RideRegistration id through with api response | Send RideRegistration id through with api response
| Python | mit | Techbikers/techbikers,mwillmott/techbikers,Techbikers/techbikers,mwillmott/techbikers,mwillmott/techbikers,Techbikers/techbikers,Techbikers/techbikers,mwillmott/techbikers | import requests
from django.conf import settings
from rest_framework import serializers
from rest_framework.validators import UniqueTogetherValidator
from server.api.serializers.chapters import ChapterSerializer
from .riders import RiderSerializer
from server.core.models.rides import Ride, RideRiders
class RideSerial... | import requests
from django.conf import settings
from rest_framework import serializers
from rest_framework.validators import UniqueTogetherValidator
from server.api.serializers.chapters import ChapterSerializer
from .riders import RiderSerializer
from server.core.models.rides import Ride, RideRiders
class RideSerial... | <commit_before>import requests
from django.conf import settings
from rest_framework import serializers
from rest_framework.validators import UniqueTogetherValidator
from server.api.serializers.chapters import ChapterSerializer
from .riders import RiderSerializer
from server.core.models.rides import Ride, RideRiders
c... | import requests
from django.conf import settings
from rest_framework import serializers
from rest_framework.validators import UniqueTogetherValidator
from server.api.serializers.chapters import ChapterSerializer
from .riders import RiderSerializer
from server.core.models.rides import Ride, RideRiders
class RideSerial... | import requests
from django.conf import settings
from rest_framework import serializers
from rest_framework.validators import UniqueTogetherValidator
from server.api.serializers.chapters import ChapterSerializer
from .riders import RiderSerializer
from server.core.models.rides import Ride, RideRiders
class RideSerial... | <commit_before>import requests
from django.conf import settings
from rest_framework import serializers
from rest_framework.validators import UniqueTogetherValidator
from server.api.serializers.chapters import ChapterSerializer
from .riders import RiderSerializer
from server.core.models.rides import Ride, RideRiders
c... |
0e8bd8248cc649637b7c392616887c50986427a0 | telethon/__init__.py | telethon/__init__.py | from .client.telegramclient import TelegramClient
from .network import connection
from .tl import types, functions, custom
from .tl.custom import Button
from . import version, events, utils, errors
__version__ = version.__version__
__all__ = [
'TelegramClient', 'Button',
'types', 'functions', 'custom', 'error... | from .client.telegramclient import TelegramClient
from .network import connection
from .tl import types, functions, custom
from .tl.custom import Button
from .tl import patched as _ # import for its side-effects
from . import version, events, utils, errors
__version__ = version.__version__
__all__ = [
'TelegramC... | Fix patched module was never automatically imported | Fix patched module was never automatically imported
Closes #1701. It has to be imported late in the process of
`import telethon` for its side-effects.
| Python | mit | LonamiWebs/Telethon,LonamiWebs/Telethon,LonamiWebs/Telethon,LonamiWebs/Telethon | from .client.telegramclient import TelegramClient
from .network import connection
from .tl import types, functions, custom
from .tl.custom import Button
from . import version, events, utils, errors
__version__ = version.__version__
__all__ = [
'TelegramClient', 'Button',
'types', 'functions', 'custom', 'error... | from .client.telegramclient import TelegramClient
from .network import connection
from .tl import types, functions, custom
from .tl.custom import Button
from .tl import patched as _ # import for its side-effects
from . import version, events, utils, errors
__version__ = version.__version__
__all__ = [
'TelegramC... | <commit_before>from .client.telegramclient import TelegramClient
from .network import connection
from .tl import types, functions, custom
from .tl.custom import Button
from . import version, events, utils, errors
__version__ = version.__version__
__all__ = [
'TelegramClient', 'Button',
'types', 'functions', '... | from .client.telegramclient import TelegramClient
from .network import connection
from .tl import types, functions, custom
from .tl.custom import Button
from .tl import patched as _ # import for its side-effects
from . import version, events, utils, errors
__version__ = version.__version__
__all__ = [
'TelegramC... | from .client.telegramclient import TelegramClient
from .network import connection
from .tl import types, functions, custom
from .tl.custom import Button
from . import version, events, utils, errors
__version__ = version.__version__
__all__ = [
'TelegramClient', 'Button',
'types', 'functions', 'custom', 'error... | <commit_before>from .client.telegramclient import TelegramClient
from .network import connection
from .tl import types, functions, custom
from .tl.custom import Button
from . import version, events, utils, errors
__version__ = version.__version__
__all__ = [
'TelegramClient', 'Button',
'types', 'functions', '... |
2992bb8abc6844c2086ceee59a9b586b5e9a3aff | tests/integration/wheel/key.py | tests/integration/wheel/key.py | # coding: utf-8
# Import Salt Testing libs
from __future__ import absolute_import
import integration
# Import Salt libs
import salt.wheel
class KeyWheelModuleTest(integration.TestCase, integration.AdaptedConfigurationTestCaseMixIn):
def setUp(self):
self.wheel = salt.wheel.Wheel(dict(self.get_config('cl... | # coding: utf-8
# Import Salt Testing libs
from __future__ import absolute_import
import integration
# Import Salt libs
import salt.wheel
class KeyWheelModuleTest(integration.TestCase, integration.AdaptedConfigurationTestCaseMixIn):
def setUp(self):
self.wheel = salt.wheel.Wheel(dict(self.get_config('cl... | Fix args err in wheel test | Fix args err in wheel test
| Python | apache-2.0 | saltstack/salt,saltstack/salt,saltstack/salt,saltstack/salt,saltstack/salt | # coding: utf-8
# Import Salt Testing libs
from __future__ import absolute_import
import integration
# Import Salt libs
import salt.wheel
class KeyWheelModuleTest(integration.TestCase, integration.AdaptedConfigurationTestCaseMixIn):
def setUp(self):
self.wheel = salt.wheel.Wheel(dict(self.get_config('cl... | # coding: utf-8
# Import Salt Testing libs
from __future__ import absolute_import
import integration
# Import Salt libs
import salt.wheel
class KeyWheelModuleTest(integration.TestCase, integration.AdaptedConfigurationTestCaseMixIn):
def setUp(self):
self.wheel = salt.wheel.Wheel(dict(self.get_config('cl... | <commit_before># coding: utf-8
# Import Salt Testing libs
from __future__ import absolute_import
import integration
# Import Salt libs
import salt.wheel
class KeyWheelModuleTest(integration.TestCase, integration.AdaptedConfigurationTestCaseMixIn):
def setUp(self):
self.wheel = salt.wheel.Wheel(dict(self... | # coding: utf-8
# Import Salt Testing libs
from __future__ import absolute_import
import integration
# Import Salt libs
import salt.wheel
class KeyWheelModuleTest(integration.TestCase, integration.AdaptedConfigurationTestCaseMixIn):
def setUp(self):
self.wheel = salt.wheel.Wheel(dict(self.get_config('cl... | # coding: utf-8
# Import Salt Testing libs
from __future__ import absolute_import
import integration
# Import Salt libs
import salt.wheel
class KeyWheelModuleTest(integration.TestCase, integration.AdaptedConfigurationTestCaseMixIn):
def setUp(self):
self.wheel = salt.wheel.Wheel(dict(self.get_config('cl... | <commit_before># coding: utf-8
# Import Salt Testing libs
from __future__ import absolute_import
import integration
# Import Salt libs
import salt.wheel
class KeyWheelModuleTest(integration.TestCase, integration.AdaptedConfigurationTestCaseMixIn):
def setUp(self):
self.wheel = salt.wheel.Wheel(dict(self... |
aec36263dac9037afa0343dcef87ae97530e1ad3 | semanticizest/_semanticizer.py | semanticizest/_semanticizer.py | from collections import defaultdict
import operator
import six
from semanticizest._util import ngrams_with_pos, tosequence
class Semanticizer(object):
def __init__(self, link_count, N=7):
commonness = defaultdict(list)
for (target, anchor), count in six.iteritems(link_count):
common... | from collections import defaultdict
import operator
import six
from semanticizest._util import ngrams_with_pos, tosequence
class Semanticizer(object):
def __init__(self, link_count, N=7):
commonness = defaultdict(list)
for (target, anchor), count in six.iteritems(link_count):
common... | Return commonness instead of raw counts | Return commonness instead of raw counts
| Python | apache-2.0 | semanticize/semanticizest | from collections import defaultdict
import operator
import six
from semanticizest._util import ngrams_with_pos, tosequence
class Semanticizer(object):
def __init__(self, link_count, N=7):
commonness = defaultdict(list)
for (target, anchor), count in six.iteritems(link_count):
common... | from collections import defaultdict
import operator
import six
from semanticizest._util import ngrams_with_pos, tosequence
class Semanticizer(object):
def __init__(self, link_count, N=7):
commonness = defaultdict(list)
for (target, anchor), count in six.iteritems(link_count):
common... | <commit_before>from collections import defaultdict
import operator
import six
from semanticizest._util import ngrams_with_pos, tosequence
class Semanticizer(object):
def __init__(self, link_count, N=7):
commonness = defaultdict(list)
for (target, anchor), count in six.iteritems(link_count):
... | from collections import defaultdict
import operator
import six
from semanticizest._util import ngrams_with_pos, tosequence
class Semanticizer(object):
def __init__(self, link_count, N=7):
commonness = defaultdict(list)
for (target, anchor), count in six.iteritems(link_count):
common... | from collections import defaultdict
import operator
import six
from semanticizest._util import ngrams_with_pos, tosequence
class Semanticizer(object):
def __init__(self, link_count, N=7):
commonness = defaultdict(list)
for (target, anchor), count in six.iteritems(link_count):
common... | <commit_before>from collections import defaultdict
import operator
import six
from semanticizest._util import ngrams_with_pos, tosequence
class Semanticizer(object):
def __init__(self, link_count, N=7):
commonness = defaultdict(list)
for (target, anchor), count in six.iteritems(link_count):
... |
6ba3ae92d1bf72f5076ebf35b2b370cfebb8f390 | tkp/utility/redirect_stream.py | tkp/utility/redirect_stream.py | import os
from tempfile import SpooledTemporaryFile
from contextlib import contextmanager
@contextmanager
def redirect_stream(output_stream, destination):
"""
Redirect anything written to ``output_stream`` (typically ``sys.stdin`` or
``sys.stdout``) to ``destination`` for the duration of this context.
... | import os
from tempfile import SpooledTemporaryFile
from contextlib import contextmanager
@contextmanager
def redirect_stream(output_stream, destination):
"""
Redirect anything written to ``output_stream`` (typically ``sys.stdin`` or
``sys.stdout``) to ``destination`` for the duration of this context.
... | Work around XUnit assumptions about streams. | Work around XUnit assumptions about streams.
Fixes #4735.
| Python | bsd-2-clause | bartscheers/tkp,transientskp/tkp,mkuiack/tkp,transientskp/tkp,bartscheers/tkp,mkuiack/tkp | import os
from tempfile import SpooledTemporaryFile
from contextlib import contextmanager
@contextmanager
def redirect_stream(output_stream, destination):
"""
Redirect anything written to ``output_stream`` (typically ``sys.stdin`` or
``sys.stdout``) to ``destination`` for the duration of this context.
... | import os
from tempfile import SpooledTemporaryFile
from contextlib import contextmanager
@contextmanager
def redirect_stream(output_stream, destination):
"""
Redirect anything written to ``output_stream`` (typically ``sys.stdin`` or
``sys.stdout``) to ``destination`` for the duration of this context.
... | <commit_before>import os
from tempfile import SpooledTemporaryFile
from contextlib import contextmanager
@contextmanager
def redirect_stream(output_stream, destination):
"""
Redirect anything written to ``output_stream`` (typically ``sys.stdin`` or
``sys.stdout``) to ``destination`` for the duration of thi... | import os
from tempfile import SpooledTemporaryFile
from contextlib import contextmanager
@contextmanager
def redirect_stream(output_stream, destination):
"""
Redirect anything written to ``output_stream`` (typically ``sys.stdin`` or
``sys.stdout``) to ``destination`` for the duration of this context.
... | import os
from tempfile import SpooledTemporaryFile
from contextlib import contextmanager
@contextmanager
def redirect_stream(output_stream, destination):
"""
Redirect anything written to ``output_stream`` (typically ``sys.stdin`` or
``sys.stdout``) to ``destination`` for the duration of this context.
... | <commit_before>import os
from tempfile import SpooledTemporaryFile
from contextlib import contextmanager
@contextmanager
def redirect_stream(output_stream, destination):
"""
Redirect anything written to ``output_stream`` (typically ``sys.stdin`` or
``sys.stdout``) to ``destination`` for the duration of thi... |
2d4aebc6f4ce658395304a407de6519c55679029 | matchzoo/engine/base_metric.py | matchzoo/engine/base_metric.py | import abc
class BaseMetric(abc.ABC):
ALIAS = 'base_metric'
@abc.abstractmethod
def __call__(self, y_true, y_pred):
""""""
def __repr__(self):
return self.ALIAS
def parse_metric(metric):
if isinstance(metric, BaseMetric):
return metric
elif isinstance(metric, str):
... | import abc
class BaseMetric(abc.ABC):
ALIAS = 'base_metric'
@abc.abstractmethod
def __call__(self, y_true, y_pred):
""""""
def __repr__(self):
return self.ALIAS
def parse_metric(metric):
if isinstance(metric, BaseMetric):
return metric
elif isinstance(metric, str):
... | Add case insensitive metric parsing | Add case insensitive metric parsing
| Python | apache-2.0 | faneshion/MatchZoo,faneshion/MatchZoo | import abc
class BaseMetric(abc.ABC):
ALIAS = 'base_metric'
@abc.abstractmethod
def __call__(self, y_true, y_pred):
""""""
def __repr__(self):
return self.ALIAS
def parse_metric(metric):
if isinstance(metric, BaseMetric):
return metric
elif isinstance(metric, str):
... | import abc
class BaseMetric(abc.ABC):
ALIAS = 'base_metric'
@abc.abstractmethod
def __call__(self, y_true, y_pred):
""""""
def __repr__(self):
return self.ALIAS
def parse_metric(metric):
if isinstance(metric, BaseMetric):
return metric
elif isinstance(metric, str):
... | <commit_before>import abc
class BaseMetric(abc.ABC):
ALIAS = 'base_metric'
@abc.abstractmethod
def __call__(self, y_true, y_pred):
""""""
def __repr__(self):
return self.ALIAS
def parse_metric(metric):
if isinstance(metric, BaseMetric):
return metric
elif isinstance... | import abc
class BaseMetric(abc.ABC):
ALIAS = 'base_metric'
@abc.abstractmethod
def __call__(self, y_true, y_pred):
""""""
def __repr__(self):
return self.ALIAS
def parse_metric(metric):
if isinstance(metric, BaseMetric):
return metric
elif isinstance(metric, str):
... | import abc
class BaseMetric(abc.ABC):
ALIAS = 'base_metric'
@abc.abstractmethod
def __call__(self, y_true, y_pred):
""""""
def __repr__(self):
return self.ALIAS
def parse_metric(metric):
if isinstance(metric, BaseMetric):
return metric
elif isinstance(metric, str):
... | <commit_before>import abc
class BaseMetric(abc.ABC):
ALIAS = 'base_metric'
@abc.abstractmethod
def __call__(self, y_true, y_pred):
""""""
def __repr__(self):
return self.ALIAS
def parse_metric(metric):
if isinstance(metric, BaseMetric):
return metric
elif isinstance... |
5e6fc0017d6e4c35338455496924616b12d4b9e1 | tests/test_simple.py | tests/test_simple.py | #!/usr/bin/env python3
from nose.tools import eq_
from resumable import rebuild, split
def test_simple():
@rebuild
def function(original):
return split(str.upper)(original)
original = 'hello'
original = function['function'](original)
eq_(original, 'HELLO')
def test_value():
@rebu... | #!/usr/bin/env python3
from nose.tools import eq_
from resumable import rebuild, value
def test_simple():
@rebuild
def function(original):
return value(original.upper())
original = 'hello'
original = function['function'](original)
eq_(original, 'HELLO')
def test_value():
@rebuild... | Revise tests to reflect removed split | Revise tests to reflect removed split
| Python | mit | Mause/resumable | #!/usr/bin/env python3
from nose.tools import eq_
from resumable import rebuild, split
def test_simple():
@rebuild
def function(original):
return split(str.upper)(original)
original = 'hello'
original = function['function'](original)
eq_(original, 'HELLO')
def test_value():
@rebu... | #!/usr/bin/env python3
from nose.tools import eq_
from resumable import rebuild, value
def test_simple():
@rebuild
def function(original):
return value(original.upper())
original = 'hello'
original = function['function'](original)
eq_(original, 'HELLO')
def test_value():
@rebuild... | <commit_before>#!/usr/bin/env python3
from nose.tools import eq_
from resumable import rebuild, split
def test_simple():
@rebuild
def function(original):
return split(str.upper)(original)
original = 'hello'
original = function['function'](original)
eq_(original, 'HELLO')
def test_val... | #!/usr/bin/env python3
from nose.tools import eq_
from resumable import rebuild, value
def test_simple():
@rebuild
def function(original):
return value(original.upper())
original = 'hello'
original = function['function'](original)
eq_(original, 'HELLO')
def test_value():
@rebuild... | #!/usr/bin/env python3
from nose.tools import eq_
from resumable import rebuild, split
def test_simple():
@rebuild
def function(original):
return split(str.upper)(original)
original = 'hello'
original = function['function'](original)
eq_(original, 'HELLO')
def test_value():
@rebu... | <commit_before>#!/usr/bin/env python3
from nose.tools import eq_
from resumable import rebuild, split
def test_simple():
@rebuild
def function(original):
return split(str.upper)(original)
original = 'hello'
original = function['function'](original)
eq_(original, 'HELLO')
def test_val... |
d0d823e8639c8c8c69960a2dc64ce3edfb1a7dcf | halaqat/settings/shaha.py | halaqat/settings/shaha.py | from .base_settings import *
import dj_database_url
import os
ALLOWED_HOSTS = ['shaha-halaqat.herokuapp.com', '0.0.0.0']
db_from_env = dj_database_url.config(conn_max_age=500)
DATABASES['default'].update(db_from_env)
# Static files (CSS, JavaScript, Images)
# https://docs.djangoproject.com/en/1.9/howto/static-files/... | from .base_settings import *
import dj_database_url
import os
ALLOWED_HOSTS = ['shaha-halaqat.herokuapp.com', '0.0.0.0']
db_from_env = dj_database_url.config(conn_max_age=500)
DATABASES['default'].update(db_from_env)
# Static files (CSS, JavaScript, Images)
# https://docs.djangoproject.com/en/1.9/howto/static-files/... | Add cached tempaltes and standard language is Ar | Add cached tempaltes and standard language is Ar
| Python | mit | EmadMokhtar/halaqat,EmadMokhtar/halaqat,EmadMokhtar/halaqat | from .base_settings import *
import dj_database_url
import os
ALLOWED_HOSTS = ['shaha-halaqat.herokuapp.com', '0.0.0.0']
db_from_env = dj_database_url.config(conn_max_age=500)
DATABASES['default'].update(db_from_env)
# Static files (CSS, JavaScript, Images)
# https://docs.djangoproject.com/en/1.9/howto/static-files/... | from .base_settings import *
import dj_database_url
import os
ALLOWED_HOSTS = ['shaha-halaqat.herokuapp.com', '0.0.0.0']
db_from_env = dj_database_url.config(conn_max_age=500)
DATABASES['default'].update(db_from_env)
# Static files (CSS, JavaScript, Images)
# https://docs.djangoproject.com/en/1.9/howto/static-files/... | <commit_before>from .base_settings import *
import dj_database_url
import os
ALLOWED_HOSTS = ['shaha-halaqat.herokuapp.com', '0.0.0.0']
db_from_env = dj_database_url.config(conn_max_age=500)
DATABASES['default'].update(db_from_env)
# Static files (CSS, JavaScript, Images)
# https://docs.djangoproject.com/en/1.9/howt... | from .base_settings import *
import dj_database_url
import os
ALLOWED_HOSTS = ['shaha-halaqat.herokuapp.com', '0.0.0.0']
db_from_env = dj_database_url.config(conn_max_age=500)
DATABASES['default'].update(db_from_env)
# Static files (CSS, JavaScript, Images)
# https://docs.djangoproject.com/en/1.9/howto/static-files/... | from .base_settings import *
import dj_database_url
import os
ALLOWED_HOSTS = ['shaha-halaqat.herokuapp.com', '0.0.0.0']
db_from_env = dj_database_url.config(conn_max_age=500)
DATABASES['default'].update(db_from_env)
# Static files (CSS, JavaScript, Images)
# https://docs.djangoproject.com/en/1.9/howto/static-files/... | <commit_before>from .base_settings import *
import dj_database_url
import os
ALLOWED_HOSTS = ['shaha-halaqat.herokuapp.com', '0.0.0.0']
db_from_env = dj_database_url.config(conn_max_age=500)
DATABASES['default'].update(db_from_env)
# Static files (CSS, JavaScript, Images)
# https://docs.djangoproject.com/en/1.9/howt... |
22c56941d054e083b1d406b1440efd8c0ecc5f11 | tests/test_oai_harvester.py | tests/test_oai_harvester.py | from __future__ import unicode_literals
import httpretty
from scrapi.base import OAIHarvester
from scrapi.linter import RawDocument
from .utils import TEST_OAI_DOC
class TestHarvester(OAIHarvester):
base_url = ''
long_name = 'Test'
short_name = 'test'
url = 'test'
property_list = ['type', 'sour... | from __future__ import unicode_literals
import httpretty
from scrapi.base import OAIHarvester
from scrapi.linter import RawDocument
from .utils import TEST_OAI_DOC
class TestHarvester(OAIHarvester):
base_url = ''
long_name = 'Test'
short_name = 'test'
url = 'test'
property_list = ['type', 'sour... | Add dates to test OAI harvester | Add dates to test OAI harvester
| Python | apache-2.0 | erinspace/scrapi,felliott/scrapi,CenterForOpenScience/scrapi,icereval/scrapi,fabianvf/scrapi,mehanig/scrapi,alexgarciac/scrapi,CenterForOpenScience/scrapi,mehanig/scrapi,felliott/scrapi,jeffreyliu3230/scrapi,ostwald/scrapi,erinspace/scrapi,fabianvf/scrapi | from __future__ import unicode_literals
import httpretty
from scrapi.base import OAIHarvester
from scrapi.linter import RawDocument
from .utils import TEST_OAI_DOC
class TestHarvester(OAIHarvester):
base_url = ''
long_name = 'Test'
short_name = 'test'
url = 'test'
property_list = ['type', 'sour... | from __future__ import unicode_literals
import httpretty
from scrapi.base import OAIHarvester
from scrapi.linter import RawDocument
from .utils import TEST_OAI_DOC
class TestHarvester(OAIHarvester):
base_url = ''
long_name = 'Test'
short_name = 'test'
url = 'test'
property_list = ['type', 'sour... | <commit_before>from __future__ import unicode_literals
import httpretty
from scrapi.base import OAIHarvester
from scrapi.linter import RawDocument
from .utils import TEST_OAI_DOC
class TestHarvester(OAIHarvester):
base_url = ''
long_name = 'Test'
short_name = 'test'
url = 'test'
property_list =... | from __future__ import unicode_literals
import httpretty
from scrapi.base import OAIHarvester
from scrapi.linter import RawDocument
from .utils import TEST_OAI_DOC
class TestHarvester(OAIHarvester):
base_url = ''
long_name = 'Test'
short_name = 'test'
url = 'test'
property_list = ['type', 'sour... | from __future__ import unicode_literals
import httpretty
from scrapi.base import OAIHarvester
from scrapi.linter import RawDocument
from .utils import TEST_OAI_DOC
class TestHarvester(OAIHarvester):
base_url = ''
long_name = 'Test'
short_name = 'test'
url = 'test'
property_list = ['type', 'sour... | <commit_before>from __future__ import unicode_literals
import httpretty
from scrapi.base import OAIHarvester
from scrapi.linter import RawDocument
from .utils import TEST_OAI_DOC
class TestHarvester(OAIHarvester):
base_url = ''
long_name = 'Test'
short_name = 'test'
url = 'test'
property_list =... |
e38f7d46626f96cb033360764c269aa5c69dda76 | moto/sns/utils.py | moto/sns/utils.py | import uuid
def make_arn_for_topic(account_id, name):
return "arn:aws:sns:us-east-1:{}:{}".format(account_id, name)
def make_arn_for_subscription(topic_arn):
subscription_id = uuid.uuid4()
return "{}:{}".format(topic_arn, subscription_id)
| import uuid
def make_arn_for_topic(account_id, name):
return "arn:aws:sns:us-east-1:{0}:{1}".format(account_id, name)
def make_arn_for_subscription(topic_arn):
subscription_id = uuid.uuid4()
return "{0}:{1}".format(topic_arn, subscription_id)
| Fix string formatting for py26 | Fix string formatting for py26
| Python | apache-2.0 | okomestudio/moto,whummer/moto,tootedom/moto,ZuluPro/moto,araines/moto,DataDog/moto,spulec/moto,heddle317/moto,Brett55/moto,andresriancho/moto,im-auld/moto,dbfr3qs/moto,gjtempleton/moto,braintreeps/moto,Brett55/moto,gjtempleton/moto,dbfr3qs/moto,botify-labs/moto,okomestudio/moto,gjtempleton/moto,okomestudio/moto,jrydber... | import uuid
def make_arn_for_topic(account_id, name):
return "arn:aws:sns:us-east-1:{}:{}".format(account_id, name)
def make_arn_for_subscription(topic_arn):
subscription_id = uuid.uuid4()
return "{}:{}".format(topic_arn, subscription_id)
Fix string formatting for py26 | import uuid
def make_arn_for_topic(account_id, name):
return "arn:aws:sns:us-east-1:{0}:{1}".format(account_id, name)
def make_arn_for_subscription(topic_arn):
subscription_id = uuid.uuid4()
return "{0}:{1}".format(topic_arn, subscription_id)
| <commit_before>import uuid
def make_arn_for_topic(account_id, name):
return "arn:aws:sns:us-east-1:{}:{}".format(account_id, name)
def make_arn_for_subscription(topic_arn):
subscription_id = uuid.uuid4()
return "{}:{}".format(topic_arn, subscription_id)
<commit_msg>Fix string formatting for py26<commit_... | import uuid
def make_arn_for_topic(account_id, name):
return "arn:aws:sns:us-east-1:{0}:{1}".format(account_id, name)
def make_arn_for_subscription(topic_arn):
subscription_id = uuid.uuid4()
return "{0}:{1}".format(topic_arn, subscription_id)
| import uuid
def make_arn_for_topic(account_id, name):
return "arn:aws:sns:us-east-1:{}:{}".format(account_id, name)
def make_arn_for_subscription(topic_arn):
subscription_id = uuid.uuid4()
return "{}:{}".format(topic_arn, subscription_id)
Fix string formatting for py26import uuid
def make_arn_for_topi... | <commit_before>import uuid
def make_arn_for_topic(account_id, name):
return "arn:aws:sns:us-east-1:{}:{}".format(account_id, name)
def make_arn_for_subscription(topic_arn):
subscription_id = uuid.uuid4()
return "{}:{}".format(topic_arn, subscription_id)
<commit_msg>Fix string formatting for py26<commit_... |
56879634bda7c6c7024d0b9b4bf77c99e703f4f3 | server.py | server.py | """This module runs the api server."""
import os
from app import flask_app, db
from app.models import User, BucketList, BucketListItem
from flask.ext.script import Manager, Shell
from flask.ext.migrate import Migrate, MigrateCommand
from flask.ext.restful import Resource, Api
from app.api_v1.resources import TestResour... | """This module runs the api server."""
import os
from app import flask_app, db
from app.models import User, BucketList, BucketListItem
from flask.ext.script import Manager, Shell
from flask.ext.migrate import Migrate, MigrateCommand
from flask.ext.restful import Resource, Api
from app.api_v1.resources import TestResour... | Create BucketList & BucketLists endpoints. | [Feature] Create BucketList & BucketLists endpoints.
| Python | mit | andela-akiura/bucketlist | """This module runs the api server."""
import os
from app import flask_app, db
from app.models import User, BucketList, BucketListItem
from flask.ext.script import Manager, Shell
from flask.ext.migrate import Migrate, MigrateCommand
from flask.ext.restful import Resource, Api
from app.api_v1.resources import TestResour... | """This module runs the api server."""
import os
from app import flask_app, db
from app.models import User, BucketList, BucketListItem
from flask.ext.script import Manager, Shell
from flask.ext.migrate import Migrate, MigrateCommand
from flask.ext.restful import Resource, Api
from app.api_v1.resources import TestResour... | <commit_before>"""This module runs the api server."""
import os
from app import flask_app, db
from app.models import User, BucketList, BucketListItem
from flask.ext.script import Manager, Shell
from flask.ext.migrate import Migrate, MigrateCommand
from flask.ext.restful import Resource, Api
from app.api_v1.resources im... | """This module runs the api server."""
import os
from app import flask_app, db
from app.models import User, BucketList, BucketListItem
from flask.ext.script import Manager, Shell
from flask.ext.migrate import Migrate, MigrateCommand
from flask.ext.restful import Resource, Api
from app.api_v1.resources import TestResour... | """This module runs the api server."""
import os
from app import flask_app, db
from app.models import User, BucketList, BucketListItem
from flask.ext.script import Manager, Shell
from flask.ext.migrate import Migrate, MigrateCommand
from flask.ext.restful import Resource, Api
from app.api_v1.resources import TestResour... | <commit_before>"""This module runs the api server."""
import os
from app import flask_app, db
from app.models import User, BucketList, BucketListItem
from flask.ext.script import Manager, Shell
from flask.ext.migrate import Migrate, MigrateCommand
from flask.ext.restful import Resource, Api
from app.api_v1.resources im... |
cbe07cd63d07f021ccd404cba2bcfe2a6933457b | tests/test_misc.py | tests/test_misc.py | # -*- coding: utf-8 -*-
import billboard
import unittest
from nose.tools import raises
from requests.exceptions import ConnectionError
import six
class MiscTest(unittest.TestCase):
@raises(ConnectionError)
def test_timeout(self):
"""Checks that using a very small timeout prevents connection."""
... | # -*- coding: utf-8 -*-
import billboard
import unittest
from nose.tools import raises
from requests.exceptions import ConnectionError
import six
class MiscTest(unittest.TestCase):
@raises(ConnectionError)
def test_timeout(self):
"""Checks that using a very small timeout prevents connection."""
... | Add test for tests function | Add test for tests function
| Python | mit | guoguo12/billboard-charts,guoguo12/billboard-charts | # -*- coding: utf-8 -*-
import billboard
import unittest
from nose.tools import raises
from requests.exceptions import ConnectionError
import six
class MiscTest(unittest.TestCase):
@raises(ConnectionError)
def test_timeout(self):
"""Checks that using a very small timeout prevents connection."""
... | # -*- coding: utf-8 -*-
import billboard
import unittest
from nose.tools import raises
from requests.exceptions import ConnectionError
import six
class MiscTest(unittest.TestCase):
@raises(ConnectionError)
def test_timeout(self):
"""Checks that using a very small timeout prevents connection."""
... | <commit_before># -*- coding: utf-8 -*-
import billboard
import unittest
from nose.tools import raises
from requests.exceptions import ConnectionError
import six
class MiscTest(unittest.TestCase):
@raises(ConnectionError)
def test_timeout(self):
"""Checks that using a very small timeout prevents conne... | # -*- coding: utf-8 -*-
import billboard
import unittest
from nose.tools import raises
from requests.exceptions import ConnectionError
import six
class MiscTest(unittest.TestCase):
@raises(ConnectionError)
def test_timeout(self):
"""Checks that using a very small timeout prevents connection."""
... | # -*- coding: utf-8 -*-
import billboard
import unittest
from nose.tools import raises
from requests.exceptions import ConnectionError
import six
class MiscTest(unittest.TestCase):
@raises(ConnectionError)
def test_timeout(self):
"""Checks that using a very small timeout prevents connection."""
... | <commit_before># -*- coding: utf-8 -*-
import billboard
import unittest
from nose.tools import raises
from requests.exceptions import ConnectionError
import six
class MiscTest(unittest.TestCase):
@raises(ConnectionError)
def test_timeout(self):
"""Checks that using a very small timeout prevents conne... |
efc19658e081dc66e387f8e26c310943eacf21e7 | tqdm/tests/tests_version.py | tqdm/tests/tests_version.py | def test_version():
from tqdm import __version__
assert len(__version__.split('.')) == 4
| def test_version():
from tqdm import __version__
assert 3 <= len(__version__.split('.')) <= 4
| Fix test_version() to support 3 or 4 elements | Fix test_version() to support 3 or 4 elements
Signed-off-by: Stephen L. <bede04c5d6a425d8c5798b0cfa1ed9b901b16a3b@gmail.com>
| Python | mit | lrq3000/tqdm | def test_version():
from tqdm import __version__
assert len(__version__.split('.')) == 4
Fix test_version() to support 3 or 4 elements
Signed-off-by: Stephen L. <bede04c5d6a425d8c5798b0cfa1ed9b901b16a3b@gmail.com> | def test_version():
from tqdm import __version__
assert 3 <= len(__version__.split('.')) <= 4
| <commit_before>def test_version():
from tqdm import __version__
assert len(__version__.split('.')) == 4
<commit_msg>Fix test_version() to support 3 or 4 elements
Signed-off-by: Stephen L. <bede04c5d6a425d8c5798b0cfa1ed9b901b16a3b@gmail.com><commit_after> | def test_version():
from tqdm import __version__
assert 3 <= len(__version__.split('.')) <= 4
| def test_version():
from tqdm import __version__
assert len(__version__.split('.')) == 4
Fix test_version() to support 3 or 4 elements
Signed-off-by: Stephen L. <bede04c5d6a425d8c5798b0cfa1ed9b901b16a3b@gmail.com>def test_version():
from tqdm import __version__
assert 3 <= len(__version__.split('.')) <... | <commit_before>def test_version():
from tqdm import __version__
assert len(__version__.split('.')) == 4
<commit_msg>Fix test_version() to support 3 or 4 elements
Signed-off-by: Stephen L. <bede04c5d6a425d8c5798b0cfa1ed9b901b16a3b@gmail.com><commit_after>def test_version():
from tqdm import __version__
... |
94f1d4af970076005d7271c1e91b8b9a148a018d | painindex/settings/settings_prod.py | painindex/settings/settings_prod.py | import os
from painindex.settings.settings_base import *
# This file is NOT part of our repo. It contains sensitive settings like secret key
# and db setup.
from env import *
DEBUG = False
TEMPLATE_DEBUG = False
# Apps used specifically for production
INSTALLED_APPS += (
'gunicorn',
)
# Configure production ... | import os
import dj_database_url
from painindex.settings.settings_base import *
# This file is NOT part of our repo. It contains sensitive settings like secret key
# and db setup.
from env import *
DEBUG = False
TEMPLATE_DEBUG = False
# Apps used specifically for production
INSTALLED_APPS += (
'gunicorn',
)
# ... | Add basic heroku production settings | Add basic heroku production settings
| Python | mit | xanv/painindex | import os
from painindex.settings.settings_base import *
# This file is NOT part of our repo. It contains sensitive settings like secret key
# and db setup.
from env import *
DEBUG = False
TEMPLATE_DEBUG = False
# Apps used specifically for production
INSTALLED_APPS += (
'gunicorn',
)
# Configure production ... | import os
import dj_database_url
from painindex.settings.settings_base import *
# This file is NOT part of our repo. It contains sensitive settings like secret key
# and db setup.
from env import *
DEBUG = False
TEMPLATE_DEBUG = False
# Apps used specifically for production
INSTALLED_APPS += (
'gunicorn',
)
# ... | <commit_before>import os
from painindex.settings.settings_base import *
# This file is NOT part of our repo. It contains sensitive settings like secret key
# and db setup.
from env import *
DEBUG = False
TEMPLATE_DEBUG = False
# Apps used specifically for production
INSTALLED_APPS += (
'gunicorn',
)
# Config... | import os
import dj_database_url
from painindex.settings.settings_base import *
# This file is NOT part of our repo. It contains sensitive settings like secret key
# and db setup.
from env import *
DEBUG = False
TEMPLATE_DEBUG = False
# Apps used specifically for production
INSTALLED_APPS += (
'gunicorn',
)
# ... | import os
from painindex.settings.settings_base import *
# This file is NOT part of our repo. It contains sensitive settings like secret key
# and db setup.
from env import *
DEBUG = False
TEMPLATE_DEBUG = False
# Apps used specifically for production
INSTALLED_APPS += (
'gunicorn',
)
# Configure production ... | <commit_before>import os
from painindex.settings.settings_base import *
# This file is NOT part of our repo. It contains sensitive settings like secret key
# and db setup.
from env import *
DEBUG = False
TEMPLATE_DEBUG = False
# Apps used specifically for production
INSTALLED_APPS += (
'gunicorn',
)
# Config... |
f50d1834580f0b516035b3a5693b45bf4689bed3 | test/test_rules.py | test/test_rules.py | import unittest
from src import rules
class TestRules(unittest.TestCase):
def test_good_value_1(self):
rules_obj = rules.Rules()
result = rules_obj.convertCharToInt('1')
self.assertEqual(result, 1)
def test_good_value_3(self):
rules_obj = rules.Rules()
result = rules_obj.convertCharToInt('3')
self.asser... | """ Tests for the rules module """
import unittest
from src import rules
class TestRules(unittest.TestCase):
""" Tests for the rules module """
def test_good_value_1(self):
""" Test a known good value"""
rules_obj = rules.Rules()
result = rules_obj.convertCharToInt('1')
self.a... | Add docstrings to rules unit tests | Add docstrings to rules unit tests
| Python | mit | blairck/jaeger | import unittest
from src import rules
class TestRules(unittest.TestCase):
def test_good_value_1(self):
rules_obj = rules.Rules()
result = rules_obj.convertCharToInt('1')
self.assertEqual(result, 1)
def test_good_value_3(self):
rules_obj = rules.Rules()
result = rules_obj.convertCharToInt('3')
self.asser... | """ Tests for the rules module """
import unittest
from src import rules
class TestRules(unittest.TestCase):
""" Tests for the rules module """
def test_good_value_1(self):
""" Test a known good value"""
rules_obj = rules.Rules()
result = rules_obj.convertCharToInt('1')
self.a... | <commit_before>import unittest
from src import rules
class TestRules(unittest.TestCase):
def test_good_value_1(self):
rules_obj = rules.Rules()
result = rules_obj.convertCharToInt('1')
self.assertEqual(result, 1)
def test_good_value_3(self):
rules_obj = rules.Rules()
result = rules_obj.convertCharToInt('3... | """ Tests for the rules module """
import unittest
from src import rules
class TestRules(unittest.TestCase):
""" Tests for the rules module """
def test_good_value_1(self):
""" Test a known good value"""
rules_obj = rules.Rules()
result = rules_obj.convertCharToInt('1')
self.a... | import unittest
from src import rules
class TestRules(unittest.TestCase):
def test_good_value_1(self):
rules_obj = rules.Rules()
result = rules_obj.convertCharToInt('1')
self.assertEqual(result, 1)
def test_good_value_3(self):
rules_obj = rules.Rules()
result = rules_obj.convertCharToInt('3')
self.asser... | <commit_before>import unittest
from src import rules
class TestRules(unittest.TestCase):
def test_good_value_1(self):
rules_obj = rules.Rules()
result = rules_obj.convertCharToInt('1')
self.assertEqual(result, 1)
def test_good_value_3(self):
rules_obj = rules.Rules()
result = rules_obj.convertCharToInt('3... |
476d8663b8b85ca902703eeee697ae5be0eefabb | lc0118_pascal_triangle.py | lc0118_pascal_triangle.py | """Leetcode 118. Pascal's Triangle
Easy
URL: https://leetcode.com/problems/pascals-triangle/
Given a non-negative integer numRows, generate the first numRows of
Pascal's triangle.
In Pascal's triangle, each number is the sum of the two numbers directly
above it.
Example:
Input: 5
Output:
[
[1],
[1,1],
... | """Leetcode 118. Pascal's Triangle
Easy
URL: https://leetcode.com/problems/pascals-triangle/
Given a non-negative integer numRows, generate the first numRows of
Pascal's triangle.
In Pascal's triangle, each number is the sum of the two numbers directly
above it.
Example:
Input: 5
Output:
[
[1],
[1,1],
... | Refactor by using array T | Refactor by using array T
| Python | bsd-2-clause | bowen0701/algorithms_data_structures | """Leetcode 118. Pascal's Triangle
Easy
URL: https://leetcode.com/problems/pascals-triangle/
Given a non-negative integer numRows, generate the first numRows of
Pascal's triangle.
In Pascal's triangle, each number is the sum of the two numbers directly
above it.
Example:
Input: 5
Output:
[
[1],
[1,1],
... | """Leetcode 118. Pascal's Triangle
Easy
URL: https://leetcode.com/problems/pascals-triangle/
Given a non-negative integer numRows, generate the first numRows of
Pascal's triangle.
In Pascal's triangle, each number is the sum of the two numbers directly
above it.
Example:
Input: 5
Output:
[
[1],
[1,1],
... | <commit_before>"""Leetcode 118. Pascal's Triangle
Easy
URL: https://leetcode.com/problems/pascals-triangle/
Given a non-negative integer numRows, generate the first numRows of
Pascal's triangle.
In Pascal's triangle, each number is the sum of the two numbers directly
above it.
Example:
Input: 5
Output:
[
[1]... | """Leetcode 118. Pascal's Triangle
Easy
URL: https://leetcode.com/problems/pascals-triangle/
Given a non-negative integer numRows, generate the first numRows of
Pascal's triangle.
In Pascal's triangle, each number is the sum of the two numbers directly
above it.
Example:
Input: 5
Output:
[
[1],
[1,1],
... | """Leetcode 118. Pascal's Triangle
Easy
URL: https://leetcode.com/problems/pascals-triangle/
Given a non-negative integer numRows, generate the first numRows of
Pascal's triangle.
In Pascal's triangle, each number is the sum of the two numbers directly
above it.
Example:
Input: 5
Output:
[
[1],
[1,1],
... | <commit_before>"""Leetcode 118. Pascal's Triangle
Easy
URL: https://leetcode.com/problems/pascals-triangle/
Given a non-negative integer numRows, generate the first numRows of
Pascal's triangle.
In Pascal's triangle, each number is the sum of the two numbers directly
above it.
Example:
Input: 5
Output:
[
[1]... |
e1f8f0b9e898521b9f25611ec7e6b8ecc8f1af8d | app/lib/json_schema_utils.py | app/lib/json_schema_utils.py | from jsonschema import validate, ValidationError
from flask import current_app
import json
import os
def validate_schema(data, schema_name):
"""
Validate the provided data against the provided JSON schema.
:param data: JSON data to be validated
:param schema_name: Name of the schema
:return:... | from jsonschema import validate, ValidationError
from flask import current_app
import json
import os
def validate_schema(data, schema_name):
"""
Validate the provided data against the provided JSON schema.
:param data: JSON data to be validated
:param schema_name: Name of the schema
:return:... | Fix to validate schema function | Fix to validate schema function
| Python | apache-2.0 | CityOfNewYork/NYCOpenRecords,CityOfNewYork/NYCOpenRecords,CityOfNewYork/NYCOpenRecords,CityOfNewYork/NYCOpenRecords,CityOfNewYork/NYCOpenRecords | from jsonschema import validate, ValidationError
from flask import current_app
import json
import os
def validate_schema(data, schema_name):
"""
Validate the provided data against the provided JSON schema.
:param data: JSON data to be validated
:param schema_name: Name of the schema
:return:... | from jsonschema import validate, ValidationError
from flask import current_app
import json
import os
def validate_schema(data, schema_name):
"""
Validate the provided data against the provided JSON schema.
:param data: JSON data to be validated
:param schema_name: Name of the schema
:return:... | <commit_before>from jsonschema import validate, ValidationError
from flask import current_app
import json
import os
def validate_schema(data, schema_name):
"""
Validate the provided data against the provided JSON schema.
:param data: JSON data to be validated
:param schema_name: Name of the schem... | from jsonschema import validate, ValidationError
from flask import current_app
import json
import os
def validate_schema(data, schema_name):
"""
Validate the provided data against the provided JSON schema.
:param data: JSON data to be validated
:param schema_name: Name of the schema
:return:... | from jsonschema import validate, ValidationError
from flask import current_app
import json
import os
def validate_schema(data, schema_name):
"""
Validate the provided data against the provided JSON schema.
:param data: JSON data to be validated
:param schema_name: Name of the schema
:return:... | <commit_before>from jsonschema import validate, ValidationError
from flask import current_app
import json
import os
def validate_schema(data, schema_name):
"""
Validate the provided data against the provided JSON schema.
:param data: JSON data to be validated
:param schema_name: Name of the schem... |
c7372b1fa7f631fbad6381b8ceeadafa0ec02f36 | kpi/migrations/0020_add_validate_submissions_permission_to_asset.py | kpi/migrations/0020_add_validate_submissions_permission_to_asset.py | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import migrations, models
import jsonfield.fields
class Migration(migrations.Migration):
dependencies = [
('kpi', '0017_assetversion_uid_aliases_20170608'),
]
operations = [
migrations.AlterModelOptions(
... | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import migrations, models
import jsonfield.fields
class Migration(migrations.Migration):
dependencies = [
('kpi', '0019_add_report_custom_field'),
]
operations = [
migrations.AlterModelOptions(
na... | Rename conflicting migration and remove extra | Rename conflicting migration and remove extra
changes autogenerated by `./manage.py makemigrations`
| Python | agpl-3.0 | kobotoolbox/kpi,kobotoolbox/kpi,onaio/kpi,onaio/kpi,onaio/kpi,kobotoolbox/kpi,kobotoolbox/kpi,onaio/kpi,kobotoolbox/kpi | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import migrations, models
import jsonfield.fields
class Migration(migrations.Migration):
dependencies = [
('kpi', '0017_assetversion_uid_aliases_20170608'),
]
operations = [
migrations.AlterModelOptions(
... | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import migrations, models
import jsonfield.fields
class Migration(migrations.Migration):
dependencies = [
('kpi', '0019_add_report_custom_field'),
]
operations = [
migrations.AlterModelOptions(
na... | <commit_before># -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import migrations, models
import jsonfield.fields
class Migration(migrations.Migration):
dependencies = [
('kpi', '0017_assetversion_uid_aliases_20170608'),
]
operations = [
migrations.AlterMod... | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import migrations, models
import jsonfield.fields
class Migration(migrations.Migration):
dependencies = [
('kpi', '0019_add_report_custom_field'),
]
operations = [
migrations.AlterModelOptions(
na... | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import migrations, models
import jsonfield.fields
class Migration(migrations.Migration):
dependencies = [
('kpi', '0017_assetversion_uid_aliases_20170608'),
]
operations = [
migrations.AlterModelOptions(
... | <commit_before># -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import migrations, models
import jsonfield.fields
class Migration(migrations.Migration):
dependencies = [
('kpi', '0017_assetversion_uid_aliases_20170608'),
]
operations = [
migrations.AlterMod... |
f813f72ad02bbf4b8e4ad0b190064879f6c3df3e | toolbox/metrics.py | toolbox/metrics.py | import keras.backend as K
import numpy as np
def psnr(y_true, y_pred):
"""Peak signal-to-noise ratio averaged over samples and channels."""
mse = K.mean(K.square(y_true - y_pred), axis=(1, 2))
return K.mean(20 * K.log(255 / K.sqrt(mse)) / np.log(10))
def ssim(y_true, y_pred):
"""structural similarit... | import keras.backend as K
import numpy as np
def psnr(y_true, y_pred):
"""Peak signal-to-noise ratio averaged over samples."""
mse = K.mean(K.square(y_true - y_pred), axis=(-3, -2, -1))
return K.mean(20 * K.log(255 / K.sqrt(mse)) / np.log(10))
def ssim(y_true, y_pred):
"""structural similarity measu... | Change how PSNR is computed | Change how PSNR is computed
| Python | mit | qobilidop/srcnn,qobilidop/srcnn | import keras.backend as K
import numpy as np
def psnr(y_true, y_pred):
"""Peak signal-to-noise ratio averaged over samples and channels."""
mse = K.mean(K.square(y_true - y_pred), axis=(1, 2))
return K.mean(20 * K.log(255 / K.sqrt(mse)) / np.log(10))
def ssim(y_true, y_pred):
"""structural similarit... | import keras.backend as K
import numpy as np
def psnr(y_true, y_pred):
"""Peak signal-to-noise ratio averaged over samples."""
mse = K.mean(K.square(y_true - y_pred), axis=(-3, -2, -1))
return K.mean(20 * K.log(255 / K.sqrt(mse)) / np.log(10))
def ssim(y_true, y_pred):
"""structural similarity measu... | <commit_before>import keras.backend as K
import numpy as np
def psnr(y_true, y_pred):
"""Peak signal-to-noise ratio averaged over samples and channels."""
mse = K.mean(K.square(y_true - y_pred), axis=(1, 2))
return K.mean(20 * K.log(255 / K.sqrt(mse)) / np.log(10))
def ssim(y_true, y_pred):
"""struc... | import keras.backend as K
import numpy as np
def psnr(y_true, y_pred):
"""Peak signal-to-noise ratio averaged over samples."""
mse = K.mean(K.square(y_true - y_pred), axis=(-3, -2, -1))
return K.mean(20 * K.log(255 / K.sqrt(mse)) / np.log(10))
def ssim(y_true, y_pred):
"""structural similarity measu... | import keras.backend as K
import numpy as np
def psnr(y_true, y_pred):
"""Peak signal-to-noise ratio averaged over samples and channels."""
mse = K.mean(K.square(y_true - y_pred), axis=(1, 2))
return K.mean(20 * K.log(255 / K.sqrt(mse)) / np.log(10))
def ssim(y_true, y_pred):
"""structural similarit... | <commit_before>import keras.backend as K
import numpy as np
def psnr(y_true, y_pred):
"""Peak signal-to-noise ratio averaged over samples and channels."""
mse = K.mean(K.square(y_true - y_pred), axis=(1, 2))
return K.mean(20 * K.log(255 / K.sqrt(mse)) / np.log(10))
def ssim(y_true, y_pred):
"""struc... |
886b064fb22400b1fa8706a740b738ec057d4117 | src/map_manager.py | src/map_manager.py | """
This file contains the code needed for dealing with some of the mappings. Usually a map is just a
dictionary that needs to be loaded inside a variable.
This file carries the function to parse the files and the variables containing the dictionaries
themselves.
"""
import yaml
def load_mapping(filename):
"""
... | """
This file contains the code needed for dealing with some of the mappings. Usually a map is just a
dictionary that needs to be loaded inside a variable.
This file carries the function to parse the files and the variables containing the dictionaries
themselves.
"""
import yaml
def load_mapping(filename):
"""
... | Use safe load for yaml. | Use safe load for yaml.
| Python | mit | danodic/pianopad | """
This file contains the code needed for dealing with some of the mappings. Usually a map is just a
dictionary that needs to be loaded inside a variable.
This file carries the function to parse the files and the variables containing the dictionaries
themselves.
"""
import yaml
def load_mapping(filename):
"""
... | """
This file contains the code needed for dealing with some of the mappings. Usually a map is just a
dictionary that needs to be loaded inside a variable.
This file carries the function to parse the files and the variables containing the dictionaries
themselves.
"""
import yaml
def load_mapping(filename):
"""
... | <commit_before>"""
This file contains the code needed for dealing with some of the mappings. Usually a map is just a
dictionary that needs to be loaded inside a variable.
This file carries the function to parse the files and the variables containing the dictionaries
themselves.
"""
import yaml
def load_mapping(filena... | """
This file contains the code needed for dealing with some of the mappings. Usually a map is just a
dictionary that needs to be loaded inside a variable.
This file carries the function to parse the files and the variables containing the dictionaries
themselves.
"""
import yaml
def load_mapping(filename):
"""
... | """
This file contains the code needed for dealing with some of the mappings. Usually a map is just a
dictionary that needs to be loaded inside a variable.
This file carries the function to parse the files and the variables containing the dictionaries
themselves.
"""
import yaml
def load_mapping(filename):
"""
... | <commit_before>"""
This file contains the code needed for dealing with some of the mappings. Usually a map is just a
dictionary that needs to be loaded inside a variable.
This file carries the function to parse the files and the variables containing the dictionaries
themselves.
"""
import yaml
def load_mapping(filena... |
a14a911ae49d8354f61426cee2925b2a24a9b521 | Alerters/nc.py | Alerters/nc.py | try:
import pync
pync_available = True
except ImportError:
pync_available = False
from .alerter import Alerter
class NotificationCenterAlerter(Alerter):
"""Send alerts to the Mac OS X Notification Center."""
def __init__(self, config_options):
Alerter.__init__(self, config_options)
... | try:
import pync
pync_available = True
except ImportError:
pync_available = False
import platform
from .alerter import Alerter
class NotificationCenterAlerter(Alerter):
"""Send alerts to the Mac OS X Notification Center."""
def __init__(self, config_options):
Alerter.__init__(self, confi... | Add check for running on Mac OS X | Add check for running on Mac OS X
| Python | bsd-3-clause | jamesoff/simplemonitor,jamesoff/simplemonitor,jamesoff/simplemonitor,jamesoff/simplemonitor,jamesoff/simplemonitor | try:
import pync
pync_available = True
except ImportError:
pync_available = False
from .alerter import Alerter
class NotificationCenterAlerter(Alerter):
"""Send alerts to the Mac OS X Notification Center."""
def __init__(self, config_options):
Alerter.__init__(self, config_options)
... | try:
import pync
pync_available = True
except ImportError:
pync_available = False
import platform
from .alerter import Alerter
class NotificationCenterAlerter(Alerter):
"""Send alerts to the Mac OS X Notification Center."""
def __init__(self, config_options):
Alerter.__init__(self, confi... | <commit_before>try:
import pync
pync_available = True
except ImportError:
pync_available = False
from .alerter import Alerter
class NotificationCenterAlerter(Alerter):
"""Send alerts to the Mac OS X Notification Center."""
def __init__(self, config_options):
Alerter.__init__(self, config_... | try:
import pync
pync_available = True
except ImportError:
pync_available = False
import platform
from .alerter import Alerter
class NotificationCenterAlerter(Alerter):
"""Send alerts to the Mac OS X Notification Center."""
def __init__(self, config_options):
Alerter.__init__(self, confi... | try:
import pync
pync_available = True
except ImportError:
pync_available = False
from .alerter import Alerter
class NotificationCenterAlerter(Alerter):
"""Send alerts to the Mac OS X Notification Center."""
def __init__(self, config_options):
Alerter.__init__(self, config_options)
... | <commit_before>try:
import pync
pync_available = True
except ImportError:
pync_available = False
from .alerter import Alerter
class NotificationCenterAlerter(Alerter):
"""Send alerts to the Mac OS X Notification Center."""
def __init__(self, config_options):
Alerter.__init__(self, config_... |
e3c1819b6b5ddec1ff326c3693d48ec8a8b3a834 | fantail/tests/__init__.py | fantail/tests/__init__.py | # This is imported from setup.py and the test script
tests_require = [
'pytest',
'pytest-capturelog',
'pytest-cov',
]
| # This is imported from setup.py and the test script
tests_require = [
'coveralls',
'pytest',
'pytest-capturelog',
'pytest-cov',
]
| Add coveralls to test requirements | Add coveralls to test requirements
| Python | bsd-2-clause | sjkingo/fantail,sjkingo/fantail,sjkingo/fantail | # This is imported from setup.py and the test script
tests_require = [
'pytest',
'pytest-capturelog',
'pytest-cov',
]
Add coveralls to test requirements | # This is imported from setup.py and the test script
tests_require = [
'coveralls',
'pytest',
'pytest-capturelog',
'pytest-cov',
]
| <commit_before># This is imported from setup.py and the test script
tests_require = [
'pytest',
'pytest-capturelog',
'pytest-cov',
]
<commit_msg>Add coveralls to test requirements<commit_after> | # This is imported from setup.py and the test script
tests_require = [
'coveralls',
'pytest',
'pytest-capturelog',
'pytest-cov',
]
| # This is imported from setup.py and the test script
tests_require = [
'pytest',
'pytest-capturelog',
'pytest-cov',
]
Add coveralls to test requirements# This is imported from setup.py and the test script
tests_require = [
'coveralls',
'pytest',
'pytest-capturelog',
'pytest-cov',
]
| <commit_before># This is imported from setup.py and the test script
tests_require = [
'pytest',
'pytest-capturelog',
'pytest-cov',
]
<commit_msg>Add coveralls to test requirements<commit_after># This is imported from setup.py and the test script
tests_require = [
'coveralls',
'pytest',
'pytest-c... |
8dc27ef7eae79992e8db94e580faf7e16c03e949 | scripts/base_interaction.py | scripts/base_interaction.py | #! /usr/bin/env python
import logging
logger = logging.getLogger("robots")
logger.setLevel(logging.DEBUG)
console = logging.StreamHandler()
console.setLevel(logging.DEBUG)
formatter = logging.Formatter('%(asctime)-15s %(name)s: %(levelname)s - %(message)s')
console.setFormatter(formatter)
logger.addHandler(console)
... | #! /usr/bin/env python
import logging
logger = logging.getLogger("robots")
logger.setLevel(logging.DEBUG)
console = logging.StreamHandler()
console.setLevel(logging.DEBUG)
formatter = logging.Formatter('%(asctime)-15s %(name)s: %(levelname)s - %(message)s')
console.setFormatter(formatter)
logger.addHandler(console)
... | Use the 'with' statement to create the PR2 object | Use the 'with' statement to create the PR2 object
| Python | isc | chili-epfl/pyrobots,chili-epfl/pyrobots-nao | #! /usr/bin/env python
import logging
logger = logging.getLogger("robots")
logger.setLevel(logging.DEBUG)
console = logging.StreamHandler()
console.setLevel(logging.DEBUG)
formatter = logging.Formatter('%(asctime)-15s %(name)s: %(levelname)s - %(message)s')
console.setFormatter(formatter)
logger.addHandler(console)
... | #! /usr/bin/env python
import logging
logger = logging.getLogger("robots")
logger.setLevel(logging.DEBUG)
console = logging.StreamHandler()
console.setLevel(logging.DEBUG)
formatter = logging.Formatter('%(asctime)-15s %(name)s: %(levelname)s - %(message)s')
console.setFormatter(formatter)
logger.addHandler(console)
... | <commit_before>#! /usr/bin/env python
import logging
logger = logging.getLogger("robots")
logger.setLevel(logging.DEBUG)
console = logging.StreamHandler()
console.setLevel(logging.DEBUG)
formatter = logging.Formatter('%(asctime)-15s %(name)s: %(levelname)s - %(message)s')
console.setFormatter(formatter)
logger.addHa... | #! /usr/bin/env python
import logging
logger = logging.getLogger("robots")
logger.setLevel(logging.DEBUG)
console = logging.StreamHandler()
console.setLevel(logging.DEBUG)
formatter = logging.Formatter('%(asctime)-15s %(name)s: %(levelname)s - %(message)s')
console.setFormatter(formatter)
logger.addHandler(console)
... | #! /usr/bin/env python
import logging
logger = logging.getLogger("robots")
logger.setLevel(logging.DEBUG)
console = logging.StreamHandler()
console.setLevel(logging.DEBUG)
formatter = logging.Formatter('%(asctime)-15s %(name)s: %(levelname)s - %(message)s')
console.setFormatter(formatter)
logger.addHandler(console)
... | <commit_before>#! /usr/bin/env python
import logging
logger = logging.getLogger("robots")
logger.setLevel(logging.DEBUG)
console = logging.StreamHandler()
console.setLevel(logging.DEBUG)
formatter = logging.Formatter('%(asctime)-15s %(name)s: %(levelname)s - %(message)s')
console.setFormatter(formatter)
logger.addHa... |
319d6cb62c55d4eec124d9872d491aebaaad468a | froide/publicbody/search_indexes.py | froide/publicbody/search_indexes.py | from haystack import indexes
from haystack import site
from publicbody.models import PublicBody
class PublicBodyIndex(indexes.SearchIndex):
text = indexes.CharField(document=True, use_template=True)
name = indexes.CharField(model_attr='name')
geography = indexes.CharField(model_attr='geography')
topi... | from haystack import indexes
from haystack import site
from publicbody.models import PublicBody
class PublicBodyIndex(indexes.SearchIndex):
text = indexes.EdgeNgramField(document=True, use_template=True)
name = indexes.CharField(model_attr='name')
geography = indexes.CharField(model_attr='geography')
... | Make Public Body document search an EdgeNgram Field to improve search | Make Public Body document search an EdgeNgram Field to improve search | Python | mit | ryankanno/froide,stefanw/froide,fin/froide,okfse/froide,LilithWittmann/froide,CodeforHawaii/froide,catcosmo/froide,catcosmo/froide,CodeforHawaii/froide,LilithWittmann/froide,ryankanno/froide,okfse/froide,LilithWittmann/froide,catcosmo/froide,CodeforHawaii/froide,ryankanno/froide,catcosmo/froide,okfse/froide,LilithWittm... | from haystack import indexes
from haystack import site
from publicbody.models import PublicBody
class PublicBodyIndex(indexes.SearchIndex):
text = indexes.CharField(document=True, use_template=True)
name = indexes.CharField(model_attr='name')
geography = indexes.CharField(model_attr='geography')
topi... | from haystack import indexes
from haystack import site
from publicbody.models import PublicBody
class PublicBodyIndex(indexes.SearchIndex):
text = indexes.EdgeNgramField(document=True, use_template=True)
name = indexes.CharField(model_attr='name')
geography = indexes.CharField(model_attr='geography')
... | <commit_before>from haystack import indexes
from haystack import site
from publicbody.models import PublicBody
class PublicBodyIndex(indexes.SearchIndex):
text = indexes.CharField(document=True, use_template=True)
name = indexes.CharField(model_attr='name')
geography = indexes.CharField(model_attr='geogr... | from haystack import indexes
from haystack import site
from publicbody.models import PublicBody
class PublicBodyIndex(indexes.SearchIndex):
text = indexes.EdgeNgramField(document=True, use_template=True)
name = indexes.CharField(model_attr='name')
geography = indexes.CharField(model_attr='geography')
... | from haystack import indexes
from haystack import site
from publicbody.models import PublicBody
class PublicBodyIndex(indexes.SearchIndex):
text = indexes.CharField(document=True, use_template=True)
name = indexes.CharField(model_attr='name')
geography = indexes.CharField(model_attr='geography')
topi... | <commit_before>from haystack import indexes
from haystack import site
from publicbody.models import PublicBody
class PublicBodyIndex(indexes.SearchIndex):
text = indexes.CharField(document=True, use_template=True)
name = indexes.CharField(model_attr='name')
geography = indexes.CharField(model_attr='geogr... |
5556c3c0b4fc55f17de1f3d8d96288746a36775a | src/server/main.py | src/server/main.py | from twisted.internet.task import LoopingCall
from twisted.python import log as twistedLog
from src.shared import config
from src.server.game_state_manager import GameStateManager
from src.server.networking import runServer, ConnectionManager
from src.server.stdio import setupStdio
def main(args):
connections = C... | from twisted.internet import reactor
from twisted.internet.task import LoopingCall
from twisted.python import log as twistedLog
from src.shared import config
from src.server.game_state_manager import GameStateManager
from src.server.networking import runServer, ConnectionManager
from src.server.stdio import setupStdio... | Bring down the server on (some?) uncaught errors. | Bring down the server on (some?) uncaught errors.
I added an errback to the LoopingCall for gameStateManager.tick, so
it'll be called if any exception gets raised out of one of those calls.
The errback just prints a traceback and then brings down the server,
ensuring that other clients get disconnected as well.
This ... | Python | mit | CheeseLord/warts,CheeseLord/warts | from twisted.internet.task import LoopingCall
from twisted.python import log as twistedLog
from src.shared import config
from src.server.game_state_manager import GameStateManager
from src.server.networking import runServer, ConnectionManager
from src.server.stdio import setupStdio
def main(args):
connections = C... | from twisted.internet import reactor
from twisted.internet.task import LoopingCall
from twisted.python import log as twistedLog
from src.shared import config
from src.server.game_state_manager import GameStateManager
from src.server.networking import runServer, ConnectionManager
from src.server.stdio import setupStdio... | <commit_before>from twisted.internet.task import LoopingCall
from twisted.python import log as twistedLog
from src.shared import config
from src.server.game_state_manager import GameStateManager
from src.server.networking import runServer, ConnectionManager
from src.server.stdio import setupStdio
def main(args):
... | from twisted.internet import reactor
from twisted.internet.task import LoopingCall
from twisted.python import log as twistedLog
from src.shared import config
from src.server.game_state_manager import GameStateManager
from src.server.networking import runServer, ConnectionManager
from src.server.stdio import setupStdio... | from twisted.internet.task import LoopingCall
from twisted.python import log as twistedLog
from src.shared import config
from src.server.game_state_manager import GameStateManager
from src.server.networking import runServer, ConnectionManager
from src.server.stdio import setupStdio
def main(args):
connections = C... | <commit_before>from twisted.internet.task import LoopingCall
from twisted.python import log as twistedLog
from src.shared import config
from src.server.game_state_manager import GameStateManager
from src.server.networking import runServer, ConnectionManager
from src.server.stdio import setupStdio
def main(args):
... |
f4f65dd62e5f70a17cecbddf960fa7a0c9699820 | setup.py | setup.py | from setuptools import setup
long_description = '''\
image-diet2 is a Django application for removing unnecessary bytes from image
files. It optimizes images without changing their look or visual quality
("losslessly").
It works on images in JPEG, GIF and PNG formats and will leave others
unchanged. Provides a seeml... | from setuptools import setup
long_description = '''\
image-diet2 is a Django application for removing unnecessary bytes from image
files. It optimizes images without changing their look or visual quality
("losslessly").
It works on images in JPEG, GIF and PNG formats and will leave others
unchanged. Provides a seeml... | Use version 0.9 of pyimagediet | Use version 0.9 of pyimagediet
| Python | mit | samastur/image-diet2 | from setuptools import setup
long_description = '''\
image-diet2 is a Django application for removing unnecessary bytes from image
files. It optimizes images without changing their look or visual quality
("losslessly").
It works on images in JPEG, GIF and PNG formats and will leave others
unchanged. Provides a seeml... | from setuptools import setup
long_description = '''\
image-diet2 is a Django application for removing unnecessary bytes from image
files. It optimizes images without changing their look or visual quality
("losslessly").
It works on images in JPEG, GIF and PNG formats and will leave others
unchanged. Provides a seeml... | <commit_before>from setuptools import setup
long_description = '''\
image-diet2 is a Django application for removing unnecessary bytes from image
files. It optimizes images without changing their look or visual quality
("losslessly").
It works on images in JPEG, GIF and PNG formats and will leave others
unchanged. P... | from setuptools import setup
long_description = '''\
image-diet2 is a Django application for removing unnecessary bytes from image
files. It optimizes images without changing their look or visual quality
("losslessly").
It works on images in JPEG, GIF and PNG formats and will leave others
unchanged. Provides a seeml... | from setuptools import setup
long_description = '''\
image-diet2 is a Django application for removing unnecessary bytes from image
files. It optimizes images without changing their look or visual quality
("losslessly").
It works on images in JPEG, GIF and PNG formats and will leave others
unchanged. Provides a seeml... | <commit_before>from setuptools import setup
long_description = '''\
image-diet2 is a Django application for removing unnecessary bytes from image
files. It optimizes images without changing their look or visual quality
("losslessly").
It works on images in JPEG, GIF and PNG formats and will leave others
unchanged. P... |
443a66e04c18de2653791710b387220bf456380d | setup.py | setup.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import sys
from setuptools import setup, find_packages
with open('README.rst') as readme_file:
readme = readme_file.read()
with open('HISTORY.rst') as history_file:
history = history_file.read()
requirements = [
'pandas',
'numpy',
'raste... | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import sys
from setuptools import setup, find_packages
with open('README.rst') as readme_file:
readme = readme_file.read()s
requirements = [
'pandas',
'numpy',
'rasterio',
'pyyaml'
]
setup(name='niche_vlaanderen',
version... | Fix bug on history file | Fix bug on history file
| Python | mit | johanvdw/niche_vlaanderen | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import sys
from setuptools import setup, find_packages
with open('README.rst') as readme_file:
readme = readme_file.read()
with open('HISTORY.rst') as history_file:
history = history_file.read()
requirements = [
'pandas',
'numpy',
'raste... | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import sys
from setuptools import setup, find_packages
with open('README.rst') as readme_file:
readme = readme_file.read()s
requirements = [
'pandas',
'numpy',
'rasterio',
'pyyaml'
]
setup(name='niche_vlaanderen',
version... | <commit_before>#!/usr/bin/env python
# -*- coding: utf-8 -*-
import sys
from setuptools import setup, find_packages
with open('README.rst') as readme_file:
readme = readme_file.read()
with open('HISTORY.rst') as history_file:
history = history_file.read()
requirements = [
'pandas',
'numpy',... | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import sys
from setuptools import setup, find_packages
with open('README.rst') as readme_file:
readme = readme_file.read()s
requirements = [
'pandas',
'numpy',
'rasterio',
'pyyaml'
]
setup(name='niche_vlaanderen',
version... | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import sys
from setuptools import setup, find_packages
with open('README.rst') as readme_file:
readme = readme_file.read()
with open('HISTORY.rst') as history_file:
history = history_file.read()
requirements = [
'pandas',
'numpy',
'raste... | <commit_before>#!/usr/bin/env python
# -*- coding: utf-8 -*-
import sys
from setuptools import setup, find_packages
with open('README.rst') as readme_file:
readme = readme_file.read()
with open('HISTORY.rst') as history_file:
history = history_file.read()
requirements = [
'pandas',
'numpy',... |
a25e6fb5f9e63ffa30a6c655a6775eead4206bcb | setup.py | setup.py | from distutils.core import setup
import os, glob, string, shutil
# Packages
packages = ['neuroimaging', 'neuroimaging.statistics', 'neuroimaging.image', 'neuroimaging.reference', 'neuroimaging.data', 'neuroimaging.image.formats', 'neuroimaging.image.formats.analyze', 'neuroimaging.fmri', 'neuroimaging.fmri.fmristat',... | import os, glob, string, shutil
from distutils.core import setup
# Packages
packages = ['neuroimaging', 'neuroimaging.statistics', 'neuroimaging.image', 'neuroimaging.reference', 'neuroimaging.data', 'neuroimaging.image.formats', 'neuroimaging.image.formats.analyze', 'neuroimaging.fmri', 'neuroimaging.fmri.fmristat',... | Test edit - to check svn email hook | Test edit - to check svn email hook | Python | bsd-3-clause | gef756/statsmodels,kiyoto/statsmodels,hainm/statsmodels,wdurhamh/statsmodels,detrout/debian-statsmodels,kiyoto/statsmodels,cbmoore/statsmodels,edhuckle/statsmodels,alekz112/statsmodels,hainm/statsmodels,bsipocz/statsmodels,phobson/statsmodels,huongttlan/statsmodels,ChadFulton/statsmodels,wkfwkf/statsmodels,josef-pkt/st... | from distutils.core import setup
import os, glob, string, shutil
# Packages
packages = ['neuroimaging', 'neuroimaging.statistics', 'neuroimaging.image', 'neuroimaging.reference', 'neuroimaging.data', 'neuroimaging.image.formats', 'neuroimaging.image.formats.analyze', 'neuroimaging.fmri', 'neuroimaging.fmri.fmristat',... | import os, glob, string, shutil
from distutils.core import setup
# Packages
packages = ['neuroimaging', 'neuroimaging.statistics', 'neuroimaging.image', 'neuroimaging.reference', 'neuroimaging.data', 'neuroimaging.image.formats', 'neuroimaging.image.formats.analyze', 'neuroimaging.fmri', 'neuroimaging.fmri.fmristat',... | <commit_before>from distutils.core import setup
import os, glob, string, shutil
# Packages
packages = ['neuroimaging', 'neuroimaging.statistics', 'neuroimaging.image', 'neuroimaging.reference', 'neuroimaging.data', 'neuroimaging.image.formats', 'neuroimaging.image.formats.analyze', 'neuroimaging.fmri', 'neuroimaging.... | import os, glob, string, shutil
from distutils.core import setup
# Packages
packages = ['neuroimaging', 'neuroimaging.statistics', 'neuroimaging.image', 'neuroimaging.reference', 'neuroimaging.data', 'neuroimaging.image.formats', 'neuroimaging.image.formats.analyze', 'neuroimaging.fmri', 'neuroimaging.fmri.fmristat',... | from distutils.core import setup
import os, glob, string, shutil
# Packages
packages = ['neuroimaging', 'neuroimaging.statistics', 'neuroimaging.image', 'neuroimaging.reference', 'neuroimaging.data', 'neuroimaging.image.formats', 'neuroimaging.image.formats.analyze', 'neuroimaging.fmri', 'neuroimaging.fmri.fmristat',... | <commit_before>from distutils.core import setup
import os, glob, string, shutil
# Packages
packages = ['neuroimaging', 'neuroimaging.statistics', 'neuroimaging.image', 'neuroimaging.reference', 'neuroimaging.data', 'neuroimaging.image.formats', 'neuroimaging.image.formats.analyze', 'neuroimaging.fmri', 'neuroimaging.... |
2251ef09b75b60268b6d28ff4ec5a04e8eef209f | setup.py | setup.py | #!/usr/bin/env python
from distutils.core import setup
import os
from deflect import __version__ as version
def read_file(filename):
"""
Utility function to read a provided filename.
"""
return open(os.path.join(os.path.dirname(__file__), filename)).read()
packages = [
'deflect',
'deflect.... | #!/usr/bin/env python
from distutils.core import setup
import os
from deflect import __version__ as version
def read_file(filename):
"""
Utility function to read a provided filename.
"""
return open(os.path.join(os.path.dirname(__file__), filename)).read()
packages = [
'deflect',
'deflect.... | Expand trove classifiers and keywords | Expand trove classifiers and keywords
| Python | bsd-3-clause | jbittel/django-deflect | #!/usr/bin/env python
from distutils.core import setup
import os
from deflect import __version__ as version
def read_file(filename):
"""
Utility function to read a provided filename.
"""
return open(os.path.join(os.path.dirname(__file__), filename)).read()
packages = [
'deflect',
'deflect.... | #!/usr/bin/env python
from distutils.core import setup
import os
from deflect import __version__ as version
def read_file(filename):
"""
Utility function to read a provided filename.
"""
return open(os.path.join(os.path.dirname(__file__), filename)).read()
packages = [
'deflect',
'deflect.... | <commit_before>#!/usr/bin/env python
from distutils.core import setup
import os
from deflect import __version__ as version
def read_file(filename):
"""
Utility function to read a provided filename.
"""
return open(os.path.join(os.path.dirname(__file__), filename)).read()
packages = [
'deflect'... | #!/usr/bin/env python
from distutils.core import setup
import os
from deflect import __version__ as version
def read_file(filename):
"""
Utility function to read a provided filename.
"""
return open(os.path.join(os.path.dirname(__file__), filename)).read()
packages = [
'deflect',
'deflect.... | #!/usr/bin/env python
from distutils.core import setup
import os
from deflect import __version__ as version
def read_file(filename):
"""
Utility function to read a provided filename.
"""
return open(os.path.join(os.path.dirname(__file__), filename)).read()
packages = [
'deflect',
'deflect.... | <commit_before>#!/usr/bin/env python
from distutils.core import setup
import os
from deflect import __version__ as version
def read_file(filename):
"""
Utility function to read a provided filename.
"""
return open(os.path.join(os.path.dirname(__file__), filename)).read()
packages = [
'deflect'... |
2cadcdbe2c9226547e95247a228aeec397a0f311 | setup.py | setup.py | import subprocess
import sys
from setuptools import setup, Command
import restle
class PyTest(Command):
user_options = []
def initialize_options(self):
pass
def finalize_options(self):
pass
def run(self):
errno = subprocess.call([sys.executable, 'runtests.py'])
rais... | import subprocess
import sys
from setuptools import setup, Command
import restle
class PyTest(Command):
user_options = []
def initialize_options(self):
pass
def finalize_options(self):
pass
def run(self):
errno = subprocess.call(['py.test', 'test_restle.py'])
raise ... | Use py.test directly instead of through runtests.py | Use py.test directly instead of through runtests.py | Python | bsd-3-clause | consbio/restle | import subprocess
import sys
from setuptools import setup, Command
import restle
class PyTest(Command):
user_options = []
def initialize_options(self):
pass
def finalize_options(self):
pass
def run(self):
errno = subprocess.call([sys.executable, 'runtests.py'])
rais... | import subprocess
import sys
from setuptools import setup, Command
import restle
class PyTest(Command):
user_options = []
def initialize_options(self):
pass
def finalize_options(self):
pass
def run(self):
errno = subprocess.call(['py.test', 'test_restle.py'])
raise ... | <commit_before>import subprocess
import sys
from setuptools import setup, Command
import restle
class PyTest(Command):
user_options = []
def initialize_options(self):
pass
def finalize_options(self):
pass
def run(self):
errno = subprocess.call([sys.executable, 'runtests.py'... | import subprocess
import sys
from setuptools import setup, Command
import restle
class PyTest(Command):
user_options = []
def initialize_options(self):
pass
def finalize_options(self):
pass
def run(self):
errno = subprocess.call(['py.test', 'test_restle.py'])
raise ... | import subprocess
import sys
from setuptools import setup, Command
import restle
class PyTest(Command):
user_options = []
def initialize_options(self):
pass
def finalize_options(self):
pass
def run(self):
errno = subprocess.call([sys.executable, 'runtests.py'])
rais... | <commit_before>import subprocess
import sys
from setuptools import setup, Command
import restle
class PyTest(Command):
user_options = []
def initialize_options(self):
pass
def finalize_options(self):
pass
def run(self):
errno = subprocess.call([sys.executable, 'runtests.py'... |
2fc2a0a216d4d57e8157622c69b59fe566b885a2 | setup.py | setup.py | #!/usr/bin/env python
from __future__ import absolute_import, division, print_function
import os, sys
from setuptools import setup, find_packages
setup(
name='towncrier',
maintainer='Amber Brown',
maintainer_email='hawkowl@twistedmatrix.com',
url="https://github.com/hawkowl/towncrier",
classifie... | #!/usr/bin/env python
from __future__ import absolute_import, division, print_function
import os, sys
from setuptools import setup, find_packages
setup(
name='towncrier',
maintainer='Amber Brown',
maintainer_email='hawkowl@twistedmatrix.com',
url="https://github.com/hawkowl/towncrier",
classifie... | Stop being a legacy owl | Stop being a legacy owl | Python | mit | hawkowl/towncrier | #!/usr/bin/env python
from __future__ import absolute_import, division, print_function
import os, sys
from setuptools import setup, find_packages
setup(
name='towncrier',
maintainer='Amber Brown',
maintainer_email='hawkowl@twistedmatrix.com',
url="https://github.com/hawkowl/towncrier",
classifie... | #!/usr/bin/env python
from __future__ import absolute_import, division, print_function
import os, sys
from setuptools import setup, find_packages
setup(
name='towncrier',
maintainer='Amber Brown',
maintainer_email='hawkowl@twistedmatrix.com',
url="https://github.com/hawkowl/towncrier",
classifie... | <commit_before>#!/usr/bin/env python
from __future__ import absolute_import, division, print_function
import os, sys
from setuptools import setup, find_packages
setup(
name='towncrier',
maintainer='Amber Brown',
maintainer_email='hawkowl@twistedmatrix.com',
url="https://github.com/hawkowl/towncrier"... | #!/usr/bin/env python
from __future__ import absolute_import, division, print_function
import os, sys
from setuptools import setup, find_packages
setup(
name='towncrier',
maintainer='Amber Brown',
maintainer_email='hawkowl@twistedmatrix.com',
url="https://github.com/hawkowl/towncrier",
classifie... | #!/usr/bin/env python
from __future__ import absolute_import, division, print_function
import os, sys
from setuptools import setup, find_packages
setup(
name='towncrier',
maintainer='Amber Brown',
maintainer_email='hawkowl@twistedmatrix.com',
url="https://github.com/hawkowl/towncrier",
classifie... | <commit_before>#!/usr/bin/env python
from __future__ import absolute_import, division, print_function
import os, sys
from setuptools import setup, find_packages
setup(
name='towncrier',
maintainer='Amber Brown',
maintainer_email='hawkowl@twistedmatrix.com',
url="https://github.com/hawkowl/towncrier"... |
9295a2937e4d8dfa031d8153755e25fddf34aac4 | setup.py | setup.py | from setuptools import setup
setup(
name='discord-curious',
version='0.1.1',
packages=['curious', 'curious.http', 'curious.commands', 'curious.dataclasses', 'curious.ext'],
url='https://github.com/SunDwarf/curious',
license='MIT',
author='Laura Dickinson',
author_email='l@veriny.tf',
de... | from setuptools import setup
setup(
name='discord-curious',
version='0.1.1',
packages=['curious', 'curious.http', 'curious.commands', 'curious.dataclasses'],
namespace_packages=['curious.ext'],
url='https://github.com/SunDwarf/curious',
license='MIT',
author='Laura Dickinson',
author_em... | Add `curious.ext` as a namespace package correctly. | Add `curious.ext` as a namespace package correctly.
| Python | mit | SunDwarf/curious | from setuptools import setup
setup(
name='discord-curious',
version='0.1.1',
packages=['curious', 'curious.http', 'curious.commands', 'curious.dataclasses', 'curious.ext'],
url='https://github.com/SunDwarf/curious',
license='MIT',
author='Laura Dickinson',
author_email='l@veriny.tf',
de... | from setuptools import setup
setup(
name='discord-curious',
version='0.1.1',
packages=['curious', 'curious.http', 'curious.commands', 'curious.dataclasses'],
namespace_packages=['curious.ext'],
url='https://github.com/SunDwarf/curious',
license='MIT',
author='Laura Dickinson',
author_em... | <commit_before>from setuptools import setup
setup(
name='discord-curious',
version='0.1.1',
packages=['curious', 'curious.http', 'curious.commands', 'curious.dataclasses', 'curious.ext'],
url='https://github.com/SunDwarf/curious',
license='MIT',
author='Laura Dickinson',
author_email='l@ver... | from setuptools import setup
setup(
name='discord-curious',
version='0.1.1',
packages=['curious', 'curious.http', 'curious.commands', 'curious.dataclasses'],
namespace_packages=['curious.ext'],
url='https://github.com/SunDwarf/curious',
license='MIT',
author='Laura Dickinson',
author_em... | from setuptools import setup
setup(
name='discord-curious',
version='0.1.1',
packages=['curious', 'curious.http', 'curious.commands', 'curious.dataclasses', 'curious.ext'],
url='https://github.com/SunDwarf/curious',
license='MIT',
author='Laura Dickinson',
author_email='l@veriny.tf',
de... | <commit_before>from setuptools import setup
setup(
name='discord-curious',
version='0.1.1',
packages=['curious', 'curious.http', 'curious.commands', 'curious.dataclasses', 'curious.ext'],
url='https://github.com/SunDwarf/curious',
license='MIT',
author='Laura Dickinson',
author_email='l@ver... |
3218ddfbfcc53f21a6985d445a2cccb186f79977 | setup.py | setup.py | from setuptools import setup
files = ["journal_files/*"]
readme = open('README.md','r')
README_TEXT = readme.read()
readme.close()
setup(
name="journalabbrev",
version="0.1.1",
packages=["journalabbrev"],
scripts=["bin/journalabbrev"],
long_description = README_TEXT,
install_requires=["bibtex... | from setuptools import setup
files = ["journal_files/*"]
readme = open('README.md','r')
README_TEXT = readme.read()
readme.close()
setup(
name="journalabbrev",
version="0.1.1",
packages=["journalabbrev"],
scripts=["bin/journalabbrev"],
long_description = README_TEXT,
install_requires=["bibtex... | Update some information for pypi package | Update some information for pypi package
| Python | agpl-3.0 | bibcure/bibcure | from setuptools import setup
files = ["journal_files/*"]
readme = open('README.md','r')
README_TEXT = readme.read()
readme.close()
setup(
name="journalabbrev",
version="0.1.1",
packages=["journalabbrev"],
scripts=["bin/journalabbrev"],
long_description = README_TEXT,
install_requires=["bibtex... | from setuptools import setup
files = ["journal_files/*"]
readme = open('README.md','r')
README_TEXT = readme.read()
readme.close()
setup(
name="journalabbrev",
version="0.1.1",
packages=["journalabbrev"],
scripts=["bin/journalabbrev"],
long_description = README_TEXT,
install_requires=["bibtex... | <commit_before>from setuptools import setup
files = ["journal_files/*"]
readme = open('README.md','r')
README_TEXT = readme.read()
readme.close()
setup(
name="journalabbrev",
version="0.1.1",
packages=["journalabbrev"],
scripts=["bin/journalabbrev"],
long_description = README_TEXT,
install_re... | from setuptools import setup
files = ["journal_files/*"]
readme = open('README.md','r')
README_TEXT = readme.read()
readme.close()
setup(
name="journalabbrev",
version="0.1.1",
packages=["journalabbrev"],
scripts=["bin/journalabbrev"],
long_description = README_TEXT,
install_requires=["bibtex... | from setuptools import setup
files = ["journal_files/*"]
readme = open('README.md','r')
README_TEXT = readme.read()
readme.close()
setup(
name="journalabbrev",
version="0.1.1",
packages=["journalabbrev"],
scripts=["bin/journalabbrev"],
long_description = README_TEXT,
install_requires=["bibtex... | <commit_before>from setuptools import setup
files = ["journal_files/*"]
readme = open('README.md','r')
README_TEXT = readme.read()
readme.close()
setup(
name="journalabbrev",
version="0.1.1",
packages=["journalabbrev"],
scripts=["bin/journalabbrev"],
long_description = README_TEXT,
install_re... |
73da02cc3cc33f287a78f9d7d0c7904058ec8c01 | setup.py | setup.py | from setuptools import setup
setup(
name='nchp',
version='0.1',
description='NGINX based Configurable HTTP Proxy for use with jupyterhub',
url='http://github.com/yuvipanda/jupyterhub-nginx-chp',
author='Yuvi Panda',
author_email='yuvipanda@riseup.net',
license='BSD',
packages=['nchp'],
... | from setuptools import setup
setup(
name='nchp',
version='0.1',
description='NGINX based Configurable HTTP Proxy for use with jupyterhub',
url='http://github.com/yuvipanda/jupyterhub-nginx-chp',
author='Yuvi Panda',
author_email='yuvipanda@riseup.net',
license='BSD',
packages=['nchp'],
... | Make sure that pip will install the template files too | Make sure that pip will install the template files too
| Python | bsd-3-clause | yuvipanda/jupyterhub-nginx-chp | from setuptools import setup
setup(
name='nchp',
version='0.1',
description='NGINX based Configurable HTTP Proxy for use with jupyterhub',
url='http://github.com/yuvipanda/jupyterhub-nginx-chp',
author='Yuvi Panda',
author_email='yuvipanda@riseup.net',
license='BSD',
packages=['nchp'],
... | from setuptools import setup
setup(
name='nchp',
version='0.1',
description='NGINX based Configurable HTTP Proxy for use with jupyterhub',
url='http://github.com/yuvipanda/jupyterhub-nginx-chp',
author='Yuvi Panda',
author_email='yuvipanda@riseup.net',
license='BSD',
packages=['nchp'],
... | <commit_before>from setuptools import setup
setup(
name='nchp',
version='0.1',
description='NGINX based Configurable HTTP Proxy for use with jupyterhub',
url='http://github.com/yuvipanda/jupyterhub-nginx-chp',
author='Yuvi Panda',
author_email='yuvipanda@riseup.net',
license='BSD',
pack... | from setuptools import setup
setup(
name='nchp',
version='0.1',
description='NGINX based Configurable HTTP Proxy for use with jupyterhub',
url='http://github.com/yuvipanda/jupyterhub-nginx-chp',
author='Yuvi Panda',
author_email='yuvipanda@riseup.net',
license='BSD',
packages=['nchp'],
... | from setuptools import setup
setup(
name='nchp',
version='0.1',
description='NGINX based Configurable HTTP Proxy for use with jupyterhub',
url='http://github.com/yuvipanda/jupyterhub-nginx-chp',
author='Yuvi Panda',
author_email='yuvipanda@riseup.net',
license='BSD',
packages=['nchp'],
... | <commit_before>from setuptools import setup
setup(
name='nchp',
version='0.1',
description='NGINX based Configurable HTTP Proxy for use with jupyterhub',
url='http://github.com/yuvipanda/jupyterhub-nginx-chp',
author='Yuvi Panda',
author_email='yuvipanda@riseup.net',
license='BSD',
pack... |
6eba2b16f91b679384503af46bda82233e1f8f65 | setup.py | setup.py | from setuptools import setup
import sys
version = '2.0.0'
if sys.version_info >= (3,):
python_dateutils_version = 'python-dateutil>=2.0'
else:
python_dateutils_version = 'python-dateutil<2.0'
setup(name='pyactiveresource',
version=version,
description='ActiveResource for Python',
author='S... | from setuptools import setup
import sys
version = '2.0.0'
if sys.version_info >= (3,):
python_dateutils_version = 'python-dateutil>=2.0'
else:
python_dateutils_version = 'python-dateutil<2.0'
setup(name='pyactiveresource',
version=version,
description='ActiveResource for Python',
author='S... | Add classifiers to indicate that the package works with python 3. | Add classifiers to indicate that the package works with python 3.
| Python | mit | piran/pyactiveresource,hockeybuggy/pyactiveresource,metric-collective/pyactiveresource,varesa/pyactiveresource | from setuptools import setup
import sys
version = '2.0.0'
if sys.version_info >= (3,):
python_dateutils_version = 'python-dateutil>=2.0'
else:
python_dateutils_version = 'python-dateutil<2.0'
setup(name='pyactiveresource',
version=version,
description='ActiveResource for Python',
author='S... | from setuptools import setup
import sys
version = '2.0.0'
if sys.version_info >= (3,):
python_dateutils_version = 'python-dateutil>=2.0'
else:
python_dateutils_version = 'python-dateutil<2.0'
setup(name='pyactiveresource',
version=version,
description='ActiveResource for Python',
author='S... | <commit_before>from setuptools import setup
import sys
version = '2.0.0'
if sys.version_info >= (3,):
python_dateutils_version = 'python-dateutil>=2.0'
else:
python_dateutils_version = 'python-dateutil<2.0'
setup(name='pyactiveresource',
version=version,
description='ActiveResource for Python',
... | from setuptools import setup
import sys
version = '2.0.0'
if sys.version_info >= (3,):
python_dateutils_version = 'python-dateutil>=2.0'
else:
python_dateutils_version = 'python-dateutil<2.0'
setup(name='pyactiveresource',
version=version,
description='ActiveResource for Python',
author='S... | from setuptools import setup
import sys
version = '2.0.0'
if sys.version_info >= (3,):
python_dateutils_version = 'python-dateutil>=2.0'
else:
python_dateutils_version = 'python-dateutil<2.0'
setup(name='pyactiveresource',
version=version,
description='ActiveResource for Python',
author='S... | <commit_before>from setuptools import setup
import sys
version = '2.0.0'
if sys.version_info >= (3,):
python_dateutils_version = 'python-dateutil>=2.0'
else:
python_dateutils_version = 'python-dateutil<2.0'
setup(name='pyactiveresource',
version=version,
description='ActiveResource for Python',
... |
b8688879de84b405d8c54add3ca793df54e2f39a | bin/finnpos-restore-lemma.py | bin/finnpos-restore-lemma.py | #! /usr/bin/env python3
from sys import stdin
for line in stdin:
line = line.strip()
if line == '':
print('')
else:
wf, feats, lemma, label, ann = line.split('\t')
lemmas = ann
if ann.find(' ') != -1:
lemmas = ann[:ann.find(' ')]
ann = [ann.find(' ... | #! /usr/bin/env python3
from sys import stdin
def part_count(lemma):
return lemma.count('#')
def compile_dict(label_lemma_pairs):
res = {}
for label, lemma in label_lemma_pairs:
if label in res:
old_lemma = res[label]
if part_count(old_lemma) > part_count(lemma):
... | Choose lemma with fewest parts. | Choose lemma with fewest parts.
| Python | apache-2.0 | mpsilfve/FinnPos,mpsilfve/FinnPos,mpsilfve/FinnPos,mpsilfve/FinnPos | #! /usr/bin/env python3
from sys import stdin
for line in stdin:
line = line.strip()
if line == '':
print('')
else:
wf, feats, lemma, label, ann = line.split('\t')
lemmas = ann
if ann.find(' ') != -1:
lemmas = ann[:ann.find(' ')]
ann = [ann.find(' ... | #! /usr/bin/env python3
from sys import stdin
def part_count(lemma):
return lemma.count('#')
def compile_dict(label_lemma_pairs):
res = {}
for label, lemma in label_lemma_pairs:
if label in res:
old_lemma = res[label]
if part_count(old_lemma) > part_count(lemma):
... | <commit_before>#! /usr/bin/env python3
from sys import stdin
for line in stdin:
line = line.strip()
if line == '':
print('')
else:
wf, feats, lemma, label, ann = line.split('\t')
lemmas = ann
if ann.find(' ') != -1:
lemmas = ann[:ann.find(' ')]
ann... | #! /usr/bin/env python3
from sys import stdin
def part_count(lemma):
return lemma.count('#')
def compile_dict(label_lemma_pairs):
res = {}
for label, lemma in label_lemma_pairs:
if label in res:
old_lemma = res[label]
if part_count(old_lemma) > part_count(lemma):
... | #! /usr/bin/env python3
from sys import stdin
for line in stdin:
line = line.strip()
if line == '':
print('')
else:
wf, feats, lemma, label, ann = line.split('\t')
lemmas = ann
if ann.find(' ') != -1:
lemmas = ann[:ann.find(' ')]
ann = [ann.find(' ... | <commit_before>#! /usr/bin/env python3
from sys import stdin
for line in stdin:
line = line.strip()
if line == '':
print('')
else:
wf, feats, lemma, label, ann = line.split('\t')
lemmas = ann
if ann.find(' ') != -1:
lemmas = ann[:ann.find(' ')]
ann... |
f40fca40d5e09d7ae64acab1258f58cea6810662 | setup.py | setup.py | from numpy.distutils.core import setup
from numpy.distutils.misc_util import Configuration
from numpy.distutils.system_info import get_info
from os.path import join
flags = ['-W', '-Wall', '-march=opteron', '-O3']
def configuration(parent_package='', top_path=None):
config = Configuration('scattering', parent_pac... | from numpy.distutils.core import setup
from numpy.distutils.misc_util import Configuration
from numpy.distutils.system_info import get_info
from os.path import join
flags = ['-W', '-Wall', '-march=opteron', '-O3']
def configuration(parent_package='', top_path=None):
config = Configuration('scattering', parent_pac... | Add a version number for scattering. | Add a version number for scattering.
| Python | bsd-2-clause | dopplershift/Scattering | from numpy.distutils.core import setup
from numpy.distutils.misc_util import Configuration
from numpy.distutils.system_info import get_info
from os.path import join
flags = ['-W', '-Wall', '-march=opteron', '-O3']
def configuration(parent_package='', top_path=None):
config = Configuration('scattering', parent_pac... | from numpy.distutils.core import setup
from numpy.distutils.misc_util import Configuration
from numpy.distutils.system_info import get_info
from os.path import join
flags = ['-W', '-Wall', '-march=opteron', '-O3']
def configuration(parent_package='', top_path=None):
config = Configuration('scattering', parent_pac... | <commit_before>from numpy.distutils.core import setup
from numpy.distutils.misc_util import Configuration
from numpy.distutils.system_info import get_info
from os.path import join
flags = ['-W', '-Wall', '-march=opteron', '-O3']
def configuration(parent_package='', top_path=None):
config = Configuration('scatteri... | from numpy.distutils.core import setup
from numpy.distutils.misc_util import Configuration
from numpy.distutils.system_info import get_info
from os.path import join
flags = ['-W', '-Wall', '-march=opteron', '-O3']
def configuration(parent_package='', top_path=None):
config = Configuration('scattering', parent_pac... | from numpy.distutils.core import setup
from numpy.distutils.misc_util import Configuration
from numpy.distutils.system_info import get_info
from os.path import join
flags = ['-W', '-Wall', '-march=opteron', '-O3']
def configuration(parent_package='', top_path=None):
config = Configuration('scattering', parent_pac... | <commit_before>from numpy.distutils.core import setup
from numpy.distutils.misc_util import Configuration
from numpy.distutils.system_info import get_info
from os.path import join
flags = ['-W', '-Wall', '-march=opteron', '-O3']
def configuration(parent_package='', top_path=None):
config = Configuration('scatteri... |
cd05732abb9d8d6c5dbacb5fea0b3bb01d066e0b | setup.py | setup.py | from trakt.version import __version__
from setuptools import setup, find_packages
setup(
name='trakt.py',
version=__version__,
license='MIT',
url='https://github.com/fuzeman/trakt.py',
author='Dean Gardiner',
author_email='me@dgardiner.net',
description='Python interface for the trakt.tv... | from setuptools import setup, find_packages
import os
base_dir = os.path.dirname(__file__)
version = {}
with open(os.path.join(base_dir, "trakt", "version.py")) as f:
exec(f.read(), version)
setup(
name='trakt.py',
version=version['__version__'],
license='MIT',
url='https://github.com/fuzeman/tra... | Read the `__version__` parameter by directly running | Read the `__version__` parameter by directly running [trakt/version.py]
| Python | mit | shad7/trakt.py,fuzeman/trakt.py | from trakt.version import __version__
from setuptools import setup, find_packages
setup(
name='trakt.py',
version=__version__,
license='MIT',
url='https://github.com/fuzeman/trakt.py',
author='Dean Gardiner',
author_email='me@dgardiner.net',
description='Python interface for the trakt.tv... | from setuptools import setup, find_packages
import os
base_dir = os.path.dirname(__file__)
version = {}
with open(os.path.join(base_dir, "trakt", "version.py")) as f:
exec(f.read(), version)
setup(
name='trakt.py',
version=version['__version__'],
license='MIT',
url='https://github.com/fuzeman/tra... | <commit_before>from trakt.version import __version__
from setuptools import setup, find_packages
setup(
name='trakt.py',
version=__version__,
license='MIT',
url='https://github.com/fuzeman/trakt.py',
author='Dean Gardiner',
author_email='me@dgardiner.net',
description='Python interface f... | from setuptools import setup, find_packages
import os
base_dir = os.path.dirname(__file__)
version = {}
with open(os.path.join(base_dir, "trakt", "version.py")) as f:
exec(f.read(), version)
setup(
name='trakt.py',
version=version['__version__'],
license='MIT',
url='https://github.com/fuzeman/tra... | from trakt.version import __version__
from setuptools import setup, find_packages
setup(
name='trakt.py',
version=__version__,
license='MIT',
url='https://github.com/fuzeman/trakt.py',
author='Dean Gardiner',
author_email='me@dgardiner.net',
description='Python interface for the trakt.tv... | <commit_before>from trakt.version import __version__
from setuptools import setup, find_packages
setup(
name='trakt.py',
version=__version__,
license='MIT',
url='https://github.com/fuzeman/trakt.py',
author='Dean Gardiner',
author_email='me@dgardiner.net',
description='Python interface f... |
4ffaf3d689dcb56d61c7e687b9d56e588c6ac9b6 | setup.py | setup.py | from os.path import abspath, dirname, join, normpath
from setuptools import find_packages, setup
setup(
# Basic package information:
name = 'django-twilio',
version = '0.1',
packages = find_packages(),
# Packaging options:
zip_safe = False,
include_package_data = True,
# Package de... | from os.path import abspath, dirname, join, normpath
from setuptools import find_packages, setup
setup(
# Basic package information:
name = 'django-twilio',
version = '0.1',
packages = find_packages(),
# Packaging options:
zip_safe = False,
include_package_data = True,
# Package de... | Revert "Changing our ``coverage`` test dependency to ``django-coverage``." | Revert "Changing our ``coverage`` test dependency to ``django-coverage``."
This reverts commit 68e8555cd2e07c4352ea06121ab262b19b3c2413.
Conflicts:
setup.py
| Python | unlicense | rdegges/django-twilio,aditweb/django-twilio | from os.path import abspath, dirname, join, normpath
from setuptools import find_packages, setup
setup(
# Basic package information:
name = 'django-twilio',
version = '0.1',
packages = find_packages(),
# Packaging options:
zip_safe = False,
include_package_data = True,
# Package de... | from os.path import abspath, dirname, join, normpath
from setuptools import find_packages, setup
setup(
# Basic package information:
name = 'django-twilio',
version = '0.1',
packages = find_packages(),
# Packaging options:
zip_safe = False,
include_package_data = True,
# Package de... | <commit_before>from os.path import abspath, dirname, join, normpath
from setuptools import find_packages, setup
setup(
# Basic package information:
name = 'django-twilio',
version = '0.1',
packages = find_packages(),
# Packaging options:
zip_safe = False,
include_package_data = True,
... | from os.path import abspath, dirname, join, normpath
from setuptools import find_packages, setup
setup(
# Basic package information:
name = 'django-twilio',
version = '0.1',
packages = find_packages(),
# Packaging options:
zip_safe = False,
include_package_data = True,
# Package de... | from os.path import abspath, dirname, join, normpath
from setuptools import find_packages, setup
setup(
# Basic package information:
name = 'django-twilio',
version = '0.1',
packages = find_packages(),
# Packaging options:
zip_safe = False,
include_package_data = True,
# Package de... | <commit_before>from os.path import abspath, dirname, join, normpath
from setuptools import find_packages, setup
setup(
# Basic package information:
name = 'django-twilio',
version = '0.1',
packages = find_packages(),
# Packaging options:
zip_safe = False,
include_package_data = True,
... |
32f6acb989ea5bcf7df1ad1dbc6385c48f443d3e | setup.py | setup.py | from setuptools import setup, find_packages
extras_require = {
'backends': ('peewee', "redis"),
}
setup(
name='huey',
version=__import__('huey').__version__,
description='huey, a little task queue',
author='Charles Leifer',
author_email='coleifer@gmail.com',
url='http://github.com/coleife... | import os
from setuptools import setup, find_packages
with open(os.path.join(os.path.dirname(__file__), 'README.rst')) as fh:
readme = fh.read()
extras_require = {
'backends': ('peewee', "redis"),
}
setup(
name='huey',
version=__import__('huey').__version__,
description='huey, a little task queu... | Add full description to package. | Add full description to package.
| Python | mit | pombredanne/huey,rsalmaso/huey,coleifer/huey | from setuptools import setup, find_packages
extras_require = {
'backends': ('peewee', "redis"),
}
setup(
name='huey',
version=__import__('huey').__version__,
description='huey, a little task queue',
author='Charles Leifer',
author_email='coleifer@gmail.com',
url='http://github.com/coleife... | import os
from setuptools import setup, find_packages
with open(os.path.join(os.path.dirname(__file__), 'README.rst')) as fh:
readme = fh.read()
extras_require = {
'backends': ('peewee', "redis"),
}
setup(
name='huey',
version=__import__('huey').__version__,
description='huey, a little task queu... | <commit_before>from setuptools import setup, find_packages
extras_require = {
'backends': ('peewee', "redis"),
}
setup(
name='huey',
version=__import__('huey').__version__,
description='huey, a little task queue',
author='Charles Leifer',
author_email='coleifer@gmail.com',
url='http://git... | import os
from setuptools import setup, find_packages
with open(os.path.join(os.path.dirname(__file__), 'README.rst')) as fh:
readme = fh.read()
extras_require = {
'backends': ('peewee', "redis"),
}
setup(
name='huey',
version=__import__('huey').__version__,
description='huey, a little task queu... | from setuptools import setup, find_packages
extras_require = {
'backends': ('peewee', "redis"),
}
setup(
name='huey',
version=__import__('huey').__version__,
description='huey, a little task queue',
author='Charles Leifer',
author_email='coleifer@gmail.com',
url='http://github.com/coleife... | <commit_before>from setuptools import setup, find_packages
extras_require = {
'backends': ('peewee', "redis"),
}
setup(
name='huey',
version=__import__('huey').__version__,
description='huey, a little task queue',
author='Charles Leifer',
author_email='coleifer@gmail.com',
url='http://git... |
bc9814efad3050f522ad103603f681b8d74fca5c | setup.py | setup.py | """
Script to install Souma on OsX, Windows, and Unix
Usage:
python setup.py py2app
"""
import ez_setup
ez_setup.use_setuptools()
import sys
from setuptools import setup
APP = ['run.py']
if sys.platform == 'darwin':
extra_options = dict(
setup_requires=['py2app'],
app=APP,
options=di... | """
Script to install Souma on OsX, Windows, and Unix
Usage:
python setup.py py2app
"""
import ez_setup
ez_setup.use_setuptools()
import sys
from setuptools import setup
APP = ['run.py']
if sys.platform == 'darwin':
extra_options = dict(
setup_requires=['py2app'],
app=APP,
options=di... | Create build/dist directories in ./.. | Create build/dist directories in ./..
| Python | apache-2.0 | ciex/souma,ciex/souma,ciex/souma | """
Script to install Souma on OsX, Windows, and Unix
Usage:
python setup.py py2app
"""
import ez_setup
ez_setup.use_setuptools()
import sys
from setuptools import setup
APP = ['run.py']
if sys.platform == 'darwin':
extra_options = dict(
setup_requires=['py2app'],
app=APP,
options=di... | """
Script to install Souma on OsX, Windows, and Unix
Usage:
python setup.py py2app
"""
import ez_setup
ez_setup.use_setuptools()
import sys
from setuptools import setup
APP = ['run.py']
if sys.platform == 'darwin':
extra_options = dict(
setup_requires=['py2app'],
app=APP,
options=di... | <commit_before>"""
Script to install Souma on OsX, Windows, and Unix
Usage:
python setup.py py2app
"""
import ez_setup
ez_setup.use_setuptools()
import sys
from setuptools import setup
APP = ['run.py']
if sys.platform == 'darwin':
extra_options = dict(
setup_requires=['py2app'],
app=APP,
... | """
Script to install Souma on OsX, Windows, and Unix
Usage:
python setup.py py2app
"""
import ez_setup
ez_setup.use_setuptools()
import sys
from setuptools import setup
APP = ['run.py']
if sys.platform == 'darwin':
extra_options = dict(
setup_requires=['py2app'],
app=APP,
options=di... | """
Script to install Souma on OsX, Windows, and Unix
Usage:
python setup.py py2app
"""
import ez_setup
ez_setup.use_setuptools()
import sys
from setuptools import setup
APP = ['run.py']
if sys.platform == 'darwin':
extra_options = dict(
setup_requires=['py2app'],
app=APP,
options=di... | <commit_before>"""
Script to install Souma on OsX, Windows, and Unix
Usage:
python setup.py py2app
"""
import ez_setup
ez_setup.use_setuptools()
import sys
from setuptools import setup
APP = ['run.py']
if sys.platform == 'darwin':
extra_options = dict(
setup_requires=['py2app'],
app=APP,
... |
997bebada0ff6e3f9b9110a4c583ca5ef59238f0 | setup.py | setup.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
try:
from setuptools import setup, find_packages
except ImportError:
from distutils.core import setup, find_packages
readme = open('README.rst').read()
requirements = map(str.strip, open('requirements.txt').readlines())
VERSION = open('VERSION').read().strip()... | #!/usr/bin/env python
# -*- coding: utf-8 -*-
try:
from setuptools import setup, find_packages
except ImportError:
from distutils.core import setup, find_packages
readme = open('README.rst').read()
requirements = open('./requirements.txt', 'r').readlines()
VERSION = open('VERSION').read().strip()
setup(
... | Update the way we fetch requirements, it wasn't resolving dependencies before. | Update the way we fetch requirements, it wasn't resolving dependencies before.
| Python | bsd-3-clause | freshbooks/sqlcop | #!/usr/bin/env python
# -*- coding: utf-8 -*-
try:
from setuptools import setup, find_packages
except ImportError:
from distutils.core import setup, find_packages
readme = open('README.rst').read()
requirements = map(str.strip, open('requirements.txt').readlines())
VERSION = open('VERSION').read().strip()... | #!/usr/bin/env python
# -*- coding: utf-8 -*-
try:
from setuptools import setup, find_packages
except ImportError:
from distutils.core import setup, find_packages
readme = open('README.rst').read()
requirements = open('./requirements.txt', 'r').readlines()
VERSION = open('VERSION').read().strip()
setup(
... | <commit_before>#!/usr/bin/env python
# -*- coding: utf-8 -*-
try:
from setuptools import setup, find_packages
except ImportError:
from distutils.core import setup, find_packages
readme = open('README.rst').read()
requirements = map(str.strip, open('requirements.txt').readlines())
VERSION = open('VERSION')... | #!/usr/bin/env python
# -*- coding: utf-8 -*-
try:
from setuptools import setup, find_packages
except ImportError:
from distutils.core import setup, find_packages
readme = open('README.rst').read()
requirements = open('./requirements.txt', 'r').readlines()
VERSION = open('VERSION').read().strip()
setup(
... | #!/usr/bin/env python
# -*- coding: utf-8 -*-
try:
from setuptools import setup, find_packages
except ImportError:
from distutils.core import setup, find_packages
readme = open('README.rst').read()
requirements = map(str.strip, open('requirements.txt').readlines())
VERSION = open('VERSION').read().strip()... | <commit_before>#!/usr/bin/env python
# -*- coding: utf-8 -*-
try:
from setuptools import setup, find_packages
except ImportError:
from distutils.core import setup, find_packages
readme = open('README.rst').read()
requirements = map(str.strip, open('requirements.txt').readlines())
VERSION = open('VERSION')... |
5e9818c17b94be9c60271e756e7e88aedc63cb7a | setup.py | setup.py | from setuptools import setup, find_packages
setup(
name='akanda-rug',
version='0.1.5',
description='Akanda Router Update Generator manages tenant routers',
author='DreamHost',
author_email='dev-community@dreamhost.com',
url='http://github.com/dreamhost/akanda-rug',
license='BSD',
instal... | from setuptools import setup, find_packages
setup(
name='akanda-rug',
version='0.1.5',
description='Akanda Router Update Generator manages tenant routers',
author='DreamHost',
author_email='dev-community@dreamhost.com',
url='http://github.com/dreamhost/akanda-rug',
license='BSD',
instal... | Exclude test folder from package | Exclude test folder from package
DHC-1102
Ignore the test directory when looking for python packages to
avoid having the files installed
Change-Id: Ia30e821109c0f75f0f0c51bb995b2099aa30e063
Signed-off-by: Rosario Di Somma <73b2fe5f91895aea2b4d0e8942a5edf9f18fa897@dreamhost.com>
| Python | apache-2.0 | dreamhost/akanda-rug,openstack/akanda-rug,markmcclain/astara,stackforge/akanda-rug,stackforge/akanda-rug,openstack/akanda-rug | from setuptools import setup, find_packages
setup(
name='akanda-rug',
version='0.1.5',
description='Akanda Router Update Generator manages tenant routers',
author='DreamHost',
author_email='dev-community@dreamhost.com',
url='http://github.com/dreamhost/akanda-rug',
license='BSD',
instal... | from setuptools import setup, find_packages
setup(
name='akanda-rug',
version='0.1.5',
description='Akanda Router Update Generator manages tenant routers',
author='DreamHost',
author_email='dev-community@dreamhost.com',
url='http://github.com/dreamhost/akanda-rug',
license='BSD',
instal... | <commit_before>from setuptools import setup, find_packages
setup(
name='akanda-rug',
version='0.1.5',
description='Akanda Router Update Generator manages tenant routers',
author='DreamHost',
author_email='dev-community@dreamhost.com',
url='http://github.com/dreamhost/akanda-rug',
license='B... | from setuptools import setup, find_packages
setup(
name='akanda-rug',
version='0.1.5',
description='Akanda Router Update Generator manages tenant routers',
author='DreamHost',
author_email='dev-community@dreamhost.com',
url='http://github.com/dreamhost/akanda-rug',
license='BSD',
instal... | from setuptools import setup, find_packages
setup(
name='akanda-rug',
version='0.1.5',
description='Akanda Router Update Generator manages tenant routers',
author='DreamHost',
author_email='dev-community@dreamhost.com',
url='http://github.com/dreamhost/akanda-rug',
license='BSD',
instal... | <commit_before>from setuptools import setup, find_packages
setup(
name='akanda-rug',
version='0.1.5',
description='Akanda Router Update Generator manages tenant routers',
author='DreamHost',
author_email='dev-community@dreamhost.com',
url='http://github.com/dreamhost/akanda-rug',
license='B... |
6fd8bf7a3113c82c88325dd04fe610ba10049855 | setup.py | setup.py | #!/usr/bin/env python
from distutils.core import setup
long_description = '''
This module allows you to perform IP subnet calculations, there is support
for both IPv4 and IPv6 CIDR notation.
'''
setup(name='ipcalc',
version='0.4',
description='IP subnet calculator',
long_description=long_descriptio... | #!/usr/bin/env python
from distutils.core import setup
setup(name='ipcalc',
version='0.4',
description='IP subnet calculator',
long_description=file('README.rst').read(),
author='Wijnand Modderman',
author_email='python@tehmaze.com',
url='http://dev.tehmaze.com/projects/ipcalc',
... | Read README.rst for the long description | Read README.rst for the long description
| Python | bsd-2-clause | panaceya/ipcalc,tehmaze/ipcalc | #!/usr/bin/env python
from distutils.core import setup
long_description = '''
This module allows you to perform IP subnet calculations, there is support
for both IPv4 and IPv6 CIDR notation.
'''
setup(name='ipcalc',
version='0.4',
description='IP subnet calculator',
long_description=long_descriptio... | #!/usr/bin/env python
from distutils.core import setup
setup(name='ipcalc',
version='0.4',
description='IP subnet calculator',
long_description=file('README.rst').read(),
author='Wijnand Modderman',
author_email='python@tehmaze.com',
url='http://dev.tehmaze.com/projects/ipcalc',
... | <commit_before>#!/usr/bin/env python
from distutils.core import setup
long_description = '''
This module allows you to perform IP subnet calculations, there is support
for both IPv4 and IPv6 CIDR notation.
'''
setup(name='ipcalc',
version='0.4',
description='IP subnet calculator',
long_description=... | #!/usr/bin/env python
from distutils.core import setup
setup(name='ipcalc',
version='0.4',
description='IP subnet calculator',
long_description=file('README.rst').read(),
author='Wijnand Modderman',
author_email='python@tehmaze.com',
url='http://dev.tehmaze.com/projects/ipcalc',
... | #!/usr/bin/env python
from distutils.core import setup
long_description = '''
This module allows you to perform IP subnet calculations, there is support
for both IPv4 and IPv6 CIDR notation.
'''
setup(name='ipcalc',
version='0.4',
description='IP subnet calculator',
long_description=long_descriptio... | <commit_before>#!/usr/bin/env python
from distutils.core import setup
long_description = '''
This module allows you to perform IP subnet calculations, there is support
for both IPv4 and IPv6 CIDR notation.
'''
setup(name='ipcalc',
version='0.4',
description='IP subnet calculator',
long_description=... |
f66a205ad14bdd55011abb2b2e9c821162358e8e | setup.py | setup.py | import wsgi_intercept
from setuptools import setup, find_packages
CLASSIFIERS = """
Environment :: Web Environment
Intended Audience :: Developers
License :: OSI Approved :: MIT License
Operating System :: OS Independent
Programming Language :: Python :: 2
Programming Language :: Python :: 2.6
Programming Language ::... | import wsgi_intercept
from setuptools import setup, find_packages
CLASSIFIERS = """
Environment :: Web Environment
Intended Audience :: Developers
License :: OSI Approved :: MIT License
Operating System :: OS Independent
Programming Language :: Python :: 2
Programming Language :: Python :: 2.6
Programming Language ::... | Add trove classifier for Python 3.4 support | Add trove classifier for Python 3.4 support
| Python | mit | cdent/wsgi-intercept,sileht/python3-wsgi-intercept | import wsgi_intercept
from setuptools import setup, find_packages
CLASSIFIERS = """
Environment :: Web Environment
Intended Audience :: Developers
License :: OSI Approved :: MIT License
Operating System :: OS Independent
Programming Language :: Python :: 2
Programming Language :: Python :: 2.6
Programming Language ::... | import wsgi_intercept
from setuptools import setup, find_packages
CLASSIFIERS = """
Environment :: Web Environment
Intended Audience :: Developers
License :: OSI Approved :: MIT License
Operating System :: OS Independent
Programming Language :: Python :: 2
Programming Language :: Python :: 2.6
Programming Language ::... | <commit_before>import wsgi_intercept
from setuptools import setup, find_packages
CLASSIFIERS = """
Environment :: Web Environment
Intended Audience :: Developers
License :: OSI Approved :: MIT License
Operating System :: OS Independent
Programming Language :: Python :: 2
Programming Language :: Python :: 2.6
Programm... | import wsgi_intercept
from setuptools import setup, find_packages
CLASSIFIERS = """
Environment :: Web Environment
Intended Audience :: Developers
License :: OSI Approved :: MIT License
Operating System :: OS Independent
Programming Language :: Python :: 2
Programming Language :: Python :: 2.6
Programming Language ::... | import wsgi_intercept
from setuptools import setup, find_packages
CLASSIFIERS = """
Environment :: Web Environment
Intended Audience :: Developers
License :: OSI Approved :: MIT License
Operating System :: OS Independent
Programming Language :: Python :: 2
Programming Language :: Python :: 2.6
Programming Language ::... | <commit_before>import wsgi_intercept
from setuptools import setup, find_packages
CLASSIFIERS = """
Environment :: Web Environment
Intended Audience :: Developers
License :: OSI Approved :: MIT License
Operating System :: OS Independent
Programming Language :: Python :: 2
Programming Language :: Python :: 2.6
Programm... |
d38d26d1d613ba9550bb247eaed8af62bbd99d16 | setup.py | setup.py | import subprocess
import sys
from distutils.core import setup, Command
class TestCommand(Command):
user_options = []
def initialize_options(self):
pass
def finalize_options(self):
pass
def run(self):
errno = subprocess.call([sys.executable, 'test_facebook.py'])
raise... | import subprocess
import sys
from distutils.core import setup, Command
class TestCommand(Command):
user_options = []
def initialize_options(self):
pass
def finalize_options(self):
pass
def run(self):
errno = subprocess.call([sys.executable, 'test_facebook.py'])
raise... | Add method for adding users to a custom audience. | Add method for adding users to a custom audience.
| Python | mit | GallopLabs/facebook-ads-api,narrowcast/facebook-ads-api,taenyon/facebook-ads-api | import subprocess
import sys
from distutils.core import setup, Command
class TestCommand(Command):
user_options = []
def initialize_options(self):
pass
def finalize_options(self):
pass
def run(self):
errno = subprocess.call([sys.executable, 'test_facebook.py'])
raise... | import subprocess
import sys
from distutils.core import setup, Command
class TestCommand(Command):
user_options = []
def initialize_options(self):
pass
def finalize_options(self):
pass
def run(self):
errno = subprocess.call([sys.executable, 'test_facebook.py'])
raise... | <commit_before>import subprocess
import sys
from distutils.core import setup, Command
class TestCommand(Command):
user_options = []
def initialize_options(self):
pass
def finalize_options(self):
pass
def run(self):
errno = subprocess.call([sys.executable, 'test_facebook.py']... | import subprocess
import sys
from distutils.core import setup, Command
class TestCommand(Command):
user_options = []
def initialize_options(self):
pass
def finalize_options(self):
pass
def run(self):
errno = subprocess.call([sys.executable, 'test_facebook.py'])
raise... | import subprocess
import sys
from distutils.core import setup, Command
class TestCommand(Command):
user_options = []
def initialize_options(self):
pass
def finalize_options(self):
pass
def run(self):
errno = subprocess.call([sys.executable, 'test_facebook.py'])
raise... | <commit_before>import subprocess
import sys
from distutils.core import setup, Command
class TestCommand(Command):
user_options = []
def initialize_options(self):
pass
def finalize_options(self):
pass
def run(self):
errno = subprocess.call([sys.executable, 'test_facebook.py']... |
de26cffafb9aba0e4981be2bd40617719052b438 | setup.py | setup.py | """
Copyright 2017 BlazeMeter Inc.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software... | """
Copyright 2017 BlazeMeter Inc.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software... | Add long description for PyPI | Add long description for PyPI
| Python | apache-2.0 | Blazemeter/apiritif,Blazemeter/apiritif | """
Copyright 2017 BlazeMeter Inc.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software... | """
Copyright 2017 BlazeMeter Inc.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software... | <commit_before>"""
Copyright 2017 BlazeMeter Inc.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in wr... | """
Copyright 2017 BlazeMeter Inc.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software... | """
Copyright 2017 BlazeMeter Inc.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software... | <commit_before>"""
Copyright 2017 BlazeMeter Inc.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in wr... |
736963683e57256bbcd6e2c7d620f8651946c40a | setup.py | setup.py | from distutils.core import setup
setup(
name='permission',
version='0.2.0',
author='Zhipeng Liu',
author_email='hustlzp@qq.com',
url='https://github.com/hustlzp/permission',
packages=['permission'],
license='MIT',
description='Simple and flexible permission control for Flask app.',
... | from distutils.core import setup
setup(
name='permission',
version='0.2.0',
author='Zhipeng Liu',
author_email='hustlzp@qq.com',
url='https://github.com/hustlzp/permission',
packages=['permission'],
license='MIT',
description='Simple and flexible permission control for Flask app.',
... | Use README.rst instead od README.md for doc. | Use README.rst instead od README.md for doc.
| Python | mit | hustlzp/permission | from distutils.core import setup
setup(
name='permission',
version='0.2.0',
author='Zhipeng Liu',
author_email='hustlzp@qq.com',
url='https://github.com/hustlzp/permission',
packages=['permission'],
license='MIT',
description='Simple and flexible permission control for Flask app.',
... | from distutils.core import setup
setup(
name='permission',
version='0.2.0',
author='Zhipeng Liu',
author_email='hustlzp@qq.com',
url='https://github.com/hustlzp/permission',
packages=['permission'],
license='MIT',
description='Simple and flexible permission control for Flask app.',
... | <commit_before>from distutils.core import setup
setup(
name='permission',
version='0.2.0',
author='Zhipeng Liu',
author_email='hustlzp@qq.com',
url='https://github.com/hustlzp/permission',
packages=['permission'],
license='MIT',
description='Simple and flexible permission control for Fl... | from distutils.core import setup
setup(
name='permission',
version='0.2.0',
author='Zhipeng Liu',
author_email='hustlzp@qq.com',
url='https://github.com/hustlzp/permission',
packages=['permission'],
license='MIT',
description='Simple and flexible permission control for Flask app.',
... | from distutils.core import setup
setup(
name='permission',
version='0.2.0',
author='Zhipeng Liu',
author_email='hustlzp@qq.com',
url='https://github.com/hustlzp/permission',
packages=['permission'],
license='MIT',
description='Simple and flexible permission control for Flask app.',
... | <commit_before>from distutils.core import setup
setup(
name='permission',
version='0.2.0',
author='Zhipeng Liu',
author_email='hustlzp@qq.com',
url='https://github.com/hustlzp/permission',
packages=['permission'],
license='MIT',
description='Simple and flexible permission control for Fl... |
2c5e1c0803675df0f93b62f09eb355b2cd43f907 | setup.py | setup.py | #!/usr/bin/env python
from distutils.core import setup
import os
from setuptools import find_packages
name = 'Mikko Korpela'
# I might be just a little bit too much afraid of those bots..
address = name.lower().replace(' ', '.')+chr(64)+'gmail.com'
setup(name='robotframework-pabot',
version='0.39',
descr... | #!/usr/bin/env python
from distutils.core import setup
import os
from setuptools import find_packages
name = 'Mikko Korpela'
# I might be just a little bit too much afraid of those bots..
address = name.lower().replace(' ', '.')+chr(64)+'gmail.com'
setup(name='robotframework-pabot',
version='0.39',
descr... | Add note about python 3 support | Add note about python 3 support
| Python | apache-2.0 | mkorpela/pabot,mkorpela/pabot | #!/usr/bin/env python
from distutils.core import setup
import os
from setuptools import find_packages
name = 'Mikko Korpela'
# I might be just a little bit too much afraid of those bots..
address = name.lower().replace(' ', '.')+chr(64)+'gmail.com'
setup(name='robotframework-pabot',
version='0.39',
descr... | #!/usr/bin/env python
from distutils.core import setup
import os
from setuptools import find_packages
name = 'Mikko Korpela'
# I might be just a little bit too much afraid of those bots..
address = name.lower().replace(' ', '.')+chr(64)+'gmail.com'
setup(name='robotframework-pabot',
version='0.39',
descr... | <commit_before>#!/usr/bin/env python
from distutils.core import setup
import os
from setuptools import find_packages
name = 'Mikko Korpela'
# I might be just a little bit too much afraid of those bots..
address = name.lower().replace(' ', '.')+chr(64)+'gmail.com'
setup(name='robotframework-pabot',
version='0.3... | #!/usr/bin/env python
from distutils.core import setup
import os
from setuptools import find_packages
name = 'Mikko Korpela'
# I might be just a little bit too much afraid of those bots..
address = name.lower().replace(' ', '.')+chr(64)+'gmail.com'
setup(name='robotframework-pabot',
version='0.39',
descr... | #!/usr/bin/env python
from distutils.core import setup
import os
from setuptools import find_packages
name = 'Mikko Korpela'
# I might be just a little bit too much afraid of those bots..
address = name.lower().replace(' ', '.')+chr(64)+'gmail.com'
setup(name='robotframework-pabot',
version='0.39',
descr... | <commit_before>#!/usr/bin/env python
from distutils.core import setup
import os
from setuptools import find_packages
name = 'Mikko Korpela'
# I might be just a little bit too much afraid of those bots..
address = name.lower().replace(' ', '.')+chr(64)+'gmail.com'
setup(name='robotframework-pabot',
version='0.3... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.