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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
f92674dfa3e7dc5e1f3b8078b138877047cfe85e | feedzilla/compress_settings.py | feedzilla/compress_settings.py | COMPRESS_CSS = {
'common_styles': {
'source_filenames': ('feedzilla/css/reset.css', 'feedzilla/css/style.css'),
'output_filename': 'css/common_styles.r?.css',
}
}
COMPRESS_JS = {
'common_scripts': {
'source_filenames': ('feedzilla/js/jquery.js', 'feedzilla/js/fix_tags.js',
... | COMPRESS_CSS = {
'common_styles': {
'source_filenames': ('feedzilla/css/reset.css', 'feedzilla/css/style.css'),
'output_filename': 'css/common_styles.r?.css',
}
}
COMPRESS_JS = {
'common_scripts': {
'source_filenames': ('feedzilla/js/jquery.js', 'feedzilla/js/fix_tags.js',
... | Fix filename in django-compress settings | Fix filename in django-compress settings
| Python | bsd-3-clause | feedzilla/feedzilla,feedzilla/feedzilla,feedzilla/feedzilla | COMPRESS_CSS = {
'common_styles': {
'source_filenames': ('feedzilla/css/reset.css', 'feedzilla/css/style.css'),
'output_filename': 'css/common_styles.r?.css',
}
}
COMPRESS_JS = {
'common_scripts': {
'source_filenames': ('feedzilla/js/jquery.js', 'feedzilla/js/fix_tags.js',
... | COMPRESS_CSS = {
'common_styles': {
'source_filenames': ('feedzilla/css/reset.css', 'feedzilla/css/style.css'),
'output_filename': 'css/common_styles.r?.css',
}
}
COMPRESS_JS = {
'common_scripts': {
'source_filenames': ('feedzilla/js/jquery.js', 'feedzilla/js/fix_tags.js',
... | <commit_before>COMPRESS_CSS = {
'common_styles': {
'source_filenames': ('feedzilla/css/reset.css', 'feedzilla/css/style.css'),
'output_filename': 'css/common_styles.r?.css',
}
}
COMPRESS_JS = {
'common_scripts': {
'source_filenames': ('feedzilla/js/jquery.js', 'feedzilla/js/fix_tags... | COMPRESS_CSS = {
'common_styles': {
'source_filenames': ('feedzilla/css/reset.css', 'feedzilla/css/style.css'),
'output_filename': 'css/common_styles.r?.css',
}
}
COMPRESS_JS = {
'common_scripts': {
'source_filenames': ('feedzilla/js/jquery.js', 'feedzilla/js/fix_tags.js',
... | COMPRESS_CSS = {
'common_styles': {
'source_filenames': ('feedzilla/css/reset.css', 'feedzilla/css/style.css'),
'output_filename': 'css/common_styles.r?.css',
}
}
COMPRESS_JS = {
'common_scripts': {
'source_filenames': ('feedzilla/js/jquery.js', 'feedzilla/js/fix_tags.js',
... | <commit_before>COMPRESS_CSS = {
'common_styles': {
'source_filenames': ('feedzilla/css/reset.css', 'feedzilla/css/style.css'),
'output_filename': 'css/common_styles.r?.css',
}
}
COMPRESS_JS = {
'common_scripts': {
'source_filenames': ('feedzilla/js/jquery.js', 'feedzilla/js/fix_tags... |
7bb851e54b9cc245259809c828ddbef62239c210 | sensor_mqtt.py | sensor_mqtt.py | #!/usr/bin/env python
import mosquitto
import os
import time
import json
import random
import yaml
# Load config
stream = open("config.yml", 'r')
config = yaml.load(stream)
endpoint = os.environ['MQTT_ENDPOINT']
mypid = os.getpid()
client_uniq = "sensor_mqtt_"+str(mypid)
mqttc = mosquitto.Mosquitto(client_uniq)
mqt... | #!/usr/bin/env python
import mosquitto
import os
import time
import json
import random
import yaml
# Load config
stream = open("config.yml", 'r')
config = yaml.load(stream)
endpoint = os.environ['MQTT_ENDPOINT']
mypid = os.getpid()
client_uniq = "sensor_mqtt_"+str(mypid)
mqttc = mosquitto.Mosquitto(client_uniq)
mqt... | Handle sensors / types that aren't in config file | Handle sensors / types that aren't in config file
| Python | mit | sushack/pi_sensor_mqtt,OxFloodNet/pi_sensor_mqtt | #!/usr/bin/env python
import mosquitto
import os
import time
import json
import random
import yaml
# Load config
stream = open("config.yml", 'r')
config = yaml.load(stream)
endpoint = os.environ['MQTT_ENDPOINT']
mypid = os.getpid()
client_uniq = "sensor_mqtt_"+str(mypid)
mqttc = mosquitto.Mosquitto(client_uniq)
mqt... | #!/usr/bin/env python
import mosquitto
import os
import time
import json
import random
import yaml
# Load config
stream = open("config.yml", 'r')
config = yaml.load(stream)
endpoint = os.environ['MQTT_ENDPOINT']
mypid = os.getpid()
client_uniq = "sensor_mqtt_"+str(mypid)
mqttc = mosquitto.Mosquitto(client_uniq)
mqt... | <commit_before>#!/usr/bin/env python
import mosquitto
import os
import time
import json
import random
import yaml
# Load config
stream = open("config.yml", 'r')
config = yaml.load(stream)
endpoint = os.environ['MQTT_ENDPOINT']
mypid = os.getpid()
client_uniq = "sensor_mqtt_"+str(mypid)
mqttc = mosquitto.Mosquitto(c... | #!/usr/bin/env python
import mosquitto
import os
import time
import json
import random
import yaml
# Load config
stream = open("config.yml", 'r')
config = yaml.load(stream)
endpoint = os.environ['MQTT_ENDPOINT']
mypid = os.getpid()
client_uniq = "sensor_mqtt_"+str(mypid)
mqttc = mosquitto.Mosquitto(client_uniq)
mqt... | #!/usr/bin/env python
import mosquitto
import os
import time
import json
import random
import yaml
# Load config
stream = open("config.yml", 'r')
config = yaml.load(stream)
endpoint = os.environ['MQTT_ENDPOINT']
mypid = os.getpid()
client_uniq = "sensor_mqtt_"+str(mypid)
mqttc = mosquitto.Mosquitto(client_uniq)
mqt... | <commit_before>#!/usr/bin/env python
import mosquitto
import os
import time
import json
import random
import yaml
# Load config
stream = open("config.yml", 'r')
config = yaml.load(stream)
endpoint = os.environ['MQTT_ENDPOINT']
mypid = os.getpid()
client_uniq = "sensor_mqtt_"+str(mypid)
mqttc = mosquitto.Mosquitto(c... |
727702d6d5cf8d43ac9c4f8011ff2b6d78cfbe4c | account_constraints/model/account_move.py | account_constraints/model/account_move.py | # -*- coding: utf-8 -*-
##############################################################################
#
# Author Joel Grand-Guillaume. Copyright 2012 Camptocamp SA
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# pub... | # -*- coding: utf-8 -*-
##############################################################################
#
# Author Joel Grand-Guillaume. Copyright 2012 Camptocamp SA
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# pub... | Use constraint decorator on account_constraints+ | [IMP] Use constraint decorator on account_constraints+
| Python | agpl-3.0 | pedrobaeza/account-financial-tools,VitalPet/account-financial-tools,amoya-dx/account-financial-tools,VitalPet/account-financial-tools,credativUK/account-financial-tools,lepistone/account-financial-tools,damdam-s/account-financial-tools,acsone/account-financial-tools,Pexego/account-financial-tools,raycarnes/account-fina... | # -*- coding: utf-8 -*-
##############################################################################
#
# Author Joel Grand-Guillaume. Copyright 2012 Camptocamp SA
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# pub... | # -*- coding: utf-8 -*-
##############################################################################
#
# Author Joel Grand-Guillaume. Copyright 2012 Camptocamp SA
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# pub... | <commit_before># -*- coding: utf-8 -*-
##############################################################################
#
# Author Joel Grand-Guillaume. Copyright 2012 Camptocamp SA
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public Lice... | # -*- coding: utf-8 -*-
##############################################################################
#
# Author Joel Grand-Guillaume. Copyright 2012 Camptocamp SA
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# pub... | # -*- coding: utf-8 -*-
##############################################################################
#
# Author Joel Grand-Guillaume. Copyright 2012 Camptocamp SA
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# pub... | <commit_before># -*- coding: utf-8 -*-
##############################################################################
#
# Author Joel Grand-Guillaume. Copyright 2012 Camptocamp SA
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public Lice... |
5a0659ed9e4f8085009c04ade4f66cbd5d3c94bd | openedx/core/djangoapps/user_api/accounts/permissions.py | openedx/core/djangoapps/user_api/accounts/permissions.py | """
Permissions classes for User accounts API views.
"""
from __future__ import unicode_literals
from rest_framework import permissions
USERNAME_REPLACEMENT_GROUP = "username_replacement_admin"
class CanDeactivateUser(permissions.BasePermission):
"""
Grants access to AccountDeactivationView if the requesting... | """
Permissions classes for User accounts API views.
"""
from __future__ import unicode_literals
from django.conf import settings
from rest_framework import permissions
USERNAME_REPLACEMENT_GROUP = "username_replacement_admin"
class CanDeactivateUser(permissions.BasePermission):
"""
Grants access to AccountD... | Replace group with static username | Replace group with static username
| Python | agpl-3.0 | appsembler/edx-platform,stvstnfrd/edx-platform,msegado/edx-platform,edx-solutions/edx-platform,eduNEXT/edx-platform,eduNEXT/edunext-platform,eduNEXT/edx-platform,mitocw/edx-platform,msegado/edx-platform,eduNEXT/edx-platform,ESOedX/edx-platform,cpennington/edx-platform,stvstnfrd/edx-platform,jolyonb/edx-platform,eduNEXT... | """
Permissions classes for User accounts API views.
"""
from __future__ import unicode_literals
from rest_framework import permissions
USERNAME_REPLACEMENT_GROUP = "username_replacement_admin"
class CanDeactivateUser(permissions.BasePermission):
"""
Grants access to AccountDeactivationView if the requesting... | """
Permissions classes for User accounts API views.
"""
from __future__ import unicode_literals
from django.conf import settings
from rest_framework import permissions
USERNAME_REPLACEMENT_GROUP = "username_replacement_admin"
class CanDeactivateUser(permissions.BasePermission):
"""
Grants access to AccountD... | <commit_before>"""
Permissions classes for User accounts API views.
"""
from __future__ import unicode_literals
from rest_framework import permissions
USERNAME_REPLACEMENT_GROUP = "username_replacement_admin"
class CanDeactivateUser(permissions.BasePermission):
"""
Grants access to AccountDeactivationView if... | """
Permissions classes for User accounts API views.
"""
from __future__ import unicode_literals
from django.conf import settings
from rest_framework import permissions
USERNAME_REPLACEMENT_GROUP = "username_replacement_admin"
class CanDeactivateUser(permissions.BasePermission):
"""
Grants access to AccountD... | """
Permissions classes for User accounts API views.
"""
from __future__ import unicode_literals
from rest_framework import permissions
USERNAME_REPLACEMENT_GROUP = "username_replacement_admin"
class CanDeactivateUser(permissions.BasePermission):
"""
Grants access to AccountDeactivationView if the requesting... | <commit_before>"""
Permissions classes for User accounts API views.
"""
from __future__ import unicode_literals
from rest_framework import permissions
USERNAME_REPLACEMENT_GROUP = "username_replacement_admin"
class CanDeactivateUser(permissions.BasePermission):
"""
Grants access to AccountDeactivationView if... |
e3185bd059becaf83aaeed9951f695db4ac32511 | schema/remind.py | schema/remind.py | from asyncqlio.orm.schema.column import Column
from asyncqlio.orm.schema.table import table_base
from asyncqlio.orm.schema.types import BigInt, Serial, Text, Timestamp
Table = table_base()
class Reminder(Table): # type: ignore
id = Column(Serial, primary_key=True)
guild_id = Column(BigInt)
channel_id = ... | from asyncqlio.orm.schema.column import Column
from asyncqlio.orm.schema.table import table_base
from asyncqlio.orm.schema.types import BigInt, Serial, Text, Timestamp
Table = table_base()
class Reminder(Table): # type: ignore
id = Column(Serial, primary_key=True)
guild_id = Column(BigInt)
channel_id = ... | Allow topic to be nullable in schema | Allow topic to be nullable in schema
| Python | mit | BeatButton/beattie-bot,BeatButton/beattie | from asyncqlio.orm.schema.column import Column
from asyncqlio.orm.schema.table import table_base
from asyncqlio.orm.schema.types import BigInt, Serial, Text, Timestamp
Table = table_base()
class Reminder(Table): # type: ignore
id = Column(Serial, primary_key=True)
guild_id = Column(BigInt)
channel_id = ... | from asyncqlio.orm.schema.column import Column
from asyncqlio.orm.schema.table import table_base
from asyncqlio.orm.schema.types import BigInt, Serial, Text, Timestamp
Table = table_base()
class Reminder(Table): # type: ignore
id = Column(Serial, primary_key=True)
guild_id = Column(BigInt)
channel_id = ... | <commit_before>from asyncqlio.orm.schema.column import Column
from asyncqlio.orm.schema.table import table_base
from asyncqlio.orm.schema.types import BigInt, Serial, Text, Timestamp
Table = table_base()
class Reminder(Table): # type: ignore
id = Column(Serial, primary_key=True)
guild_id = Column(BigInt)
... | from asyncqlio.orm.schema.column import Column
from asyncqlio.orm.schema.table import table_base
from asyncqlio.orm.schema.types import BigInt, Serial, Text, Timestamp
Table = table_base()
class Reminder(Table): # type: ignore
id = Column(Serial, primary_key=True)
guild_id = Column(BigInt)
channel_id = ... | from asyncqlio.orm.schema.column import Column
from asyncqlio.orm.schema.table import table_base
from asyncqlio.orm.schema.types import BigInt, Serial, Text, Timestamp
Table = table_base()
class Reminder(Table): # type: ignore
id = Column(Serial, primary_key=True)
guild_id = Column(BigInt)
channel_id = ... | <commit_before>from asyncqlio.orm.schema.column import Column
from asyncqlio.orm.schema.table import table_base
from asyncqlio.orm.schema.types import BigInt, Serial, Text, Timestamp
Table = table_base()
class Reminder(Table): # type: ignore
id = Column(Serial, primary_key=True)
guild_id = Column(BigInt)
... |
6cf8bad4faa15bcbc149db678e2ec232ce82b72a | utils/efushell/SocketDriver.py | utils/efushell/SocketDriver.py | import string
import socket
import sys
import time
import threading
class SimpleSocket:
def __init__(self, hostname="localhost", port=8888, timeout=2):
self.access_semaphor = threading.Semaphore(1)
try:
self.sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
except socket... | import string
import socket
import sys
import time
import threading
class SimpleSocket:
def __init__(self, hostname="localhost", port=8888, timeout=2):
self.access_semaphor = threading.Semaphore(1)
try:
self.sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
except socket... | Move string formatting onto two lines for readability | Move string formatting onto two lines for readability
| Python | bsd-2-clause | ess-dmsc/event-formation-unit,ess-dmsc/event-formation-unit,ess-dmsc/event-formation-unit,ess-dmsc/event-formation-unit | import string
import socket
import sys
import time
import threading
class SimpleSocket:
def __init__(self, hostname="localhost", port=8888, timeout=2):
self.access_semaphor = threading.Semaphore(1)
try:
self.sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
except socket... | import string
import socket
import sys
import time
import threading
class SimpleSocket:
def __init__(self, hostname="localhost", port=8888, timeout=2):
self.access_semaphor = threading.Semaphore(1)
try:
self.sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
except socket... | <commit_before>import string
import socket
import sys
import time
import threading
class SimpleSocket:
def __init__(self, hostname="localhost", port=8888, timeout=2):
self.access_semaphor = threading.Semaphore(1)
try:
self.sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
... | import string
import socket
import sys
import time
import threading
class SimpleSocket:
def __init__(self, hostname="localhost", port=8888, timeout=2):
self.access_semaphor = threading.Semaphore(1)
try:
self.sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
except socket... | import string
import socket
import sys
import time
import threading
class SimpleSocket:
def __init__(self, hostname="localhost", port=8888, timeout=2):
self.access_semaphor = threading.Semaphore(1)
try:
self.sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
except socket... | <commit_before>import string
import socket
import sys
import time
import threading
class SimpleSocket:
def __init__(self, hostname="localhost", port=8888, timeout=2):
self.access_semaphor = threading.Semaphore(1)
try:
self.sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
... |
66970aed3876cdae30a77eb50960caf29118248f | lms/djangoapps/api_manager/management/commands/migrate_orgdata.py | lms/djangoapps/api_manager/management/commands/migrate_orgdata.py | import json
from django.contrib.auth.models import Group
from django.core.management.base import BaseCommand
from api_manager.models import GroupProfile, Organization
class Command(BaseCommand):
"""
Migrates legacy organization data and user relationships from older Group model approach to newer concrete Org... | import json
from django.contrib.auth.models import Group
from django.core.management.base import BaseCommand
from api_manager.models import GroupProfile, Organization
class Command(BaseCommand):
"""
Migrates legacy organization data and user relationships from older Group model approach to newer concrete Org... | Tweak to migration in order to accomodate old names for data fields and allow for if data fields were not present | Tweak to migration in order to accomodate old names for data fields and allow for if data fields were not present
| Python | agpl-3.0 | edx-solutions/edx-platform,edx-solutions/edx-platform,edx-solutions/edx-platform,edx-solutions/edx-platform | import json
from django.contrib.auth.models import Group
from django.core.management.base import BaseCommand
from api_manager.models import GroupProfile, Organization
class Command(BaseCommand):
"""
Migrates legacy organization data and user relationships from older Group model approach to newer concrete Org... | import json
from django.contrib.auth.models import Group
from django.core.management.base import BaseCommand
from api_manager.models import GroupProfile, Organization
class Command(BaseCommand):
"""
Migrates legacy organization data and user relationships from older Group model approach to newer concrete Org... | <commit_before>import json
from django.contrib.auth.models import Group
from django.core.management.base import BaseCommand
from api_manager.models import GroupProfile, Organization
class Command(BaseCommand):
"""
Migrates legacy organization data and user relationships from older Group model approach to new... | import json
from django.contrib.auth.models import Group
from django.core.management.base import BaseCommand
from api_manager.models import GroupProfile, Organization
class Command(BaseCommand):
"""
Migrates legacy organization data and user relationships from older Group model approach to newer concrete Org... | import json
from django.contrib.auth.models import Group
from django.core.management.base import BaseCommand
from api_manager.models import GroupProfile, Organization
class Command(BaseCommand):
"""
Migrates legacy organization data and user relationships from older Group model approach to newer concrete Org... | <commit_before>import json
from django.contrib.auth.models import Group
from django.core.management.base import BaseCommand
from api_manager.models import GroupProfile, Organization
class Command(BaseCommand):
"""
Migrates legacy organization data and user relationships from older Group model approach to new... |
60116f05c86658d4ae929e0f1fb7e4e039515298 | src/adhocracy/migration/versions/071_add_badge_impact.py | src/adhocracy/migration/versions/071_add_badge_impact.py | from sqlalchemy import MetaData, Table, Column
from sqlalchemy import Integer
def upgrade(migrate_engine):
meta = MetaData(bind=migrate_engine)
table = Table('badge', meta, autoload=True)
col = Column('impact', Integer, default=0, nullable=False)
col.create(table)
| from sqlalchemy import MetaData, Table, Column
from sqlalchemy import Integer
def upgrade(migrate_engine):
meta = MetaData(bind=migrate_engine)
table = Table('badge', meta, autoload=True)
col = Column('impact', Integer, default=0, server_default=u'0',
nullable=False)
col.create(table... | Fix badge impact migration if badges are present | Fix badge impact migration if badges are present
If badges are already present in the system, their impact value must be set to something other than NULL. (default=0 is misleading, since it just applies to newly created badges, see http://stackoverflow.com/q/16097149/35070).
| Python | agpl-3.0 | phihag/adhocracy,liqd/adhocracy,DanielNeugebauer/adhocracy,liqd/adhocracy,alkadis/vcv,alkadis/vcv,DanielNeugebauer/adhocracy,liqd/adhocracy,alkadis/vcv,phihag/adhocracy,phihag/adhocracy,alkadis/vcv,DanielNeugebauer/adhocracy,phihag/adhocracy,DanielNeugebauer/adhocracy,liqd/adhocracy,alkadis/vcv,DanielNeugebauer/adhocra... | from sqlalchemy import MetaData, Table, Column
from sqlalchemy import Integer
def upgrade(migrate_engine):
meta = MetaData(bind=migrate_engine)
table = Table('badge', meta, autoload=True)
col = Column('impact', Integer, default=0, nullable=False)
col.create(table)
Fix badge impact migration if badges... | from sqlalchemy import MetaData, Table, Column
from sqlalchemy import Integer
def upgrade(migrate_engine):
meta = MetaData(bind=migrate_engine)
table = Table('badge', meta, autoload=True)
col = Column('impact', Integer, default=0, server_default=u'0',
nullable=False)
col.create(table... | <commit_before>from sqlalchemy import MetaData, Table, Column
from sqlalchemy import Integer
def upgrade(migrate_engine):
meta = MetaData(bind=migrate_engine)
table = Table('badge', meta, autoload=True)
col = Column('impact', Integer, default=0, nullable=False)
col.create(table)
<commit_msg>Fix badge... | from sqlalchemy import MetaData, Table, Column
from sqlalchemy import Integer
def upgrade(migrate_engine):
meta = MetaData(bind=migrate_engine)
table = Table('badge', meta, autoload=True)
col = Column('impact', Integer, default=0, server_default=u'0',
nullable=False)
col.create(table... | from sqlalchemy import MetaData, Table, Column
from sqlalchemy import Integer
def upgrade(migrate_engine):
meta = MetaData(bind=migrate_engine)
table = Table('badge', meta, autoload=True)
col = Column('impact', Integer, default=0, nullable=False)
col.create(table)
Fix badge impact migration if badges... | <commit_before>from sqlalchemy import MetaData, Table, Column
from sqlalchemy import Integer
def upgrade(migrate_engine):
meta = MetaData(bind=migrate_engine)
table = Table('badge', meta, autoload=True)
col = Column('impact', Integer, default=0, nullable=False)
col.create(table)
<commit_msg>Fix badge... |
03de222d2e9655606f3a8faedfc2293d138527bf | one_time_eval.py | one_time_eval.py | # usage: python one_time_eval.py hole_cards [board_cards]
# examples:
# python one_time_eval.py as8sqdtc
# python one_time_eval.py as8sqdtc 2skskd
# python one_time_eval.py as8sqdtc3d3c 2skskd
# python one_time_eval.py as8sqdtc3d3c 2skskd3h5s
from convenience import find_pcts_multi, pr,... | # usage: python one_time_eval.py hole_cards [board_cards]
# examples:
# python one_time_eval.py as8sqdtc
# python one_time_eval.py as8sqdtc 2skskd
# python one_time_eval.py as8sqdtc3d3c 2skskd
# python one_time_eval.py as8sqdtc3d3c 2skskd3h5s
from convenience import find_pcts_multi, pr,... | Increase iterations. Add assertion of max board cards. | Increase iterations. Add assertion of max board cards.
| Python | mit | zimolzak/poker-experiments,zimolzak/poker-experiments,zimolzak/poker-experiments | # usage: python one_time_eval.py hole_cards [board_cards]
# examples:
# python one_time_eval.py as8sqdtc
# python one_time_eval.py as8sqdtc 2skskd
# python one_time_eval.py as8sqdtc3d3c 2skskd
# python one_time_eval.py as8sqdtc3d3c 2skskd3h5s
from convenience import find_pcts_multi, pr,... | # usage: python one_time_eval.py hole_cards [board_cards]
# examples:
# python one_time_eval.py as8sqdtc
# python one_time_eval.py as8sqdtc 2skskd
# python one_time_eval.py as8sqdtc3d3c 2skskd
# python one_time_eval.py as8sqdtc3d3c 2skskd3h5s
from convenience import find_pcts_multi, pr,... | <commit_before># usage: python one_time_eval.py hole_cards [board_cards]
# examples:
# python one_time_eval.py as8sqdtc
# python one_time_eval.py as8sqdtc 2skskd
# python one_time_eval.py as8sqdtc3d3c 2skskd
# python one_time_eval.py as8sqdtc3d3c 2skskd3h5s
from convenience import find_... | # usage: python one_time_eval.py hole_cards [board_cards]
# examples:
# python one_time_eval.py as8sqdtc
# python one_time_eval.py as8sqdtc 2skskd
# python one_time_eval.py as8sqdtc3d3c 2skskd
# python one_time_eval.py as8sqdtc3d3c 2skskd3h5s
from convenience import find_pcts_multi, pr,... | # usage: python one_time_eval.py hole_cards [board_cards]
# examples:
# python one_time_eval.py as8sqdtc
# python one_time_eval.py as8sqdtc 2skskd
# python one_time_eval.py as8sqdtc3d3c 2skskd
# python one_time_eval.py as8sqdtc3d3c 2skskd3h5s
from convenience import find_pcts_multi, pr,... | <commit_before># usage: python one_time_eval.py hole_cards [board_cards]
# examples:
# python one_time_eval.py as8sqdtc
# python one_time_eval.py as8sqdtc 2skskd
# python one_time_eval.py as8sqdtc3d3c 2skskd
# python one_time_eval.py as8sqdtc3d3c 2skskd3h5s
from convenience import find_... |
0de213c88dcee2db8f8cd416ff928e6018329e68 | passwd_change.py | passwd_change.py | #!/usr/bin/env python3
import sys
_args = sys.argv
if __name__ == "__main__":
if len(_args) == 5:
keys_file = _args[1]
target_file = _args[2]
result_file = _args[3]
log_file = _args[4]
try:
with open(keys_file, 'r') as k:
keys = k.readlines()
... | #!/usr/bin/env python3
import sys
_args = sys.argv
if __name__ == "__main__":
if len(_args) == 8:
keys_file = _args[1]
passwd_orig = _args[2]
passwd_new = _args[3]
passwd_log = _args[4]
shadow_orig = _args[5]
shadow_new = _args[6]
shadow_log = _args[7]
... | Add shadow changing support according to our new passwd. | Add shadow changing support according to our new passwd.
| Python | mit | maxsocl/oldmailer | #!/usr/bin/env python3
import sys
_args = sys.argv
if __name__ == "__main__":
if len(_args) == 5:
keys_file = _args[1]
target_file = _args[2]
result_file = _args[3]
log_file = _args[4]
try:
with open(keys_file, 'r') as k:
keys = k.readlines()
... | #!/usr/bin/env python3
import sys
_args = sys.argv
if __name__ == "__main__":
if len(_args) == 8:
keys_file = _args[1]
passwd_orig = _args[2]
passwd_new = _args[3]
passwd_log = _args[4]
shadow_orig = _args[5]
shadow_new = _args[6]
shadow_log = _args[7]
... | <commit_before>#!/usr/bin/env python3
import sys
_args = sys.argv
if __name__ == "__main__":
if len(_args) == 5:
keys_file = _args[1]
target_file = _args[2]
result_file = _args[3]
log_file = _args[4]
try:
with open(keys_file, 'r') as k:
keys = ... | #!/usr/bin/env python3
import sys
_args = sys.argv
if __name__ == "__main__":
if len(_args) == 8:
keys_file = _args[1]
passwd_orig = _args[2]
passwd_new = _args[3]
passwd_log = _args[4]
shadow_orig = _args[5]
shadow_new = _args[6]
shadow_log = _args[7]
... | #!/usr/bin/env python3
import sys
_args = sys.argv
if __name__ == "__main__":
if len(_args) == 5:
keys_file = _args[1]
target_file = _args[2]
result_file = _args[3]
log_file = _args[4]
try:
with open(keys_file, 'r') as k:
keys = k.readlines()
... | <commit_before>#!/usr/bin/env python3
import sys
_args = sys.argv
if __name__ == "__main__":
if len(_args) == 5:
keys_file = _args[1]
target_file = _args[2]
result_file = _args[3]
log_file = _args[4]
try:
with open(keys_file, 'r') as k:
keys = ... |
99bb83abc18be1581735dc03c21a680060e9a14c | l10n_it_website_portal_fiscalcode/controllers/main.py | l10n_it_website_portal_fiscalcode/controllers/main.py | # Copyright 2019 Simone Rubino
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
from odoo import _
from odoo.addons.portal.controllers.portal import CustomerPortal
from odoo.http import request
CustomerPortal.OPTIONAL_BILLING_FIELDS.extend(['fiscalcode'])
class WebsitePortalFiscalCode(CustomerPortal... | # Copyright 2019 Simone Rubino
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
from odoo import _
from odoo.addons.portal.controllers.portal import CustomerPortal
from odoo.http import request
CustomerPortal.OPTIONAL_BILLING_FIELDS.extend(['fiscalcode'])
class WebsitePortalFiscalCode(CustomerPortal... | FIX l10n_it_website_portal_fiscalcode check after invoice issuing | FIX l10n_it_website_portal_fiscalcode check after invoice issuing
Steps:
- Create a partner (type company) and give them portal access
- With the new user, access to portal
- Edit partner details setting fiscal code with 11 digits
- Using admin, create an invoice for that partner and validate
- Using the new use... | Python | agpl-3.0 | OCA/l10n-italy,dcorio/l10n-italy,OCA/l10n-italy,dcorio/l10n-italy,dcorio/l10n-italy,OCA/l10n-italy | # Copyright 2019 Simone Rubino
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
from odoo import _
from odoo.addons.portal.controllers.portal import CustomerPortal
from odoo.http import request
CustomerPortal.OPTIONAL_BILLING_FIELDS.extend(['fiscalcode'])
class WebsitePortalFiscalCode(CustomerPortal... | # Copyright 2019 Simone Rubino
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
from odoo import _
from odoo.addons.portal.controllers.portal import CustomerPortal
from odoo.http import request
CustomerPortal.OPTIONAL_BILLING_FIELDS.extend(['fiscalcode'])
class WebsitePortalFiscalCode(CustomerPortal... | <commit_before># Copyright 2019 Simone Rubino
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
from odoo import _
from odoo.addons.portal.controllers.portal import CustomerPortal
from odoo.http import request
CustomerPortal.OPTIONAL_BILLING_FIELDS.extend(['fiscalcode'])
class WebsitePortalFiscalCode... | # Copyright 2019 Simone Rubino
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
from odoo import _
from odoo.addons.portal.controllers.portal import CustomerPortal
from odoo.http import request
CustomerPortal.OPTIONAL_BILLING_FIELDS.extend(['fiscalcode'])
class WebsitePortalFiscalCode(CustomerPortal... | # Copyright 2019 Simone Rubino
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
from odoo import _
from odoo.addons.portal.controllers.portal import CustomerPortal
from odoo.http import request
CustomerPortal.OPTIONAL_BILLING_FIELDS.extend(['fiscalcode'])
class WebsitePortalFiscalCode(CustomerPortal... | <commit_before># Copyright 2019 Simone Rubino
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
from odoo import _
from odoo.addons.portal.controllers.portal import CustomerPortal
from odoo.http import request
CustomerPortal.OPTIONAL_BILLING_FIELDS.extend(['fiscalcode'])
class WebsitePortalFiscalCode... |
fb58ecee7e3e71f0dbb202f7284c3af20ccbcdaa | shared/logger.py | shared/logger.py | import os
import logging
from datetime import datetime
log_name = '{}/../logs/{}.log'.format(os.path.dirname(os.path.abspath(__file__)),
datetime.now().strftime('%Y.%m.%d.%H.%M.%S'))
logger = logging.getLogger('main')
logger.setLevel(logging.INFO)
logging.basicConfig(format='%... | import os
import logging
from datetime import datetime
log_name = '{}/../logs/{}.log'.format(os.path.dirname(os.path.abspath(__file__)),
datetime.now().strftime('%Y.%m.%d.%H.%M.%S'))
logger = logging.getLogger('main')
logger.setLevel(logging.INFO)
console = logging.StreamHandl... | Allow logging to console as well as disk | Allow logging to console as well as disk
| Python | mit | Mo-Talha/Nomad,Mo-Talha/Nomad,Mo-Talha/Nomad,Mo-Talha/Nomad | import os
import logging
from datetime import datetime
log_name = '{}/../logs/{}.log'.format(os.path.dirname(os.path.abspath(__file__)),
datetime.now().strftime('%Y.%m.%d.%H.%M.%S'))
logger = logging.getLogger('main')
logger.setLevel(logging.INFO)
logging.basicConfig(format='%... | import os
import logging
from datetime import datetime
log_name = '{}/../logs/{}.log'.format(os.path.dirname(os.path.abspath(__file__)),
datetime.now().strftime('%Y.%m.%d.%H.%M.%S'))
logger = logging.getLogger('main')
logger.setLevel(logging.INFO)
console = logging.StreamHandl... | <commit_before>import os
import logging
from datetime import datetime
log_name = '{}/../logs/{}.log'.format(os.path.dirname(os.path.abspath(__file__)),
datetime.now().strftime('%Y.%m.%d.%H.%M.%S'))
logger = logging.getLogger('main')
logger.setLevel(logging.INFO)
logging.basicC... | import os
import logging
from datetime import datetime
log_name = '{}/../logs/{}.log'.format(os.path.dirname(os.path.abspath(__file__)),
datetime.now().strftime('%Y.%m.%d.%H.%M.%S'))
logger = logging.getLogger('main')
logger.setLevel(logging.INFO)
console = logging.StreamHandl... | import os
import logging
from datetime import datetime
log_name = '{}/../logs/{}.log'.format(os.path.dirname(os.path.abspath(__file__)),
datetime.now().strftime('%Y.%m.%d.%H.%M.%S'))
logger = logging.getLogger('main')
logger.setLevel(logging.INFO)
logging.basicConfig(format='%... | <commit_before>import os
import logging
from datetime import datetime
log_name = '{}/../logs/{}.log'.format(os.path.dirname(os.path.abspath(__file__)),
datetime.now().strftime('%Y.%m.%d.%H.%M.%S'))
logger = logging.getLogger('main')
logger.setLevel(logging.INFO)
logging.basicC... |
9358b4ebf433a1c23d7c12b99e0253f3741eed8c | contrail_provisioning/config/templates/contrail_api_conf.py | contrail_provisioning/config/templates/contrail_api_conf.py | import string
template = string.Template("""
[DEFAULTS]
ifmap_server_ip=$__contrail_ifmap_server_ip__
ifmap_server_port=$__contrail_ifmap_server_port__
ifmap_username=$__contrail_ifmap_username__
ifmap_password=$__contrail_ifmap_password__
cassandra_server_list=$__contrail_cassandra_server_list__
listen_ip_addr=$__con... | import string
template = string.Template("""
[DEFAULTS]
ifmap_server_ip=$__contrail_ifmap_server_ip__
ifmap_server_port=$__contrail_ifmap_server_port__
ifmap_username=$__contrail_ifmap_username__
ifmap_password=$__contrail_ifmap_password__
cassandra_server_list=$__contrail_cassandra_server_list__
listen_ip_addr=$__con... | Enable port list optimization by default for new install+provision | config-perf: Enable port list optimization by default for new install+provision
From R1.05 onwards port is created as child of project. This leads to
better list performance.
Change-Id: Id0acbd1194403c500cdf0ee5851ef6cf5dba1c97
Closes-Bug: #1441924
| Python | apache-2.0 | Juniper/contrail-provisioning,Juniper/contrail-provisioning | import string
template = string.Template("""
[DEFAULTS]
ifmap_server_ip=$__contrail_ifmap_server_ip__
ifmap_server_port=$__contrail_ifmap_server_port__
ifmap_username=$__contrail_ifmap_username__
ifmap_password=$__contrail_ifmap_password__
cassandra_server_list=$__contrail_cassandra_server_list__
listen_ip_addr=$__con... | import string
template = string.Template("""
[DEFAULTS]
ifmap_server_ip=$__contrail_ifmap_server_ip__
ifmap_server_port=$__contrail_ifmap_server_port__
ifmap_username=$__contrail_ifmap_username__
ifmap_password=$__contrail_ifmap_password__
cassandra_server_list=$__contrail_cassandra_server_list__
listen_ip_addr=$__con... | <commit_before>import string
template = string.Template("""
[DEFAULTS]
ifmap_server_ip=$__contrail_ifmap_server_ip__
ifmap_server_port=$__contrail_ifmap_server_port__
ifmap_username=$__contrail_ifmap_username__
ifmap_password=$__contrail_ifmap_password__
cassandra_server_list=$__contrail_cassandra_server_list__
listen... | import string
template = string.Template("""
[DEFAULTS]
ifmap_server_ip=$__contrail_ifmap_server_ip__
ifmap_server_port=$__contrail_ifmap_server_port__
ifmap_username=$__contrail_ifmap_username__
ifmap_password=$__contrail_ifmap_password__
cassandra_server_list=$__contrail_cassandra_server_list__
listen_ip_addr=$__con... | import string
template = string.Template("""
[DEFAULTS]
ifmap_server_ip=$__contrail_ifmap_server_ip__
ifmap_server_port=$__contrail_ifmap_server_port__
ifmap_username=$__contrail_ifmap_username__
ifmap_password=$__contrail_ifmap_password__
cassandra_server_list=$__contrail_cassandra_server_list__
listen_ip_addr=$__con... | <commit_before>import string
template = string.Template("""
[DEFAULTS]
ifmap_server_ip=$__contrail_ifmap_server_ip__
ifmap_server_port=$__contrail_ifmap_server_port__
ifmap_username=$__contrail_ifmap_username__
ifmap_password=$__contrail_ifmap_password__
cassandra_server_list=$__contrail_cassandra_server_list__
listen... |
3f2b1fd9d8d7472323de24e971b004d177637c95 | php4dvd/model/application.py | php4dvd/model/application.py | Class Application(object):
def __init__(sefl, driver):
self.driver = driver
def go_to_homepage(self):
self.driver.get("http://hub.wart.ru/php4dvd/")
def login(self, user):
driver = self.driver
driver.find_element_by_id("username").clear()
driver.find_element_by_id(... | Class Application(object):
def __init__(sefl, driver):
self.driver = driver
self.wait = WebDriverWait(driver, 10)
def go_to_homepage(self):
self.driver.get("http://hub.wart.ru/php4dvd/")
def login(self, user):
driver = self.driver
driver.find_element_by_id("usernam... | Set wait variable to 10 seconds. | Set wait variable to 10 seconds.
| Python | bsd-2-clause | bsamorodov/selenium-py-training-samorodov | Class Application(object):
def __init__(sefl, driver):
self.driver = driver
def go_to_homepage(self):
self.driver.get("http://hub.wart.ru/php4dvd/")
def login(self, user):
driver = self.driver
driver.find_element_by_id("username").clear()
driver.find_element_by_id(... | Class Application(object):
def __init__(sefl, driver):
self.driver = driver
self.wait = WebDriverWait(driver, 10)
def go_to_homepage(self):
self.driver.get("http://hub.wart.ru/php4dvd/")
def login(self, user):
driver = self.driver
driver.find_element_by_id("usernam... | <commit_before>Class Application(object):
def __init__(sefl, driver):
self.driver = driver
def go_to_homepage(self):
self.driver.get("http://hub.wart.ru/php4dvd/")
def login(self, user):
driver = self.driver
driver.find_element_by_id("username").clear()
driver.find... | Class Application(object):
def __init__(sefl, driver):
self.driver = driver
self.wait = WebDriverWait(driver, 10)
def go_to_homepage(self):
self.driver.get("http://hub.wart.ru/php4dvd/")
def login(self, user):
driver = self.driver
driver.find_element_by_id("usernam... | Class Application(object):
def __init__(sefl, driver):
self.driver = driver
def go_to_homepage(self):
self.driver.get("http://hub.wart.ru/php4dvd/")
def login(self, user):
driver = self.driver
driver.find_element_by_id("username").clear()
driver.find_element_by_id(... | <commit_before>Class Application(object):
def __init__(sefl, driver):
self.driver = driver
def go_to_homepage(self):
self.driver.get("http://hub.wart.ru/php4dvd/")
def login(self, user):
driver = self.driver
driver.find_element_by_id("username").clear()
driver.find... |
aed8f8cde3664389153e9fdf27dbe69cba000e8e | wightinvoices/clients/views.py | wightinvoices/clients/views.py | from django.contrib.auth.decorators import login_required
from django.utils.decorators import method_decorator
from django.views import generic
from django.core.urlresolvers import reverse
from . import models, forms
class ClientMixin(object):
"""
A mixin that describes Client model.
"""
model = mode... | from django.contrib.auth.decorators import login_required
from django.utils.decorators import method_decorator
from django.views import generic
from django.core.urlresolvers import reverse
from . import models, forms
class ClientMixin(object):
"""
A mixin that describes Client model.
"""
model = mode... | Use client_id as url identifier. | Use client_id as url identifier.
| Python | mit | linovia/wight-invoices | from django.contrib.auth.decorators import login_required
from django.utils.decorators import method_decorator
from django.views import generic
from django.core.urlresolvers import reverse
from . import models, forms
class ClientMixin(object):
"""
A mixin that describes Client model.
"""
model = mode... | from django.contrib.auth.decorators import login_required
from django.utils.decorators import method_decorator
from django.views import generic
from django.core.urlresolvers import reverse
from . import models, forms
class ClientMixin(object):
"""
A mixin that describes Client model.
"""
model = mode... | <commit_before>from django.contrib.auth.decorators import login_required
from django.utils.decorators import method_decorator
from django.views import generic
from django.core.urlresolvers import reverse
from . import models, forms
class ClientMixin(object):
"""
A mixin that describes Client model.
"""
... | from django.contrib.auth.decorators import login_required
from django.utils.decorators import method_decorator
from django.views import generic
from django.core.urlresolvers import reverse
from . import models, forms
class ClientMixin(object):
"""
A mixin that describes Client model.
"""
model = mode... | from django.contrib.auth.decorators import login_required
from django.utils.decorators import method_decorator
from django.views import generic
from django.core.urlresolvers import reverse
from . import models, forms
class ClientMixin(object):
"""
A mixin that describes Client model.
"""
model = mode... | <commit_before>from django.contrib.auth.decorators import login_required
from django.utils.decorators import method_decorator
from django.views import generic
from django.core.urlresolvers import reverse
from . import models, forms
class ClientMixin(object):
"""
A mixin that describes Client model.
"""
... |
69890f36b1853b3845ff29ec15ccde11f7ac86f2 | zerver/migrations/0306_custom_profile_field_date_format.py | zerver/migrations/0306_custom_profile_field_date_format.py | from django.db import migrations
class Migration(migrations.Migration):
"""
We previously accepted invalid ISO 8601 dates like 1909-3-5 for
date values of custom profile fields. Correct them by adding the
missing leading zeros: 1909-03-05.
"""
dependencies = [
("zerver", "0305_realm_d... | from django.db import migrations
class Migration(migrations.Migration):
"""
We previously accepted invalid ISO 8601 dates like 1909-3-5 for
date values of custom profile fields. Correct them by adding the
missing leading zeros: 1909-03-05.
"""
dependencies = [
("zerver", "0305_realm_d... | Enforce evaluation order in 0306 WHERE clause. | migrations: Enforce evaluation order in 0306 WHERE clause.
Depending on PostgreSQL’s query plan, it was possible for the value
condition to be evaluated before the field_type condition was checked,
leading to errors like
psycopg2.errors.InvalidDatetimeFormat: invalid value "stri" for "YYYY"
DETAIL: Value must be an ... | Python | apache-2.0 | zulip/zulip,eeshangarg/zulip,hackerkid/zulip,andersk/zulip,kou/zulip,rht/zulip,kou/zulip,rht/zulip,andersk/zulip,punchagan/zulip,hackerkid/zulip,kou/zulip,andersk/zulip,hackerkid/zulip,punchagan/zulip,punchagan/zulip,kou/zulip,andersk/zulip,punchagan/zulip,rht/zulip,hackerkid/zulip,andersk/zulip,rht/zulip,rht/zulip,ees... | from django.db import migrations
class Migration(migrations.Migration):
"""
We previously accepted invalid ISO 8601 dates like 1909-3-5 for
date values of custom profile fields. Correct them by adding the
missing leading zeros: 1909-03-05.
"""
dependencies = [
("zerver", "0305_realm_d... | from django.db import migrations
class Migration(migrations.Migration):
"""
We previously accepted invalid ISO 8601 dates like 1909-3-5 for
date values of custom profile fields. Correct them by adding the
missing leading zeros: 1909-03-05.
"""
dependencies = [
("zerver", "0305_realm_d... | <commit_before>from django.db import migrations
class Migration(migrations.Migration):
"""
We previously accepted invalid ISO 8601 dates like 1909-3-5 for
date values of custom profile fields. Correct them by adding the
missing leading zeros: 1909-03-05.
"""
dependencies = [
("zerver"... | from django.db import migrations
class Migration(migrations.Migration):
"""
We previously accepted invalid ISO 8601 dates like 1909-3-5 for
date values of custom profile fields. Correct them by adding the
missing leading zeros: 1909-03-05.
"""
dependencies = [
("zerver", "0305_realm_d... | from django.db import migrations
class Migration(migrations.Migration):
"""
We previously accepted invalid ISO 8601 dates like 1909-3-5 for
date values of custom profile fields. Correct them by adding the
missing leading zeros: 1909-03-05.
"""
dependencies = [
("zerver", "0305_realm_d... | <commit_before>from django.db import migrations
class Migration(migrations.Migration):
"""
We previously accepted invalid ISO 8601 dates like 1909-3-5 for
date values of custom profile fields. Correct them by adding the
missing leading zeros: 1909-03-05.
"""
dependencies = [
("zerver"... |
72a9dd0f0cff3fc6dcc97a4068b82e4b13bbc127 | accounts/management/__init__.py | accounts/management/__init__.py | from django.db.models.signals import post_syncdb
from django.conf import settings
from accounts import models
def ensure_core_accounts_exists(sender, **kwargs):
create_source_account()
create_sales_account()
create_expired_account()
def create_sales_account():
name = getattr(settings, 'ACCOUNTS_SAL... | from django.db.models.signals import post_syncdb
from django.conf import settings
from accounts import models
def ensure_core_accounts_exists(sender, **kwargs):
create_source_account()
create_sales_account()
create_expired_account()
def create_sales_account():
name = getattr(settings, 'ACCOUNTS_SAL... | Remove print statements for syncdb receivers | Remove print statements for syncdb receivers
| Python | bsd-3-clause | django-oscar/django-oscar-accounts,michaelkuty/django-oscar-accounts,Mariana-Tek/django-oscar-accounts,amsys/django-account-balances,carver/django-account-balances,Jannes123/django-oscar-accounts,machtfit/django-oscar-accounts,michaelkuty/django-oscar-accounts,amsys/django-account-balances,django-oscar/django-oscar-acc... | from django.db.models.signals import post_syncdb
from django.conf import settings
from accounts import models
def ensure_core_accounts_exists(sender, **kwargs):
create_source_account()
create_sales_account()
create_expired_account()
def create_sales_account():
name = getattr(settings, 'ACCOUNTS_SAL... | from django.db.models.signals import post_syncdb
from django.conf import settings
from accounts import models
def ensure_core_accounts_exists(sender, **kwargs):
create_source_account()
create_sales_account()
create_expired_account()
def create_sales_account():
name = getattr(settings, 'ACCOUNTS_SAL... | <commit_before>from django.db.models.signals import post_syncdb
from django.conf import settings
from accounts import models
def ensure_core_accounts_exists(sender, **kwargs):
create_source_account()
create_sales_account()
create_expired_account()
def create_sales_account():
name = getattr(settings... | from django.db.models.signals import post_syncdb
from django.conf import settings
from accounts import models
def ensure_core_accounts_exists(sender, **kwargs):
create_source_account()
create_sales_account()
create_expired_account()
def create_sales_account():
name = getattr(settings, 'ACCOUNTS_SAL... | from django.db.models.signals import post_syncdb
from django.conf import settings
from accounts import models
def ensure_core_accounts_exists(sender, **kwargs):
create_source_account()
create_sales_account()
create_expired_account()
def create_sales_account():
name = getattr(settings, 'ACCOUNTS_SAL... | <commit_before>from django.db.models.signals import post_syncdb
from django.conf import settings
from accounts import models
def ensure_core_accounts_exists(sender, **kwargs):
create_source_account()
create_sales_account()
create_expired_account()
def create_sales_account():
name = getattr(settings... |
c29b82ee2ce1d16d60fcd4715d2836c7a6f2d241 | app/__init__.py | app/__init__.py | from flask import Flask
app = Flask(__name__)
from app import views | from flask import Flask
app = Flask(__name__)
from app import views
# Flask configuration
app.config.from_object(__name__)
app.config.update(dict(
MYSQL_HOST='localhost',
MYSQL_USER='root',
MYSQL_PASSWORD='123456',
MYSQL_DB='flask_todo_app',
MYSQL_CURSORCLASS='DictCursor',
SECRET_KEY='developm... | Set the MySQL related configuration. | Set the MySQL related configuration.
| Python | mit | alchermd/flask-todo-app,alchermd/flask-todo-app | from flask import Flask
app = Flask(__name__)
from app import viewsSet the MySQL related configuration. | from flask import Flask
app = Flask(__name__)
from app import views
# Flask configuration
app.config.from_object(__name__)
app.config.update(dict(
MYSQL_HOST='localhost',
MYSQL_USER='root',
MYSQL_PASSWORD='123456',
MYSQL_DB='flask_todo_app',
MYSQL_CURSORCLASS='DictCursor',
SECRET_KEY='developm... | <commit_before>from flask import Flask
app = Flask(__name__)
from app import views<commit_msg>Set the MySQL related configuration.<commit_after> | from flask import Flask
app = Flask(__name__)
from app import views
# Flask configuration
app.config.from_object(__name__)
app.config.update(dict(
MYSQL_HOST='localhost',
MYSQL_USER='root',
MYSQL_PASSWORD='123456',
MYSQL_DB='flask_todo_app',
MYSQL_CURSORCLASS='DictCursor',
SECRET_KEY='developm... | from flask import Flask
app = Flask(__name__)
from app import viewsSet the MySQL related configuration.from flask import Flask
app = Flask(__name__)
from app import views
# Flask configuration
app.config.from_object(__name__)
app.config.update(dict(
MYSQL_HOST='localhost',
MYSQL_USER='root',
MYSQL_PASSWO... | <commit_before>from flask import Flask
app = Flask(__name__)
from app import views<commit_msg>Set the MySQL related configuration.<commit_after>from flask import Flask
app = Flask(__name__)
from app import views
# Flask configuration
app.config.from_object(__name__)
app.config.update(dict(
MYSQL_HOST='localhost'... |
4aa11073a551c8a026daea9175336b63dd9780b2 | src/poliastro/twobody/events.py | src/poliastro/twobody/events.py | from astropy import units as u
from numpy.linalg import norm
class LithobrakeEvent:
"""Terminal event that detects impact with the attractor surface.
Parameters
----------
R : float
Radius of the attractor.
"""
def __init__(self, R):
self._R = R
self._last_t = None
... | from astropy import units as u
from numpy.linalg import norm
class LithobrakeEvent:
"""Terminal event that detects impact with the attractor surface.
Parameters
----------
R : float
Radius of the attractor.
"""
def __init__(self, R):
self._R = R
self._last_t = None
... | Add altitude cross event detector | Add altitude cross event detector
| Python | mit | poliastro/poliastro | from astropy import units as u
from numpy.linalg import norm
class LithobrakeEvent:
"""Terminal event that detects impact with the attractor surface.
Parameters
----------
R : float
Radius of the attractor.
"""
def __init__(self, R):
self._R = R
self._last_t = None
... | from astropy import units as u
from numpy.linalg import norm
class LithobrakeEvent:
"""Terminal event that detects impact with the attractor surface.
Parameters
----------
R : float
Radius of the attractor.
"""
def __init__(self, R):
self._R = R
self._last_t = None
... | <commit_before>from astropy import units as u
from numpy.linalg import norm
class LithobrakeEvent:
"""Terminal event that detects impact with the attractor surface.
Parameters
----------
R : float
Radius of the attractor.
"""
def __init__(self, R):
self._R = R
self._... | from astropy import units as u
from numpy.linalg import norm
class LithobrakeEvent:
"""Terminal event that detects impact with the attractor surface.
Parameters
----------
R : float
Radius of the attractor.
"""
def __init__(self, R):
self._R = R
self._last_t = None
... | from astropy import units as u
from numpy.linalg import norm
class LithobrakeEvent:
"""Terminal event that detects impact with the attractor surface.
Parameters
----------
R : float
Radius of the attractor.
"""
def __init__(self, R):
self._R = R
self._last_t = None
... | <commit_before>from astropy import units as u
from numpy.linalg import norm
class LithobrakeEvent:
"""Terminal event that detects impact with the attractor surface.
Parameters
----------
R : float
Radius of the attractor.
"""
def __init__(self, R):
self._R = R
self._... |
3d1625e5e9a6a90cec1f2e18739462b006905c88 | game.py | game.py | from deuces import Card, Deck
class Game():
"""
Contains a deck of cards that can be accessed by players to play
various card games.
"""
def __init__(self, name='kiwi'):
self.players = []
self.name = name
self.deck = Deck()
self.visible_cards = []
def add_play... | from deuces import Card, Deck
class Game():
"""
Contains a deck of cards that can be accessed by players to play
various card games.
"""
def __init__(self, name='kiwi'):
self.players = []
self.name = name
self.deck = Deck()
self.visible_cards = []
def add_play... | Fix behavioural bug in shuffling | Fix behavioural bug in shuffling
Previously shuffling would create a new deck, implying that all the
cards had been "picked up" and were being shuffled for a new hand.
However, this did not pick up the visible cards from the game, so the
visible cards would just continue to grow unchecked. This clears the
visible card... | Python | bsd-2-clause | dramborleg/text-poker | from deuces import Card, Deck
class Game():
"""
Contains a deck of cards that can be accessed by players to play
various card games.
"""
def __init__(self, name='kiwi'):
self.players = []
self.name = name
self.deck = Deck()
self.visible_cards = []
def add_play... | from deuces import Card, Deck
class Game():
"""
Contains a deck of cards that can be accessed by players to play
various card games.
"""
def __init__(self, name='kiwi'):
self.players = []
self.name = name
self.deck = Deck()
self.visible_cards = []
def add_play... | <commit_before>from deuces import Card, Deck
class Game():
"""
Contains a deck of cards that can be accessed by players to play
various card games.
"""
def __init__(self, name='kiwi'):
self.players = []
self.name = name
self.deck = Deck()
self.visible_cards = []
... | from deuces import Card, Deck
class Game():
"""
Contains a deck of cards that can be accessed by players to play
various card games.
"""
def __init__(self, name='kiwi'):
self.players = []
self.name = name
self.deck = Deck()
self.visible_cards = []
def add_play... | from deuces import Card, Deck
class Game():
"""
Contains a deck of cards that can be accessed by players to play
various card games.
"""
def __init__(self, name='kiwi'):
self.players = []
self.name = name
self.deck = Deck()
self.visible_cards = []
def add_play... | <commit_before>from deuces import Card, Deck
class Game():
"""
Contains a deck of cards that can be accessed by players to play
various card games.
"""
def __init__(self, name='kiwi'):
self.players = []
self.name = name
self.deck = Deck()
self.visible_cards = []
... |
4ec2672dc22c3477984e335e3678f3a2e69ecbd2 | wger/exercises/migrations/0018_delete_pending_exercises.py | wger/exercises/migrations/0018_delete_pending_exercises.py | # Generated by Django 3.2.15 on 2022-08-25 17:25
from django.db import migrations
from django.conf import settings
def delete_pending_exercises(apps, schema_editor):
"""
Delete all pending exercises
Note that we can't access STATUS_PENDING here because we are not using
a real model.
"""
Exer... | # Generated by Django 3.2.15 on 2022-08-25 17:25
from django.db import migrations
from django.conf import settings
def delete_pending_bases(apps, schema_editor):
"""
Delete all pending bases
Note that we can't access STATUS_PENDING here because we are not using
a real model.
"""
Base = apps.... | Delete both pending bases and translations | Delete both pending bases and translations
| Python | agpl-3.0 | wger-project/wger,wger-project/wger,wger-project/wger,wger-project/wger | # Generated by Django 3.2.15 on 2022-08-25 17:25
from django.db import migrations
from django.conf import settings
def delete_pending_exercises(apps, schema_editor):
"""
Delete all pending exercises
Note that we can't access STATUS_PENDING here because we are not using
a real model.
"""
Exer... | # Generated by Django 3.2.15 on 2022-08-25 17:25
from django.db import migrations
from django.conf import settings
def delete_pending_bases(apps, schema_editor):
"""
Delete all pending bases
Note that we can't access STATUS_PENDING here because we are not using
a real model.
"""
Base = apps.... | <commit_before># Generated by Django 3.2.15 on 2022-08-25 17:25
from django.db import migrations
from django.conf import settings
def delete_pending_exercises(apps, schema_editor):
"""
Delete all pending exercises
Note that we can't access STATUS_PENDING here because we are not using
a real model.
... | # Generated by Django 3.2.15 on 2022-08-25 17:25
from django.db import migrations
from django.conf import settings
def delete_pending_bases(apps, schema_editor):
"""
Delete all pending bases
Note that we can't access STATUS_PENDING here because we are not using
a real model.
"""
Base = apps.... | # Generated by Django 3.2.15 on 2022-08-25 17:25
from django.db import migrations
from django.conf import settings
def delete_pending_exercises(apps, schema_editor):
"""
Delete all pending exercises
Note that we can't access STATUS_PENDING here because we are not using
a real model.
"""
Exer... | <commit_before># Generated by Django 3.2.15 on 2022-08-25 17:25
from django.db import migrations
from django.conf import settings
def delete_pending_exercises(apps, schema_editor):
"""
Delete all pending exercises
Note that we can't access STATUS_PENDING here because we are not using
a real model.
... |
513b23b169e87a92b2fdf0bd6b33778ea68b9b24 | imagekit/management/commands/ikcachevalidate.py | imagekit/management/commands/ikcachevalidate.py | from optparse import make_option
from django.core.management.base import BaseCommand
from django.db.models.loading import cache
from ...utils import validate_app_cache
class Command(BaseCommand):
help = ('Validates the image cache for a list of apps.')
args = '[apps]'
requires_model_validation = True
... | from optparse import make_option
from django.core.management.base import BaseCommand
from django.db.models.loading import cache
from ...utils import validate_app_cache
class Command(BaseCommand):
help = ('Validates the image cache for a list of apps.')
args = '[apps]'
requires_model_validation = True
... | Rename force flag to force-revalidation | Rename force flag to force-revalidation
| Python | bsd-3-clause | pcompassion/django-imagekit,FundedByMe/django-imagekit,tawanda/django-imagekit,tawanda/django-imagekit,pcompassion/django-imagekit,pcompassion/django-imagekit,FundedByMe/django-imagekit | from optparse import make_option
from django.core.management.base import BaseCommand
from django.db.models.loading import cache
from ...utils import validate_app_cache
class Command(BaseCommand):
help = ('Validates the image cache for a list of apps.')
args = '[apps]'
requires_model_validation = True
... | from optparse import make_option
from django.core.management.base import BaseCommand
from django.db.models.loading import cache
from ...utils import validate_app_cache
class Command(BaseCommand):
help = ('Validates the image cache for a list of apps.')
args = '[apps]'
requires_model_validation = True
... | <commit_before>from optparse import make_option
from django.core.management.base import BaseCommand
from django.db.models.loading import cache
from ...utils import validate_app_cache
class Command(BaseCommand):
help = ('Validates the image cache for a list of apps.')
args = '[apps]'
requires_model_validat... | from optparse import make_option
from django.core.management.base import BaseCommand
from django.db.models.loading import cache
from ...utils import validate_app_cache
class Command(BaseCommand):
help = ('Validates the image cache for a list of apps.')
args = '[apps]'
requires_model_validation = True
... | from optparse import make_option
from django.core.management.base import BaseCommand
from django.db.models.loading import cache
from ...utils import validate_app_cache
class Command(BaseCommand):
help = ('Validates the image cache for a list of apps.')
args = '[apps]'
requires_model_validation = True
... | <commit_before>from optparse import make_option
from django.core.management.base import BaseCommand
from django.db.models.loading import cache
from ...utils import validate_app_cache
class Command(BaseCommand):
help = ('Validates the image cache for a list of apps.')
args = '[apps]'
requires_model_validat... |
af2f7338c2c9bdddbb90af2ce96866af98482215 | concurrency/test_get_websites.py | concurrency/test_get_websites.py | import unittest
from unittest.mock import patch
from concurrency.get_websites import load_url as load_url
class TestGetWebsites(unittest.TestCase):
@patch('concurrency.get_websites.requests')
def test_load_url(self, m):
""" Check that we're getting the data from a request object """
m.get = l... | import unittest
from unittest.mock import patch, MagicMock
from concurrency.get_websites import load_url as load_url
class TestGetWebsites(unittest.TestCase):
@patch('concurrency.get_websites.requests')
def test_load_url_returns_data(self, m):
""" Check that we're getting the data from a request obje... | Add a test case to see that we're making a request with the url we pass in | Add a test case to see that we're making a request with the url we pass in
| Python | mit | b-ritter/python-notes,b-ritter/python-notes | import unittest
from unittest.mock import patch
from concurrency.get_websites import load_url as load_url
class TestGetWebsites(unittest.TestCase):
@patch('concurrency.get_websites.requests')
def test_load_url(self, m):
""" Check that we're getting the data from a request object """
m.get = l... | import unittest
from unittest.mock import patch, MagicMock
from concurrency.get_websites import load_url as load_url
class TestGetWebsites(unittest.TestCase):
@patch('concurrency.get_websites.requests')
def test_load_url_returns_data(self, m):
""" Check that we're getting the data from a request obje... | <commit_before>import unittest
from unittest.mock import patch
from concurrency.get_websites import load_url as load_url
class TestGetWebsites(unittest.TestCase):
@patch('concurrency.get_websites.requests')
def test_load_url(self, m):
""" Check that we're getting the data from a request object """
... | import unittest
from unittest.mock import patch, MagicMock
from concurrency.get_websites import load_url as load_url
class TestGetWebsites(unittest.TestCase):
@patch('concurrency.get_websites.requests')
def test_load_url_returns_data(self, m):
""" Check that we're getting the data from a request obje... | import unittest
from unittest.mock import patch
from concurrency.get_websites import load_url as load_url
class TestGetWebsites(unittest.TestCase):
@patch('concurrency.get_websites.requests')
def test_load_url(self, m):
""" Check that we're getting the data from a request object """
m.get = l... | <commit_before>import unittest
from unittest.mock import patch
from concurrency.get_websites import load_url as load_url
class TestGetWebsites(unittest.TestCase):
@patch('concurrency.get_websites.requests')
def test_load_url(self, m):
""" Check that we're getting the data from a request object """
... |
a09cf20b13c82b8521e2e36bbd8802a4578cefac | csunplugged/tests/topics/models/test_curriculum_integration.py | csunplugged/tests/topics/models/test_curriculum_integration.py | from model_mommy import mommy
from tests.BaseTestWithDB import BaseTestWithDB
from topics.models import CurriculumIntegration
from topics.models import CurriculumArea
from topics.models import Lesson
from tests.topics import create_topics_test_data
class CurriculumIntegrationModelTest(BaseTestWithDB):
def __init... | from model_mommy import mommy
from tests.BaseTestWithDB import BaseTestWithDB
from topics.models import CurriculumIntegration
from topics.models import CurriculumArea
from topics.models import Lesson
from tests.topics import create_topics_test_data
class CurriculumIntegrationModelTest(BaseTestWithDB):
def __init... | Remove many to many key generation in test | Remove many to many key generation in test
| Python | mit | uccser/cs-unplugged,uccser/cs-unplugged,uccser/cs-unplugged,uccser/cs-unplugged | from model_mommy import mommy
from tests.BaseTestWithDB import BaseTestWithDB
from topics.models import CurriculumIntegration
from topics.models import CurriculumArea
from topics.models import Lesson
from tests.topics import create_topics_test_data
class CurriculumIntegrationModelTest(BaseTestWithDB):
def __init... | from model_mommy import mommy
from tests.BaseTestWithDB import BaseTestWithDB
from topics.models import CurriculumIntegration
from topics.models import CurriculumArea
from topics.models import Lesson
from tests.topics import create_topics_test_data
class CurriculumIntegrationModelTest(BaseTestWithDB):
def __init... | <commit_before>from model_mommy import mommy
from tests.BaseTestWithDB import BaseTestWithDB
from topics.models import CurriculumIntegration
from topics.models import CurriculumArea
from topics.models import Lesson
from tests.topics import create_topics_test_data
class CurriculumIntegrationModelTest(BaseTestWithDB):
... | from model_mommy import mommy
from tests.BaseTestWithDB import BaseTestWithDB
from topics.models import CurriculumIntegration
from topics.models import CurriculumArea
from topics.models import Lesson
from tests.topics import create_topics_test_data
class CurriculumIntegrationModelTest(BaseTestWithDB):
def __init... | from model_mommy import mommy
from tests.BaseTestWithDB import BaseTestWithDB
from topics.models import CurriculumIntegration
from topics.models import CurriculumArea
from topics.models import Lesson
from tests.topics import create_topics_test_data
class CurriculumIntegrationModelTest(BaseTestWithDB):
def __init... | <commit_before>from model_mommy import mommy
from tests.BaseTestWithDB import BaseTestWithDB
from topics.models import CurriculumIntegration
from topics.models import CurriculumArea
from topics.models import Lesson
from tests.topics import create_topics_test_data
class CurriculumIntegrationModelTest(BaseTestWithDB):
... |
a00a657eff2b5ffc4453ef751b1d146ca386fd6a | app/views/create_user.py | app/views/create_user.py | from flask import request, flash, render_template
import bcrypt
from app import app, helpers
@app.route('/create_user', methods=['GET', 'POST'])
def create_user():
if request.method == 'POST':
username = request.form.get('username', None).strip() # Aa09_.- allowed
password = request.form.get('pa... | from flask import request, flash, render_template
import re
import bcrypt
from app import app, helpers
@app.route('/create_user', methods=['GET', 'POST'])
def create_user():
if request.method == 'POST':
username = request.form.get('username', None).strip() # Aa09_.- allowed
password = request.fo... | Add re import for regex | Add re import for regex
| Python | agpl-3.0 | kylemh/UO_CIS322,kylemh/UO_CIS322,kylemh/UO_CIS322 | from flask import request, flash, render_template
import bcrypt
from app import app, helpers
@app.route('/create_user', methods=['GET', 'POST'])
def create_user():
if request.method == 'POST':
username = request.form.get('username', None).strip() # Aa09_.- allowed
password = request.form.get('pa... | from flask import request, flash, render_template
import re
import bcrypt
from app import app, helpers
@app.route('/create_user', methods=['GET', 'POST'])
def create_user():
if request.method == 'POST':
username = request.form.get('username', None).strip() # Aa09_.- allowed
password = request.fo... | <commit_before>from flask import request, flash, render_template
import bcrypt
from app import app, helpers
@app.route('/create_user', methods=['GET', 'POST'])
def create_user():
if request.method == 'POST':
username = request.form.get('username', None).strip() # Aa09_.- allowed
password = reque... | from flask import request, flash, render_template
import re
import bcrypt
from app import app, helpers
@app.route('/create_user', methods=['GET', 'POST'])
def create_user():
if request.method == 'POST':
username = request.form.get('username', None).strip() # Aa09_.- allowed
password = request.fo... | from flask import request, flash, render_template
import bcrypt
from app import app, helpers
@app.route('/create_user', methods=['GET', 'POST'])
def create_user():
if request.method == 'POST':
username = request.form.get('username', None).strip() # Aa09_.- allowed
password = request.form.get('pa... | <commit_before>from flask import request, flash, render_template
import bcrypt
from app import app, helpers
@app.route('/create_user', methods=['GET', 'POST'])
def create_user():
if request.method == 'POST':
username = request.form.get('username', None).strip() # Aa09_.- allowed
password = reque... |
a7e22ba37a529ef8997cf252a715abd8dffaf763 | solutions/generalsolution.py | solutions/generalsolution.py | '''generalsolution.py
Holds the general solution base class
Created on 22 Apr 2010
@author: Ian Huston
'''
import numpy as np
class GeneralSolution(object):
"""General solution base class."""
def __init__(self, fixture, srcclass):
"""Create a GeneralSolution object."""
self.srceqns = sr... | '''generalsolution.py
Holds the general solution base class
Created on 22 Apr 2010
@author: Ian Huston
'''
import numpy as np
class GeneralSolution(object):
"""General solution base class."""
def __init__(self, fixture, srcclass):
"""Create a GeneralSolution object."""
self.srceqns = sr... | Remove unused functions from general solution. | Remove unused functions from general solution.
| Python | bsd-3-clause | ihuston/pyflation,ihuston/pyflation | '''generalsolution.py
Holds the general solution base class
Created on 22 Apr 2010
@author: Ian Huston
'''
import numpy as np
class GeneralSolution(object):
"""General solution base class."""
def __init__(self, fixture, srcclass):
"""Create a GeneralSolution object."""
self.srceqns = sr... | '''generalsolution.py
Holds the general solution base class
Created on 22 Apr 2010
@author: Ian Huston
'''
import numpy as np
class GeneralSolution(object):
"""General solution base class."""
def __init__(self, fixture, srcclass):
"""Create a GeneralSolution object."""
self.srceqns = sr... | <commit_before>'''generalsolution.py
Holds the general solution base class
Created on 22 Apr 2010
@author: Ian Huston
'''
import numpy as np
class GeneralSolution(object):
"""General solution base class."""
def __init__(self, fixture, srcclass):
"""Create a GeneralSolution object."""
se... | '''generalsolution.py
Holds the general solution base class
Created on 22 Apr 2010
@author: Ian Huston
'''
import numpy as np
class GeneralSolution(object):
"""General solution base class."""
def __init__(self, fixture, srcclass):
"""Create a GeneralSolution object."""
self.srceqns = sr... | '''generalsolution.py
Holds the general solution base class
Created on 22 Apr 2010
@author: Ian Huston
'''
import numpy as np
class GeneralSolution(object):
"""General solution base class."""
def __init__(self, fixture, srcclass):
"""Create a GeneralSolution object."""
self.srceqns = sr... | <commit_before>'''generalsolution.py
Holds the general solution base class
Created on 22 Apr 2010
@author: Ian Huston
'''
import numpy as np
class GeneralSolution(object):
"""General solution base class."""
def __init__(self, fixture, srcclass):
"""Create a GeneralSolution object."""
se... |
6fb7ae53fd8f47adcc10f61f11fc6954b93c4e1f | test_tododb.py | test_tododb.py | #!/usr/bin/python
# -*- coding:Utf-8 -*-
import unittest
from tododb import TodoDB, TodoAlreadyExist
class MaTest(unittest.TestCase):
def reinitialise(self):
tododb = TodoDB()
tododb.connect()
tododb.drop_db()
tododb.create_db()
return tododb
def test_create_a_db(self... | #!/usr/bin/python
# -*- coding:Utf-8 -*-
import unittest
from tododb import TodoDB, TodoAlreadyExist
class MaTest(unittest.TestCase):
def reinitialise(self):
"""
Reinitialise the db to make test with a clean one
"""
tododb = TodoDB()
tododb.connect()
tododb.drop_db... | Add some doc to the tests | Add some doc to the tests
| Python | agpl-3.0 | Psycojoker/holygrail | #!/usr/bin/python
# -*- coding:Utf-8 -*-
import unittest
from tododb import TodoDB, TodoAlreadyExist
class MaTest(unittest.TestCase):
def reinitialise(self):
tododb = TodoDB()
tododb.connect()
tododb.drop_db()
tododb.create_db()
return tododb
def test_create_a_db(self... | #!/usr/bin/python
# -*- coding:Utf-8 -*-
import unittest
from tododb import TodoDB, TodoAlreadyExist
class MaTest(unittest.TestCase):
def reinitialise(self):
"""
Reinitialise the db to make test with a clean one
"""
tododb = TodoDB()
tododb.connect()
tododb.drop_db... | <commit_before>#!/usr/bin/python
# -*- coding:Utf-8 -*-
import unittest
from tododb import TodoDB, TodoAlreadyExist
class MaTest(unittest.TestCase):
def reinitialise(self):
tododb = TodoDB()
tododb.connect()
tododb.drop_db()
tododb.create_db()
return tododb
def test_c... | #!/usr/bin/python
# -*- coding:Utf-8 -*-
import unittest
from tododb import TodoDB, TodoAlreadyExist
class MaTest(unittest.TestCase):
def reinitialise(self):
"""
Reinitialise the db to make test with a clean one
"""
tododb = TodoDB()
tododb.connect()
tododb.drop_db... | #!/usr/bin/python
# -*- coding:Utf-8 -*-
import unittest
from tododb import TodoDB, TodoAlreadyExist
class MaTest(unittest.TestCase):
def reinitialise(self):
tododb = TodoDB()
tododb.connect()
tododb.drop_db()
tododb.create_db()
return tododb
def test_create_a_db(self... | <commit_before>#!/usr/bin/python
# -*- coding:Utf-8 -*-
import unittest
from tododb import TodoDB, TodoAlreadyExist
class MaTest(unittest.TestCase):
def reinitialise(self):
tododb = TodoDB()
tododb.connect()
tododb.drop_db()
tododb.create_db()
return tododb
def test_c... |
191ce5f1918ec5a9652475d19d806c5ffc8f0f1b | djstripe/__init__.py | djstripe/__init__.py | """
dj-stripe - Django + Stripe Made Easy
"""
import pkg_resources
from django.apps import AppConfig
__version__ = pkg_resources.require("dj-stripe")[0].version
default_app_config = "djstripe.DjstripeAppConfig"
class DjstripeAppConfig(AppConfig):
"""
An AppConfig for dj-stripe which loads system checks
... | """
dj-stripe - Django + Stripe Made Easy
"""
import pkg_resources
from django.apps import AppConfig
__version__ = pkg_resources.get_distribution("dj-stripe").version
default_app_config = "djstripe.DjstripeAppConfig"
class DjstripeAppConfig(AppConfig):
"""
An AppConfig for dj-stripe which loads system check... | Use pkg_resources.get_distribution instead of .require for version | Use pkg_resources.get_distribution instead of .require for version
| Python | mit | dj-stripe/dj-stripe,pydanny/dj-stripe,pydanny/dj-stripe,dj-stripe/dj-stripe | """
dj-stripe - Django + Stripe Made Easy
"""
import pkg_resources
from django.apps import AppConfig
__version__ = pkg_resources.require("dj-stripe")[0].version
default_app_config = "djstripe.DjstripeAppConfig"
class DjstripeAppConfig(AppConfig):
"""
An AppConfig for dj-stripe which loads system checks
... | """
dj-stripe - Django + Stripe Made Easy
"""
import pkg_resources
from django.apps import AppConfig
__version__ = pkg_resources.get_distribution("dj-stripe").version
default_app_config = "djstripe.DjstripeAppConfig"
class DjstripeAppConfig(AppConfig):
"""
An AppConfig for dj-stripe which loads system check... | <commit_before>"""
dj-stripe - Django + Stripe Made Easy
"""
import pkg_resources
from django.apps import AppConfig
__version__ = pkg_resources.require("dj-stripe")[0].version
default_app_config = "djstripe.DjstripeAppConfig"
class DjstripeAppConfig(AppConfig):
"""
An AppConfig for dj-stripe which loads sys... | """
dj-stripe - Django + Stripe Made Easy
"""
import pkg_resources
from django.apps import AppConfig
__version__ = pkg_resources.get_distribution("dj-stripe").version
default_app_config = "djstripe.DjstripeAppConfig"
class DjstripeAppConfig(AppConfig):
"""
An AppConfig for dj-stripe which loads system check... | """
dj-stripe - Django + Stripe Made Easy
"""
import pkg_resources
from django.apps import AppConfig
__version__ = pkg_resources.require("dj-stripe")[0].version
default_app_config = "djstripe.DjstripeAppConfig"
class DjstripeAppConfig(AppConfig):
"""
An AppConfig for dj-stripe which loads system checks
... | <commit_before>"""
dj-stripe - Django + Stripe Made Easy
"""
import pkg_resources
from django.apps import AppConfig
__version__ = pkg_resources.require("dj-stripe")[0].version
default_app_config = "djstripe.DjstripeAppConfig"
class DjstripeAppConfig(AppConfig):
"""
An AppConfig for dj-stripe which loads sys... |
786903e417c7dfd8773db10fcc7cd5fa1130272a | candidates/tests/test_caching.py | candidates/tests/test_caching.py | from __future__ import unicode_literals
from django_webtest import WebTest
from .auth import TestUserMixin
from .uk_examples import UK2015ExamplesMixin
class TestCaching(TestUserMixin, UK2015ExamplesMixin, WebTest):
def setUp(self):
super(TestCaching, self).setUp()
def test_unauth_user_cache_heade... | from __future__ import unicode_literals
from django_webtest import WebTest
from .auth import TestUserMixin
from .uk_examples import UK2015ExamplesMixin
class TestCaching(TestUserMixin, UK2015ExamplesMixin, WebTest):
def setUp(self):
super(TestCaching, self).setUp()
def test_unauth_user_cache_heade... | Make a test of multiple header values insensitve to their order | Make a test of multiple header values insensitve to their order
This test sometimes failed on Python 3 because the values in the header
were ordered differently - splitting them and comparing as a set should
fix that.
| Python | agpl-3.0 | DemocracyClub/yournextrepresentative,DemocracyClub/yournextrepresentative,DemocracyClub/yournextrepresentative | from __future__ import unicode_literals
from django_webtest import WebTest
from .auth import TestUserMixin
from .uk_examples import UK2015ExamplesMixin
class TestCaching(TestUserMixin, UK2015ExamplesMixin, WebTest):
def setUp(self):
super(TestCaching, self).setUp()
def test_unauth_user_cache_heade... | from __future__ import unicode_literals
from django_webtest import WebTest
from .auth import TestUserMixin
from .uk_examples import UK2015ExamplesMixin
class TestCaching(TestUserMixin, UK2015ExamplesMixin, WebTest):
def setUp(self):
super(TestCaching, self).setUp()
def test_unauth_user_cache_heade... | <commit_before>from __future__ import unicode_literals
from django_webtest import WebTest
from .auth import TestUserMixin
from .uk_examples import UK2015ExamplesMixin
class TestCaching(TestUserMixin, UK2015ExamplesMixin, WebTest):
def setUp(self):
super(TestCaching, self).setUp()
def test_unauth_u... | from __future__ import unicode_literals
from django_webtest import WebTest
from .auth import TestUserMixin
from .uk_examples import UK2015ExamplesMixin
class TestCaching(TestUserMixin, UK2015ExamplesMixin, WebTest):
def setUp(self):
super(TestCaching, self).setUp()
def test_unauth_user_cache_heade... | from __future__ import unicode_literals
from django_webtest import WebTest
from .auth import TestUserMixin
from .uk_examples import UK2015ExamplesMixin
class TestCaching(TestUserMixin, UK2015ExamplesMixin, WebTest):
def setUp(self):
super(TestCaching, self).setUp()
def test_unauth_user_cache_heade... | <commit_before>from __future__ import unicode_literals
from django_webtest import WebTest
from .auth import TestUserMixin
from .uk_examples import UK2015ExamplesMixin
class TestCaching(TestUserMixin, UK2015ExamplesMixin, WebTest):
def setUp(self):
super(TestCaching, self).setUp()
def test_unauth_u... |
17078f38c61fd012121aacb12683864592f31e79 | bqueryd/util.py | bqueryd/util.py | import netifaces
def get_my_ip():
eth_interfaces = [ifname for ifname in netifaces.interfaces() if ifname.startswith('eth')]
if len(eth_interfaces) < 1:
ifname = 'lo'
else:
ifname = eth_interfaces[0]
for x in netifaces.ifaddresses(ifname)[netifaces.AF_INET]:
# Return first addr ... | import netifaces
import zmq
import random
def get_my_ip():
eth_interfaces = [ifname for ifname in netifaces.interfaces() if ifname.startswith('eth')]
if len(eth_interfaces) < 1:
ifname = 'lo'
else:
ifname = eth_interfaces[0]
for x in netifaces.ifaddresses(ifname)[netifaces.AF_INET]:
... | Add binding to random port with identity | Add binding to random port with identity
| Python | bsd-3-clause | visualfabriq/bqueryd | import netifaces
def get_my_ip():
eth_interfaces = [ifname for ifname in netifaces.interfaces() if ifname.startswith('eth')]
if len(eth_interfaces) < 1:
ifname = 'lo'
else:
ifname = eth_interfaces[0]
for x in netifaces.ifaddresses(ifname)[netifaces.AF_INET]:
# Return first addr ... | import netifaces
import zmq
import random
def get_my_ip():
eth_interfaces = [ifname for ifname in netifaces.interfaces() if ifname.startswith('eth')]
if len(eth_interfaces) < 1:
ifname = 'lo'
else:
ifname = eth_interfaces[0]
for x in netifaces.ifaddresses(ifname)[netifaces.AF_INET]:
... | <commit_before>import netifaces
def get_my_ip():
eth_interfaces = [ifname for ifname in netifaces.interfaces() if ifname.startswith('eth')]
if len(eth_interfaces) < 1:
ifname = 'lo'
else:
ifname = eth_interfaces[0]
for x in netifaces.ifaddresses(ifname)[netifaces.AF_INET]:
# Ret... | import netifaces
import zmq
import random
def get_my_ip():
eth_interfaces = [ifname for ifname in netifaces.interfaces() if ifname.startswith('eth')]
if len(eth_interfaces) < 1:
ifname = 'lo'
else:
ifname = eth_interfaces[0]
for x in netifaces.ifaddresses(ifname)[netifaces.AF_INET]:
... | import netifaces
def get_my_ip():
eth_interfaces = [ifname for ifname in netifaces.interfaces() if ifname.startswith('eth')]
if len(eth_interfaces) < 1:
ifname = 'lo'
else:
ifname = eth_interfaces[0]
for x in netifaces.ifaddresses(ifname)[netifaces.AF_INET]:
# Return first addr ... | <commit_before>import netifaces
def get_my_ip():
eth_interfaces = [ifname for ifname in netifaces.interfaces() if ifname.startswith('eth')]
if len(eth_interfaces) < 1:
ifname = 'lo'
else:
ifname = eth_interfaces[0]
for x in netifaces.ifaddresses(ifname)[netifaces.AF_INET]:
# Ret... |
10b3e9a6b0af8058694811d2dc2771a476078b59 | keep/commands/cmd_run.py | keep/commands/cmd_run.py | import json
import os
import re
import click
from keep import cli, utils
@click.command('run', short_help='Executes a saved command.')
@click.argument('pattern')
@cli.pass_context
def cli(ctx, pattern):
"""Executes a saved command."""
json_path = os.path.join(os.path.expanduser('~'), '.keep', 'commands.json')... | import json
import os
import re
import click
from keep import cli, utils
@click.command('run', short_help='Executes a saved command.')
@click.argument('pattern')
@cli.pass_context
def cli(ctx, pattern):
"""Executes a saved command."""
json_path = os.path.join(os.path.expanduser('~'), '.keep', 'commands.json')... | Fix repeated prompt bug in keep run | Fix repeated prompt bug in keep run
| Python | mit | paci4416/keep,OrkoHunter/keep,paci4416/keep,OrkoHunter/keep | import json
import os
import re
import click
from keep import cli, utils
@click.command('run', short_help='Executes a saved command.')
@click.argument('pattern')
@cli.pass_context
def cli(ctx, pattern):
"""Executes a saved command."""
json_path = os.path.join(os.path.expanduser('~'), '.keep', 'commands.json')... | import json
import os
import re
import click
from keep import cli, utils
@click.command('run', short_help='Executes a saved command.')
@click.argument('pattern')
@cli.pass_context
def cli(ctx, pattern):
"""Executes a saved command."""
json_path = os.path.join(os.path.expanduser('~'), '.keep', 'commands.json')... | <commit_before>import json
import os
import re
import click
from keep import cli, utils
@click.command('run', short_help='Executes a saved command.')
@click.argument('pattern')
@cli.pass_context
def cli(ctx, pattern):
"""Executes a saved command."""
json_path = os.path.join(os.path.expanduser('~'), '.keep', '... | import json
import os
import re
import click
from keep import cli, utils
@click.command('run', short_help='Executes a saved command.')
@click.argument('pattern')
@cli.pass_context
def cli(ctx, pattern):
"""Executes a saved command."""
json_path = os.path.join(os.path.expanduser('~'), '.keep', 'commands.json')... | import json
import os
import re
import click
from keep import cli, utils
@click.command('run', short_help='Executes a saved command.')
@click.argument('pattern')
@cli.pass_context
def cli(ctx, pattern):
"""Executes a saved command."""
json_path = os.path.join(os.path.expanduser('~'), '.keep', 'commands.json')... | <commit_before>import json
import os
import re
import click
from keep import cli, utils
@click.command('run', short_help='Executes a saved command.')
@click.argument('pattern')
@cli.pass_context
def cli(ctx, pattern):
"""Executes a saved command."""
json_path = os.path.join(os.path.expanduser('~'), '.keep', '... |
b73b8797c3c9c6c9aa92bd6873e15a5b717f4142 | test/test_nap.py | test/test_nap.py | """
Tests for nap module.
These tests only focus that requests is called properly.
Everything related to HTTP requests should be tested in requests' own tests.
"""
import unittest
import requests
from nap.api import Api
class TestNap(unittest.TestCase):
def test_unallowed_method(self):
"""Tries to use... | """
Tests for nap module.
These tests only focus that requests is called properly.
Everything related to HTTP requests should be tested in requests' own tests.
"""
from mock import MagicMock, patch
import unittest
import requests
from nap.api import Api
class TestNap(unittest.TestCase):
def test_unallowed_met... | Add tests which test default parameters for nap api | Add tests which test default parameters for nap api
| Python | mit | kimmobrunfeldt/nap | """
Tests for nap module.
These tests only focus that requests is called properly.
Everything related to HTTP requests should be tested in requests' own tests.
"""
import unittest
import requests
from nap.api import Api
class TestNap(unittest.TestCase):
def test_unallowed_method(self):
"""Tries to use... | """
Tests for nap module.
These tests only focus that requests is called properly.
Everything related to HTTP requests should be tested in requests' own tests.
"""
from mock import MagicMock, patch
import unittest
import requests
from nap.api import Api
class TestNap(unittest.TestCase):
def test_unallowed_met... | <commit_before>"""
Tests for nap module.
These tests only focus that requests is called properly.
Everything related to HTTP requests should be tested in requests' own tests.
"""
import unittest
import requests
from nap.api import Api
class TestNap(unittest.TestCase):
def test_unallowed_method(self):
... | """
Tests for nap module.
These tests only focus that requests is called properly.
Everything related to HTTP requests should be tested in requests' own tests.
"""
from mock import MagicMock, patch
import unittest
import requests
from nap.api import Api
class TestNap(unittest.TestCase):
def test_unallowed_met... | """
Tests for nap module.
These tests only focus that requests is called properly.
Everything related to HTTP requests should be tested in requests' own tests.
"""
import unittest
import requests
from nap.api import Api
class TestNap(unittest.TestCase):
def test_unallowed_method(self):
"""Tries to use... | <commit_before>"""
Tests for nap module.
These tests only focus that requests is called properly.
Everything related to HTTP requests should be tested in requests' own tests.
"""
import unittest
import requests
from nap.api import Api
class TestNap(unittest.TestCase):
def test_unallowed_method(self):
... |
30c875e1ba1dec3bcbd22850cd703198bcc5a1fb | peeringdb/migrations/0013_auto_20201207_2233.py | peeringdb/migrations/0013_auto_20201207_2233.py | # Generated by Django 3.1.3 on 2020-12-07 21:33
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
("peeringdb", "0012_peerrecord_visible"),
]
def flush_peeringdb_tables(apps, schema_editor):
apps.get_model("peeringdb", "Contact").objects.all().dele... | # Generated by Django 3.1.3 on 2020-12-07 21:33
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
("peeringdb", "0012_peerrecord_visible"),
]
def flush_peeringdb_tables(apps, schema_editor):
apps.get_model("peeringdb", "Contact").objects.all().dele... | Remove PeeringDB sync records on migrate | Remove PeeringDB sync records on migrate
| Python | apache-2.0 | respawner/peering-manager,respawner/peering-manager,respawner/peering-manager,respawner/peering-manager | # Generated by Django 3.1.3 on 2020-12-07 21:33
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
("peeringdb", "0012_peerrecord_visible"),
]
def flush_peeringdb_tables(apps, schema_editor):
apps.get_model("peeringdb", "Contact").objects.all().dele... | # Generated by Django 3.1.3 on 2020-12-07 21:33
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
("peeringdb", "0012_peerrecord_visible"),
]
def flush_peeringdb_tables(apps, schema_editor):
apps.get_model("peeringdb", "Contact").objects.all().dele... | <commit_before># Generated by Django 3.1.3 on 2020-12-07 21:33
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
("peeringdb", "0012_peerrecord_visible"),
]
def flush_peeringdb_tables(apps, schema_editor):
apps.get_model("peeringdb", "Contact").obj... | # Generated by Django 3.1.3 on 2020-12-07 21:33
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
("peeringdb", "0012_peerrecord_visible"),
]
def flush_peeringdb_tables(apps, schema_editor):
apps.get_model("peeringdb", "Contact").objects.all().dele... | # Generated by Django 3.1.3 on 2020-12-07 21:33
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
("peeringdb", "0012_peerrecord_visible"),
]
def flush_peeringdb_tables(apps, schema_editor):
apps.get_model("peeringdb", "Contact").objects.all().dele... | <commit_before># Generated by Django 3.1.3 on 2020-12-07 21:33
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
("peeringdb", "0012_peerrecord_visible"),
]
def flush_peeringdb_tables(apps, schema_editor):
apps.get_model("peeringdb", "Contact").obj... |
bfe49055d0e63e37041bf99ecfb36a5584c263c6 | sale_properties_easy_creation/mrp_property_formula.py | sale_properties_easy_creation/mrp_property_formula.py | # -*- coding: utf-8 -*-
##############################################################################
#
# Copyright (C) 2014-15 Agile Business Group sagl
# (<http://www.agilebg.com>)
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Publ... | # -*- coding: utf-8 -*-
##############################################################################
#
# Copyright (C) 2014-15 Agile Business Group sagl
# (<http://www.agilebg.com>)
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Publ... | Add compute_formula method to MrpPropertyFormula to use in modules which depending on it | Add compute_formula method to MrpPropertyFormula to use in modules which depending on it
| Python | agpl-3.0 | acsone/sale-workflow,thomaspaulb/sale-workflow,factorlibre/sale-workflow,Eficent/sale-workflow,diagramsoftware/sale-workflow,jabibi/sale-workflow,akretion/sale-workflow,brain-tec/sale-workflow,ddico/sale-workflow,acsone/sale-workflow,brain-tec/sale-workflow,open-synergy/sale-workflow,akretion/sale-workflow,fevxie/sale-... | # -*- coding: utf-8 -*-
##############################################################################
#
# Copyright (C) 2014-15 Agile Business Group sagl
# (<http://www.agilebg.com>)
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Publ... | # -*- coding: utf-8 -*-
##############################################################################
#
# Copyright (C) 2014-15 Agile Business Group sagl
# (<http://www.agilebg.com>)
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Publ... | <commit_before># -*- coding: utf-8 -*-
##############################################################################
#
# Copyright (C) 2014-15 Agile Business Group sagl
# (<http://www.agilebg.com>)
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affe... | # -*- coding: utf-8 -*-
##############################################################################
#
# Copyright (C) 2014-15 Agile Business Group sagl
# (<http://www.agilebg.com>)
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Publ... | # -*- coding: utf-8 -*-
##############################################################################
#
# Copyright (C) 2014-15 Agile Business Group sagl
# (<http://www.agilebg.com>)
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Publ... | <commit_before># -*- coding: utf-8 -*-
##############################################################################
#
# Copyright (C) 2014-15 Agile Business Group sagl
# (<http://www.agilebg.com>)
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affe... |
a8e8c8c33075c4e60467da4e1f8e05e35351b07f | url_shortener/default_config.py | url_shortener/default_config.py | # -*- coding: utf-8 -*-
''' Default configuration for the application
This data must be supplemented with custom configuration to which
URL_SHORTENER_CONFIGURATION environment variable points, overriding
some of the values specified here.
:var SQLALCHEMY_DATABASE_URI: uri of database to be used by the application.
T... | # -*- coding: utf-8 -*-
''' Default configuration for the application
This data must be supplemented with custom configuration to which
URL_SHORTENER_CONFIGURATION environment variable points, overriding
some of the values specified here.
:var SQLALCHEMY_DATABASE_URI: uri of database to be used by the application.
T... | Add configuration values for length of newly generated aliases | Add configuration values for length of newly generated aliases
| Python | mit | piotr-rusin/url-shortener,piotr-rusin/url-shortener | # -*- coding: utf-8 -*-
''' Default configuration for the application
This data must be supplemented with custom configuration to which
URL_SHORTENER_CONFIGURATION environment variable points, overriding
some of the values specified here.
:var SQLALCHEMY_DATABASE_URI: uri of database to be used by the application.
T... | # -*- coding: utf-8 -*-
''' Default configuration for the application
This data must be supplemented with custom configuration to which
URL_SHORTENER_CONFIGURATION environment variable points, overriding
some of the values specified here.
:var SQLALCHEMY_DATABASE_URI: uri of database to be used by the application.
T... | <commit_before># -*- coding: utf-8 -*-
''' Default configuration for the application
This data must be supplemented with custom configuration to which
URL_SHORTENER_CONFIGURATION environment variable points, overriding
some of the values specified here.
:var SQLALCHEMY_DATABASE_URI: uri of database to be used by the ... | # -*- coding: utf-8 -*-
''' Default configuration for the application
This data must be supplemented with custom configuration to which
URL_SHORTENER_CONFIGURATION environment variable points, overriding
some of the values specified here.
:var SQLALCHEMY_DATABASE_URI: uri of database to be used by the application.
T... | # -*- coding: utf-8 -*-
''' Default configuration for the application
This data must be supplemented with custom configuration to which
URL_SHORTENER_CONFIGURATION environment variable points, overriding
some of the values specified here.
:var SQLALCHEMY_DATABASE_URI: uri of database to be used by the application.
T... | <commit_before># -*- coding: utf-8 -*-
''' Default configuration for the application
This data must be supplemented with custom configuration to which
URL_SHORTENER_CONFIGURATION environment variable points, overriding
some of the values specified here.
:var SQLALCHEMY_DATABASE_URI: uri of database to be used by the ... |
564eb46a3e49ce94a913234895053acf3ef772f9 | cdkmod/setup.py | cdkmod/setup.py | # -*- coding: utf-8 -*-
from setuptools import setup, find_packages
with open('README.rst') as f:
readme = f.read()
with open('LICENSE') as f:
license = f.read()
# I wish there was a way to do this w/o having to put data files in
# package dir. Couldn't ever get data_files arg working correctly...
setup(
... | # -*- coding: utf-8 -*-
from setuptools import setup, find_packages
with open('README.rst') as f:
readme = f.read()
with open('LICENSE') as f:
license = f.read()
# I wish there was a way to do this w/o having to put data files in
# package dir. Couldn't ever get data_files arg working correctly...
setup(
... | Update requirements where it matters | Update requirements where it matters
| Python | apache-2.0 | twitter/cdk,twitter/cdk,twitter/cdk | # -*- coding: utf-8 -*-
from setuptools import setup, find_packages
with open('README.rst') as f:
readme = f.read()
with open('LICENSE') as f:
license = f.read()
# I wish there was a way to do this w/o having to put data files in
# package dir. Couldn't ever get data_files arg working correctly...
setup(
... | # -*- coding: utf-8 -*-
from setuptools import setup, find_packages
with open('README.rst') as f:
readme = f.read()
with open('LICENSE') as f:
license = f.read()
# I wish there was a way to do this w/o having to put data files in
# package dir. Couldn't ever get data_files arg working correctly...
setup(
... | <commit_before># -*- coding: utf-8 -*-
from setuptools import setup, find_packages
with open('README.rst') as f:
readme = f.read()
with open('LICENSE') as f:
license = f.read()
# I wish there was a way to do this w/o having to put data files in
# package dir. Couldn't ever get data_files arg working correctl... | # -*- coding: utf-8 -*-
from setuptools import setup, find_packages
with open('README.rst') as f:
readme = f.read()
with open('LICENSE') as f:
license = f.read()
# I wish there was a way to do this w/o having to put data files in
# package dir. Couldn't ever get data_files arg working correctly...
setup(
... | # -*- coding: utf-8 -*-
from setuptools import setup, find_packages
with open('README.rst') as f:
readme = f.read()
with open('LICENSE') as f:
license = f.read()
# I wish there was a way to do this w/o having to put data files in
# package dir. Couldn't ever get data_files arg working correctly...
setup(
... | <commit_before># -*- coding: utf-8 -*-
from setuptools import setup, find_packages
with open('README.rst') as f:
readme = f.read()
with open('LICENSE') as f:
license = f.read()
# I wish there was a way to do this w/o having to put data files in
# package dir. Couldn't ever get data_files arg working correctl... |
c42e0974424d056e306e3f51e8345f2a9600b2dc | extract_language_package.py | extract_language_package.py | import optparse
import os
import glob
optparser = optparse.OptionParser()
optparser.add_option("-f", "--filename", dest="filename", help="Language package file")
optparser.add_option("-d", "--destination", dest="destination", help="Base destination folder")
optparser.add_option("-l", "--language", dest="language", hel... | import optparse
import os
import glob
optparser = optparse.OptionParser()
optparser.add_option("-f", "--filename", dest="filename", help="Language package file")
optparser.add_option("-d", "--destination", dest="destination", help="Base destination folder")
optparser.add_option("-l", "--language", dest="language", hel... | Update extract language package to use inner delete commands to reduce the amount of space used at any given point in time. | Update extract language package to use inner delete commands to reduce the
amount of space used at any given point in time.
| Python | mit | brendandc/multilingual-google-image-scraper | import optparse
import os
import glob
optparser = optparse.OptionParser()
optparser.add_option("-f", "--filename", dest="filename", help="Language package file")
optparser.add_option("-d", "--destination", dest="destination", help="Base destination folder")
optparser.add_option("-l", "--language", dest="language", hel... | import optparse
import os
import glob
optparser = optparse.OptionParser()
optparser.add_option("-f", "--filename", dest="filename", help="Language package file")
optparser.add_option("-d", "--destination", dest="destination", help="Base destination folder")
optparser.add_option("-l", "--language", dest="language", hel... | <commit_before>import optparse
import os
import glob
optparser = optparse.OptionParser()
optparser.add_option("-f", "--filename", dest="filename", help="Language package file")
optparser.add_option("-d", "--destination", dest="destination", help="Base destination folder")
optparser.add_option("-l", "--language", dest=... | import optparse
import os
import glob
optparser = optparse.OptionParser()
optparser.add_option("-f", "--filename", dest="filename", help="Language package file")
optparser.add_option("-d", "--destination", dest="destination", help="Base destination folder")
optparser.add_option("-l", "--language", dest="language", hel... | import optparse
import os
import glob
optparser = optparse.OptionParser()
optparser.add_option("-f", "--filename", dest="filename", help="Language package file")
optparser.add_option("-d", "--destination", dest="destination", help="Base destination folder")
optparser.add_option("-l", "--language", dest="language", hel... | <commit_before>import optparse
import os
import glob
optparser = optparse.OptionParser()
optparser.add_option("-f", "--filename", dest="filename", help="Language package file")
optparser.add_option("-d", "--destination", dest="destination", help="Base destination folder")
optparser.add_option("-l", "--language", dest=... |
fa518cdae22c1a762a593f3c4c67fadb04beb5e6 | corehq/apps/reports/standard/cases/case_list_explorer.py | corehq/apps/reports/standard/cases/case_list_explorer.py | from __future__ import absolute_import, unicode_literals
from django.utils.translation import ugettext_lazy as _
from corehq.apps.es.case_search import CaseSearchES
from corehq.apps.reports.standard.cases.basic import CaseListReport
class CaseListExplorer(CaseListReport):
name = _('Case List Explorer')
slug... | from __future__ import absolute_import, unicode_literals
from django.utils.translation import ugettext_lazy as _
from corehq.apps.es.case_search import CaseSearchES
from corehq.apps.reports.standard.cases.basic import CaseListReport
from corehq.apps.reports.standard.cases.filters import (
XpathCaseSearchFilter,
)... | Add XPath Query filter to report | Add XPath Query filter to report
| Python | bsd-3-clause | dimagi/commcare-hq,dimagi/commcare-hq,dimagi/commcare-hq,dimagi/commcare-hq,dimagi/commcare-hq | from __future__ import absolute_import, unicode_literals
from django.utils.translation import ugettext_lazy as _
from corehq.apps.es.case_search import CaseSearchES
from corehq.apps.reports.standard.cases.basic import CaseListReport
class CaseListExplorer(CaseListReport):
name = _('Case List Explorer')
slug... | from __future__ import absolute_import, unicode_literals
from django.utils.translation import ugettext_lazy as _
from corehq.apps.es.case_search import CaseSearchES
from corehq.apps.reports.standard.cases.basic import CaseListReport
from corehq.apps.reports.standard.cases.filters import (
XpathCaseSearchFilter,
)... | <commit_before>from __future__ import absolute_import, unicode_literals
from django.utils.translation import ugettext_lazy as _
from corehq.apps.es.case_search import CaseSearchES
from corehq.apps.reports.standard.cases.basic import CaseListReport
class CaseListExplorer(CaseListReport):
name = _('Case List Expl... | from __future__ import absolute_import, unicode_literals
from django.utils.translation import ugettext_lazy as _
from corehq.apps.es.case_search import CaseSearchES
from corehq.apps.reports.standard.cases.basic import CaseListReport
from corehq.apps.reports.standard.cases.filters import (
XpathCaseSearchFilter,
)... | from __future__ import absolute_import, unicode_literals
from django.utils.translation import ugettext_lazy as _
from corehq.apps.es.case_search import CaseSearchES
from corehq.apps.reports.standard.cases.basic import CaseListReport
class CaseListExplorer(CaseListReport):
name = _('Case List Explorer')
slug... | <commit_before>from __future__ import absolute_import, unicode_literals
from django.utils.translation import ugettext_lazy as _
from corehq.apps.es.case_search import CaseSearchES
from corehq.apps.reports.standard.cases.basic import CaseListReport
class CaseListExplorer(CaseListReport):
name = _('Case List Expl... |
0ec3481ddd1ecf76cd7225427532075ce83be1b9 | partner_firstname/migrations/12.0.1.0.0/pre-ir_config_param.py | partner_firstname/migrations/12.0.1.0.0/pre-ir_config_param.py | def store_ir_config_param(cr):
"""Prior to version 12.0 the default order of partner
names was last_first. In order to retain this behaviour we
store the config parameter if it is not present.
"""
cr.execute("SELECT 1 FROM ir_config_parameter "
"WHERE name = 'partner_names_order'")
... | def store_ir_config_param(cr):
"""Prior to version 12.0 the default order of partner
names was last_first. In order to retain this behaviour we
store the config parameter if it is not present.
"""
cr.execute("SELECT 1 FROM ir_config_parameter "
"WHERE key = 'partner_names_order'")
... | Fix migration script 12.0.1.0.0 of partner_firstname | [12.0] Fix migration script 12.0.1.0.0 of partner_firstname
| Python | agpl-3.0 | Vauxoo/partner-contact,Vauxoo/partner-contact | def store_ir_config_param(cr):
"""Prior to version 12.0 the default order of partner
names was last_first. In order to retain this behaviour we
store the config parameter if it is not present.
"""
cr.execute("SELECT 1 FROM ir_config_parameter "
"WHERE name = 'partner_names_order'")
... | def store_ir_config_param(cr):
"""Prior to version 12.0 the default order of partner
names was last_first. In order to retain this behaviour we
store the config parameter if it is not present.
"""
cr.execute("SELECT 1 FROM ir_config_parameter "
"WHERE key = 'partner_names_order'")
... | <commit_before>def store_ir_config_param(cr):
"""Prior to version 12.0 the default order of partner
names was last_first. In order to retain this behaviour we
store the config parameter if it is not present.
"""
cr.execute("SELECT 1 FROM ir_config_parameter "
"WHERE name = 'partner_n... | def store_ir_config_param(cr):
"""Prior to version 12.0 the default order of partner
names was last_first. In order to retain this behaviour we
store the config parameter if it is not present.
"""
cr.execute("SELECT 1 FROM ir_config_parameter "
"WHERE key = 'partner_names_order'")
... | def store_ir_config_param(cr):
"""Prior to version 12.0 the default order of partner
names was last_first. In order to retain this behaviour we
store the config parameter if it is not present.
"""
cr.execute("SELECT 1 FROM ir_config_parameter "
"WHERE name = 'partner_names_order'")
... | <commit_before>def store_ir_config_param(cr):
"""Prior to version 12.0 the default order of partner
names was last_first. In order to retain this behaviour we
store the config parameter if it is not present.
"""
cr.execute("SELECT 1 FROM ir_config_parameter "
"WHERE name = 'partner_n... |
0e807b46ba044e1accb8fb767f6f2ed4ffb2d0ba | dataportal/tests/test_broker.py | dataportal/tests/test_broker.py | import unittest
from datetime import datetime
import numpy as np
import pandas as pd
from ..sources import channelarchiver as ca
from ..sources import switch
class TestBroker(unittest.TestCase):
def setUp(self):
switch(channelarchiver=False, metadatastore=False, filestore=False)
start, end = '201... | import unittest
from datetime import datetime
import numpy as np
import pandas as pd
from ..sources import channelarchiver as ca
from ..sources import switch
from ..examples.sample_data import temperature_ramp
from ..broker import DataBroker as db
class TestBroker(unittest.TestCase):
def setUp(self):
swi... | Add coverage for basic broker usage. | TST: Add coverage for basic broker usage.
| Python | bsd-3-clause | danielballan/dataportal,ericdill/datamuxer,danielballan/dataportal,NSLS-II/dataportal,NSLS-II/datamuxer,ericdill/datamuxer,tacaswell/dataportal,ericdill/databroker,danielballan/datamuxer,tacaswell/dataportal,danielballan/datamuxer,NSLS-II/dataportal,ericdill/databroker | import unittest
from datetime import datetime
import numpy as np
import pandas as pd
from ..sources import channelarchiver as ca
from ..sources import switch
class TestBroker(unittest.TestCase):
def setUp(self):
switch(channelarchiver=False, metadatastore=False, filestore=False)
start, end = '201... | import unittest
from datetime import datetime
import numpy as np
import pandas as pd
from ..sources import channelarchiver as ca
from ..sources import switch
from ..examples.sample_data import temperature_ramp
from ..broker import DataBroker as db
class TestBroker(unittest.TestCase):
def setUp(self):
swi... | <commit_before>import unittest
from datetime import datetime
import numpy as np
import pandas as pd
from ..sources import channelarchiver as ca
from ..sources import switch
class TestBroker(unittest.TestCase):
def setUp(self):
switch(channelarchiver=False, metadatastore=False, filestore=False)
st... | import unittest
from datetime import datetime
import numpy as np
import pandas as pd
from ..sources import channelarchiver as ca
from ..sources import switch
from ..examples.sample_data import temperature_ramp
from ..broker import DataBroker as db
class TestBroker(unittest.TestCase):
def setUp(self):
swi... | import unittest
from datetime import datetime
import numpy as np
import pandas as pd
from ..sources import channelarchiver as ca
from ..sources import switch
class TestBroker(unittest.TestCase):
def setUp(self):
switch(channelarchiver=False, metadatastore=False, filestore=False)
start, end = '201... | <commit_before>import unittest
from datetime import datetime
import numpy as np
import pandas as pd
from ..sources import channelarchiver as ca
from ..sources import switch
class TestBroker(unittest.TestCase):
def setUp(self):
switch(channelarchiver=False, metadatastore=False, filestore=False)
st... |
8857ab5642e49761cc65093132352071ec28dba2 | dataviva/utils/upload_helper.py | dataviva/utils/upload_helper.py | import boto3
from boto3.s3.transfer import S3Transfer
from config import AWS_ACCESS_KEY, AWS_SECRET_KEY
def delete_s3_file(file_id):
client = boto3.client(
's3',
aws_access_key_id=AWS_ACCESS_KEY,
aws_secret_access_key=AWS_SECRET_KEY
)
return client.delete_object(
Bucket='d... | import boto3
from boto3.s3.transfer import S3Transfer
from config import AWS_ACCESS_KEY, AWS_SECRET_KEY
def delete_s3_file(file_id):
client = boto3.client(
's3',
aws_access_key_id=AWS_ACCESS_KEY,
aws_secret_access_key=AWS_SECRET_KEY
)
return client.delete_object(
Bucket='d... | Fix s3 upload file extra_args named paramether | Fix s3 upload file extra_args named paramether
| Python | mit | DataViva/dataviva-site,DataViva/dataviva-site,DataViva/dataviva-site,DataViva/dataviva-site | import boto3
from boto3.s3.transfer import S3Transfer
from config import AWS_ACCESS_KEY, AWS_SECRET_KEY
def delete_s3_file(file_id):
client = boto3.client(
's3',
aws_access_key_id=AWS_ACCESS_KEY,
aws_secret_access_key=AWS_SECRET_KEY
)
return client.delete_object(
Bucket='d... | import boto3
from boto3.s3.transfer import S3Transfer
from config import AWS_ACCESS_KEY, AWS_SECRET_KEY
def delete_s3_file(file_id):
client = boto3.client(
's3',
aws_access_key_id=AWS_ACCESS_KEY,
aws_secret_access_key=AWS_SECRET_KEY
)
return client.delete_object(
Bucket='d... | <commit_before>import boto3
from boto3.s3.transfer import S3Transfer
from config import AWS_ACCESS_KEY, AWS_SECRET_KEY
def delete_s3_file(file_id):
client = boto3.client(
's3',
aws_access_key_id=AWS_ACCESS_KEY,
aws_secret_access_key=AWS_SECRET_KEY
)
return client.delete_object(
... | import boto3
from boto3.s3.transfer import S3Transfer
from config import AWS_ACCESS_KEY, AWS_SECRET_KEY
def delete_s3_file(file_id):
client = boto3.client(
's3',
aws_access_key_id=AWS_ACCESS_KEY,
aws_secret_access_key=AWS_SECRET_KEY
)
return client.delete_object(
Bucket='d... | import boto3
from boto3.s3.transfer import S3Transfer
from config import AWS_ACCESS_KEY, AWS_SECRET_KEY
def delete_s3_file(file_id):
client = boto3.client(
's3',
aws_access_key_id=AWS_ACCESS_KEY,
aws_secret_access_key=AWS_SECRET_KEY
)
return client.delete_object(
Bucket='d... | <commit_before>import boto3
from boto3.s3.transfer import S3Transfer
from config import AWS_ACCESS_KEY, AWS_SECRET_KEY
def delete_s3_file(file_id):
client = boto3.client(
's3',
aws_access_key_id=AWS_ACCESS_KEY,
aws_secret_access_key=AWS_SECRET_KEY
)
return client.delete_object(
... |
315a5c25429b3910446714238c28382ba727add8 | copywriting/urls.py | copywriting/urls.py | from django.conf.urls.defaults import *
from .feed import blogFeed
urlpatterns = patterns('copywriting',
(r'^feed\.rss$', blogFeed()),
(r'^feed/$', blogFeed()),
(r'^tag/(?P<in_tag>\w+)/$', 'views.withTag'),
... | from django.conf.urls.defaults import *
from .feed import blogFeed
urlpatterns = patterns('copywriting',
(r'^feed\.rss$', blogFeed()),
(r'^feed/$', blogFeed()),
(r'^tag/(?P<in_tag>\w[\w-]+)/$', 'views.withTag'),
# (r'^(?P<year>\d+)/(?P<month>\d+)/(?P<day>\d+)/$', 'views.listBlogEntriesByYearMonthDay'),... | Allow slugs in url patterns | Allow slugs in url patterns
| Python | mit | arteria/django-copywriting,arteria/django-copywriting | from django.conf.urls.defaults import *
from .feed import blogFeed
urlpatterns = patterns('copywriting',
(r'^feed\.rss$', blogFeed()),
(r'^feed/$', blogFeed()),
(r'^tag/(?P<in_tag>\w+)/$', 'views.withTag'),
... | from django.conf.urls.defaults import *
from .feed import blogFeed
urlpatterns = patterns('copywriting',
(r'^feed\.rss$', blogFeed()),
(r'^feed/$', blogFeed()),
(r'^tag/(?P<in_tag>\w[\w-]+)/$', 'views.withTag'),
# (r'^(?P<year>\d+)/(?P<month>\d+)/(?P<day>\d+)/$', 'views.listBlogEntriesByYearMonthDay'),... | <commit_before>from django.conf.urls.defaults import *
from .feed import blogFeed
urlpatterns = patterns('copywriting',
(r'^feed\.rss$', blogFeed()),
(r'^feed/$', blogFeed()),
(r'^tag/(?P<in_tag>\w+)/$', 'view... | from django.conf.urls.defaults import *
from .feed import blogFeed
urlpatterns = patterns('copywriting',
(r'^feed\.rss$', blogFeed()),
(r'^feed/$', blogFeed()),
(r'^tag/(?P<in_tag>\w[\w-]+)/$', 'views.withTag'),
# (r'^(?P<year>\d+)/(?P<month>\d+)/(?P<day>\d+)/$', 'views.listBlogEntriesByYearMonthDay'),... | from django.conf.urls.defaults import *
from .feed import blogFeed
urlpatterns = patterns('copywriting',
(r'^feed\.rss$', blogFeed()),
(r'^feed/$', blogFeed()),
(r'^tag/(?P<in_tag>\w+)/$', 'views.withTag'),
... | <commit_before>from django.conf.urls.defaults import *
from .feed import blogFeed
urlpatterns = patterns('copywriting',
(r'^feed\.rss$', blogFeed()),
(r'^feed/$', blogFeed()),
(r'^tag/(?P<in_tag>\w+)/$', 'view... |
82430e9ec30be2003293640867c14af306dc9ca5 | chmvh_website/gallery/management/commands/generatethumbnails.py | chmvh_website/gallery/management/commands/generatethumbnails.py | from django.core.management.base import BaseCommand
from gallery import models
from gallery.tasks import create_thumbnail
class Command(BaseCommand):
help = 'Generates thumbnails for gallery images without thumbnails'
def add_arguments(self, parser):
parser.add_argument(
'--overwrite',
... | from django.core.management.base import BaseCommand
from gallery import models
from gallery.tasks import create_thumbnail
class Command(BaseCommand):
help = 'Generates thumbnails for gallery images without thumbnails'
def add_arguments(self, parser):
parser.add_argument(
'--overwrite',
... | Fix error in thumbnail deletion. | Fix error in thumbnail deletion.
| Python | mit | cdriehuys/chmvh-website,cdriehuys/chmvh-website,cdriehuys/chmvh-website | from django.core.management.base import BaseCommand
from gallery import models
from gallery.tasks import create_thumbnail
class Command(BaseCommand):
help = 'Generates thumbnails for gallery images without thumbnails'
def add_arguments(self, parser):
parser.add_argument(
'--overwrite',
... | from django.core.management.base import BaseCommand
from gallery import models
from gallery.tasks import create_thumbnail
class Command(BaseCommand):
help = 'Generates thumbnails for gallery images without thumbnails'
def add_arguments(self, parser):
parser.add_argument(
'--overwrite',
... | <commit_before>from django.core.management.base import BaseCommand
from gallery import models
from gallery.tasks import create_thumbnail
class Command(BaseCommand):
help = 'Generates thumbnails for gallery images without thumbnails'
def add_arguments(self, parser):
parser.add_argument(
'... | from django.core.management.base import BaseCommand
from gallery import models
from gallery.tasks import create_thumbnail
class Command(BaseCommand):
help = 'Generates thumbnails for gallery images without thumbnails'
def add_arguments(self, parser):
parser.add_argument(
'--overwrite',
... | from django.core.management.base import BaseCommand
from gallery import models
from gallery.tasks import create_thumbnail
class Command(BaseCommand):
help = 'Generates thumbnails for gallery images without thumbnails'
def add_arguments(self, parser):
parser.add_argument(
'--overwrite',
... | <commit_before>from django.core.management.base import BaseCommand
from gallery import models
from gallery.tasks import create_thumbnail
class Command(BaseCommand):
help = 'Generates thumbnails for gallery images without thumbnails'
def add_arguments(self, parser):
parser.add_argument(
'... |
c6db8701986e8eb075b92916067e5904cd13fe9f | deploy/delete_stale_projects.py | deploy/delete_stale_projects.py | import shutil
import os
from projects.models import Project
slugs = [p.slug for p in Project.objects.all()]
build_projects = os.listdir('/home/docs/checkouts/readthedocs.org/user_builds/')
final = []
for slug in build_projects:
if slug not in slugs and slug.replace('_', '-') not in slugs:
final.append(sl... | import shutil
import os
from readthedocs.projects.models import Project
slugs = [p.slug for p in Project.objects.all()]
build_projects = os.listdir('/home/docs/checkouts/readthedocs.org/user_builds/')
final = []
for slug in build_projects:
if slug not in slugs and slug.replace('_', '-') not in slugs:
fin... | Add rtd import to master | Add rtd import to master
| Python | mit | safwanrahman/readthedocs.org,istresearch/readthedocs.org,tddv/readthedocs.org,pombredanne/readthedocs.org,espdev/readthedocs.org,safwanrahman/readthedocs.org,rtfd/readthedocs.org,espdev/readthedocs.org,safwanrahman/readthedocs.org,espdev/readthedocs.org,tddv/readthedocs.org,davidfischer/readthedocs.org,istresearch/read... | import shutil
import os
from projects.models import Project
slugs = [p.slug for p in Project.objects.all()]
build_projects = os.listdir('/home/docs/checkouts/readthedocs.org/user_builds/')
final = []
for slug in build_projects:
if slug not in slugs and slug.replace('_', '-') not in slugs:
final.append(sl... | import shutil
import os
from readthedocs.projects.models import Project
slugs = [p.slug for p in Project.objects.all()]
build_projects = os.listdir('/home/docs/checkouts/readthedocs.org/user_builds/')
final = []
for slug in build_projects:
if slug not in slugs and slug.replace('_', '-') not in slugs:
fin... | <commit_before>import shutil
import os
from projects.models import Project
slugs = [p.slug for p in Project.objects.all()]
build_projects = os.listdir('/home/docs/checkouts/readthedocs.org/user_builds/')
final = []
for slug in build_projects:
if slug not in slugs and slug.replace('_', '-') not in slugs:
... | import shutil
import os
from readthedocs.projects.models import Project
slugs = [p.slug for p in Project.objects.all()]
build_projects = os.listdir('/home/docs/checkouts/readthedocs.org/user_builds/')
final = []
for slug in build_projects:
if slug not in slugs and slug.replace('_', '-') not in slugs:
fin... | import shutil
import os
from projects.models import Project
slugs = [p.slug for p in Project.objects.all()]
build_projects = os.listdir('/home/docs/checkouts/readthedocs.org/user_builds/')
final = []
for slug in build_projects:
if slug not in slugs and slug.replace('_', '-') not in slugs:
final.append(sl... | <commit_before>import shutil
import os
from projects.models import Project
slugs = [p.slug for p in Project.objects.all()]
build_projects = os.listdir('/home/docs/checkouts/readthedocs.org/user_builds/')
final = []
for slug in build_projects:
if slug not in slugs and slug.replace('_', '-') not in slugs:
... |
c1dc3c503d09e95321fc6f3fe3d7ab114ff58fc9 | patty/segmentation/pointCloudMeasurer.py | patty/segmentation/pointCloudMeasurer.py | import numpy as np
from sklearn.decomposition import PCA
def measureLength(pointCloud):
"""Returns the length of a point cloud in its longest direction."""
if len(pointCloud) == 0:
return 0
pca = PCA(n_components = 1)
pca.fit(np.asarray(pointCloud))
primary_axis = np... | import numpy as np
from sklearn.decomposition import PCA
def measureLength(pointCloud):
"""Returns the length of a point cloud in its longest direction."""
if len(pointCloud) == 0:
return 0
pca = PCA(n_components = 1)
pc_array = np.asarray(pointCloud)
pca.fit(pc_arra... | Make sure np.array is used for PCA in measureLength | Make sure np.array is used for PCA in measureLength
| Python | apache-2.0 | NLeSC/PattyAnalytics | import numpy as np
from sklearn.decomposition import PCA
def measureLength(pointCloud):
"""Returns the length of a point cloud in its longest direction."""
if len(pointCloud) == 0:
return 0
pca = PCA(n_components = 1)
pca.fit(np.asarray(pointCloud))
primary_axis = np... | import numpy as np
from sklearn.decomposition import PCA
def measureLength(pointCloud):
"""Returns the length of a point cloud in its longest direction."""
if len(pointCloud) == 0:
return 0
pca = PCA(n_components = 1)
pc_array = np.asarray(pointCloud)
pca.fit(pc_arra... | <commit_before>import numpy as np
from sklearn.decomposition import PCA
def measureLength(pointCloud):
"""Returns the length of a point cloud in its longest direction."""
if len(pointCloud) == 0:
return 0
pca = PCA(n_components = 1)
pca.fit(np.asarray(pointCloud))
pr... | import numpy as np
from sklearn.decomposition import PCA
def measureLength(pointCloud):
"""Returns the length of a point cloud in its longest direction."""
if len(pointCloud) == 0:
return 0
pca = PCA(n_components = 1)
pc_array = np.asarray(pointCloud)
pca.fit(pc_arra... | import numpy as np
from sklearn.decomposition import PCA
def measureLength(pointCloud):
"""Returns the length of a point cloud in its longest direction."""
if len(pointCloud) == 0:
return 0
pca = PCA(n_components = 1)
pca.fit(np.asarray(pointCloud))
primary_axis = np... | <commit_before>import numpy as np
from sklearn.decomposition import PCA
def measureLength(pointCloud):
"""Returns the length of a point cloud in its longest direction."""
if len(pointCloud) == 0:
return 0
pca = PCA(n_components = 1)
pca.fit(np.asarray(pointCloud))
pr... |
42f21057388361e50416197b25be9dfbdb2764b0 | any_imagefield/forms/widgets.py | any_imagefield/forms/widgets.py | import mimetypes
from django.contrib.admin.widgets import AdminFileWidget
from django.template.loader import render_to_string
class ImagePreviewWidget(AdminFileWidget):
"""
An :class:`~django.forms.FileInput` widget that also displays a preview of the image.
"""
template_with_initial = u'%(clear_templ... | import mimetypes
from django.contrib.admin.widgets import AdminFileWidget
from django.template.loader import render_to_string
class ImagePreviewWidget(AdminFileWidget):
"""
An :class:`~django.forms.FileInput` widget that also displays a preview of the image.
"""
template_with_initial = u'%(clear_templ... | Fix render() kwargs for Django 2.1 | Fix render() kwargs for Django 2.1
| Python | apache-2.0 | edoburu/django-any-imagefield,edoburu/django-any-imagefield | import mimetypes
from django.contrib.admin.widgets import AdminFileWidget
from django.template.loader import render_to_string
class ImagePreviewWidget(AdminFileWidget):
"""
An :class:`~django.forms.FileInput` widget that also displays a preview of the image.
"""
template_with_initial = u'%(clear_templ... | import mimetypes
from django.contrib.admin.widgets import AdminFileWidget
from django.template.loader import render_to_string
class ImagePreviewWidget(AdminFileWidget):
"""
An :class:`~django.forms.FileInput` widget that also displays a preview of the image.
"""
template_with_initial = u'%(clear_templ... | <commit_before>import mimetypes
from django.contrib.admin.widgets import AdminFileWidget
from django.template.loader import render_to_string
class ImagePreviewWidget(AdminFileWidget):
"""
An :class:`~django.forms.FileInput` widget that also displays a preview of the image.
"""
template_with_initial = ... | import mimetypes
from django.contrib.admin.widgets import AdminFileWidget
from django.template.loader import render_to_string
class ImagePreviewWidget(AdminFileWidget):
"""
An :class:`~django.forms.FileInput` widget that also displays a preview of the image.
"""
template_with_initial = u'%(clear_templ... | import mimetypes
from django.contrib.admin.widgets import AdminFileWidget
from django.template.loader import render_to_string
class ImagePreviewWidget(AdminFileWidget):
"""
An :class:`~django.forms.FileInput` widget that also displays a preview of the image.
"""
template_with_initial = u'%(clear_templ... | <commit_before>import mimetypes
from django.contrib.admin.widgets import AdminFileWidget
from django.template.loader import render_to_string
class ImagePreviewWidget(AdminFileWidget):
"""
An :class:`~django.forms.FileInput` widget that also displays a preview of the image.
"""
template_with_initial = ... |
8a309491f6370814f88d8be7e5b7c697c4b59dcd | great_expectations/__init__.py | great_expectations/__init__.py | import pandas as pd
from util import *
import dataset
from pkg_resources import get_distribution
try:
__version__ = get_distribution('great_expectations').version
except:
pass
def list_sources():
raise NotImplementedError
def connect_to_datasource():
raise NotImplementedError
def connect_to_datase... | import pandas as pd
from .util import *
import dataset
from pkg_resources import get_distribution
try:
__version__ = get_distribution('great_expectations').version
except:
pass
def list_sources():
raise NotImplementedError
def connect_to_datasource():
raise NotImplementedError
def connect_to_datas... | Change import util to .util to support python 3 | Change import util to .util to support python 3
| Python | apache-2.0 | great-expectations/great_expectations,great-expectations/great_expectations,great-expectations/great_expectations,great-expectations/great_expectations | import pandas as pd
from util import *
import dataset
from pkg_resources import get_distribution
try:
__version__ = get_distribution('great_expectations').version
except:
pass
def list_sources():
raise NotImplementedError
def connect_to_datasource():
raise NotImplementedError
def connect_to_datase... | import pandas as pd
from .util import *
import dataset
from pkg_resources import get_distribution
try:
__version__ = get_distribution('great_expectations').version
except:
pass
def list_sources():
raise NotImplementedError
def connect_to_datasource():
raise NotImplementedError
def connect_to_datas... | <commit_before>import pandas as pd
from util import *
import dataset
from pkg_resources import get_distribution
try:
__version__ = get_distribution('great_expectations').version
except:
pass
def list_sources():
raise NotImplementedError
def connect_to_datasource():
raise NotImplementedError
def co... | import pandas as pd
from .util import *
import dataset
from pkg_resources import get_distribution
try:
__version__ = get_distribution('great_expectations').version
except:
pass
def list_sources():
raise NotImplementedError
def connect_to_datasource():
raise NotImplementedError
def connect_to_datas... | import pandas as pd
from util import *
import dataset
from pkg_resources import get_distribution
try:
__version__ = get_distribution('great_expectations').version
except:
pass
def list_sources():
raise NotImplementedError
def connect_to_datasource():
raise NotImplementedError
def connect_to_datase... | <commit_before>import pandas as pd
from util import *
import dataset
from pkg_resources import get_distribution
try:
__version__ = get_distribution('great_expectations').version
except:
pass
def list_sources():
raise NotImplementedError
def connect_to_datasource():
raise NotImplementedError
def co... |
ccafc2164b0b4a1734a1d4c47bf237eea293eae4 | nodeconductor/logging/admin.py | nodeconductor/logging/admin.py | from django.contrib import admin
from nodeconductor.logging import models
class AlertAdmin(admin.ModelAdmin):
list_display = ('uuid', 'alert_type', 'closed', 'scope', 'severity')
ordering = ('alert_type',)
base_model = models.Alert
admin.site.register(models.Alert, AlertAdmin)
| from django.contrib import admin
from nodeconductor.logging import models
class AlertAdmin(admin.ModelAdmin):
list_display = ('uuid', 'alert_type', 'created', 'closed', 'scope', 'severity')
list_filter = ('alert_type', 'created', 'closed', 'severity')
ordering = ('alert_type',)
base_model = models.Al... | Add list filtering for alerts | Add list filtering for alerts
| Python | mit | opennode/nodeconductor,opennode/nodeconductor,opennode/nodeconductor | from django.contrib import admin
from nodeconductor.logging import models
class AlertAdmin(admin.ModelAdmin):
list_display = ('uuid', 'alert_type', 'closed', 'scope', 'severity')
ordering = ('alert_type',)
base_model = models.Alert
admin.site.register(models.Alert, AlertAdmin)
Add list filtering for ale... | from django.contrib import admin
from nodeconductor.logging import models
class AlertAdmin(admin.ModelAdmin):
list_display = ('uuid', 'alert_type', 'created', 'closed', 'scope', 'severity')
list_filter = ('alert_type', 'created', 'closed', 'severity')
ordering = ('alert_type',)
base_model = models.Al... | <commit_before>from django.contrib import admin
from nodeconductor.logging import models
class AlertAdmin(admin.ModelAdmin):
list_display = ('uuid', 'alert_type', 'closed', 'scope', 'severity')
ordering = ('alert_type',)
base_model = models.Alert
admin.site.register(models.Alert, AlertAdmin)
<commit_msg... | from django.contrib import admin
from nodeconductor.logging import models
class AlertAdmin(admin.ModelAdmin):
list_display = ('uuid', 'alert_type', 'created', 'closed', 'scope', 'severity')
list_filter = ('alert_type', 'created', 'closed', 'severity')
ordering = ('alert_type',)
base_model = models.Al... | from django.contrib import admin
from nodeconductor.logging import models
class AlertAdmin(admin.ModelAdmin):
list_display = ('uuid', 'alert_type', 'closed', 'scope', 'severity')
ordering = ('alert_type',)
base_model = models.Alert
admin.site.register(models.Alert, AlertAdmin)
Add list filtering for ale... | <commit_before>from django.contrib import admin
from nodeconductor.logging import models
class AlertAdmin(admin.ModelAdmin):
list_display = ('uuid', 'alert_type', 'closed', 'scope', 'severity')
ordering = ('alert_type',)
base_model = models.Alert
admin.site.register(models.Alert, AlertAdmin)
<commit_msg... |
f9b09b751d7d3a61016ee49ef5fb27f904a70100 | reppy/exceptions.py | reppy/exceptions.py | #! /usr/bin/env python
#
# Copyright (c) 2011 SEOmoz
#
# 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 to use, copy, modify, mer... | #! /usr/bin/env python
#
# Copyright (c) 2011 SEOmoz
#
# 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 to use, copy, modify, mer... | Fix a rather stupid bug. | Fix a rather stupid bug.
| Python | mit | pombredanne/reppy,seomoz/reppy,seomoz/reppy,pombredanne/reppy | #! /usr/bin/env python
#
# Copyright (c) 2011 SEOmoz
#
# 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 to use, copy, modify, mer... | #! /usr/bin/env python
#
# Copyright (c) 2011 SEOmoz
#
# 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 to use, copy, modify, mer... | <commit_before>#! /usr/bin/env python
#
# Copyright (c) 2011 SEOmoz
#
# 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 to use, co... | #! /usr/bin/env python
#
# Copyright (c) 2011 SEOmoz
#
# 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 to use, copy, modify, mer... | #! /usr/bin/env python
#
# Copyright (c) 2011 SEOmoz
#
# 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 to use, copy, modify, mer... | <commit_before>#! /usr/bin/env python
#
# Copyright (c) 2011 SEOmoz
#
# 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 to use, co... |
47428a8645203e3bf7b7c204b3157b41a0cddb33 | linguist/tests/test_translation.py | linguist/tests/test_translation.py | # -*- coding: utf-8 -*-
from django.test import TestCase
from django.test.utils import override_settings
from ..registry import LinguistRegistry as Registry
from . import settings
from .translations import (
FooModel,
FooTranslation
)
LANGUAGES = [l[0] for l in settings.LANGUAGES]
@override_settings(DEBU... | # -*- coding: utf-8 -*-
from django.test import TestCase
from django.test.utils import override_settings
from ..registry import LinguistRegistry as Registry
from . import settings
from .translations import (
FooModel,
FooTranslation
)
LANGUAGES = [l[0] for l in settings.LANGUAGES]
@override_settings(DEBU... | Test translations now uses instance.language. | Test translations now uses instance.language.
| Python | mit | ulule/django-linguist | # -*- coding: utf-8 -*-
from django.test import TestCase
from django.test.utils import override_settings
from ..registry import LinguistRegistry as Registry
from . import settings
from .translations import (
FooModel,
FooTranslation
)
LANGUAGES = [l[0] for l in settings.LANGUAGES]
@override_settings(DEBU... | # -*- coding: utf-8 -*-
from django.test import TestCase
from django.test.utils import override_settings
from ..registry import LinguistRegistry as Registry
from . import settings
from .translations import (
FooModel,
FooTranslation
)
LANGUAGES = [l[0] for l in settings.LANGUAGES]
@override_settings(DEBU... | <commit_before># -*- coding: utf-8 -*-
from django.test import TestCase
from django.test.utils import override_settings
from ..registry import LinguistRegistry as Registry
from . import settings
from .translations import (
FooModel,
FooTranslation
)
LANGUAGES = [l[0] for l in settings.LANGUAGES]
@overrid... | # -*- coding: utf-8 -*-
from django.test import TestCase
from django.test.utils import override_settings
from ..registry import LinguistRegistry as Registry
from . import settings
from .translations import (
FooModel,
FooTranslation
)
LANGUAGES = [l[0] for l in settings.LANGUAGES]
@override_settings(DEBU... | # -*- coding: utf-8 -*-
from django.test import TestCase
from django.test.utils import override_settings
from ..registry import LinguistRegistry as Registry
from . import settings
from .translations import (
FooModel,
FooTranslation
)
LANGUAGES = [l[0] for l in settings.LANGUAGES]
@override_settings(DEBU... | <commit_before># -*- coding: utf-8 -*-
from django.test import TestCase
from django.test.utils import override_settings
from ..registry import LinguistRegistry as Registry
from . import settings
from .translations import (
FooModel,
FooTranslation
)
LANGUAGES = [l[0] for l in settings.LANGUAGES]
@overrid... |
cc4764da88f1629554ec3760f08ad6b299aae821 | examples/basics/scene/sphere.py | examples/basics/scene/sphere.py | # -*- coding: utf-8 -*-
# -----------------------------------------------------------------------------
# Copyright (c) 2015, Vispy Development Team. All Rights Reserved.
# Distributed under the (new) BSD License. See LICENSE.txt for more info.
# -------------------------------------------------------------------------... | # -*- coding: utf-8 -*-
# -----------------------------------------------------------------------------
# Copyright (c) 2015, Vispy Development Team. All Rights Reserved.
# Distributed under the (new) BSD License. See LICENSE.txt for more info.
# -------------------------------------------------------------------------... | Update example to demo various tessellations | Update example to demo various tessellations
| Python | bsd-3-clause | inclement/vispy,drufat/vispy,ghisvail/vispy,michaelaye/vispy,ghisvail/vispy,srinathv/vispy,RebeccaWPerry/vispy,julienr/vispy,inclement/vispy,bollu/vispy,inclement/vispy,dchilds7/Deysha-Star-Formation,Eric89GXL/vispy,michaelaye/vispy,kkuunnddaannkk/vispy,michaelaye/vispy,dchilds7/Deysha-Star-Formation,jdreaver/vispy,dru... | # -*- coding: utf-8 -*-
# -----------------------------------------------------------------------------
# Copyright (c) 2015, Vispy Development Team. All Rights Reserved.
# Distributed under the (new) BSD License. See LICENSE.txt for more info.
# -------------------------------------------------------------------------... | # -*- coding: utf-8 -*-
# -----------------------------------------------------------------------------
# Copyright (c) 2015, Vispy Development Team. All Rights Reserved.
# Distributed under the (new) BSD License. See LICENSE.txt for more info.
# -------------------------------------------------------------------------... | <commit_before># -*- coding: utf-8 -*-
# -----------------------------------------------------------------------------
# Copyright (c) 2015, Vispy Development Team. All Rights Reserved.
# Distributed under the (new) BSD License. See LICENSE.txt for more info.
# ----------------------------------------------------------... | # -*- coding: utf-8 -*-
# -----------------------------------------------------------------------------
# Copyright (c) 2015, Vispy Development Team. All Rights Reserved.
# Distributed under the (new) BSD License. See LICENSE.txt for more info.
# -------------------------------------------------------------------------... | # -*- coding: utf-8 -*-
# -----------------------------------------------------------------------------
# Copyright (c) 2015, Vispy Development Team. All Rights Reserved.
# Distributed under the (new) BSD License. See LICENSE.txt for more info.
# -------------------------------------------------------------------------... | <commit_before># -*- coding: utf-8 -*-
# -----------------------------------------------------------------------------
# Copyright (c) 2015, Vispy Development Team. All Rights Reserved.
# Distributed under the (new) BSD License. See LICENSE.txt for more info.
# ----------------------------------------------------------... |
ccf6626d86dd00b3f9848e19b3cb1139dba17e56 | tests/integration-test/test_junctions_create.py | tests/integration-test/test_junctions_create.py | #!/usr/bin/env python
from integrationtest import IntegrationTest, main
import unittest
class TestCreate(IntegrationTest, unittest.TestCase):
def test_junctions_create(self):
bam1 = self.inputFiles("test_hcc1395.bam")[0]
output_file = self.tempFile("create.out")
print "BAM1 is ", bam1
... | #!/usr/bin/env python
from integrationtest import IntegrationTest, main
import unittest
class TestCreate(IntegrationTest, unittest.TestCase):
def test_junctions_create(self):
bam1 = self.inputFiles("test_hcc1395.bam")[0]
output_file = self.tempFile("create.out")
print "BAM1 is ", bam1
... | Move positional argument to the end. | Move positional argument to the end.
This doesn't seem to work on a Mac when option comes after the positional
argument, not sure why this is, something to do with options parsing.
| Python | mit | tabbott/regtools,griffithlab/regtools,tabbott/regtools,tabbott/regtools,griffithlab/regtools,gatoravi/regtools,griffithlab/regtools,griffithlab/regtools,griffithlab/regtools,gatoravi/regtools,gatoravi/regtools,gatoravi/regtools,gatoravi/regtools,griffithlab/regtools,tabbott/regtools,tabbott/regtools | #!/usr/bin/env python
from integrationtest import IntegrationTest, main
import unittest
class TestCreate(IntegrationTest, unittest.TestCase):
def test_junctions_create(self):
bam1 = self.inputFiles("test_hcc1395.bam")[0]
output_file = self.tempFile("create.out")
print "BAM1 is ", bam1
... | #!/usr/bin/env python
from integrationtest import IntegrationTest, main
import unittest
class TestCreate(IntegrationTest, unittest.TestCase):
def test_junctions_create(self):
bam1 = self.inputFiles("test_hcc1395.bam")[0]
output_file = self.tempFile("create.out")
print "BAM1 is ", bam1
... | <commit_before>#!/usr/bin/env python
from integrationtest import IntegrationTest, main
import unittest
class TestCreate(IntegrationTest, unittest.TestCase):
def test_junctions_create(self):
bam1 = self.inputFiles("test_hcc1395.bam")[0]
output_file = self.tempFile("create.out")
print "BAM1 ... | #!/usr/bin/env python
from integrationtest import IntegrationTest, main
import unittest
class TestCreate(IntegrationTest, unittest.TestCase):
def test_junctions_create(self):
bam1 = self.inputFiles("test_hcc1395.bam")[0]
output_file = self.tempFile("create.out")
print "BAM1 is ", bam1
... | #!/usr/bin/env python
from integrationtest import IntegrationTest, main
import unittest
class TestCreate(IntegrationTest, unittest.TestCase):
def test_junctions_create(self):
bam1 = self.inputFiles("test_hcc1395.bam")[0]
output_file = self.tempFile("create.out")
print "BAM1 is ", bam1
... | <commit_before>#!/usr/bin/env python
from integrationtest import IntegrationTest, main
import unittest
class TestCreate(IntegrationTest, unittest.TestCase):
def test_junctions_create(self):
bam1 = self.inputFiles("test_hcc1395.bam")[0]
output_file = self.tempFile("create.out")
print "BAM1 ... |
8d0b472f6e84ac1167f8d8cedfb063f74f7fc3b0 | diamondash/widgets/text/text.py | diamondash/widgets/text/text.py | from pkg_resources import resource_string
from twisted.web.template import renderer, XMLString
from diamondash.widgets.widget.widget import Widget
class TextWidget(Widget):
"""A widget that simply displays static text."""
loader = XMLString(resource_string(__name__, 'template.xml'))
TYPE_NAME = 'text'... | from pkg_resources import resource_string
from twisted.web.template import renderer, XMLString
from diamondash.widgets.widget.widget import Widget, WidgetConfig
class TextWidgetConfig(WidgetConfig):
TYPE_NAME = 'text'
MIN_COLUMN_SPAN = 2
class TextWidget(Widget):
"""A widget that simply displays stati... | Refactor TextWidgetConfig out of TextWidget | Refactor TextWidgetConfig out of TextWidget
| Python | bsd-3-clause | praekelt/diamondash,praekelt/diamondash,praekelt/diamondash | from pkg_resources import resource_string
from twisted.web.template import renderer, XMLString
from diamondash.widgets.widget.widget import Widget
class TextWidget(Widget):
"""A widget that simply displays static text."""
loader = XMLString(resource_string(__name__, 'template.xml'))
TYPE_NAME = 'text'... | from pkg_resources import resource_string
from twisted.web.template import renderer, XMLString
from diamondash.widgets.widget.widget import Widget, WidgetConfig
class TextWidgetConfig(WidgetConfig):
TYPE_NAME = 'text'
MIN_COLUMN_SPAN = 2
class TextWidget(Widget):
"""A widget that simply displays stati... | <commit_before>from pkg_resources import resource_string
from twisted.web.template import renderer, XMLString
from diamondash.widgets.widget.widget import Widget
class TextWidget(Widget):
"""A widget that simply displays static text."""
loader = XMLString(resource_string(__name__, 'template.xml'))
TYP... | from pkg_resources import resource_string
from twisted.web.template import renderer, XMLString
from diamondash.widgets.widget.widget import Widget, WidgetConfig
class TextWidgetConfig(WidgetConfig):
TYPE_NAME = 'text'
MIN_COLUMN_SPAN = 2
class TextWidget(Widget):
"""A widget that simply displays stati... | from pkg_resources import resource_string
from twisted.web.template import renderer, XMLString
from diamondash.widgets.widget.widget import Widget
class TextWidget(Widget):
"""A widget that simply displays static text."""
loader = XMLString(resource_string(__name__, 'template.xml'))
TYPE_NAME = 'text'... | <commit_before>from pkg_resources import resource_string
from twisted.web.template import renderer, XMLString
from diamondash.widgets.widget.widget import Widget
class TextWidget(Widget):
"""A widget that simply displays static text."""
loader = XMLString(resource_string(__name__, 'template.xml'))
TYP... |
564a567baed6b24ded3e9940f11c67398af81bef | disco_aws_automation/version.py | disco_aws_automation/version.py | """Place of record for the package version"""
__version__ = "1.1.15"
__rpm_version__ = "WILL_BE_SET_BY_RPM_BUILD"
__git_hash__ = "WILL_BE_SET_BY_EGG_BUILD"
| """Place of record for the package version"""
__version__ = "1.1.16"
__rpm_version__ = "WILL_BE_SET_BY_RPM_BUILD"
__git_hash__ = "WILL_BE_SET_BY_EGG_BUILD"
| Add volume disk usage to snapshot tags | Add volume disk usage to snapshot tags
| Python | bsd-2-clause | amplifylitco/asiaq,amplifylitco/asiaq,amplifylitco/asiaq | """Place of record for the package version"""
__version__ = "1.1.15"
__rpm_version__ = "WILL_BE_SET_BY_RPM_BUILD"
__git_hash__ = "WILL_BE_SET_BY_EGG_BUILD"
Add volume disk usage to snapshot tags | """Place of record for the package version"""
__version__ = "1.1.16"
__rpm_version__ = "WILL_BE_SET_BY_RPM_BUILD"
__git_hash__ = "WILL_BE_SET_BY_EGG_BUILD"
| <commit_before>"""Place of record for the package version"""
__version__ = "1.1.15"
__rpm_version__ = "WILL_BE_SET_BY_RPM_BUILD"
__git_hash__ = "WILL_BE_SET_BY_EGG_BUILD"
<commit_msg>Add volume disk usage to snapshot tags<commit_after> | """Place of record for the package version"""
__version__ = "1.1.16"
__rpm_version__ = "WILL_BE_SET_BY_RPM_BUILD"
__git_hash__ = "WILL_BE_SET_BY_EGG_BUILD"
| """Place of record for the package version"""
__version__ = "1.1.15"
__rpm_version__ = "WILL_BE_SET_BY_RPM_BUILD"
__git_hash__ = "WILL_BE_SET_BY_EGG_BUILD"
Add volume disk usage to snapshot tags"""Place of record for the package version"""
__version__ = "1.1.16"
__rpm_version__ = "WILL_BE_SET_BY_RPM_BUILD"
__git_hash... | <commit_before>"""Place of record for the package version"""
__version__ = "1.1.15"
__rpm_version__ = "WILL_BE_SET_BY_RPM_BUILD"
__git_hash__ = "WILL_BE_SET_BY_EGG_BUILD"
<commit_msg>Add volume disk usage to snapshot tags<commit_after>"""Place of record for the package version"""
__version__ = "1.1.16"
__rpm_version_... |
9de3f433a1c323831becbbe0d799475da96a92ae | virtualfish/__main__.py | virtualfish/__main__.py | from __future__ import print_function
import os
import sys
import inspect
if __name__ == "__main__":
base_path = os.path.dirname(os.path.abspath(inspect.getfile(inspect.currentframe())))
commands = ['. {}'.format(os.path.join(base_path, 'virtual.fish'))]
for plugin in sys.argv[1:]:
path = os.path... | from __future__ import print_function
import os
import sys
import inspect
if __name__ == "__main__":
base_path = os.path.dirname(os.path.abspath(__file__))
commands = ['. {}'.format(os.path.join(base_path, 'virtual.fish'))]
for plugin in sys.argv[1:]:
path = os.path.join(base_path, plugin + '.fis... | Use __file__ to find find the module | Use __file__ to find find the module
`inspect.getfile(inspect.currentframe())` seems to return a relative path that
ends up with the virtualfish functions not being loaded.
| Python | mit | scorphus/virtualfish,adambrenecki/virtualfish,adambrenecki/virtualfish,scorphus/virtualfish | from __future__ import print_function
import os
import sys
import inspect
if __name__ == "__main__":
base_path = os.path.dirname(os.path.abspath(inspect.getfile(inspect.currentframe())))
commands = ['. {}'.format(os.path.join(base_path, 'virtual.fish'))]
for plugin in sys.argv[1:]:
path = os.path... | from __future__ import print_function
import os
import sys
import inspect
if __name__ == "__main__":
base_path = os.path.dirname(os.path.abspath(__file__))
commands = ['. {}'.format(os.path.join(base_path, 'virtual.fish'))]
for plugin in sys.argv[1:]:
path = os.path.join(base_path, plugin + '.fis... | <commit_before>from __future__ import print_function
import os
import sys
import inspect
if __name__ == "__main__":
base_path = os.path.dirname(os.path.abspath(inspect.getfile(inspect.currentframe())))
commands = ['. {}'.format(os.path.join(base_path, 'virtual.fish'))]
for plugin in sys.argv[1:]:
... | from __future__ import print_function
import os
import sys
import inspect
if __name__ == "__main__":
base_path = os.path.dirname(os.path.abspath(__file__))
commands = ['. {}'.format(os.path.join(base_path, 'virtual.fish'))]
for plugin in sys.argv[1:]:
path = os.path.join(base_path, plugin + '.fis... | from __future__ import print_function
import os
import sys
import inspect
if __name__ == "__main__":
base_path = os.path.dirname(os.path.abspath(inspect.getfile(inspect.currentframe())))
commands = ['. {}'.format(os.path.join(base_path, 'virtual.fish'))]
for plugin in sys.argv[1:]:
path = os.path... | <commit_before>from __future__ import print_function
import os
import sys
import inspect
if __name__ == "__main__":
base_path = os.path.dirname(os.path.abspath(inspect.getfile(inspect.currentframe())))
commands = ['. {}'.format(os.path.join(base_path, 'virtual.fish'))]
for plugin in sys.argv[1:]:
... |
1e88a3de5ed96847baf17eb1beb2599f5c79fb6b | djangobb_forum/search_indexes.py | djangobb_forum/search_indexes.py | from haystack.indexes import *
from haystack import site
from celery_haystack.indexes import CelerySearchIndex
import djangobb_forum.models as models
class PostIndex(CelerySearchIndex):
text = CharField(document=True, use_template=True)
author = CharField(model_attr='user')
created = DateTimeField(model_... | from haystack.indexes import *
from haystack import site
from gargoyle import gargoyle
try:
if gargoyle.is_active('solr_indexing_enabled'):
from celery_haystack.indexes import CelerySearchIndex as SearchIndex
except:
# Allow migrations to run
from celery_haystack.indexes import CelerySearchIndex as... | Disable indexing through celery when it's disabled. | Disable indexing through celery when it's disabled.
| Python | bsd-3-clause | tjvr/s2forums,LLK/s2forums,LLK/s2forums,LLK/s2forums,tjvr/s2forums,tjvr/s2forums | from haystack.indexes import *
from haystack import site
from celery_haystack.indexes import CelerySearchIndex
import djangobb_forum.models as models
class PostIndex(CelerySearchIndex):
text = CharField(document=True, use_template=True)
author = CharField(model_attr='user')
created = DateTimeField(model_... | from haystack.indexes import *
from haystack import site
from gargoyle import gargoyle
try:
if gargoyle.is_active('solr_indexing_enabled'):
from celery_haystack.indexes import CelerySearchIndex as SearchIndex
except:
# Allow migrations to run
from celery_haystack.indexes import CelerySearchIndex as... | <commit_before>from haystack.indexes import *
from haystack import site
from celery_haystack.indexes import CelerySearchIndex
import djangobb_forum.models as models
class PostIndex(CelerySearchIndex):
text = CharField(document=True, use_template=True)
author = CharField(model_attr='user')
created = DateT... | from haystack.indexes import *
from haystack import site
from gargoyle import gargoyle
try:
if gargoyle.is_active('solr_indexing_enabled'):
from celery_haystack.indexes import CelerySearchIndex as SearchIndex
except:
# Allow migrations to run
from celery_haystack.indexes import CelerySearchIndex as... | from haystack.indexes import *
from haystack import site
from celery_haystack.indexes import CelerySearchIndex
import djangobb_forum.models as models
class PostIndex(CelerySearchIndex):
text = CharField(document=True, use_template=True)
author = CharField(model_attr='user')
created = DateTimeField(model_... | <commit_before>from haystack.indexes import *
from haystack import site
from celery_haystack.indexes import CelerySearchIndex
import djangobb_forum.models as models
class PostIndex(CelerySearchIndex):
text = CharField(document=True, use_template=True)
author = CharField(model_attr='user')
created = DateT... |
2ca115789b96287ba0c8a32c514d1fe2beedb750 | girc/capabilities.py | girc/capabilities.py | #!/usr/bin/env python3
# Written by Daniel Oaks <daniel@danieloaks.net>
# Released under the ISC license
from .utils import CaseInsensitiveDict, CaseInsensitiveList
class Capabilities:
"""Ingests sets of client capabilities and provides access to them."""
def __init__(self, wanted=[]):
self.available ... | #!/usr/bin/env python3
# Written by Daniel Oaks <daniel@danieloaks.net>
# Released under the ISC license
from .utils import CaseInsensitiveDict, CaseInsensitiveList
class Capabilities:
"""Ingests sets of client capabilities and provides access to them."""
def __init__(self, wanted=[]):
self.available ... | Mark CAPA= as None instead of True | [caps] Mark CAPA= as None instead of True
| Python | isc | DanielOaks/girc,DanielOaks/girc | #!/usr/bin/env python3
# Written by Daniel Oaks <daniel@danieloaks.net>
# Released under the ISC license
from .utils import CaseInsensitiveDict, CaseInsensitiveList
class Capabilities:
"""Ingests sets of client capabilities and provides access to them."""
def __init__(self, wanted=[]):
self.available ... | #!/usr/bin/env python3
# Written by Daniel Oaks <daniel@danieloaks.net>
# Released under the ISC license
from .utils import CaseInsensitiveDict, CaseInsensitiveList
class Capabilities:
"""Ingests sets of client capabilities and provides access to them."""
def __init__(self, wanted=[]):
self.available ... | <commit_before>#!/usr/bin/env python3
# Written by Daniel Oaks <daniel@danieloaks.net>
# Released under the ISC license
from .utils import CaseInsensitiveDict, CaseInsensitiveList
class Capabilities:
"""Ingests sets of client capabilities and provides access to them."""
def __init__(self, wanted=[]):
... | #!/usr/bin/env python3
# Written by Daniel Oaks <daniel@danieloaks.net>
# Released under the ISC license
from .utils import CaseInsensitiveDict, CaseInsensitiveList
class Capabilities:
"""Ingests sets of client capabilities and provides access to them."""
def __init__(self, wanted=[]):
self.available ... | #!/usr/bin/env python3
# Written by Daniel Oaks <daniel@danieloaks.net>
# Released under the ISC license
from .utils import CaseInsensitiveDict, CaseInsensitiveList
class Capabilities:
"""Ingests sets of client capabilities and provides access to them."""
def __init__(self, wanted=[]):
self.available ... | <commit_before>#!/usr/bin/env python3
# Written by Daniel Oaks <daniel@danieloaks.net>
# Released under the ISC license
from .utils import CaseInsensitiveDict, CaseInsensitiveList
class Capabilities:
"""Ingests sets of client capabilities and provides access to them."""
def __init__(self, wanted=[]):
... |
88aafb9cc5b9cf8f2bc75f7960d33782368603f7 | eduid_dashboard_amp/__init__.py | eduid_dashboard_amp/__init__.py | from eduid_am.exceptions import UserDoesNotExist
WHITELIST_SET_ATTRS = (
'givenName',
'sn',
'displayName',
'photo',
'preferredLanguage',
'mail',
'date', # last modification
# TODO: Arrays must use put or pop, not set, but need more deep refacts
'norEduPersonNIN',
'eduPersonEn... | from eduid_am.exceptions import UserDoesNotExist
WHITELIST_SET_ATTRS = (
'givenName',
'sn',
'displayName',
'photo',
'preferredLanguage',
'mail',
'date', # last modification
# TODO: Arrays must use put or pop, not set, but need more deep refacts
'norEduPersonNIN',
'eduPersonEn... | Remove attributes instead of setting a false value like []. | Remove attributes instead of setting a false value like [].
| Python | bsd-3-clause | SUNET/eduid-dashboard-amp | from eduid_am.exceptions import UserDoesNotExist
WHITELIST_SET_ATTRS = (
'givenName',
'sn',
'displayName',
'photo',
'preferredLanguage',
'mail',
'date', # last modification
# TODO: Arrays must use put or pop, not set, but need more deep refacts
'norEduPersonNIN',
'eduPersonEn... | from eduid_am.exceptions import UserDoesNotExist
WHITELIST_SET_ATTRS = (
'givenName',
'sn',
'displayName',
'photo',
'preferredLanguage',
'mail',
'date', # last modification
# TODO: Arrays must use put or pop, not set, but need more deep refacts
'norEduPersonNIN',
'eduPersonEn... | <commit_before>from eduid_am.exceptions import UserDoesNotExist
WHITELIST_SET_ATTRS = (
'givenName',
'sn',
'displayName',
'photo',
'preferredLanguage',
'mail',
'date', # last modification
# TODO: Arrays must use put or pop, not set, but need more deep refacts
'norEduPersonNIN',
... | from eduid_am.exceptions import UserDoesNotExist
WHITELIST_SET_ATTRS = (
'givenName',
'sn',
'displayName',
'photo',
'preferredLanguage',
'mail',
'date', # last modification
# TODO: Arrays must use put or pop, not set, but need more deep refacts
'norEduPersonNIN',
'eduPersonEn... | from eduid_am.exceptions import UserDoesNotExist
WHITELIST_SET_ATTRS = (
'givenName',
'sn',
'displayName',
'photo',
'preferredLanguage',
'mail',
'date', # last modification
# TODO: Arrays must use put or pop, not set, but need more deep refacts
'norEduPersonNIN',
'eduPersonEn... | <commit_before>from eduid_am.exceptions import UserDoesNotExist
WHITELIST_SET_ATTRS = (
'givenName',
'sn',
'displayName',
'photo',
'preferredLanguage',
'mail',
'date', # last modification
# TODO: Arrays must use put or pop, not set, but need more deep refacts
'norEduPersonNIN',
... |
cc143597dd7673fb13d8257c4dd7bdafa31c2dd4 | examples/distributed_workers.py | examples/distributed_workers.py | import sc2
from sc2 import run_game, maps, Race, Difficulty
from sc2.player import Bot, Computer
from sc2.constants import *
class TerranBot(sc2.BotAI):
async def on_step(self, iteration):
await self.distribute_workers()
await self.build_supply()
await self.build_workers()
await se... | import sc2
from sc2 import run_game, maps, Race, Difficulty
from sc2.player import Bot, Computer
from sc2.constants import *
class TerranBot(sc2.BotAI):
async def on_step(self, iteration):
await self.distribute_workers()
await self.build_supply()
await self.build_workers()
await se... | Fix command center selection in example | Fix command center selection in example
| Python | mit | Dentosal/python-sc2 | import sc2
from sc2 import run_game, maps, Race, Difficulty
from sc2.player import Bot, Computer
from sc2.constants import *
class TerranBot(sc2.BotAI):
async def on_step(self, iteration):
await self.distribute_workers()
await self.build_supply()
await self.build_workers()
await se... | import sc2
from sc2 import run_game, maps, Race, Difficulty
from sc2.player import Bot, Computer
from sc2.constants import *
class TerranBot(sc2.BotAI):
async def on_step(self, iteration):
await self.distribute_workers()
await self.build_supply()
await self.build_workers()
await se... | <commit_before>import sc2
from sc2 import run_game, maps, Race, Difficulty
from sc2.player import Bot, Computer
from sc2.constants import *
class TerranBot(sc2.BotAI):
async def on_step(self, iteration):
await self.distribute_workers()
await self.build_supply()
await self.build_workers()
... | import sc2
from sc2 import run_game, maps, Race, Difficulty
from sc2.player import Bot, Computer
from sc2.constants import *
class TerranBot(sc2.BotAI):
async def on_step(self, iteration):
await self.distribute_workers()
await self.build_supply()
await self.build_workers()
await se... | import sc2
from sc2 import run_game, maps, Race, Difficulty
from sc2.player import Bot, Computer
from sc2.constants import *
class TerranBot(sc2.BotAI):
async def on_step(self, iteration):
await self.distribute_workers()
await self.build_supply()
await self.build_workers()
await se... | <commit_before>import sc2
from sc2 import run_game, maps, Race, Difficulty
from sc2.player import Bot, Computer
from sc2.constants import *
class TerranBot(sc2.BotAI):
async def on_step(self, iteration):
await self.distribute_workers()
await self.build_supply()
await self.build_workers()
... |
fd9f69cbc5512ea91837ff4512d4c9549b2f9eeb | plugin/DebianUtils/__init__.py | plugin/DebianUtils/__init__.py | # -*- coding: utf-8 -*-
#
# Debian Changes Bot
# Copyright (C) 2008 Chris Lamb <chris@chris-lamb.co.uk>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the... | # -*- coding: utf-8 -*-
#
# Debian Changes Bot
# Copyright (C) 2008 Chris Lamb <chris@chris-lamb.co.uk>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the... | Add reload routines to DebianUtils plugin | Add reload routines to DebianUtils plugin
Signed-off-by: Chris Lamb <711c73f64afdce07b7e38039a96d2224209e9a6c@chris-lamb.co.uk>
| Python | agpl-3.0 | lamby/debian-devel-changes-bot,lamby/debian-devel-changes-bot,lamby/debian-devel-changes-bot,xtaran/debian-devel-changes-bot,sebastinas/debian-devel-changes-bot,xtaran/debian-devel-changes-bot | # -*- coding: utf-8 -*-
#
# Debian Changes Bot
# Copyright (C) 2008 Chris Lamb <chris@chris-lamb.co.uk>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the... | # -*- coding: utf-8 -*-
#
# Debian Changes Bot
# Copyright (C) 2008 Chris Lamb <chris@chris-lamb.co.uk>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the... | <commit_before># -*- coding: utf-8 -*-
#
# Debian Changes Bot
# Copyright (C) 2008 Chris Lamb <chris@chris-lamb.co.uk>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either v... | # -*- coding: utf-8 -*-
#
# Debian Changes Bot
# Copyright (C) 2008 Chris Lamb <chris@chris-lamb.co.uk>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the... | # -*- coding: utf-8 -*-
#
# Debian Changes Bot
# Copyright (C) 2008 Chris Lamb <chris@chris-lamb.co.uk>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the... | <commit_before># -*- coding: utf-8 -*-
#
# Debian Changes Bot
# Copyright (C) 2008 Chris Lamb <chris@chris-lamb.co.uk>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either v... |
8f30a7d3794891373a1f707bdf6afa083717dfc0 | ggplot/scales/scale_identity.py | ggplot/scales/scale_identity.py | from __future__ import absolute_import, division, print_function
from ..utils import identity, alias
from .scale import scale_discrete, scale_continuous
class scale_color_identity(scale_discrete):
aesthetics = ['color']
palette = staticmethod(identity)
class scale_fill_identity(scale_color_identity):
a... | from __future__ import absolute_import, division, print_function
from ..utils import identity, alias
from .scale import scale_discrete, scale_continuous
class MapTrainMixin(object):
"""
Override map and train methods
"""
def map(self, x):
return x
def train(self, x):
# do nothing... | Fix identity scales, override map & train methods | Fix identity scales, override map & train methods
| Python | mit | has2k1/plotnine,has2k1/plotnine | from __future__ import absolute_import, division, print_function
from ..utils import identity, alias
from .scale import scale_discrete, scale_continuous
class scale_color_identity(scale_discrete):
aesthetics = ['color']
palette = staticmethod(identity)
class scale_fill_identity(scale_color_identity):
a... | from __future__ import absolute_import, division, print_function
from ..utils import identity, alias
from .scale import scale_discrete, scale_continuous
class MapTrainMixin(object):
"""
Override map and train methods
"""
def map(self, x):
return x
def train(self, x):
# do nothing... | <commit_before>from __future__ import absolute_import, division, print_function
from ..utils import identity, alias
from .scale import scale_discrete, scale_continuous
class scale_color_identity(scale_discrete):
aesthetics = ['color']
palette = staticmethod(identity)
class scale_fill_identity(scale_color_i... | from __future__ import absolute_import, division, print_function
from ..utils import identity, alias
from .scale import scale_discrete, scale_continuous
class MapTrainMixin(object):
"""
Override map and train methods
"""
def map(self, x):
return x
def train(self, x):
# do nothing... | from __future__ import absolute_import, division, print_function
from ..utils import identity, alias
from .scale import scale_discrete, scale_continuous
class scale_color_identity(scale_discrete):
aesthetics = ['color']
palette = staticmethod(identity)
class scale_fill_identity(scale_color_identity):
a... | <commit_before>from __future__ import absolute_import, division, print_function
from ..utils import identity, alias
from .scale import scale_discrete, scale_continuous
class scale_color_identity(scale_discrete):
aesthetics = ['color']
palette = staticmethod(identity)
class scale_fill_identity(scale_color_i... |
f04ec6d18ac1dd9932c517ef19d0d7a9d7bae003 | app/__init__.py | app/__init__.py | import os
from flask import Flask, jsonify, g
from flask.ext.sqlalchemy import SQLAlchemy
db = SQLAlchemy()
def create_app(config_name):
"""Create an application instance.
This is called by a runner script, such as /run.py.
"""
from .auth import password_auth
app = Flask(__name__)
# apply ... | import os
from flask import Flask, jsonify, g
from flask.ext.sqlalchemy import SQLAlchemy
db = SQLAlchemy()
def create_app(config_name):
"""Create an application instance.
This is called by a runner script, such as /run.py.
"""
from .auth import password_auth
app = Flask(__name__)
# apply ... | Allow app to be imported | Allow app to be imported
Flask httpdomain needs to import the Flask app. It turns out the the
way to get the path to the configuration file assumed the app was always
being run/imported from the base of the ltd-keeper repo, which isn't
always true, especially for Sphinx doc builds.
This correctly derives a path from ... | Python | mit | lsst-sqre/ltd-keeper,lsst-sqre/ltd-keeper | import os
from flask import Flask, jsonify, g
from flask.ext.sqlalchemy import SQLAlchemy
db = SQLAlchemy()
def create_app(config_name):
"""Create an application instance.
This is called by a runner script, such as /run.py.
"""
from .auth import password_auth
app = Flask(__name__)
# apply ... | import os
from flask import Flask, jsonify, g
from flask.ext.sqlalchemy import SQLAlchemy
db = SQLAlchemy()
def create_app(config_name):
"""Create an application instance.
This is called by a runner script, such as /run.py.
"""
from .auth import password_auth
app = Flask(__name__)
# apply ... | <commit_before>import os
from flask import Flask, jsonify, g
from flask.ext.sqlalchemy import SQLAlchemy
db = SQLAlchemy()
def create_app(config_name):
"""Create an application instance.
This is called by a runner script, such as /run.py.
"""
from .auth import password_auth
app = Flask(__name__... | import os
from flask import Flask, jsonify, g
from flask.ext.sqlalchemy import SQLAlchemy
db = SQLAlchemy()
def create_app(config_name):
"""Create an application instance.
This is called by a runner script, such as /run.py.
"""
from .auth import password_auth
app = Flask(__name__)
# apply ... | import os
from flask import Flask, jsonify, g
from flask.ext.sqlalchemy import SQLAlchemy
db = SQLAlchemy()
def create_app(config_name):
"""Create an application instance.
This is called by a runner script, such as /run.py.
"""
from .auth import password_auth
app = Flask(__name__)
# apply ... | <commit_before>import os
from flask import Flask, jsonify, g
from flask.ext.sqlalchemy import SQLAlchemy
db = SQLAlchemy()
def create_app(config_name):
"""Create an application instance.
This is called by a runner script, such as /run.py.
"""
from .auth import password_auth
app = Flask(__name__... |
5c1fc4b6ebbd2ee54318c5bc9877868858ea03ee | auth0/v2/authentication/base.py | auth0/v2/authentication/base.py | import json
import requests
from ..exceptions import Auth0Error
class AuthenticationBase(object):
def post(self, url, data={}, headers={}):
response = requests.post(url=url, data=json.dumps(data),
headers=headers)
return self._process_response(response)
def _... | import json
import requests
from ..exceptions import Auth0Error
class AuthenticationBase(object):
def post(self, url, data={}, headers={}):
response = requests.post(url=url, data=json.dumps(data),
headers=headers)
return self._process_response(response)
def g... | Add .get() method to AuthenticationBase | Add .get() method to AuthenticationBase
| Python | mit | auth0/auth0-python,auth0/auth0-python | import json
import requests
from ..exceptions import Auth0Error
class AuthenticationBase(object):
def post(self, url, data={}, headers={}):
response = requests.post(url=url, data=json.dumps(data),
headers=headers)
return self._process_response(response)
def _... | import json
import requests
from ..exceptions import Auth0Error
class AuthenticationBase(object):
def post(self, url, data={}, headers={}):
response = requests.post(url=url, data=json.dumps(data),
headers=headers)
return self._process_response(response)
def g... | <commit_before>import json
import requests
from ..exceptions import Auth0Error
class AuthenticationBase(object):
def post(self, url, data={}, headers={}):
response = requests.post(url=url, data=json.dumps(data),
headers=headers)
return self._process_response(respo... | import json
import requests
from ..exceptions import Auth0Error
class AuthenticationBase(object):
def post(self, url, data={}, headers={}):
response = requests.post(url=url, data=json.dumps(data),
headers=headers)
return self._process_response(response)
def g... | import json
import requests
from ..exceptions import Auth0Error
class AuthenticationBase(object):
def post(self, url, data={}, headers={}):
response = requests.post(url=url, data=json.dumps(data),
headers=headers)
return self._process_response(response)
def _... | <commit_before>import json
import requests
from ..exceptions import Auth0Error
class AuthenticationBase(object):
def post(self, url, data={}, headers={}):
response = requests.post(url=url, data=json.dumps(data),
headers=headers)
return self._process_response(respo... |
d2e88ec95f3a4b2ac01b47154d675996cbed23d3 | split_dataset.py | split_dataset.py | import os
import numpy as np
data_dir = "data/dataset/"
jpg_filenames = list(filter(lambda x: x[-3:] == "jpg", os.listdir(data_dir)))
# Randomly select the test dataset
test_percentage = 0.1
n_test = int(round(len(jpg_filenames) * test_percentage))
if n_test == 0: n_test = 1
# Randomly select the images for testing... | import os
import numpy as np
data_dir = "data/dataset/"
jpg_filenames = list(filter(lambda x: x[-3:] == "jpg", os.listdir(data_dir)))
# Randomly select the test dataset
test_percentage = 0.1
n_test = int(round(len(jpg_filenames) * test_percentage))
if n_test == 0: n_test = 1
# Randomly select the images for testing... | Add verbose print on split dataset script | Add verbose print on split dataset script
| Python | mit | SetaSouto/license-plate-detection | import os
import numpy as np
data_dir = "data/dataset/"
jpg_filenames = list(filter(lambda x: x[-3:] == "jpg", os.listdir(data_dir)))
# Randomly select the test dataset
test_percentage = 0.1
n_test = int(round(len(jpg_filenames) * test_percentage))
if n_test == 0: n_test = 1
# Randomly select the images for testing... | import os
import numpy as np
data_dir = "data/dataset/"
jpg_filenames = list(filter(lambda x: x[-3:] == "jpg", os.listdir(data_dir)))
# Randomly select the test dataset
test_percentage = 0.1
n_test = int(round(len(jpg_filenames) * test_percentage))
if n_test == 0: n_test = 1
# Randomly select the images for testing... | <commit_before>import os
import numpy as np
data_dir = "data/dataset/"
jpg_filenames = list(filter(lambda x: x[-3:] == "jpg", os.listdir(data_dir)))
# Randomly select the test dataset
test_percentage = 0.1
n_test = int(round(len(jpg_filenames) * test_percentage))
if n_test == 0: n_test = 1
# Randomly select the ima... | import os
import numpy as np
data_dir = "data/dataset/"
jpg_filenames = list(filter(lambda x: x[-3:] == "jpg", os.listdir(data_dir)))
# Randomly select the test dataset
test_percentage = 0.1
n_test = int(round(len(jpg_filenames) * test_percentage))
if n_test == 0: n_test = 1
# Randomly select the images for testing... | import os
import numpy as np
data_dir = "data/dataset/"
jpg_filenames = list(filter(lambda x: x[-3:] == "jpg", os.listdir(data_dir)))
# Randomly select the test dataset
test_percentage = 0.1
n_test = int(round(len(jpg_filenames) * test_percentage))
if n_test == 0: n_test = 1
# Randomly select the images for testing... | <commit_before>import os
import numpy as np
data_dir = "data/dataset/"
jpg_filenames = list(filter(lambda x: x[-3:] == "jpg", os.listdir(data_dir)))
# Randomly select the test dataset
test_percentage = 0.1
n_test = int(round(len(jpg_filenames) * test_percentage))
if n_test == 0: n_test = 1
# Randomly select the ima... |
edab226942fbab75aa66e16d5814b1c38c0e8507 | 2048/policy.py | 2048/policy.py | import tensorflow as tf
class EpsilonGreedyPolicy:
def __init__(self, env, dqn, epsilon_max, epsilon_min, epsilon_decay):
self.env = env
self.dqn = dqn
self.epsilon_max = epsilon_max
self.epsilon_min = epsilon_min
self.epsilon_decay = epsilon_decay
def take_action(self... | import tensorflow as tf
class EpsilonGreedyPolicy:
def __init__(self, env, dqn, epsilon_max, epsilon_min, epsilon_decay):
self.env = env
self.dqn = dqn
self.epsilon_max = epsilon_max
self.epsilon_min = epsilon_min
self.epsilon_decay = epsilon_decay
def take_action(self... | Fix error in state shape in EGP | [2048] Fix error in state shape in EGP
| Python | mit | akshaykurmi/reinforcement-learning | import tensorflow as tf
class EpsilonGreedyPolicy:
def __init__(self, env, dqn, epsilon_max, epsilon_min, epsilon_decay):
self.env = env
self.dqn = dqn
self.epsilon_max = epsilon_max
self.epsilon_min = epsilon_min
self.epsilon_decay = epsilon_decay
def take_action(self... | import tensorflow as tf
class EpsilonGreedyPolicy:
def __init__(self, env, dqn, epsilon_max, epsilon_min, epsilon_decay):
self.env = env
self.dqn = dqn
self.epsilon_max = epsilon_max
self.epsilon_min = epsilon_min
self.epsilon_decay = epsilon_decay
def take_action(self... | <commit_before>import tensorflow as tf
class EpsilonGreedyPolicy:
def __init__(self, env, dqn, epsilon_max, epsilon_min, epsilon_decay):
self.env = env
self.dqn = dqn
self.epsilon_max = epsilon_max
self.epsilon_min = epsilon_min
self.epsilon_decay = epsilon_decay
def t... | import tensorflow as tf
class EpsilonGreedyPolicy:
def __init__(self, env, dqn, epsilon_max, epsilon_min, epsilon_decay):
self.env = env
self.dqn = dqn
self.epsilon_max = epsilon_max
self.epsilon_min = epsilon_min
self.epsilon_decay = epsilon_decay
def take_action(self... | import tensorflow as tf
class EpsilonGreedyPolicy:
def __init__(self, env, dqn, epsilon_max, epsilon_min, epsilon_decay):
self.env = env
self.dqn = dqn
self.epsilon_max = epsilon_max
self.epsilon_min = epsilon_min
self.epsilon_decay = epsilon_decay
def take_action(self... | <commit_before>import tensorflow as tf
class EpsilonGreedyPolicy:
def __init__(self, env, dqn, epsilon_max, epsilon_min, epsilon_decay):
self.env = env
self.dqn = dqn
self.epsilon_max = epsilon_max
self.epsilon_min = epsilon_min
self.epsilon_decay = epsilon_decay
def t... |
ee623ec4511c4aa7d93384b8a935144cd52621ae | test.py | test.py | import subprocess
import unittest
class CompareErrorMessages(unittest.TestCase):
def test_missing_file_return_code_the_same_as_ls(self):
args = ['./lss.sh', 'foo']
ret = subprocess.call(args)
args2 = ['ls', 'foo']
ret2 = subprocess.call(args2)
self.assertEqual(ret == 0, ret2... | import os
import subprocess
import unittest
class CompareErrorMessages(unittest.TestCase):
def test_missing_file_return_code_the_same_as_ls(self):
DEVNULL = open(os.devnull, 'wb')
args = ['./lss.sh', 'foo']
ret = subprocess.call(args, stderr=DEVNULL)
args2 = ['ls', 'foo']
re... | Discard output when checking return code. | Discard output when checking return code.
| Python | bsd-3-clause | jwg4/les,jwg4/les | import subprocess
import unittest
class CompareErrorMessages(unittest.TestCase):
def test_missing_file_return_code_the_same_as_ls(self):
args = ['./lss.sh', 'foo']
ret = subprocess.call(args)
args2 = ['ls', 'foo']
ret2 = subprocess.call(args2)
self.assertEqual(ret == 0, ret2... | import os
import subprocess
import unittest
class CompareErrorMessages(unittest.TestCase):
def test_missing_file_return_code_the_same_as_ls(self):
DEVNULL = open(os.devnull, 'wb')
args = ['./lss.sh', 'foo']
ret = subprocess.call(args, stderr=DEVNULL)
args2 = ['ls', 'foo']
re... | <commit_before>import subprocess
import unittest
class CompareErrorMessages(unittest.TestCase):
def test_missing_file_return_code_the_same_as_ls(self):
args = ['./lss.sh', 'foo']
ret = subprocess.call(args)
args2 = ['ls', 'foo']
ret2 = subprocess.call(args2)
self.assertEqual... | import os
import subprocess
import unittest
class CompareErrorMessages(unittest.TestCase):
def test_missing_file_return_code_the_same_as_ls(self):
DEVNULL = open(os.devnull, 'wb')
args = ['./lss.sh', 'foo']
ret = subprocess.call(args, stderr=DEVNULL)
args2 = ['ls', 'foo']
re... | import subprocess
import unittest
class CompareErrorMessages(unittest.TestCase):
def test_missing_file_return_code_the_same_as_ls(self):
args = ['./lss.sh', 'foo']
ret = subprocess.call(args)
args2 = ['ls', 'foo']
ret2 = subprocess.call(args2)
self.assertEqual(ret == 0, ret2... | <commit_before>import subprocess
import unittest
class CompareErrorMessages(unittest.TestCase):
def test_missing_file_return_code_the_same_as_ls(self):
args = ['./lss.sh', 'foo']
ret = subprocess.call(args)
args2 = ['ls', 'foo']
ret2 = subprocess.call(args2)
self.assertEqual... |
fcd7f4b8f9bc7889d8857eea176e5bd90819107d | test.py | test.py | import unittest
import imp
rollbar_agent = imp.load_source('rollbar-agent', './rollbar-agent')
class FakeScanner:
def __init__(self, config):
self.config = config
class TestDefaultMessageStartParserUsage(unittest.TestCase):
app = {'name': 'pyramid',
'config': {
'log_format... | import sys
import types
import unittest
if sys.version_info >= (3, 4):
from importlib.machinery import SourceFileLoader
loader = SourceFileLoader('rollbar-agent', './rollbar-agent')
rollbar_agent = types.ModuleType(loader.name)
loader.exec_module(rollbar_agent)
else:
import imp
rollbar_agent = ... | Update module loader for Python 3.4+ | Update module loader for Python 3.4+
| Python | mit | rollbar/rollbar-agent,rollbar/rollbar-agent | import unittest
import imp
rollbar_agent = imp.load_source('rollbar-agent', './rollbar-agent')
class FakeScanner:
def __init__(self, config):
self.config = config
class TestDefaultMessageStartParserUsage(unittest.TestCase):
app = {'name': 'pyramid',
'config': {
'log_format... | import sys
import types
import unittest
if sys.version_info >= (3, 4):
from importlib.machinery import SourceFileLoader
loader = SourceFileLoader('rollbar-agent', './rollbar-agent')
rollbar_agent = types.ModuleType(loader.name)
loader.exec_module(rollbar_agent)
else:
import imp
rollbar_agent = ... | <commit_before>import unittest
import imp
rollbar_agent = imp.load_source('rollbar-agent', './rollbar-agent')
class FakeScanner:
def __init__(self, config):
self.config = config
class TestDefaultMessageStartParserUsage(unittest.TestCase):
app = {'name': 'pyramid',
'config': {
... | import sys
import types
import unittest
if sys.version_info >= (3, 4):
from importlib.machinery import SourceFileLoader
loader = SourceFileLoader('rollbar-agent', './rollbar-agent')
rollbar_agent = types.ModuleType(loader.name)
loader.exec_module(rollbar_agent)
else:
import imp
rollbar_agent = ... | import unittest
import imp
rollbar_agent = imp.load_source('rollbar-agent', './rollbar-agent')
class FakeScanner:
def __init__(self, config):
self.config = config
class TestDefaultMessageStartParserUsage(unittest.TestCase):
app = {'name': 'pyramid',
'config': {
'log_format... | <commit_before>import unittest
import imp
rollbar_agent = imp.load_source('rollbar-agent', './rollbar-agent')
class FakeScanner:
def __init__(self, config):
self.config = config
class TestDefaultMessageStartParserUsage(unittest.TestCase):
app = {'name': 'pyramid',
'config': {
... |
5dae59bc17f0f8a0ef97bbc461eb18c0ea725bc9 | config-example.py | config-example.py | # Copy this file to config.py and change the settings. Don't forget to specify your own SECRET_KEY.
# The app name will be used in several places.
APP_NAME = 'Yelp Love'
APP_BASE_URL = 'https://PROJECT_ID.appspot.com/'
LOVE_SENDER_EMAIL = 'Yelp Love <love@PROJECT_ID.appspot.com>'
# Flask's secret key, used to encry... | # Copy this file to config.py and change the settings. Don't forget to specify your own SECRET_KEY.
# The app name will be used in several places.
APP_NAME = 'Yelp Love'
APP_BASE_URL = 'https://PROJECT_ID.appspot.com/'
LOVE_SENDER_EMAIL = 'Yelp Love <love@PROJECT_ID.appspotmail.com>'
# Flask's secret key, used to e... | Use appspotmail.com instead of appspot.com for email sender | Use appspotmail.com instead of appspot.com for email sender
| Python | mit | Yelp/love,Yelp/love,Yelp/love | # Copy this file to config.py and change the settings. Don't forget to specify your own SECRET_KEY.
# The app name will be used in several places.
APP_NAME = 'Yelp Love'
APP_BASE_URL = 'https://PROJECT_ID.appspot.com/'
LOVE_SENDER_EMAIL = 'Yelp Love <love@PROJECT_ID.appspot.com>'
# Flask's secret key, used to encry... | # Copy this file to config.py and change the settings. Don't forget to specify your own SECRET_KEY.
# The app name will be used in several places.
APP_NAME = 'Yelp Love'
APP_BASE_URL = 'https://PROJECT_ID.appspot.com/'
LOVE_SENDER_EMAIL = 'Yelp Love <love@PROJECT_ID.appspotmail.com>'
# Flask's secret key, used to e... | <commit_before># Copy this file to config.py and change the settings. Don't forget to specify your own SECRET_KEY.
# The app name will be used in several places.
APP_NAME = 'Yelp Love'
APP_BASE_URL = 'https://PROJECT_ID.appspot.com/'
LOVE_SENDER_EMAIL = 'Yelp Love <love@PROJECT_ID.appspot.com>'
# Flask's secret key... | # Copy this file to config.py and change the settings. Don't forget to specify your own SECRET_KEY.
# The app name will be used in several places.
APP_NAME = 'Yelp Love'
APP_BASE_URL = 'https://PROJECT_ID.appspot.com/'
LOVE_SENDER_EMAIL = 'Yelp Love <love@PROJECT_ID.appspotmail.com>'
# Flask's secret key, used to e... | # Copy this file to config.py and change the settings. Don't forget to specify your own SECRET_KEY.
# The app name will be used in several places.
APP_NAME = 'Yelp Love'
APP_BASE_URL = 'https://PROJECT_ID.appspot.com/'
LOVE_SENDER_EMAIL = 'Yelp Love <love@PROJECT_ID.appspot.com>'
# Flask's secret key, used to encry... | <commit_before># Copy this file to config.py and change the settings. Don't forget to specify your own SECRET_KEY.
# The app name will be used in several places.
APP_NAME = 'Yelp Love'
APP_BASE_URL = 'https://PROJECT_ID.appspot.com/'
LOVE_SENDER_EMAIL = 'Yelp Love <love@PROJECT_ID.appspot.com>'
# Flask's secret key... |
d0d6e2cf02fc5a5b8b1f7070629dad5d22760ca0 | x10d.py | x10d.py | #!/usr/bin/env python
from daemon import Daemon, SerialDispatcher
from serial import Serial
import api
from threading import Thread
import sys
def callback(event):
if event:
print(str(event))
def listen(daemon):
while True:
house, unit, act = input().split()
unit = int(unit)
i... | #!/usr/bin/env python
from daemon import Daemon, SerialDispatcher
from serial import Serial
import api
from threading import Thread
import sys
def callback(event):
if event:
print(str(event))
def listen(daemon):
while True:
house, unit, act = input().split()
unit = int(unit)
i... | Make it easier to kill the daemon | Make it easier to kill the daemon
| Python | unlicense | umbc-hackafe/x10-controller | #!/usr/bin/env python
from daemon import Daemon, SerialDispatcher
from serial import Serial
import api
from threading import Thread
import sys
def callback(event):
if event:
print(str(event))
def listen(daemon):
while True:
house, unit, act = input().split()
unit = int(unit)
i... | #!/usr/bin/env python
from daemon import Daemon, SerialDispatcher
from serial import Serial
import api
from threading import Thread
import sys
def callback(event):
if event:
print(str(event))
def listen(daemon):
while True:
house, unit, act = input().split()
unit = int(unit)
i... | <commit_before>#!/usr/bin/env python
from daemon import Daemon, SerialDispatcher
from serial import Serial
import api
from threading import Thread
import sys
def callback(event):
if event:
print(str(event))
def listen(daemon):
while True:
house, unit, act = input().split()
unit = int(u... | #!/usr/bin/env python
from daemon import Daemon, SerialDispatcher
from serial import Serial
import api
from threading import Thread
import sys
def callback(event):
if event:
print(str(event))
def listen(daemon):
while True:
house, unit, act = input().split()
unit = int(unit)
i... | #!/usr/bin/env python
from daemon import Daemon, SerialDispatcher
from serial import Serial
import api
from threading import Thread
import sys
def callback(event):
if event:
print(str(event))
def listen(daemon):
while True:
house, unit, act = input().split()
unit = int(unit)
i... | <commit_before>#!/usr/bin/env python
from daemon import Daemon, SerialDispatcher
from serial import Serial
import api
from threading import Thread
import sys
def callback(event):
if event:
print(str(event))
def listen(daemon):
while True:
house, unit, act = input().split()
unit = int(u... |
7c09e2df765b466b65570116fe8d0cc5f42d30dd | indra/sources/phosphoELM/api.py | indra/sources/phosphoELM/api.py | import csv
ppelm_s3_key = ''
def process_from_dump(fname=None, delimiter='\t'):
if fname is None:
# ToDo Get from S3
return []
else:
with open(fname, 'r') as f:
csv_reader = csv.reader(f.readlines(), delimiter=delimiter)
ppelm_json = _get_json_from_entry_rows(c... | import csv
from .processor import PhosphoELMPRocessor
s3_bucket = 'bigmech'
ppelm_s3_key = ''
def process_from_dump(fname=None, delimiter='\t'):
if fname is None:
# ToDo Get from S3
return []
else:
with open(fname, 'r') as f:
csv_reader = csv.reader(f.readlines(), delimit... | Return processor w processed statements | Return processor w processed statements
| Python | bsd-2-clause | johnbachman/belpy,bgyori/indra,bgyori/indra,sorgerlab/indra,sorgerlab/belpy,bgyori/indra,sorgerlab/indra,sorgerlab/indra,johnbachman/indra,sorgerlab/belpy,johnbachman/belpy,johnbachman/indra,sorgerlab/belpy,johnbachman/indra,johnbachman/belpy | import csv
ppelm_s3_key = ''
def process_from_dump(fname=None, delimiter='\t'):
if fname is None:
# ToDo Get from S3
return []
else:
with open(fname, 'r') as f:
csv_reader = csv.reader(f.readlines(), delimiter=delimiter)
ppelm_json = _get_json_from_entry_rows(c... | import csv
from .processor import PhosphoELMPRocessor
s3_bucket = 'bigmech'
ppelm_s3_key = ''
def process_from_dump(fname=None, delimiter='\t'):
if fname is None:
# ToDo Get from S3
return []
else:
with open(fname, 'r') as f:
csv_reader = csv.reader(f.readlines(), delimit... | <commit_before>import csv
ppelm_s3_key = ''
def process_from_dump(fname=None, delimiter='\t'):
if fname is None:
# ToDo Get from S3
return []
else:
with open(fname, 'r') as f:
csv_reader = csv.reader(f.readlines(), delimiter=delimiter)
ppelm_json = _get_json_fr... | import csv
from .processor import PhosphoELMPRocessor
s3_bucket = 'bigmech'
ppelm_s3_key = ''
def process_from_dump(fname=None, delimiter='\t'):
if fname is None:
# ToDo Get from S3
return []
else:
with open(fname, 'r') as f:
csv_reader = csv.reader(f.readlines(), delimit... | import csv
ppelm_s3_key = ''
def process_from_dump(fname=None, delimiter='\t'):
if fname is None:
# ToDo Get from S3
return []
else:
with open(fname, 'r') as f:
csv_reader = csv.reader(f.readlines(), delimiter=delimiter)
ppelm_json = _get_json_from_entry_rows(c... | <commit_before>import csv
ppelm_s3_key = ''
def process_from_dump(fname=None, delimiter='\t'):
if fname is None:
# ToDo Get from S3
return []
else:
with open(fname, 'r') as f:
csv_reader = csv.reader(f.readlines(), delimiter=delimiter)
ppelm_json = _get_json_fr... |
0858d7ded502ee7d1a31d8df767bf1b52648e32e | issues_hel/tests/test_import.py | issues_hel/tests/test_import.py | import json
import os
import pytest
from issues.models import Issue
from issues.sync.down import update_local_issue
@pytest.mark.django_db
def test_import_taskful_georeport():
with open(os.path.join(os.path.dirname(__file__), "taskful_request.json"), "r") as infp:
data = json.load(infp)
issue, creat... | import json
import os
import pytest
from issues.sync.down import update_local_issue
@pytest.mark.django_db
def test_import_taskful_georeport():
with open(os.path.join(os.path.dirname(__file__), "taskful_request.json"), "r", encoding="utf8") as infp:
data = json.load(infp)
issue, created = update_loc... | Fix failing import test (how did this ever work?) | Fix failing import test (how did this ever work?)
| Python | mit | 6aika/issue-reporting,6aika/issue-reporting,6aika/issue-reporting | import json
import os
import pytest
from issues.models import Issue
from issues.sync.down import update_local_issue
@pytest.mark.django_db
def test_import_taskful_georeport():
with open(os.path.join(os.path.dirname(__file__), "taskful_request.json"), "r") as infp:
data = json.load(infp)
issue, creat... | import json
import os
import pytest
from issues.sync.down import update_local_issue
@pytest.mark.django_db
def test_import_taskful_georeport():
with open(os.path.join(os.path.dirname(__file__), "taskful_request.json"), "r", encoding="utf8") as infp:
data = json.load(infp)
issue, created = update_loc... | <commit_before>import json
import os
import pytest
from issues.models import Issue
from issues.sync.down import update_local_issue
@pytest.mark.django_db
def test_import_taskful_georeport():
with open(os.path.join(os.path.dirname(__file__), "taskful_request.json"), "r") as infp:
data = json.load(infp)
... | import json
import os
import pytest
from issues.sync.down import update_local_issue
@pytest.mark.django_db
def test_import_taskful_georeport():
with open(os.path.join(os.path.dirname(__file__), "taskful_request.json"), "r", encoding="utf8") as infp:
data = json.load(infp)
issue, created = update_loc... | import json
import os
import pytest
from issues.models import Issue
from issues.sync.down import update_local_issue
@pytest.mark.django_db
def test_import_taskful_georeport():
with open(os.path.join(os.path.dirname(__file__), "taskful_request.json"), "r") as infp:
data = json.load(infp)
issue, creat... | <commit_before>import json
import os
import pytest
from issues.models import Issue
from issues.sync.down import update_local_issue
@pytest.mark.django_db
def test_import_taskful_georeport():
with open(os.path.join(os.path.dirname(__file__), "taskful_request.json"), "r") as infp:
data = json.load(infp)
... |
604e7d15c3072682ba3327c1ef6333d6bb0c768b | astropy/io/misc/asdf/__init__.py | astropy/io/misc/asdf/__init__.py | # Licensed under a 3-clause BSD style license - see LICENSE.rst
# -*- coding: utf-8 -*-
"""
The **asdf** subpackage contains code that is used to serialize astropy types
so that they can be represented and stored using the Advanced Scientific Data
Format (ASDF). This subpackage defines classes, referred to as **tags**,... | # Licensed under a 3-clause BSD style license - see LICENSE.rst
# -*- coding: utf-8 -*-
"""
The **asdf** subpackage contains code that is used to serialize astropy types
so that they can be represented and stored using the Advanced Scientific Data
Format (ASDF). This subpackage defines classes, referred to as **tags**,... | Update ASDF-related docs to reflect presence of schemas [docs only] | Update ASDF-related docs to reflect presence of schemas [docs only]
| Python | bsd-3-clause | lpsinger/astropy,StuartLittlefair/astropy,pllim/astropy,StuartLittlefair/astropy,larrybradley/astropy,saimn/astropy,mhvk/astropy,astropy/astropy,mhvk/astropy,lpsinger/astropy,StuartLittlefair/astropy,bsipocz/astropy,stargaser/astropy,dhomeier/astropy,astropy/astropy,pllim/astropy,StuartLittlefair/astropy,aleksandr-baka... | # Licensed under a 3-clause BSD style license - see LICENSE.rst
# -*- coding: utf-8 -*-
"""
The **asdf** subpackage contains code that is used to serialize astropy types
so that they can be represented and stored using the Advanced Scientific Data
Format (ASDF). This subpackage defines classes, referred to as **tags**,... | # Licensed under a 3-clause BSD style license - see LICENSE.rst
# -*- coding: utf-8 -*-
"""
The **asdf** subpackage contains code that is used to serialize astropy types
so that they can be represented and stored using the Advanced Scientific Data
Format (ASDF). This subpackage defines classes, referred to as **tags**,... | <commit_before># Licensed under a 3-clause BSD style license - see LICENSE.rst
# -*- coding: utf-8 -*-
"""
The **asdf** subpackage contains code that is used to serialize astropy types
so that they can be represented and stored using the Advanced Scientific Data
Format (ASDF). This subpackage defines classes, referred ... | # Licensed under a 3-clause BSD style license - see LICENSE.rst
# -*- coding: utf-8 -*-
"""
The **asdf** subpackage contains code that is used to serialize astropy types
so that they can be represented and stored using the Advanced Scientific Data
Format (ASDF). This subpackage defines classes, referred to as **tags**,... | # Licensed under a 3-clause BSD style license - see LICENSE.rst
# -*- coding: utf-8 -*-
"""
The **asdf** subpackage contains code that is used to serialize astropy types
so that they can be represented and stored using the Advanced Scientific Data
Format (ASDF). This subpackage defines classes, referred to as **tags**,... | <commit_before># Licensed under a 3-clause BSD style license - see LICENSE.rst
# -*- coding: utf-8 -*-
"""
The **asdf** subpackage contains code that is used to serialize astropy types
so that they can be represented and stored using the Advanced Scientific Data
Format (ASDF). This subpackage defines classes, referred ... |
4b63093abbc388bc26151422991ce39553cf137f | neuroimaging/utils/tests/test_odict.py | neuroimaging/utils/tests/test_odict.py | """Test file for the ordered dictionary module, odict.py."""
from neuroimaging.externals.scipy.testing import *
from neuroimaging.utils.odict import odict
class TestOdict(TestCase):
def setUp(self):
print 'setUp'
self.thedict = odict((('one', 1.0), ('two', 2.0), ('three', 3.0)))
def test_cop... | """Test file for the ordered dictionary module, odict.py."""
from neuroimaging.externals.scipy.testing import *
from neuroimaging.utils.odict import odict
class TestOdict(TestCase):
def setUp(self):
print 'setUp'
self.thedict = odict((('one', 1.0), ('two', 2.0), ('three', 3.0)))
def test_cop... | Fix nose call so tests run in __main__. | BUG: Fix nose call so tests run in __main__. | Python | bsd-3-clause | alexis-roche/nipy,alexis-roche/nipy,arokem/nipy,nipy/nipy-labs,nipy/nireg,alexis-roche/nireg,alexis-roche/register,nipy/nipy-labs,arokem/nipy,alexis-roche/register,nipy/nireg,bthirion/nipy,bthirion/nipy,alexis-roche/nireg,arokem/nipy,bthirion/nipy,alexis-roche/register,arokem/nipy,alexis-roche/niseg,alexis-roche/nipy,a... | """Test file for the ordered dictionary module, odict.py."""
from neuroimaging.externals.scipy.testing import *
from neuroimaging.utils.odict import odict
class TestOdict(TestCase):
def setUp(self):
print 'setUp'
self.thedict = odict((('one', 1.0), ('two', 2.0), ('three', 3.0)))
def test_cop... | """Test file for the ordered dictionary module, odict.py."""
from neuroimaging.externals.scipy.testing import *
from neuroimaging.utils.odict import odict
class TestOdict(TestCase):
def setUp(self):
print 'setUp'
self.thedict = odict((('one', 1.0), ('two', 2.0), ('three', 3.0)))
def test_cop... | <commit_before>"""Test file for the ordered dictionary module, odict.py."""
from neuroimaging.externals.scipy.testing import *
from neuroimaging.utils.odict import odict
class TestOdict(TestCase):
def setUp(self):
print 'setUp'
self.thedict = odict((('one', 1.0), ('two', 2.0), ('three', 3.0)))
... | """Test file for the ordered dictionary module, odict.py."""
from neuroimaging.externals.scipy.testing import *
from neuroimaging.utils.odict import odict
class TestOdict(TestCase):
def setUp(self):
print 'setUp'
self.thedict = odict((('one', 1.0), ('two', 2.0), ('three', 3.0)))
def test_cop... | """Test file for the ordered dictionary module, odict.py."""
from neuroimaging.externals.scipy.testing import *
from neuroimaging.utils.odict import odict
class TestOdict(TestCase):
def setUp(self):
print 'setUp'
self.thedict = odict((('one', 1.0), ('two', 2.0), ('three', 3.0)))
def test_cop... | <commit_before>"""Test file for the ordered dictionary module, odict.py."""
from neuroimaging.externals.scipy.testing import *
from neuroimaging.utils.odict import odict
class TestOdict(TestCase):
def setUp(self):
print 'setUp'
self.thedict = odict((('one', 1.0), ('two', 2.0), ('three', 3.0)))
... |
b54ebe45b10e4bc645fae2004c333d78602a62e0 | vext/__init__.py | vext/__init__.py | import logging
from os import environ
from os.path import join
from distutils.sysconfig import get_python_lib
VEXT_DEBUG_LOG = "VEXT_DEBUG_LOG"
vext_pth = join(get_python_lib(), 'vext_importer.pth')
logger = logging.getLogger("vext")
if VEXT_DEBUG_LOG in environ:
if environ.get(VEXT_DEBUG_LOG, "0") == "1":
... | import logging
import sys
from os import environ
from os.path import join
from distutils.sysconfig import get_python_lib
VEXT_DEBUG_LOG = "VEXT_DEBUG_LOG"
vext_pth = join(get_python_lib(), 'vext_importer.pth')
logger = logging.getLogger("vext")
if VEXT_DEBUG_LOG in environ and environ.get(VEXT_DEBUG_LOG, "0") == "1"... | Change how logging works again :) | Change how logging works again :)
| Python | mit | stuaxo/vext | import logging
from os import environ
from os.path import join
from distutils.sysconfig import get_python_lib
VEXT_DEBUG_LOG = "VEXT_DEBUG_LOG"
vext_pth = join(get_python_lib(), 'vext_importer.pth')
logger = logging.getLogger("vext")
if VEXT_DEBUG_LOG in environ:
if environ.get(VEXT_DEBUG_LOG, "0") == "1":
... | import logging
import sys
from os import environ
from os.path import join
from distutils.sysconfig import get_python_lib
VEXT_DEBUG_LOG = "VEXT_DEBUG_LOG"
vext_pth = join(get_python_lib(), 'vext_importer.pth')
logger = logging.getLogger("vext")
if VEXT_DEBUG_LOG in environ and environ.get(VEXT_DEBUG_LOG, "0") == "1"... | <commit_before>import logging
from os import environ
from os.path import join
from distutils.sysconfig import get_python_lib
VEXT_DEBUG_LOG = "VEXT_DEBUG_LOG"
vext_pth = join(get_python_lib(), 'vext_importer.pth')
logger = logging.getLogger("vext")
if VEXT_DEBUG_LOG in environ:
if environ.get(VEXT_DEBUG_LOG, "0"... | import logging
import sys
from os import environ
from os.path import join
from distutils.sysconfig import get_python_lib
VEXT_DEBUG_LOG = "VEXT_DEBUG_LOG"
vext_pth = join(get_python_lib(), 'vext_importer.pth')
logger = logging.getLogger("vext")
if VEXT_DEBUG_LOG in environ and environ.get(VEXT_DEBUG_LOG, "0") == "1"... | import logging
from os import environ
from os.path import join
from distutils.sysconfig import get_python_lib
VEXT_DEBUG_LOG = "VEXT_DEBUG_LOG"
vext_pth = join(get_python_lib(), 'vext_importer.pth')
logger = logging.getLogger("vext")
if VEXT_DEBUG_LOG in environ:
if environ.get(VEXT_DEBUG_LOG, "0") == "1":
... | <commit_before>import logging
from os import environ
from os.path import join
from distutils.sysconfig import get_python_lib
VEXT_DEBUG_LOG = "VEXT_DEBUG_LOG"
vext_pth = join(get_python_lib(), 'vext_importer.pth')
logger = logging.getLogger("vext")
if VEXT_DEBUG_LOG in environ:
if environ.get(VEXT_DEBUG_LOG, "0"... |
8b92bc6c4a782dbb83aadb1bbfc5951dc53f53e1 | netbox/dcim/migrations/0145_site_remove_deprecated_fields.py | netbox/dcim/migrations/0145_site_remove_deprecated_fields.py | from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('dcim', '0144_fix_cable_abs_length'),
]
operations = [
migrations.RemoveField(
model_name='site',
name='asn',
),
migrations.RemoveField(
model_nam... | from django.db import migrations
from django.db.utils import DataError
def check_legacy_data(apps, schema_editor):
"""
Abort the migration if any legacy site fields still contain data.
"""
Site = apps.get_model('dcim', 'Site')
if site_count := Site.objects.exclude(asn__isnull=True).count():
... | Add migration safeguard to prevent accidental destruction of data | Add migration safeguard to prevent accidental destruction of data
| Python | apache-2.0 | digitalocean/netbox,digitalocean/netbox,digitalocean/netbox,digitalocean/netbox | from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('dcim', '0144_fix_cable_abs_length'),
]
operations = [
migrations.RemoveField(
model_name='site',
name='asn',
),
migrations.RemoveField(
model_nam... | from django.db import migrations
from django.db.utils import DataError
def check_legacy_data(apps, schema_editor):
"""
Abort the migration if any legacy site fields still contain data.
"""
Site = apps.get_model('dcim', 'Site')
if site_count := Site.objects.exclude(asn__isnull=True).count():
... | <commit_before>from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('dcim', '0144_fix_cable_abs_length'),
]
operations = [
migrations.RemoveField(
model_name='site',
name='asn',
),
migrations.RemoveField(
... | from django.db import migrations
from django.db.utils import DataError
def check_legacy_data(apps, schema_editor):
"""
Abort the migration if any legacy site fields still contain data.
"""
Site = apps.get_model('dcim', 'Site')
if site_count := Site.objects.exclude(asn__isnull=True).count():
... | from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('dcim', '0144_fix_cable_abs_length'),
]
operations = [
migrations.RemoveField(
model_name='site',
name='asn',
),
migrations.RemoveField(
model_nam... | <commit_before>from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('dcim', '0144_fix_cable_abs_length'),
]
operations = [
migrations.RemoveField(
model_name='site',
name='asn',
),
migrations.RemoveField(
... |
90eb1118c69a1b9e9785145c59a98d7c48613650 | nlppln/commands/ls_chunk.py | nlppln/commands/ls_chunk.py | #!/usr/bin/env python
import click
import os
import json
from nlppln.utils import cwl_file
@click.command()
@click.argument('in_dir', type=click.Path(exists=True))
@click.argument('chunks', type=click.File(encoding='utf-8'))
@click.option('--name', '-n')
def ls_chunk(in_dir, chunks, name):
div = json.load(chunks... | #!/usr/bin/env python
import click
import os
import json
from nlppln.utils import cwl_file
@click.command()
@click.argument('in_dir', type=click.Path(exists=True))
@click.argument('chunks', type=click.File(encoding='utf-8'))
@click.argument('name')
def ls_chunk(in_dir, chunks, name):
div = json.load(chunks)
... | Make name an argument instead of an option | Make name an argument instead of an option
It is required to specify a chunk name.
| Python | apache-2.0 | WhatWorksWhenForWhom/nlppln,WhatWorksWhenForWhom/nlppln,WhatWorksWhenForWhom/nlppln | #!/usr/bin/env python
import click
import os
import json
from nlppln.utils import cwl_file
@click.command()
@click.argument('in_dir', type=click.Path(exists=True))
@click.argument('chunks', type=click.File(encoding='utf-8'))
@click.option('--name', '-n')
def ls_chunk(in_dir, chunks, name):
div = json.load(chunks... | #!/usr/bin/env python
import click
import os
import json
from nlppln.utils import cwl_file
@click.command()
@click.argument('in_dir', type=click.Path(exists=True))
@click.argument('chunks', type=click.File(encoding='utf-8'))
@click.argument('name')
def ls_chunk(in_dir, chunks, name):
div = json.load(chunks)
... | <commit_before>#!/usr/bin/env python
import click
import os
import json
from nlppln.utils import cwl_file
@click.command()
@click.argument('in_dir', type=click.Path(exists=True))
@click.argument('chunks', type=click.File(encoding='utf-8'))
@click.option('--name', '-n')
def ls_chunk(in_dir, chunks, name):
div = j... | #!/usr/bin/env python
import click
import os
import json
from nlppln.utils import cwl_file
@click.command()
@click.argument('in_dir', type=click.Path(exists=True))
@click.argument('chunks', type=click.File(encoding='utf-8'))
@click.argument('name')
def ls_chunk(in_dir, chunks, name):
div = json.load(chunks)
... | #!/usr/bin/env python
import click
import os
import json
from nlppln.utils import cwl_file
@click.command()
@click.argument('in_dir', type=click.Path(exists=True))
@click.argument('chunks', type=click.File(encoding='utf-8'))
@click.option('--name', '-n')
def ls_chunk(in_dir, chunks, name):
div = json.load(chunks... | <commit_before>#!/usr/bin/env python
import click
import os
import json
from nlppln.utils import cwl_file
@click.command()
@click.argument('in_dir', type=click.Path(exists=True))
@click.argument('chunks', type=click.File(encoding='utf-8'))
@click.option('--name', '-n')
def ls_chunk(in_dir, chunks, name):
div = j... |
70f9d5dbb07ce7e1dfc1d167165f90b27b5dfb8f | oscar_sagepay/dashboard/app.py | oscar_sagepay/dashboard/app.py | from django.conf.urls import patterns, url
from django.contrib.admin.views.decorators import staff_member_required
from oscar.core.application import Application
from . import views
try:
from oscar.apps.dashboard.nav import register, Node
except ImportError:
pass
else:
# Old way of registering Dashboard n... | from django.conf.urls import patterns, url
from django.contrib.admin.views.decorators import staff_member_required
from oscar.core.application import Application
from . import views
try:
from oscar.apps.dashboard.nav import register, Node
except ImportError:
pass
else:
# Old way of registering Dashboard n... | Fix 'Datacash' to 'Sagepay' in Dashboard | Fix 'Datacash' to 'Sagepay' in Dashboard
Copy-paste did it again
| Python | bsd-3-clause | django-oscar/django-oscar-sagepay-direct | from django.conf.urls import patterns, url
from django.contrib.admin.views.decorators import staff_member_required
from oscar.core.application import Application
from . import views
try:
from oscar.apps.dashboard.nav import register, Node
except ImportError:
pass
else:
# Old way of registering Dashboard n... | from django.conf.urls import patterns, url
from django.contrib.admin.views.decorators import staff_member_required
from oscar.core.application import Application
from . import views
try:
from oscar.apps.dashboard.nav import register, Node
except ImportError:
pass
else:
# Old way of registering Dashboard n... | <commit_before>from django.conf.urls import patterns, url
from django.contrib.admin.views.decorators import staff_member_required
from oscar.core.application import Application
from . import views
try:
from oscar.apps.dashboard.nav import register, Node
except ImportError:
pass
else:
# Old way of register... | from django.conf.urls import patterns, url
from django.contrib.admin.views.decorators import staff_member_required
from oscar.core.application import Application
from . import views
try:
from oscar.apps.dashboard.nav import register, Node
except ImportError:
pass
else:
# Old way of registering Dashboard n... | from django.conf.urls import patterns, url
from django.contrib.admin.views.decorators import staff_member_required
from oscar.core.application import Application
from . import views
try:
from oscar.apps.dashboard.nav import register, Node
except ImportError:
pass
else:
# Old way of registering Dashboard n... | <commit_before>from django.conf.urls import patterns, url
from django.contrib.admin.views.decorators import staff_member_required
from oscar.core.application import Application
from . import views
try:
from oscar.apps.dashboard.nav import register, Node
except ImportError:
pass
else:
# Old way of register... |
b50aee7a23c44b98b3cd6fee607cc5978a57c927 | contrail_provisioning/config/templates/contrail_sudoers.py | contrail_provisioning/config/templates/contrail_sudoers.py | import string
template = string.Template("""
Defaults:contrail !requiretty
Cmnd_Alias CONFIGRESTART = /usr/sbin/service supervisor-config restart
contrail ALL = (root) NOPASSWD:CONFIGRESTART
""")
| import string
template = string.Template("""
Defaults:contrail !requiretty
Cmnd_Alias CONFIGRESTART = /usr/sbin/service supervisor-config restart
Cmnd_Alias IFMAPRESTART = /usr/sbin/service ifmap restart
contrail ALL = (root) NOPASSWD:CONFIGRESTART,IFMAPRESTART
""")
| Allow contrail user to restart ifmap without password closes-jira-bug: JCB-218958 | Allow contrail user to restart ifmap without password
closes-jira-bug: JCB-218958
Change-Id: Id95001cf5ab455650b5b900b9b5f7bb33ccef8e3
| Python | apache-2.0 | Juniper/contrail-provisioning,Juniper/contrail-provisioning | import string
template = string.Template("""
Defaults:contrail !requiretty
Cmnd_Alias CONFIGRESTART = /usr/sbin/service supervisor-config restart
contrail ALL = (root) NOPASSWD:CONFIGRESTART
""")
Allow contrail user to restart ifmap without password
closes-jira-bug: JCB-218958
Change-Id: Id95001cf5ab455650b5b900b9... | import string
template = string.Template("""
Defaults:contrail !requiretty
Cmnd_Alias CONFIGRESTART = /usr/sbin/service supervisor-config restart
Cmnd_Alias IFMAPRESTART = /usr/sbin/service ifmap restart
contrail ALL = (root) NOPASSWD:CONFIGRESTART,IFMAPRESTART
""")
| <commit_before>import string
template = string.Template("""
Defaults:contrail !requiretty
Cmnd_Alias CONFIGRESTART = /usr/sbin/service supervisor-config restart
contrail ALL = (root) NOPASSWD:CONFIGRESTART
""")
<commit_msg>Allow contrail user to restart ifmap without password
closes-jira-bug: JCB-218958
Change-Id:... | import string
template = string.Template("""
Defaults:contrail !requiretty
Cmnd_Alias CONFIGRESTART = /usr/sbin/service supervisor-config restart
Cmnd_Alias IFMAPRESTART = /usr/sbin/service ifmap restart
contrail ALL = (root) NOPASSWD:CONFIGRESTART,IFMAPRESTART
""")
| import string
template = string.Template("""
Defaults:contrail !requiretty
Cmnd_Alias CONFIGRESTART = /usr/sbin/service supervisor-config restart
contrail ALL = (root) NOPASSWD:CONFIGRESTART
""")
Allow contrail user to restart ifmap without password
closes-jira-bug: JCB-218958
Change-Id: Id95001cf5ab455650b5b900b9... | <commit_before>import string
template = string.Template("""
Defaults:contrail !requiretty
Cmnd_Alias CONFIGRESTART = /usr/sbin/service supervisor-config restart
contrail ALL = (root) NOPASSWD:CONFIGRESTART
""")
<commit_msg>Allow contrail user to restart ifmap without password
closes-jira-bug: JCB-218958
Change-Id:... |
249c6bbd74174b3b053fed13a58b24c8d485163a | src/ggrc/models/custom_attribute_value.py | src/ggrc/models/custom_attribute_value.py | # Copyright (C) 2014 Google Inc., authors, and contributors <see AUTHORS file>
# Licensed under http://www.apache.org/licenses/LICENSE-2.0 <see LICENSE file>
# Created By: laran@reciprocitylabs.com
# Maintained By: laran@reciprocitylabs.com
from ggrc import db
from .mixins import (
deferred, Base
)
class Cust... | # Copyright (C) 2014 Google Inc., authors, and contributors <see AUTHORS file>
# Licensed under http://www.apache.org/licenses/LICENSE-2.0 <see LICENSE file>
# Created By: laran@reciprocitylabs.com
# Maintained By: laran@reciprocitylabs.com
from ggrc import db
from ggrc.models.mixins import Base
from ggrc.models.mixin... | Fix code style for custom attribute value | Fix code style for custom attribute value
| Python | apache-2.0 | plamut/ggrc-core,selahssea/ggrc-core,hasanalom/ggrc-core,AleksNeStu/ggrc-core,jmakov/ggrc-core,andrei-karalionak/ggrc-core,AleksNeStu/ggrc-core,andrei-karalionak/ggrc-core,j0gurt/ggrc-core,jmakov/ggrc-core,NejcZupec/ggrc-core,selahssea/ggrc-core,plamut/ggrc-core,josthkko/ggrc-core,VinnieJohns/ggrc-core,plamut/ggrc-core... | # Copyright (C) 2014 Google Inc., authors, and contributors <see AUTHORS file>
# Licensed under http://www.apache.org/licenses/LICENSE-2.0 <see LICENSE file>
# Created By: laran@reciprocitylabs.com
# Maintained By: laran@reciprocitylabs.com
from ggrc import db
from .mixins import (
deferred, Base
)
class Cust... | # Copyright (C) 2014 Google Inc., authors, and contributors <see AUTHORS file>
# Licensed under http://www.apache.org/licenses/LICENSE-2.0 <see LICENSE file>
# Created By: laran@reciprocitylabs.com
# Maintained By: laran@reciprocitylabs.com
from ggrc import db
from ggrc.models.mixins import Base
from ggrc.models.mixin... | <commit_before># Copyright (C) 2014 Google Inc., authors, and contributors <see AUTHORS file>
# Licensed under http://www.apache.org/licenses/LICENSE-2.0 <see LICENSE file>
# Created By: laran@reciprocitylabs.com
# Maintained By: laran@reciprocitylabs.com
from ggrc import db
from .mixins import (
deferred, Base
... | # Copyright (C) 2014 Google Inc., authors, and contributors <see AUTHORS file>
# Licensed under http://www.apache.org/licenses/LICENSE-2.0 <see LICENSE file>
# Created By: laran@reciprocitylabs.com
# Maintained By: laran@reciprocitylabs.com
from ggrc import db
from ggrc.models.mixins import Base
from ggrc.models.mixin... | # Copyright (C) 2014 Google Inc., authors, and contributors <see AUTHORS file>
# Licensed under http://www.apache.org/licenses/LICENSE-2.0 <see LICENSE file>
# Created By: laran@reciprocitylabs.com
# Maintained By: laran@reciprocitylabs.com
from ggrc import db
from .mixins import (
deferred, Base
)
class Cust... | <commit_before># Copyright (C) 2014 Google Inc., authors, and contributors <see AUTHORS file>
# Licensed under http://www.apache.org/licenses/LICENSE-2.0 <see LICENSE file>
# Created By: laran@reciprocitylabs.com
# Maintained By: laran@reciprocitylabs.com
from ggrc import db
from .mixins import (
deferred, Base
... |
e2ce9ad697cd686e91b546f6f3aa7b24b5e9266f | masters/master.tryserver.chromium.angle/master_site_config.py | masters/master.tryserver.chromium.angle/master_site_config.py | # Copyright 2015 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""ActiveMaster definition."""
from config_bootstrap import Master
class TryServerANGLE(Master.Master4a):
project_name = 'ANGLE Try Server'
master_port... | # Copyright 2015 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""ActiveMaster definition."""
from config_bootstrap import Master
class TryServerANGLE(Master.Master4a):
project_name = 'ANGLE Try Server'
master_port... | Add buildbucket service account to Angle master. | Add buildbucket service account to Angle master.
BUG=577560
TBR=nodir@chromium.org
Review URL: https://codereview.chromium.org/1624703003
git-svn-id: 239fca9b83025a0b6f823aeeca02ba5be3d9fd76@298368 0039d316-1c4b-4281-b951-d872f2087c98
| Python | bsd-3-clause | eunchong/build,eunchong/build,eunchong/build,eunchong/build | # Copyright 2015 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""ActiveMaster definition."""
from config_bootstrap import Master
class TryServerANGLE(Master.Master4a):
project_name = 'ANGLE Try Server'
master_port... | # Copyright 2015 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""ActiveMaster definition."""
from config_bootstrap import Master
class TryServerANGLE(Master.Master4a):
project_name = 'ANGLE Try Server'
master_port... | <commit_before># Copyright 2015 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""ActiveMaster definition."""
from config_bootstrap import Master
class TryServerANGLE(Master.Master4a):
project_name = 'ANGLE Try Server... | # Copyright 2015 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""ActiveMaster definition."""
from config_bootstrap import Master
class TryServerANGLE(Master.Master4a):
project_name = 'ANGLE Try Server'
master_port... | # Copyright 2015 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""ActiveMaster definition."""
from config_bootstrap import Master
class TryServerANGLE(Master.Master4a):
project_name = 'ANGLE Try Server'
master_port... | <commit_before># Copyright 2015 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""ActiveMaster definition."""
from config_bootstrap import Master
class TryServerANGLE(Master.Master4a):
project_name = 'ANGLE Try Server... |
eab3d891d7b0460223990642251bec4bb377543d | website/addons/github/tests/factories.py | website/addons/github/tests/factories.py | # -*- coding: utf-8 -*-
from factory import Sequence, SubFactory
from tests.factories import ExternalAccountFactory, ModularOdmFactory, ProjectFactory, UserFactory
from website.addons.github.model import GitHubNodeSettings, GitHubUserSettings
class GitHubAccountFactory(ExternalAccountFactory):
provider = 'githu... | # -*- coding: utf-8 -*-
from factory import Sequence, SubFactory
from tests.factories import ExternalAccountFactory, ModularOdmFactory, ProjectFactory, UserFactory
from website.addons.github.model import GitHubNodeSettings, GitHubUserSettings
class GitHubAccountFactory(ExternalAccountFactory):
provider = 'githu... | Include display_name in factory for tests | Include display_name in factory for tests
| Python | apache-2.0 | leb2dg/osf.io,doublebits/osf.io,DanielSBrown/osf.io,kwierman/osf.io,abought/osf.io,mluo613/osf.io,jnayak1/osf.io,cslzchen/osf.io,aaxelb/osf.io,pattisdr/osf.io,mluke93/osf.io,laurenrevere/osf.io,alexschiller/osf.io,kwierman/osf.io,wearpants/osf.io,acshi/osf.io,Nesiehr/osf.io,zachjanicki/osf.io,monikagrabowska/osf.io,mon... | # -*- coding: utf-8 -*-
from factory import Sequence, SubFactory
from tests.factories import ExternalAccountFactory, ModularOdmFactory, ProjectFactory, UserFactory
from website.addons.github.model import GitHubNodeSettings, GitHubUserSettings
class GitHubAccountFactory(ExternalAccountFactory):
provider = 'githu... | # -*- coding: utf-8 -*-
from factory import Sequence, SubFactory
from tests.factories import ExternalAccountFactory, ModularOdmFactory, ProjectFactory, UserFactory
from website.addons.github.model import GitHubNodeSettings, GitHubUserSettings
class GitHubAccountFactory(ExternalAccountFactory):
provider = 'githu... | <commit_before># -*- coding: utf-8 -*-
from factory import Sequence, SubFactory
from tests.factories import ExternalAccountFactory, ModularOdmFactory, ProjectFactory, UserFactory
from website.addons.github.model import GitHubNodeSettings, GitHubUserSettings
class GitHubAccountFactory(ExternalAccountFactory):
pr... | # -*- coding: utf-8 -*-
from factory import Sequence, SubFactory
from tests.factories import ExternalAccountFactory, ModularOdmFactory, ProjectFactory, UserFactory
from website.addons.github.model import GitHubNodeSettings, GitHubUserSettings
class GitHubAccountFactory(ExternalAccountFactory):
provider = 'githu... | # -*- coding: utf-8 -*-
from factory import Sequence, SubFactory
from tests.factories import ExternalAccountFactory, ModularOdmFactory, ProjectFactory, UserFactory
from website.addons.github.model import GitHubNodeSettings, GitHubUserSettings
class GitHubAccountFactory(ExternalAccountFactory):
provider = 'githu... | <commit_before># -*- coding: utf-8 -*-
from factory import Sequence, SubFactory
from tests.factories import ExternalAccountFactory, ModularOdmFactory, ProjectFactory, UserFactory
from website.addons.github.model import GitHubNodeSettings, GitHubUserSettings
class GitHubAccountFactory(ExternalAccountFactory):
pr... |
9ff005d1c3ffc82e8469f1ecf7dda2d9ebf8bb46 | Museau/urls.py | Museau/urls.py | from django.conf.urls.defaults import patterns, include, url
from django.conf import settings
# Uncomment the next two lines to enable the admin:
from django.contrib import admin
admin.autodiscover()
urlpatterns = patterns('',
# Museau
url(r'^$', 'music.views.home', name='home'),
# Ajax requests
url(r'^... | from django.conf.urls.defaults import patterns, include, url
from django.conf import settings
# Uncomment the next two lines to enable the admin:
from django.contrib import admin
admin.autodiscover()
urlpatterns = patterns('',
# Museau
url(r'^$', 'music.views.home', name='home'),
# django-registration
u... | Remove ajax urlconf since we don't use it anymore | Remove ajax urlconf since we don't use it anymore
| Python | mit | folz/Museau,folz/Museau | from django.conf.urls.defaults import patterns, include, url
from django.conf import settings
# Uncomment the next two lines to enable the admin:
from django.contrib import admin
admin.autodiscover()
urlpatterns = patterns('',
# Museau
url(r'^$', 'music.views.home', name='home'),
# Ajax requests
url(r'^... | from django.conf.urls.defaults import patterns, include, url
from django.conf import settings
# Uncomment the next two lines to enable the admin:
from django.contrib import admin
admin.autodiscover()
urlpatterns = patterns('',
# Museau
url(r'^$', 'music.views.home', name='home'),
# django-registration
u... | <commit_before>from django.conf.urls.defaults import patterns, include, url
from django.conf import settings
# Uncomment the next two lines to enable the admin:
from django.contrib import admin
admin.autodiscover()
urlpatterns = patterns('',
# Museau
url(r'^$', 'music.views.home', name='home'),
# Ajax requ... | from django.conf.urls.defaults import patterns, include, url
from django.conf import settings
# Uncomment the next two lines to enable the admin:
from django.contrib import admin
admin.autodiscover()
urlpatterns = patterns('',
# Museau
url(r'^$', 'music.views.home', name='home'),
# django-registration
u... | from django.conf.urls.defaults import patterns, include, url
from django.conf import settings
# Uncomment the next two lines to enable the admin:
from django.contrib import admin
admin.autodiscover()
urlpatterns = patterns('',
# Museau
url(r'^$', 'music.views.home', name='home'),
# Ajax requests
url(r'^... | <commit_before>from django.conf.urls.defaults import patterns, include, url
from django.conf import settings
# Uncomment the next two lines to enable the admin:
from django.contrib import admin
admin.autodiscover()
urlpatterns = patterns('',
# Museau
url(r'^$', 'music.views.home', name='home'),
# Ajax requ... |
306336d4445149cd2f0d6fa3a58b7244eafe3cd0 | conveyor/store.py | conveyor/store.py | class BaseStore(object):
def set(self, key, value):
raise NotImplementedError
def get(self, key):
raise NotImplementedError
class InMemoryStore(BaseStore):
def __init__(self, *args, **kwargs):
super(InMemoryStore, self).__init__(*args, **kwargs)
self._data = {}
def... | class BaseStore(object):
def set(self, key, value):
raise NotImplementedError
def get(self, key):
raise NotImplementedError
class InMemoryStore(BaseStore):
def __init__(self, *args, **kwargs):
super(InMemoryStore, self).__init__(*args, **kwargs)
self._data = {}
def... | Add a RedisStore to conveyor | Add a RedisStore to conveyor
| Python | bsd-2-clause | crateio/carrier | class BaseStore(object):
def set(self, key, value):
raise NotImplementedError
def get(self, key):
raise NotImplementedError
class InMemoryStore(BaseStore):
def __init__(self, *args, **kwargs):
super(InMemoryStore, self).__init__(*args, **kwargs)
self._data = {}
def... | class BaseStore(object):
def set(self, key, value):
raise NotImplementedError
def get(self, key):
raise NotImplementedError
class InMemoryStore(BaseStore):
def __init__(self, *args, **kwargs):
super(InMemoryStore, self).__init__(*args, **kwargs)
self._data = {}
def... | <commit_before>class BaseStore(object):
def set(self, key, value):
raise NotImplementedError
def get(self, key):
raise NotImplementedError
class InMemoryStore(BaseStore):
def __init__(self, *args, **kwargs):
super(InMemoryStore, self).__init__(*args, **kwargs)
self._dat... | class BaseStore(object):
def set(self, key, value):
raise NotImplementedError
def get(self, key):
raise NotImplementedError
class InMemoryStore(BaseStore):
def __init__(self, *args, **kwargs):
super(InMemoryStore, self).__init__(*args, **kwargs)
self._data = {}
def... | class BaseStore(object):
def set(self, key, value):
raise NotImplementedError
def get(self, key):
raise NotImplementedError
class InMemoryStore(BaseStore):
def __init__(self, *args, **kwargs):
super(InMemoryStore, self).__init__(*args, **kwargs)
self._data = {}
def... | <commit_before>class BaseStore(object):
def set(self, key, value):
raise NotImplementedError
def get(self, key):
raise NotImplementedError
class InMemoryStore(BaseStore):
def __init__(self, *args, **kwargs):
super(InMemoryStore, self).__init__(*args, **kwargs)
self._dat... |
2bdf58c9a707c0a08c7c48d46c5b9b13db14965f | github/data_types/repository.py | github/data_types/repository.py | from data_types.user import User
class Repository:
"""
GitHub Repository
https://developer.github.com/v3/repos/
Attributes:
id: GitHub internal id
name: Repository short name like "codex"
full_name: Repository short full_name like "codex-team/codex"
description: Optio... | from data_types.user import User
class Repository:
"""
GitHub Repository
https://developer.github.com/v3/repos/
Attributes:
id: GitHub internal id
name: Repository short name like "codex"
full_name: Repository short full_name like "codex-team/codex"
description: Optio... | Add a new field "stargazers_count" | Add a new field "stargazers_count" | Python | mit | codex-bot/github | from data_types.user import User
class Repository:
"""
GitHub Repository
https://developer.github.com/v3/repos/
Attributes:
id: GitHub internal id
name: Repository short name like "codex"
full_name: Repository short full_name like "codex-team/codex"
description: Optio... | from data_types.user import User
class Repository:
"""
GitHub Repository
https://developer.github.com/v3/repos/
Attributes:
id: GitHub internal id
name: Repository short name like "codex"
full_name: Repository short full_name like "codex-team/codex"
description: Optio... | <commit_before>from data_types.user import User
class Repository:
"""
GitHub Repository
https://developer.github.com/v3/repos/
Attributes:
id: GitHub internal id
name: Repository short name like "codex"
full_name: Repository short full_name like "codex-team/codex"
des... | from data_types.user import User
class Repository:
"""
GitHub Repository
https://developer.github.com/v3/repos/
Attributes:
id: GitHub internal id
name: Repository short name like "codex"
full_name: Repository short full_name like "codex-team/codex"
description: Optio... | from data_types.user import User
class Repository:
"""
GitHub Repository
https://developer.github.com/v3/repos/
Attributes:
id: GitHub internal id
name: Repository short name like "codex"
full_name: Repository short full_name like "codex-team/codex"
description: Optio... | <commit_before>from data_types.user import User
class Repository:
"""
GitHub Repository
https://developer.github.com/v3/repos/
Attributes:
id: GitHub internal id
name: Repository short name like "codex"
full_name: Repository short full_name like "codex-team/codex"
des... |
19dd85a13ef0108bd2860a658881a255f6e31613 | debsources/app/patches/views.py | debsources/app/patches/views.py | # Copyright (C) 2015 The Debsources developers <info@sources.debian.net>.
# See the AUTHORS file at the top-level directory of this distribution and at
# https://anonscm.debian.org/gitweb/?p=qa/debsources.git;a=blob;f=AUTHORS;hb=HEAD
#
# This file is part of Debsources. Debsources is free software: you can
# redistrib... | # Copyright (C) 2015 The Debsources developers <info@sources.debian.net>.
# See the AUTHORS file at the top-level directory of this distribution and at
# https://anonscm.debian.org/gitweb/?p=qa/debsources.git;a=blob;f=AUTHORS;hb=HEAD
#
# This file is part of Debsources. Debsources is free software: you can
# redistrib... | Add version handling in SummaryView for the patches BP | Add version handling in SummaryView for the patches BP
| Python | agpl-3.0 | devoxel/debsources,vivekanand1101/debsources,vivekanand1101/debsources,zacchiro/debsources,Debian/debsources,devoxel/debsources,zacchiro/debsources,matthieucan/debsources,Debian/debsources,oorestisime/debsources,vivekanand1101/debsources,devoxel/debsources,matthieucan/debsources,devoxel/debsources,matthieucan/debsource... | # Copyright (C) 2015 The Debsources developers <info@sources.debian.net>.
# See the AUTHORS file at the top-level directory of this distribution and at
# https://anonscm.debian.org/gitweb/?p=qa/debsources.git;a=blob;f=AUTHORS;hb=HEAD
#
# This file is part of Debsources. Debsources is free software: you can
# redistrib... | # Copyright (C) 2015 The Debsources developers <info@sources.debian.net>.
# See the AUTHORS file at the top-level directory of this distribution and at
# https://anonscm.debian.org/gitweb/?p=qa/debsources.git;a=blob;f=AUTHORS;hb=HEAD
#
# This file is part of Debsources. Debsources is free software: you can
# redistrib... | <commit_before># Copyright (C) 2015 The Debsources developers <info@sources.debian.net>.
# See the AUTHORS file at the top-level directory of this distribution and at
# https://anonscm.debian.org/gitweb/?p=qa/debsources.git;a=blob;f=AUTHORS;hb=HEAD
#
# This file is part of Debsources. Debsources is free software: you ... | # Copyright (C) 2015 The Debsources developers <info@sources.debian.net>.
# See the AUTHORS file at the top-level directory of this distribution and at
# https://anonscm.debian.org/gitweb/?p=qa/debsources.git;a=blob;f=AUTHORS;hb=HEAD
#
# This file is part of Debsources. Debsources is free software: you can
# redistrib... | # Copyright (C) 2015 The Debsources developers <info@sources.debian.net>.
# See the AUTHORS file at the top-level directory of this distribution and at
# https://anonscm.debian.org/gitweb/?p=qa/debsources.git;a=blob;f=AUTHORS;hb=HEAD
#
# This file is part of Debsources. Debsources is free software: you can
# redistrib... | <commit_before># Copyright (C) 2015 The Debsources developers <info@sources.debian.net>.
# See the AUTHORS file at the top-level directory of this distribution and at
# https://anonscm.debian.org/gitweb/?p=qa/debsources.git;a=blob;f=AUTHORS;hb=HEAD
#
# This file is part of Debsources. Debsources is free software: you ... |
84ff58c997c163f9e3566245beb9af308a77b880 | spyder_terminal/server/rest/term_rest.py | spyder_terminal/server/rest/term_rest.py | # -*- coding: iso-8859-15 -*-
"""Main HTTP routes request handlers."""
import tornado.web
import tornado.escape
from os import getcwd
class MainHandler(tornado.web.RequestHandler):
"""Handles creation of new terminals."""
@tornado.gen.coroutine
def post(self):
"""POST verb: Create a new termina... | # -*- coding: iso-8859-15 -*-
"""Main HTTP routes request handlers."""
import tornado.web
import tornado.escape
from os import getcwd
class MainHandler(tornado.web.RequestHandler):
"""Handles creation of new terminals."""
@tornado.gen.coroutine
def post(self):
"""POST verb: Create a new termina... | Change default terminal size arguments - Add server debug log message | Change default terminal size arguments - Add server debug log message
| Python | mit | spyder-ide/spyder-terminal,spyder-ide/spyder-terminal,spyder-ide/spyder-terminal,spyder-ide/spyder-terminal,andfoy/spyder-terminal,andfoy/spyder-terminal,andfoy/spyder-terminal | # -*- coding: iso-8859-15 -*-
"""Main HTTP routes request handlers."""
import tornado.web
import tornado.escape
from os import getcwd
class MainHandler(tornado.web.RequestHandler):
"""Handles creation of new terminals."""
@tornado.gen.coroutine
def post(self):
"""POST verb: Create a new termina... | # -*- coding: iso-8859-15 -*-
"""Main HTTP routes request handlers."""
import tornado.web
import tornado.escape
from os import getcwd
class MainHandler(tornado.web.RequestHandler):
"""Handles creation of new terminals."""
@tornado.gen.coroutine
def post(self):
"""POST verb: Create a new termina... | <commit_before># -*- coding: iso-8859-15 -*-
"""Main HTTP routes request handlers."""
import tornado.web
import tornado.escape
from os import getcwd
class MainHandler(tornado.web.RequestHandler):
"""Handles creation of new terminals."""
@tornado.gen.coroutine
def post(self):
"""POST verb: Creat... | # -*- coding: iso-8859-15 -*-
"""Main HTTP routes request handlers."""
import tornado.web
import tornado.escape
from os import getcwd
class MainHandler(tornado.web.RequestHandler):
"""Handles creation of new terminals."""
@tornado.gen.coroutine
def post(self):
"""POST verb: Create a new termina... | # -*- coding: iso-8859-15 -*-
"""Main HTTP routes request handlers."""
import tornado.web
import tornado.escape
from os import getcwd
class MainHandler(tornado.web.RequestHandler):
"""Handles creation of new terminals."""
@tornado.gen.coroutine
def post(self):
"""POST verb: Create a new termina... | <commit_before># -*- coding: iso-8859-15 -*-
"""Main HTTP routes request handlers."""
import tornado.web
import tornado.escape
from os import getcwd
class MainHandler(tornado.web.RequestHandler):
"""Handles creation of new terminals."""
@tornado.gen.coroutine
def post(self):
"""POST verb: Creat... |
0e69efcd3a6992d0a34d7ecb80a76c3fbc52975c | pikka_bird_collector/sender.py | pikka_bird_collector/sender.py | import datetime
import logging
import json
import urllib.parse
import requests
class Sender():
SERVER_SERVICES = {
'collections': '/collections'}
REQUEST_HEADERS = {
'Content-Type': 'application/json'}
def __init__(self, server_uri, logger=None):
self.server_uri = se... | import datetime
import logging
import json
import urllib.parse
import requests
class Sender():
SERVER_SERVICES = {
'collections': '/collections'}
REQUEST_HEADERS = {
'Content-Type': 'application/json'}
def __init__(self, server_uri, logger=None):
self.server_uri = se... | Extend Sender.send() to return boolean status. | Extend Sender.send() to return boolean status.
| Python | mit | tiredpixel/pikka-bird-collector-py | import datetime
import logging
import json
import urllib.parse
import requests
class Sender():
SERVER_SERVICES = {
'collections': '/collections'}
REQUEST_HEADERS = {
'Content-Type': 'application/json'}
def __init__(self, server_uri, logger=None):
self.server_uri = se... | import datetime
import logging
import json
import urllib.parse
import requests
class Sender():
SERVER_SERVICES = {
'collections': '/collections'}
REQUEST_HEADERS = {
'Content-Type': 'application/json'}
def __init__(self, server_uri, logger=None):
self.server_uri = se... | <commit_before>import datetime
import logging
import json
import urllib.parse
import requests
class Sender():
SERVER_SERVICES = {
'collections': '/collections'}
REQUEST_HEADERS = {
'Content-Type': 'application/json'}
def __init__(self, server_uri, logger=None):
self.... | import datetime
import logging
import json
import urllib.parse
import requests
class Sender():
SERVER_SERVICES = {
'collections': '/collections'}
REQUEST_HEADERS = {
'Content-Type': 'application/json'}
def __init__(self, server_uri, logger=None):
self.server_uri = se... | import datetime
import logging
import json
import urllib.parse
import requests
class Sender():
SERVER_SERVICES = {
'collections': '/collections'}
REQUEST_HEADERS = {
'Content-Type': 'application/json'}
def __init__(self, server_uri, logger=None):
self.server_uri = se... | <commit_before>import datetime
import logging
import json
import urllib.parse
import requests
class Sender():
SERVER_SERVICES = {
'collections': '/collections'}
REQUEST_HEADERS = {
'Content-Type': 'application/json'}
def __init__(self, server_uri, logger=None):
self.... |
89cb0d1558e02a72048047709d9960a1f7ee265e | src/waldur_mastermind/marketplace_checklist/import_export_resources.py | src/waldur_mastermind/marketplace_checklist/import_export_resources.py | import tablib
from import_export import fields, resources, widgets
from . import models
CategoryResource = resources.modelresource_factory(models.Category)
QuestionResource = resources.modelresource_factory(models.Question)
class ChecklistResource(resources.ModelResource):
questions = fields.Field(column_name='... | import tablib
from import_export import fields, resources, widgets
from . import models
CategoryResource = resources.modelresource_factory(models.Category)
QuestionResource = resources.modelresource_factory(models.Question)
class ChecklistResource(resources.ModelResource):
questions = fields.Field(column_name='... | Remove statement without side effect. | Remove statement without side effect.
| Python | mit | opennode/nodeconductor-assembly-waldur,opennode/waldur-mastermind,opennode/nodeconductor-assembly-waldur,opennode/waldur-mastermind,opennode/nodeconductor-assembly-waldur,opennode/waldur-mastermind,opennode/waldur-mastermind | import tablib
from import_export import fields, resources, widgets
from . import models
CategoryResource = resources.modelresource_factory(models.Category)
QuestionResource = resources.modelresource_factory(models.Question)
class ChecklistResource(resources.ModelResource):
questions = fields.Field(column_name='... | import tablib
from import_export import fields, resources, widgets
from . import models
CategoryResource = resources.modelresource_factory(models.Category)
QuestionResource = resources.modelresource_factory(models.Question)
class ChecklistResource(resources.ModelResource):
questions = fields.Field(column_name='... | <commit_before>import tablib
from import_export import fields, resources, widgets
from . import models
CategoryResource = resources.modelresource_factory(models.Category)
QuestionResource = resources.modelresource_factory(models.Question)
class ChecklistResource(resources.ModelResource):
questions = fields.Fiel... | import tablib
from import_export import fields, resources, widgets
from . import models
CategoryResource = resources.modelresource_factory(models.Category)
QuestionResource = resources.modelresource_factory(models.Question)
class ChecklistResource(resources.ModelResource):
questions = fields.Field(column_name='... | import tablib
from import_export import fields, resources, widgets
from . import models
CategoryResource = resources.modelresource_factory(models.Category)
QuestionResource = resources.modelresource_factory(models.Question)
class ChecklistResource(resources.ModelResource):
questions = fields.Field(column_name='... | <commit_before>import tablib
from import_export import fields, resources, widgets
from . import models
CategoryResource = resources.modelresource_factory(models.Category)
QuestionResource = resources.modelresource_factory(models.Question)
class ChecklistResource(resources.ModelResource):
questions = fields.Fiel... |
5d463f5823baad3ea485a54719a5799d14f10a27 | lda/__init__.py | lda/__init__.py | from __future__ import absolute_import, unicode_literals # noqa
import logging
import pbr.version
from lda.lda import LDA # noqa
__version__ = pbr.version.VersionInfo('lda').version_string()
logging.getLogger('lda').addHandler(logging.NullHandler())
| from __future__ import absolute_import, unicode_literals # noqa
import logging
import pbr.version
from lda.lda import LDA # noqa
import lda.datasets # noqa
__version__ = pbr.version.VersionInfo('lda').version_string()
logging.getLogger('lda').addHandler(logging.NullHandler())
| Make lda.datasets available after import lda | Make lda.datasets available after import lda
| Python | mpl-2.0 | hothHowler/lda,ww880412/lda,ww880412/lda,ariddell/lda,tdhopper/lda-1,tdhopper/lda-1,ariddell/lda-debian,ww880412/lda,tdhopper/lda-1,ariddell/lda,hothHowler/lda,ariddell/lda-debian,ariddell/lda,hothHowler/lda,ariddell/lda-debian | from __future__ import absolute_import, unicode_literals # noqa
import logging
import pbr.version
from lda.lda import LDA # noqa
__version__ = pbr.version.VersionInfo('lda').version_string()
logging.getLogger('lda').addHandler(logging.NullHandler())
Make lda.datasets available after import lda | from __future__ import absolute_import, unicode_literals # noqa
import logging
import pbr.version
from lda.lda import LDA # noqa
import lda.datasets # noqa
__version__ = pbr.version.VersionInfo('lda').version_string()
logging.getLogger('lda').addHandler(logging.NullHandler())
| <commit_before>from __future__ import absolute_import, unicode_literals # noqa
import logging
import pbr.version
from lda.lda import LDA # noqa
__version__ = pbr.version.VersionInfo('lda').version_string()
logging.getLogger('lda').addHandler(logging.NullHandler())
<commit_msg>Make lda.datasets available after im... | from __future__ import absolute_import, unicode_literals # noqa
import logging
import pbr.version
from lda.lda import LDA # noqa
import lda.datasets # noqa
__version__ = pbr.version.VersionInfo('lda').version_string()
logging.getLogger('lda').addHandler(logging.NullHandler())
| from __future__ import absolute_import, unicode_literals # noqa
import logging
import pbr.version
from lda.lda import LDA # noqa
__version__ = pbr.version.VersionInfo('lda').version_string()
logging.getLogger('lda').addHandler(logging.NullHandler())
Make lda.datasets available after import ldafrom __future__ imp... | <commit_before>from __future__ import absolute_import, unicode_literals # noqa
import logging
import pbr.version
from lda.lda import LDA # noqa
__version__ = pbr.version.VersionInfo('lda').version_string()
logging.getLogger('lda').addHandler(logging.NullHandler())
<commit_msg>Make lda.datasets available after im... |
fd1783df3648cdb80b32ae41ffd1d9e1ccb23196 | tests/ex25_tests.py | tests/ex25_tests.py | from nose.tools import *
from exercises import ex25
def test_make_ing_form_ie():
'''
Test for ie match
'''
present_verb = ex25.make_ing_form('tie')
assert_equal(third_person_form, 'tying')
def test_make_ing_form_e():
'''
Test for e match
'''
present_verb = ex25.make_ing_form('g... | from nose.tools import *
from exercises import ex25
def test_make_ing_form_ie():
'''
Test for ie match
'''
present_verb = ex25.make_ing_form('tie')
assert_equal(present_verb, 'tying')
def test_make_ing_form_e():
'''
Test for e match
'''
present_verb = ex25.make_ing_form('grate'... | Fix a copy paste fail | Fix a copy paste fail
| Python | mit | gravyboat/python-exercises | from nose.tools import *
from exercises import ex25
def test_make_ing_form_ie():
'''
Test for ie match
'''
present_verb = ex25.make_ing_form('tie')
assert_equal(third_person_form, 'tying')
def test_make_ing_form_e():
'''
Test for e match
'''
present_verb = ex25.make_ing_form('g... | from nose.tools import *
from exercises import ex25
def test_make_ing_form_ie():
'''
Test for ie match
'''
present_verb = ex25.make_ing_form('tie')
assert_equal(present_verb, 'tying')
def test_make_ing_form_e():
'''
Test for e match
'''
present_verb = ex25.make_ing_form('grate'... | <commit_before>from nose.tools import *
from exercises import ex25
def test_make_ing_form_ie():
'''
Test for ie match
'''
present_verb = ex25.make_ing_form('tie')
assert_equal(third_person_form, 'tying')
def test_make_ing_form_e():
'''
Test for e match
'''
present_verb = ex25.m... | from nose.tools import *
from exercises import ex25
def test_make_ing_form_ie():
'''
Test for ie match
'''
present_verb = ex25.make_ing_form('tie')
assert_equal(present_verb, 'tying')
def test_make_ing_form_e():
'''
Test for e match
'''
present_verb = ex25.make_ing_form('grate'... | from nose.tools import *
from exercises import ex25
def test_make_ing_form_ie():
'''
Test for ie match
'''
present_verb = ex25.make_ing_form('tie')
assert_equal(third_person_form, 'tying')
def test_make_ing_form_e():
'''
Test for e match
'''
present_verb = ex25.make_ing_form('g... | <commit_before>from nose.tools import *
from exercises import ex25
def test_make_ing_form_ie():
'''
Test for ie match
'''
present_verb = ex25.make_ing_form('tie')
assert_equal(third_person_form, 'tying')
def test_make_ing_form_e():
'''
Test for e match
'''
present_verb = ex25.m... |
3492cadef1b3cd204f23e47f17722abcabce435b | test/win/gyptest-link-pdb.py | test/win/gyptest-link-pdb.py | #!/usr/bin/env python
# Copyright (c) 2012 Google Inc. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""
Verifies that the 'Profile' attribute in VCLinker is extracted properly.
"""
import TestGyp
import os
import sys
if sys.platform == ... | #!/usr/bin/env python
# Copyright (c) 2012 Google Inc. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""
Verifies that the 'Profile' attribute in VCLinker is extracted properly.
"""
import TestGyp
import os
import sys
if sys.platform == ... | Insert empty line at to fix patch. | Insert empty line at to fix patch.
gyptest-link-pdb.py was checked in without a blank line. This appears
to cause a patch issue with the try bots. This CL is only a whitespace
change to attempt to fix that problem.
SEE:
patching file test/win/gyptest-link-pdb.py
Hunk #1 FAILED at 26.
1 out of 1 hunk FAILED -- savin... | Python | bsd-3-clause | old8xp/gyp_from_google,old8xp/gyp_from_google,old8xp/gyp_from_google,old8xp/gyp_from_google,old8xp/gyp_from_google | #!/usr/bin/env python
# Copyright (c) 2012 Google Inc. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""
Verifies that the 'Profile' attribute in VCLinker is extracted properly.
"""
import TestGyp
import os
import sys
if sys.platform == ... | #!/usr/bin/env python
# Copyright (c) 2012 Google Inc. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""
Verifies that the 'Profile' attribute in VCLinker is extracted properly.
"""
import TestGyp
import os
import sys
if sys.platform == ... | <commit_before>#!/usr/bin/env python
# Copyright (c) 2012 Google Inc. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""
Verifies that the 'Profile' attribute in VCLinker is extracted properly.
"""
import TestGyp
import os
import sys
if s... | #!/usr/bin/env python
# Copyright (c) 2012 Google Inc. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""
Verifies that the 'Profile' attribute in VCLinker is extracted properly.
"""
import TestGyp
import os
import sys
if sys.platform == ... | #!/usr/bin/env python
# Copyright (c) 2012 Google Inc. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""
Verifies that the 'Profile' attribute in VCLinker is extracted properly.
"""
import TestGyp
import os
import sys
if sys.platform == ... | <commit_before>#!/usr/bin/env python
# Copyright (c) 2012 Google Inc. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""
Verifies that the 'Profile' attribute in VCLinker is extracted properly.
"""
import TestGyp
import os
import sys
if s... |
7c1cce47e2a3cd8743e5e7d7795e9f5014d5f6ec | tests/test_utils.py | tests/test_utils.py | from tinydb.utils import LRUCache
def test_lru_cache():
cache = LRUCache(capacity=3)
cache["a"] = 1
cache["b"] = 2
cache["c"] = 3
_ = cache["a"] # move to front in lru queue
cache["d"] = 4 # move oldest item out of lru queue
assert cache.lru == ["c", "a", "d"]
def test_lru_cache_set_m... | from tinydb.utils import LRUCache
def test_lru_cache():
cache = LRUCache(capacity=3)
cache["a"] = 1
cache["b"] = 2
cache["c"] = 3
_ = cache["a"] # move to front in lru queue
cache["d"] = 4 # move oldest item out of lru queue
assert cache.lru == ["c", "a", "d"]
def test_lru_cache_set_m... | Improve test coverage once again... | Improve test coverage once again...
| Python | mit | cagnosolutions/tinydb,raquel-ucl/tinydb,ivankravets/tinydb,Callwoola/tinydb,msiemens/tinydb | from tinydb.utils import LRUCache
def test_lru_cache():
cache = LRUCache(capacity=3)
cache["a"] = 1
cache["b"] = 2
cache["c"] = 3
_ = cache["a"] # move to front in lru queue
cache["d"] = 4 # move oldest item out of lru queue
assert cache.lru == ["c", "a", "d"]
def test_lru_cache_set_m... | from tinydb.utils import LRUCache
def test_lru_cache():
cache = LRUCache(capacity=3)
cache["a"] = 1
cache["b"] = 2
cache["c"] = 3
_ = cache["a"] # move to front in lru queue
cache["d"] = 4 # move oldest item out of lru queue
assert cache.lru == ["c", "a", "d"]
def test_lru_cache_set_m... | <commit_before>from tinydb.utils import LRUCache
def test_lru_cache():
cache = LRUCache(capacity=3)
cache["a"] = 1
cache["b"] = 2
cache["c"] = 3
_ = cache["a"] # move to front in lru queue
cache["d"] = 4 # move oldest item out of lru queue
assert cache.lru == ["c", "a", "d"]
def test_... | from tinydb.utils import LRUCache
def test_lru_cache():
cache = LRUCache(capacity=3)
cache["a"] = 1
cache["b"] = 2
cache["c"] = 3
_ = cache["a"] # move to front in lru queue
cache["d"] = 4 # move oldest item out of lru queue
assert cache.lru == ["c", "a", "d"]
def test_lru_cache_set_m... | from tinydb.utils import LRUCache
def test_lru_cache():
cache = LRUCache(capacity=3)
cache["a"] = 1
cache["b"] = 2
cache["c"] = 3
_ = cache["a"] # move to front in lru queue
cache["d"] = 4 # move oldest item out of lru queue
assert cache.lru == ["c", "a", "d"]
def test_lru_cache_set_m... | <commit_before>from tinydb.utils import LRUCache
def test_lru_cache():
cache = LRUCache(capacity=3)
cache["a"] = 1
cache["b"] = 2
cache["c"] = 3
_ = cache["a"] # move to front in lru queue
cache["d"] = 4 # move oldest item out of lru queue
assert cache.lru == ["c", "a", "d"]
def test_... |
4e20731050c4b9f5a27693427e73ade62af0012e | web/impact/impact/v1/helpers/matching_criterion_helper.py | web/impact/impact/v1/helpers/matching_criterion_helper.py | # MIT License
# Copyright (c) 2017 MassChallenge, Inc.
from django.db.models import Q
from impact.v1.helpers.criterion_helper import CriterionHelper
class MatchingCriterionHelper(CriterionHelper):
def __init__(self, subject):
super().__init__(subject)
self._app_ids_to_targets = {}
self._t... | # MIT License
# Copyright (c) 2017 MassChallenge, Inc.
from django.db.models import Q
from impact.v1.helpers.criterion_helper import CriterionHelper
class MatchingCriterionHelper(CriterionHelper):
def __init__(self, subject):
super().__init__(subject)
self._app_ids_to_targets = {}
self._t... | Address CodeClimate cognitive complexity concern | [AC-5625] Address CodeClimate cognitive complexity concern
| Python | mit | masschallenge/impact-api,masschallenge/impact-api,masschallenge/impact-api,masschallenge/impact-api | # MIT License
# Copyright (c) 2017 MassChallenge, Inc.
from django.db.models import Q
from impact.v1.helpers.criterion_helper import CriterionHelper
class MatchingCriterionHelper(CriterionHelper):
def __init__(self, subject):
super().__init__(subject)
self._app_ids_to_targets = {}
self._t... | # MIT License
# Copyright (c) 2017 MassChallenge, Inc.
from django.db.models import Q
from impact.v1.helpers.criterion_helper import CriterionHelper
class MatchingCriterionHelper(CriterionHelper):
def __init__(self, subject):
super().__init__(subject)
self._app_ids_to_targets = {}
self._t... | <commit_before># MIT License
# Copyright (c) 2017 MassChallenge, Inc.
from django.db.models import Q
from impact.v1.helpers.criterion_helper import CriterionHelper
class MatchingCriterionHelper(CriterionHelper):
def __init__(self, subject):
super().__init__(subject)
self._app_ids_to_targets = {}
... | # MIT License
# Copyright (c) 2017 MassChallenge, Inc.
from django.db.models import Q
from impact.v1.helpers.criterion_helper import CriterionHelper
class MatchingCriterionHelper(CriterionHelper):
def __init__(self, subject):
super().__init__(subject)
self._app_ids_to_targets = {}
self._t... | # MIT License
# Copyright (c) 2017 MassChallenge, Inc.
from django.db.models import Q
from impact.v1.helpers.criterion_helper import CriterionHelper
class MatchingCriterionHelper(CriterionHelper):
def __init__(self, subject):
super().__init__(subject)
self._app_ids_to_targets = {}
self._t... | <commit_before># MIT License
# Copyright (c) 2017 MassChallenge, Inc.
from django.db.models import Q
from impact.v1.helpers.criterion_helper import CriterionHelper
class MatchingCriterionHelper(CriterionHelper):
def __init__(self, subject):
super().__init__(subject)
self._app_ids_to_targets = {}
... |
378ef98e78894024aaed18d55543c755c7095df4 | src/InventoryManagement/Item/models.py | src/InventoryManagement/Item/models.py | from django.db import models
# Create your models here.
| from django.db import models
# Create your models here.
# Model of an Item
class Item(models.Model):
item_name = models.CharField(max_lenght=100)
objects = ItemManager()
class ItemManager(models.Manager):
def create_item(self, item_name):
item = self.create(item_name=item_name)
| Add name field and object manager | Add name field and object manager
| Python | apache-2.0 | Hekaton/InventoryManagement | from django.db import models
# Create your models here.
Add name field and object manager | from django.db import models
# Create your models here.
# Model of an Item
class Item(models.Model):
item_name = models.CharField(max_lenght=100)
objects = ItemManager()
class ItemManager(models.Manager):
def create_item(self, item_name):
item = self.create(item_name=item_name)
| <commit_before>from django.db import models
# Create your models here.
<commit_msg>Add name field and object manager<commit_after> | from django.db import models
# Create your models here.
# Model of an Item
class Item(models.Model):
item_name = models.CharField(max_lenght=100)
objects = ItemManager()
class ItemManager(models.Manager):
def create_item(self, item_name):
item = self.create(item_name=item_name)
| from django.db import models
# Create your models here.
Add name field and object managerfrom django.db import models
# Create your models here.
# Model of an Item
class Item(models.Model):
item_name = models.CharField(max_lenght=100)
objects = ItemManager()
class ItemManager(models.Manager):
def cre... | <commit_before>from django.db import models
# Create your models here.
<commit_msg>Add name field and object manager<commit_after>from django.db import models
# Create your models here.
# Model of an Item
class Item(models.Model):
item_name = models.CharField(max_lenght=100)
objects = ItemManager()
class ... |
09ee458e4e1968dae21b0becca44e0d3356027d6 | pyluos/tools/scratch/genext.py | pyluos/tools/scratch/genext.py | import os
import re
from jinja2 import Template
DEFAULT_TEMPLATE = os.path.join(os.path.dirname(__file__), 'extension.tpl.js')
supported_modules = [
'button',
'dynamixel',
'l0_dc_motor',
'l0_gpio',
'l0_servo',
'led',
'potard',
]
def find_modules(state, type):
return [
m['ali... | import os
import re
from jinja2 import Template
DEFAULT_TEMPLATE = os.path.join(os.path.dirname(__file__), 'extension.tpl.js')
supported_modules = [
'button',
'dynamixel',
'l0_dc_motor',
'l0_gpio',
'l0_servo',
'led',
'potard',
]
def find_modules(state, type):
return [
str(m[... | Fix an issue in python 2 for the scratch extension. | Fix an issue in python 2 for the scratch extension.
| Python | mit | pollen/pyrobus | import os
import re
from jinja2 import Template
DEFAULT_TEMPLATE = os.path.join(os.path.dirname(__file__), 'extension.tpl.js')
supported_modules = [
'button',
'dynamixel',
'l0_dc_motor',
'l0_gpio',
'l0_servo',
'led',
'potard',
]
def find_modules(state, type):
return [
m['ali... | import os
import re
from jinja2 import Template
DEFAULT_TEMPLATE = os.path.join(os.path.dirname(__file__), 'extension.tpl.js')
supported_modules = [
'button',
'dynamixel',
'l0_dc_motor',
'l0_gpio',
'l0_servo',
'led',
'potard',
]
def find_modules(state, type):
return [
str(m[... | <commit_before>import os
import re
from jinja2 import Template
DEFAULT_TEMPLATE = os.path.join(os.path.dirname(__file__), 'extension.tpl.js')
supported_modules = [
'button',
'dynamixel',
'l0_dc_motor',
'l0_gpio',
'l0_servo',
'led',
'potard',
]
def find_modules(state, type):
return [... | import os
import re
from jinja2 import Template
DEFAULT_TEMPLATE = os.path.join(os.path.dirname(__file__), 'extension.tpl.js')
supported_modules = [
'button',
'dynamixel',
'l0_dc_motor',
'l0_gpio',
'l0_servo',
'led',
'potard',
]
def find_modules(state, type):
return [
str(m[... | import os
import re
from jinja2 import Template
DEFAULT_TEMPLATE = os.path.join(os.path.dirname(__file__), 'extension.tpl.js')
supported_modules = [
'button',
'dynamixel',
'l0_dc_motor',
'l0_gpio',
'l0_servo',
'led',
'potard',
]
def find_modules(state, type):
return [
m['ali... | <commit_before>import os
import re
from jinja2 import Template
DEFAULT_TEMPLATE = os.path.join(os.path.dirname(__file__), 'extension.tpl.js')
supported_modules = [
'button',
'dynamixel',
'l0_dc_motor',
'l0_gpio',
'l0_servo',
'led',
'potard',
]
def find_modules(state, type):
return [... |
22548b3d45b13361fe1df9af8897e38c61bad894 | setup.py | setup.py | import os
import sys
import re
from setuptools import setup, find_packages
v = open(os.path.join(os.path.dirname(__file__), 'dogpile', 'cache', '__init__.py'))
VERSION = re.compile(r".*__version__ = '(.*?)'", re.S).match(v.read()).group(1)
v.close()
readme = os.path.join(os.path.dirname(__file__), 'README.rst')
set... | import os
import sys
import re
from setuptools import setup, find_packages
v = open(os.path.join(os.path.dirname(__file__), 'dogpile', 'cache', '__init__.py'))
VERSION = re.compile(r".*__version__ = '(.*?)'", re.S).match(v.read()).group(1)
v.close()
readme = os.path.join(os.path.dirname(__file__), 'README.rst')
set... | Fix entry point for Mako. | Fix entry point for Mako.
| Python | bsd-3-clause | thruflo/dogpile.cache,thruflo/dogpile.cache | import os
import sys
import re
from setuptools import setup, find_packages
v = open(os.path.join(os.path.dirname(__file__), 'dogpile', 'cache', '__init__.py'))
VERSION = re.compile(r".*__version__ = '(.*?)'", re.S).match(v.read()).group(1)
v.close()
readme = os.path.join(os.path.dirname(__file__), 'README.rst')
set... | import os
import sys
import re
from setuptools import setup, find_packages
v = open(os.path.join(os.path.dirname(__file__), 'dogpile', 'cache', '__init__.py'))
VERSION = re.compile(r".*__version__ = '(.*?)'", re.S).match(v.read()).group(1)
v.close()
readme = os.path.join(os.path.dirname(__file__), 'README.rst')
set... | <commit_before>import os
import sys
import re
from setuptools import setup, find_packages
v = open(os.path.join(os.path.dirname(__file__), 'dogpile', 'cache', '__init__.py'))
VERSION = re.compile(r".*__version__ = '(.*?)'", re.S).match(v.read()).group(1)
v.close()
readme = os.path.join(os.path.dirname(__file__), 'RE... | import os
import sys
import re
from setuptools import setup, find_packages
v = open(os.path.join(os.path.dirname(__file__), 'dogpile', 'cache', '__init__.py'))
VERSION = re.compile(r".*__version__ = '(.*?)'", re.S).match(v.read()).group(1)
v.close()
readme = os.path.join(os.path.dirname(__file__), 'README.rst')
set... | import os
import sys
import re
from setuptools import setup, find_packages
v = open(os.path.join(os.path.dirname(__file__), 'dogpile', 'cache', '__init__.py'))
VERSION = re.compile(r".*__version__ = '(.*?)'", re.S).match(v.read()).group(1)
v.close()
readme = os.path.join(os.path.dirname(__file__), 'README.rst')
set... | <commit_before>import os
import sys
import re
from setuptools import setup, find_packages
v = open(os.path.join(os.path.dirname(__file__), 'dogpile', 'cache', '__init__.py'))
VERSION = re.compile(r".*__version__ = '(.*?)'", re.S).match(v.read()).group(1)
v.close()
readme = os.path.join(os.path.dirname(__file__), 'RE... |
298c187737c1cb1207ce67fdfc47ca214b341006 | setup.py | setup.py | #!/usr/bin/env python
from setuptools import setup
from PyFileMaker import __version__
setup(
name='PyFileMaker',
version=__version__,
description='Python Object Wrapper for FileMaker Server XML Interface',
classifiers=[
'Development Status :: 4 - Beta',
'Environment :: Console',
... | #!/usr/bin/env python
from setuptools import setup
setup(
name='PyFileMaker',
version="3.3",
description='Python Object Wrapper for FileMaker Server XML Interface',
classifiers=[
'Development Status :: 4 - Beta',
'Environment :: Console',
'Intended Audience :: Developers',
... | Remove package import to prevent missing dependencies error | [fix_installation] Remove package import to prevent missing dependencies error
| Python | bsd-3-clause | aeguana/PyFileMaker | #!/usr/bin/env python
from setuptools import setup
from PyFileMaker import __version__
setup(
name='PyFileMaker',
version=__version__,
description='Python Object Wrapper for FileMaker Server XML Interface',
classifiers=[
'Development Status :: 4 - Beta',
'Environment :: Console',
... | #!/usr/bin/env python
from setuptools import setup
setup(
name='PyFileMaker',
version="3.3",
description='Python Object Wrapper for FileMaker Server XML Interface',
classifiers=[
'Development Status :: 4 - Beta',
'Environment :: Console',
'Intended Audience :: Developers',
... | <commit_before>#!/usr/bin/env python
from setuptools import setup
from PyFileMaker import __version__
setup(
name='PyFileMaker',
version=__version__,
description='Python Object Wrapper for FileMaker Server XML Interface',
classifiers=[
'Development Status :: 4 - Beta',
'Environment :: ... | #!/usr/bin/env python
from setuptools import setup
setup(
name='PyFileMaker',
version="3.3",
description='Python Object Wrapper for FileMaker Server XML Interface',
classifiers=[
'Development Status :: 4 - Beta',
'Environment :: Console',
'Intended Audience :: Developers',
... | #!/usr/bin/env python
from setuptools import setup
from PyFileMaker import __version__
setup(
name='PyFileMaker',
version=__version__,
description='Python Object Wrapper for FileMaker Server XML Interface',
classifiers=[
'Development Status :: 4 - Beta',
'Environment :: Console',
... | <commit_before>#!/usr/bin/env python
from setuptools import setup
from PyFileMaker import __version__
setup(
name='PyFileMaker',
version=__version__,
description='Python Object Wrapper for FileMaker Server XML Interface',
classifiers=[
'Development Status :: 4 - Beta',
'Environment :: ... |
4e7399261abf6999ef248e7487c116830c1b0bf4 | app/receipt.py | app/receipt.py | from app import settings
import logging
from structlog import wrap_logger
import base64
import os
from jinja2 import Environment, FileSystemLoader
env = Environment(loader=FileSystemLoader('%s/templates/' % os.path.dirname(__file__)))
logger = wrap_logger(logging.getLogger(__name__))
def get_receipt_endpoint(decryp... | from app import settings
import logging
from structlog import wrap_logger
import base64
import os
from jinja2 import Environment, FileSystemLoader
env = Environment(loader=FileSystemLoader('%s/templates/' % os.path.dirname(__file__)))
logger = wrap_logger(logging.getLogger(__name__))
def get_receipt_endpoint(decryp... | Remove broken authorization header code | Remove broken authorization header code
The authorization header generation code in receipt.py was setting
the authorization header to a byte stream rather than a string
(b'...'). As requests provides a way to generate basic auth headers
using the auth param it makes more sense to use that.
| Python | mit | ONSdigital/Perkin,ONSdigital/Perkin,ONSdigital/Perkin | from app import settings
import logging
from structlog import wrap_logger
import base64
import os
from jinja2 import Environment, FileSystemLoader
env = Environment(loader=FileSystemLoader('%s/templates/' % os.path.dirname(__file__)))
logger = wrap_logger(logging.getLogger(__name__))
def get_receipt_endpoint(decryp... | from app import settings
import logging
from structlog import wrap_logger
import base64
import os
from jinja2 import Environment, FileSystemLoader
env = Environment(loader=FileSystemLoader('%s/templates/' % os.path.dirname(__file__)))
logger = wrap_logger(logging.getLogger(__name__))
def get_receipt_endpoint(decryp... | <commit_before>from app import settings
import logging
from structlog import wrap_logger
import base64
import os
from jinja2 import Environment, FileSystemLoader
env = Environment(loader=FileSystemLoader('%s/templates/' % os.path.dirname(__file__)))
logger = wrap_logger(logging.getLogger(__name__))
def get_receipt_... | from app import settings
import logging
from structlog import wrap_logger
import base64
import os
from jinja2 import Environment, FileSystemLoader
env = Environment(loader=FileSystemLoader('%s/templates/' % os.path.dirname(__file__)))
logger = wrap_logger(logging.getLogger(__name__))
def get_receipt_endpoint(decryp... | from app import settings
import logging
from structlog import wrap_logger
import base64
import os
from jinja2 import Environment, FileSystemLoader
env = Environment(loader=FileSystemLoader('%s/templates/' % os.path.dirname(__file__)))
logger = wrap_logger(logging.getLogger(__name__))
def get_receipt_endpoint(decryp... | <commit_before>from app import settings
import logging
from structlog import wrap_logger
import base64
import os
from jinja2 import Environment, FileSystemLoader
env = Environment(loader=FileSystemLoader('%s/templates/' % os.path.dirname(__file__)))
logger = wrap_logger(logging.getLogger(__name__))
def get_receipt_... |
fccf3df85eb79ea7f270e454f5bb9eda162985f9 | test_api_project/test_api_project/autocomplete_light_registry.py | test_api_project/test_api_project/autocomplete_light_registry.py | import autocomplete_light
from cities_light.contrib.autocomplete_light_restframework import RemoteCountryChannel, RemoteCityChannel
from cities_light.models import City, Country
class RemoteCountryChannel(RemoteCountryChannel):
source_url = 'http://localhost:8000/cities_light/country/'
class RemoteCityChannel(Re... | import autocomplete_light
from cities_light.contrib.autocomplete_light_restframework import RemoteCountryChannel, RemoteCityChannel
from cities_light.models import City, Country
autocomplete_light.register(Country, RemoteCountryChannel,
source_url = 'http://localhost:8000/cities_light/country/')
autocomplete_ligh... | Update example to match current register signature, avoids subclassing | Update example to match current register signature, avoids subclassing
| Python | mit | jonashaag/django-autocomplete-light,Visgean/django-autocomplete-light,dsanders11/django-autocomplete-light,Eraldo/django-autocomplete-light,jonashaag/django-autocomplete-light,dsanders11/django-autocomplete-light,luzfcb/django-autocomplete-light,spookylukey/django-autocomplete-light,Eraldo/django-autocomplete-light,blu... | import autocomplete_light
from cities_light.contrib.autocomplete_light_restframework import RemoteCountryChannel, RemoteCityChannel
from cities_light.models import City, Country
class RemoteCountryChannel(RemoteCountryChannel):
source_url = 'http://localhost:8000/cities_light/country/'
class RemoteCityChannel(Re... | import autocomplete_light
from cities_light.contrib.autocomplete_light_restframework import RemoteCountryChannel, RemoteCityChannel
from cities_light.models import City, Country
autocomplete_light.register(Country, RemoteCountryChannel,
source_url = 'http://localhost:8000/cities_light/country/')
autocomplete_ligh... | <commit_before>import autocomplete_light
from cities_light.contrib.autocomplete_light_restframework import RemoteCountryChannel, RemoteCityChannel
from cities_light.models import City, Country
class RemoteCountryChannel(RemoteCountryChannel):
source_url = 'http://localhost:8000/cities_light/country/'
class Remot... | import autocomplete_light
from cities_light.contrib.autocomplete_light_restframework import RemoteCountryChannel, RemoteCityChannel
from cities_light.models import City, Country
autocomplete_light.register(Country, RemoteCountryChannel,
source_url = 'http://localhost:8000/cities_light/country/')
autocomplete_ligh... | import autocomplete_light
from cities_light.contrib.autocomplete_light_restframework import RemoteCountryChannel, RemoteCityChannel
from cities_light.models import City, Country
class RemoteCountryChannel(RemoteCountryChannel):
source_url = 'http://localhost:8000/cities_light/country/'
class RemoteCityChannel(Re... | <commit_before>import autocomplete_light
from cities_light.contrib.autocomplete_light_restframework import RemoteCountryChannel, RemoteCityChannel
from cities_light.models import City, Country
class RemoteCountryChannel(RemoteCountryChannel):
source_url = 'http://localhost:8000/cities_light/country/'
class Remot... |
6807bd35ee61eb7ff456ba03e432888ba9a241dc | setup.py | setup.py | #!/usr/bin/env python
from setuptools import setup
"""
If you only want to install some of the scripts, you can manually copy them
to the /bin/ or /usr/bin directory and make them executable (chmod +x).
You can also comment out lines in the 'scripts' list below:
"""
scripts = [
'bin/ansi-colormap',
'bin/icanha... | #!/usr/bin/env python
from setuptools import setup
"""
If you only want to install some of the scripts, you can manually copy them
to the /bin/ or /usr/bin directory and make them executable (chmod +x).
You can also comment out lines in the 'scripts' list below:
"""
scripts = [
'bin/ansi-colormap',
'bin/icanha... | Add hostmgr. Currently sorts/cleans /etc/hosts | Add hostmgr. Currently sorts/cleans /etc/hosts
| Python | mit | cmattoon/linux-addons,cmattoon/linux-addons | #!/usr/bin/env python
from setuptools import setup
"""
If you only want to install some of the scripts, you can manually copy them
to the /bin/ or /usr/bin directory and make them executable (chmod +x).
You can also comment out lines in the 'scripts' list below:
"""
scripts = [
'bin/ansi-colormap',
'bin/icanha... | #!/usr/bin/env python
from setuptools import setup
"""
If you only want to install some of the scripts, you can manually copy them
to the /bin/ or /usr/bin directory and make them executable (chmod +x).
You can also comment out lines in the 'scripts' list below:
"""
scripts = [
'bin/ansi-colormap',
'bin/icanha... | <commit_before>#!/usr/bin/env python
from setuptools import setup
"""
If you only want to install some of the scripts, you can manually copy them
to the /bin/ or /usr/bin directory and make them executable (chmod +x).
You can also comment out lines in the 'scripts' list below:
"""
scripts = [
'bin/ansi-colormap',
... | #!/usr/bin/env python
from setuptools import setup
"""
If you only want to install some of the scripts, you can manually copy them
to the /bin/ or /usr/bin directory and make them executable (chmod +x).
You can also comment out lines in the 'scripts' list below:
"""
scripts = [
'bin/ansi-colormap',
'bin/icanha... | #!/usr/bin/env python
from setuptools import setup
"""
If you only want to install some of the scripts, you can manually copy them
to the /bin/ or /usr/bin directory and make them executable (chmod +x).
You can also comment out lines in the 'scripts' list below:
"""
scripts = [
'bin/ansi-colormap',
'bin/icanha... | <commit_before>#!/usr/bin/env python
from setuptools import setup
"""
If you only want to install some of the scripts, you can manually copy them
to the /bin/ or /usr/bin directory and make them executable (chmod +x).
You can also comment out lines in the 'scripts' list below:
"""
scripts = [
'bin/ansi-colormap',
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.