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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
837df000bc86d6bd9c0101f13e3ef18d2873750b | furious/_pkg_meta.py | furious/_pkg_meta.py | version_info = (1, 3, 0)
version = '.'.join(map(str, version_info))
| version_info = (1, 4, 0)
version = '.'.join(map(str, version_info))
| Update the version to 1.4.0 for the latest release | Update the version to 1.4.0 for the latest release
| Python | apache-2.0 | andreleblanc-wf/furious,andreleblanc-wf/furious,Workiva/furious,mattsanders-wf/furious,mattsanders-wf/furious,beaulyddon-wf/furious,beaulyddon-wf/furious,Workiva/furious | version_info = (1, 3, 0)
version = '.'.join(map(str, version_info))
Update the version to 1.4.0 for the latest release | version_info = (1, 4, 0)
version = '.'.join(map(str, version_info))
| <commit_before>version_info = (1, 3, 0)
version = '.'.join(map(str, version_info))
<commit_msg>Update the version to 1.4.0 for the latest release<commit_after> | version_info = (1, 4, 0)
version = '.'.join(map(str, version_info))
| version_info = (1, 3, 0)
version = '.'.join(map(str, version_info))
Update the version to 1.4.0 for the latest releaseversion_info = (1, 4, 0)
version = '.'.join(map(str, version_info))
| <commit_before>version_info = (1, 3, 0)
version = '.'.join(map(str, version_info))
<commit_msg>Update the version to 1.4.0 for the latest release<commit_after>version_info = (1, 4, 0)
version = '.'.join(map(str, version_info))
|
3ba6ad452d747135134ec23d62d0b327708e8ef5 | python/setup.py | python/setup.py | from setuptools import setup
# This is the atca_rapid_response_api Python library.
# Jamie Stevens 2017
# ATCA Senior Systems Scientist
# Jamie.Stevens@csiro.au
setup(name='atca_rapid_response_api',
version='1.0',
description='ATCA Rapid Response Mode API',
url='https://github.com/ste616/atca-rapid-... | from setuptools import setup
# This is the atca_rapid_response_api Python library.
# Jamie Stevens 2017
# ATCA Senior Systems Scientist
# Jamie.Stevens@csiro.au
setup(name='atca_rapid_response_api',
version='1.1',
description='ATCA Rapid Response Mode API',
url='https://github.com/ste616/atca-rapid-... | Update the library version to 1.1 for the recent change. | Update the library version to 1.1 for the recent change.
| Python | mit | ste616/atca-rapid-response-api | from setuptools import setup
# This is the atca_rapid_response_api Python library.
# Jamie Stevens 2017
# ATCA Senior Systems Scientist
# Jamie.Stevens@csiro.au
setup(name='atca_rapid_response_api',
version='1.0',
description='ATCA Rapid Response Mode API',
url='https://github.com/ste616/atca-rapid-... | from setuptools import setup
# This is the atca_rapid_response_api Python library.
# Jamie Stevens 2017
# ATCA Senior Systems Scientist
# Jamie.Stevens@csiro.au
setup(name='atca_rapid_response_api',
version='1.1',
description='ATCA Rapid Response Mode API',
url='https://github.com/ste616/atca-rapid-... | <commit_before>from setuptools import setup
# This is the atca_rapid_response_api Python library.
# Jamie Stevens 2017
# ATCA Senior Systems Scientist
# Jamie.Stevens@csiro.au
setup(name='atca_rapid_response_api',
version='1.0',
description='ATCA Rapid Response Mode API',
url='https://github.com/ste... | from setuptools import setup
# This is the atca_rapid_response_api Python library.
# Jamie Stevens 2017
# ATCA Senior Systems Scientist
# Jamie.Stevens@csiro.au
setup(name='atca_rapid_response_api',
version='1.1',
description='ATCA Rapid Response Mode API',
url='https://github.com/ste616/atca-rapid-... | from setuptools import setup
# This is the atca_rapid_response_api Python library.
# Jamie Stevens 2017
# ATCA Senior Systems Scientist
# Jamie.Stevens@csiro.au
setup(name='atca_rapid_response_api',
version='1.0',
description='ATCA Rapid Response Mode API',
url='https://github.com/ste616/atca-rapid-... | <commit_before>from setuptools import setup
# This is the atca_rapid_response_api Python library.
# Jamie Stevens 2017
# ATCA Senior Systems Scientist
# Jamie.Stevens@csiro.au
setup(name='atca_rapid_response_api',
version='1.0',
description='ATCA Rapid Response Mode API',
url='https://github.com/ste... |
8a9a2a860772ec71c517c4ae4dd93aa4ab2ea342 | git_gutter_events.py | git_gutter_events.py | import sublime
import sublime_plugin
import view_collection
class GitGutterEvents(sublime_plugin.EventListener):
def on_new(self, view):
view_collection.ViewCollection.add(view)
def on_load(self, view):
view_collection.ViewCollection.add(view)
def on_modified(self, view):
view_collection.ViewCollec... | import sublime
import sublime_plugin
import view_collection
class GitGutterEvents(sublime_plugin.EventListener):
def on_load(self, view):
view_collection.ViewCollection.add(view)
def on_modified(self, view):
if view.settings().get('git_gutter_live_mode', True):
view_collection.ViewCollection.add(vi... | Add settings to turn off live mode | Add settings to turn off live mode
| Python | mit | michaelhogg/GitGutter,akpersad/GitGutter,bradsokol/VcsGutter,biodamasceno/GitGutter,robfrawley/sublime-git-gutter,natecavanaugh/GitGutter,natecavanaugh/GitGutter,biodamasceno/GitGutter,michaelhogg/GitGutter,robfrawley/sublime-git-gutter,tushortz/GitGutter,akpersad/GitGutter,ariofrio/VcsGutter,tushortz/GitGutter,natecav... | import sublime
import sublime_plugin
import view_collection
class GitGutterEvents(sublime_plugin.EventListener):
def on_new(self, view):
view_collection.ViewCollection.add(view)
def on_load(self, view):
view_collection.ViewCollection.add(view)
def on_modified(self, view):
view_collection.ViewCollec... | import sublime
import sublime_plugin
import view_collection
class GitGutterEvents(sublime_plugin.EventListener):
def on_load(self, view):
view_collection.ViewCollection.add(view)
def on_modified(self, view):
if view.settings().get('git_gutter_live_mode', True):
view_collection.ViewCollection.add(vi... | <commit_before>import sublime
import sublime_plugin
import view_collection
class GitGutterEvents(sublime_plugin.EventListener):
def on_new(self, view):
view_collection.ViewCollection.add(view)
def on_load(self, view):
view_collection.ViewCollection.add(view)
def on_modified(self, view):
view_collec... | import sublime
import sublime_plugin
import view_collection
class GitGutterEvents(sublime_plugin.EventListener):
def on_load(self, view):
view_collection.ViewCollection.add(view)
def on_modified(self, view):
if view.settings().get('git_gutter_live_mode', True):
view_collection.ViewCollection.add(vi... | import sublime
import sublime_plugin
import view_collection
class GitGutterEvents(sublime_plugin.EventListener):
def on_new(self, view):
view_collection.ViewCollection.add(view)
def on_load(self, view):
view_collection.ViewCollection.add(view)
def on_modified(self, view):
view_collection.ViewCollec... | <commit_before>import sublime
import sublime_plugin
import view_collection
class GitGutterEvents(sublime_plugin.EventListener):
def on_new(self, view):
view_collection.ViewCollection.add(view)
def on_load(self, view):
view_collection.ViewCollection.add(view)
def on_modified(self, view):
view_collec... |
fb87194d6409149e71d6ee52c620fe04f8ca482f | scrapi/processing/osf/collision.py | scrapi/processing/osf/collision.py | from __future__ import unicode_literals
import requests
from scrapi import settings
from scrapi.processing.osf.hashing import REPORT_HASH_FUNCTIONS
from scrapi.processing.osf.hashing import RESOURCE_HASH_FUNCTIONS
def detect_collisions(hashlist, additional=''):
uuids = 'uuid:{}'.format(','.join(hashlist))
u... | from __future__ import unicode_literals
import json
import requests
from scrapi import settings
from scrapi.processing.osf.hashing import REPORT_HASH_FUNCTIONS
from scrapi.processing.osf.hashing import RESOURCE_HASH_FUNCTIONS
def detect_collisions(hashlist, is_resource=False):
if is_resource:
_filter =... | Update to the latest osf API | Update to the latest osf API
| Python | apache-2.0 | felliott/scrapi,erinspace/scrapi,CenterForOpenScience/scrapi,jeffreyliu3230/scrapi,erinspace/scrapi,mehanig/scrapi,ostwald/scrapi,CenterForOpenScience/scrapi,icereval/scrapi,fabianvf/scrapi,mehanig/scrapi,alexgarciac/scrapi,felliott/scrapi,fabianvf/scrapi | from __future__ import unicode_literals
import requests
from scrapi import settings
from scrapi.processing.osf.hashing import REPORT_HASH_FUNCTIONS
from scrapi.processing.osf.hashing import RESOURCE_HASH_FUNCTIONS
def detect_collisions(hashlist, additional=''):
uuids = 'uuid:{}'.format(','.join(hashlist))
u... | from __future__ import unicode_literals
import json
import requests
from scrapi import settings
from scrapi.processing.osf.hashing import REPORT_HASH_FUNCTIONS
from scrapi.processing.osf.hashing import RESOURCE_HASH_FUNCTIONS
def detect_collisions(hashlist, is_resource=False):
if is_resource:
_filter =... | <commit_before>from __future__ import unicode_literals
import requests
from scrapi import settings
from scrapi.processing.osf.hashing import REPORT_HASH_FUNCTIONS
from scrapi.processing.osf.hashing import RESOURCE_HASH_FUNCTIONS
def detect_collisions(hashlist, additional=''):
uuids = 'uuid:{}'.format(','.join(h... | from __future__ import unicode_literals
import json
import requests
from scrapi import settings
from scrapi.processing.osf.hashing import REPORT_HASH_FUNCTIONS
from scrapi.processing.osf.hashing import RESOURCE_HASH_FUNCTIONS
def detect_collisions(hashlist, is_resource=False):
if is_resource:
_filter =... | from __future__ import unicode_literals
import requests
from scrapi import settings
from scrapi.processing.osf.hashing import REPORT_HASH_FUNCTIONS
from scrapi.processing.osf.hashing import RESOURCE_HASH_FUNCTIONS
def detect_collisions(hashlist, additional=''):
uuids = 'uuid:{}'.format(','.join(hashlist))
u... | <commit_before>from __future__ import unicode_literals
import requests
from scrapi import settings
from scrapi.processing.osf.hashing import REPORT_HASH_FUNCTIONS
from scrapi.processing.osf.hashing import RESOURCE_HASH_FUNCTIONS
def detect_collisions(hashlist, additional=''):
uuids = 'uuid:{}'.format(','.join(h... |
a39c288e9beb506d62de66d72fc95750e54d833b | social_core/backends/universe.py | social_core/backends/universe.py | from .oauth import BaseOAuth2
class UniverseOAuth2(BaseOAuth2):
"""Universe Ticketing OAuth2 authentication backend"""
name = 'universe'
AUTHORIZATION_URL = 'https://www.universe.com/oauth/authorize'
ACCESS_TOKEN_URL = 'https://www.universe.com/oauth/token'
BASE_API_URL = 'https://www.universe.com... | from .oauth import BaseOAuth2
class UniverseOAuth2(BaseOAuth2):
"""Universe Ticketing OAuth2 authentication backend"""
name = 'universe'
AUTHORIZATION_URL = 'https://www.universe.com/oauth/authorize'
ACCESS_TOKEN_URL = 'https://www.universe.com/oauth/token'
BASE_API_URL = 'https://www.universe.com... | Remove f-string for pre-Python 3.6 support. | Remove f-string for pre-Python 3.6 support.
| Python | bsd-3-clause | python-social-auth/social-core,python-social-auth/social-core | from .oauth import BaseOAuth2
class UniverseOAuth2(BaseOAuth2):
"""Universe Ticketing OAuth2 authentication backend"""
name = 'universe'
AUTHORIZATION_URL = 'https://www.universe.com/oauth/authorize'
ACCESS_TOKEN_URL = 'https://www.universe.com/oauth/token'
BASE_API_URL = 'https://www.universe.com... | from .oauth import BaseOAuth2
class UniverseOAuth2(BaseOAuth2):
"""Universe Ticketing OAuth2 authentication backend"""
name = 'universe'
AUTHORIZATION_URL = 'https://www.universe.com/oauth/authorize'
ACCESS_TOKEN_URL = 'https://www.universe.com/oauth/token'
BASE_API_URL = 'https://www.universe.com... | <commit_before>from .oauth import BaseOAuth2
class UniverseOAuth2(BaseOAuth2):
"""Universe Ticketing OAuth2 authentication backend"""
name = 'universe'
AUTHORIZATION_URL = 'https://www.universe.com/oauth/authorize'
ACCESS_TOKEN_URL = 'https://www.universe.com/oauth/token'
BASE_API_URL = 'https://w... | from .oauth import BaseOAuth2
class UniverseOAuth2(BaseOAuth2):
"""Universe Ticketing OAuth2 authentication backend"""
name = 'universe'
AUTHORIZATION_URL = 'https://www.universe.com/oauth/authorize'
ACCESS_TOKEN_URL = 'https://www.universe.com/oauth/token'
BASE_API_URL = 'https://www.universe.com... | from .oauth import BaseOAuth2
class UniverseOAuth2(BaseOAuth2):
"""Universe Ticketing OAuth2 authentication backend"""
name = 'universe'
AUTHORIZATION_URL = 'https://www.universe.com/oauth/authorize'
ACCESS_TOKEN_URL = 'https://www.universe.com/oauth/token'
BASE_API_URL = 'https://www.universe.com... | <commit_before>from .oauth import BaseOAuth2
class UniverseOAuth2(BaseOAuth2):
"""Universe Ticketing OAuth2 authentication backend"""
name = 'universe'
AUTHORIZATION_URL = 'https://www.universe.com/oauth/authorize'
ACCESS_TOKEN_URL = 'https://www.universe.com/oauth/token'
BASE_API_URL = 'https://w... |
ef38b68aa288bb43bc33a860ac995836f892854e | usr/examples/99-Tests/unittests.py | usr/examples/99-Tests/unittests.py | # OpenMV Unit Tests.
#
import os, sensor, gc
TEST_DIR = "unittest"
TEMP_DIR = "unittest/temp"
DATA_DIR = "unittest/data"
SCRIPT_DIR = "unittest/script"
if not (TEST_DIR in os.listdir("")):
raise Exception('Unittest dir not found!')
print("")
test_failed = False
def print_result(test, passed):
s = ... | # OpenMV Unit Tests.
#
import os, sensor, gc
TEST_DIR = "unittest"
TEMP_DIR = "unittest/temp"
DATA_DIR = "unittest/data"
SCRIPT_DIR = "unittest/script"
if not (TEST_DIR in os.listdir("")):
raise Exception('Unittest dir not found!')
print("")
test_failed = False
def print_result(test, passed):
s = ... | Move GC collect after loading unit test function. | Move GC collect after loading unit test function.
| Python | mit | kwagyeman/openmv,openmv/openmv,openmv/openmv,kwagyeman/openmv,openmv/openmv,iabdalkader/openmv,openmv/openmv,kwagyeman/openmv,iabdalkader/openmv,kwagyeman/openmv,iabdalkader/openmv,iabdalkader/openmv | # OpenMV Unit Tests.
#
import os, sensor, gc
TEST_DIR = "unittest"
TEMP_DIR = "unittest/temp"
DATA_DIR = "unittest/data"
SCRIPT_DIR = "unittest/script"
if not (TEST_DIR in os.listdir("")):
raise Exception('Unittest dir not found!')
print("")
test_failed = False
def print_result(test, passed):
s = ... | # OpenMV Unit Tests.
#
import os, sensor, gc
TEST_DIR = "unittest"
TEMP_DIR = "unittest/temp"
DATA_DIR = "unittest/data"
SCRIPT_DIR = "unittest/script"
if not (TEST_DIR in os.listdir("")):
raise Exception('Unittest dir not found!')
print("")
test_failed = False
def print_result(test, passed):
s = ... | <commit_before># OpenMV Unit Tests.
#
import os, sensor, gc
TEST_DIR = "unittest"
TEMP_DIR = "unittest/temp"
DATA_DIR = "unittest/data"
SCRIPT_DIR = "unittest/script"
if not (TEST_DIR in os.listdir("")):
raise Exception('Unittest dir not found!')
print("")
test_failed = False
def print_result(test, pa... | # OpenMV Unit Tests.
#
import os, sensor, gc
TEST_DIR = "unittest"
TEMP_DIR = "unittest/temp"
DATA_DIR = "unittest/data"
SCRIPT_DIR = "unittest/script"
if not (TEST_DIR in os.listdir("")):
raise Exception('Unittest dir not found!')
print("")
test_failed = False
def print_result(test, passed):
s = ... | # OpenMV Unit Tests.
#
import os, sensor, gc
TEST_DIR = "unittest"
TEMP_DIR = "unittest/temp"
DATA_DIR = "unittest/data"
SCRIPT_DIR = "unittest/script"
if not (TEST_DIR in os.listdir("")):
raise Exception('Unittest dir not found!')
print("")
test_failed = False
def print_result(test, passed):
s = ... | <commit_before># OpenMV Unit Tests.
#
import os, sensor, gc
TEST_DIR = "unittest"
TEMP_DIR = "unittest/temp"
DATA_DIR = "unittest/data"
SCRIPT_DIR = "unittest/script"
if not (TEST_DIR in os.listdir("")):
raise Exception('Unittest dir not found!')
print("")
test_failed = False
def print_result(test, pa... |
2522f5e1a132597e56d1e8e8559b3e16c15be47f | app/twitter/views.py | app/twitter/views.py | from flask import Blueprint, request, render_template
from ..load import processing_results, api
import string
import tweepy
twitter_mod = Blueprint('twitter', __name__, template_folder='templates', static_folder='static')
ascii_chars = set(string.printable)
ascii_chars.remove(' ')
ascii_chars.add('...')
def takeo... | from flask import Blueprint, request, render_template
from ..load import processing_results, api
import string
import tweepy
twitter_mod = Blueprint('twitter', __name__, template_folder='templates', static_folder='static')
ascii_chars = set(string.printable)
ascii_chars.remove(' ')
ascii_chars.add('...')
def takeo... | Reduce number of tweets to reduce CPU compuation time of the unoptimised models | Reduce number of tweets to reduce CPU compuation time of the unoptimised models
| Python | mit | griimick/feature-mlsite,griimick/feature-mlsite,griimick/feature-mlsite | from flask import Blueprint, request, render_template
from ..load import processing_results, api
import string
import tweepy
twitter_mod = Blueprint('twitter', __name__, template_folder='templates', static_folder='static')
ascii_chars = set(string.printable)
ascii_chars.remove(' ')
ascii_chars.add('...')
def takeo... | from flask import Blueprint, request, render_template
from ..load import processing_results, api
import string
import tweepy
twitter_mod = Blueprint('twitter', __name__, template_folder='templates', static_folder='static')
ascii_chars = set(string.printable)
ascii_chars.remove(' ')
ascii_chars.add('...')
def takeo... | <commit_before>from flask import Blueprint, request, render_template
from ..load import processing_results, api
import string
import tweepy
twitter_mod = Blueprint('twitter', __name__, template_folder='templates', static_folder='static')
ascii_chars = set(string.printable)
ascii_chars.remove(' ')
ascii_chars.add('..... | from flask import Blueprint, request, render_template
from ..load import processing_results, api
import string
import tweepy
twitter_mod = Blueprint('twitter', __name__, template_folder='templates', static_folder='static')
ascii_chars = set(string.printable)
ascii_chars.remove(' ')
ascii_chars.add('...')
def takeo... | from flask import Blueprint, request, render_template
from ..load import processing_results, api
import string
import tweepy
twitter_mod = Blueprint('twitter', __name__, template_folder='templates', static_folder='static')
ascii_chars = set(string.printable)
ascii_chars.remove(' ')
ascii_chars.add('...')
def takeo... | <commit_before>from flask import Blueprint, request, render_template
from ..load import processing_results, api
import string
import tweepy
twitter_mod = Blueprint('twitter', __name__, template_folder='templates', static_folder='static')
ascii_chars = set(string.printable)
ascii_chars.remove(' ')
ascii_chars.add('..... |
8aff9605a91f1041a1040c2cfc000dbc588c0503 | biobox_cli/util.py | biobox_cli/util.py | import sys, yaml, os.path
def select_module(module, name):
"""
Select and return a biobox module
"""
mod_name = ".".join(["biobox_cli", module, name])
try:
__import__(mod_name)
except ImportError:
err_exit('unknown_command',
{'command_type': str.replace(module, '... | import sys, yaml, os.path
def select_module(module, name):
"""
Select and return a biobox module
"""
mod_name = ".".join(["biobox_cli", module, name])
try:
__import__(mod_name)
except ImportError:
err_exit('unknown_command',
{'command_type': str.replace(module, '... | Use resource_string for error messages | Use resource_string for error messages
Signed-off-by: Michael Barton <1d6e1cf70ec6f9ab28d3ea4b27a49a77654d370e@michaelbarton.me.uk>
| Python | mit | pbelmann/command-line-interface,pbelmann/command-line-interface,michaelbarton/command-line-interface,bioboxes/command-line-interface,fungs/bbx-cli,fungs/bbx-cli,bioboxes/command-line-interface,michaelbarton/command-line-interface | import sys, yaml, os.path
def select_module(module, name):
"""
Select and return a biobox module
"""
mod_name = ".".join(["biobox_cli", module, name])
try:
__import__(mod_name)
except ImportError:
err_exit('unknown_command',
{'command_type': str.replace(module, '... | import sys, yaml, os.path
def select_module(module, name):
"""
Select and return a biobox module
"""
mod_name = ".".join(["biobox_cli", module, name])
try:
__import__(mod_name)
except ImportError:
err_exit('unknown_command',
{'command_type': str.replace(module, '... | <commit_before>import sys, yaml, os.path
def select_module(module, name):
"""
Select and return a biobox module
"""
mod_name = ".".join(["biobox_cli", module, name])
try:
__import__(mod_name)
except ImportError:
err_exit('unknown_command',
{'command_type': str.re... | import sys, yaml, os.path
def select_module(module, name):
"""
Select and return a biobox module
"""
mod_name = ".".join(["biobox_cli", module, name])
try:
__import__(mod_name)
except ImportError:
err_exit('unknown_command',
{'command_type': str.replace(module, '... | import sys, yaml, os.path
def select_module(module, name):
"""
Select and return a biobox module
"""
mod_name = ".".join(["biobox_cli", module, name])
try:
__import__(mod_name)
except ImportError:
err_exit('unknown_command',
{'command_type': str.replace(module, '... | <commit_before>import sys, yaml, os.path
def select_module(module, name):
"""
Select and return a biobox module
"""
mod_name = ".".join(["biobox_cli", module, name])
try:
__import__(mod_name)
except ImportError:
err_exit('unknown_command',
{'command_type': str.re... |
22758183910a479f62f9fb42bb5acdc09deff448 | qual/calendars/historical.py | qual/calendars/historical.py | from datetime import date
from base import Calendar
from date import InvalidDate
from main import JulianCalendar
class JulianToGregorianCalendar(Calendar):
def date(self, year, month, day):
gregorian_date = date(year, month, day)
if gregorian_date < self.first_gregorian_day:
julian_dat... | from datetime import date
from base import Calendar
from date import InvalidDate
from main import JulianCalendar
class JulianToGregorianCalendar(Calendar):
def date(self, year, month, day):
gregorian_date = date(year, month, day)
if gregorian_date < self.first_gregorian_day:
julian_dat... | Change comparison to be non-strict. | Change comparison to be non-strict.
| Python | apache-2.0 | jwg4/calexicon,jwg4/qual | from datetime import date
from base import Calendar
from date import InvalidDate
from main import JulianCalendar
class JulianToGregorianCalendar(Calendar):
def date(self, year, month, day):
gregorian_date = date(year, month, day)
if gregorian_date < self.first_gregorian_day:
julian_dat... | from datetime import date
from base import Calendar
from date import InvalidDate
from main import JulianCalendar
class JulianToGregorianCalendar(Calendar):
def date(self, year, month, day):
gregorian_date = date(year, month, day)
if gregorian_date < self.first_gregorian_day:
julian_dat... | <commit_before>from datetime import date
from base import Calendar
from date import InvalidDate
from main import JulianCalendar
class JulianToGregorianCalendar(Calendar):
def date(self, year, month, day):
gregorian_date = date(year, month, day)
if gregorian_date < self.first_gregorian_day:
... | from datetime import date
from base import Calendar
from date import InvalidDate
from main import JulianCalendar
class JulianToGregorianCalendar(Calendar):
def date(self, year, month, day):
gregorian_date = date(year, month, day)
if gregorian_date < self.first_gregorian_day:
julian_dat... | from datetime import date
from base import Calendar
from date import InvalidDate
from main import JulianCalendar
class JulianToGregorianCalendar(Calendar):
def date(self, year, month, day):
gregorian_date = date(year, month, day)
if gregorian_date < self.first_gregorian_day:
julian_dat... | <commit_before>from datetime import date
from base import Calendar
from date import InvalidDate
from main import JulianCalendar
class JulianToGregorianCalendar(Calendar):
def date(self, year, month, day):
gregorian_date = date(year, month, day)
if gregorian_date < self.first_gregorian_day:
... |
e09414c101d49c70c6da4fcdabf3e985fb92f468 | passenger_wsgi.py | passenger_wsgi.py | import os
import subprocess
import sys
try:
from flask import Flask
import flask_login
from flask_restless import APIManager
from flask_sqlalchemy import SQLAlchemy
import requests
except ImportError:
INTERP = "venv/bin/python"
if os.path.relpath(sys.executable, os.getcwd()) != INTERP:
... | import os
import subprocess
import sys
try:
from flask import Flask
import flask_login
from flask_restless import APIManager
from flask_sqlalchemy import SQLAlchemy
import requests
except ImportError:
INTERP = "venv/bin/python"
if os.path.relpath(sys.executable, os.getcwd()) != INTERP:
... | Improve error catching logic for update | Improve error catching logic for update
| Python | mit | GregBrimble/boilerplate-web-service,GregBrimble/boilerplate-web-service | import os
import subprocess
import sys
try:
from flask import Flask
import flask_login
from flask_restless import APIManager
from flask_sqlalchemy import SQLAlchemy
import requests
except ImportError:
INTERP = "venv/bin/python"
if os.path.relpath(sys.executable, os.getcwd()) != INTERP:
... | import os
import subprocess
import sys
try:
from flask import Flask
import flask_login
from flask_restless import APIManager
from flask_sqlalchemy import SQLAlchemy
import requests
except ImportError:
INTERP = "venv/bin/python"
if os.path.relpath(sys.executable, os.getcwd()) != INTERP:
... | <commit_before>import os
import subprocess
import sys
try:
from flask import Flask
import flask_login
from flask_restless import APIManager
from flask_sqlalchemy import SQLAlchemy
import requests
except ImportError:
INTERP = "venv/bin/python"
if os.path.relpath(sys.executable, os.getcwd())... | import os
import subprocess
import sys
try:
from flask import Flask
import flask_login
from flask_restless import APIManager
from flask_sqlalchemy import SQLAlchemy
import requests
except ImportError:
INTERP = "venv/bin/python"
if os.path.relpath(sys.executable, os.getcwd()) != INTERP:
... | import os
import subprocess
import sys
try:
from flask import Flask
import flask_login
from flask_restless import APIManager
from flask_sqlalchemy import SQLAlchemy
import requests
except ImportError:
INTERP = "venv/bin/python"
if os.path.relpath(sys.executable, os.getcwd()) != INTERP:
... | <commit_before>import os
import subprocess
import sys
try:
from flask import Flask
import flask_login
from flask_restless import APIManager
from flask_sqlalchemy import SQLAlchemy
import requests
except ImportError:
INTERP = "venv/bin/python"
if os.path.relpath(sys.executable, os.getcwd())... |
12a61da411134d2fc02e91d41b6687de8763a374 | modules/pipetruncate.py | modules/pipetruncate.py | # pipetruncate.py
#
from pipe2py import util
def pipe_truncate(context, _INPUT, conf, **kwargs):
"""This operator truncates the number of items in a feed.
Keyword arguments:
context -- pipeline context
_INPUT -- source generator
kwargs -- terminal, if the truncation value is wired in
conf:
... | # pipetruncate.py
#
from pipe2py import util
def pipe_truncate(context, _INPUT, conf, **kwargs):
"""This operator truncates the number of items in a feed.
Keyword arguments:
context -- pipeline context
_INPUT -- source generator
kwargs -- terminal, if the truncation value is wired in
conf:
... | Fix for taking feed from a split output | Fix for taking feed from a split output
| Python | mit | nerevu/riko,nerevu/riko | # pipetruncate.py
#
from pipe2py import util
def pipe_truncate(context, _INPUT, conf, **kwargs):
"""This operator truncates the number of items in a feed.
Keyword arguments:
context -- pipeline context
_INPUT -- source generator
kwargs -- terminal, if the truncation value is wired in
conf:
... | # pipetruncate.py
#
from pipe2py import util
def pipe_truncate(context, _INPUT, conf, **kwargs):
"""This operator truncates the number of items in a feed.
Keyword arguments:
context -- pipeline context
_INPUT -- source generator
kwargs -- terminal, if the truncation value is wired in
conf:
... | <commit_before># pipetruncate.py
#
from pipe2py import util
def pipe_truncate(context, _INPUT, conf, **kwargs):
"""This operator truncates the number of items in a feed.
Keyword arguments:
context -- pipeline context
_INPUT -- source generator
kwargs -- terminal, if the truncation value is wired ... | # pipetruncate.py
#
from pipe2py import util
def pipe_truncate(context, _INPUT, conf, **kwargs):
"""This operator truncates the number of items in a feed.
Keyword arguments:
context -- pipeline context
_INPUT -- source generator
kwargs -- terminal, if the truncation value is wired in
conf:
... | # pipetruncate.py
#
from pipe2py import util
def pipe_truncate(context, _INPUT, conf, **kwargs):
"""This operator truncates the number of items in a feed.
Keyword arguments:
context -- pipeline context
_INPUT -- source generator
kwargs -- terminal, if the truncation value is wired in
conf:
... | <commit_before># pipetruncate.py
#
from pipe2py import util
def pipe_truncate(context, _INPUT, conf, **kwargs):
"""This operator truncates the number of items in a feed.
Keyword arguments:
context -- pipeline context
_INPUT -- source generator
kwargs -- terminal, if the truncation value is wired ... |
cad0f1ebeeaac1af296930bc98cf892395293112 | grako/rendering.py | grako/rendering.py | # -*- coding: utf-8 -*-
"""
The Renderer class provides the infrastructure for generating template-based
code. It's used by the .grammars module for parser generation.
"""
from __future__ import print_function, division, absolute_import, unicode_literals
import itertools
from .util import trim
def render(item, **field... | # -*- coding: utf-8 -*-
"""
The Renderer class provides the infrastructure for generating template-based
code. It's used by the .grammars module for parser generation.
"""
from __future__ import print_function, division, absolute_import, unicode_literals
import itertools
from .util import trim
def render(item, **field... | Use 'fields' instead of 'kwargs' to document intent. | Use 'fields' instead of 'kwargs' to document intent.
| Python | bsd-2-clause | vmuriart/grako,frnknglrt/grako | # -*- coding: utf-8 -*-
"""
The Renderer class provides the infrastructure for generating template-based
code. It's used by the .grammars module for parser generation.
"""
from __future__ import print_function, division, absolute_import, unicode_literals
import itertools
from .util import trim
def render(item, **field... | # -*- coding: utf-8 -*-
"""
The Renderer class provides the infrastructure for generating template-based
code. It's used by the .grammars module for parser generation.
"""
from __future__ import print_function, division, absolute_import, unicode_literals
import itertools
from .util import trim
def render(item, **field... | <commit_before># -*- coding: utf-8 -*-
"""
The Renderer class provides the infrastructure for generating template-based
code. It's used by the .grammars module for parser generation.
"""
from __future__ import print_function, division, absolute_import, unicode_literals
import itertools
from .util import trim
def rende... | # -*- coding: utf-8 -*-
"""
The Renderer class provides the infrastructure for generating template-based
code. It's used by the .grammars module for parser generation.
"""
from __future__ import print_function, division, absolute_import, unicode_literals
import itertools
from .util import trim
def render(item, **field... | # -*- coding: utf-8 -*-
"""
The Renderer class provides the infrastructure for generating template-based
code. It's used by the .grammars module for parser generation.
"""
from __future__ import print_function, division, absolute_import, unicode_literals
import itertools
from .util import trim
def render(item, **field... | <commit_before># -*- coding: utf-8 -*-
"""
The Renderer class provides the infrastructure for generating template-based
code. It's used by the .grammars module for parser generation.
"""
from __future__ import print_function, division, absolute_import, unicode_literals
import itertools
from .util import trim
def rende... |
c617083fa413a0d45ff26c96751210901dfad7cf | cab/urls/search.py | cab/urls/search.py | from django.conf.urls import url
from haystack.views import SearchView, search_view_factory
from ..forms import AdvancedSearchForm
search_view = search_view_factory(view_class=SearchView,
template='search/advanced_search.html',
form_class=AdvancedSea... | from django.conf.urls import url
from haystack.views import SearchView, basic_search, search_view_factory
from ..forms import AdvancedSearchForm
from ..views.snippets import autocomplete
search_view = search_view_factory(view_class=SearchView,
template='search/advanced_search.html',
... | Remove string views in urlpatterns | Remove string views in urlpatterns
| Python | bsd-3-clause | django/djangosnippets.org,django/djangosnippets.org,django/djangosnippets.org,django-de/djangosnippets.org,django-de/djangosnippets.org,django/djangosnippets.org,django-de/djangosnippets.org,django-de/djangosnippets.org,django/djangosnippets.org | from django.conf.urls import url
from haystack.views import SearchView, search_view_factory
from ..forms import AdvancedSearchForm
search_view = search_view_factory(view_class=SearchView,
template='search/advanced_search.html',
form_class=AdvancedSea... | from django.conf.urls import url
from haystack.views import SearchView, basic_search, search_view_factory
from ..forms import AdvancedSearchForm
from ..views.snippets import autocomplete
search_view = search_view_factory(view_class=SearchView,
template='search/advanced_search.html',
... | <commit_before>from django.conf.urls import url
from haystack.views import SearchView, search_view_factory
from ..forms import AdvancedSearchForm
search_view = search_view_factory(view_class=SearchView,
template='search/advanced_search.html',
form_cl... | from django.conf.urls import url
from haystack.views import SearchView, basic_search, search_view_factory
from ..forms import AdvancedSearchForm
from ..views.snippets import autocomplete
search_view = search_view_factory(view_class=SearchView,
template='search/advanced_search.html',
... | from django.conf.urls import url
from haystack.views import SearchView, search_view_factory
from ..forms import AdvancedSearchForm
search_view = search_view_factory(view_class=SearchView,
template='search/advanced_search.html',
form_class=AdvancedSea... | <commit_before>from django.conf.urls import url
from haystack.views import SearchView, search_view_factory
from ..forms import AdvancedSearchForm
search_view = search_view_factory(view_class=SearchView,
template='search/advanced_search.html',
form_cl... |
ce939b6f03260a57268a8371a2e05e531b36bce2 | hoomd/typeparam.py | hoomd/typeparam.py | from hoomd.parameterdicts import AttachedTypeParameterDict
class TypeParameter:
def __init__(self, name, type_kind, param_dict):
self.name = name
self.type_kind = type_kind
self.param_dict = param_dict
def __getitem__(self, key):
return self.param_dict[key]
def __setitem_... | from hoomd.parameterdicts import AttachedTypeParameterDict
class TypeParameter:
def __init__(self, name, type_kind, param_dict):
self.name = name
self.type_kind = type_kind
self.param_dict = param_dict
def __getattr__(self, attr):
try:
return getattr(self.param_dic... | Allow TypeParameters to 'grap' attr from param_dict | Allow TypeParameters to 'grap' attr from param_dict
| Python | bsd-3-clause | joaander/hoomd-blue,joaander/hoomd-blue,joaander/hoomd-blue,joaander/hoomd-blue,joaander/hoomd-blue,joaander/hoomd-blue | from hoomd.parameterdicts import AttachedTypeParameterDict
class TypeParameter:
def __init__(self, name, type_kind, param_dict):
self.name = name
self.type_kind = type_kind
self.param_dict = param_dict
def __getitem__(self, key):
return self.param_dict[key]
def __setitem_... | from hoomd.parameterdicts import AttachedTypeParameterDict
class TypeParameter:
def __init__(self, name, type_kind, param_dict):
self.name = name
self.type_kind = type_kind
self.param_dict = param_dict
def __getattr__(self, attr):
try:
return getattr(self.param_dic... | <commit_before>from hoomd.parameterdicts import AttachedTypeParameterDict
class TypeParameter:
def __init__(self, name, type_kind, param_dict):
self.name = name
self.type_kind = type_kind
self.param_dict = param_dict
def __getitem__(self, key):
return self.param_dict[key]
... | from hoomd.parameterdicts import AttachedTypeParameterDict
class TypeParameter:
def __init__(self, name, type_kind, param_dict):
self.name = name
self.type_kind = type_kind
self.param_dict = param_dict
def __getattr__(self, attr):
try:
return getattr(self.param_dic... | from hoomd.parameterdicts import AttachedTypeParameterDict
class TypeParameter:
def __init__(self, name, type_kind, param_dict):
self.name = name
self.type_kind = type_kind
self.param_dict = param_dict
def __getitem__(self, key):
return self.param_dict[key]
def __setitem_... | <commit_before>from hoomd.parameterdicts import AttachedTypeParameterDict
class TypeParameter:
def __init__(self, name, type_kind, param_dict):
self.name = name
self.type_kind = type_kind
self.param_dict = param_dict
def __getitem__(self, key):
return self.param_dict[key]
... |
6d848c4b86913d71b986ef032348a8fa8720cfc7 | src/idea/utility/state_helper.py | src/idea/utility/state_helper.py | from idea.models import State
def get_first_state():
""" Get the first state for an idea. """
return State.objects.get(previous__isnull=True)
| from idea.models import State
def get_first_state():
""" Get the first state for an idea. """
#return State.objects.get(previous__isnull=True)
# previous__isnull breaks functionality if someone creates a new state
# without a previous state set. since we know the initial state
# is id=1 per fixtur... | Fix add_idea when multiple States have no previous | Fix add_idea when multiple States have no previous
| Python | cc0-1.0 | CapeSepias/idea-box,m3brown/idea-box,geomapdev/idea-box,cmc333333/idea-box,18F/idea-box,CapeSepias/idea-box,18F/idea-box,geomapdev/idea-box,18F/idea-box,cmc333333/idea-box,CapeSepias/idea-box,m3brown/idea-box,cmc333333/idea-box,geomapdev/idea-box | from idea.models import State
def get_first_state():
""" Get the first state for an idea. """
return State.objects.get(previous__isnull=True)
Fix add_idea when multiple States have no previous | from idea.models import State
def get_first_state():
""" Get the first state for an idea. """
#return State.objects.get(previous__isnull=True)
# previous__isnull breaks functionality if someone creates a new state
# without a previous state set. since we know the initial state
# is id=1 per fixtur... | <commit_before>from idea.models import State
def get_first_state():
""" Get the first state for an idea. """
return State.objects.get(previous__isnull=True)
<commit_msg>Fix add_idea when multiple States have no previous<commit_after> | from idea.models import State
def get_first_state():
""" Get the first state for an idea. """
#return State.objects.get(previous__isnull=True)
# previous__isnull breaks functionality if someone creates a new state
# without a previous state set. since we know the initial state
# is id=1 per fixtur... | from idea.models import State
def get_first_state():
""" Get the first state for an idea. """
return State.objects.get(previous__isnull=True)
Fix add_idea when multiple States have no previousfrom idea.models import State
def get_first_state():
""" Get the first state for an idea. """
#return State.ob... | <commit_before>from idea.models import State
def get_first_state():
""" Get the first state for an idea. """
return State.objects.get(previous__isnull=True)
<commit_msg>Fix add_idea when multiple States have no previous<commit_after>from idea.models import State
def get_first_state():
""" Get the first st... |
a8d46d56890948b36726432fbcaa3bc038a0095f | txircd/modules/extra/stripcolors.py | txircd/modules/extra/stripcolors.py | from twisted.plugin import IPlugin
from txircd.module_interface import IMode, IModuleData, Mode, ModuleData
from txircd.utils import ModeType, stripFormatting
from zope.interface import implements
class StripColors(ModuleData, Mode):
implements(IPlugin, IModuleData, IMode)
name = "StripColors"
affectedActions = {
... | from twisted.plugin import IPlugin
from txircd.module_interface import IMode, IModuleData, Mode, ModuleData
from txircd.utils import ModeType, stripFormatting
from zope.interface import implements
class StripColors(ModuleData, Mode):
implements(IPlugin, IModuleData, IMode)
name = "StripColors"
affectedActions = {
... | Fix missing comparison operator in StripColors | Fix missing comparison operator in StripColors
| Python | bsd-3-clause | ElementalAlchemist/txircd,Heufneutje/txircd | from twisted.plugin import IPlugin
from txircd.module_interface import IMode, IModuleData, Mode, ModuleData
from txircd.utils import ModeType, stripFormatting
from zope.interface import implements
class StripColors(ModuleData, Mode):
implements(IPlugin, IModuleData, IMode)
name = "StripColors"
affectedActions = {
... | from twisted.plugin import IPlugin
from txircd.module_interface import IMode, IModuleData, Mode, ModuleData
from txircd.utils import ModeType, stripFormatting
from zope.interface import implements
class StripColors(ModuleData, Mode):
implements(IPlugin, IModuleData, IMode)
name = "StripColors"
affectedActions = {
... | <commit_before>from twisted.plugin import IPlugin
from txircd.module_interface import IMode, IModuleData, Mode, ModuleData
from txircd.utils import ModeType, stripFormatting
from zope.interface import implements
class StripColors(ModuleData, Mode):
implements(IPlugin, IModuleData, IMode)
name = "StripColors"
affec... | from twisted.plugin import IPlugin
from txircd.module_interface import IMode, IModuleData, Mode, ModuleData
from txircd.utils import ModeType, stripFormatting
from zope.interface import implements
class StripColors(ModuleData, Mode):
implements(IPlugin, IModuleData, IMode)
name = "StripColors"
affectedActions = {
... | from twisted.plugin import IPlugin
from txircd.module_interface import IMode, IModuleData, Mode, ModuleData
from txircd.utils import ModeType, stripFormatting
from zope.interface import implements
class StripColors(ModuleData, Mode):
implements(IPlugin, IModuleData, IMode)
name = "StripColors"
affectedActions = {
... | <commit_before>from twisted.plugin import IPlugin
from txircd.module_interface import IMode, IModuleData, Mode, ModuleData
from txircd.utils import ModeType, stripFormatting
from zope.interface import implements
class StripColors(ModuleData, Mode):
implements(IPlugin, IModuleData, IMode)
name = "StripColors"
affec... |
efc792de5225f3a21fab6d3f299fea07c63f6d0d | incident/models.py | incident/models.py | from django.db import models
from django.utils.translation import ugettext_lazy as _
class Issue(models.Model):
title = models.CharField(_('Title'), max_length=150)
description = models.TextField(_('Description'))
contract = models.ForeignKey('structure.Contract')
assigned_team = models.ForeignKey('str... | from django.db import models
from django.utils.translation import ugettext_lazy as _
class Issue(models.Model):
title = models.CharField(_('Title'), max_length=150)
description = models.TextField(_('Description'))
contract = models.ForeignKey('structure.Contract')
assigned_team = models.ForeignKey('str... | Add created_at to Issue model | Add created_at to Issue model
| Python | bsd-3-clause | RocknRoot/LIIT | from django.db import models
from django.utils.translation import ugettext_lazy as _
class Issue(models.Model):
title = models.CharField(_('Title'), max_length=150)
description = models.TextField(_('Description'))
contract = models.ForeignKey('structure.Contract')
assigned_team = models.ForeignKey('str... | from django.db import models
from django.utils.translation import ugettext_lazy as _
class Issue(models.Model):
title = models.CharField(_('Title'), max_length=150)
description = models.TextField(_('Description'))
contract = models.ForeignKey('structure.Contract')
assigned_team = models.ForeignKey('str... | <commit_before>from django.db import models
from django.utils.translation import ugettext_lazy as _
class Issue(models.Model):
title = models.CharField(_('Title'), max_length=150)
description = models.TextField(_('Description'))
contract = models.ForeignKey('structure.Contract')
assigned_team = models.... | from django.db import models
from django.utils.translation import ugettext_lazy as _
class Issue(models.Model):
title = models.CharField(_('Title'), max_length=150)
description = models.TextField(_('Description'))
contract = models.ForeignKey('structure.Contract')
assigned_team = models.ForeignKey('str... | from django.db import models
from django.utils.translation import ugettext_lazy as _
class Issue(models.Model):
title = models.CharField(_('Title'), max_length=150)
description = models.TextField(_('Description'))
contract = models.ForeignKey('structure.Contract')
assigned_team = models.ForeignKey('str... | <commit_before>from django.db import models
from django.utils.translation import ugettext_lazy as _
class Issue(models.Model):
title = models.CharField(_('Title'), max_length=150)
description = models.TextField(_('Description'))
contract = models.ForeignKey('structure.Contract')
assigned_team = models.... |
355a3a34b9a264734c1f5f2ec365a5873f000b77 | open_skin_as_project.py | open_skin_as_project.py | import os
import subprocess
import sublime
import sublime_plugin
from .path.skin_path_provider import get_cached_skin_path
class RainmeterOpenSkinAsProjectCommand(sublime_plugin.ApplicationCommand):
def run(self):
skins_path = get_cached_skin_path()
skins = os.listdir(skins_path)
subli... | import os
import subprocess
import sublime
import sublime_plugin
from .path.skin_path_provider import get_cached_skin_path
class RainmeterOpenSkinAsProjectCommand(sublime_plugin.ApplicationCommand):
def run(self):
skins_path = get_cached_skin_path()
skins = os.listdir(skins_path)
subli... | Handle in case user cancels open skin as project command | Handle in case user cancels open skin as project command
| Python | mit | thatsIch/sublime-rainmeter | import os
import subprocess
import sublime
import sublime_plugin
from .path.skin_path_provider import get_cached_skin_path
class RainmeterOpenSkinAsProjectCommand(sublime_plugin.ApplicationCommand):
def run(self):
skins_path = get_cached_skin_path()
skins = os.listdir(skins_path)
subli... | import os
import subprocess
import sublime
import sublime_plugin
from .path.skin_path_provider import get_cached_skin_path
class RainmeterOpenSkinAsProjectCommand(sublime_plugin.ApplicationCommand):
def run(self):
skins_path = get_cached_skin_path()
skins = os.listdir(skins_path)
subli... | <commit_before>import os
import subprocess
import sublime
import sublime_plugin
from .path.skin_path_provider import get_cached_skin_path
class RainmeterOpenSkinAsProjectCommand(sublime_plugin.ApplicationCommand):
def run(self):
skins_path = get_cached_skin_path()
skins = os.listdir(skins_path)... | import os
import subprocess
import sublime
import sublime_plugin
from .path.skin_path_provider import get_cached_skin_path
class RainmeterOpenSkinAsProjectCommand(sublime_plugin.ApplicationCommand):
def run(self):
skins_path = get_cached_skin_path()
skins = os.listdir(skins_path)
subli... | import os
import subprocess
import sublime
import sublime_plugin
from .path.skin_path_provider import get_cached_skin_path
class RainmeterOpenSkinAsProjectCommand(sublime_plugin.ApplicationCommand):
def run(self):
skins_path = get_cached_skin_path()
skins = os.listdir(skins_path)
subli... | <commit_before>import os
import subprocess
import sublime
import sublime_plugin
from .path.skin_path_provider import get_cached_skin_path
class RainmeterOpenSkinAsProjectCommand(sublime_plugin.ApplicationCommand):
def run(self):
skins_path = get_cached_skin_path()
skins = os.listdir(skins_path)... |
fe217ed9436754d6f9cf01a0052091d095a6e99c | web.py | web.py | from flask import Flask, jsonify, render_template
import test, stats, os
app = Flask(__name__)
cache = {}
@app.route('/')
def hello_world():
return 'Hello World!'
@app.route('/r/<string:subreddit>')
def episodes(subreddit):
seasonsAndEpisodes = _getEpisodes(subreddit)
return render_template('index.html',... | from flask import Flask, jsonify, render_template
import test, stats, os
app = Flask(__name__)
cache = {}
@app.route('/')
def hello_world():
return 'Hello World!'
@app.route('/r/<string:subreddit>')
def episodes(subreddit):
seasonsAndEpisodes = _getEpisodes(subreddit)
return render_template('index.html',... | Put seasons and subreddit into a response object for the api | Put seasons and subreddit into a response object for the api
| Python | apache-2.0 | chasedog/EpisodeDiscussions,chasedog/EpisodeDiscussions | from flask import Flask, jsonify, render_template
import test, stats, os
app = Flask(__name__)
cache = {}
@app.route('/')
def hello_world():
return 'Hello World!'
@app.route('/r/<string:subreddit>')
def episodes(subreddit):
seasonsAndEpisodes = _getEpisodes(subreddit)
return render_template('index.html',... | from flask import Flask, jsonify, render_template
import test, stats, os
app = Flask(__name__)
cache = {}
@app.route('/')
def hello_world():
return 'Hello World!'
@app.route('/r/<string:subreddit>')
def episodes(subreddit):
seasonsAndEpisodes = _getEpisodes(subreddit)
return render_template('index.html',... | <commit_before>from flask import Flask, jsonify, render_template
import test, stats, os
app = Flask(__name__)
cache = {}
@app.route('/')
def hello_world():
return 'Hello World!'
@app.route('/r/<string:subreddit>')
def episodes(subreddit):
seasonsAndEpisodes = _getEpisodes(subreddit)
return render_templat... | from flask import Flask, jsonify, render_template
import test, stats, os
app = Flask(__name__)
cache = {}
@app.route('/')
def hello_world():
return 'Hello World!'
@app.route('/r/<string:subreddit>')
def episodes(subreddit):
seasonsAndEpisodes = _getEpisodes(subreddit)
return render_template('index.html',... | from flask import Flask, jsonify, render_template
import test, stats, os
app = Flask(__name__)
cache = {}
@app.route('/')
def hello_world():
return 'Hello World!'
@app.route('/r/<string:subreddit>')
def episodes(subreddit):
seasonsAndEpisodes = _getEpisodes(subreddit)
return render_template('index.html',... | <commit_before>from flask import Flask, jsonify, render_template
import test, stats, os
app = Flask(__name__)
cache = {}
@app.route('/')
def hello_world():
return 'Hello World!'
@app.route('/r/<string:subreddit>')
def episodes(subreddit):
seasonsAndEpisodes = _getEpisodes(subreddit)
return render_templat... |
a18e6aa3647779de3963e6781afaeea3732d100e | similarities.py | similarities.py | #!/usr/bin/env python
import argparse
import sys
from gensim.models.word2vec import Word2Vec
import csv
from signal import signal, SIGINT
signal(SIGINT, lambda signum, frame: sys.exit(1))
parser = argparse.ArgumentParser()
parser.add_argument('--sim', type=float, default=.3)
parser.add_argument('w2v', type=argparse.... | #!/usr/bin/env python
import argparse
import sys
import csv
from gensim.models import KeyedVectors
from signal import signal, SIGINT
signal(SIGINT, lambda signum, frame: sys.exit(1))
parser = argparse.ArgumentParser()
parser.add_argument('--sim', type=float, default=.3)
parser.add_argument('w2v', type=argparse.FileT... | Update the Gensim API usage | Update the Gensim API usage
| Python | mit | dustalov/watset,dustalov/watset | #!/usr/bin/env python
import argparse
import sys
from gensim.models.word2vec import Word2Vec
import csv
from signal import signal, SIGINT
signal(SIGINT, lambda signum, frame: sys.exit(1))
parser = argparse.ArgumentParser()
parser.add_argument('--sim', type=float, default=.3)
parser.add_argument('w2v', type=argparse.... | #!/usr/bin/env python
import argparse
import sys
import csv
from gensim.models import KeyedVectors
from signal import signal, SIGINT
signal(SIGINT, lambda signum, frame: sys.exit(1))
parser = argparse.ArgumentParser()
parser.add_argument('--sim', type=float, default=.3)
parser.add_argument('w2v', type=argparse.FileT... | <commit_before>#!/usr/bin/env python
import argparse
import sys
from gensim.models.word2vec import Word2Vec
import csv
from signal import signal, SIGINT
signal(SIGINT, lambda signum, frame: sys.exit(1))
parser = argparse.ArgumentParser()
parser.add_argument('--sim', type=float, default=.3)
parser.add_argument('w2v',... | #!/usr/bin/env python
import argparse
import sys
import csv
from gensim.models import KeyedVectors
from signal import signal, SIGINT
signal(SIGINT, lambda signum, frame: sys.exit(1))
parser = argparse.ArgumentParser()
parser.add_argument('--sim', type=float, default=.3)
parser.add_argument('w2v', type=argparse.FileT... | #!/usr/bin/env python
import argparse
import sys
from gensim.models.word2vec import Word2Vec
import csv
from signal import signal, SIGINT
signal(SIGINT, lambda signum, frame: sys.exit(1))
parser = argparse.ArgumentParser()
parser.add_argument('--sim', type=float, default=.3)
parser.add_argument('w2v', type=argparse.... | <commit_before>#!/usr/bin/env python
import argparse
import sys
from gensim.models.word2vec import Word2Vec
import csv
from signal import signal, SIGINT
signal(SIGINT, lambda signum, frame: sys.exit(1))
parser = argparse.ArgumentParser()
parser.add_argument('--sim', type=float, default=.3)
parser.add_argument('w2v',... |
935e16c55ac9dd59b1025c5b124ca0d15eaa02f7 | run-lala.py | run-lala.py | #!/usr/bin/python2
import lala
import ConfigParser
import sys
def main():
"""Main method"""
config = ConfigParser.SafeConfigParser()
config.read("config")
lalaconfig = config._sections["lala"]
if "-d" in sys.argv:
debug = True
else:
debug = False
if "nickserv_password" in la... | #!/usr/bin/python2
import lala
import ConfigParser
import sys
def main():
"""Main method"""
config = ConfigParser.SafeConfigParser()
config.read("config")
lalaconfig = config._sections["lala"]
if "-d" in sys.argv:
debug = True
else:
debug = False
nickserv_password = lalaconf... | Remove that ... awkward... code | Remove that ... awkward... code
| Python | mit | mineo/lala,mineo/lala | #!/usr/bin/python2
import lala
import ConfigParser
import sys
def main():
"""Main method"""
config = ConfigParser.SafeConfigParser()
config.read("config")
lalaconfig = config._sections["lala"]
if "-d" in sys.argv:
debug = True
else:
debug = False
if "nickserv_password" in la... | #!/usr/bin/python2
import lala
import ConfigParser
import sys
def main():
"""Main method"""
config = ConfigParser.SafeConfigParser()
config.read("config")
lalaconfig = config._sections["lala"]
if "-d" in sys.argv:
debug = True
else:
debug = False
nickserv_password = lalaconf... | <commit_before>#!/usr/bin/python2
import lala
import ConfigParser
import sys
def main():
"""Main method"""
config = ConfigParser.SafeConfigParser()
config.read("config")
lalaconfig = config._sections["lala"]
if "-d" in sys.argv:
debug = True
else:
debug = False
if "nickserv_... | #!/usr/bin/python2
import lala
import ConfigParser
import sys
def main():
"""Main method"""
config = ConfigParser.SafeConfigParser()
config.read("config")
lalaconfig = config._sections["lala"]
if "-d" in sys.argv:
debug = True
else:
debug = False
nickserv_password = lalaconf... | #!/usr/bin/python2
import lala
import ConfigParser
import sys
def main():
"""Main method"""
config = ConfigParser.SafeConfigParser()
config.read("config")
lalaconfig = config._sections["lala"]
if "-d" in sys.argv:
debug = True
else:
debug = False
if "nickserv_password" in la... | <commit_before>#!/usr/bin/python2
import lala
import ConfigParser
import sys
def main():
"""Main method"""
config = ConfigParser.SafeConfigParser()
config.read("config")
lalaconfig = config._sections["lala"]
if "-d" in sys.argv:
debug = True
else:
debug = False
if "nickserv_... |
795b661962915221ddab186b66523896316b2a79 | jobs/jobs/items.py | jobs/jobs/items.py | # -*- coding: utf-8 -*-
# Define here the models for your scraped items
#
# See documentation in:
# http://doc.scrapy.org/en/latest/topics/items.html
import scrapy
def single_item_serializer(value):
# values are nested inside a list: (u'Viltu vaxa me\xf0 Alvogen?',)
# so need to return just the fist value w... | # -*- coding: utf-8 -*-
# Define here the models for your scraped items
#
# See documentation in:
# http://doc.scrapy.org/en/latest/topics/items.html
import scrapy
def single_item_serializer(value):
# values are sometimes nested inside a list: (u'Viltu vaxa me\xf0 Alvogen?',)
# so need to return just the fi... | Fix rendering of alfred.is data to json file | Fix rendering of alfred.is data to json file
| Python | apache-2.0 | multiplechoice/workplace | # -*- coding: utf-8 -*-
# Define here the models for your scraped items
#
# See documentation in:
# http://doc.scrapy.org/en/latest/topics/items.html
import scrapy
def single_item_serializer(value):
# values are nested inside a list: (u'Viltu vaxa me\xf0 Alvogen?',)
# so need to return just the fist value w... | # -*- coding: utf-8 -*-
# Define here the models for your scraped items
#
# See documentation in:
# http://doc.scrapy.org/en/latest/topics/items.html
import scrapy
def single_item_serializer(value):
# values are sometimes nested inside a list: (u'Viltu vaxa me\xf0 Alvogen?',)
# so need to return just the fi... | <commit_before># -*- coding: utf-8 -*-
# Define here the models for your scraped items
#
# See documentation in:
# http://doc.scrapy.org/en/latest/topics/items.html
import scrapy
def single_item_serializer(value):
# values are nested inside a list: (u'Viltu vaxa me\xf0 Alvogen?',)
# so need to return just t... | # -*- coding: utf-8 -*-
# Define here the models for your scraped items
#
# See documentation in:
# http://doc.scrapy.org/en/latest/topics/items.html
import scrapy
def single_item_serializer(value):
# values are sometimes nested inside a list: (u'Viltu vaxa me\xf0 Alvogen?',)
# so need to return just the fi... | # -*- coding: utf-8 -*-
# Define here the models for your scraped items
#
# See documentation in:
# http://doc.scrapy.org/en/latest/topics/items.html
import scrapy
def single_item_serializer(value):
# values are nested inside a list: (u'Viltu vaxa me\xf0 Alvogen?',)
# so need to return just the fist value w... | <commit_before># -*- coding: utf-8 -*-
# Define here the models for your scraped items
#
# See documentation in:
# http://doc.scrapy.org/en/latest/topics/items.html
import scrapy
def single_item_serializer(value):
# values are nested inside a list: (u'Viltu vaxa me\xf0 Alvogen?',)
# so need to return just t... |
06ee9c73fed7a9b8488d800859f65c28ad63eb57 | angr/extern_obj.py | angr/extern_obj.py | from cle.absobj import AbsObj
class AngrExternObject(AbsObj):
def __init__(self, alloc_size=0x1000):
super(AngrExternObject, self).__init__('##angr_externs##')
self._next_addr = 0
self._lookup_table = {}
self._alloc_size = alloc_size
self.memory = 'please never look at this'... | from cle.absobj import AbsObj
class AngrExternObject(AbsObj):
def __init__(self, alloc_size=0x1000):
super(AngrExternObject, self).__init__('##angr_externs##')
self._next_addr = 0
self._lookup_table = {}
self._alloc_size = alloc_size
self.memory = 'please never look at this'... | Make the extrn object use the convention for rebased addresses | Make the extrn object use the convention for rebased addresses
| Python | bsd-2-clause | angr/angr,xurantju/angr,zhuyue1314/angr,haylesr/angr,axt/angr,tyb0807/angr,terry2012/angr,avain/angr,xurantju/angr,lowks/angr,iamahuman/angr,iamahuman/angr,tyb0807/angr,iamahuman/angr,angr/angr,haylesr/angr,avain/angr,terry2012/angr,chubbymaggie/angr,cureHsu/angr,f-prettyland/angr,tyb0807/angr,schieb/angr,GuardianRG/an... | from cle.absobj import AbsObj
class AngrExternObject(AbsObj):
def __init__(self, alloc_size=0x1000):
super(AngrExternObject, self).__init__('##angr_externs##')
self._next_addr = 0
self._lookup_table = {}
self._alloc_size = alloc_size
self.memory = 'please never look at this'... | from cle.absobj import AbsObj
class AngrExternObject(AbsObj):
def __init__(self, alloc_size=0x1000):
super(AngrExternObject, self).__init__('##angr_externs##')
self._next_addr = 0
self._lookup_table = {}
self._alloc_size = alloc_size
self.memory = 'please never look at this'... | <commit_before>from cle.absobj import AbsObj
class AngrExternObject(AbsObj):
def __init__(self, alloc_size=0x1000):
super(AngrExternObject, self).__init__('##angr_externs##')
self._next_addr = 0
self._lookup_table = {}
self._alloc_size = alloc_size
self.memory = 'please neve... | from cle.absobj import AbsObj
class AngrExternObject(AbsObj):
def __init__(self, alloc_size=0x1000):
super(AngrExternObject, self).__init__('##angr_externs##')
self._next_addr = 0
self._lookup_table = {}
self._alloc_size = alloc_size
self.memory = 'please never look at this'... | from cle.absobj import AbsObj
class AngrExternObject(AbsObj):
def __init__(self, alloc_size=0x1000):
super(AngrExternObject, self).__init__('##angr_externs##')
self._next_addr = 0
self._lookup_table = {}
self._alloc_size = alloc_size
self.memory = 'please never look at this'... | <commit_before>from cle.absobj import AbsObj
class AngrExternObject(AbsObj):
def __init__(self, alloc_size=0x1000):
super(AngrExternObject, self).__init__('##angr_externs##')
self._next_addr = 0
self._lookup_table = {}
self._alloc_size = alloc_size
self.memory = 'please neve... |
20c78cc7c4e0658be01df0ba92838b605bcafdc4 | pyreststore/pyreststore/__init__.py | pyreststore/pyreststore/__init__.py | # -*- coding: utf-8; mode: Python; -*-
from __future__ import unicode_literals
__title__ = 'Python implementation of a REST based storage'
# Please use PEP 0440 version strings.
# https://www.python.org/dev/peps/pep-0440/
__version__ = '0.9.0'
__author__ = 'Peter Dahl Vestergaard'
__license__ = 'BSD 3-Clause'
__copyr... | # -*- coding: utf-8; mode: Python; -*-
from __future__ import unicode_literals
__title__ = 'Python implementation of a REST based storage'
# Please use PEP 0440 version strings.
# https://www.python.org/dev/peps/pep-0440/
__version__ = '0.9.1.dev1'
__author__ = 'Peter Dahl Vestergaard'
__license__ = 'BSD 3-Clause'
__... | Bump version to development version | Bump version to development version
| Python | bsd-3-clause | peterdv/pyreststore | # -*- coding: utf-8; mode: Python; -*-
from __future__ import unicode_literals
__title__ = 'Python implementation of a REST based storage'
# Please use PEP 0440 version strings.
# https://www.python.org/dev/peps/pep-0440/
__version__ = '0.9.0'
__author__ = 'Peter Dahl Vestergaard'
__license__ = 'BSD 3-Clause'
__copyr... | # -*- coding: utf-8; mode: Python; -*-
from __future__ import unicode_literals
__title__ = 'Python implementation of a REST based storage'
# Please use PEP 0440 version strings.
# https://www.python.org/dev/peps/pep-0440/
__version__ = '0.9.1.dev1'
__author__ = 'Peter Dahl Vestergaard'
__license__ = 'BSD 3-Clause'
__... | <commit_before># -*- coding: utf-8; mode: Python; -*-
from __future__ import unicode_literals
__title__ = 'Python implementation of a REST based storage'
# Please use PEP 0440 version strings.
# https://www.python.org/dev/peps/pep-0440/
__version__ = '0.9.0'
__author__ = 'Peter Dahl Vestergaard'
__license__ = 'BSD 3-... | # -*- coding: utf-8; mode: Python; -*-
from __future__ import unicode_literals
__title__ = 'Python implementation of a REST based storage'
# Please use PEP 0440 version strings.
# https://www.python.org/dev/peps/pep-0440/
__version__ = '0.9.1.dev1'
__author__ = 'Peter Dahl Vestergaard'
__license__ = 'BSD 3-Clause'
__... | # -*- coding: utf-8; mode: Python; -*-
from __future__ import unicode_literals
__title__ = 'Python implementation of a REST based storage'
# Please use PEP 0440 version strings.
# https://www.python.org/dev/peps/pep-0440/
__version__ = '0.9.0'
__author__ = 'Peter Dahl Vestergaard'
__license__ = 'BSD 3-Clause'
__copyr... | <commit_before># -*- coding: utf-8; mode: Python; -*-
from __future__ import unicode_literals
__title__ = 'Python implementation of a REST based storage'
# Please use PEP 0440 version strings.
# https://www.python.org/dev/peps/pep-0440/
__version__ = '0.9.0'
__author__ = 'Peter Dahl Vestergaard'
__license__ = 'BSD 3-... |
726ebd81a592361d3e2f599d009be6d1f5a81b2c | project/utils/logger.py | project/utils/logger.py | # -*- coding: utf-8 -*-
import datetime
import logging
import os
import hashlib
from utils.settings_handler import settings
def set_up_logging():
"""
Logger for tenhou communication and AI output
"""
logs_directory = os.path.join(os.path.dirname(os.path.realpath(__file__)), '..', 'logs')
if not ... | # -*- coding: utf-8 -*-
import datetime
import logging
import os
import hashlib
from utils.settings_handler import settings
def set_up_logging():
"""
Logger for tenhou communication and AI output
"""
logs_directory = os.path.join(os.path.dirname(os.path.realpath(__file__)), '..', 'logs')
if not ... | Remove " " from log name | Remove " " from log name
| Python | mit | MahjongRepository/tenhou-python-bot,MahjongRepository/tenhou-python-bot | # -*- coding: utf-8 -*-
import datetime
import logging
import os
import hashlib
from utils.settings_handler import settings
def set_up_logging():
"""
Logger for tenhou communication and AI output
"""
logs_directory = os.path.join(os.path.dirname(os.path.realpath(__file__)), '..', 'logs')
if not ... | # -*- coding: utf-8 -*-
import datetime
import logging
import os
import hashlib
from utils.settings_handler import settings
def set_up_logging():
"""
Logger for tenhou communication and AI output
"""
logs_directory = os.path.join(os.path.dirname(os.path.realpath(__file__)), '..', 'logs')
if not ... | <commit_before># -*- coding: utf-8 -*-
import datetime
import logging
import os
import hashlib
from utils.settings_handler import settings
def set_up_logging():
"""
Logger for tenhou communication and AI output
"""
logs_directory = os.path.join(os.path.dirname(os.path.realpath(__file__)), '..', 'log... | # -*- coding: utf-8 -*-
import datetime
import logging
import os
import hashlib
from utils.settings_handler import settings
def set_up_logging():
"""
Logger for tenhou communication and AI output
"""
logs_directory = os.path.join(os.path.dirname(os.path.realpath(__file__)), '..', 'logs')
if not ... | # -*- coding: utf-8 -*-
import datetime
import logging
import os
import hashlib
from utils.settings_handler import settings
def set_up_logging():
"""
Logger for tenhou communication and AI output
"""
logs_directory = os.path.join(os.path.dirname(os.path.realpath(__file__)), '..', 'logs')
if not ... | <commit_before># -*- coding: utf-8 -*-
import datetime
import logging
import os
import hashlib
from utils.settings_handler import settings
def set_up_logging():
"""
Logger for tenhou communication and AI output
"""
logs_directory = os.path.join(os.path.dirname(os.path.realpath(__file__)), '..', 'log... |
a339ee67b9a2f1effcedf836f26657f628a842ee | employees/admin.py | employees/admin.py | from django.contrib import admin
from .models import Employee, Role
class RoleAdmin(admin.ModelAdmin):
list_display = ("name",)
class EmployeeAdmin(admin.ModelAdmin):
list_display = ("username", "first_name", "last_name", "email", 'level', 'score',)
fieldsets = (
(None, {'fields': ('username', '... | from django import forms
from django.contrib import admin
from .models import Employee, Role
class UserCreationForm(forms.ModelForm):
class Meta:
model = Employee
fields = ('username', 'password',)
def save(self, commit=True):
user = super(UserCreationForm, self).save(commit=False)
... | Fix employee form error about password hashing | Fix employee form error about password hashing
| Python | apache-2.0 | belatrix/BackendAllStars | from django.contrib import admin
from .models import Employee, Role
class RoleAdmin(admin.ModelAdmin):
list_display = ("name",)
class EmployeeAdmin(admin.ModelAdmin):
list_display = ("username", "first_name", "last_name", "email", 'level', 'score',)
fieldsets = (
(None, {'fields': ('username', '... | from django import forms
from django.contrib import admin
from .models import Employee, Role
class UserCreationForm(forms.ModelForm):
class Meta:
model = Employee
fields = ('username', 'password',)
def save(self, commit=True):
user = super(UserCreationForm, self).save(commit=False)
... | <commit_before>from django.contrib import admin
from .models import Employee, Role
class RoleAdmin(admin.ModelAdmin):
list_display = ("name",)
class EmployeeAdmin(admin.ModelAdmin):
list_display = ("username", "first_name", "last_name", "email", 'level', 'score',)
fieldsets = (
(None, {'fields':... | from django import forms
from django.contrib import admin
from .models import Employee, Role
class UserCreationForm(forms.ModelForm):
class Meta:
model = Employee
fields = ('username', 'password',)
def save(self, commit=True):
user = super(UserCreationForm, self).save(commit=False)
... | from django.contrib import admin
from .models import Employee, Role
class RoleAdmin(admin.ModelAdmin):
list_display = ("name",)
class EmployeeAdmin(admin.ModelAdmin):
list_display = ("username", "first_name", "last_name", "email", 'level', 'score',)
fieldsets = (
(None, {'fields': ('username', '... | <commit_before>from django.contrib import admin
from .models import Employee, Role
class RoleAdmin(admin.ModelAdmin):
list_display = ("name",)
class EmployeeAdmin(admin.ModelAdmin):
list_display = ("username", "first_name", "last_name", "email", 'level', 'score',)
fieldsets = (
(None, {'fields':... |
ebf3f4a73aaab3aa2ea3e760bb44cfcbd7ca8d7f | src/main.py | src/main.py | #!/usr/bin/python
#coding=utf8
from Tkinter import *
import sys
from ui import Gui
if __name__ == '__main__':
Root = Tk()
App = Gui(Root)
App.pack(expand='yes',fill='both')
Root.geometry('320x240+10+10')
Root.title('Mid!Magic')
Root.mainloop() | #!/usr/bin/python
#coding=utf8
from Tkinter import *
import sys
from ui import Gui
if __name__ == '__main__':
Root = Tk()
App = Gui(Root)
App.pack(expand='yes',fill='both')
w, h = root.winfo_screenwidth(), root.winfo_screenheight()
Root.overrideredirect(1)
Root.geometry("%dx%d+0+0" % (w, h... | Add support for full screen. | Add support for full screen. | Python | apache-2.0 | doino-gretchenliev/Mid-Magic,doino-gretchenliev/Mid-Magic | #!/usr/bin/python
#coding=utf8
from Tkinter import *
import sys
from ui import Gui
if __name__ == '__main__':
Root = Tk()
App = Gui(Root)
App.pack(expand='yes',fill='both')
Root.geometry('320x240+10+10')
Root.title('Mid!Magic')
Root.mainloop()Add support for full screen. | #!/usr/bin/python
#coding=utf8
from Tkinter import *
import sys
from ui import Gui
if __name__ == '__main__':
Root = Tk()
App = Gui(Root)
App.pack(expand='yes',fill='both')
w, h = root.winfo_screenwidth(), root.winfo_screenheight()
Root.overrideredirect(1)
Root.geometry("%dx%d+0+0" % (w, h... | <commit_before>#!/usr/bin/python
#coding=utf8
from Tkinter import *
import sys
from ui import Gui
if __name__ == '__main__':
Root = Tk()
App = Gui(Root)
App.pack(expand='yes',fill='both')
Root.geometry('320x240+10+10')
Root.title('Mid!Magic')
Root.mainloop()<commit_msg>Add support for full... | #!/usr/bin/python
#coding=utf8
from Tkinter import *
import sys
from ui import Gui
if __name__ == '__main__':
Root = Tk()
App = Gui(Root)
App.pack(expand='yes',fill='both')
w, h = root.winfo_screenwidth(), root.winfo_screenheight()
Root.overrideredirect(1)
Root.geometry("%dx%d+0+0" % (w, h... | #!/usr/bin/python
#coding=utf8
from Tkinter import *
import sys
from ui import Gui
if __name__ == '__main__':
Root = Tk()
App = Gui(Root)
App.pack(expand='yes',fill='both')
Root.geometry('320x240+10+10')
Root.title('Mid!Magic')
Root.mainloop()Add support for full screen.#!/usr/bin/python
#... | <commit_before>#!/usr/bin/python
#coding=utf8
from Tkinter import *
import sys
from ui import Gui
if __name__ == '__main__':
Root = Tk()
App = Gui(Root)
App.pack(expand='yes',fill='both')
Root.geometry('320x240+10+10')
Root.title('Mid!Magic')
Root.mainloop()<commit_msg>Add support for full... |
d1d53bf2c2e719f2ff90d4260bb2521d0ee4af01 | main.py | main.py | import argparse
from config import app_config as cfg
from libraries.database_init import DataBase
from libraries.tweetimporter import TweetImporter
from libraries.twitterclient import TwitterClient
# Twitter API configuration
consumer_key = cfg.twitter["consumer_key"]
consumer_secret = cfg.twitter["consumer_secret"]... | import argparse
from config import app_config as cfg
from libraries.database_init import DataBase
from libraries.tweetimporter import TweetImporter
from libraries.twitterclient import TwitterClient
# Twitter API configuration
consumer_key = cfg.twitter["consumer_key"]
consumer_secret = cfg.twitter["consumer_secret"]... | Add option to create/drop the database | Add option to create/drop the database
| Python | mit | franckbrignoli/twitter-bot-detection | import argparse
from config import app_config as cfg
from libraries.database_init import DataBase
from libraries.tweetimporter import TweetImporter
from libraries.twitterclient import TwitterClient
# Twitter API configuration
consumer_key = cfg.twitter["consumer_key"]
consumer_secret = cfg.twitter["consumer_secret"]... | import argparse
from config import app_config as cfg
from libraries.database_init import DataBase
from libraries.tweetimporter import TweetImporter
from libraries.twitterclient import TwitterClient
# Twitter API configuration
consumer_key = cfg.twitter["consumer_key"]
consumer_secret = cfg.twitter["consumer_secret"]... | <commit_before>import argparse
from config import app_config as cfg
from libraries.database_init import DataBase
from libraries.tweetimporter import TweetImporter
from libraries.twitterclient import TwitterClient
# Twitter API configuration
consumer_key = cfg.twitter["consumer_key"]
consumer_secret = cfg.twitter["co... | import argparse
from config import app_config as cfg
from libraries.database_init import DataBase
from libraries.tweetimporter import TweetImporter
from libraries.twitterclient import TwitterClient
# Twitter API configuration
consumer_key = cfg.twitter["consumer_key"]
consumer_secret = cfg.twitter["consumer_secret"]... | import argparse
from config import app_config as cfg
from libraries.database_init import DataBase
from libraries.tweetimporter import TweetImporter
from libraries.twitterclient import TwitterClient
# Twitter API configuration
consumer_key = cfg.twitter["consumer_key"]
consumer_secret = cfg.twitter["consumer_secret"]... | <commit_before>import argparse
from config import app_config as cfg
from libraries.database_init import DataBase
from libraries.tweetimporter import TweetImporter
from libraries.twitterclient import TwitterClient
# Twitter API configuration
consumer_key = cfg.twitter["consumer_key"]
consumer_secret = cfg.twitter["co... |
2b0bcbb7ce82171965b22cf657439d6263fa9d91 | geojson_scraper.py | geojson_scraper.py | import json
import os
import urllib.request
from retry import retry
from urllib.error import HTTPError
from common import store_history, truncate, summarise
# hack to override sqlite database filename
# see: https://help.morph.io/t/using-python-3-with-morph-scraperwiki-fork/148
os.environ['SCRAPERWIKI_DATABASE_NAME'] ... | import json
import os
import urllib.request
from retry import retry
from urllib.error import HTTPError
from common import store_history, truncate, summarise
# hack to override sqlite database filename
# see: https://help.morph.io/t/using-python-3-with-morph-scraperwiki-fork/148
os.environ['SCRAPERWIKI_DATABASE_NAME'] ... | Add key param to geojson scraper | Add key param to geojson scraper
Sometimes we encounter a geojson file with no 'id' attribute
This allows us to specify a property to use as a key instead
| Python | mit | wdiv-scrapers/dc-base-scrapers | import json
import os
import urllib.request
from retry import retry
from urllib.error import HTTPError
from common import store_history, truncate, summarise
# hack to override sqlite database filename
# see: https://help.morph.io/t/using-python-3-with-morph-scraperwiki-fork/148
os.environ['SCRAPERWIKI_DATABASE_NAME'] ... | import json
import os
import urllib.request
from retry import retry
from urllib.error import HTTPError
from common import store_history, truncate, summarise
# hack to override sqlite database filename
# see: https://help.morph.io/t/using-python-3-with-morph-scraperwiki-fork/148
os.environ['SCRAPERWIKI_DATABASE_NAME'] ... | <commit_before>import json
import os
import urllib.request
from retry import retry
from urllib.error import HTTPError
from common import store_history, truncate, summarise
# hack to override sqlite database filename
# see: https://help.morph.io/t/using-python-3-with-morph-scraperwiki-fork/148
os.environ['SCRAPERWIKI_D... | import json
import os
import urllib.request
from retry import retry
from urllib.error import HTTPError
from common import store_history, truncate, summarise
# hack to override sqlite database filename
# see: https://help.morph.io/t/using-python-3-with-morph-scraperwiki-fork/148
os.environ['SCRAPERWIKI_DATABASE_NAME'] ... | import json
import os
import urllib.request
from retry import retry
from urllib.error import HTTPError
from common import store_history, truncate, summarise
# hack to override sqlite database filename
# see: https://help.morph.io/t/using-python-3-with-morph-scraperwiki-fork/148
os.environ['SCRAPERWIKI_DATABASE_NAME'] ... | <commit_before>import json
import os
import urllib.request
from retry import retry
from urllib.error import HTTPError
from common import store_history, truncate, summarise
# hack to override sqlite database filename
# see: https://help.morph.io/t/using-python-3-with-morph-scraperwiki-fork/148
os.environ['SCRAPERWIKI_D... |
78807533031cf46acb5e73b695c0e492cf2c3e20 | gnsq/httpclient.py | gnsq/httpclient.py | # -*- coding: utf-8 -*-
from __future__ import absolute_import
import urllib3
try:
import simplejson as json
except ImportError:
import json # pyflakes.ignore
from .errors import NSQHttpError
class HTTPClient(object):
base_url = None
__http = None
@property
def http(self):
if self... | # -*- coding: utf-8 -*-
from __future__ import absolute_import
import urllib3
try:
import simplejson as json
except ImportError:
import json # pyflakes.ignore
from .decorators import cached_property
from .errors import NSQHttpError
class HTTPClient(object):
@cached_property
def http(self):
... | Use cached property decorator connection pool. | Use cached property decorator connection pool.
| Python | bsd-3-clause | hiringsolved/gnsq,wtolson/gnsq,wtolson/gnsq | # -*- coding: utf-8 -*-
from __future__ import absolute_import
import urllib3
try:
import simplejson as json
except ImportError:
import json # pyflakes.ignore
from .errors import NSQHttpError
class HTTPClient(object):
base_url = None
__http = None
@property
def http(self):
if self... | # -*- coding: utf-8 -*-
from __future__ import absolute_import
import urllib3
try:
import simplejson as json
except ImportError:
import json # pyflakes.ignore
from .decorators import cached_property
from .errors import NSQHttpError
class HTTPClient(object):
@cached_property
def http(self):
... | <commit_before># -*- coding: utf-8 -*-
from __future__ import absolute_import
import urllib3
try:
import simplejson as json
except ImportError:
import json # pyflakes.ignore
from .errors import NSQHttpError
class HTTPClient(object):
base_url = None
__http = None
@property
def http(self):
... | # -*- coding: utf-8 -*-
from __future__ import absolute_import
import urllib3
try:
import simplejson as json
except ImportError:
import json # pyflakes.ignore
from .decorators import cached_property
from .errors import NSQHttpError
class HTTPClient(object):
@cached_property
def http(self):
... | # -*- coding: utf-8 -*-
from __future__ import absolute_import
import urllib3
try:
import simplejson as json
except ImportError:
import json # pyflakes.ignore
from .errors import NSQHttpError
class HTTPClient(object):
base_url = None
__http = None
@property
def http(self):
if self... | <commit_before># -*- coding: utf-8 -*-
from __future__ import absolute_import
import urllib3
try:
import simplejson as json
except ImportError:
import json # pyflakes.ignore
from .errors import NSQHttpError
class HTTPClient(object):
base_url = None
__http = None
@property
def http(self):
... |
f8f1dc94bc7d48bbe9a36c7b1ffa8117ba458cba | lobster/sandbox.py | lobster/sandbox.py | from itertools import imap
import os
import re
import sys
import tarfile
def dontpack(fn):
return '/.' in fn or '/CVS/' in fn
def package(indir, outfile):
try:
tarball = tarfile.open(outfile, 'w:bz2')
tarball.dereference = True
rtname = os.path.split(os.path.normpath(indir))[1]
... | from itertools import imap
import os
import re
import sys
import tarfile
def dontpack(fn):
res = ('/.' in fn and not '/.SCRAM' in fn) or '/CVS/' in fn
if res:
return True
print fn
return False
def package(indir, outfile):
try:
tarball = tarfile.open(outfile, 'w:bz2')
tarbal... | Add the bits that cmsenv/cmsRun actually need. | Add the bits that cmsenv/cmsRun actually need.
| Python | mit | matz-e/lobster,matz-e/lobster,matz-e/lobster | from itertools import imap
import os
import re
import sys
import tarfile
def dontpack(fn):
return '/.' in fn or '/CVS/' in fn
def package(indir, outfile):
try:
tarball = tarfile.open(outfile, 'w:bz2')
tarball.dereference = True
rtname = os.path.split(os.path.normpath(indir))[1]
... | from itertools import imap
import os
import re
import sys
import tarfile
def dontpack(fn):
res = ('/.' in fn and not '/.SCRAM' in fn) or '/CVS/' in fn
if res:
return True
print fn
return False
def package(indir, outfile):
try:
tarball = tarfile.open(outfile, 'w:bz2')
tarbal... | <commit_before>from itertools import imap
import os
import re
import sys
import tarfile
def dontpack(fn):
return '/.' in fn or '/CVS/' in fn
def package(indir, outfile):
try:
tarball = tarfile.open(outfile, 'w:bz2')
tarball.dereference = True
rtname = os.path.split(os.path.normpath(in... | from itertools import imap
import os
import re
import sys
import tarfile
def dontpack(fn):
res = ('/.' in fn and not '/.SCRAM' in fn) or '/CVS/' in fn
if res:
return True
print fn
return False
def package(indir, outfile):
try:
tarball = tarfile.open(outfile, 'w:bz2')
tarbal... | from itertools import imap
import os
import re
import sys
import tarfile
def dontpack(fn):
return '/.' in fn or '/CVS/' in fn
def package(indir, outfile):
try:
tarball = tarfile.open(outfile, 'w:bz2')
tarball.dereference = True
rtname = os.path.split(os.path.normpath(indir))[1]
... | <commit_before>from itertools import imap
import os
import re
import sys
import tarfile
def dontpack(fn):
return '/.' in fn or '/CVS/' in fn
def package(indir, outfile):
try:
tarball = tarfile.open(outfile, 'w:bz2')
tarball.dereference = True
rtname = os.path.split(os.path.normpath(in... |
b5d3b84d4d2554882632fa9b10f44bd6ffb94b40 | recipyCommon/libraryversions.py | recipyCommon/libraryversions.py | import sys
import pkg_resources
import warnings
import numbers
import six
def get_version(modulename):
"Return a string containing the module name and the library version."
version = '?'
# Get the root module name (in case we have something like `recipy.open`
# or `matplotlib.pyplot`)
modulename... | import sys
import pkg_resources
import warnings
import numbers
import six
def get_version(modulename):
"Return a string containing the module name and the library version."
version = '?'
# Get the root module name (in case we have something like `recipy.open`
# or `matplotlib.pyplot`)
modulename... | Add fallback method for finding library versions | Add fallback method for finding library versions
For library 'iris' the version number cannot be found in the pkg_resources
working set. It is unclear why.
The version number can be found using iris.__version__, so re-added the old
version finding code as a fallback.
| Python | apache-2.0 | recipy/recipy,recipy/recipy | import sys
import pkg_resources
import warnings
import numbers
import six
def get_version(modulename):
"Return a string containing the module name and the library version."
version = '?'
# Get the root module name (in case we have something like `recipy.open`
# or `matplotlib.pyplot`)
modulename... | import sys
import pkg_resources
import warnings
import numbers
import six
def get_version(modulename):
"Return a string containing the module name and the library version."
version = '?'
# Get the root module name (in case we have something like `recipy.open`
# or `matplotlib.pyplot`)
modulename... | <commit_before>import sys
import pkg_resources
import warnings
import numbers
import six
def get_version(modulename):
"Return a string containing the module name and the library version."
version = '?'
# Get the root module name (in case we have something like `recipy.open`
# or `matplotlib.pyplot`)... | import sys
import pkg_resources
import warnings
import numbers
import six
def get_version(modulename):
"Return a string containing the module name and the library version."
version = '?'
# Get the root module name (in case we have something like `recipy.open`
# or `matplotlib.pyplot`)
modulename... | import sys
import pkg_resources
import warnings
import numbers
import six
def get_version(modulename):
"Return a string containing the module name and the library version."
version = '?'
# Get the root module name (in case we have something like `recipy.open`
# or `matplotlib.pyplot`)
modulename... | <commit_before>import sys
import pkg_resources
import warnings
import numbers
import six
def get_version(modulename):
"Return a string containing the module name and the library version."
version = '?'
# Get the root module name (in case we have something like `recipy.open`
# or `matplotlib.pyplot`)... |
85d12c7ce38c4349a98ccd09266bc3f08f511daa | tests/test_message_body.py | tests/test_message_body.py | from tddcommitmessage.messagebody import MessageBody
def test_message_wrapped_in_quotes():
msg = MessageBody('forty-two')
assert str(msg) == '"forty-two"'
def test_message_with_double_quotes_is_wrapped_with_single():
msg = MessageBody('But what are "Birds"?')
assert str(msg) == r"""'But what are "Bird... | from tddcommitmessage.messagebody import MessageBody
def test_message_is_wrapped_in_quotes():
msg = MessageBody('forty-two')
assert str(msg) == '"forty-two"'
def test_message_with_double_quote_is_wrapped_with_single():
msg = MessageBody('But what are "Birds"?')
assert str(msg) == r"""'But what are "Bi... | REFACTOR Improve test name's grammar and accuracy. | REFACTOR Improve test name's grammar and accuracy.
| Python | mit | matatk/tdd-bdd-commit,matatk/tdd-bdd-commit | from tddcommitmessage.messagebody import MessageBody
def test_message_wrapped_in_quotes():
msg = MessageBody('forty-two')
assert str(msg) == '"forty-two"'
def test_message_with_double_quotes_is_wrapped_with_single():
msg = MessageBody('But what are "Birds"?')
assert str(msg) == r"""'But what are "Bird... | from tddcommitmessage.messagebody import MessageBody
def test_message_is_wrapped_in_quotes():
msg = MessageBody('forty-two')
assert str(msg) == '"forty-two"'
def test_message_with_double_quote_is_wrapped_with_single():
msg = MessageBody('But what are "Birds"?')
assert str(msg) == r"""'But what are "Bi... | <commit_before>from tddcommitmessage.messagebody import MessageBody
def test_message_wrapped_in_quotes():
msg = MessageBody('forty-two')
assert str(msg) == '"forty-two"'
def test_message_with_double_quotes_is_wrapped_with_single():
msg = MessageBody('But what are "Birds"?')
assert str(msg) == r"""'But... | from tddcommitmessage.messagebody import MessageBody
def test_message_is_wrapped_in_quotes():
msg = MessageBody('forty-two')
assert str(msg) == '"forty-two"'
def test_message_with_double_quote_is_wrapped_with_single():
msg = MessageBody('But what are "Birds"?')
assert str(msg) == r"""'But what are "Bi... | from tddcommitmessage.messagebody import MessageBody
def test_message_wrapped_in_quotes():
msg = MessageBody('forty-two')
assert str(msg) == '"forty-two"'
def test_message_with_double_quotes_is_wrapped_with_single():
msg = MessageBody('But what are "Birds"?')
assert str(msg) == r"""'But what are "Bird... | <commit_before>from tddcommitmessage.messagebody import MessageBody
def test_message_wrapped_in_quotes():
msg = MessageBody('forty-two')
assert str(msg) == '"forty-two"'
def test_message_with_double_quotes_is_wrapped_with_single():
msg = MessageBody('But what are "Birds"?')
assert str(msg) == r"""'But... |
7c0c349656e6f02be0f3f0044f5d225f3688be08 | bong/parse_args.py | bong/parse_args.py | from .settings import BongSettings, DEFAULT_MESSAGE
from .metadata import VERSION, SUMMARY
import argparse
PARSER = argparse.ArgumentParser(description=SUMMARY)
PARSER.add_argument('-V', '--version', action='version', version=VERSION,
help='Show version')
PARSER.add_argument('-s', '--short-break', ... | from .settings import BongSettings, DEFAULT_MESSAGE
from .metadata import VERSION, SUMMARY
import argparse
PARSER = argparse.ArgumentParser(description=SUMMARY)
PARSER.add_argument('-V', '--version', action='version',
version='%(prog)s {}'.format(VERSION),
help='show version')
P... | Clean up the argument parsing | Clean up the argument parsing
| Python | mit | prophile/bong | from .settings import BongSettings, DEFAULT_MESSAGE
from .metadata import VERSION, SUMMARY
import argparse
PARSER = argparse.ArgumentParser(description=SUMMARY)
PARSER.add_argument('-V', '--version', action='version', version=VERSION,
help='Show version')
PARSER.add_argument('-s', '--short-break', ... | from .settings import BongSettings, DEFAULT_MESSAGE
from .metadata import VERSION, SUMMARY
import argparse
PARSER = argparse.ArgumentParser(description=SUMMARY)
PARSER.add_argument('-V', '--version', action='version',
version='%(prog)s {}'.format(VERSION),
help='show version')
P... | <commit_before>from .settings import BongSettings, DEFAULT_MESSAGE
from .metadata import VERSION, SUMMARY
import argparse
PARSER = argparse.ArgumentParser(description=SUMMARY)
PARSER.add_argument('-V', '--version', action='version', version=VERSION,
help='Show version')
PARSER.add_argument('-s', '-... | from .settings import BongSettings, DEFAULT_MESSAGE
from .metadata import VERSION, SUMMARY
import argparse
PARSER = argparse.ArgumentParser(description=SUMMARY)
PARSER.add_argument('-V', '--version', action='version',
version='%(prog)s {}'.format(VERSION),
help='show version')
P... | from .settings import BongSettings, DEFAULT_MESSAGE
from .metadata import VERSION, SUMMARY
import argparse
PARSER = argparse.ArgumentParser(description=SUMMARY)
PARSER.add_argument('-V', '--version', action='version', version=VERSION,
help='Show version')
PARSER.add_argument('-s', '--short-break', ... | <commit_before>from .settings import BongSettings, DEFAULT_MESSAGE
from .metadata import VERSION, SUMMARY
import argparse
PARSER = argparse.ArgumentParser(description=SUMMARY)
PARSER.add_argument('-V', '--version', action='version', version=VERSION,
help='Show version')
PARSER.add_argument('-s', '-... |
8caef330d6e69468833aa95f218390cc1e9088a5 | scripts/gen/__init__.py | scripts/gen/__init__.py | import sys
if sys.version_info[0] != 2 or not (5 <= sys.version_info[1] <= 7):
sys.stderr.write('error: unsupported Python version (2.5-2.7 required)\n')
sys.exit(1)
| Add build script Python version check | Add build script Python version check
| Python | bsd-2-clause | depp/sglib,depp/sglib | Add build script Python version check | import sys
if sys.version_info[0] != 2 or not (5 <= sys.version_info[1] <= 7):
sys.stderr.write('error: unsupported Python version (2.5-2.7 required)\n')
sys.exit(1)
| <commit_before><commit_msg>Add build script Python version check<commit_after> | import sys
if sys.version_info[0] != 2 or not (5 <= sys.version_info[1] <= 7):
sys.stderr.write('error: unsupported Python version (2.5-2.7 required)\n')
sys.exit(1)
| Add build script Python version checkimport sys
if sys.version_info[0] != 2 or not (5 <= sys.version_info[1] <= 7):
sys.stderr.write('error: unsupported Python version (2.5-2.7 required)\n')
sys.exit(1)
| <commit_before><commit_msg>Add build script Python version check<commit_after>import sys
if sys.version_info[0] != 2 or not (5 <= sys.version_info[1] <= 7):
sys.stderr.write('error: unsupported Python version (2.5-2.7 required)\n')
sys.exit(1)
| |
31f1c65d6505bc443fdb1d6ccd4849b175788f04 | gargbot_3000/config.py | gargbot_3000/config.py | #! /usr/bin/env python3.6
# coding: utf-8
import os
import datetime as dt
from pathlib import Path
import pytz
from dotenv import load_dotenv
env_path = Path('.') / '.env'
load_dotenv(dotenv_path=env_path)
slack_verification_token = os.environ["slack_verification_token"]
slack_bot_user_token = os.environ["slack_bot... | #! /usr/bin/env python3.6
# coding: utf-8
import os
import datetime as dt
from pathlib import Path
import pytz
from dotenv import load_dotenv
load_dotenv()
slack_verification_token = os.environ["slack_verification_token"]
slack_bot_user_token = os.environ["slack_bot_user_token"]
bot_id = os.environ["bot_id"]
bot_na... | Remove explicit path from load_dotenv call | Remove explicit path from load_dotenv call
| Python | mit | eirki/gargbot_3000,eirki/gargbot_3000,eirki/gargbot_3000,eirki/gargbot_3000 | #! /usr/bin/env python3.6
# coding: utf-8
import os
import datetime as dt
from pathlib import Path
import pytz
from dotenv import load_dotenv
env_path = Path('.') / '.env'
load_dotenv(dotenv_path=env_path)
slack_verification_token = os.environ["slack_verification_token"]
slack_bot_user_token = os.environ["slack_bot... | #! /usr/bin/env python3.6
# coding: utf-8
import os
import datetime as dt
from pathlib import Path
import pytz
from dotenv import load_dotenv
load_dotenv()
slack_verification_token = os.environ["slack_verification_token"]
slack_bot_user_token = os.environ["slack_bot_user_token"]
bot_id = os.environ["bot_id"]
bot_na... | <commit_before>#! /usr/bin/env python3.6
# coding: utf-8
import os
import datetime as dt
from pathlib import Path
import pytz
from dotenv import load_dotenv
env_path = Path('.') / '.env'
load_dotenv(dotenv_path=env_path)
slack_verification_token = os.environ["slack_verification_token"]
slack_bot_user_token = os.env... | #! /usr/bin/env python3.6
# coding: utf-8
import os
import datetime as dt
from pathlib import Path
import pytz
from dotenv import load_dotenv
load_dotenv()
slack_verification_token = os.environ["slack_verification_token"]
slack_bot_user_token = os.environ["slack_bot_user_token"]
bot_id = os.environ["bot_id"]
bot_na... | #! /usr/bin/env python3.6
# coding: utf-8
import os
import datetime as dt
from pathlib import Path
import pytz
from dotenv import load_dotenv
env_path = Path('.') / '.env'
load_dotenv(dotenv_path=env_path)
slack_verification_token = os.environ["slack_verification_token"]
slack_bot_user_token = os.environ["slack_bot... | <commit_before>#! /usr/bin/env python3.6
# coding: utf-8
import os
import datetime as dt
from pathlib import Path
import pytz
from dotenv import load_dotenv
env_path = Path('.') / '.env'
load_dotenv(dotenv_path=env_path)
slack_verification_token = os.environ["slack_verification_token"]
slack_bot_user_token = os.env... |
da3b2feab201782b3468e5e39232c366e0a3ebc0 | kolibri/core/discovery/serializers.py | kolibri/core/discovery/serializers.py | from __future__ import absolute_import
from __future__ import print_function
from __future__ import unicode_literals
from rest_framework import serializers
from rest_framework.serializers import ValidationError
from .models import NetworkLocation
from .utils.network import errors
from .utils.network.client import Net... | from __future__ import absolute_import
from __future__ import print_function
from __future__ import unicode_literals
from rest_framework import serializers
from rest_framework.serializers import ValidationError
from .models import NetworkLocation
from .utils.network import errors
from .utils.network.client import Net... | Make some of the NetworkLocationSerializer fields read-only | Make some of the NetworkLocationSerializer fields read-only
| Python | mit | DXCanas/kolibri,lyw07/kolibri,DXCanas/kolibri,lyw07/kolibri,indirectlylit/kolibri,lyw07/kolibri,learningequality/kolibri,lyw07/kolibri,mrpau/kolibri,DXCanas/kolibri,mrpau/kolibri,indirectlylit/kolibri,DXCanas/kolibri,learningequality/kolibri,indirectlylit/kolibri,mrpau/kolibri,learningequality/kolibri,mrpau/kolibri,lea... | from __future__ import absolute_import
from __future__ import print_function
from __future__ import unicode_literals
from rest_framework import serializers
from rest_framework.serializers import ValidationError
from .models import NetworkLocation
from .utils.network import errors
from .utils.network.client import Net... | from __future__ import absolute_import
from __future__ import print_function
from __future__ import unicode_literals
from rest_framework import serializers
from rest_framework.serializers import ValidationError
from .models import NetworkLocation
from .utils.network import errors
from .utils.network.client import Net... | <commit_before>from __future__ import absolute_import
from __future__ import print_function
from __future__ import unicode_literals
from rest_framework import serializers
from rest_framework.serializers import ValidationError
from .models import NetworkLocation
from .utils.network import errors
from .utils.network.cl... | from __future__ import absolute_import
from __future__ import print_function
from __future__ import unicode_literals
from rest_framework import serializers
from rest_framework.serializers import ValidationError
from .models import NetworkLocation
from .utils.network import errors
from .utils.network.client import Net... | from __future__ import absolute_import
from __future__ import print_function
from __future__ import unicode_literals
from rest_framework import serializers
from rest_framework.serializers import ValidationError
from .models import NetworkLocation
from .utils.network import errors
from .utils.network.client import Net... | <commit_before>from __future__ import absolute_import
from __future__ import print_function
from __future__ import unicode_literals
from rest_framework import serializers
from rest_framework.serializers import ValidationError
from .models import NetworkLocation
from .utils.network import errors
from .utils.network.cl... |
906f35428e36f2ece2fdb1c7fb150b979cf0457b | pyxform/tests_v1/test_whitespace.py | pyxform/tests_v1/test_whitespace.py | from pyxform.tests_v1.pyxform_test_case import PyxformTestCase
class WhitespaceTest(PyxformTestCase):
def test_over_trim(self):
self.assertPyxformXform(
name='issue96',
md="""
| survey | | | |
| | type | l... | from pyxform.tests_v1.pyxform_test_case import PyxformTestCase
class WhitespaceTest(PyxformTestCase):
def test_over_trim(self):
self.assertPyxformXform(
name='issue96',
md="""
| survey | | | |
| | type | l... | Rename test so it actually runs | Rename test so it actually runs
| Python | bsd-2-clause | XLSForm/pyxform,XLSForm/pyxform | from pyxform.tests_v1.pyxform_test_case import PyxformTestCase
class WhitespaceTest(PyxformTestCase):
def test_over_trim(self):
self.assertPyxformXform(
name='issue96',
md="""
| survey | | | |
| | type | l... | from pyxform.tests_v1.pyxform_test_case import PyxformTestCase
class WhitespaceTest(PyxformTestCase):
def test_over_trim(self):
self.assertPyxformXform(
name='issue96',
md="""
| survey | | | |
| | type | l... | <commit_before>from pyxform.tests_v1.pyxform_test_case import PyxformTestCase
class WhitespaceTest(PyxformTestCase):
def test_over_trim(self):
self.assertPyxformXform(
name='issue96',
md="""
| survey | | | |
| | type... | from pyxform.tests_v1.pyxform_test_case import PyxformTestCase
class WhitespaceTest(PyxformTestCase):
def test_over_trim(self):
self.assertPyxformXform(
name='issue96',
md="""
| survey | | | |
| | type | l... | from pyxform.tests_v1.pyxform_test_case import PyxformTestCase
class WhitespaceTest(PyxformTestCase):
def test_over_trim(self):
self.assertPyxformXform(
name='issue96',
md="""
| survey | | | |
| | type | l... | <commit_before>from pyxform.tests_v1.pyxform_test_case import PyxformTestCase
class WhitespaceTest(PyxformTestCase):
def test_over_trim(self):
self.assertPyxformXform(
name='issue96',
md="""
| survey | | | |
| | type... |
9c9127446a9c362910ea093d5a317ad0fc23e3d7 | opencivicdata/admin/division.py | opencivicdata/admin/division.py | from django.contrib import admin
from opencivicdata.models import division as models
@admin.register(models.Division)
class DivisionAdmin(admin.ModelAdmin):
list_display = ('display_name', 'id')
search_fields = list_display
| from django.contrib import admin
from opencivicdata.models import division as models
@admin.register(models.Division)
class DivisionAdmin(admin.ModelAdmin):
list_display = ('name', 'id')
search_fields = list_display
| Update to reflect change of display_name --> name | Update to reflect change of display_name --> name
| Python | bsd-3-clause | opencivicdata/python-opencivicdata-django,opencivicdata/python-opencivicdata-django,rshorey/python-opencivicdata-django,opencivicdata/python-opencivicdata,influence-usa/python-opencivicdata-django,rshorey/python-opencivicdata-django,mileswwatkins/python-opencivicdata-django,mileswwatkins/python-opencivicdata-django,ope... | from django.contrib import admin
from opencivicdata.models import division as models
@admin.register(models.Division)
class DivisionAdmin(admin.ModelAdmin):
list_display = ('display_name', 'id')
search_fields = list_display
Update to reflect change of display_name --> name | from django.contrib import admin
from opencivicdata.models import division as models
@admin.register(models.Division)
class DivisionAdmin(admin.ModelAdmin):
list_display = ('name', 'id')
search_fields = list_display
| <commit_before>from django.contrib import admin
from opencivicdata.models import division as models
@admin.register(models.Division)
class DivisionAdmin(admin.ModelAdmin):
list_display = ('display_name', 'id')
search_fields = list_display
<commit_msg>Update to reflect change of display_name --> name<commit_a... | from django.contrib import admin
from opencivicdata.models import division as models
@admin.register(models.Division)
class DivisionAdmin(admin.ModelAdmin):
list_display = ('name', 'id')
search_fields = list_display
| from django.contrib import admin
from opencivicdata.models import division as models
@admin.register(models.Division)
class DivisionAdmin(admin.ModelAdmin):
list_display = ('display_name', 'id')
search_fields = list_display
Update to reflect change of display_name --> namefrom django.contrib import admin
fro... | <commit_before>from django.contrib import admin
from opencivicdata.models import division as models
@admin.register(models.Division)
class DivisionAdmin(admin.ModelAdmin):
list_display = ('display_name', 'id')
search_fields = list_display
<commit_msg>Update to reflect change of display_name --> name<commit_a... |
6891981cd32a9dbf71346f95256f8447726672df | packages/pixman.py | packages/pixman.py | CairoGraphicsPackage ('pixman', '0.30.0')
| class PixmanPackage (CairoGraphicsPackage):
def __init__ (self):
CairoGraphicsPackage.__init__ (self, 'pixman', '0.30.0')
#This package would like to be built with fat binaries
if Package.profile.m64 == True:
self.fat_build = True
def arch_build (self, arch):
if arch == 'darwin-fat': #multi-arch build... | Enable fat binaries on pitman package | Enable fat binaries on pitman package
| Python | mit | mono/bockbuild,BansheeMediaPlayer/bockbuild,BansheeMediaPlayer/bockbuild,BansheeMediaPlayer/bockbuild,mono/bockbuild | CairoGraphicsPackage ('pixman', '0.30.0')
Enable fat binaries on pitman package | class PixmanPackage (CairoGraphicsPackage):
def __init__ (self):
CairoGraphicsPackage.__init__ (self, 'pixman', '0.30.0')
#This package would like to be built with fat binaries
if Package.profile.m64 == True:
self.fat_build = True
def arch_build (self, arch):
if arch == 'darwin-fat': #multi-arch build... | <commit_before>CairoGraphicsPackage ('pixman', '0.30.0')
<commit_msg>Enable fat binaries on pitman package<commit_after> | class PixmanPackage (CairoGraphicsPackage):
def __init__ (self):
CairoGraphicsPackage.__init__ (self, 'pixman', '0.30.0')
#This package would like to be built with fat binaries
if Package.profile.m64 == True:
self.fat_build = True
def arch_build (self, arch):
if arch == 'darwin-fat': #multi-arch build... | CairoGraphicsPackage ('pixman', '0.30.0')
Enable fat binaries on pitman packageclass PixmanPackage (CairoGraphicsPackage):
def __init__ (self):
CairoGraphicsPackage.__init__ (self, 'pixman', '0.30.0')
#This package would like to be built with fat binaries
if Package.profile.m64 == True:
self.fat_build = Tr... | <commit_before>CairoGraphicsPackage ('pixman', '0.30.0')
<commit_msg>Enable fat binaries on pitman package<commit_after>class PixmanPackage (CairoGraphicsPackage):
def __init__ (self):
CairoGraphicsPackage.__init__ (self, 'pixman', '0.30.0')
#This package would like to be built with fat binaries
if Package.pr... |
e81a54a5df2aaafae230084fe3b4d59c5b4f61cc | parallel/runner.py | parallel/runner.py | import Queue
from parallel import worker
class Runner(object):
def __init__(self, num_workers=4):
self.in_queue = Queue.Queue()
self.out_queue = Queue.Queue()
self.num_workers = num_workers
self.workers = None
self._start_workers()
def _start_workers(self):
se... | import Queue
from parallel import config
from parallel import worker
class Runner(object):
def __init__(self, num_workers=config.NUM_WORKERS):
self.in_queue = Queue.Queue()
self.out_queue = Queue.Queue()
self.num_workers = num_workers
self.workers = None
self._start_worker... | Use default number of workers from config | Use default number of workers from config
config does a better job at figuring out the optimal number of workers,
so it will be used instead.
| Python | mit | andersonvom/mparallel | import Queue
from parallel import worker
class Runner(object):
def __init__(self, num_workers=4):
self.in_queue = Queue.Queue()
self.out_queue = Queue.Queue()
self.num_workers = num_workers
self.workers = None
self._start_workers()
def _start_workers(self):
se... | import Queue
from parallel import config
from parallel import worker
class Runner(object):
def __init__(self, num_workers=config.NUM_WORKERS):
self.in_queue = Queue.Queue()
self.out_queue = Queue.Queue()
self.num_workers = num_workers
self.workers = None
self._start_worker... | <commit_before>import Queue
from parallel import worker
class Runner(object):
def __init__(self, num_workers=4):
self.in_queue = Queue.Queue()
self.out_queue = Queue.Queue()
self.num_workers = num_workers
self.workers = None
self._start_workers()
def _start_workers(se... | import Queue
from parallel import config
from parallel import worker
class Runner(object):
def __init__(self, num_workers=config.NUM_WORKERS):
self.in_queue = Queue.Queue()
self.out_queue = Queue.Queue()
self.num_workers = num_workers
self.workers = None
self._start_worker... | import Queue
from parallel import worker
class Runner(object):
def __init__(self, num_workers=4):
self.in_queue = Queue.Queue()
self.out_queue = Queue.Queue()
self.num_workers = num_workers
self.workers = None
self._start_workers()
def _start_workers(self):
se... | <commit_before>import Queue
from parallel import worker
class Runner(object):
def __init__(self, num_workers=4):
self.in_queue = Queue.Queue()
self.out_queue = Queue.Queue()
self.num_workers = num_workers
self.workers = None
self._start_workers()
def _start_workers(se... |
d5cd8d679b08aae6d91cad003fdd71660a85c39b | opps/images/forms.py | opps/images/forms.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from django import forms
from .models import Image
from .widgets import MultipleUpload, CropExample
from redactor.widgets import RedactorEditor
class ImageModelForm(forms.ModelForm):
image = forms.FileField(required=True, widget=MultipleUpload())
crop_example = ... | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from django import forms
from .models import Image
from .widgets import MultipleUpload, CropExample
from redactor.widgets import RedactorEditor
class ImageModelForm(forms.ModelForm):
archive = forms.FileField(required=True, widget=MultipleUpload())
crop_example ... | Change form field image to archive | Change form field image to archive
| Python | mit | williamroot/opps,opps/opps,YACOWS/opps,YACOWS/opps,williamroot/opps,opps/opps,opps/opps,YACOWS/opps,YACOWS/opps,williamroot/opps,williamroot/opps,jeanmask/opps,jeanmask/opps,jeanmask/opps,opps/opps,jeanmask/opps | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from django import forms
from .models import Image
from .widgets import MultipleUpload, CropExample
from redactor.widgets import RedactorEditor
class ImageModelForm(forms.ModelForm):
image = forms.FileField(required=True, widget=MultipleUpload())
crop_example = ... | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from django import forms
from .models import Image
from .widgets import MultipleUpload, CropExample
from redactor.widgets import RedactorEditor
class ImageModelForm(forms.ModelForm):
archive = forms.FileField(required=True, widget=MultipleUpload())
crop_example ... | <commit_before>#!/usr/bin/env python
# -*- coding: utf-8 -*-
from django import forms
from .models import Image
from .widgets import MultipleUpload, CropExample
from redactor.widgets import RedactorEditor
class ImageModelForm(forms.ModelForm):
image = forms.FileField(required=True, widget=MultipleUpload())
... | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from django import forms
from .models import Image
from .widgets import MultipleUpload, CropExample
from redactor.widgets import RedactorEditor
class ImageModelForm(forms.ModelForm):
archive = forms.FileField(required=True, widget=MultipleUpload())
crop_example ... | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from django import forms
from .models import Image
from .widgets import MultipleUpload, CropExample
from redactor.widgets import RedactorEditor
class ImageModelForm(forms.ModelForm):
image = forms.FileField(required=True, widget=MultipleUpload())
crop_example = ... | <commit_before>#!/usr/bin/env python
# -*- coding: utf-8 -*-
from django import forms
from .models import Image
from .widgets import MultipleUpload, CropExample
from redactor.widgets import RedactorEditor
class ImageModelForm(forms.ModelForm):
image = forms.FileField(required=True, widget=MultipleUpload())
... |
ddaf1a2b6744c9012546d6258b0378ab1b96d658 | zerver/lib/i18n.py | zerver/lib/i18n.py | # -*- coding: utf-8 -*-
from django.conf import settings
from django.utils import translation
from django.utils.translation import ugettext as _
from six import text_type
from typing import Any
import os
import ujson
def with_language(string, language):
# type: (text_type, text_type) -> text_type
old_languag... | # -*- coding: utf-8 -*-
from __future__ import absolute_import
from django.conf import settings
from django.utils import translation
from django.utils.translation import ugettext as _
from six import text_type
from typing import Any
import os
import ujson
def with_language(string, language):
# type: (text_type,... | Return unformatted list from get_language_list. | Return unformatted list from get_language_list.
| Python | apache-2.0 | grave-w-grave/zulip,amanharitsh123/zulip,kou/zulip,vikas-parashar/zulip,JPJPJPOPOP/zulip,ahmadassaf/zulip,andersk/zulip,vikas-parashar/zulip,andersk/zulip,hackerkid/zulip,kou/zulip,eeshangarg/zulip,ahmadassaf/zulip,dhcrzf/zulip,showell/zulip,punchagan/zulip,vabs22/zulip,peguin40/zulip,JPJPJPOPOP/zulip,shubhamdhama/zuli... | # -*- coding: utf-8 -*-
from django.conf import settings
from django.utils import translation
from django.utils.translation import ugettext as _
from six import text_type
from typing import Any
import os
import ujson
def with_language(string, language):
# type: (text_type, text_type) -> text_type
old_languag... | # -*- coding: utf-8 -*-
from __future__ import absolute_import
from django.conf import settings
from django.utils import translation
from django.utils.translation import ugettext as _
from six import text_type
from typing import Any
import os
import ujson
def with_language(string, language):
# type: (text_type,... | <commit_before># -*- coding: utf-8 -*-
from django.conf import settings
from django.utils import translation
from django.utils.translation import ugettext as _
from six import text_type
from typing import Any
import os
import ujson
def with_language(string, language):
# type: (text_type, text_type) -> text_type
... | # -*- coding: utf-8 -*-
from __future__ import absolute_import
from django.conf import settings
from django.utils import translation
from django.utils.translation import ugettext as _
from six import text_type
from typing import Any
import os
import ujson
def with_language(string, language):
# type: (text_type,... | # -*- coding: utf-8 -*-
from django.conf import settings
from django.utils import translation
from django.utils.translation import ugettext as _
from six import text_type
from typing import Any
import os
import ujson
def with_language(string, language):
# type: (text_type, text_type) -> text_type
old_languag... | <commit_before># -*- coding: utf-8 -*-
from django.conf import settings
from django.utils import translation
from django.utils.translation import ugettext as _
from six import text_type
from typing import Any
import os
import ujson
def with_language(string, language):
# type: (text_type, text_type) -> text_type
... |
308f1cd155e2db37fe5ff03e158e3d9fc32d6885 | lehrex/__init__.py | lehrex/__init__.py | # -*- coding: utf-8 -*-
"""Python package to support the research during
the annual Lehrexkursion at Universität Hamburg.
"""
from os.path import dirname, join
from . import csv
from . import math
from . import plots
from . import utils
__version__ = open(join(dirname(__file__), 'VERSION')).read().strip()
__all__ =... | # -*- coding: utf-8 -*-
"""Python package to support the research during
the annual Lehrexkursion at Universität Hamburg.
"""
from os.path import dirname, join
from . import csv
from . import math
from . import plots
from . import utils
__version__ = open(join(dirname(__file__), 'VERSION')).read().strip()
__all__ =... | Introduce Python 3.5 syntax error. | Introduce Python 3.5 syntax error.
| Python | mit | lkluft/lehrex | # -*- coding: utf-8 -*-
"""Python package to support the research during
the annual Lehrexkursion at Universität Hamburg.
"""
from os.path import dirname, join
from . import csv
from . import math
from . import plots
from . import utils
__version__ = open(join(dirname(__file__), 'VERSION')).read().strip()
__all__ =... | # -*- coding: utf-8 -*-
"""Python package to support the research during
the annual Lehrexkursion at Universität Hamburg.
"""
from os.path import dirname, join
from . import csv
from . import math
from . import plots
from . import utils
__version__ = open(join(dirname(__file__), 'VERSION')).read().strip()
__all__ =... | <commit_before># -*- coding: utf-8 -*-
"""Python package to support the research during
the annual Lehrexkursion at Universität Hamburg.
"""
from os.path import dirname, join
from . import csv
from . import math
from . import plots
from . import utils
__version__ = open(join(dirname(__file__), 'VERSION')).read().str... | # -*- coding: utf-8 -*-
"""Python package to support the research during
the annual Lehrexkursion at Universität Hamburg.
"""
from os.path import dirname, join
from . import csv
from . import math
from . import plots
from . import utils
__version__ = open(join(dirname(__file__), 'VERSION')).read().strip()
__all__ =... | # -*- coding: utf-8 -*-
"""Python package to support the research during
the annual Lehrexkursion at Universität Hamburg.
"""
from os.path import dirname, join
from . import csv
from . import math
from . import plots
from . import utils
__version__ = open(join(dirname(__file__), 'VERSION')).read().strip()
__all__ =... | <commit_before># -*- coding: utf-8 -*-
"""Python package to support the research during
the annual Lehrexkursion at Universität Hamburg.
"""
from os.path import dirname, join
from . import csv
from . import math
from . import plots
from . import utils
__version__ = open(join(dirname(__file__), 'VERSION')).read().str... |
b2657fd84c0d8fd4e1188a649bb2595651b83adb | kazoo/handlers/util.py | kazoo/handlers/util.py | """Handler utilities for getting non-monkey patched std lib stuff
Allows one to get an unpatched thread module, with a thread
decorator that uses the unpatching OS thread.
"""
try:
from gevent import monkey
[start_new_thread] = monkey.get_original('thread', ['start_new_thread'])
except ImportError:
from t... | """Handler utilities for getting non-monkey patched std lib stuff
Allows one to get an unpatched thread module, with a thread
decorator that uses the unpatching OS thread.
"""
from __future__ import absolute_import
try:
from gevent._threading import start_new_thread
except ImportError:
from thread import sta... | Make sure we use proper gevent with absolute import, pull the start_new_thread directly out. | Make sure we use proper gevent with absolute import, pull the start_new_thread directly out.
| Python | apache-2.0 | harlowja/kazoo,pombredanne/kazoo,rockerbox/kazoo,AlexanderplUs/kazoo,harlowja/kazoo,pombredanne/kazoo,rgs1/kazoo,Asana/kazoo,jacksontj/kazoo,kormat/kazoo,rackerlabs/kazoo,bsanders/kazoo,tempbottle/kazoo,python-zk/kazoo,rockerbox/kazoo,jacksontj/kazoo,rackerlabs/kazoo,python-zk/kazoo,rgs1/kazoo,tempbottle/kazoo,Alexande... | """Handler utilities for getting non-monkey patched std lib stuff
Allows one to get an unpatched thread module, with a thread
decorator that uses the unpatching OS thread.
"""
try:
from gevent import monkey
[start_new_thread] = monkey.get_original('thread', ['start_new_thread'])
except ImportError:
from t... | """Handler utilities for getting non-monkey patched std lib stuff
Allows one to get an unpatched thread module, with a thread
decorator that uses the unpatching OS thread.
"""
from __future__ import absolute_import
try:
from gevent._threading import start_new_thread
except ImportError:
from thread import sta... | <commit_before>"""Handler utilities for getting non-monkey patched std lib stuff
Allows one to get an unpatched thread module, with a thread
decorator that uses the unpatching OS thread.
"""
try:
from gevent import monkey
[start_new_thread] = monkey.get_original('thread', ['start_new_thread'])
except ImportEr... | """Handler utilities for getting non-monkey patched std lib stuff
Allows one to get an unpatched thread module, with a thread
decorator that uses the unpatching OS thread.
"""
from __future__ import absolute_import
try:
from gevent._threading import start_new_thread
except ImportError:
from thread import sta... | """Handler utilities for getting non-monkey patched std lib stuff
Allows one to get an unpatched thread module, with a thread
decorator that uses the unpatching OS thread.
"""
try:
from gevent import monkey
[start_new_thread] = monkey.get_original('thread', ['start_new_thread'])
except ImportError:
from t... | <commit_before>"""Handler utilities for getting non-monkey patched std lib stuff
Allows one to get an unpatched thread module, with a thread
decorator that uses the unpatching OS thread.
"""
try:
from gevent import monkey
[start_new_thread] = monkey.get_original('thread', ['start_new_thread'])
except ImportEr... |
08f36c5ff17c2bdfb98bdbcaeaaaaf30a1b71b93 | raxcli/__init__.py | raxcli/__init__.py | # Copyright 2012 Rackspace
#
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the... | # Copyright 2013 Rackspace
#
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the... | Update year in the license header. | Update year in the license header.
| Python | apache-2.0 | racker/python-raxcli | # Copyright 2012 Rackspace
#
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the... | # Copyright 2013 Rackspace
#
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the... | <commit_before># Copyright 2012 Rackspace
#
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Ver... | # Copyright 2013 Rackspace
#
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the... | # Copyright 2012 Rackspace
#
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the... | <commit_before># Copyright 2012 Rackspace
#
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Ver... |
534770cf0cc25c7aa0350570bc7a39d6239c7e05 | src/data/extractor/parsehtml.py | src/data/extractor/parsehtml.py | from urllib import urlopen
from bs4 import BeautifulSoup
from selenium import webdriver
def getBeautifulSoupObject(link):
html = urlopen(link)
return BeautifulSoup(html)
def getDynamicContent(link):
driver = webdriver.PhantomJS()
driver.get(link)
link = "https://www.dnainfo.com/chicago/2017-chicago-... | import requests
from bs4 import BeautifulSoup
from selenium import webdriver
import logging
logging.basicConfig(filename='scrape.log',level=20)
logging.info('Initialized logger')
def getBeautifulSoupObject(link):
html = requests.get(link)
return BeautifulSoup(html)
def getDynamicContent(link):
try:
... | Add logging, requests and handle exceptions | Add logging, requests and handle exceptions
| Python | mit | craftbase/chicago-murders | from urllib import urlopen
from bs4 import BeautifulSoup
from selenium import webdriver
def getBeautifulSoupObject(link):
html = urlopen(link)
return BeautifulSoup(html)
def getDynamicContent(link):
driver = webdriver.PhantomJS()
driver.get(link)
link = "https://www.dnainfo.com/chicago/2017-chicago-... | import requests
from bs4 import BeautifulSoup
from selenium import webdriver
import logging
logging.basicConfig(filename='scrape.log',level=20)
logging.info('Initialized logger')
def getBeautifulSoupObject(link):
html = requests.get(link)
return BeautifulSoup(html)
def getDynamicContent(link):
try:
... | <commit_before>from urllib import urlopen
from bs4 import BeautifulSoup
from selenium import webdriver
def getBeautifulSoupObject(link):
html = urlopen(link)
return BeautifulSoup(html)
def getDynamicContent(link):
driver = webdriver.PhantomJS()
driver.get(link)
link = "https://www.dnainfo.com/chicag... | import requests
from bs4 import BeautifulSoup
from selenium import webdriver
import logging
logging.basicConfig(filename='scrape.log',level=20)
logging.info('Initialized logger')
def getBeautifulSoupObject(link):
html = requests.get(link)
return BeautifulSoup(html)
def getDynamicContent(link):
try:
... | from urllib import urlopen
from bs4 import BeautifulSoup
from selenium import webdriver
def getBeautifulSoupObject(link):
html = urlopen(link)
return BeautifulSoup(html)
def getDynamicContent(link):
driver = webdriver.PhantomJS()
driver.get(link)
link = "https://www.dnainfo.com/chicago/2017-chicago-... | <commit_before>from urllib import urlopen
from bs4 import BeautifulSoup
from selenium import webdriver
def getBeautifulSoupObject(link):
html = urlopen(link)
return BeautifulSoup(html)
def getDynamicContent(link):
driver = webdriver.PhantomJS()
driver.get(link)
link = "https://www.dnainfo.com/chicag... |
55378f71e8553eaad606433ae9e871983e99bd26 | pastalog/pastalog/__init__.py | pastalog/pastalog/__init__.py | '''
The pastalog Log class, which simply sends a POST request to a the server.
'''
import requests
class Log(object):
def __init__(self, url, model_name):
self.url = url
self.model_name = model_name
def post(self, series_name, value, step):
payload = {"modelName": self.model_name,
... | '''
The pastalog Log class, which simply sends a POST request to a the server.
'''
import requests
import os
class Log(object):
def __init__(self, url, model_name):
self.url = os.path.join(url, 'data')
self.model_name = model_name
def post(self, series_name, value, step):
payload = {"... | Update to post to correct endpoint | Update to post to correct endpoint
| Python | mit | rewonc/pastalog,rewonc/pastalog,rewonc/pastalog | '''
The pastalog Log class, which simply sends a POST request to a the server.
'''
import requests
class Log(object):
def __init__(self, url, model_name):
self.url = url
self.model_name = model_name
def post(self, series_name, value, step):
payload = {"modelName": self.model_name,
... | '''
The pastalog Log class, which simply sends a POST request to a the server.
'''
import requests
import os
class Log(object):
def __init__(self, url, model_name):
self.url = os.path.join(url, 'data')
self.model_name = model_name
def post(self, series_name, value, step):
payload = {"... | <commit_before>'''
The pastalog Log class, which simply sends a POST request to a the server.
'''
import requests
class Log(object):
def __init__(self, url, model_name):
self.url = url
self.model_name = model_name
def post(self, series_name, value, step):
payload = {"modelName": self.... | '''
The pastalog Log class, which simply sends a POST request to a the server.
'''
import requests
import os
class Log(object):
def __init__(self, url, model_name):
self.url = os.path.join(url, 'data')
self.model_name = model_name
def post(self, series_name, value, step):
payload = {"... | '''
The pastalog Log class, which simply sends a POST request to a the server.
'''
import requests
class Log(object):
def __init__(self, url, model_name):
self.url = url
self.model_name = model_name
def post(self, series_name, value, step):
payload = {"modelName": self.model_name,
... | <commit_before>'''
The pastalog Log class, which simply sends a POST request to a the server.
'''
import requests
class Log(object):
def __init__(self, url, model_name):
self.url = url
self.model_name = model_name
def post(self, series_name, value, step):
payload = {"modelName": self.... |
8e3d77675d65740776fc8f0fc93bb311cf62c632 | books/models.py | books/models.py | from django.db import models
from django.utils.translation import ugettext as _
from egielda import settings
class BookType(models.Model):
publisher = models.CharField(max_length=150)
title = models.CharField(max_length=150)
price = models.IntegerField()
def price_string(self):
return "%(pri... | from django.db import models
from django.utils.translation import ugettext as _
from egielda import settings
class BookType(models.Model):
publisher = models.CharField(max_length=150)
title = models.CharField(max_length=150)
price = models.IntegerField()
def price_string(self):
return "%(pri... | Fix __str__ method for BookType Model | Fix __str__ method for BookType Model
| Python | agpl-3.0 | m4tx/egielda,m4tx/egielda,m4tx/egielda | from django.db import models
from django.utils.translation import ugettext as _
from egielda import settings
class BookType(models.Model):
publisher = models.CharField(max_length=150)
title = models.CharField(max_length=150)
price = models.IntegerField()
def price_string(self):
return "%(pri... | from django.db import models
from django.utils.translation import ugettext as _
from egielda import settings
class BookType(models.Model):
publisher = models.CharField(max_length=150)
title = models.CharField(max_length=150)
price = models.IntegerField()
def price_string(self):
return "%(pri... | <commit_before>from django.db import models
from django.utils.translation import ugettext as _
from egielda import settings
class BookType(models.Model):
publisher = models.CharField(max_length=150)
title = models.CharField(max_length=150)
price = models.IntegerField()
def price_string(self):
... | from django.db import models
from django.utils.translation import ugettext as _
from egielda import settings
class BookType(models.Model):
publisher = models.CharField(max_length=150)
title = models.CharField(max_length=150)
price = models.IntegerField()
def price_string(self):
return "%(pri... | from django.db import models
from django.utils.translation import ugettext as _
from egielda import settings
class BookType(models.Model):
publisher = models.CharField(max_length=150)
title = models.CharField(max_length=150)
price = models.IntegerField()
def price_string(self):
return "%(pri... | <commit_before>from django.db import models
from django.utils.translation import ugettext as _
from egielda import settings
class BookType(models.Model):
publisher = models.CharField(max_length=150)
title = models.CharField(max_length=150)
price = models.IntegerField()
def price_string(self):
... |
580b5c48fc42f09459bcf63c0e2e239a550adb41 | calexicon/calendars/tests/calendar_testing.py | calexicon/calendars/tests/calendar_testing.py | import sys
if sys.hexversion < 0x02070000:
import unittest2 as unittest
else:
import unittest
from hypothesis import given, example
from hypothesis.extra.datetime import datetimes
from calexicon.calendars import ProlepticGregorianCalendar, JulianCalendar
from calexicon.dates import DateWithCalendar, Invalid... | import sys
if sys.hexversion < 0x02070000:
import unittest2 as unittest
else:
import unittest
from hypothesis import given, example
from hypothesis.extra.datetime import datetimes
from calexicon.calendars import ProlepticGregorianCalendar, JulianCalendar
from calexicon.dates import DateWithCalendar, Invalid... | Change name of test to avoid collision | Change name of test to avoid collision
This was spotted by coveralls. | Python | apache-2.0 | jwg4/calexicon,jwg4/qual | import sys
if sys.hexversion < 0x02070000:
import unittest2 as unittest
else:
import unittest
from hypothesis import given, example
from hypothesis.extra.datetime import datetimes
from calexicon.calendars import ProlepticGregorianCalendar, JulianCalendar
from calexicon.dates import DateWithCalendar, Invalid... | import sys
if sys.hexversion < 0x02070000:
import unittest2 as unittest
else:
import unittest
from hypothesis import given, example
from hypothesis.extra.datetime import datetimes
from calexicon.calendars import ProlepticGregorianCalendar, JulianCalendar
from calexicon.dates import DateWithCalendar, Invalid... | <commit_before>import sys
if sys.hexversion < 0x02070000:
import unittest2 as unittest
else:
import unittest
from hypothesis import given, example
from hypothesis.extra.datetime import datetimes
from calexicon.calendars import ProlepticGregorianCalendar, JulianCalendar
from calexicon.dates import DateWithCa... | import sys
if sys.hexversion < 0x02070000:
import unittest2 as unittest
else:
import unittest
from hypothesis import given, example
from hypothesis.extra.datetime import datetimes
from calexicon.calendars import ProlepticGregorianCalendar, JulianCalendar
from calexicon.dates import DateWithCalendar, Invalid... | import sys
if sys.hexversion < 0x02070000:
import unittest2 as unittest
else:
import unittest
from hypothesis import given, example
from hypothesis.extra.datetime import datetimes
from calexicon.calendars import ProlepticGregorianCalendar, JulianCalendar
from calexicon.dates import DateWithCalendar, Invalid... | <commit_before>import sys
if sys.hexversion < 0x02070000:
import unittest2 as unittest
else:
import unittest
from hypothesis import given, example
from hypothesis.extra.datetime import datetimes
from calexicon.calendars import ProlepticGregorianCalendar, JulianCalendar
from calexicon.dates import DateWithCa... |
520a23caae3bd4e1db60021025b5dc3f573b0873 | plugins/mediawiki.py | plugins/mediawiki.py | import ConfigParser
import datetime
from wikitools import wiki
from wikitools import category
from plugin import Plugin
class MediaWiki(Plugin):
def __init__(self, config=None):
if config:
try:
self.site = wiki.Wiki(config.get('MediaWiki', 'wikiapiurl'))
self.site.login(config.get('MediaWik... | import ConfigParser
import datetime
from wikitools import wiki
from wikitools import category
from plugin import Plugin
class MediaWiki(Plugin):
def __init__(self, config=None):
if config:
try:
self.site = wiki.Wiki(config.get('MediaWiki', 'wikiapiurl'))
self.site.login(config.get('MediaWik... | Mark wiki edits as bot edit | Mark wiki edits as bot edit | Python | mit | k4cg/Rezeptionistin | import ConfigParser
import datetime
from wikitools import wiki
from wikitools import category
from plugin import Plugin
class MediaWiki(Plugin):
def __init__(self, config=None):
if config:
try:
self.site = wiki.Wiki(config.get('MediaWiki', 'wikiapiurl'))
self.site.login(config.get('MediaWik... | import ConfigParser
import datetime
from wikitools import wiki
from wikitools import category
from plugin import Plugin
class MediaWiki(Plugin):
def __init__(self, config=None):
if config:
try:
self.site = wiki.Wiki(config.get('MediaWiki', 'wikiapiurl'))
self.site.login(config.get('MediaWik... | <commit_before>import ConfigParser
import datetime
from wikitools import wiki
from wikitools import category
from plugin import Plugin
class MediaWiki(Plugin):
def __init__(self, config=None):
if config:
try:
self.site = wiki.Wiki(config.get('MediaWiki', 'wikiapiurl'))
self.site.login(confi... | import ConfigParser
import datetime
from wikitools import wiki
from wikitools import category
from plugin import Plugin
class MediaWiki(Plugin):
def __init__(self, config=None):
if config:
try:
self.site = wiki.Wiki(config.get('MediaWiki', 'wikiapiurl'))
self.site.login(config.get('MediaWik... | import ConfigParser
import datetime
from wikitools import wiki
from wikitools import category
from plugin import Plugin
class MediaWiki(Plugin):
def __init__(self, config=None):
if config:
try:
self.site = wiki.Wiki(config.get('MediaWiki', 'wikiapiurl'))
self.site.login(config.get('MediaWik... | <commit_before>import ConfigParser
import datetime
from wikitools import wiki
from wikitools import category
from plugin import Plugin
class MediaWiki(Plugin):
def __init__(self, config=None):
if config:
try:
self.site = wiki.Wiki(config.get('MediaWiki', 'wikiapiurl'))
self.site.login(confi... |
6a9165a55d3238a40e368a348c6d7a7a7d133f34 | dockci/api/base.py | dockci/api/base.py | """ Base classes and data for building the API """
from flask_restful import reqparse, Resource
from .util import clean_attrs, set_attrs
from dockci.server import DB
AUTH_FORM_LOCATIONS = ('form', 'headers', 'json')
class BaseDetailResource(Resource):
""" Base resource for details API endpoints """
def han... | """ Base classes and data for building the API """
from flask_restful import reqparse, Resource
from .util import clean_attrs, set_attrs
from dockci.server import DB
AUTH_FORM_LOCATIONS = ('form', 'headers', 'json')
class BaseDetailResource(Resource):
""" Base resource for details API endpoints """
# pylin... | Allow handle_write to accept data | Allow handle_write to accept data
| Python | isc | RickyCook/DockCI,RickyCook/DockCI,sprucedev/DockCI,sprucedev/DockCI,sprucedev/DockCI-Agent,sprucedev/DockCI,RickyCook/DockCI,RickyCook/DockCI,sprucedev/DockCI-Agent,sprucedev/DockCI | """ Base classes and data for building the API """
from flask_restful import reqparse, Resource
from .util import clean_attrs, set_attrs
from dockci.server import DB
AUTH_FORM_LOCATIONS = ('form', 'headers', 'json')
class BaseDetailResource(Resource):
""" Base resource for details API endpoints """
def han... | """ Base classes and data for building the API """
from flask_restful import reqparse, Resource
from .util import clean_attrs, set_attrs
from dockci.server import DB
AUTH_FORM_LOCATIONS = ('form', 'headers', 'json')
class BaseDetailResource(Resource):
""" Base resource for details API endpoints """
# pylin... | <commit_before>""" Base classes and data for building the API """
from flask_restful import reqparse, Resource
from .util import clean_attrs, set_attrs
from dockci.server import DB
AUTH_FORM_LOCATIONS = ('form', 'headers', 'json')
class BaseDetailResource(Resource):
""" Base resource for details API endpoints ... | """ Base classes and data for building the API """
from flask_restful import reqparse, Resource
from .util import clean_attrs, set_attrs
from dockci.server import DB
AUTH_FORM_LOCATIONS = ('form', 'headers', 'json')
class BaseDetailResource(Resource):
""" Base resource for details API endpoints """
# pylin... | """ Base classes and data for building the API """
from flask_restful import reqparse, Resource
from .util import clean_attrs, set_attrs
from dockci.server import DB
AUTH_FORM_LOCATIONS = ('form', 'headers', 'json')
class BaseDetailResource(Resource):
""" Base resource for details API endpoints """
def han... | <commit_before>""" Base classes and data for building the API """
from flask_restful import reqparse, Resource
from .util import clean_attrs, set_attrs
from dockci.server import DB
AUTH_FORM_LOCATIONS = ('form', 'headers', 'json')
class BaseDetailResource(Resource):
""" Base resource for details API endpoints ... |
4ae0fccace6a3b2b640fd58c03fbd07341578acc | gen-android-icons.py | gen-android-icons.py | __author__ = 'Maksim Dmitriev'
import argparse
import os
if __name__ == "__main__":
parser = argparse.ArgumentParser()
parser.add_argument('-s', '--source', help='the icon to be resized', required=True)
parser.add_argument('-d', '--dest', help='the directory where resized icons are saved')
parser.add_... | __author__ = 'Maksim Dmitriev'
import argparse
import os
if __name__ == "__main__":
parser = argparse.ArgumentParser()
parser.add_argument('-s', '--source', help='the icon to be resized', required=True)
parser.add_argument('-d', '--dest', help='the directory where resized icons are saved')
parser.add_... | Use os.path.join instead of + | Use os.path.join instead of +
| Python | bsd-3-clause | MaksimDmitriev/Python-Scripts | __author__ = 'Maksim Dmitriev'
import argparse
import os
if __name__ == "__main__":
parser = argparse.ArgumentParser()
parser.add_argument('-s', '--source', help='the icon to be resized', required=True)
parser.add_argument('-d', '--dest', help='the directory where resized icons are saved')
parser.add_... | __author__ = 'Maksim Dmitriev'
import argparse
import os
if __name__ == "__main__":
parser = argparse.ArgumentParser()
parser.add_argument('-s', '--source', help='the icon to be resized', required=True)
parser.add_argument('-d', '--dest', help='the directory where resized icons are saved')
parser.add_... | <commit_before>__author__ = 'Maksim Dmitriev'
import argparse
import os
if __name__ == "__main__":
parser = argparse.ArgumentParser()
parser.add_argument('-s', '--source', help='the icon to be resized', required=True)
parser.add_argument('-d', '--dest', help='the directory where resized icons are saved')
... | __author__ = 'Maksim Dmitriev'
import argparse
import os
if __name__ == "__main__":
parser = argparse.ArgumentParser()
parser.add_argument('-s', '--source', help='the icon to be resized', required=True)
parser.add_argument('-d', '--dest', help='the directory where resized icons are saved')
parser.add_... | __author__ = 'Maksim Dmitriev'
import argparse
import os
if __name__ == "__main__":
parser = argparse.ArgumentParser()
parser.add_argument('-s', '--source', help='the icon to be resized', required=True)
parser.add_argument('-d', '--dest', help='the directory where resized icons are saved')
parser.add_... | <commit_before>__author__ = 'Maksim Dmitriev'
import argparse
import os
if __name__ == "__main__":
parser = argparse.ArgumentParser()
parser.add_argument('-s', '--source', help='the icon to be resized', required=True)
parser.add_argument('-d', '--dest', help='the directory where resized icons are saved')
... |
77f22bd587ba2f6b1360bd5f8174e007b6028f9f | genes/debconf/set.py | genes/debconf/set.py | import os
from subprocess import Popen, PIPE
from genes.lib.traits import if_any
from genes.ubuntu.traits import is_ubuntu
from genes.debian.traits import is_debian
# TODO: stop using sudo or ensure it exists
# TODO: specify user to run as
# TODO: utilize functools partial to handle some of the above functionality
cl... | import os
from subprocess import Popen, PIPE
from genes.lib.traits import if_any
from genes.ubuntu.traits import is_ubuntu
from genes.debian.traits import is_debian
# TODO: stop using sudo or ensure it exists
# TODO: specify user to run as
# TODO: utilize functools partial to handle some of the above functionality
cl... | Change bools to functions in if_any | Change bools to functions in if_any | Python | mit | hatchery/genepool,hatchery/Genepool2 | import os
from subprocess import Popen, PIPE
from genes.lib.traits import if_any
from genes.ubuntu.traits import is_ubuntu
from genes.debian.traits import is_debian
# TODO: stop using sudo or ensure it exists
# TODO: specify user to run as
# TODO: utilize functools partial to handle some of the above functionality
cl... | import os
from subprocess import Popen, PIPE
from genes.lib.traits import if_any
from genes.ubuntu.traits import is_ubuntu
from genes.debian.traits import is_debian
# TODO: stop using sudo or ensure it exists
# TODO: specify user to run as
# TODO: utilize functools partial to handle some of the above functionality
cl... | <commit_before>import os
from subprocess import Popen, PIPE
from genes.lib.traits import if_any
from genes.ubuntu.traits import is_ubuntu
from genes.debian.traits import is_debian
# TODO: stop using sudo or ensure it exists
# TODO: specify user to run as
# TODO: utilize functools partial to handle some of the above f... | import os
from subprocess import Popen, PIPE
from genes.lib.traits import if_any
from genes.ubuntu.traits import is_ubuntu
from genes.debian.traits import is_debian
# TODO: stop using sudo or ensure it exists
# TODO: specify user to run as
# TODO: utilize functools partial to handle some of the above functionality
cl... | import os
from subprocess import Popen, PIPE
from genes.lib.traits import if_any
from genes.ubuntu.traits import is_ubuntu
from genes.debian.traits import is_debian
# TODO: stop using sudo or ensure it exists
# TODO: specify user to run as
# TODO: utilize functools partial to handle some of the above functionality
cl... | <commit_before>import os
from subprocess import Popen, PIPE
from genes.lib.traits import if_any
from genes.ubuntu.traits import is_ubuntu
from genes.debian.traits import is_debian
# TODO: stop using sudo or ensure it exists
# TODO: specify user to run as
# TODO: utilize functools partial to handle some of the above f... |
25e5070a575de1ae7e20d6ede71297ab424cea87 | bluegreen-example/app.py | bluegreen-example/app.py | import os
from flask import Flask
app = Flask(__name__)
@app.route("/")
def hello():
return "Hello 0-downtime %s World!" % os.environ.get('BLUEGREEN', 'bland')
| import os
from flask import Flask, send_from_directory
app = Flask(__name__)
@app.route("/")
def hello():
return "Hello 0-downtime %s World!" % os.environ.get('BLUEGREEN', 'bland')
@app.route("/parrots/<path:path>")
def parrot(path):
return send_from_directory(os.path.join('parrots', 'parrots'), path)
| Add a route to send parrot images | Add a route to send parrot images
| Python | mit | dbravender/gitric | import os
from flask import Flask
app = Flask(__name__)
@app.route("/")
def hello():
return "Hello 0-downtime %s World!" % os.environ.get('BLUEGREEN', 'bland')
Add a route to send parrot images | import os
from flask import Flask, send_from_directory
app = Flask(__name__)
@app.route("/")
def hello():
return "Hello 0-downtime %s World!" % os.environ.get('BLUEGREEN', 'bland')
@app.route("/parrots/<path:path>")
def parrot(path):
return send_from_directory(os.path.join('parrots', 'parrots'), path)
| <commit_before>import os
from flask import Flask
app = Flask(__name__)
@app.route("/")
def hello():
return "Hello 0-downtime %s World!" % os.environ.get('BLUEGREEN', 'bland')
<commit_msg>Add a route to send parrot images<commit_after> | import os
from flask import Flask, send_from_directory
app = Flask(__name__)
@app.route("/")
def hello():
return "Hello 0-downtime %s World!" % os.environ.get('BLUEGREEN', 'bland')
@app.route("/parrots/<path:path>")
def parrot(path):
return send_from_directory(os.path.join('parrots', 'parrots'), path)
| import os
from flask import Flask
app = Flask(__name__)
@app.route("/")
def hello():
return "Hello 0-downtime %s World!" % os.environ.get('BLUEGREEN', 'bland')
Add a route to send parrot imagesimport os
from flask import Flask, send_from_directory
app = Flask(__name__)
@app.route("/")
def hello():
return ... | <commit_before>import os
from flask import Flask
app = Flask(__name__)
@app.route("/")
def hello():
return "Hello 0-downtime %s World!" % os.environ.get('BLUEGREEN', 'bland')
<commit_msg>Add a route to send parrot images<commit_after>import os
from flask import Flask, send_from_directory
app = Flask(__name__)
... |
09b6f3e5cde6aeff69ea15fdc15c7db300ce3272 | python/web_socket.py | python/web_socket.py | #!/bin/python
try:
import urllib.request as urlrequest
except ImportError:
import urllib as urlrequest
import json
class RESTfulApi:
"""
Generic REST API call
"""
def __init__(self):
"""
Constructor
"""
pass
def request(self, url):
"""
Web... | #!/bin/python
try:
import urllib.request as urlrequest
except ImportError:
import urllib as urlrequest
import json
class RESTfulApi:
"""
Generic REST API call
"""
def __init__(self):
"""
Constructor
"""
pass
def request(self, url):
"""
Web... | Support python 2 and 3 compatability | Support python 2 and 3 compatability
| Python | apache-2.0 | Aurora-Team/BitcoinExchangeFH | #!/bin/python
try:
import urllib.request as urlrequest
except ImportError:
import urllib as urlrequest
import json
class RESTfulApi:
"""
Generic REST API call
"""
def __init__(self):
"""
Constructor
"""
pass
def request(self, url):
"""
Web... | #!/bin/python
try:
import urllib.request as urlrequest
except ImportError:
import urllib as urlrequest
import json
class RESTfulApi:
"""
Generic REST API call
"""
def __init__(self):
"""
Constructor
"""
pass
def request(self, url):
"""
Web... | <commit_before>#!/bin/python
try:
import urllib.request as urlrequest
except ImportError:
import urllib as urlrequest
import json
class RESTfulApi:
"""
Generic REST API call
"""
def __init__(self):
"""
Constructor
"""
pass
def request(self, url):
... | #!/bin/python
try:
import urllib.request as urlrequest
except ImportError:
import urllib as urlrequest
import json
class RESTfulApi:
"""
Generic REST API call
"""
def __init__(self):
"""
Constructor
"""
pass
def request(self, url):
"""
Web... | #!/bin/python
try:
import urllib.request as urlrequest
except ImportError:
import urllib as urlrequest
import json
class RESTfulApi:
"""
Generic REST API call
"""
def __init__(self):
"""
Constructor
"""
pass
def request(self, url):
"""
Web... | <commit_before>#!/bin/python
try:
import urllib.request as urlrequest
except ImportError:
import urllib as urlrequest
import json
class RESTfulApi:
"""
Generic REST API call
"""
def __init__(self):
"""
Constructor
"""
pass
def request(self, url):
... |
97a1c4979f8c46833b4ac89f6920138551ed2ee6 | pyuvdata/__init__.py | pyuvdata/__init__.py | # -*- mode: python; coding: utf-8 -*-
# Copyright (c) 2018 Radio Astronomy Software Group
# Licensed under the 2-clause BSD License
"""init file for pyuvdata.
"""
from __future__ import absolute_import, division, print_function
from .uvdata import *
from .telescopes import *
from .uvcal import *
from .uvbeam import ... | # -*- mode: python; coding: utf-8 -*-
# Copyright (c) 2018 Radio Astronomy Software Group
# Licensed under the 2-clause BSD License
"""init file for pyuvdata.
"""
from __future__ import absolute_import, division, print_function
from .uvdata import *
from .telescopes import *
from .uvcal import *
from .uvbeam import ... | Add comment about utils import | Add comment about utils import
| Python | bsd-2-clause | HERA-Team/pyuvdata,HERA-Team/pyuvdata,HERA-Team/pyuvdata,HERA-Team/pyuvdata | # -*- mode: python; coding: utf-8 -*-
# Copyright (c) 2018 Radio Astronomy Software Group
# Licensed under the 2-clause BSD License
"""init file for pyuvdata.
"""
from __future__ import absolute_import, division, print_function
from .uvdata import *
from .telescopes import *
from .uvcal import *
from .uvbeam import ... | # -*- mode: python; coding: utf-8 -*-
# Copyright (c) 2018 Radio Astronomy Software Group
# Licensed under the 2-clause BSD License
"""init file for pyuvdata.
"""
from __future__ import absolute_import, division, print_function
from .uvdata import *
from .telescopes import *
from .uvcal import *
from .uvbeam import ... | <commit_before># -*- mode: python; coding: utf-8 -*-
# Copyright (c) 2018 Radio Astronomy Software Group
# Licensed under the 2-clause BSD License
"""init file for pyuvdata.
"""
from __future__ import absolute_import, division, print_function
from .uvdata import *
from .telescopes import *
from .uvcal import *
from ... | # -*- mode: python; coding: utf-8 -*-
# Copyright (c) 2018 Radio Astronomy Software Group
# Licensed under the 2-clause BSD License
"""init file for pyuvdata.
"""
from __future__ import absolute_import, division, print_function
from .uvdata import *
from .telescopes import *
from .uvcal import *
from .uvbeam import ... | # -*- mode: python; coding: utf-8 -*-
# Copyright (c) 2018 Radio Astronomy Software Group
# Licensed under the 2-clause BSD License
"""init file for pyuvdata.
"""
from __future__ import absolute_import, division, print_function
from .uvdata import *
from .telescopes import *
from .uvcal import *
from .uvbeam import ... | <commit_before># -*- mode: python; coding: utf-8 -*-
# Copyright (c) 2018 Radio Astronomy Software Group
# Licensed under the 2-clause BSD License
"""init file for pyuvdata.
"""
from __future__ import absolute_import, division, print_function
from .uvdata import *
from .telescopes import *
from .uvcal import *
from ... |
5f7622824ac997228f83a894b451211fac4838ed | core/data/DataTransformer.py | core/data/DataTransformer.py | """
DataTransformer
:Authors:
Berend Klein Haneveld
"""
from vtk import vtkImageReslice
class DataTransformer(object):
"""DataTransformer is a class that can transform a given dataset"""
def __init__(self):
super(DataTransformer, self).__init__()
def TransformImageData(self, imageData, transform):
"""
:t... | """
DataTransformer
:Authors:
Berend Klein Haneveld
"""
from vtk import vtkImageReslice
class DataTransformer(object):
"""DataTransformer is a class that can transform a given dataset"""
def __init__(self):
super(DataTransformer, self).__init__()
def TransformImageData(self, imageData, transform):
"""
:t... | Set the background color of the reslicer to the lowest value in the image data. | Set the background color of the reslicer to the lowest value in the image data.
| Python | mit | berendkleinhaneveld/Registrationshop,berendkleinhaneveld/Registrationshop | """
DataTransformer
:Authors:
Berend Klein Haneveld
"""
from vtk import vtkImageReslice
class DataTransformer(object):
"""DataTransformer is a class that can transform a given dataset"""
def __init__(self):
super(DataTransformer, self).__init__()
def TransformImageData(self, imageData, transform):
"""
:t... | """
DataTransformer
:Authors:
Berend Klein Haneveld
"""
from vtk import vtkImageReslice
class DataTransformer(object):
"""DataTransformer is a class that can transform a given dataset"""
def __init__(self):
super(DataTransformer, self).__init__()
def TransformImageData(self, imageData, transform):
"""
:t... | <commit_before>"""
DataTransformer
:Authors:
Berend Klein Haneveld
"""
from vtk import vtkImageReslice
class DataTransformer(object):
"""DataTransformer is a class that can transform a given dataset"""
def __init__(self):
super(DataTransformer, self).__init__()
def TransformImageData(self, imageData, transfo... | """
DataTransformer
:Authors:
Berend Klein Haneveld
"""
from vtk import vtkImageReslice
class DataTransformer(object):
"""DataTransformer is a class that can transform a given dataset"""
def __init__(self):
super(DataTransformer, self).__init__()
def TransformImageData(self, imageData, transform):
"""
:t... | """
DataTransformer
:Authors:
Berend Klein Haneveld
"""
from vtk import vtkImageReslice
class DataTransformer(object):
"""DataTransformer is a class that can transform a given dataset"""
def __init__(self):
super(DataTransformer, self).__init__()
def TransformImageData(self, imageData, transform):
"""
:t... | <commit_before>"""
DataTransformer
:Authors:
Berend Klein Haneveld
"""
from vtk import vtkImageReslice
class DataTransformer(object):
"""DataTransformer is a class that can transform a given dataset"""
def __init__(self):
super(DataTransformer, self).__init__()
def TransformImageData(self, imageData, transfo... |
32b00e79b9204477e94adc47fae0e3a0838dc328 | reviewboard/hostingsvcs/versionone.py | reviewboard/hostingsvcs/versionone.py | from django import forms
from django.utils.translation import ugettext_lazy as _
from reviewboard.hostingsvcs.forms import HostingServiceForm
from reviewboard.hostingsvcs.service import HostingService
class VersionOneForm(HostingServiceForm):
versionone_url = forms.CharField(
label=_('VersionOne URL'),
... | from django import forms
from django.utils.translation import ugettext_lazy as _
from reviewboard.hostingsvcs.forms import HostingServiceForm
from reviewboard.hostingsvcs.service import HostingService
class VersionOneForm(HostingServiceForm):
versionone_url = forms.CharField(
label=_('VersionOne URL'),
... | Clean up the name and spacing in the VersionOne code. | Clean up the name and spacing in the VersionOne code.
The VersionOne code had some spacing and trailing whitespace problems,
and also listed the service as "versionone" and not "VersionOne".
| Python | mit | 1tush/reviewboard,custode/reviewboard,1tush/reviewboard,1tush/reviewboard,chipx86/reviewboard,chipx86/reviewboard,KnowNo/reviewboard,KnowNo/reviewboard,brennie/reviewboard,davidt/reviewboard,reviewboard/reviewboard,sgallagher/reviewboard,beol/reviewboard,sgallagher/reviewboard,davidt/reviewboard,beol/reviewboard,bkoche... | from django import forms
from django.utils.translation import ugettext_lazy as _
from reviewboard.hostingsvcs.forms import HostingServiceForm
from reviewboard.hostingsvcs.service import HostingService
class VersionOneForm(HostingServiceForm):
versionone_url = forms.CharField(
label=_('VersionOne URL'),
... | from django import forms
from django.utils.translation import ugettext_lazy as _
from reviewboard.hostingsvcs.forms import HostingServiceForm
from reviewboard.hostingsvcs.service import HostingService
class VersionOneForm(HostingServiceForm):
versionone_url = forms.CharField(
label=_('VersionOne URL'),
... | <commit_before>from django import forms
from django.utils.translation import ugettext_lazy as _
from reviewboard.hostingsvcs.forms import HostingServiceForm
from reviewboard.hostingsvcs.service import HostingService
class VersionOneForm(HostingServiceForm):
versionone_url = forms.CharField(
label=_('Vers... | from django import forms
from django.utils.translation import ugettext_lazy as _
from reviewboard.hostingsvcs.forms import HostingServiceForm
from reviewboard.hostingsvcs.service import HostingService
class VersionOneForm(HostingServiceForm):
versionone_url = forms.CharField(
label=_('VersionOne URL'),
... | from django import forms
from django.utils.translation import ugettext_lazy as _
from reviewboard.hostingsvcs.forms import HostingServiceForm
from reviewboard.hostingsvcs.service import HostingService
class VersionOneForm(HostingServiceForm):
versionone_url = forms.CharField(
label=_('VersionOne URL'),
... | <commit_before>from django import forms
from django.utils.translation import ugettext_lazy as _
from reviewboard.hostingsvcs.forms import HostingServiceForm
from reviewboard.hostingsvcs.service import HostingService
class VersionOneForm(HostingServiceForm):
versionone_url = forms.CharField(
label=_('Vers... |
73a9889f0e43d2b1dc94e2235a94cb888e0eda89 | zeus/utils/sentry.py | zeus/utils/sentry.py | from functools import wraps
from sentry_sdk import Hub
def span(op, desc_or_func=None):
def inner(func):
@wraps(func)
def wrapped(*args, **kwargs):
if callable(desc_or_func):
description = desc_or_func(*args, **kwargs)
else:
description = des... | import asyncio
from contextlib import contextmanager
from functools import wraps
from sentry_sdk import Hub
# https://stackoverflow.com/questions/44169998/how-to-create-a-python-decorator-that-can-wrap-either-coroutine-or-function
def span(op, desc_or_func=None):
def inner(func):
@contextmanager
... | Fix span decorator to work with asyncio | Fix span decorator to work with asyncio
| Python | apache-2.0 | getsentry/zeus,getsentry/zeus,getsentry/zeus,getsentry/zeus | from functools import wraps
from sentry_sdk import Hub
def span(op, desc_or_func=None):
def inner(func):
@wraps(func)
def wrapped(*args, **kwargs):
if callable(desc_or_func):
description = desc_or_func(*args, **kwargs)
else:
description = des... | import asyncio
from contextlib import contextmanager
from functools import wraps
from sentry_sdk import Hub
# https://stackoverflow.com/questions/44169998/how-to-create-a-python-decorator-that-can-wrap-either-coroutine-or-function
def span(op, desc_or_func=None):
def inner(func):
@contextmanager
... | <commit_before>from functools import wraps
from sentry_sdk import Hub
def span(op, desc_or_func=None):
def inner(func):
@wraps(func)
def wrapped(*args, **kwargs):
if callable(desc_or_func):
description = desc_or_func(*args, **kwargs)
else:
de... | import asyncio
from contextlib import contextmanager
from functools import wraps
from sentry_sdk import Hub
# https://stackoverflow.com/questions/44169998/how-to-create-a-python-decorator-that-can-wrap-either-coroutine-or-function
def span(op, desc_or_func=None):
def inner(func):
@contextmanager
... | from functools import wraps
from sentry_sdk import Hub
def span(op, desc_or_func=None):
def inner(func):
@wraps(func)
def wrapped(*args, **kwargs):
if callable(desc_or_func):
description = desc_or_func(*args, **kwargs)
else:
description = des... | <commit_before>from functools import wraps
from sentry_sdk import Hub
def span(op, desc_or_func=None):
def inner(func):
@wraps(func)
def wrapped(*args, **kwargs):
if callable(desc_or_func):
description = desc_or_func(*args, **kwargs)
else:
de... |
3304b539e0f4105b3ad2603b0676b25d7c96b606 | getconf/oldconf.py | getconf/oldconf.py | from oslo_config import cfg
from oslo_config import generator as gn
__all__ = ['get_conf']
def get_conf(conf_file=None, config_file=None):
conf_file = '/opt/stack/barbican/etc/oslo-config-generator/barbican.conf'
config_file = '/etc/barbican/barbican.conf'
conf = cfg.ConfigOpts()
gn.register_cli_opt... | from oslo_config import cfg
from oslo_config import generator as gn
__all__ = ['get_conf']
def get_conf(conf_file=None, config_file=None):
conf_file = '/opt/stack/barbican/etc/oslo-config-generator/barbican.conf'
config_file = '/etc/barbican/barbican.conf'
conf = cfg.ConfigOpts()
gn.register_cli_opt... | Add get not equal default options | Add get not equal default options
| Python | apache-2.0 | NguyenHoaiNam/Jump-Over-Release | from oslo_config import cfg
from oslo_config import generator as gn
__all__ = ['get_conf']
def get_conf(conf_file=None, config_file=None):
conf_file = '/opt/stack/barbican/etc/oslo-config-generator/barbican.conf'
config_file = '/etc/barbican/barbican.conf'
conf = cfg.ConfigOpts()
gn.register_cli_opt... | from oslo_config import cfg
from oslo_config import generator as gn
__all__ = ['get_conf']
def get_conf(conf_file=None, config_file=None):
conf_file = '/opt/stack/barbican/etc/oslo-config-generator/barbican.conf'
config_file = '/etc/barbican/barbican.conf'
conf = cfg.ConfigOpts()
gn.register_cli_opt... | <commit_before>from oslo_config import cfg
from oslo_config import generator as gn
__all__ = ['get_conf']
def get_conf(conf_file=None, config_file=None):
conf_file = '/opt/stack/barbican/etc/oslo-config-generator/barbican.conf'
config_file = '/etc/barbican/barbican.conf'
conf = cfg.ConfigOpts()
gn.r... | from oslo_config import cfg
from oslo_config import generator as gn
__all__ = ['get_conf']
def get_conf(conf_file=None, config_file=None):
conf_file = '/opt/stack/barbican/etc/oslo-config-generator/barbican.conf'
config_file = '/etc/barbican/barbican.conf'
conf = cfg.ConfigOpts()
gn.register_cli_opt... | from oslo_config import cfg
from oslo_config import generator as gn
__all__ = ['get_conf']
def get_conf(conf_file=None, config_file=None):
conf_file = '/opt/stack/barbican/etc/oslo-config-generator/barbican.conf'
config_file = '/etc/barbican/barbican.conf'
conf = cfg.ConfigOpts()
gn.register_cli_opt... | <commit_before>from oslo_config import cfg
from oslo_config import generator as gn
__all__ = ['get_conf']
def get_conf(conf_file=None, config_file=None):
conf_file = '/opt/stack/barbican/etc/oslo-config-generator/barbican.conf'
config_file = '/etc/barbican/barbican.conf'
conf = cfg.ConfigOpts()
gn.r... |
4f5d0e6d16835a10a36cc57fc7e18cee91da5e2b | main.py | main.py | from flask import Flask
app = Flask(__name__)
app.config['DEBUG'] = True
# Note: We don't need to call run() since our application is embedded within
# the App Engine WSGI application server.
@app.route('/')
def hello():
"""Return a friendly HTTP greeting."""
return 'Hello World! 3'
@app.errorhandler(404)
... | from flask import Flask
app = Flask(__name__)
app.config['DEBUG'] = True
# Note: We don't need to call run() since our application is embedded within
# the App Engine WSGI application server.
@app.route('/')
#def hello():
# """Return a friendly HTTP greeting."""
def index():
return """
Upload Image <br>
<... | Insert Upload function & save Google storage. | Insert Upload function & save Google storage. | Python | apache-2.0 | DongjinChoi/tizen_easy_widget,DongjinChoi/tizen_easy_widget | from flask import Flask
app = Flask(__name__)
app.config['DEBUG'] = True
# Note: We don't need to call run() since our application is embedded within
# the App Engine WSGI application server.
@app.route('/')
def hello():
"""Return a friendly HTTP greeting."""
return 'Hello World! 3'
@app.errorhandler(404)
... | from flask import Flask
app = Flask(__name__)
app.config['DEBUG'] = True
# Note: We don't need to call run() since our application is embedded within
# the App Engine WSGI application server.
@app.route('/')
#def hello():
# """Return a friendly HTTP greeting."""
def index():
return """
Upload Image <br>
<... | <commit_before>from flask import Flask
app = Flask(__name__)
app.config['DEBUG'] = True
# Note: We don't need to call run() since our application is embedded within
# the App Engine WSGI application server.
@app.route('/')
def hello():
"""Return a friendly HTTP greeting."""
return 'Hello World! 3'
@app.err... | from flask import Flask
app = Flask(__name__)
app.config['DEBUG'] = True
# Note: We don't need to call run() since our application is embedded within
# the App Engine WSGI application server.
@app.route('/')
#def hello():
# """Return a friendly HTTP greeting."""
def index():
return """
Upload Image <br>
<... | from flask import Flask
app = Flask(__name__)
app.config['DEBUG'] = True
# Note: We don't need to call run() since our application is embedded within
# the App Engine WSGI application server.
@app.route('/')
def hello():
"""Return a friendly HTTP greeting."""
return 'Hello World! 3'
@app.errorhandler(404)
... | <commit_before>from flask import Flask
app = Flask(__name__)
app.config['DEBUG'] = True
# Note: We don't need to call run() since our application is embedded within
# the App Engine WSGI application server.
@app.route('/')
def hello():
"""Return a friendly HTTP greeting."""
return 'Hello World! 3'
@app.err... |
031bce223eac9eda1f856a204a07149c8e9549fd | hoomd/update/__init__.py | hoomd/update/__init__.py | from hoomd.update.box_resize import BoxResize
# TODO remove when no longer necessary
class _updater:
pass
__all__ = [BoxResize]
| from hoomd.update.box_resize import BoxResize
# TODO remove when no longer necessary
class _updater:
pass
__all__ = ['BoxResize']
| Fix typo in hoomd.update.__all__ quote class name | Fix typo in hoomd.update.__all__ quote class name
| Python | bsd-3-clause | joaander/hoomd-blue,joaander/hoomd-blue,joaander/hoomd-blue,joaander/hoomd-blue,joaander/hoomd-blue,joaander/hoomd-blue | from hoomd.update.box_resize import BoxResize
# TODO remove when no longer necessary
class _updater:
pass
__all__ = [BoxResize]
Fix typo in hoomd.update.__all__ quote class name | from hoomd.update.box_resize import BoxResize
# TODO remove when no longer necessary
class _updater:
pass
__all__ = ['BoxResize']
| <commit_before>from hoomd.update.box_resize import BoxResize
# TODO remove when no longer necessary
class _updater:
pass
__all__ = [BoxResize]
<commit_msg>Fix typo in hoomd.update.__all__ quote class name<commit_after> | from hoomd.update.box_resize import BoxResize
# TODO remove when no longer necessary
class _updater:
pass
__all__ = ['BoxResize']
| from hoomd.update.box_resize import BoxResize
# TODO remove when no longer necessary
class _updater:
pass
__all__ = [BoxResize]
Fix typo in hoomd.update.__all__ quote class namefrom hoomd.update.box_resize import BoxResize
# TODO remove when no longer necessary
class _updater:
pass
__all__ = ['BoxResize... | <commit_before>from hoomd.update.box_resize import BoxResize
# TODO remove when no longer necessary
class _updater:
pass
__all__ = [BoxResize]
<commit_msg>Fix typo in hoomd.update.__all__ quote class name<commit_after>from hoomd.update.box_resize import BoxResize
# TODO remove when no longer necessary
class _... |
f5c19e5814763235f8abebba2239f64135dc3188 | python/shapes2json.py | python/shapes2json.py | import re
import numpy as np
infile = "shapes.txt"
filt = re.compile(r'^"?([^"]*)"?$')
converter = lambda x: filt.match(x.strip()).group(1)
data = np.recfromcsv(infile, delimiter=',')
shapes = np.array(map(int, [converter(x) for x in data["shape_id"]]))
lats = np.array(map(float, [converter(x) for x in data["shape_pt_l... | import re, sys
import numpy as np
infile = sys.argv[1]
filt = re.compile(r'^"?([^"]*)"?$')
converter = lambda x: filt.match(x.strip()).group(1)
data = np.recfromcsv(infile, delimiter=',')
shapes = np.array(map(int, [converter(x) for x in data["shape_id"]]))
lats = np.array(map(float, [converter(x) for x in data["shape_... | Print out an array of points | Print out an array of points
| Python | mit | acbecker/kcmetrod3 | import re
import numpy as np
infile = "shapes.txt"
filt = re.compile(r'^"?([^"]*)"?$')
converter = lambda x: filt.match(x.strip()).group(1)
data = np.recfromcsv(infile, delimiter=',')
shapes = np.array(map(int, [converter(x) for x in data["shape_id"]]))
lats = np.array(map(float, [converter(x) for x in data["shape_pt_l... | import re, sys
import numpy as np
infile = sys.argv[1]
filt = re.compile(r'^"?([^"]*)"?$')
converter = lambda x: filt.match(x.strip()).group(1)
data = np.recfromcsv(infile, delimiter=',')
shapes = np.array(map(int, [converter(x) for x in data["shape_id"]]))
lats = np.array(map(float, [converter(x) for x in data["shape_... | <commit_before>import re
import numpy as np
infile = "shapes.txt"
filt = re.compile(r'^"?([^"]*)"?$')
converter = lambda x: filt.match(x.strip()).group(1)
data = np.recfromcsv(infile, delimiter=',')
shapes = np.array(map(int, [converter(x) for x in data["shape_id"]]))
lats = np.array(map(float, [converter(x) for x in d... | import re, sys
import numpy as np
infile = sys.argv[1]
filt = re.compile(r'^"?([^"]*)"?$')
converter = lambda x: filt.match(x.strip()).group(1)
data = np.recfromcsv(infile, delimiter=',')
shapes = np.array(map(int, [converter(x) for x in data["shape_id"]]))
lats = np.array(map(float, [converter(x) for x in data["shape_... | import re
import numpy as np
infile = "shapes.txt"
filt = re.compile(r'^"?([^"]*)"?$')
converter = lambda x: filt.match(x.strip()).group(1)
data = np.recfromcsv(infile, delimiter=',')
shapes = np.array(map(int, [converter(x) for x in data["shape_id"]]))
lats = np.array(map(float, [converter(x) for x in data["shape_pt_l... | <commit_before>import re
import numpy as np
infile = "shapes.txt"
filt = re.compile(r'^"?([^"]*)"?$')
converter = lambda x: filt.match(x.strip()).group(1)
data = np.recfromcsv(infile, delimiter=',')
shapes = np.array(map(int, [converter(x) for x in data["shape_id"]]))
lats = np.array(map(float, [converter(x) for x in d... |
e2924f23c48a6e39b7c6e24ac19f73bd10181167 | say/say.py | say/say.py | # File: say.py
# Purpose: Write a program that will take a number from 0 to 999,999,999,999 and spell out that number in English.
# Programmer: Amal Shehu
# Course: Exercism
# Date: Wednesday 8th September 2016, 10:00 PM
| # File: say.py
# Purpose: 0 to 999,999,999,999 and spell out that number in English.
# Programmer: Amal Shehu
# Course: Exercism
# Date: Wednesday 8th September 2016, 10:00 PM
# #### Step 1
def say(num):
num_dict = {0: 'zero', 1: 'one', 2: 'two', 3: 'three', 4: 'four',
5: 'five'... | Complete step 1 from problem Readme | Complete step 1 from problem Readme
| Python | mit | amalshehu/exercism-python | # File: say.py
# Purpose: Write a program that will take a number from 0 to 999,999,999,999 and spell out that number in English.
# Programmer: Amal Shehu
# Course: Exercism
# Date: Wednesday 8th September 2016, 10:00 PM
Complete step 1 from problem Readme | # File: say.py
# Purpose: 0 to 999,999,999,999 and spell out that number in English.
# Programmer: Amal Shehu
# Course: Exercism
# Date: Wednesday 8th September 2016, 10:00 PM
# #### Step 1
def say(num):
num_dict = {0: 'zero', 1: 'one', 2: 'two', 3: 'three', 4: 'four',
5: 'five'... | <commit_before># File: say.py
# Purpose: Write a program that will take a number from 0 to 999,999,999,999 and spell out that number in English.
# Programmer: Amal Shehu
# Course: Exercism
# Date: Wednesday 8th September 2016, 10:00 PM
<commit_msg>Complete step 1 from problem Readme<commit_after... | # File: say.py
# Purpose: 0 to 999,999,999,999 and spell out that number in English.
# Programmer: Amal Shehu
# Course: Exercism
# Date: Wednesday 8th September 2016, 10:00 PM
# #### Step 1
def say(num):
num_dict = {0: 'zero', 1: 'one', 2: 'two', 3: 'three', 4: 'four',
5: 'five'... | # File: say.py
# Purpose: Write a program that will take a number from 0 to 999,999,999,999 and spell out that number in English.
# Programmer: Amal Shehu
# Course: Exercism
# Date: Wednesday 8th September 2016, 10:00 PM
Complete step 1 from problem Readme# File: say.py
# Purpose: 0 t... | <commit_before># File: say.py
# Purpose: Write a program that will take a number from 0 to 999,999,999,999 and spell out that number in English.
# Programmer: Amal Shehu
# Course: Exercism
# Date: Wednesday 8th September 2016, 10:00 PM
<commit_msg>Complete step 1 from problem Readme<commit_after... |
80dcfaa7216ed0be88eb275316d135a1089e4dbe | simplesqlite/_error.py | simplesqlite/_error.py | # encoding: utf-8
"""
.. codeauthor:: Tsuyoshi Hombashi <tsuyoshi.hombashi@gmail.com>
"""
import sqlite3
class DatabaseError(sqlite3.DatabaseError):
"""
Exception raised for errors that are related to the database.
.. seealso::
- `sqlite3.DatabaseError <https://docs.python.org/3/library/sqlite3... | # encoding: utf-8
"""
.. codeauthor:: Tsuyoshi Hombashi <tsuyoshi.hombashi@gmail.com>
"""
import sqlite3
from tabledata import InvalidTableNameError
class DatabaseError(sqlite3.DatabaseError):
"""
Exception raised for errors that are related to the database.
.. seealso::
- `sqlite3.DatabaseErr... | Remove a duplicate error class definition | Remove a duplicate error class definition
| Python | mit | thombashi/SimpleSQLite,thombashi/SimpleSQLite | # encoding: utf-8
"""
.. codeauthor:: Tsuyoshi Hombashi <tsuyoshi.hombashi@gmail.com>
"""
import sqlite3
class DatabaseError(sqlite3.DatabaseError):
"""
Exception raised for errors that are related to the database.
.. seealso::
- `sqlite3.DatabaseError <https://docs.python.org/3/library/sqlite3... | # encoding: utf-8
"""
.. codeauthor:: Tsuyoshi Hombashi <tsuyoshi.hombashi@gmail.com>
"""
import sqlite3
from tabledata import InvalidTableNameError
class DatabaseError(sqlite3.DatabaseError):
"""
Exception raised for errors that are related to the database.
.. seealso::
- `sqlite3.DatabaseErr... | <commit_before># encoding: utf-8
"""
.. codeauthor:: Tsuyoshi Hombashi <tsuyoshi.hombashi@gmail.com>
"""
import sqlite3
class DatabaseError(sqlite3.DatabaseError):
"""
Exception raised for errors that are related to the database.
.. seealso::
- `sqlite3.DatabaseError <https://docs.python.org/3/... | # encoding: utf-8
"""
.. codeauthor:: Tsuyoshi Hombashi <tsuyoshi.hombashi@gmail.com>
"""
import sqlite3
from tabledata import InvalidTableNameError
class DatabaseError(sqlite3.DatabaseError):
"""
Exception raised for errors that are related to the database.
.. seealso::
- `sqlite3.DatabaseErr... | # encoding: utf-8
"""
.. codeauthor:: Tsuyoshi Hombashi <tsuyoshi.hombashi@gmail.com>
"""
import sqlite3
class DatabaseError(sqlite3.DatabaseError):
"""
Exception raised for errors that are related to the database.
.. seealso::
- `sqlite3.DatabaseError <https://docs.python.org/3/library/sqlite3... | <commit_before># encoding: utf-8
"""
.. codeauthor:: Tsuyoshi Hombashi <tsuyoshi.hombashi@gmail.com>
"""
import sqlite3
class DatabaseError(sqlite3.DatabaseError):
"""
Exception raised for errors that are related to the database.
.. seealso::
- `sqlite3.DatabaseError <https://docs.python.org/3/... |
79ef50191123c6e8a2e5e47efb8b15239a7acc5c | readux/__init__.py | readux/__init__.py | from django.conf import settings
__version_info__ = (1, 2, 0, 'dev')
# Dot-connect all but the last. Last is dash-connected if not None.
__version__ = '.'.join([str(i) for i in __version_info__[:-1]])
if __version_info__[-1] is not None:
__version__ += ('-%s' % (__version_info__[-1],))
# context processor to a... | from django.conf import settings
__version_info__ = (1, 2, 0, 'dev')
# Dot-connect all but the last. Last is dash-connected if not None.
__version__ = '.'.join([str(i) for i in __version_info__[:-1]])
if __version_info__[-1] is not None:
__version__ += ('-%s' % (__version_info__[-1],))
# context processor to a... | Drop configured annotator store uri | Drop configured annotator store uri
| Python | apache-2.0 | emory-libraries/readux,emory-libraries/readux,emory-libraries/readux | from django.conf import settings
__version_info__ = (1, 2, 0, 'dev')
# Dot-connect all but the last. Last is dash-connected if not None.
__version__ = '.'.join([str(i) for i in __version_info__[:-1]])
if __version_info__[-1] is not None:
__version__ += ('-%s' % (__version_info__[-1],))
# context processor to a... | from django.conf import settings
__version_info__ = (1, 2, 0, 'dev')
# Dot-connect all but the last. Last is dash-connected if not None.
__version__ = '.'.join([str(i) for i in __version_info__[:-1]])
if __version_info__[-1] is not None:
__version__ += ('-%s' % (__version_info__[-1],))
# context processor to a... | <commit_before>from django.conf import settings
__version_info__ = (1, 2, 0, 'dev')
# Dot-connect all but the last. Last is dash-connected if not None.
__version__ = '.'.join([str(i) for i in __version_info__[:-1]])
if __version_info__[-1] is not None:
__version__ += ('-%s' % (__version_info__[-1],))
# context... | from django.conf import settings
__version_info__ = (1, 2, 0, 'dev')
# Dot-connect all but the last. Last is dash-connected if not None.
__version__ = '.'.join([str(i) for i in __version_info__[:-1]])
if __version_info__[-1] is not None:
__version__ += ('-%s' % (__version_info__[-1],))
# context processor to a... | from django.conf import settings
__version_info__ = (1, 2, 0, 'dev')
# Dot-connect all but the last. Last is dash-connected if not None.
__version__ = '.'.join([str(i) for i in __version_info__[:-1]])
if __version_info__[-1] is not None:
__version__ += ('-%s' % (__version_info__[-1],))
# context processor to a... | <commit_before>from django.conf import settings
__version_info__ = (1, 2, 0, 'dev')
# Dot-connect all but the last. Last is dash-connected if not None.
__version__ = '.'.join([str(i) for i in __version_info__[:-1]])
if __version_info__[-1] is not None:
__version__ += ('-%s' % (__version_info__[-1],))
# context... |
45f33dcf98b7b20fbedf3e05ca5c575ce3cbcbb3 | scripts/generate-invoice.py | scripts/generate-invoice.py | #!/usr/bin/env python3
import argparse
import yaml
import jinja2
import weasyprint
parser = argparse.ArgumentParser()
parser.add_argument('--data', help='path to data directory', required=True)
parser.add_argument('--number', help='Invoice number', type=int, required=True)
args = parser.parse_args()
data_directory =... | #!/usr/bin/env python3
import argparse
import yaml
import jinja2
import weasyprint
parser = argparse.ArgumentParser()
parser.add_argument('--data', help='path to data directory', required=True)
parser.add_argument('--number', help='Invoice number', type=int, required=True)
args = parser.parse_args()
data_directory =... | Move TODO items to GitHub issues | Move TODO items to GitHub issues
| Python | mit | pwaring/125-accounts,pwaring/125-accounts | #!/usr/bin/env python3
import argparse
import yaml
import jinja2
import weasyprint
parser = argparse.ArgumentParser()
parser.add_argument('--data', help='path to data directory', required=True)
parser.add_argument('--number', help='Invoice number', type=int, required=True)
args = parser.parse_args()
data_directory =... | #!/usr/bin/env python3
import argparse
import yaml
import jinja2
import weasyprint
parser = argparse.ArgumentParser()
parser.add_argument('--data', help='path to data directory', required=True)
parser.add_argument('--number', help='Invoice number', type=int, required=True)
args = parser.parse_args()
data_directory =... | <commit_before>#!/usr/bin/env python3
import argparse
import yaml
import jinja2
import weasyprint
parser = argparse.ArgumentParser()
parser.add_argument('--data', help='path to data directory', required=True)
parser.add_argument('--number', help='Invoice number', type=int, required=True)
args = parser.parse_args()
d... | #!/usr/bin/env python3
import argparse
import yaml
import jinja2
import weasyprint
parser = argparse.ArgumentParser()
parser.add_argument('--data', help='path to data directory', required=True)
parser.add_argument('--number', help='Invoice number', type=int, required=True)
args = parser.parse_args()
data_directory =... | #!/usr/bin/env python3
import argparse
import yaml
import jinja2
import weasyprint
parser = argparse.ArgumentParser()
parser.add_argument('--data', help='path to data directory', required=True)
parser.add_argument('--number', help='Invoice number', type=int, required=True)
args = parser.parse_args()
data_directory =... | <commit_before>#!/usr/bin/env python3
import argparse
import yaml
import jinja2
import weasyprint
parser = argparse.ArgumentParser()
parser.add_argument('--data', help='path to data directory', required=True)
parser.add_argument('--number', help='Invoice number', type=int, required=True)
args = parser.parse_args()
d... |
ad72c990051865d6c40cc0a0b3dbd1b514c5aa17 | plumbium/analysis_file.py | plumbium/analysis_file.py | from checksum import file_sha1sum
class AnalysisFile(object):
def __init__(self, filename):
self.filename = filename
def checksum(self):
return file_sha1sum(self.filename)
| from utils import file_sha1sum
class AnalysisFile(object):
def __init__(self, filename):
self.filename = filename
def checksum(self):
return file_sha1sum(self.filename)
| Fix defunct import of checksum module | Fix defunct import of checksum module
| Python | mit | jstutters/Plumbium | from checksum import file_sha1sum
class AnalysisFile(object):
def __init__(self, filename):
self.filename = filename
def checksum(self):
return file_sha1sum(self.filename)
Fix defunct import of checksum module | from utils import file_sha1sum
class AnalysisFile(object):
def __init__(self, filename):
self.filename = filename
def checksum(self):
return file_sha1sum(self.filename)
| <commit_before>from checksum import file_sha1sum
class AnalysisFile(object):
def __init__(self, filename):
self.filename = filename
def checksum(self):
return file_sha1sum(self.filename)
<commit_msg>Fix defunct import of checksum module<commit_after> | from utils import file_sha1sum
class AnalysisFile(object):
def __init__(self, filename):
self.filename = filename
def checksum(self):
return file_sha1sum(self.filename)
| from checksum import file_sha1sum
class AnalysisFile(object):
def __init__(self, filename):
self.filename = filename
def checksum(self):
return file_sha1sum(self.filename)
Fix defunct import of checksum modulefrom utils import file_sha1sum
class AnalysisFile(object):
def __init__(self, ... | <commit_before>from checksum import file_sha1sum
class AnalysisFile(object):
def __init__(self, filename):
self.filename = filename
def checksum(self):
return file_sha1sum(self.filename)
<commit_msg>Fix defunct import of checksum module<commit_after>from utils import file_sha1sum
class Anal... |
016c9e715350aa4a87a24cdb9d7e7ba0340589aa | login_token/models.py | login_token/models.py | import random
import re
from django.contrib.auth.models import User
from django.db import models
from instances.models import InstanceMixin
NUMBER_OF_TOKEN_WORDS = 3
def generate_token():
def useful_word(w):
# FIXME: should try to exclude offensive words
if len(w) < 4:
return False
... | import random
import re
from django.contrib.auth.models import User
from django.db import models
from instances.models import InstanceMixin
NUMBER_OF_TOKEN_WORDS = 3
def generate_token():
def useful_word(w):
# FIXME: should try to exclude offensive words
if len(w) < 4:
return False
... | Make generate_token the default token value | Make generate_token the default token value
| Python | agpl-3.0 | opencorato/sayit,opencorato/sayit,opencorato/sayit,opencorato/sayit | import random
import re
from django.contrib.auth.models import User
from django.db import models
from instances.models import InstanceMixin
NUMBER_OF_TOKEN_WORDS = 3
def generate_token():
def useful_word(w):
# FIXME: should try to exclude offensive words
if len(w) < 4:
return False
... | import random
import re
from django.contrib.auth.models import User
from django.db import models
from instances.models import InstanceMixin
NUMBER_OF_TOKEN_WORDS = 3
def generate_token():
def useful_word(w):
# FIXME: should try to exclude offensive words
if len(w) < 4:
return False
... | <commit_before>import random
import re
from django.contrib.auth.models import User
from django.db import models
from instances.models import InstanceMixin
NUMBER_OF_TOKEN_WORDS = 3
def generate_token():
def useful_word(w):
# FIXME: should try to exclude offensive words
if len(w) < 4:
... | import random
import re
from django.contrib.auth.models import User
from django.db import models
from instances.models import InstanceMixin
NUMBER_OF_TOKEN_WORDS = 3
def generate_token():
def useful_word(w):
# FIXME: should try to exclude offensive words
if len(w) < 4:
return False
... | import random
import re
from django.contrib.auth.models import User
from django.db import models
from instances.models import InstanceMixin
NUMBER_OF_TOKEN_WORDS = 3
def generate_token():
def useful_word(w):
# FIXME: should try to exclude offensive words
if len(w) < 4:
return False
... | <commit_before>import random
import re
from django.contrib.auth.models import User
from django.db import models
from instances.models import InstanceMixin
NUMBER_OF_TOKEN_WORDS = 3
def generate_token():
def useful_word(w):
# FIXME: should try to exclude offensive words
if len(w) < 4:
... |
68c048f625aa0158f0117a737d94000da193df40 | astral/models/event.py | astral/models/event.py | import Queue
from elixir import Field, Unicode, Entity
from astral.models.base import BaseEntityMixin
import logging
log = logging.getLogger(__name__)
EVENT_QUEUE = Queue.Queue()
class Event(BaseEntityMixin, Entity):
message = Field(Unicode(96))
def __init__(self, *args, **kwargs):
super(Event, s... | import Queue
from elixir import Field, Unicode, Entity
from astral.models.base import BaseEntityMixin
import logging
log = logging.getLogger(__name__)
EVENT_QUEUE = Queue.Queue()
class Event(BaseEntityMixin, Entity):
message = Field(Unicode(96))
def __init__(self, *args, **kwargs):
kwargs['messag... | Convert JSON to unicode before saving to clear up a SQLAlchemy warning. | Convert JSON to unicode before saving to clear up a SQLAlchemy warning.
| Python | mit | peplin/astral | import Queue
from elixir import Field, Unicode, Entity
from astral.models.base import BaseEntityMixin
import logging
log = logging.getLogger(__name__)
EVENT_QUEUE = Queue.Queue()
class Event(BaseEntityMixin, Entity):
message = Field(Unicode(96))
def __init__(self, *args, **kwargs):
super(Event, s... | import Queue
from elixir import Field, Unicode, Entity
from astral.models.base import BaseEntityMixin
import logging
log = logging.getLogger(__name__)
EVENT_QUEUE = Queue.Queue()
class Event(BaseEntityMixin, Entity):
message = Field(Unicode(96))
def __init__(self, *args, **kwargs):
kwargs['messag... | <commit_before>import Queue
from elixir import Field, Unicode, Entity
from astral.models.base import BaseEntityMixin
import logging
log = logging.getLogger(__name__)
EVENT_QUEUE = Queue.Queue()
class Event(BaseEntityMixin, Entity):
message = Field(Unicode(96))
def __init__(self, *args, **kwargs):
... | import Queue
from elixir import Field, Unicode, Entity
from astral.models.base import BaseEntityMixin
import logging
log = logging.getLogger(__name__)
EVENT_QUEUE = Queue.Queue()
class Event(BaseEntityMixin, Entity):
message = Field(Unicode(96))
def __init__(self, *args, **kwargs):
kwargs['messag... | import Queue
from elixir import Field, Unicode, Entity
from astral.models.base import BaseEntityMixin
import logging
log = logging.getLogger(__name__)
EVENT_QUEUE = Queue.Queue()
class Event(BaseEntityMixin, Entity):
message = Field(Unicode(96))
def __init__(self, *args, **kwargs):
super(Event, s... | <commit_before>import Queue
from elixir import Field, Unicode, Entity
from astral.models.base import BaseEntityMixin
import logging
log = logging.getLogger(__name__)
EVENT_QUEUE = Queue.Queue()
class Event(BaseEntityMixin, Entity):
message = Field(Unicode(96))
def __init__(self, *args, **kwargs):
... |
117c5f19df731dd56901023e4ed29db5741617b2 | tests/TestModel.py | tests/TestModel.py | #!/usr/bin/env python
import unittest
from PythonTemplate import Model
class TestModel(unittest.TestCase):
def setUp(self, use_auth=False):
# TODO
pass
def test_do_thing(self):
# do something
Model.doThing()
# evaluate something
# TODO
| #!/usr/bin/env python
import unittest
from PythonTemplate import Model
class TestModel(unittest.TestCase):
def setUp(self):
# TODO
pass
def test_do_thing(self):
# do something
Model.doThing()
# evaluate something
# TODO
| Remove hold over from copy n paste | Remove hold over from copy n paste | Python | apache-2.0 | joshvillbrandt/PythonTemplate | #!/usr/bin/env python
import unittest
from PythonTemplate import Model
class TestModel(unittest.TestCase):
def setUp(self, use_auth=False):
# TODO
pass
def test_do_thing(self):
# do something
Model.doThing()
# evaluate something
# TODO
Remove hold over from c... | #!/usr/bin/env python
import unittest
from PythonTemplate import Model
class TestModel(unittest.TestCase):
def setUp(self):
# TODO
pass
def test_do_thing(self):
# do something
Model.doThing()
# evaluate something
# TODO
| <commit_before>#!/usr/bin/env python
import unittest
from PythonTemplate import Model
class TestModel(unittest.TestCase):
def setUp(self, use_auth=False):
# TODO
pass
def test_do_thing(self):
# do something
Model.doThing()
# evaluate something
# TODO
<commit_... | #!/usr/bin/env python
import unittest
from PythonTemplate import Model
class TestModel(unittest.TestCase):
def setUp(self):
# TODO
pass
def test_do_thing(self):
# do something
Model.doThing()
# evaluate something
# TODO
| #!/usr/bin/env python
import unittest
from PythonTemplate import Model
class TestModel(unittest.TestCase):
def setUp(self, use_auth=False):
# TODO
pass
def test_do_thing(self):
# do something
Model.doThing()
# evaluate something
# TODO
Remove hold over from c... | <commit_before>#!/usr/bin/env python
import unittest
from PythonTemplate import Model
class TestModel(unittest.TestCase):
def setUp(self, use_auth=False):
# TODO
pass
def test_do_thing(self):
# do something
Model.doThing()
# evaluate something
# TODO
<commit_... |
f6c2f222db0f529d3f5906d5de7a7541e835ea77 | litecord/api/guilds.py | litecord/api/guilds.py | '''
guilds.py - All handlers under /guilds/*
'''
import json
import logging
from ..utils import _err, _json, strip_user_data
log = logging.getLogger(__name__)
class GuildsEndpoint:
def __init__(self, server):
self.server = server
async def h_post_guilds(self, request):
pass
| '''
guilds.py - All handlers under /guilds/*
'''
import json
import logging
from ..utils import _err, _json, strip_user_data
log = logging.getLogger(__name__)
class GuildsEndpoint:
def __init__(self, server):
self.server = server
async def h_post_guilds(self, request):
pass
async def h_... | Add some dummy routes in GuildsEndpoint | Add some dummy routes in GuildsEndpoint
| Python | mit | nullpixel/litecord,nullpixel/litecord | '''
guilds.py - All handlers under /guilds/*
'''
import json
import logging
from ..utils import _err, _json, strip_user_data
log = logging.getLogger(__name__)
class GuildsEndpoint:
def __init__(self, server):
self.server = server
async def h_post_guilds(self, request):
pass
Add some dummy ro... | '''
guilds.py - All handlers under /guilds/*
'''
import json
import logging
from ..utils import _err, _json, strip_user_data
log = logging.getLogger(__name__)
class GuildsEndpoint:
def __init__(self, server):
self.server = server
async def h_post_guilds(self, request):
pass
async def h_... | <commit_before>'''
guilds.py - All handlers under /guilds/*
'''
import json
import logging
from ..utils import _err, _json, strip_user_data
log = logging.getLogger(__name__)
class GuildsEndpoint:
def __init__(self, server):
self.server = server
async def h_post_guilds(self, request):
pass
<c... | '''
guilds.py - All handlers under /guilds/*
'''
import json
import logging
from ..utils import _err, _json, strip_user_data
log = logging.getLogger(__name__)
class GuildsEndpoint:
def __init__(self, server):
self.server = server
async def h_post_guilds(self, request):
pass
async def h_... | '''
guilds.py - All handlers under /guilds/*
'''
import json
import logging
from ..utils import _err, _json, strip_user_data
log = logging.getLogger(__name__)
class GuildsEndpoint:
def __init__(self, server):
self.server = server
async def h_post_guilds(self, request):
pass
Add some dummy ro... | <commit_before>'''
guilds.py - All handlers under /guilds/*
'''
import json
import logging
from ..utils import _err, _json, strip_user_data
log = logging.getLogger(__name__)
class GuildsEndpoint:
def __init__(self, server):
self.server = server
async def h_post_guilds(self, request):
pass
<c... |
e4e4db6c08612ba5b08224040d191eb83d27bf0d | scripts/prob_bedpe_to_bedgraph.py | scripts/prob_bedpe_to_bedgraph.py | #!/usr/bin/env python
import sys
import numpy as np
from optparse import OptionParser
parser = OptionParser()
parser.add_option("-b",
"--bedpe_file",
dest="bedpe_file",
help="BEDPE file")
parser.add_option("-n",
"--name",
default="LUMPY BedGraph",
dest="name",
help="Name")
(options, ar... | #!/usr/bin/env python
import sys
import numpy as np
from optparse import OptionParser
parser = OptionParser()
parser.add_option("-b",
"--bedpe_file",
dest="bedpe_file",
help="BEDPE file")
parser.add_option("-n",
"--name",
default="LUMPY BedGraph",
dest="name",
help="Name")
(options, ar... | Move fields for new output | Move fields for new output
| Python | mit | arq5x/lumpy-sv,glebkuznetsov/lumpy-sv,hall-lab/lumpy-sv,cc2qe/lumpy-sv,hall-lab/lumpy-sv,glebkuznetsov/lumpy-sv,arq5x/lumpy-sv,glebkuznetsov/lumpy-sv,arq5x/lumpy-sv,cc2qe/lumpy-sv,hall-lab/lumpy-sv,cc2qe/lumpy-sv,glebkuznetsov/lumpy-sv,glebkuznetsov/lumpy-sv,hall-lab/lumpy-sv,arq5x/lumpy-sv,cc2qe/lumpy-sv,arq5x/lumpy-s... | #!/usr/bin/env python
import sys
import numpy as np
from optparse import OptionParser
parser = OptionParser()
parser.add_option("-b",
"--bedpe_file",
dest="bedpe_file",
help="BEDPE file")
parser.add_option("-n",
"--name",
default="LUMPY BedGraph",
dest="name",
help="Name")
(options, ar... | #!/usr/bin/env python
import sys
import numpy as np
from optparse import OptionParser
parser = OptionParser()
parser.add_option("-b",
"--bedpe_file",
dest="bedpe_file",
help="BEDPE file")
parser.add_option("-n",
"--name",
default="LUMPY BedGraph",
dest="name",
help="Name")
(options, ar... | <commit_before>#!/usr/bin/env python
import sys
import numpy as np
from optparse import OptionParser
parser = OptionParser()
parser.add_option("-b",
"--bedpe_file",
dest="bedpe_file",
help="BEDPE file")
parser.add_option("-n",
"--name",
default="LUMPY BedGraph",
dest="name",
help="Name")... | #!/usr/bin/env python
import sys
import numpy as np
from optparse import OptionParser
parser = OptionParser()
parser.add_option("-b",
"--bedpe_file",
dest="bedpe_file",
help="BEDPE file")
parser.add_option("-n",
"--name",
default="LUMPY BedGraph",
dest="name",
help="Name")
(options, ar... | #!/usr/bin/env python
import sys
import numpy as np
from optparse import OptionParser
parser = OptionParser()
parser.add_option("-b",
"--bedpe_file",
dest="bedpe_file",
help="BEDPE file")
parser.add_option("-n",
"--name",
default="LUMPY BedGraph",
dest="name",
help="Name")
(options, ar... | <commit_before>#!/usr/bin/env python
import sys
import numpy as np
from optparse import OptionParser
parser = OptionParser()
parser.add_option("-b",
"--bedpe_file",
dest="bedpe_file",
help="BEDPE file")
parser.add_option("-n",
"--name",
default="LUMPY BedGraph",
dest="name",
help="Name")... |
8de10efd931e397af9c6b4c405a58af27940608a | lwr/lwr_client/util.py | lwr/lwr_client/util.py | from threading import Lock, Event
class TransferEventManager(object):
def __init__(self):
self.events = dict()
self.events_lock = Lock()
def acquire_event(self, path, force_clear=False):
with self.events_lock:
if path in self.events:
event_holder = self.ev... | from threading import Lock, Event
from weakref import WeakValueDictionary
class TransferEventManager(object):
def __init__(self):
self.events = WeakValueDictionary(dict())
self.events_lock = Lock()
def acquire_event(self, path, force_clear=False):
with self.events_lock:
i... | Fix logic related to GC of Event references using weakref.WeakValueDictionary. | Fix logic related to GC of Event references using weakref.WeakValueDictionary.
| Python | apache-2.0 | galaxyproject/pulsar,galaxyproject/pulsar,jmchilton/pulsar,jmchilton/lwr,ssorgatem/pulsar,natefoo/pulsar,ssorgatem/pulsar,natefoo/pulsar,jmchilton/lwr,jmchilton/pulsar | from threading import Lock, Event
class TransferEventManager(object):
def __init__(self):
self.events = dict()
self.events_lock = Lock()
def acquire_event(self, path, force_clear=False):
with self.events_lock:
if path in self.events:
event_holder = self.ev... | from threading import Lock, Event
from weakref import WeakValueDictionary
class TransferEventManager(object):
def __init__(self):
self.events = WeakValueDictionary(dict())
self.events_lock = Lock()
def acquire_event(self, path, force_clear=False):
with self.events_lock:
i... | <commit_before>from threading import Lock, Event
class TransferEventManager(object):
def __init__(self):
self.events = dict()
self.events_lock = Lock()
def acquire_event(self, path, force_clear=False):
with self.events_lock:
if path in self.events:
event_h... | from threading import Lock, Event
from weakref import WeakValueDictionary
class TransferEventManager(object):
def __init__(self):
self.events = WeakValueDictionary(dict())
self.events_lock = Lock()
def acquire_event(self, path, force_clear=False):
with self.events_lock:
i... | from threading import Lock, Event
class TransferEventManager(object):
def __init__(self):
self.events = dict()
self.events_lock = Lock()
def acquire_event(self, path, force_clear=False):
with self.events_lock:
if path in self.events:
event_holder = self.ev... | <commit_before>from threading import Lock, Event
class TransferEventManager(object):
def __init__(self):
self.events = dict()
self.events_lock = Lock()
def acquire_event(self, path, force_clear=False):
with self.events_lock:
if path in self.events:
event_h... |
90a8a55b4607e88e7e73f849250b4230185a18fd | integration-test/843-normalize-underscore.py | integration-test/843-normalize-underscore.py | # http://www.openstreetmap.org/way/219071307
assert_has_feature(
16, 10478, 25338, 'roads',
{ 'id': 219071307, 'kind': 'minor_road', 'service': 'drive_through' })
# http://www.openstreetmap.org/way/258020271
assert_has_feature(
16, 11077, 25458, 'roads',
{ 'id': 258020271, 'kind': 'aerialway', 'kind_de... | # http://www.openstreetmap.org/way/219071307
assert_has_feature(
16, 10478, 25338, 'roads',
{ 'id': 219071307, 'kind': 'minor_road', 'service': 'drive_through' })
# http://www.openstreetmap.org/way/258020271
assert_has_feature(
16, 11077, 25458, 'roads',
{ 'id': 258020271, 'kind': 'aerialway', 'kind_de... | Change test case item, as the previous one had been updated and fixed. | Change test case item, as the previous one had been updated and fixed.
| Python | mit | mapzen/vector-datasource,mapzen/vector-datasource,mapzen/vector-datasource | # http://www.openstreetmap.org/way/219071307
assert_has_feature(
16, 10478, 25338, 'roads',
{ 'id': 219071307, 'kind': 'minor_road', 'service': 'drive_through' })
# http://www.openstreetmap.org/way/258020271
assert_has_feature(
16, 11077, 25458, 'roads',
{ 'id': 258020271, 'kind': 'aerialway', 'kind_de... | # http://www.openstreetmap.org/way/219071307
assert_has_feature(
16, 10478, 25338, 'roads',
{ 'id': 219071307, 'kind': 'minor_road', 'service': 'drive_through' })
# http://www.openstreetmap.org/way/258020271
assert_has_feature(
16, 11077, 25458, 'roads',
{ 'id': 258020271, 'kind': 'aerialway', 'kind_de... | <commit_before># http://www.openstreetmap.org/way/219071307
assert_has_feature(
16, 10478, 25338, 'roads',
{ 'id': 219071307, 'kind': 'minor_road', 'service': 'drive_through' })
# http://www.openstreetmap.org/way/258020271
assert_has_feature(
16, 11077, 25458, 'roads',
{ 'id': 258020271, 'kind': 'aeria... | # http://www.openstreetmap.org/way/219071307
assert_has_feature(
16, 10478, 25338, 'roads',
{ 'id': 219071307, 'kind': 'minor_road', 'service': 'drive_through' })
# http://www.openstreetmap.org/way/258020271
assert_has_feature(
16, 11077, 25458, 'roads',
{ 'id': 258020271, 'kind': 'aerialway', 'kind_de... | # http://www.openstreetmap.org/way/219071307
assert_has_feature(
16, 10478, 25338, 'roads',
{ 'id': 219071307, 'kind': 'minor_road', 'service': 'drive_through' })
# http://www.openstreetmap.org/way/258020271
assert_has_feature(
16, 11077, 25458, 'roads',
{ 'id': 258020271, 'kind': 'aerialway', 'kind_de... | <commit_before># http://www.openstreetmap.org/way/219071307
assert_has_feature(
16, 10478, 25338, 'roads',
{ 'id': 219071307, 'kind': 'minor_road', 'service': 'drive_through' })
# http://www.openstreetmap.org/way/258020271
assert_has_feature(
16, 11077, 25458, 'roads',
{ 'id': 258020271, 'kind': 'aeria... |
e11d201c415eb86137194d93ac1fca7c20123ae9 | runtests.py | runtests.py | #!/usr/bin/env python
import sys
from django.conf import settings
if not settings.configured:
settings.configure(
DATABASES={
'default': {
'ENGINE': 'django.db.backends.sqlite3',
'NAME': ':memory:',
}
},
INSTALLED_APPS=(
... | #!/usr/bin/env python
import sys
from django.conf import settings
if not settings.configured:
settings.configure(
DATABASES={
'default': {
'ENGINE': 'django.db.backends.sqlite3',
'NAME': ':memory:',
}
},
INSTALLED_APPS=(
... | Add explicit setup for Django 1.7 | Add explicit setup for Django 1.7
| Python | bsd-3-clause | caktus/django-dry-choices | #!/usr/bin/env python
import sys
from django.conf import settings
if not settings.configured:
settings.configure(
DATABASES={
'default': {
'ENGINE': 'django.db.backends.sqlite3',
'NAME': ':memory:',
}
},
INSTALLED_APPS=(
... | #!/usr/bin/env python
import sys
from django.conf import settings
if not settings.configured:
settings.configure(
DATABASES={
'default': {
'ENGINE': 'django.db.backends.sqlite3',
'NAME': ':memory:',
}
},
INSTALLED_APPS=(
... | <commit_before>#!/usr/bin/env python
import sys
from django.conf import settings
if not settings.configured:
settings.configure(
DATABASES={
'default': {
'ENGINE': 'django.db.backends.sqlite3',
'NAME': ':memory:',
}
},
INSTALLED_APPS... | #!/usr/bin/env python
import sys
from django.conf import settings
if not settings.configured:
settings.configure(
DATABASES={
'default': {
'ENGINE': 'django.db.backends.sqlite3',
'NAME': ':memory:',
}
},
INSTALLED_APPS=(
... | #!/usr/bin/env python
import sys
from django.conf import settings
if not settings.configured:
settings.configure(
DATABASES={
'default': {
'ENGINE': 'django.db.backends.sqlite3',
'NAME': ':memory:',
}
},
INSTALLED_APPS=(
... | <commit_before>#!/usr/bin/env python
import sys
from django.conf import settings
if not settings.configured:
settings.configure(
DATABASES={
'default': {
'ENGINE': 'django.db.backends.sqlite3',
'NAME': ':memory:',
}
},
INSTALLED_APPS... |
d1ee3578cd948c28e72bda3fbd06193be5033196 | ractivate/utils/client.py | ractivate/utils/client.py | #
# Copyright (c) 2010 rPath, Inc.
#
# This program is distributed under the terms of the Common Public License,
# version 1.0. A copy of this license should have been distributed with this
# source file in a file called LICENSE. If it is not present, the license
# is always available at http://www.rpath.com/permanent/... | #
# Copyright (c) 2010 rPath, Inc.
#
# This program is distributed under the terms of the Common Public License,
# version 1.0. A copy of this license should have been distributed with this
# source file in a file called LICENSE. If it is not present, the license
# is always available at http://www.rpath.com/permanent/... | Make ActivationClient look for correct return code | Make ActivationClient look for correct return code
| Python | apache-2.0 | sassoftware/rpath-tools,sassoftware/rpath-tools | #
# Copyright (c) 2010 rPath, Inc.
#
# This program is distributed under the terms of the Common Public License,
# version 1.0. A copy of this license should have been distributed with this
# source file in a file called LICENSE. If it is not present, the license
# is always available at http://www.rpath.com/permanent/... | #
# Copyright (c) 2010 rPath, Inc.
#
# This program is distributed under the terms of the Common Public License,
# version 1.0. A copy of this license should have been distributed with this
# source file in a file called LICENSE. If it is not present, the license
# is always available at http://www.rpath.com/permanent/... | <commit_before>#
# Copyright (c) 2010 rPath, Inc.
#
# This program is distributed under the terms of the Common Public License,
# version 1.0. A copy of this license should have been distributed with this
# source file in a file called LICENSE. If it is not present, the license
# is always available at http://www.rpath... | #
# Copyright (c) 2010 rPath, Inc.
#
# This program is distributed under the terms of the Common Public License,
# version 1.0. A copy of this license should have been distributed with this
# source file in a file called LICENSE. If it is not present, the license
# is always available at http://www.rpath.com/permanent/... | #
# Copyright (c) 2010 rPath, Inc.
#
# This program is distributed under the terms of the Common Public License,
# version 1.0. A copy of this license should have been distributed with this
# source file in a file called LICENSE. If it is not present, the license
# is always available at http://www.rpath.com/permanent/... | <commit_before>#
# Copyright (c) 2010 rPath, Inc.
#
# This program is distributed under the terms of the Common Public License,
# version 1.0. A copy of this license should have been distributed with this
# source file in a file called LICENSE. If it is not present, the license
# is always available at http://www.rpath... |
669b9c07ebca1d80778da950fc145c8cf0c6df65 | skdata/__init__.py | skdata/__init__.py | try:
# during the installation process this can raise an exception.
from .data import SkData
except:
pass
__author__ = 'Ivan Ogasawara'
__email__ = 'ivan.ogasawara@gmail.com'
__version__ = '0.1.2'
| try:
# during the installation process this can raise an exception.
from .data import SkData
except:
pass
__author__ = 'Ivan Ogasawara'
__email__ = 'ivan.ogasawara@gmail.com'
__version__ = '0.1.3'
| Change pkg version to 0.1.3 | Change pkg version to 0.1.3
| Python | mit | xmnlab/skdata,OpenDataScienceLab/skdata | try:
# during the installation process this can raise an exception.
from .data import SkData
except:
pass
__author__ = 'Ivan Ogasawara'
__email__ = 'ivan.ogasawara@gmail.com'
__version__ = '0.1.2'
Change pkg version to 0.1.3 | try:
# during the installation process this can raise an exception.
from .data import SkData
except:
pass
__author__ = 'Ivan Ogasawara'
__email__ = 'ivan.ogasawara@gmail.com'
__version__ = '0.1.3'
| <commit_before>try:
# during the installation process this can raise an exception.
from .data import SkData
except:
pass
__author__ = 'Ivan Ogasawara'
__email__ = 'ivan.ogasawara@gmail.com'
__version__ = '0.1.2'
<commit_msg>Change pkg version to 0.1.3<commit_after> | try:
# during the installation process this can raise an exception.
from .data import SkData
except:
pass
__author__ = 'Ivan Ogasawara'
__email__ = 'ivan.ogasawara@gmail.com'
__version__ = '0.1.3'
| try:
# during the installation process this can raise an exception.
from .data import SkData
except:
pass
__author__ = 'Ivan Ogasawara'
__email__ = 'ivan.ogasawara@gmail.com'
__version__ = '0.1.2'
Change pkg version to 0.1.3try:
# during the installation process this can raise an exception.
from .... | <commit_before>try:
# during the installation process this can raise an exception.
from .data import SkData
except:
pass
__author__ = 'Ivan Ogasawara'
__email__ = 'ivan.ogasawara@gmail.com'
__version__ = '0.1.2'
<commit_msg>Change pkg version to 0.1.3<commit_after>try:
# during the installation proces... |
3622a0354bc57d32c8b2e714c6b5f8533fa8f6d7 | parsl/tests/configs/local_threads_globus.py | parsl/tests/configs/local_threads_globus.py | from parsl.config import Config
from parsl.data_provider.scheme import GlobusScheme
from parsl.executors.threads import ThreadPoolExecutor
from parsl.tests.utils import get_rundir
# If you are a developer running tests, make sure to update parsl/tests/configs/user_opts.py
# If you are a user copying-and-pasting this a... | from parsl.config import Config
from parsl.data_provider.scheme import GlobusScheme
from parsl.executors.threads import ThreadPoolExecutor
from parsl.tests.utils import get_rundir
# If you are a developer running tests, make sure to update parsl/tests/configs/user_opts.py
# If you are a user copying-and-pasting this a... | Fix storage_access in the test config | Fix storage_access in the test config
| Python | apache-2.0 | swift-lang/swift-e-lab,Parsl/parsl,Parsl/parsl,Parsl/parsl,swift-lang/swift-e-lab,Parsl/parsl | from parsl.config import Config
from parsl.data_provider.scheme import GlobusScheme
from parsl.executors.threads import ThreadPoolExecutor
from parsl.tests.utils import get_rundir
# If you are a developer running tests, make sure to update parsl/tests/configs/user_opts.py
# If you are a user copying-and-pasting this a... | from parsl.config import Config
from parsl.data_provider.scheme import GlobusScheme
from parsl.executors.threads import ThreadPoolExecutor
from parsl.tests.utils import get_rundir
# If you are a developer running tests, make sure to update parsl/tests/configs/user_opts.py
# If you are a user copying-and-pasting this a... | <commit_before>from parsl.config import Config
from parsl.data_provider.scheme import GlobusScheme
from parsl.executors.threads import ThreadPoolExecutor
from parsl.tests.utils import get_rundir
# If you are a developer running tests, make sure to update parsl/tests/configs/user_opts.py
# If you are a user copying-and... | from parsl.config import Config
from parsl.data_provider.scheme import GlobusScheme
from parsl.executors.threads import ThreadPoolExecutor
from parsl.tests.utils import get_rundir
# If you are a developer running tests, make sure to update parsl/tests/configs/user_opts.py
# If you are a user copying-and-pasting this a... | from parsl.config import Config
from parsl.data_provider.scheme import GlobusScheme
from parsl.executors.threads import ThreadPoolExecutor
from parsl.tests.utils import get_rundir
# If you are a developer running tests, make sure to update parsl/tests/configs/user_opts.py
# If you are a user copying-and-pasting this a... | <commit_before>from parsl.config import Config
from parsl.data_provider.scheme import GlobusScheme
from parsl.executors.threads import ThreadPoolExecutor
from parsl.tests.utils import get_rundir
# If you are a developer running tests, make sure to update parsl/tests/configs/user_opts.py
# If you are a user copying-and... |
1dc4546aa95d3adfff910430afe922bf137bf595 | test/testlib/schema.py | test/testlib/schema.py | import testbase
schema = None
__all__ = 'Table', 'Column',
table_options = {}
def Table(*args, **kw):
"""A schema.Table wrapper/hook for dialect-specific tweaks."""
global schema
if schema is None:
from sqlalchemy import schema
test_opts = dict([(k,kw.pop(k)) for k in kw.keys()
... | import testbase
from testlib import testing
schema = None
__all__ = 'Table', 'Column',
table_options = {}
def Table(*args, **kw):
"""A schema.Table wrapper/hook for dialect-specific tweaks."""
global schema
if schema is None:
from sqlalchemy import schema
test_opts = dict([(k,kw.pop(k)) for... | Apply default cascade rules for firebird self-ref ForeignKeys. | Apply default cascade rules for firebird self-ref ForeignKeys.
| Python | mit | graingert/sqlalchemy,alex/sqlalchemy,WinterNis/sqlalchemy,elelianghh/sqlalchemy,bdupharm/sqlalchemy,sandan/sqlalchemy,monetate/sqlalchemy,olemis/sqlalchemy,wujuguang/sqlalchemy,ThiefMaster/sqlalchemy,brianv0/sqlalchemy,j5int/sqlalchemy,wfxiang08/sqlalchemy,wujuguang/sqlalchemy,sqlalchemy/sqlalchemy,ThiefMaster/sqlalche... | import testbase
schema = None
__all__ = 'Table', 'Column',
table_options = {}
def Table(*args, **kw):
"""A schema.Table wrapper/hook for dialect-specific tweaks."""
global schema
if schema is None:
from sqlalchemy import schema
test_opts = dict([(k,kw.pop(k)) for k in kw.keys()
... | import testbase
from testlib import testing
schema = None
__all__ = 'Table', 'Column',
table_options = {}
def Table(*args, **kw):
"""A schema.Table wrapper/hook for dialect-specific tweaks."""
global schema
if schema is None:
from sqlalchemy import schema
test_opts = dict([(k,kw.pop(k)) for... | <commit_before>import testbase
schema = None
__all__ = 'Table', 'Column',
table_options = {}
def Table(*args, **kw):
"""A schema.Table wrapper/hook for dialect-specific tweaks."""
global schema
if schema is None:
from sqlalchemy import schema
test_opts = dict([(k,kw.pop(k)) for k in... | import testbase
from testlib import testing
schema = None
__all__ = 'Table', 'Column',
table_options = {}
def Table(*args, **kw):
"""A schema.Table wrapper/hook for dialect-specific tweaks."""
global schema
if schema is None:
from sqlalchemy import schema
test_opts = dict([(k,kw.pop(k)) for... | import testbase
schema = None
__all__ = 'Table', 'Column',
table_options = {}
def Table(*args, **kw):
"""A schema.Table wrapper/hook for dialect-specific tweaks."""
global schema
if schema is None:
from sqlalchemy import schema
test_opts = dict([(k,kw.pop(k)) for k in kw.keys()
... | <commit_before>import testbase
schema = None
__all__ = 'Table', 'Column',
table_options = {}
def Table(*args, **kw):
"""A schema.Table wrapper/hook for dialect-specific tweaks."""
global schema
if schema is None:
from sqlalchemy import schema
test_opts = dict([(k,kw.pop(k)) for k in... |
c69da19e8316b1e1c6f55d3571917e85ba4fbf8d | src/member/admin.py | src/member/admin.py | from django.contrib import admin
from member.models import (Member, Client, Contact, Address,
Referencing, Route, Client_avoid_component,
Client_avoid_ingredient, Option,
Client_option, Restriction)
admin.site.register(Member)
admin.site.... | from django.contrib import admin
from member.models import (Member, Client, Contact, Address,
Referencing, Route, Client_avoid_component,
Client_avoid_ingredient, Option,
Client_option, Restriction)
from meal.models import Ingredient
cl... | Add ingredients to avoid as a TabularInline to Client | Add ingredients to avoid as a TabularInline to Client
Do not edit the ingredients to avoid directly, edit them through
a tabular form from the client form
| Python | agpl-3.0 | savoirfairelinux/santropol-feast,madmath/sous-chef,savoirfairelinux/santropol-feast,savoirfairelinux/sous-chef,savoirfairelinux/sous-chef,savoirfairelinux/sous-chef,savoirfairelinux/santropol-feast,madmath/sous-chef,madmath/sous-chef | from django.contrib import admin
from member.models import (Member, Client, Contact, Address,
Referencing, Route, Client_avoid_component,
Client_avoid_ingredient, Option,
Client_option, Restriction)
admin.site.register(Member)
admin.site.... | from django.contrib import admin
from member.models import (Member, Client, Contact, Address,
Referencing, Route, Client_avoid_component,
Client_avoid_ingredient, Option,
Client_option, Restriction)
from meal.models import Ingredient
cl... | <commit_before>from django.contrib import admin
from member.models import (Member, Client, Contact, Address,
Referencing, Route, Client_avoid_component,
Client_avoid_ingredient, Option,
Client_option, Restriction)
admin.site.register(Memb... | from django.contrib import admin
from member.models import (Member, Client, Contact, Address,
Referencing, Route, Client_avoid_component,
Client_avoid_ingredient, Option,
Client_option, Restriction)
from meal.models import Ingredient
cl... | from django.contrib import admin
from member.models import (Member, Client, Contact, Address,
Referencing, Route, Client_avoid_component,
Client_avoid_ingredient, Option,
Client_option, Restriction)
admin.site.register(Member)
admin.site.... | <commit_before>from django.contrib import admin
from member.models import (Member, Client, Contact, Address,
Referencing, Route, Client_avoid_component,
Client_avoid_ingredient, Option,
Client_option, Restriction)
admin.site.register(Memb... |
83c12d598221aac8e7173fb7d78083bc1c5ab64b | tests/test_commands.py | tests/test_commands.py | import unittest
from cobe.commands import LearnIrcLogCommand
class testIrcLogParsing(unittest.TestCase):
def setUp(self):
self.command = LearnIrcLogCommand()
def testNonPubmsg(self):
msg = "this is some non-pubmsg text found in a log"
cmd = self.command
self.assertEqual(None,... | import unittest
from cobe.commands import LearnIrcLogCommand
class testIrcLogParsing(unittest.TestCase):
def setUp(self):
self.command = LearnIrcLogCommand()
def testNonPubmsg(self):
msg = "this is some non-pubmsg text found in a log"
cmd = self.command
self.assertEqual(None,... | Add a unit test for ignored nicks in _parse_irc_message | Add a unit test for ignored nicks in _parse_irc_message
| Python | mit | pteichman/cobe,wodim/cobe-ng,wodim/cobe-ng,DarkMio/cobe,tiagochiavericosta/cobe,meska/cobe,LeMagnesium/cobe,LeMagnesium/cobe,DarkMio/cobe,meska/cobe,tiagochiavericosta/cobe,pteichman/cobe | import unittest
from cobe.commands import LearnIrcLogCommand
class testIrcLogParsing(unittest.TestCase):
def setUp(self):
self.command = LearnIrcLogCommand()
def testNonPubmsg(self):
msg = "this is some non-pubmsg text found in a log"
cmd = self.command
self.assertEqual(None,... | import unittest
from cobe.commands import LearnIrcLogCommand
class testIrcLogParsing(unittest.TestCase):
def setUp(self):
self.command = LearnIrcLogCommand()
def testNonPubmsg(self):
msg = "this is some non-pubmsg text found in a log"
cmd = self.command
self.assertEqual(None,... | <commit_before>import unittest
from cobe.commands import LearnIrcLogCommand
class testIrcLogParsing(unittest.TestCase):
def setUp(self):
self.command = LearnIrcLogCommand()
def testNonPubmsg(self):
msg = "this is some non-pubmsg text found in a log"
cmd = self.command
self.as... | import unittest
from cobe.commands import LearnIrcLogCommand
class testIrcLogParsing(unittest.TestCase):
def setUp(self):
self.command = LearnIrcLogCommand()
def testNonPubmsg(self):
msg = "this is some non-pubmsg text found in a log"
cmd = self.command
self.assertEqual(None,... | import unittest
from cobe.commands import LearnIrcLogCommand
class testIrcLogParsing(unittest.TestCase):
def setUp(self):
self.command = LearnIrcLogCommand()
def testNonPubmsg(self):
msg = "this is some non-pubmsg text found in a log"
cmd = self.command
self.assertEqual(None,... | <commit_before>import unittest
from cobe.commands import LearnIrcLogCommand
class testIrcLogParsing(unittest.TestCase):
def setUp(self):
self.command = LearnIrcLogCommand()
def testNonPubmsg(self):
msg = "this is some non-pubmsg text found in a log"
cmd = self.command
self.as... |
3760005cec3174b14d3f0ee20327e1b8de9ce800 | ffflash/lib/container.py | ffflash/lib/container.py | from os import path
from ffflash import RELEASE, log, now, timeout
from ffflash.lib.clock import epoch_repr
from ffflash.lib.data import merge_dicts
from ffflash.lib.files import read_json_file, write_json_file
class Container:
def __init__(self, spec, filename):
self._spec = spec
self._location ... | from os import path
from ffflash import RELEASE, log, now, timeout
from ffflash.lib.clock import epoch_repr
from ffflash.lib.data import Element
from ffflash.lib.files import read_json_file, write_json_file
class Container:
def __init__(self, spec, filename):
self._spec = spec
self._location = pa... | Rewrite Container to dump/load two Elements (data,_info) into json file | Rewrite Container to dump/load two Elements (data,_info) into json file
| Python | bsd-3-clause | spookey/ffflash,spookey/ffflash | from os import path
from ffflash import RELEASE, log, now, timeout
from ffflash.lib.clock import epoch_repr
from ffflash.lib.data import merge_dicts
from ffflash.lib.files import read_json_file, write_json_file
class Container:
def __init__(self, spec, filename):
self._spec = spec
self._location ... | from os import path
from ffflash import RELEASE, log, now, timeout
from ffflash.lib.clock import epoch_repr
from ffflash.lib.data import Element
from ffflash.lib.files import read_json_file, write_json_file
class Container:
def __init__(self, spec, filename):
self._spec = spec
self._location = pa... | <commit_before>from os import path
from ffflash import RELEASE, log, now, timeout
from ffflash.lib.clock import epoch_repr
from ffflash.lib.data import merge_dicts
from ffflash.lib.files import read_json_file, write_json_file
class Container:
def __init__(self, spec, filename):
self._spec = spec
... | from os import path
from ffflash import RELEASE, log, now, timeout
from ffflash.lib.clock import epoch_repr
from ffflash.lib.data import Element
from ffflash.lib.files import read_json_file, write_json_file
class Container:
def __init__(self, spec, filename):
self._spec = spec
self._location = pa... | from os import path
from ffflash import RELEASE, log, now, timeout
from ffflash.lib.clock import epoch_repr
from ffflash.lib.data import merge_dicts
from ffflash.lib.files import read_json_file, write_json_file
class Container:
def __init__(self, spec, filename):
self._spec = spec
self._location ... | <commit_before>from os import path
from ffflash import RELEASE, log, now, timeout
from ffflash.lib.clock import epoch_repr
from ffflash.lib.data import merge_dicts
from ffflash.lib.files import read_json_file, write_json_file
class Container:
def __init__(self, spec, filename):
self._spec = spec
... |
a594c5154ca35590f2b793b89fc12e77d6b01537 | accounts/management/commands/clean_expired.py | accounts/management/commands/clean_expired.py | # coding=utf-8
from django.core.management.base import BaseCommand
from registration.models import RegistrationProfile
class Command(BaseCommand):
help = 'Cleanup expired registrations'
OPT_SIMULATE = 'dry-run'
def add_arguments(self, parser):
parser.add_argument(''.join(['--', self.OPT_SIMULAT... | # coding=utf-8
from django.core.management.base import BaseCommand
from registration.models import RegistrationProfile
class Command(BaseCommand):
help = 'Cleanup expired registrations'
OPT_SIMULATE = 'dry-run'
def add_arguments(self, parser):
parser.add_argument(''.join(['--', self.OPT_SIMULAT... | Make cleanup command less verbose | Make cleanup command less verbose
| Python | agpl-3.0 | volunteer-planner/volunteer_planner,volunteer-planner/volunteer_planner,coders4help/volunteer_planner,pitpalme/volunteer_planner,klinger/volunteer_planner,volunteer-planner/volunteer_planner,christophmeissner/volunteer_planner,volunteer-planner/volunteer_planner,klinger/volunteer_planner,klinger/volunteer_planner,pitpa... | # coding=utf-8
from django.core.management.base import BaseCommand
from registration.models import RegistrationProfile
class Command(BaseCommand):
help = 'Cleanup expired registrations'
OPT_SIMULATE = 'dry-run'
def add_arguments(self, parser):
parser.add_argument(''.join(['--', self.OPT_SIMULAT... | # coding=utf-8
from django.core.management.base import BaseCommand
from registration.models import RegistrationProfile
class Command(BaseCommand):
help = 'Cleanup expired registrations'
OPT_SIMULATE = 'dry-run'
def add_arguments(self, parser):
parser.add_argument(''.join(['--', self.OPT_SIMULAT... | <commit_before># coding=utf-8
from django.core.management.base import BaseCommand
from registration.models import RegistrationProfile
class Command(BaseCommand):
help = 'Cleanup expired registrations'
OPT_SIMULATE = 'dry-run'
def add_arguments(self, parser):
parser.add_argument(''.join(['--', s... | # coding=utf-8
from django.core.management.base import BaseCommand
from registration.models import RegistrationProfile
class Command(BaseCommand):
help = 'Cleanup expired registrations'
OPT_SIMULATE = 'dry-run'
def add_arguments(self, parser):
parser.add_argument(''.join(['--', self.OPT_SIMULAT... | # coding=utf-8
from django.core.management.base import BaseCommand
from registration.models import RegistrationProfile
class Command(BaseCommand):
help = 'Cleanup expired registrations'
OPT_SIMULATE = 'dry-run'
def add_arguments(self, parser):
parser.add_argument(''.join(['--', self.OPT_SIMULAT... | <commit_before># coding=utf-8
from django.core.management.base import BaseCommand
from registration.models import RegistrationProfile
class Command(BaseCommand):
help = 'Cleanup expired registrations'
OPT_SIMULATE = 'dry-run'
def add_arguments(self, parser):
parser.add_argument(''.join(['--', s... |
1636757f52a553c99fb40059f4461e97485d2199 | fits/make_fit_feedmes.py | fits/make_fit_feedmes.py | #!/usr/bin/env python
from glob import glob
import os
import re
def make_feedmes():
# Used to convert all the fit*.galfit files to fit*.diff
ids = glob('*/')
for id in ids:
os.chdir(id)
feedmes = glob('fit*diff')
# output starting models
for f in feedmes:
templa... | #!/usr/bin/env python
from glob import glob
import os
import re
def make_feedmes():
# Used to convert all the fit*.galfit files to fit*.diff
ids = glob('*/')
for id in ids:
feedmes = glob(id+'fit*diff')
# output starting models
for f in feedmes:
template = r'.*fit(.*)(\... | Fix to work with new patch | Fix to work with new patch
| Python | mit | MegaMorph/galfitm-illustrations,MegaMorph/galfitm-illustrations | #!/usr/bin/env python
from glob import glob
import os
import re
def make_feedmes():
# Used to convert all the fit*.galfit files to fit*.diff
ids = glob('*/')
for id in ids:
os.chdir(id)
feedmes = glob('fit*diff')
# output starting models
for f in feedmes:
templa... | #!/usr/bin/env python
from glob import glob
import os
import re
def make_feedmes():
# Used to convert all the fit*.galfit files to fit*.diff
ids = glob('*/')
for id in ids:
feedmes = glob(id+'fit*diff')
# output starting models
for f in feedmes:
template = r'.*fit(.*)(\... | <commit_before>#!/usr/bin/env python
from glob import glob
import os
import re
def make_feedmes():
# Used to convert all the fit*.galfit files to fit*.diff
ids = glob('*/')
for id in ids:
os.chdir(id)
feedmes = glob('fit*diff')
# output starting models
for f in feedmes:
... | #!/usr/bin/env python
from glob import glob
import os
import re
def make_feedmes():
# Used to convert all the fit*.galfit files to fit*.diff
ids = glob('*/')
for id in ids:
feedmes = glob(id+'fit*diff')
# output starting models
for f in feedmes:
template = r'.*fit(.*)(\... | #!/usr/bin/env python
from glob import glob
import os
import re
def make_feedmes():
# Used to convert all the fit*.galfit files to fit*.diff
ids = glob('*/')
for id in ids:
os.chdir(id)
feedmes = glob('fit*diff')
# output starting models
for f in feedmes:
templa... | <commit_before>#!/usr/bin/env python
from glob import glob
import os
import re
def make_feedmes():
# Used to convert all the fit*.galfit files to fit*.diff
ids = glob('*/')
for id in ids:
os.chdir(id)
feedmes = glob('fit*diff')
# output starting models
for f in feedmes:
... |
07f409bb6b8d008cf473aeb33fd0833dccfba402 | mm1_main.py | mm1_main.py | #!/usr/bin/env python
# encoding: utf-8
import mm1
import sim
### Params
# Mean interarrival rate of customers per second;
# hence, 0.05 <=> 3 people/minute
interarrival_rate = 0.05
# Mean service rate by the teller per second;
# hence, 0.1 <=> 6 people/minute
service_rate = 0.1
### Initialize
# Create new simula... | #!/usr/bin/env python
# encoding: utf-8
import argparse
import mm1
import sim
import time
### Parse command line arguments
parser = argparse.ArgumentParser(description="M/M/1 queue simulation -- Main script")
parser.add_argument('sim_duration', metavar='simulation_duration',
type=int, help='simul... | Add command line arguments to main script. | Add command line arguments to main script.
| Python | mit | kubkon/des-in-python | #!/usr/bin/env python
# encoding: utf-8
import mm1
import sim
### Params
# Mean interarrival rate of customers per second;
# hence, 0.05 <=> 3 people/minute
interarrival_rate = 0.05
# Mean service rate by the teller per second;
# hence, 0.1 <=> 6 people/minute
service_rate = 0.1
### Initialize
# Create new simula... | #!/usr/bin/env python
# encoding: utf-8
import argparse
import mm1
import sim
import time
### Parse command line arguments
parser = argparse.ArgumentParser(description="M/M/1 queue simulation -- Main script")
parser.add_argument('sim_duration', metavar='simulation_duration',
type=int, help='simul... | <commit_before>#!/usr/bin/env python
# encoding: utf-8
import mm1
import sim
### Params
# Mean interarrival rate of customers per second;
# hence, 0.05 <=> 3 people/minute
interarrival_rate = 0.05
# Mean service rate by the teller per second;
# hence, 0.1 <=> 6 people/minute
service_rate = 0.1
### Initialize
# Cr... | #!/usr/bin/env python
# encoding: utf-8
import argparse
import mm1
import sim
import time
### Parse command line arguments
parser = argparse.ArgumentParser(description="M/M/1 queue simulation -- Main script")
parser.add_argument('sim_duration', metavar='simulation_duration',
type=int, help='simul... | #!/usr/bin/env python
# encoding: utf-8
import mm1
import sim
### Params
# Mean interarrival rate of customers per second;
# hence, 0.05 <=> 3 people/minute
interarrival_rate = 0.05
# Mean service rate by the teller per second;
# hence, 0.1 <=> 6 people/minute
service_rate = 0.1
### Initialize
# Create new simula... | <commit_before>#!/usr/bin/env python
# encoding: utf-8
import mm1
import sim
### Params
# Mean interarrival rate of customers per second;
# hence, 0.05 <=> 3 people/minute
interarrival_rate = 0.05
# Mean service rate by the teller per second;
# hence, 0.1 <=> 6 people/minute
service_rate = 0.1
### Initialize
# Cr... |
471828d39ff256961bf48323feb43438901a4762 | orges/plugins/base.py | orges/plugins/base.py | """This module provides an abstract base class for invocation plugins"""
from abc import abstractmethod, ABCMeta
class BasePlugin(object):
"""
Abstract base class for invocation plugins.
Plugin developers can either derive their objects directly from this class
or from :class:`orges.plugins.dummy.D... | """This module provides an abstract base class for invocation plugins"""
from abc import abstractmethod, ABCMeta
class BasePlugin(object):
"""
Abstract base class for invocation plugins.
Plugin developers can either derive their objects directly from this class
or from :class:`orges.plugins.dummy.D... | Fix broken reference in documentation | Fix broken reference in documentation
| Python | bsd-3-clause | cigroup-ol/metaopt,cigroup-ol/metaopt,cigroup-ol/metaopt | """This module provides an abstract base class for invocation plugins"""
from abc import abstractmethod, ABCMeta
class BasePlugin(object):
"""
Abstract base class for invocation plugins.
Plugin developers can either derive their objects directly from this class
or from :class:`orges.plugins.dummy.D... | """This module provides an abstract base class for invocation plugins"""
from abc import abstractmethod, ABCMeta
class BasePlugin(object):
"""
Abstract base class for invocation plugins.
Plugin developers can either derive their objects directly from this class
or from :class:`orges.plugins.dummy.D... | <commit_before>"""This module provides an abstract base class for invocation plugins"""
from abc import abstractmethod, ABCMeta
class BasePlugin(object):
"""
Abstract base class for invocation plugins.
Plugin developers can either derive their objects directly from this class
or from :class:`orges.... | """This module provides an abstract base class for invocation plugins"""
from abc import abstractmethod, ABCMeta
class BasePlugin(object):
"""
Abstract base class for invocation plugins.
Plugin developers can either derive their objects directly from this class
or from :class:`orges.plugins.dummy.D... | """This module provides an abstract base class for invocation plugins"""
from abc import abstractmethod, ABCMeta
class BasePlugin(object):
"""
Abstract base class for invocation plugins.
Plugin developers can either derive their objects directly from this class
or from :class:`orges.plugins.dummy.D... | <commit_before>"""This module provides an abstract base class for invocation plugins"""
from abc import abstractmethod, ABCMeta
class BasePlugin(object):
"""
Abstract base class for invocation plugins.
Plugin developers can either derive their objects directly from this class
or from :class:`orges.... |
35409711d9976ed44e25e314486f3f703b18c068 | packages/cardpay-subgraph-extraction/export.py | packages/cardpay-subgraph-extraction/export.py | from subgraph_extractor.cli import extract_from_config
import click
from cloudpathlib import AnyPath
@click.command()
@click.option(
"--subgraph-config-folder",
help="The folder containing the subgraph config files",
default='config',
)
@click.option(
"--database-string",
default="postgresql://grap... | from subgraph_extractor.cli import extract_from_config
import click
from cloudpathlib import AnyPath
import os
@click.command()
@click.option(
"--subgraph-config-folder",
help="The folder containing the subgraph config files",
default="config",
)
@click.option(
"--database-string",
default=os.envi... | Support environment variables for the extraction | Support environment variables for the extraction
| Python | mit | cardstack/cardstack,cardstack/cardstack,cardstack/cardstack,cardstack/cardstack,cardstack/cardstack,cardstack/cardstack | from subgraph_extractor.cli import extract_from_config
import click
from cloudpathlib import AnyPath
@click.command()
@click.option(
"--subgraph-config-folder",
help="The folder containing the subgraph config files",
default='config',
)
@click.option(
"--database-string",
default="postgresql://grap... | from subgraph_extractor.cli import extract_from_config
import click
from cloudpathlib import AnyPath
import os
@click.command()
@click.option(
"--subgraph-config-folder",
help="The folder containing the subgraph config files",
default="config",
)
@click.option(
"--database-string",
default=os.envi... | <commit_before>from subgraph_extractor.cli import extract_from_config
import click
from cloudpathlib import AnyPath
@click.command()
@click.option(
"--subgraph-config-folder",
help="The folder containing the subgraph config files",
default='config',
)
@click.option(
"--database-string",
default="po... | from subgraph_extractor.cli import extract_from_config
import click
from cloudpathlib import AnyPath
import os
@click.command()
@click.option(
"--subgraph-config-folder",
help="The folder containing the subgraph config files",
default="config",
)
@click.option(
"--database-string",
default=os.envi... | from subgraph_extractor.cli import extract_from_config
import click
from cloudpathlib import AnyPath
@click.command()
@click.option(
"--subgraph-config-folder",
help="The folder containing the subgraph config files",
default='config',
)
@click.option(
"--database-string",
default="postgresql://grap... | <commit_before>from subgraph_extractor.cli import extract_from_config
import click
from cloudpathlib import AnyPath
@click.command()
@click.option(
"--subgraph-config-folder",
help="The folder containing the subgraph config files",
default='config',
)
@click.option(
"--database-string",
default="po... |
b60cfdb2b338a4f87b4ac6ba7dd03c9c1d751b37 | scrapi/processing/base.py | scrapi/processing/base.py | class BaseProcessor(object):
NAME = None
def process_raw(self, raw_doc, **kwargs):
pass # pragma: no cover
def process_normalized(self, raw_doc, normalized, **kwargs):
pass # pragma: no cover
| import six
import json
from abc import abstractproperty, abstractmethod
from requests.structures import CaseInsensitiveDict
class BaseProcessor(object):
NAME = None
def process_raw(self, raw_doc, **kwargs):
pass # pragma: no cover
def process_normalized(self, raw_doc, normalized, **kwargs):
... | Add definition of abstract harvester model | Add definition of abstract harvester model
| Python | apache-2.0 | erinspace/scrapi,felliott/scrapi,fabianvf/scrapi,CenterForOpenScience/scrapi,mehanig/scrapi,erinspace/scrapi,felliott/scrapi,CenterForOpenScience/scrapi,fabianvf/scrapi,mehanig/scrapi | class BaseProcessor(object):
NAME = None
def process_raw(self, raw_doc, **kwargs):
pass # pragma: no cover
def process_normalized(self, raw_doc, normalized, **kwargs):
pass # pragma: no cover
Add definition of abstract harvester model | import six
import json
from abc import abstractproperty, abstractmethod
from requests.structures import CaseInsensitiveDict
class BaseProcessor(object):
NAME = None
def process_raw(self, raw_doc, **kwargs):
pass # pragma: no cover
def process_normalized(self, raw_doc, normalized, **kwargs):
... | <commit_before>class BaseProcessor(object):
NAME = None
def process_raw(self, raw_doc, **kwargs):
pass # pragma: no cover
def process_normalized(self, raw_doc, normalized, **kwargs):
pass # pragma: no cover
<commit_msg>Add definition of abstract harvester model<commit_after> | import six
import json
from abc import abstractproperty, abstractmethod
from requests.structures import CaseInsensitiveDict
class BaseProcessor(object):
NAME = None
def process_raw(self, raw_doc, **kwargs):
pass # pragma: no cover
def process_normalized(self, raw_doc, normalized, **kwargs):
... | class BaseProcessor(object):
NAME = None
def process_raw(self, raw_doc, **kwargs):
pass # pragma: no cover
def process_normalized(self, raw_doc, normalized, **kwargs):
pass # pragma: no cover
Add definition of abstract harvester modelimport six
import json
from abc import abstractpropert... | <commit_before>class BaseProcessor(object):
NAME = None
def process_raw(self, raw_doc, **kwargs):
pass # pragma: no cover
def process_normalized(self, raw_doc, normalized, **kwargs):
pass # pragma: no cover
<commit_msg>Add definition of abstract harvester model<commit_after>import six
im... |
a8997dad913fbc5a12def6a31931efab16efd285 | {{cookiecutter.project_slug}}/search/views.py | {{cookiecutter.project_slug}}/search/views.py | from django.core.paginator import EmptyPage, PageNotAnInteger, Paginator
from django.shortcuts import render
from wagtail.core.models import Page
from wagtail.search.models import Query
def search(request):
search_query = request.GET.get('query', None)
page = request.GET.get('page', 1)
# Search
if s... | from django.core.paginator import EmptyPage, PageNotAnInteger, Paginator
from django.shortcuts import render
from wagtail.core.models import Page
from wagtail.search.models import Query
def search(request):
search_query = request.GET.get('q', None)
page = request.GET.get('page', 1)
# Search
if searc... | Make search parameter match template parameter name | Make search parameter match template parameter name | Python | mit | chrisdev/wagtail-cookiecutter-foundation,chrisdev/wagtail-cookiecutter-foundation,ilendl2/wagtail-cookiecutter-foundation,ilendl2/wagtail-cookiecutter-foundation,ilendl2/wagtail-cookiecutter-foundation,chrisdev/wagtail-cookiecutter-foundation | from django.core.paginator import EmptyPage, PageNotAnInteger, Paginator
from django.shortcuts import render
from wagtail.core.models import Page
from wagtail.search.models import Query
def search(request):
search_query = request.GET.get('query', None)
page = request.GET.get('page', 1)
# Search
if s... | from django.core.paginator import EmptyPage, PageNotAnInteger, Paginator
from django.shortcuts import render
from wagtail.core.models import Page
from wagtail.search.models import Query
def search(request):
search_query = request.GET.get('q', None)
page = request.GET.get('page', 1)
# Search
if searc... | <commit_before>from django.core.paginator import EmptyPage, PageNotAnInteger, Paginator
from django.shortcuts import render
from wagtail.core.models import Page
from wagtail.search.models import Query
def search(request):
search_query = request.GET.get('query', None)
page = request.GET.get('page', 1)
# ... | from django.core.paginator import EmptyPage, PageNotAnInteger, Paginator
from django.shortcuts import render
from wagtail.core.models import Page
from wagtail.search.models import Query
def search(request):
search_query = request.GET.get('q', None)
page = request.GET.get('page', 1)
# Search
if searc... | from django.core.paginator import EmptyPage, PageNotAnInteger, Paginator
from django.shortcuts import render
from wagtail.core.models import Page
from wagtail.search.models import Query
def search(request):
search_query = request.GET.get('query', None)
page = request.GET.get('page', 1)
# Search
if s... | <commit_before>from django.core.paginator import EmptyPage, PageNotAnInteger, Paginator
from django.shortcuts import render
from wagtail.core.models import Page
from wagtail.search.models import Query
def search(request):
search_query = request.GET.get('query', None)
page = request.GET.get('page', 1)
# ... |
721e2ab81f78de5956c37b654a0cddf99679a20f | django/applications/catmaid/middleware.py | django/applications/catmaid/middleware.py | import json
from django.http import HttpResponse
from django.contrib.auth.models import User
from django.conf import settings
from traceback import format_exc
class AnonymousAuthenticationMiddleware(object):
""" This middleware class tests whether the current user is the
anonymous user. If so, it replaces the... | import json
from django.http import HttpResponse
from django.contrib.auth.models import User
from django.conf import settings
from traceback import format_exc
class AnonymousAuthenticationMiddleware(object):
""" This middleware class tests whether the current user is the
anonymous user. If so, it replaces the... | Make anonymous user distinguishable from Django's AnonymousUser | Make anonymous user distinguishable from Django's AnonymousUser
Django uses a special object---the AnonymousUser---for requests that are not
bound to a logged in user. Since we use guardian we replace this object with an
actual user object (with the ID set in ANONYMOUS_USER_ID, usually -1) in a
middleware class. So fa... | Python | agpl-3.0 | htem/CATMAID,htem/CATMAID,htem/CATMAID,fzadow/CATMAID,fzadow/CATMAID,htem/CATMAID,fzadow/CATMAID,fzadow/CATMAID | import json
from django.http import HttpResponse
from django.contrib.auth.models import User
from django.conf import settings
from traceback import format_exc
class AnonymousAuthenticationMiddleware(object):
""" This middleware class tests whether the current user is the
anonymous user. If so, it replaces the... | import json
from django.http import HttpResponse
from django.contrib.auth.models import User
from django.conf import settings
from traceback import format_exc
class AnonymousAuthenticationMiddleware(object):
""" This middleware class tests whether the current user is the
anonymous user. If so, it replaces the... | <commit_before>import json
from django.http import HttpResponse
from django.contrib.auth.models import User
from django.conf import settings
from traceback import format_exc
class AnonymousAuthenticationMiddleware(object):
""" This middleware class tests whether the current user is the
anonymous user. If so, ... | import json
from django.http import HttpResponse
from django.contrib.auth.models import User
from django.conf import settings
from traceback import format_exc
class AnonymousAuthenticationMiddleware(object):
""" This middleware class tests whether the current user is the
anonymous user. If so, it replaces the... | import json
from django.http import HttpResponse
from django.contrib.auth.models import User
from django.conf import settings
from traceback import format_exc
class AnonymousAuthenticationMiddleware(object):
""" This middleware class tests whether the current user is the
anonymous user. If so, it replaces the... | <commit_before>import json
from django.http import HttpResponse
from django.contrib.auth.models import User
from django.conf import settings
from traceback import format_exc
class AnonymousAuthenticationMiddleware(object):
""" This middleware class tests whether the current user is the
anonymous user. If so, ... |
61e6c21e32a481be9b2c61d71b0faef3fe731ae6 | tests/rules_tests/RulesTest.py | tests/rules_tests/RulesTest.py | #!/usr/bin/env python
"""
:Author Patrik Valkovic
:Created 15.08.2017 15:31
:Licence GNUv3
Part of grammpy
"""
from unittest import main, TestCase
from grammpy import *
from .grammar import *
class RulesTest(TestCase):
def test_oneRules(self):
class Tmp1(Rule):
rules = [([NFirst], [NSecond, ... | #!/usr/bin/env python
"""
:Author Patrik Valkovic
:Created 15.08.2017 15:31
:Licence GNUv3
Part of grammpy
"""
from unittest import main, TestCase
from grammpy import *
from .grammar import *
class RulesTest(TestCase):
def setUp(self):
self.g = Grammar(terminals=[0, 1, 2,
... | Add test that check hash values of rule | Add test that check hash values of rule
| Python | mit | PatrikValkovic/grammpy | #!/usr/bin/env python
"""
:Author Patrik Valkovic
:Created 15.08.2017 15:31
:Licence GNUv3
Part of grammpy
"""
from unittest import main, TestCase
from grammpy import *
from .grammar import *
class RulesTest(TestCase):
def test_oneRules(self):
class Tmp1(Rule):
rules = [([NFirst], [NSecond, ... | #!/usr/bin/env python
"""
:Author Patrik Valkovic
:Created 15.08.2017 15:31
:Licence GNUv3
Part of grammpy
"""
from unittest import main, TestCase
from grammpy import *
from .grammar import *
class RulesTest(TestCase):
def setUp(self):
self.g = Grammar(terminals=[0, 1, 2,
... | <commit_before>#!/usr/bin/env python
"""
:Author Patrik Valkovic
:Created 15.08.2017 15:31
:Licence GNUv3
Part of grammpy
"""
from unittest import main, TestCase
from grammpy import *
from .grammar import *
class RulesTest(TestCase):
def test_oneRules(self):
class Tmp1(Rule):
rules = [([NFir... | #!/usr/bin/env python
"""
:Author Patrik Valkovic
:Created 15.08.2017 15:31
:Licence GNUv3
Part of grammpy
"""
from unittest import main, TestCase
from grammpy import *
from .grammar import *
class RulesTest(TestCase):
def setUp(self):
self.g = Grammar(terminals=[0, 1, 2,
... | #!/usr/bin/env python
"""
:Author Patrik Valkovic
:Created 15.08.2017 15:31
:Licence GNUv3
Part of grammpy
"""
from unittest import main, TestCase
from grammpy import *
from .grammar import *
class RulesTest(TestCase):
def test_oneRules(self):
class Tmp1(Rule):
rules = [([NFirst], [NSecond, ... | <commit_before>#!/usr/bin/env python
"""
:Author Patrik Valkovic
:Created 15.08.2017 15:31
:Licence GNUv3
Part of grammpy
"""
from unittest import main, TestCase
from grammpy import *
from .grammar import *
class RulesTest(TestCase):
def test_oneRules(self):
class Tmp1(Rule):
rules = [([NFir... |
e87fc9172b9d56fe9d64cfda2fb36a3f71e69e70 | tests/test_utils.py | tests/test_utils.py | # -*- coding: utf-8; -*-
import re
from jenkins_autojobs import main
def test_filter_jobs():
class Job:
def __init__(self, name):
self.name = name
class jenkins:
pass
names = ['feature-one', 'feature-two', 'release-one', 'release-two']
jenkins.jobs = [Job(i) for i in na... | # -*- coding: utf-8; -*-
import re
from jenkins_autojobs import main
def test_filter_jobs():
class Job:
def __init__(self, name):
self.name = name
class jenkins:
@staticmethod
def view_jobs(x):
return {
'v1': [Job('scratch-one'), Job('scratch-... | Fix tests on Python 2 | Fix tests on Python 2
| Python | bsd-3-clause | gvalkov/jenkins-autojobs,gvalkov/jenkins-autojobs | # -*- coding: utf-8; -*-
import re
from jenkins_autojobs import main
def test_filter_jobs():
class Job:
def __init__(self, name):
self.name = name
class jenkins:
pass
names = ['feature-one', 'feature-two', 'release-one', 'release-two']
jenkins.jobs = [Job(i) for i in na... | # -*- coding: utf-8; -*-
import re
from jenkins_autojobs import main
def test_filter_jobs():
class Job:
def __init__(self, name):
self.name = name
class jenkins:
@staticmethod
def view_jobs(x):
return {
'v1': [Job('scratch-one'), Job('scratch-... | <commit_before># -*- coding: utf-8; -*-
import re
from jenkins_autojobs import main
def test_filter_jobs():
class Job:
def __init__(self, name):
self.name = name
class jenkins:
pass
names = ['feature-one', 'feature-two', 'release-one', 'release-two']
jenkins.jobs = [Job... | # -*- coding: utf-8; -*-
import re
from jenkins_autojobs import main
def test_filter_jobs():
class Job:
def __init__(self, name):
self.name = name
class jenkins:
@staticmethod
def view_jobs(x):
return {
'v1': [Job('scratch-one'), Job('scratch-... | # -*- coding: utf-8; -*-
import re
from jenkins_autojobs import main
def test_filter_jobs():
class Job:
def __init__(self, name):
self.name = name
class jenkins:
pass
names = ['feature-one', 'feature-two', 'release-one', 'release-two']
jenkins.jobs = [Job(i) for i in na... | <commit_before># -*- coding: utf-8; -*-
import re
from jenkins_autojobs import main
def test_filter_jobs():
class Job:
def __init__(self, name):
self.name = name
class jenkins:
pass
names = ['feature-one', 'feature-two', 'release-one', 'release-two']
jenkins.jobs = [Job... |
1963012ba4628f1f66d495e777275243dc7248e4 | .CI/trigger_conda-forge.github.io.py | .CI/trigger_conda-forge.github.io.py | """
Trigger the conda-forge.github.io Travis job to restart.
"""
import os
import requests
import six
import conda_smithy.ci_register
def rebuild_travis(repo_slug):
headers = conda_smithy.ci_register.travis_headers()
# If we don't specify the API version, we get a 404.
# Also fix the accepted content... | """
Trigger the conda-forge.github.io Travis job to restart.
"""
import os
import requests
import six
import conda_smithy.ci_register
def rebuild_travis(repo_slug):
headers = conda_smithy.ci_register.travis_headers()
# If we don't specify the API version, we get a 404.
# Also fix the accepted content... | Add message to webpage repo trigger | Add message to webpage repo trigger
Should fix triggering builds on the webpage repo even when the most
recent commit message skip the CI build. Also should make it easier to
identify builds started by this trigger.
[ci skip]
[skip ci]
| Python | bsd-3-clause | jakirkham/staged-recipes,Cashalow/staged-recipes,dschreij/staged-recipes,scopatz/staged-recipes,stuertz/staged-recipes,conda-forge/staged-recipes,guillochon/staged-recipes,hadim/staged-recipes,SylvainCorlay/staged-recipes,mcs07/staged-recipes,scopatz/staged-recipes,sodre/staged-recipes,pmlandwehr/staged-recipes,sannykr... | """
Trigger the conda-forge.github.io Travis job to restart.
"""
import os
import requests
import six
import conda_smithy.ci_register
def rebuild_travis(repo_slug):
headers = conda_smithy.ci_register.travis_headers()
# If we don't specify the API version, we get a 404.
# Also fix the accepted content... | """
Trigger the conda-forge.github.io Travis job to restart.
"""
import os
import requests
import six
import conda_smithy.ci_register
def rebuild_travis(repo_slug):
headers = conda_smithy.ci_register.travis_headers()
# If we don't specify the API version, we get a 404.
# Also fix the accepted content... | <commit_before>"""
Trigger the conda-forge.github.io Travis job to restart.
"""
import os
import requests
import six
import conda_smithy.ci_register
def rebuild_travis(repo_slug):
headers = conda_smithy.ci_register.travis_headers()
# If we don't specify the API version, we get a 404.
# Also fix the a... | """
Trigger the conda-forge.github.io Travis job to restart.
"""
import os
import requests
import six
import conda_smithy.ci_register
def rebuild_travis(repo_slug):
headers = conda_smithy.ci_register.travis_headers()
# If we don't specify the API version, we get a 404.
# Also fix the accepted content... | """
Trigger the conda-forge.github.io Travis job to restart.
"""
import os
import requests
import six
import conda_smithy.ci_register
def rebuild_travis(repo_slug):
headers = conda_smithy.ci_register.travis_headers()
# If we don't specify the API version, we get a 404.
# Also fix the accepted content... | <commit_before>"""
Trigger the conda-forge.github.io Travis job to restart.
"""
import os
import requests
import six
import conda_smithy.ci_register
def rebuild_travis(repo_slug):
headers = conda_smithy.ci_register.travis_headers()
# If we don't specify the API version, we get a 404.
# Also fix the a... |
86e9e5a8da58b2902f5848353df9b05151bd08fa | turbustat/tests/test_cramer.py | turbustat/tests/test_cramer.py | # Licensed under an MIT open source license - see LICENSE
'''
Test functions for Cramer
'''
from unittest import TestCase
import numpy as np
import numpy.testing as npt
from ..statistics import Cramer_Distance
from ._testing_data import \
dataset1, dataset2, computed_data, computed_distances
class testCramer... | # Licensed under an MIT open source license - see LICENSE
'''
Test functions for Cramer
'''
from unittest import TestCase
import numpy as np
import numpy.testing as npt
from ..statistics import Cramer_Distance
from ._testing_data import \
dataset1, dataset2, computed_data, computed_distances
class testCramer... | Add test for Cramer with different spatial sizes | Add test for Cramer with different spatial sizes
| Python | mit | Astroua/TurbuStat,e-koch/TurbuStat | # Licensed under an MIT open source license - see LICENSE
'''
Test functions for Cramer
'''
from unittest import TestCase
import numpy as np
import numpy.testing as npt
from ..statistics import Cramer_Distance
from ._testing_data import \
dataset1, dataset2, computed_data, computed_distances
class testCramer... | # Licensed under an MIT open source license - see LICENSE
'''
Test functions for Cramer
'''
from unittest import TestCase
import numpy as np
import numpy.testing as npt
from ..statistics import Cramer_Distance
from ._testing_data import \
dataset1, dataset2, computed_data, computed_distances
class testCramer... | <commit_before># Licensed under an MIT open source license - see LICENSE
'''
Test functions for Cramer
'''
from unittest import TestCase
import numpy as np
import numpy.testing as npt
from ..statistics import Cramer_Distance
from ._testing_data import \
dataset1, dataset2, computed_data, computed_distances
c... | # Licensed under an MIT open source license - see LICENSE
'''
Test functions for Cramer
'''
from unittest import TestCase
import numpy as np
import numpy.testing as npt
from ..statistics import Cramer_Distance
from ._testing_data import \
dataset1, dataset2, computed_data, computed_distances
class testCramer... | # Licensed under an MIT open source license - see LICENSE
'''
Test functions for Cramer
'''
from unittest import TestCase
import numpy as np
import numpy.testing as npt
from ..statistics import Cramer_Distance
from ._testing_data import \
dataset1, dataset2, computed_data, computed_distances
class testCramer... | <commit_before># Licensed under an MIT open source license - see LICENSE
'''
Test functions for Cramer
'''
from unittest import TestCase
import numpy as np
import numpy.testing as npt
from ..statistics import Cramer_Distance
from ._testing_data import \
dataset1, dataset2, computed_data, computed_distances
c... |
05240d24f6184b015422e2e1996fb90d7f6d7654 | twstock/cli/best_four_point.py | twstock/cli/best_four_point.py | import twstock
def main(argv):
print('四大買賣點判斷 Best Four Point')
print('------------------------------')
if len(argv) > 1:
sids = argv[1:]
for sid in sids:
bfp = twstock.BestFourPoint(twstock.Stock(sid))
bfp = bfp.best_four_point()
print('%s: ' % (sid), e... | import twstock
def run(argv):
print('四大買賣點判斷 Best Four Point')
print('------------------------------')
for sid in argv:
bfp = twstock.BestFourPoint(twstock.Stock(sid))
bfp = bfp.best_four_point()
print('%s: ' % (sid), end='')
if bfp:
if bfp[0]:
p... | Fix best four point cli | Fix best four point cli
| Python | mit | mlouielu/twstock,TCCinTaiwan/twstock | import twstock
def main(argv):
print('四大買賣點判斷 Best Four Point')
print('------------------------------')
if len(argv) > 1:
sids = argv[1:]
for sid in sids:
bfp = twstock.BestFourPoint(twstock.Stock(sid))
bfp = bfp.best_four_point()
print('%s: ' % (sid), e... | import twstock
def run(argv):
print('四大買賣點判斷 Best Four Point')
print('------------------------------')
for sid in argv:
bfp = twstock.BestFourPoint(twstock.Stock(sid))
bfp = bfp.best_four_point()
print('%s: ' % (sid), end='')
if bfp:
if bfp[0]:
p... | <commit_before>import twstock
def main(argv):
print('四大買賣點判斷 Best Four Point')
print('------------------------------')
if len(argv) > 1:
sids = argv[1:]
for sid in sids:
bfp = twstock.BestFourPoint(twstock.Stock(sid))
bfp = bfp.best_four_point()
print('%... | import twstock
def run(argv):
print('四大買賣點判斷 Best Four Point')
print('------------------------------')
for sid in argv:
bfp = twstock.BestFourPoint(twstock.Stock(sid))
bfp = bfp.best_four_point()
print('%s: ' % (sid), end='')
if bfp:
if bfp[0]:
p... | import twstock
def main(argv):
print('四大買賣點判斷 Best Four Point')
print('------------------------------')
if len(argv) > 1:
sids = argv[1:]
for sid in sids:
bfp = twstock.BestFourPoint(twstock.Stock(sid))
bfp = bfp.best_four_point()
print('%s: ' % (sid), e... | <commit_before>import twstock
def main(argv):
print('四大買賣點判斷 Best Four Point')
print('------------------------------')
if len(argv) > 1:
sids = argv[1:]
for sid in sids:
bfp = twstock.BestFourPoint(twstock.Stock(sid))
bfp = bfp.best_four_point()
print('%... |
ec2454626e22244c504bae528457fb8136c59feb | cooler/cli/__init__.py | cooler/cli/__init__.py | # -*- coding: utf-8 -*-
from __future__ import division, print_function
import click
CONTEXT_SETTINGS = {
'help_option_names': ['-h', '--help'],
}
@click.group(context_settings=CONTEXT_SETTINGS)
def cli():
pass
from . import (
makebins,
digest,
csort,
cload,
load,
balance,
dump,
... | # -*- coding: utf-8 -*-
from __future__ import division, print_function
import click
# Monkey patch
click.core._verify_python3_env = lambda: None
CONTEXT_SETTINGS = {
'help_option_names': ['-h', '--help'],
}
@click.group(context_settings=CONTEXT_SETTINGS)
def cli():
pass
from . import (
makebins,
... | Stop Click from aborting due to misconfigured locale | Stop Click from aborting due to misconfigured locale
| Python | bsd-3-clause | mirnylab/cooler | # -*- coding: utf-8 -*-
from __future__ import division, print_function
import click
CONTEXT_SETTINGS = {
'help_option_names': ['-h', '--help'],
}
@click.group(context_settings=CONTEXT_SETTINGS)
def cli():
pass
from . import (
makebins,
digest,
csort,
cload,
load,
balance,
dump,
... | # -*- coding: utf-8 -*-
from __future__ import division, print_function
import click
# Monkey patch
click.core._verify_python3_env = lambda: None
CONTEXT_SETTINGS = {
'help_option_names': ['-h', '--help'],
}
@click.group(context_settings=CONTEXT_SETTINGS)
def cli():
pass
from . import (
makebins,
... | <commit_before># -*- coding: utf-8 -*-
from __future__ import division, print_function
import click
CONTEXT_SETTINGS = {
'help_option_names': ['-h', '--help'],
}
@click.group(context_settings=CONTEXT_SETTINGS)
def cli():
pass
from . import (
makebins,
digest,
csort,
cload,
load,
bala... | # -*- coding: utf-8 -*-
from __future__ import division, print_function
import click
# Monkey patch
click.core._verify_python3_env = lambda: None
CONTEXT_SETTINGS = {
'help_option_names': ['-h', '--help'],
}
@click.group(context_settings=CONTEXT_SETTINGS)
def cli():
pass
from . import (
makebins,
... | # -*- coding: utf-8 -*-
from __future__ import division, print_function
import click
CONTEXT_SETTINGS = {
'help_option_names': ['-h', '--help'],
}
@click.group(context_settings=CONTEXT_SETTINGS)
def cli():
pass
from . import (
makebins,
digest,
csort,
cload,
load,
balance,
dump,
... | <commit_before># -*- coding: utf-8 -*-
from __future__ import division, print_function
import click
CONTEXT_SETTINGS = {
'help_option_names': ['-h', '--help'],
}
@click.group(context_settings=CONTEXT_SETTINGS)
def cli():
pass
from . import (
makebins,
digest,
csort,
cload,
load,
bala... |
1594ab8d77e6522e0d85aa363ddc67d55d6ee81a | zc-list.py | zc-list.py | #!/usr/bin/env python
import sys
import argparse
import client_wrap
def parse_args():
parser = argparse.ArgumentParser()
parser.add_argument("-t", "--type", help="type of the cached data", default="double")
parser.add_argument("-c", "--connection", help="connection string", default="ipc:///var/run/zero-ca... | #!/usr/bin/env python
import sys
import argparse
import client_wrap
def parse_args():
parser = argparse.ArgumentParser()
parser.add_argument("-t", "--type", help="type of the cached data", default="double")
parser.add_argument("-c", "--connection", help="connection string", default="ipc:///var/run/zero-ca... | Implement the type specific values output | Implement the type specific values output
| Python | agpl-3.0 | ellysh/zero-cache-utils,ellysh/zero-cache-utils | #!/usr/bin/env python
import sys
import argparse
import client_wrap
def parse_args():
parser = argparse.ArgumentParser()
parser.add_argument("-t", "--type", help="type of the cached data", default="double")
parser.add_argument("-c", "--connection", help="connection string", default="ipc:///var/run/zero-ca... | #!/usr/bin/env python
import sys
import argparse
import client_wrap
def parse_args():
parser = argparse.ArgumentParser()
parser.add_argument("-t", "--type", help="type of the cached data", default="double")
parser.add_argument("-c", "--connection", help="connection string", default="ipc:///var/run/zero-ca... | <commit_before>#!/usr/bin/env python
import sys
import argparse
import client_wrap
def parse_args():
parser = argparse.ArgumentParser()
parser.add_argument("-t", "--type", help="type of the cached data", default="double")
parser.add_argument("-c", "--connection", help="connection string", default="ipc:///... | #!/usr/bin/env python
import sys
import argparse
import client_wrap
def parse_args():
parser = argparse.ArgumentParser()
parser.add_argument("-t", "--type", help="type of the cached data", default="double")
parser.add_argument("-c", "--connection", help="connection string", default="ipc:///var/run/zero-ca... | #!/usr/bin/env python
import sys
import argparse
import client_wrap
def parse_args():
parser = argparse.ArgumentParser()
parser.add_argument("-t", "--type", help="type of the cached data", default="double")
parser.add_argument("-c", "--connection", help="connection string", default="ipc:///var/run/zero-ca... | <commit_before>#!/usr/bin/env python
import sys
import argparse
import client_wrap
def parse_args():
parser = argparse.ArgumentParser()
parser.add_argument("-t", "--type", help="type of the cached data", default="double")
parser.add_argument("-c", "--connection", help="connection string", default="ipc:///... |
cb2f6840d34807d2df72e8c7ed0a76576a50f392 | src/brightness.py | src/brightness.py | import sys
import os
from workflow import Workflow
def main(wf):
user_input = wf.args[0]
if user_input != '':
try:
if int(user_input) <= 100 and int(user_input) > 0:
wf.add_item('%s%%' % user_input, arg='%s' % (int(user_input) / 100.0), valid=True)
else:
... | import sys
import os
from workflow import Workflow
def main(wf):
user_input = wf.args[0]
if user_input != '':
try:
if int(user_input) <= 100 and int(user_input) >= 0:
wf.add_item('%s%%' % user_input, arg='%s' % (int(user_input) / 100.0), valid=True)
else:
... | Allow user to input "0" as value | Allow user to input "0" as value | Python | mit | fniephaus/alfred-brightness | import sys
import os
from workflow import Workflow
def main(wf):
user_input = wf.args[0]
if user_input != '':
try:
if int(user_input) <= 100 and int(user_input) > 0:
wf.add_item('%s%%' % user_input, arg='%s' % (int(user_input) / 100.0), valid=True)
else:
... | import sys
import os
from workflow import Workflow
def main(wf):
user_input = wf.args[0]
if user_input != '':
try:
if int(user_input) <= 100 and int(user_input) >= 0:
wf.add_item('%s%%' % user_input, arg='%s' % (int(user_input) / 100.0), valid=True)
else:
... | <commit_before>import sys
import os
from workflow import Workflow
def main(wf):
user_input = wf.args[0]
if user_input != '':
try:
if int(user_input) <= 100 and int(user_input) > 0:
wf.add_item('%s%%' % user_input, arg='%s' % (int(user_input) / 100.0), valid=True)
... | import sys
import os
from workflow import Workflow
def main(wf):
user_input = wf.args[0]
if user_input != '':
try:
if int(user_input) <= 100 and int(user_input) >= 0:
wf.add_item('%s%%' % user_input, arg='%s' % (int(user_input) / 100.0), valid=True)
else:
... | import sys
import os
from workflow import Workflow
def main(wf):
user_input = wf.args[0]
if user_input != '':
try:
if int(user_input) <= 100 and int(user_input) > 0:
wf.add_item('%s%%' % user_input, arg='%s' % (int(user_input) / 100.0), valid=True)
else:
... | <commit_before>import sys
import os
from workflow import Workflow
def main(wf):
user_input = wf.args[0]
if user_input != '':
try:
if int(user_input) <= 100 and int(user_input) > 0:
wf.add_item('%s%%' % user_input, arg='%s' % (int(user_input) / 100.0), valid=True)
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.