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
b2c2c5ea21b7f14820937276148c280303db241b
froide/frontpage/models.py
froide/frontpage/models.py
from django.db import models from django.utils.translation import ugettext as _ from django.contrib.auth.models import User from django.contrib.sites.models import Site from django.contrib.sites.managers import CurrentSiteManager from foirequest.models import FoiRequest class FeaturedRequestManager(CurrentSiteManage...
from django.db import models from django.utils.translation import ugettext as _ from django.contrib.auth.models import User from django.contrib.sites.models import Site from django.contrib.sites.managers import CurrentSiteManager from foirequest.models import FoiRequest class FeaturedRequestManager(CurrentSiteManage...
Add IndexError to getFeatured call
Add IndexError to getFeatured call
Python
mit
stefanw/froide,LilithWittmann/froide,stefanw/froide,ryankanno/froide,ryankanno/froide,CodeforHawaii/froide,catcosmo/froide,CodeforHawaii/froide,stefanw/froide,ryankanno/froide,stefanw/froide,fin/froide,ryankanno/froide,okfse/froide,catcosmo/froide,CodeforHawaii/froide,catcosmo/froide,stefanw/froide,okfse/froide,okfse/f...
from django.db import models from django.utils.translation import ugettext as _ from django.contrib.auth.models import User from django.contrib.sites.models import Site from django.contrib.sites.managers import CurrentSiteManager from foirequest.models import FoiRequest class FeaturedRequestManager(CurrentSiteManage...
from django.db import models from django.utils.translation import ugettext as _ from django.contrib.auth.models import User from django.contrib.sites.models import Site from django.contrib.sites.managers import CurrentSiteManager from foirequest.models import FoiRequest class FeaturedRequestManager(CurrentSiteManage...
<commit_before>from django.db import models from django.utils.translation import ugettext as _ from django.contrib.auth.models import User from django.contrib.sites.models import Site from django.contrib.sites.managers import CurrentSiteManager from foirequest.models import FoiRequest class FeaturedRequestManager(Cu...
from django.db import models from django.utils.translation import ugettext as _ from django.contrib.auth.models import User from django.contrib.sites.models import Site from django.contrib.sites.managers import CurrentSiteManager from foirequest.models import FoiRequest class FeaturedRequestManager(CurrentSiteManage...
from django.db import models from django.utils.translation import ugettext as _ from django.contrib.auth.models import User from django.contrib.sites.models import Site from django.contrib.sites.managers import CurrentSiteManager from foirequest.models import FoiRequest class FeaturedRequestManager(CurrentSiteManage...
<commit_before>from django.db import models from django.utils.translation import ugettext as _ from django.contrib.auth.models import User from django.contrib.sites.models import Site from django.contrib.sites.managers import CurrentSiteManager from foirequest.models import FoiRequest class FeaturedRequestManager(Cu...
960d38d139895dcefa946e29655d5f6eee3c4cf5
smileys/__init__.py
smileys/__init__.py
"""django-emoticons""" __version__ = '0.1' __license__ = 'BSD License' __author__ = 'Fantomas42' __email__ = '[email protected]' __url__ = 'https://github.com/Fantomas42/django-emoticons'
Add package datas in the module, with the new name and repo
Add package datas in the module, with the new name and repo
Python
bsd-3-clause
Fantomas42/django-emoticons,Fantomas42/django-emoticons
Add package datas in the module, with the new name and repo
"""django-emoticons""" __version__ = '0.1' __license__ = 'BSD License' __author__ = 'Fantomas42' __email__ = '[email protected]' __url__ = 'https://github.com/Fantomas42/django-emoticons'
<commit_before><commit_msg>Add package datas in the module, with the new name and repo<commit_after>
"""django-emoticons""" __version__ = '0.1' __license__ = 'BSD License' __author__ = 'Fantomas42' __email__ = '[email protected]' __url__ = 'https://github.com/Fantomas42/django-emoticons'
Add package datas in the module, with the new name and repo"""django-emoticons""" __version__ = '0.1' __license__ = 'BSD License' __author__ = 'Fantomas42' __email__ = '[email protected]' __url__ = 'https://github.com/Fantomas42/django-emoticons'
<commit_before><commit_msg>Add package datas in the module, with the new name and repo<commit_after>"""django-emoticons""" __version__ = '0.1' __license__ = 'BSD License' __author__ = 'Fantomas42' __email__ = '[email protected]' __url__ = 'https://github.com/Fantomas42/django-emoticons'
db81eaa5f05309be69f7b8d3aa12023c75387194
fellowms/forms.py
fellowms/forms.py
from django.forms import ModelForm, widgets from .models import Fellow, Event, Expense, Blog class FellowForm(ModelForm): class Meta: model = Fellow fields = '__all__' class EventForm(ModelForm): class Meta: model = Event exclude = [ "status", ...
from django.forms import ModelForm, widgets from .models import Fellow, Event, Expense, Blog class FellowForm(ModelForm): class Meta: model = Fellow fields = '__all__' class EventForm(ModelForm): class Meta: model = Event exclude = [ "status", ...
Fix public fields from Event
Fix public fields from Event
Python
bsd-3-clause
softwaresaved/fat,softwaresaved/fat,softwaresaved/fat,softwaresaved/fat
from django.forms import ModelForm, widgets from .models import Fellow, Event, Expense, Blog class FellowForm(ModelForm): class Meta: model = Fellow fields = '__all__' class EventForm(ModelForm): class Meta: model = Event exclude = [ "status", ...
from django.forms import ModelForm, widgets from .models import Fellow, Event, Expense, Blog class FellowForm(ModelForm): class Meta: model = Fellow fields = '__all__' class EventForm(ModelForm): class Meta: model = Event exclude = [ "status", ...
<commit_before>from django.forms import ModelForm, widgets from .models import Fellow, Event, Expense, Blog class FellowForm(ModelForm): class Meta: model = Fellow fields = '__all__' class EventForm(ModelForm): class Meta: model = Event exclude = [ "status", ...
from django.forms import ModelForm, widgets from .models import Fellow, Event, Expense, Blog class FellowForm(ModelForm): class Meta: model = Fellow fields = '__all__' class EventForm(ModelForm): class Meta: model = Event exclude = [ "status", ...
from django.forms import ModelForm, widgets from .models import Fellow, Event, Expense, Blog class FellowForm(ModelForm): class Meta: model = Fellow fields = '__all__' class EventForm(ModelForm): class Meta: model = Event exclude = [ "status", ...
<commit_before>from django.forms import ModelForm, widgets from .models import Fellow, Event, Expense, Blog class FellowForm(ModelForm): class Meta: model = Fellow fields = '__all__' class EventForm(ModelForm): class Meta: model = Event exclude = [ "status", ...
480d15042af807cea3e7e182d4588dc3a2f93e92
website/members/signals.py
website/members/signals.py
from django.conf import settings from django.core.mail import EmailMultiAlternatives from django.dispatch import receiver from django.template import loader from simple_email_confirmation import unconfirmed_email_created @receiver(unconfirmed_email_created, dispatch_uid='send_email_confirmation') def send_confirmati...
import datetime from django.conf import settings from django.core.mail import EmailMultiAlternatives from django.db.models.signals import pre_save from django.dispatch import receiver from django.template import loader from django.utils import timezone from simple_email_confirmation import unconfirmed_email_created fr...
Check membership when a Member is saved
Check membership when a Member is saved
Python
agpl-3.0
UTNkar/moore,Dekker1/moore,Dekker1/moore,UTNkar/moore,Dekker1/moore,UTNkar/moore,UTNkar/moore,Dekker1/moore
from django.conf import settings from django.core.mail import EmailMultiAlternatives from django.dispatch import receiver from django.template import loader from simple_email_confirmation import unconfirmed_email_created @receiver(unconfirmed_email_created, dispatch_uid='send_email_confirmation') def send_confirmati...
import datetime from django.conf import settings from django.core.mail import EmailMultiAlternatives from django.db.models.signals import pre_save from django.dispatch import receiver from django.template import loader from django.utils import timezone from simple_email_confirmation import unconfirmed_email_created fr...
<commit_before>from django.conf import settings from django.core.mail import EmailMultiAlternatives from django.dispatch import receiver from django.template import loader from simple_email_confirmation import unconfirmed_email_created @receiver(unconfirmed_email_created, dispatch_uid='send_email_confirmation') def ...
import datetime from django.conf import settings from django.core.mail import EmailMultiAlternatives from django.db.models.signals import pre_save from django.dispatch import receiver from django.template import loader from django.utils import timezone from simple_email_confirmation import unconfirmed_email_created fr...
from django.conf import settings from django.core.mail import EmailMultiAlternatives from django.dispatch import receiver from django.template import loader from simple_email_confirmation import unconfirmed_email_created @receiver(unconfirmed_email_created, dispatch_uid='send_email_confirmation') def send_confirmati...
<commit_before>from django.conf import settings from django.core.mail import EmailMultiAlternatives from django.dispatch import receiver from django.template import loader from simple_email_confirmation import unconfirmed_email_created @receiver(unconfirmed_email_created, dispatch_uid='send_email_confirmation') def ...
54fddabcb1609755281adc54d6a71bea6c697f43
parser.py
parser.py
#!/usr/bin/env python # -*- coding:utf-8 -*- # # Script for displaying pretty RSS feeds # from sys import argv import feedparser # Data for parsing data = feedparser.parse(argv[1]) # Display core feed properties print "\n\033[1mFeed title:\033[0m", data.feed.title if "description" in data.feed: if len(data.feed.d...
#!/usr/bin/env python # -*- coding:utf-8 -*- # # Script for displaying pretty RSS feeds # from sys import argv import feedparser # Data for parsing data = feedparser.parse(argv[1]) # Display core feed properties print "\n\033[1mFeed title:\033[0m", data.feed.title if "description" in data.feed: if len(data.feed.d...
Rename 'URL' to 'link' to match with .link property
Rename 'URL' to 'link' to match with .link property
Python
mit
ZDroid/feedstyl
#!/usr/bin/env python # -*- coding:utf-8 -*- # # Script for displaying pretty RSS feeds # from sys import argv import feedparser # Data for parsing data = feedparser.parse(argv[1]) # Display core feed properties print "\n\033[1mFeed title:\033[0m", data.feed.title if "description" in data.feed: if len(data.feed.d...
#!/usr/bin/env python # -*- coding:utf-8 -*- # # Script for displaying pretty RSS feeds # from sys import argv import feedparser # Data for parsing data = feedparser.parse(argv[1]) # Display core feed properties print "\n\033[1mFeed title:\033[0m", data.feed.title if "description" in data.feed: if len(data.feed.d...
<commit_before>#!/usr/bin/env python # -*- coding:utf-8 -*- # # Script for displaying pretty RSS feeds # from sys import argv import feedparser # Data for parsing data = feedparser.parse(argv[1]) # Display core feed properties print "\n\033[1mFeed title:\033[0m", data.feed.title if "description" in data.feed: if ...
#!/usr/bin/env python # -*- coding:utf-8 -*- # # Script for displaying pretty RSS feeds # from sys import argv import feedparser # Data for parsing data = feedparser.parse(argv[1]) # Display core feed properties print "\n\033[1mFeed title:\033[0m", data.feed.title if "description" in data.feed: if len(data.feed.d...
#!/usr/bin/env python # -*- coding:utf-8 -*- # # Script for displaying pretty RSS feeds # from sys import argv import feedparser # Data for parsing data = feedparser.parse(argv[1]) # Display core feed properties print "\n\033[1mFeed title:\033[0m", data.feed.title if "description" in data.feed: if len(data.feed.d...
<commit_before>#!/usr/bin/env python # -*- coding:utf-8 -*- # # Script for displaying pretty RSS feeds # from sys import argv import feedparser # Data for parsing data = feedparser.parse(argv[1]) # Display core feed properties print "\n\033[1mFeed title:\033[0m", data.feed.title if "description" in data.feed: if ...
a7b247d7fc44518b58a91eeadc12ac418daf3889
syncplay/__init__.py
syncplay/__init__.py
version = '1.6.7' revision = ' development' milestone = 'Yoitsu' release_number = '92' projectURL = 'https://syncplay.pl/'
version = '1.6.7' revision = ' beta 1' milestone = 'Yoitsu' release_number = '93' projectURL = 'https://syncplay.pl/'
Mark as 1.6.7 beta 1
Mark as 1.6.7 beta 1
Python
apache-2.0
alby128/syncplay,Syncplay/syncplay,Syncplay/syncplay,alby128/syncplay
version = '1.6.7' revision = ' development' milestone = 'Yoitsu' release_number = '92' projectURL = 'https://syncplay.pl/' Mark as 1.6.7 beta 1
version = '1.6.7' revision = ' beta 1' milestone = 'Yoitsu' release_number = '93' projectURL = 'https://syncplay.pl/'
<commit_before>version = '1.6.7' revision = ' development' milestone = 'Yoitsu' release_number = '92' projectURL = 'https://syncplay.pl/' <commit_msg>Mark as 1.6.7 beta 1<commit_after>
version = '1.6.7' revision = ' beta 1' milestone = 'Yoitsu' release_number = '93' projectURL = 'https://syncplay.pl/'
version = '1.6.7' revision = ' development' milestone = 'Yoitsu' release_number = '92' projectURL = 'https://syncplay.pl/' Mark as 1.6.7 beta 1version = '1.6.7' revision = ' beta 1' milestone = 'Yoitsu' release_number = '93' projectURL = 'https://syncplay.pl/'
<commit_before>version = '1.6.7' revision = ' development' milestone = 'Yoitsu' release_number = '92' projectURL = 'https://syncplay.pl/' <commit_msg>Mark as 1.6.7 beta 1<commit_after>version = '1.6.7' revision = ' beta 1' milestone = 'Yoitsu' release_number = '93' projectURL = 'https://syncplay.pl/'
fdf7f92a76fb6848f86194507b9a6fe8f0ab0171
hours_slept_time_series.py
hours_slept_time_series.py
import plotly as py import plotly.graph_objs as go from datetime import datetime from sys import argv import names from csvparser import parse data_file = argv[1] raw_data = parse(data_file) sleep_durations = [] sleep_dates = [] nap_durations = [] nap_dates = [] for date, rests in raw_data.items(): sleep_total =...
import plotly as py import plotly.graph_objs as go from datetime import datetime from sys import argv import names from csvparser import parse data_file = argv[1] raw_data = parse(data_file) sleep_durations = [] nap_durations = [] for date, rests in raw_data.items(): sleep_total = nap_total = 0 for r in rest...
Remove unused |date| array variables
Remove unused |date| array variables
Python
mit
f-jiang/sleep-pattern-grapher
import plotly as py import plotly.graph_objs as go from datetime import datetime from sys import argv import names from csvparser import parse data_file = argv[1] raw_data = parse(data_file) sleep_durations = [] sleep_dates = [] nap_durations = [] nap_dates = [] for date, rests in raw_data.items(): sleep_total =...
import plotly as py import plotly.graph_objs as go from datetime import datetime from sys import argv import names from csvparser import parse data_file = argv[1] raw_data = parse(data_file) sleep_durations = [] nap_durations = [] for date, rests in raw_data.items(): sleep_total = nap_total = 0 for r in rest...
<commit_before>import plotly as py import plotly.graph_objs as go from datetime import datetime from sys import argv import names from csvparser import parse data_file = argv[1] raw_data = parse(data_file) sleep_durations = [] sleep_dates = [] nap_durations = [] nap_dates = [] for date, rests in raw_data.items(): ...
import plotly as py import plotly.graph_objs as go from datetime import datetime from sys import argv import names from csvparser import parse data_file = argv[1] raw_data = parse(data_file) sleep_durations = [] nap_durations = [] for date, rests in raw_data.items(): sleep_total = nap_total = 0 for r in rest...
import plotly as py import plotly.graph_objs as go from datetime import datetime from sys import argv import names from csvparser import parse data_file = argv[1] raw_data = parse(data_file) sleep_durations = [] sleep_dates = [] nap_durations = [] nap_dates = [] for date, rests in raw_data.items(): sleep_total =...
<commit_before>import plotly as py import plotly.graph_objs as go from datetime import datetime from sys import argv import names from csvparser import parse data_file = argv[1] raw_data = parse(data_file) sleep_durations = [] sleep_dates = [] nap_durations = [] nap_dates = [] for date, rests in raw_data.items(): ...
69ce80d9bbba46a7934802f4693877cb26903f99
usingnamespace/api/traversal/v1/entries.py
usingnamespace/api/traversal/v1/entries.py
import logging log = logging.getLogger(__name__) from uuid import UUID from pyramid.compat import string_types from .... import models as m class Entries(object): """Entries Traversal object for a site ID """ __name__ = None __parent__ = None def __init__(self): self.__name__ = 'e...
import logging log = logging.getLogger(__name__) from uuid import UUID from pyramid.compat import string_types from .... import models as m class Entries(object): """Entries Traversal object for a site ID """ __name__ = None __parent__ = None def __init__(self): self.__name__ = 'e...
Call parent with last set to True
Call parent with last set to True This way we get __parent__.site set to a valid site, or it raises an error. We may want to change this in the future...
Python
isc
usingnamespace/usingnamespace
import logging log = logging.getLogger(__name__) from uuid import UUID from pyramid.compat import string_types from .... import models as m class Entries(object): """Entries Traversal object for a site ID """ __name__ = None __parent__ = None def __init__(self): self.__name__ = 'e...
import logging log = logging.getLogger(__name__) from uuid import UUID from pyramid.compat import string_types from .... import models as m class Entries(object): """Entries Traversal object for a site ID """ __name__ = None __parent__ = None def __init__(self): self.__name__ = 'e...
<commit_before>import logging log = logging.getLogger(__name__) from uuid import UUID from pyramid.compat import string_types from .... import models as m class Entries(object): """Entries Traversal object for a site ID """ __name__ = None __parent__ = None def __init__(self): sel...
import logging log = logging.getLogger(__name__) from uuid import UUID from pyramid.compat import string_types from .... import models as m class Entries(object): """Entries Traversal object for a site ID """ __name__ = None __parent__ = None def __init__(self): self.__name__ = 'e...
import logging log = logging.getLogger(__name__) from uuid import UUID from pyramid.compat import string_types from .... import models as m class Entries(object): """Entries Traversal object for a site ID """ __name__ = None __parent__ = None def __init__(self): self.__name__ = 'e...
<commit_before>import logging log = logging.getLogger(__name__) from uuid import UUID from pyramid.compat import string_types from .... import models as m class Entries(object): """Entries Traversal object for a site ID """ __name__ = None __parent__ = None def __init__(self): sel...
22db373a8b33b201a8964b3f518434289b2a57af
app/__init__.py
app/__init__.py
from flask import Flask from flask.ext.bootstrap import Bootstrap from flask.ext.mail import Mail from flask.ext.moment import Moment from flask.ext.sqlalchemy import SQLAlchemy from flask.ext.login import LoginManager from config import config bootstrap = Bootstrap() mail = Mail() moment = Moment() db = SQLAlchemy() ...
from flask import Flask from flask.ext.bootstrap import Bootstrap from flask.ext.mail import Mail from flask.ext.moment import Moment from flask.ext.sqlalchemy import SQLAlchemy from flask.ext.login import LoginManager from config import config bootstrap = Bootstrap() mail = Mail() moment = Moment() db = SQLAlchemy() ...
Remove duplicate Flask-Login session protection setting
Remove duplicate Flask-Login session protection setting
Python
mit
richgieg/flask-now,richgieg/flask-now
from flask import Flask from flask.ext.bootstrap import Bootstrap from flask.ext.mail import Mail from flask.ext.moment import Moment from flask.ext.sqlalchemy import SQLAlchemy from flask.ext.login import LoginManager from config import config bootstrap = Bootstrap() mail = Mail() moment = Moment() db = SQLAlchemy() ...
from flask import Flask from flask.ext.bootstrap import Bootstrap from flask.ext.mail import Mail from flask.ext.moment import Moment from flask.ext.sqlalchemy import SQLAlchemy from flask.ext.login import LoginManager from config import config bootstrap = Bootstrap() mail = Mail() moment = Moment() db = SQLAlchemy() ...
<commit_before>from flask import Flask from flask.ext.bootstrap import Bootstrap from flask.ext.mail import Mail from flask.ext.moment import Moment from flask.ext.sqlalchemy import SQLAlchemy from flask.ext.login import LoginManager from config import config bootstrap = Bootstrap() mail = Mail() moment = Moment() db ...
from flask import Flask from flask.ext.bootstrap import Bootstrap from flask.ext.mail import Mail from flask.ext.moment import Moment from flask.ext.sqlalchemy import SQLAlchemy from flask.ext.login import LoginManager from config import config bootstrap = Bootstrap() mail = Mail() moment = Moment() db = SQLAlchemy() ...
from flask import Flask from flask.ext.bootstrap import Bootstrap from flask.ext.mail import Mail from flask.ext.moment import Moment from flask.ext.sqlalchemy import SQLAlchemy from flask.ext.login import LoginManager from config import config bootstrap = Bootstrap() mail = Mail() moment = Moment() db = SQLAlchemy() ...
<commit_before>from flask import Flask from flask.ext.bootstrap import Bootstrap from flask.ext.mail import Mail from flask.ext.moment import Moment from flask.ext.sqlalchemy import SQLAlchemy from flask.ext.login import LoginManager from config import config bootstrap = Bootstrap() mail = Mail() moment = Moment() db ...
6321d2e86db0de359886f5e69509dad428778bbf
shop/management/commands/shopcustomers.py
shop/management/commands/shopcustomers.py
# -*- coding: utf-8 -*- from __future__ import unicode_literals from optparse import make_option from django.core.management.base import BaseCommand from django.utils.translation import ugettext_lazy as _ class Command(BaseCommand): help = _("Collect information about all customers which accessed this shop.") ...
# -*- coding: utf-8 -*- from __future__ import unicode_literals from optparse import make_option from django.core.management.base import BaseCommand from django.utils.translation import ugettext_lazy as _ class Command(BaseCommand): help = _("Collect information about all customers which accessed this shop.") ...
Use the new django management commands definition (ArgumentParser)
Use the new django management commands definition (ArgumentParser)
Python
bsd-3-clause
jrief/django-shop,jrief/django-shop,divio/django-shop,awesto/django-shop,nimbis/django-shop,nimbis/django-shop,khchine5/django-shop,awesto/django-shop,jrief/django-shop,nimbis/django-shop,awesto/django-shop,khchine5/django-shop,nimbis/django-shop,jrief/django-shop,divio/django-shop,khchine5/django-shop,divio/django-sho...
# -*- coding: utf-8 -*- from __future__ import unicode_literals from optparse import make_option from django.core.management.base import BaseCommand from django.utils.translation import ugettext_lazy as _ class Command(BaseCommand): help = _("Collect information about all customers which accessed this shop.") ...
# -*- coding: utf-8 -*- from __future__ import unicode_literals from optparse import make_option from django.core.management.base import BaseCommand from django.utils.translation import ugettext_lazy as _ class Command(BaseCommand): help = _("Collect information about all customers which accessed this shop.") ...
<commit_before># -*- coding: utf-8 -*- from __future__ import unicode_literals from optparse import make_option from django.core.management.base import BaseCommand from django.utils.translation import ugettext_lazy as _ class Command(BaseCommand): help = _("Collect information about all customers which accessed t...
# -*- coding: utf-8 -*- from __future__ import unicode_literals from optparse import make_option from django.core.management.base import BaseCommand from django.utils.translation import ugettext_lazy as _ class Command(BaseCommand): help = _("Collect information about all customers which accessed this shop.") ...
# -*- coding: utf-8 -*- from __future__ import unicode_literals from optparse import make_option from django.core.management.base import BaseCommand from django.utils.translation import ugettext_lazy as _ class Command(BaseCommand): help = _("Collect information about all customers which accessed this shop.") ...
<commit_before># -*- coding: utf-8 -*- from __future__ import unicode_literals from optparse import make_option from django.core.management.base import BaseCommand from django.utils.translation import ugettext_lazy as _ class Command(BaseCommand): help = _("Collect information about all customers which accessed t...
4647183697170ce22910bd6cde27746297543514
python3_tools/get_edx_webservices.py
python3_tools/get_edx_webservices.py
import github from get_repos import * webservices = [] for repo in expanded_repos_list(orgs): try: metadata = get_remote_yaml(repo, 'openedx.yaml') except github.GithubException: continue if 'tags' in metadata and 'webservice' in metadata['tags']: print("{}".format(repo.html_url))...
import github from get_repos import orgs, expanded_repos_list, get_remote_yaml webservices = [] for repo in expanded_repos_list(orgs): try: metadata = get_remote_yaml(repo, 'openedx.yaml') except github.GithubException: continue if 'tags' in metadata and 'webservice' in metadata['tags']: ...
Add tooling to get all of edx's web services.
Add tooling to get all of edx's web services.
Python
apache-2.0
edx/repo-tools,edx/repo-tools
import github from get_repos import * webservices = [] for repo in expanded_repos_list(orgs): try: metadata = get_remote_yaml(repo, 'openedx.yaml') except github.GithubException: continue if 'tags' in metadata and 'webservice' in metadata['tags']: print("{}".format(repo.html_url))...
import github from get_repos import orgs, expanded_repos_list, get_remote_yaml webservices = [] for repo in expanded_repos_list(orgs): try: metadata = get_remote_yaml(repo, 'openedx.yaml') except github.GithubException: continue if 'tags' in metadata and 'webservice' in metadata['tags']: ...
<commit_before>import github from get_repos import * webservices = [] for repo in expanded_repos_list(orgs): try: metadata = get_remote_yaml(repo, 'openedx.yaml') except github.GithubException: continue if 'tags' in metadata and 'webservice' in metadata['tags']: print("{}".format(...
import github from get_repos import orgs, expanded_repos_list, get_remote_yaml webservices = [] for repo in expanded_repos_list(orgs): try: metadata = get_remote_yaml(repo, 'openedx.yaml') except github.GithubException: continue if 'tags' in metadata and 'webservice' in metadata['tags']: ...
import github from get_repos import * webservices = [] for repo in expanded_repos_list(orgs): try: metadata = get_remote_yaml(repo, 'openedx.yaml') except github.GithubException: continue if 'tags' in metadata and 'webservice' in metadata['tags']: print("{}".format(repo.html_url))...
<commit_before>import github from get_repos import * webservices = [] for repo in expanded_repos_list(orgs): try: metadata = get_remote_yaml(repo, 'openedx.yaml') except github.GithubException: continue if 'tags' in metadata and 'webservice' in metadata['tags']: print("{}".format(...
e1985056a11ca3fff3896d2e4126b6cdf048336d
scrape_affiliation.py
scrape_affiliation.py
import requests from lxml import html, etree def scrape_acm(page): tree = html.fromstring(page.content) author_affiliations = [] authors = tree.xpath('//td/a[@title="Author Profile Page"]') for a in authors: affiliation = a.getparent().getnext().find("a/small") # If we don't find it und...
import requests from lxml import html, etree def scrape_acm(page): tree = html.fromstring(page.content) author_affiliations = [] # The ACM author affiliations are stored in a kind of nasty table layout, # best to view source or inspect element on their page for an explanation of this. authors = tre...
Add comment on ACM affil structure
Add comment on ACM affil structure
Python
mit
Twinklebear/dataviscourse-pr-collaboration-networks,Twinklebear/dataviscourse-pr-collaboration-networks,Twinklebear/dataviscourse-pr-collaboration-networks
import requests from lxml import html, etree def scrape_acm(page): tree = html.fromstring(page.content) author_affiliations = [] authors = tree.xpath('//td/a[@title="Author Profile Page"]') for a in authors: affiliation = a.getparent().getnext().find("a/small") # If we don't find it und...
import requests from lxml import html, etree def scrape_acm(page): tree = html.fromstring(page.content) author_affiliations = [] # The ACM author affiliations are stored in a kind of nasty table layout, # best to view source or inspect element on their page for an explanation of this. authors = tre...
<commit_before>import requests from lxml import html, etree def scrape_acm(page): tree = html.fromstring(page.content) author_affiliations = [] authors = tree.xpath('//td/a[@title="Author Profile Page"]') for a in authors: affiliation = a.getparent().getnext().find("a/small") # If we do...
import requests from lxml import html, etree def scrape_acm(page): tree = html.fromstring(page.content) author_affiliations = [] # The ACM author affiliations are stored in a kind of nasty table layout, # best to view source or inspect element on their page for an explanation of this. authors = tre...
import requests from lxml import html, etree def scrape_acm(page): tree = html.fromstring(page.content) author_affiliations = [] authors = tree.xpath('//td/a[@title="Author Profile Page"]') for a in authors: affiliation = a.getparent().getnext().find("a/small") # If we don't find it und...
<commit_before>import requests from lxml import html, etree def scrape_acm(page): tree = html.fromstring(page.content) author_affiliations = [] authors = tree.xpath('//td/a[@title="Author Profile Page"]') for a in authors: affiliation = a.getparent().getnext().find("a/small") # If we do...
457e220ec4a401325b5078c6561c4ca8634d8b60
projecteuler/problems/problem_12.py
projecteuler/problems/problem_12.py
"""Problem 12 of https://projecteuler.net""" from projecteuler.maths_functions import factor_count from itertools import count def problem_12(): """Solution to problem 12.""" # Triangle number can be defined as n(n+1)/2. # n and n+1 share only the factor 1. # Therefore the total number of factors of ...
"""Problem 12 of https://projecteuler.net""" from projecteuler.maths_functions import factor_count from itertools import count def problem_12(): """Solution to problem 12.""" # Triangle number can be defined as n(n+1)/2. # n and n+1 share only the factor 1. # Therefore the total number of factors of ...
Refactor problem 12 to increase test coverage
Refactor problem 12 to increase test coverage
Python
mit
hjheath/ProjectEuler,heathy/ProjectEuler
"""Problem 12 of https://projecteuler.net""" from projecteuler.maths_functions import factor_count from itertools import count def problem_12(): """Solution to problem 12.""" # Triangle number can be defined as n(n+1)/2. # n and n+1 share only the factor 1. # Therefore the total number of factors of ...
"""Problem 12 of https://projecteuler.net""" from projecteuler.maths_functions import factor_count from itertools import count def problem_12(): """Solution to problem 12.""" # Triangle number can be defined as n(n+1)/2. # n and n+1 share only the factor 1. # Therefore the total number of factors of ...
<commit_before>"""Problem 12 of https://projecteuler.net""" from projecteuler.maths_functions import factor_count from itertools import count def problem_12(): """Solution to problem 12.""" # Triangle number can be defined as n(n+1)/2. # n and n+1 share only the factor 1. # Therefore the total number...
"""Problem 12 of https://projecteuler.net""" from projecteuler.maths_functions import factor_count from itertools import count def problem_12(): """Solution to problem 12.""" # Triangle number can be defined as n(n+1)/2. # n and n+1 share only the factor 1. # Therefore the total number of factors of ...
"""Problem 12 of https://projecteuler.net""" from projecteuler.maths_functions import factor_count from itertools import count def problem_12(): """Solution to problem 12.""" # Triangle number can be defined as n(n+1)/2. # n and n+1 share only the factor 1. # Therefore the total number of factors of ...
<commit_before>"""Problem 12 of https://projecteuler.net""" from projecteuler.maths_functions import factor_count from itertools import count def problem_12(): """Solution to problem 12.""" # Triangle number can be defined as n(n+1)/2. # n and n+1 share only the factor 1. # Therefore the total number...
d60d4a039008775b80a56eda4830f06ab9250f2c
waterfall_wall/serializers.py
waterfall_wall/serializers.py
from django.contrib.auth.models import User, Group from waterfall_wall.models import Image from rest_framework import serializers class ImageSerializer(serializers.HyperlinkedModelSerializer): url = serializers.SerializerMethodField() def get_url(self, obj): return obj.path.url class Meta: ...
from django.contrib.auth.models import User, Group from waterfall_wall.models import Image from rest_framework import serializers class ImageSerializer(serializers.HyperlinkedModelSerializer): url = serializers.SerializerMethodField() def get_url(self, obj): return obj.path.url class Meta: ...
Add id in image API response
Add id in image API response
Python
mit
carlcarl/rcard,carlcarl/rcard
from django.contrib.auth.models import User, Group from waterfall_wall.models import Image from rest_framework import serializers class ImageSerializer(serializers.HyperlinkedModelSerializer): url = serializers.SerializerMethodField() def get_url(self, obj): return obj.path.url class Meta: ...
from django.contrib.auth.models import User, Group from waterfall_wall.models import Image from rest_framework import serializers class ImageSerializer(serializers.HyperlinkedModelSerializer): url = serializers.SerializerMethodField() def get_url(self, obj): return obj.path.url class Meta: ...
<commit_before>from django.contrib.auth.models import User, Group from waterfall_wall.models import Image from rest_framework import serializers class ImageSerializer(serializers.HyperlinkedModelSerializer): url = serializers.SerializerMethodField() def get_url(self, obj): return obj.path.url cl...
from django.contrib.auth.models import User, Group from waterfall_wall.models import Image from rest_framework import serializers class ImageSerializer(serializers.HyperlinkedModelSerializer): url = serializers.SerializerMethodField() def get_url(self, obj): return obj.path.url class Meta: ...
from django.contrib.auth.models import User, Group from waterfall_wall.models import Image from rest_framework import serializers class ImageSerializer(serializers.HyperlinkedModelSerializer): url = serializers.SerializerMethodField() def get_url(self, obj): return obj.path.url class Meta: ...
<commit_before>from django.contrib.auth.models import User, Group from waterfall_wall.models import Image from rest_framework import serializers class ImageSerializer(serializers.HyperlinkedModelSerializer): url = serializers.SerializerMethodField() def get_url(self, obj): return obj.path.url cl...
88393283ff5e7f7720a98eda5eec8fa53b30f700
grains/grains.py
grains/grains.py
# File: grains.py # Purpose: Write a program that calculates the number of grains of wheat # on a chessboard given that the number on each square doubles. # Programmer: Amal Shehu # Course: Exercism # Date: Sunday 18 September 2016, 05:25 PM import itertools square = [x for x in r...
# File: grains.py # Purpose: Write a program that calculates the number of grains of wheat # on a chessboard given that the number on each square doubles. # Programmer: Amal Shehu # Course: Exercism # Date: Sunday 18 September 2016, 05:25 PM import itertools square = [x for x in r...
Add condition to avoid index error
Add condition to avoid index error
Python
mit
amalshehu/exercism-python
# File: grains.py # Purpose: Write a program that calculates the number of grains of wheat # on a chessboard given that the number on each square doubles. # Programmer: Amal Shehu # Course: Exercism # Date: Sunday 18 September 2016, 05:25 PM import itertools square = [x for x in r...
# File: grains.py # Purpose: Write a program that calculates the number of grains of wheat # on a chessboard given that the number on each square doubles. # Programmer: Amal Shehu # Course: Exercism # Date: Sunday 18 September 2016, 05:25 PM import itertools square = [x for x in r...
<commit_before># File: grains.py # Purpose: Write a program that calculates the number of grains of wheat # on a chessboard given that the number on each square doubles. # Programmer: Amal Shehu # Course: Exercism # Date: Sunday 18 September 2016, 05:25 PM import itertools square ...
# File: grains.py # Purpose: Write a program that calculates the number of grains of wheat # on a chessboard given that the number on each square doubles. # Programmer: Amal Shehu # Course: Exercism # Date: Sunday 18 September 2016, 05:25 PM import itertools square = [x for x in r...
# File: grains.py # Purpose: Write a program that calculates the number of grains of wheat # on a chessboard given that the number on each square doubles. # Programmer: Amal Shehu # Course: Exercism # Date: Sunday 18 September 2016, 05:25 PM import itertools square = [x for x in r...
<commit_before># File: grains.py # Purpose: Write a program that calculates the number of grains of wheat # on a chessboard given that the number on each square doubles. # Programmer: Amal Shehu # Course: Exercism # Date: Sunday 18 September 2016, 05:25 PM import itertools square ...
9accbde96f493ba795eef3d102a41aeecc039dce
grep_sal_code.py
grep_sal_code.py
#!/usr/bin/python import argparse import subprocess import sys EXCLUSIONS = ['*.pyc', '*.log', 'venv*', 'static/*', 'site_static/*', 'datatableview/*', '*.db'] def main(): args = parse_args() # Normally we like to build subprocess commands in lists, but it's # a lot easier to do all of the globbing we...
#!/usr/bin/python import argparse import os import subprocess import sys EXCLUSIONS = ['*.pyc', '*.log', 'venv*', 'static/*', 'site_static/*', 'datatableview/*', '*.db'] def main(): args = parse_args() # Normally we like to build subprocess commands in lists, but it's # a lot easier to do all of the g...
Add straight-to-editor feature to grep script.
Add straight-to-editor feature to grep script.
Python
apache-2.0
sheagcraig/sal,salopensource/sal,salopensource/sal,salopensource/sal,sheagcraig/sal,sheagcraig/sal,sheagcraig/sal,salopensource/sal
#!/usr/bin/python import argparse import subprocess import sys EXCLUSIONS = ['*.pyc', '*.log', 'venv*', 'static/*', 'site_static/*', 'datatableview/*', '*.db'] def main(): args = parse_args() # Normally we like to build subprocess commands in lists, but it's # a lot easier to do all of the globbing we...
#!/usr/bin/python import argparse import os import subprocess import sys EXCLUSIONS = ['*.pyc', '*.log', 'venv*', 'static/*', 'site_static/*', 'datatableview/*', '*.db'] def main(): args = parse_args() # Normally we like to build subprocess commands in lists, but it's # a lot easier to do all of the g...
<commit_before>#!/usr/bin/python import argparse import subprocess import sys EXCLUSIONS = ['*.pyc', '*.log', 'venv*', 'static/*', 'site_static/*', 'datatableview/*', '*.db'] def main(): args = parse_args() # Normally we like to build subprocess commands in lists, but it's # a lot easier to do all of ...
#!/usr/bin/python import argparse import os import subprocess import sys EXCLUSIONS = ['*.pyc', '*.log', 'venv*', 'static/*', 'site_static/*', 'datatableview/*', '*.db'] def main(): args = parse_args() # Normally we like to build subprocess commands in lists, but it's # a lot easier to do all of the g...
#!/usr/bin/python import argparse import subprocess import sys EXCLUSIONS = ['*.pyc', '*.log', 'venv*', 'static/*', 'site_static/*', 'datatableview/*', '*.db'] def main(): args = parse_args() # Normally we like to build subprocess commands in lists, but it's # a lot easier to do all of the globbing we...
<commit_before>#!/usr/bin/python import argparse import subprocess import sys EXCLUSIONS = ['*.pyc', '*.log', 'venv*', 'static/*', 'site_static/*', 'datatableview/*', '*.db'] def main(): args = parse_args() # Normally we like to build subprocess commands in lists, but it's # a lot easier to do all of ...
647707293524440f014ed0a3ef7d4322a96775e4
tests/example_app/flask_app.py
tests/example_app/flask_app.py
import flask from pale.adapters import flask as pale_flask_adapter from tests.example_app import api def create_pale_flask_app(): """Creates a flask app, and registers a blueprint bound to pale.""" blueprint = flask.Blueprint('api', 'tests.example_app') pale_flask_adapter.bind_blueprint(api, blueprint) ...
import flask from pale.adapters import flask as pale_flask_adapter from pale.config import authenticator, context_creator from tests.example_app import api @authenticator def authenticate_pale_context(context): """Don't actually authenticate anything in this test.""" return context @context_creator def cre...
Add authenticator and context creator to example app
Add authenticator and context creator to example app
Python
mit
Loudr/pale
import flask from pale.adapters import flask as pale_flask_adapter from tests.example_app import api def create_pale_flask_app(): """Creates a flask app, and registers a blueprint bound to pale.""" blueprint = flask.Blueprint('api', 'tests.example_app') pale_flask_adapter.bind_blueprint(api, blueprint) ...
import flask from pale.adapters import flask as pale_flask_adapter from pale.config import authenticator, context_creator from tests.example_app import api @authenticator def authenticate_pale_context(context): """Don't actually authenticate anything in this test.""" return context @context_creator def cre...
<commit_before>import flask from pale.adapters import flask as pale_flask_adapter from tests.example_app import api def create_pale_flask_app(): """Creates a flask app, and registers a blueprint bound to pale.""" blueprint = flask.Blueprint('api', 'tests.example_app') pale_flask_adapter.bind_blueprint(a...
import flask from pale.adapters import flask as pale_flask_adapter from pale.config import authenticator, context_creator from tests.example_app import api @authenticator def authenticate_pale_context(context): """Don't actually authenticate anything in this test.""" return context @context_creator def cre...
import flask from pale.adapters import flask as pale_flask_adapter from tests.example_app import api def create_pale_flask_app(): """Creates a flask app, and registers a blueprint bound to pale.""" blueprint = flask.Blueprint('api', 'tests.example_app') pale_flask_adapter.bind_blueprint(api, blueprint) ...
<commit_before>import flask from pale.adapters import flask as pale_flask_adapter from tests.example_app import api def create_pale_flask_app(): """Creates a flask app, and registers a blueprint bound to pale.""" blueprint = flask.Blueprint('api', 'tests.example_app') pale_flask_adapter.bind_blueprint(a...
1df4a955e80fc82cc88c049e2d9a606845cfb326
azure-mgmt-resource/azure/mgmt/resource/__init__.py
azure-mgmt-resource/azure/mgmt/resource/__init__.py
# coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. # --------------------------------------------------------------------...
# coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. # --------------------------------------------------------------------...
Update alias ManagedApplicationClient to ApplicationClient
Update alias ManagedApplicationClient to ApplicationClient
Python
mit
Azure/azure-sdk-for-python,AutorestCI/azure-sdk-for-python,Azure/azure-sdk-for-python,Azure/azure-sdk-for-python,Azure/azure-sdk-for-python,lmazuel/azure-sdk-for-python
# coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. # --------------------------------------------------------------------...
# coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. # --------------------------------------------------------------------...
<commit_before># coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. # -----------------------------------------------------...
# coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. # --------------------------------------------------------------------...
# coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. # --------------------------------------------------------------------...
<commit_before># coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. # -----------------------------------------------------...
1ec5327918e11f76cb3d0dd2699585433d4d6058
reddit_adzerk/__init__.py
reddit_adzerk/__init__.py
from r2.lib.plugin import Plugin from r2.lib.js import Module class Adzerk(Plugin): needs_static_build = True js = { 'reddit': Module('reddit.js', 'adzerk/adzerk.js', ) } def load_controllers(self): # replace the standard Ads view with an Adzerk specific one. ...
from r2.lib.plugin import Plugin from r2.lib.js import Module class Adzerk(Plugin): needs_static_build = True js = { 'reddit-init': Module('reddit-init.js', 'adzerk/adzerk.js', ) } def load_controllers(self): # replace the standard Ads view with an Adzerk specific...
Move adzerk.js into reddit-init to fix race condition.
Move adzerk.js into reddit-init to fix race condition. This should ensure that the Adzerk postMessage receiver is loaded before Adzerk gets its payloads.
Python
bsd-3-clause
madbook/reddit-plugin-adzerk,madbook/reddit-plugin-adzerk,madbook/reddit-plugin-adzerk
from r2.lib.plugin import Plugin from r2.lib.js import Module class Adzerk(Plugin): needs_static_build = True js = { 'reddit': Module('reddit.js', 'adzerk/adzerk.js', ) } def load_controllers(self): # replace the standard Ads view with an Adzerk specific one. ...
from r2.lib.plugin import Plugin from r2.lib.js import Module class Adzerk(Plugin): needs_static_build = True js = { 'reddit-init': Module('reddit-init.js', 'adzerk/adzerk.js', ) } def load_controllers(self): # replace the standard Ads view with an Adzerk specific...
<commit_before>from r2.lib.plugin import Plugin from r2.lib.js import Module class Adzerk(Plugin): needs_static_build = True js = { 'reddit': Module('reddit.js', 'adzerk/adzerk.js', ) } def load_controllers(self): # replace the standard Ads view with an Adzerk spe...
from r2.lib.plugin import Plugin from r2.lib.js import Module class Adzerk(Plugin): needs_static_build = True js = { 'reddit-init': Module('reddit-init.js', 'adzerk/adzerk.js', ) } def load_controllers(self): # replace the standard Ads view with an Adzerk specific...
from r2.lib.plugin import Plugin from r2.lib.js import Module class Adzerk(Plugin): needs_static_build = True js = { 'reddit': Module('reddit.js', 'adzerk/adzerk.js', ) } def load_controllers(self): # replace the standard Ads view with an Adzerk specific one. ...
<commit_before>from r2.lib.plugin import Plugin from r2.lib.js import Module class Adzerk(Plugin): needs_static_build = True js = { 'reddit': Module('reddit.js', 'adzerk/adzerk.js', ) } def load_controllers(self): # replace the standard Ads view with an Adzerk spe...
4227b5fb52c58304f993d2def11aeb1ed4d5a157
src/urldecorators/urlresolvers.py
src/urldecorators/urlresolvers.py
import types from django.core import urlresolvers as django_urlresolvers from django.utils.functional import curry class DecoratorMixin(object): """ Mixin class to return decorated views from RegexURLPattern/RegexURLResolver """ def __init__(self, *args, **kwargs): super(DecoratorMixin, s...
import types from django.core import urlresolvers as django_urlresolvers from django.utils.functional import curry class DecoratorMixin(object): """ Mixin class to return decorated views from RegexURLPattern/RegexURLResolver """ def __init__(self, *args, **kwargs): super(DecoratorMixin, s...
Fix for the new ResolverMatch object in Django 1.3.
Fix for the new ResolverMatch object in Django 1.3.
Python
bsd-3-clause
mila/django-urldecorators,mila/django-urldecorators
import types from django.core import urlresolvers as django_urlresolvers from django.utils.functional import curry class DecoratorMixin(object): """ Mixin class to return decorated views from RegexURLPattern/RegexURLResolver """ def __init__(self, *args, **kwargs): super(DecoratorMixin, s...
import types from django.core import urlresolvers as django_urlresolvers from django.utils.functional import curry class DecoratorMixin(object): """ Mixin class to return decorated views from RegexURLPattern/RegexURLResolver """ def __init__(self, *args, **kwargs): super(DecoratorMixin, s...
<commit_before> import types from django.core import urlresolvers as django_urlresolvers from django.utils.functional import curry class DecoratorMixin(object): """ Mixin class to return decorated views from RegexURLPattern/RegexURLResolver """ def __init__(self, *args, **kwargs): super(De...
import types from django.core import urlresolvers as django_urlresolvers from django.utils.functional import curry class DecoratorMixin(object): """ Mixin class to return decorated views from RegexURLPattern/RegexURLResolver """ def __init__(self, *args, **kwargs): super(DecoratorMixin, s...
import types from django.core import urlresolvers as django_urlresolvers from django.utils.functional import curry class DecoratorMixin(object): """ Mixin class to return decorated views from RegexURLPattern/RegexURLResolver """ def __init__(self, *args, **kwargs): super(DecoratorMixin, s...
<commit_before> import types from django.core import urlresolvers as django_urlresolvers from django.utils.functional import curry class DecoratorMixin(object): """ Mixin class to return decorated views from RegexURLPattern/RegexURLResolver """ def __init__(self, *args, **kwargs): super(De...
48f281127eb1adf2c1a88dee3759cec41fb95924
gears/finders.py
gears/finders.py
import os from .exceptions import ImproperlyConfigured from .utils import safe_join class BaseFinder(object): def find(self, path, all=False): raise NotImplementedError() class FileSystemFinder(BaseFinder): def __init__(self, directories): self.locations = [] if not isinstance(dire...
import os from .exceptions import ImproperlyConfigured from .utils import safe_join class BaseFinder(object): def find(self, path, all=False): raise NotImplementedError() class FileSystemFinder(BaseFinder): def __init__(self, directories): self.locations = [] if not isinstance(dire...
Fix FileSystemFinder's find return value if not all
Fix FileSystemFinder's find return value if not all
Python
isc
gears/gears,gears/gears,gears/gears
import os from .exceptions import ImproperlyConfigured from .utils import safe_join class BaseFinder(object): def find(self, path, all=False): raise NotImplementedError() class FileSystemFinder(BaseFinder): def __init__(self, directories): self.locations = [] if not isinstance(dire...
import os from .exceptions import ImproperlyConfigured from .utils import safe_join class BaseFinder(object): def find(self, path, all=False): raise NotImplementedError() class FileSystemFinder(BaseFinder): def __init__(self, directories): self.locations = [] if not isinstance(dire...
<commit_before>import os from .exceptions import ImproperlyConfigured from .utils import safe_join class BaseFinder(object): def find(self, path, all=False): raise NotImplementedError() class FileSystemFinder(BaseFinder): def __init__(self, directories): self.locations = [] if not ...
import os from .exceptions import ImproperlyConfigured from .utils import safe_join class BaseFinder(object): def find(self, path, all=False): raise NotImplementedError() class FileSystemFinder(BaseFinder): def __init__(self, directories): self.locations = [] if not isinstance(dire...
import os from .exceptions import ImproperlyConfigured from .utils import safe_join class BaseFinder(object): def find(self, path, all=False): raise NotImplementedError() class FileSystemFinder(BaseFinder): def __init__(self, directories): self.locations = [] if not isinstance(dire...
<commit_before>import os from .exceptions import ImproperlyConfigured from .utils import safe_join class BaseFinder(object): def find(self, path, all=False): raise NotImplementedError() class FileSystemFinder(BaseFinder): def __init__(self, directories): self.locations = [] if not ...
9aafe3ded97aee0f8f3623f0de1c13cfb555d7a6
getwork_store.py
getwork_store.py
import time class Getwork_store: def __init__(self): self.data = {} def add(self, server, merkle_root): self.data[merkle_root] = {'name':server["name"], 'timestamp':time.time()} return def get_server(self, merkle_root): if self.data.has_key(merkle_...
#License# #bitHopper by Colin Rice is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 3.0 Unported License. #Based on a work at github.com. import time from twisted.internet.task import LoopingCall class Getwork_store: def __init__(self): self.data = {} cal...
Update getwork to prune itself and use a list instead of a dictionary
Update getwork to prune itself and use a list instead of a dictionary
Python
mit
c00w/bitHopper,c00w/bitHopper
import time class Getwork_store: def __init__(self): self.data = {} def add(self, server, merkle_root): self.data[merkle_root] = {'name':server["name"], 'timestamp':time.time()} return def get_server(self, merkle_root): if self.data.has_key(merkle_...
#License# #bitHopper by Colin Rice is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 3.0 Unported License. #Based on a work at github.com. import time from twisted.internet.task import LoopingCall class Getwork_store: def __init__(self): self.data = {} cal...
<commit_before>import time class Getwork_store: def __init__(self): self.data = {} def add(self, server, merkle_root): self.data[merkle_root] = {'name':server["name"], 'timestamp':time.time()} return def get_server(self, merkle_root): if self.data....
#License# #bitHopper by Colin Rice is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 3.0 Unported License. #Based on a work at github.com. import time from twisted.internet.task import LoopingCall class Getwork_store: def __init__(self): self.data = {} cal...
import time class Getwork_store: def __init__(self): self.data = {} def add(self, server, merkle_root): self.data[merkle_root] = {'name':server["name"], 'timestamp':time.time()} return def get_server(self, merkle_root): if self.data.has_key(merkle_...
<commit_before>import time class Getwork_store: def __init__(self): self.data = {} def add(self, server, merkle_root): self.data[merkle_root] = {'name':server["name"], 'timestamp':time.time()} return def get_server(self, merkle_root): if self.data....
b16016994f20945a8a2bbb63b9cb920d856ab66f
web/attempts/migrations/0008_add_submission_date.py
web/attempts/migrations/0008_add_submission_date.py
# -*- coding: utf-8 -*- # Generated by Django 1.9.5 on 2017-05-09 09:24 from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('attempts', '0007_auto_20161004_0927'), ] operations = [ migrations.AddField(...
# -*- coding: utf-8 -*- # Generated by Django 1.9.5 on 2017-05-09 09:24 from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('attempts', '0007_auto_20161004_0927'), ] operations = [ migrations.AddField(...
Revert "Make migration SQLite compatible"
Revert "Make migration SQLite compatible" This reverts commit 768d85cccb17c8757dd8d14dad220d0b87568264.
Python
agpl-3.0
ul-fmf/projekt-tomo,ul-fmf/projekt-tomo,matijapretnar/projekt-tomo,ul-fmf/projekt-tomo,ul-fmf/projekt-tomo,ul-fmf/projekt-tomo,matijapretnar/projekt-tomo,matijapretnar/projekt-tomo,matijapretnar/projekt-tomo,ul-fmf/projekt-tomo,matijapretnar/projekt-tomo
# -*- coding: utf-8 -*- # Generated by Django 1.9.5 on 2017-05-09 09:24 from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('attempts', '0007_auto_20161004_0927'), ] operations = [ migrations.AddField(...
# -*- coding: utf-8 -*- # Generated by Django 1.9.5 on 2017-05-09 09:24 from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('attempts', '0007_auto_20161004_0927'), ] operations = [ migrations.AddField(...
<commit_before># -*- coding: utf-8 -*- # Generated by Django 1.9.5 on 2017-05-09 09:24 from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('attempts', '0007_auto_20161004_0927'), ] operations = [ migra...
# -*- coding: utf-8 -*- # Generated by Django 1.9.5 on 2017-05-09 09:24 from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('attempts', '0007_auto_20161004_0927'), ] operations = [ migrations.AddField(...
# -*- coding: utf-8 -*- # Generated by Django 1.9.5 on 2017-05-09 09:24 from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('attempts', '0007_auto_20161004_0927'), ] operations = [ migrations.AddField(...
<commit_before># -*- coding: utf-8 -*- # Generated by Django 1.9.5 on 2017-05-09 09:24 from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('attempts', '0007_auto_20161004_0927'), ] operations = [ migra...
5283bddb36bf4016609c130ddbe63cb234dceb73
tools/ocd_restore.py
tools/ocd_restore.py
#!/usr/bin/env python from pupa.utils import JSONEncoderPlus from contextlib import contextmanager from pymongo import Connection import argparse import json import os parser = argparse.ArgumentParser(description='Re-convert a jurisdiction.') parser.add_argument('--server', type=str, help='Mongo Server', ...
#!/usr/bin/env python from pupa.utils import JSONEncoderPlus from contextlib import contextmanager from pymongo import Connection import argparse import json import sys import os parser = argparse.ArgumentParser(description='Re-convert a jurisdiction.') parser.add_argument('--server', type=str, help='Mongo Server', ...
Add more to the restore script.
Add more to the restore script.
Python
bsd-3-clause
influence-usa/pupa,datamade/pupa,influence-usa/pupa,rshorey/pupa,opencivicdata/pupa,mileswwatkins/pupa,opencivicdata/pupa,rshorey/pupa,mileswwatkins/pupa,datamade/pupa
#!/usr/bin/env python from pupa.utils import JSONEncoderPlus from contextlib import contextmanager from pymongo import Connection import argparse import json import os parser = argparse.ArgumentParser(description='Re-convert a jurisdiction.') parser.add_argument('--server', type=str, help='Mongo Server', ...
#!/usr/bin/env python from pupa.utils import JSONEncoderPlus from contextlib import contextmanager from pymongo import Connection import argparse import json import sys import os parser = argparse.ArgumentParser(description='Re-convert a jurisdiction.') parser.add_argument('--server', type=str, help='Mongo Server', ...
<commit_before>#!/usr/bin/env python from pupa.utils import JSONEncoderPlus from contextlib import contextmanager from pymongo import Connection import argparse import json import os parser = argparse.ArgumentParser(description='Re-convert a jurisdiction.') parser.add_argument('--server', type=str, help='Mongo Server...
#!/usr/bin/env python from pupa.utils import JSONEncoderPlus from contextlib import contextmanager from pymongo import Connection import argparse import json import sys import os parser = argparse.ArgumentParser(description='Re-convert a jurisdiction.') parser.add_argument('--server', type=str, help='Mongo Server', ...
#!/usr/bin/env python from pupa.utils import JSONEncoderPlus from contextlib import contextmanager from pymongo import Connection import argparse import json import os parser = argparse.ArgumentParser(description='Re-convert a jurisdiction.') parser.add_argument('--server', type=str, help='Mongo Server', ...
<commit_before>#!/usr/bin/env python from pupa.utils import JSONEncoderPlus from contextlib import contextmanager from pymongo import Connection import argparse import json import os parser = argparse.ArgumentParser(description='Re-convert a jurisdiction.') parser.add_argument('--server', type=str, help='Mongo Server...
9663799d57a2790417e7d2fb9b1672de4d3a0059
search.py
search.py
import io import getopt import sys def usage(): print("usage: " + sys.argv[0] + " -d dictionary-file -p postings-file -q file-of-queries -o output-file-of-results") if __name__ == '__main__': dict_file = postings_file = query_file = output_file = None try: opts, args = getopt.getopt(sys.argv[1:], 'd:p:q:o:') ex...
import io import getopt import sys import pickle def usage(): print("usage: " + sys.argv[0] + " -d dictionary-file -p postings-file -q file-of-queries -o output-file-of-results") if __name__ == '__main__': dict_file = postings_file = query_file = output_file = None try: opts, args = getopt.getopt(sys.argv[1:], '...
Implement loading of dictionary and postings list
Implement loading of dictionary and postings list
Python
mit
ikaruswill/vector-space-model,ikaruswill/boolean-retrieval
import io import getopt import sys def usage(): print("usage: " + sys.argv[0] + " -d dictionary-file -p postings-file -q file-of-queries -o output-file-of-results") if __name__ == '__main__': dict_file = postings_file = query_file = output_file = None try: opts, args = getopt.getopt(sys.argv[1:], 'd:p:q:o:') ex...
import io import getopt import sys import pickle def usage(): print("usage: " + sys.argv[0] + " -d dictionary-file -p postings-file -q file-of-queries -o output-file-of-results") if __name__ == '__main__': dict_file = postings_file = query_file = output_file = None try: opts, args = getopt.getopt(sys.argv[1:], '...
<commit_before>import io import getopt import sys def usage(): print("usage: " + sys.argv[0] + " -d dictionary-file -p postings-file -q file-of-queries -o output-file-of-results") if __name__ == '__main__': dict_file = postings_file = query_file = output_file = None try: opts, args = getopt.getopt(sys.argv[1:], ...
import io import getopt import sys import pickle def usage(): print("usage: " + sys.argv[0] + " -d dictionary-file -p postings-file -q file-of-queries -o output-file-of-results") if __name__ == '__main__': dict_file = postings_file = query_file = output_file = None try: opts, args = getopt.getopt(sys.argv[1:], '...
import io import getopt import sys def usage(): print("usage: " + sys.argv[0] + " -d dictionary-file -p postings-file -q file-of-queries -o output-file-of-results") if __name__ == '__main__': dict_file = postings_file = query_file = output_file = None try: opts, args = getopt.getopt(sys.argv[1:], 'd:p:q:o:') ex...
<commit_before>import io import getopt import sys def usage(): print("usage: " + sys.argv[0] + " -d dictionary-file -p postings-file -q file-of-queries -o output-file-of-results") if __name__ == '__main__': dict_file = postings_file = query_file = output_file = None try: opts, args = getopt.getopt(sys.argv[1:], ...
231902d06b1f7fe3bcd7318f933427cdd3c17d6e
trace_viewer/trace_viewer_project.py
trace_viewer/trace_viewer_project.py
# Copyright (c) 2014 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. import sys import os from tvcm import project as project_module class TraceViewerProject(project_module.Project): trace_viewer_path = os.path.abspat...
# Copyright (c) 2014 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. import sys import os from tvcm import project as project_module class TraceViewerProject(project_module.Project): trace_viewer_path = os.path.abspat...
Allow other_paths to be passed into TraceViewerProject
Allow other_paths to be passed into TraceViewerProject This allows external embedders to subclass TraceViewerProject and thus use trace viewer. git-svn-id: 3a56fcae908c7e16d23cb53443ea4795ac387cf2@1198 0e6d7f2b-9903-5b78-7403-59d27f066143
Python
bsd-3-clause
bpsinc-native/src_third_party_trace-viewer,bpsinc-native/src_third_party_trace-viewer,bpsinc-native/src_third_party_trace-viewer,bpsinc-native/src_third_party_trace-viewer
# Copyright (c) 2014 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. import sys import os from tvcm import project as project_module class TraceViewerProject(project_module.Project): trace_viewer_path = os.path.abspat...
# Copyright (c) 2014 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. import sys import os from tvcm import project as project_module class TraceViewerProject(project_module.Project): trace_viewer_path = os.path.abspat...
<commit_before># Copyright (c) 2014 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. import sys import os from tvcm import project as project_module class TraceViewerProject(project_module.Project): trace_viewer_path =...
# Copyright (c) 2014 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. import sys import os from tvcm import project as project_module class TraceViewerProject(project_module.Project): trace_viewer_path = os.path.abspat...
# Copyright (c) 2014 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. import sys import os from tvcm import project as project_module class TraceViewerProject(project_module.Project): trace_viewer_path = os.path.abspat...
<commit_before># Copyright (c) 2014 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. import sys import os from tvcm import project as project_module class TraceViewerProject(project_module.Project): trace_viewer_path =...
d924576329c4a1d7814be2ed7da3ddd96a108c47
TotalFile.py
TotalFile.py
# -*- coding: utf-8 -*- import re import sublime, sublime_plugin class TotalFileCommand(sublime_plugin.TextCommand): def run(self, edit): cleaned = [] numbers = [] region = sublime.Region(0, self.view.size()); for lineRegion in self.view.lines(region): line = self.view.substr(lineRegion) if (line == ...
# -*- coding: utf-8 -*- import re import sublime, sublime_plugin class TotalFileCommand(sublime_plugin.TextCommand): def run(self, edit): cleaned = [] numbers = [] region = sublime.Region(0, self.view.size()); for lineRegion in self.view.lines(region): line = self.view.substr(lineRegion) if (line == ...
Handle non-matching lines which don't cause match errors and don't clean the empty lines if there are no cleaned lines
Handle non-matching lines which don't cause match errors and don't clean the empty lines if there are no cleaned lines
Python
mit
RichardHyde/SublimeText.Packages
# -*- coding: utf-8 -*- import re import sublime, sublime_plugin class TotalFileCommand(sublime_plugin.TextCommand): def run(self, edit): cleaned = [] numbers = [] region = sublime.Region(0, self.view.size()); for lineRegion in self.view.lines(region): line = self.view.substr(lineRegion) if (line == ...
# -*- coding: utf-8 -*- import re import sublime, sublime_plugin class TotalFileCommand(sublime_plugin.TextCommand): def run(self, edit): cleaned = [] numbers = [] region = sublime.Region(0, self.view.size()); for lineRegion in self.view.lines(region): line = self.view.substr(lineRegion) if (line == ...
<commit_before># -*- coding: utf-8 -*- import re import sublime, sublime_plugin class TotalFileCommand(sublime_plugin.TextCommand): def run(self, edit): cleaned = [] numbers = [] region = sublime.Region(0, self.view.size()); for lineRegion in self.view.lines(region): line = self.view.substr(lineRegion) ...
# -*- coding: utf-8 -*- import re import sublime, sublime_plugin class TotalFileCommand(sublime_plugin.TextCommand): def run(self, edit): cleaned = [] numbers = [] region = sublime.Region(0, self.view.size()); for lineRegion in self.view.lines(region): line = self.view.substr(lineRegion) if (line == ...
# -*- coding: utf-8 -*- import re import sublime, sublime_plugin class TotalFileCommand(sublime_plugin.TextCommand): def run(self, edit): cleaned = [] numbers = [] region = sublime.Region(0, self.view.size()); for lineRegion in self.view.lines(region): line = self.view.substr(lineRegion) if (line == ...
<commit_before># -*- coding: utf-8 -*- import re import sublime, sublime_plugin class TotalFileCommand(sublime_plugin.TextCommand): def run(self, edit): cleaned = [] numbers = [] region = sublime.Region(0, self.view.size()); for lineRegion in self.view.lines(region): line = self.view.substr(lineRegion) ...
02b87b94e07626a5db5ef548b234c270e5fb05e0
kboard/board/urls.py
kboard/board/urls.py
# Created by JHJ on 2016. 10. 5. from django.conf.urls import url from . import views app_name = 'board' urlpatterns = [ url(r'^$', views.board_list, name='board_list'), url(r'^(?P<board_slug>[-\w]+)/$', views.post_list, name='post_list'), url(r'^(?P<board_slug>[-\w]+)/new/$', views.new_post, name='new_p...
# Created by JHJ on 2016. 10. 5. from django.conf.urls import url from . import views app_name = 'board' urlpatterns = [ url(r'^$', views.board_list, name='board_list'), url(r'^(?P<board_slug>[-\w]+)/$', views.post_list, name='post_list'), url(r'^(?P<board_slug>[-\w]+)/new/$', views.new_post, name='new_p...
Delete board_slug parameter on 'delete_post' url
Delete board_slug parameter on 'delete_post' url
Python
mit
guswnsxodlf/k-board,cjh5414/kboard,hyesun03/k-board,hyesun03/k-board,cjh5414/kboard,hyesun03/k-board,kboard/kboard,guswnsxodlf/k-board,kboard/kboard,cjh5414/kboard,darjeeling/k-board,kboard/kboard,guswnsxodlf/k-board
# Created by JHJ on 2016. 10. 5. from django.conf.urls import url from . import views app_name = 'board' urlpatterns = [ url(r'^$', views.board_list, name='board_list'), url(r'^(?P<board_slug>[-\w]+)/$', views.post_list, name='post_list'), url(r'^(?P<board_slug>[-\w]+)/new/$', views.new_post, name='new_p...
# Created by JHJ on 2016. 10. 5. from django.conf.urls import url from . import views app_name = 'board' urlpatterns = [ url(r'^$', views.board_list, name='board_list'), url(r'^(?P<board_slug>[-\w]+)/$', views.post_list, name='post_list'), url(r'^(?P<board_slug>[-\w]+)/new/$', views.new_post, name='new_p...
<commit_before># Created by JHJ on 2016. 10. 5. from django.conf.urls import url from . import views app_name = 'board' urlpatterns = [ url(r'^$', views.board_list, name='board_list'), url(r'^(?P<board_slug>[-\w]+)/$', views.post_list, name='post_list'), url(r'^(?P<board_slug>[-\w]+)/new/$', views.new_po...
# Created by JHJ on 2016. 10. 5. from django.conf.urls import url from . import views app_name = 'board' urlpatterns = [ url(r'^$', views.board_list, name='board_list'), url(r'^(?P<board_slug>[-\w]+)/$', views.post_list, name='post_list'), url(r'^(?P<board_slug>[-\w]+)/new/$', views.new_post, name='new_p...
# Created by JHJ on 2016. 10. 5. from django.conf.urls import url from . import views app_name = 'board' urlpatterns = [ url(r'^$', views.board_list, name='board_list'), url(r'^(?P<board_slug>[-\w]+)/$', views.post_list, name='post_list'), url(r'^(?P<board_slug>[-\w]+)/new/$', views.new_post, name='new_p...
<commit_before># Created by JHJ on 2016. 10. 5. from django.conf.urls import url from . import views app_name = 'board' urlpatterns = [ url(r'^$', views.board_list, name='board_list'), url(r'^(?P<board_slug>[-\w]+)/$', views.post_list, name='post_list'), url(r'^(?P<board_slug>[-\w]+)/new/$', views.new_po...
f0a20db6da65b82ddafd22effbc0d5a7bb17f9e6
Roman-Numerals/Roman.py
Roman-Numerals/Roman.py
class Roman(object): def __init__(self, number): self.number = number self.modern_convert() convert_table = {} def modern_convert(self): number = self.number solution = [] while True: if number >= 1000: solution.append("M") number -= 1000 elif number >= 500: ...
class Roman(object): def __init__(self, number): self.number = int(number) choice = raw_input("Type Y or N for modern Roman Numeral Convert: ").lower() while True: if choice == "y": print "You made it" elif choice == "n": self.old_roman_convert() break else: ...
Add loops in __init__ for continuous convert
Add loops in __init__ for continuous convert
Python
mit
Bigless27/Python-Projects
class Roman(object): def __init__(self, number): self.number = number self.modern_convert() convert_table = {} def modern_convert(self): number = self.number solution = [] while True: if number >= 1000: solution.append("M") number -= 1000 elif number >= 500: ...
class Roman(object): def __init__(self, number): self.number = int(number) choice = raw_input("Type Y or N for modern Roman Numeral Convert: ").lower() while True: if choice == "y": print "You made it" elif choice == "n": self.old_roman_convert() break else: ...
<commit_before>class Roman(object): def __init__(self, number): self.number = number self.modern_convert() convert_table = {} def modern_convert(self): number = self.number solution = [] while True: if number >= 1000: solution.append("M") number -= 1000 elif num...
class Roman(object): def __init__(self, number): self.number = int(number) choice = raw_input("Type Y or N for modern Roman Numeral Convert: ").lower() while True: if choice == "y": print "You made it" elif choice == "n": self.old_roman_convert() break else: ...
class Roman(object): def __init__(self, number): self.number = number self.modern_convert() convert_table = {} def modern_convert(self): number = self.number solution = [] while True: if number >= 1000: solution.append("M") number -= 1000 elif number >= 500: ...
<commit_before>class Roman(object): def __init__(self, number): self.number = number self.modern_convert() convert_table = {} def modern_convert(self): number = self.number solution = [] while True: if number >= 1000: solution.append("M") number -= 1000 elif num...
cb774e9950510b559bdccc25d368eccc7b42cb06
server.py
server.py
import os from flask import Flask, request import psycopg2 import json app = Flask(__name__) DATABASE_URL = os.environ['DATABASE_URL'] conn = psycopg2.connect(DATABASE_URL) @app.route('/find') def find(): lat = request.args.get('lat') lng = request.args.get('lng') radius = request.args.get('radius') ...
import os from flask import Flask, request import psycopg2 import json app = Flask(__name__) DATABASE_URL = os.environ['DATABASE_URL'] conn = psycopg2.connect(DATABASE_URL) @app.route('/find') def find(): lat = request.args.get('lat') lng = request.args.get('lng') radius = request.args.get('radius') ...
Change the key to be string
Change the key to be string
Python
mit
noppanit/street-parking-nyc
import os from flask import Flask, request import psycopg2 import json app = Flask(__name__) DATABASE_URL = os.environ['DATABASE_URL'] conn = psycopg2.connect(DATABASE_URL) @app.route('/find') def find(): lat = request.args.get('lat') lng = request.args.get('lng') radius = request.args.get('radius') ...
import os from flask import Flask, request import psycopg2 import json app = Flask(__name__) DATABASE_URL = os.environ['DATABASE_URL'] conn = psycopg2.connect(DATABASE_URL) @app.route('/find') def find(): lat = request.args.get('lat') lng = request.args.get('lng') radius = request.args.get('radius') ...
<commit_before>import os from flask import Flask, request import psycopg2 import json app = Flask(__name__) DATABASE_URL = os.environ['DATABASE_URL'] conn = psycopg2.connect(DATABASE_URL) @app.route('/find') def find(): lat = request.args.get('lat') lng = request.args.get('lng') radius = request.args.ge...
import os from flask import Flask, request import psycopg2 import json app = Flask(__name__) DATABASE_URL = os.environ['DATABASE_URL'] conn = psycopg2.connect(DATABASE_URL) @app.route('/find') def find(): lat = request.args.get('lat') lng = request.args.get('lng') radius = request.args.get('radius') ...
import os from flask import Flask, request import psycopg2 import json app = Flask(__name__) DATABASE_URL = os.environ['DATABASE_URL'] conn = psycopg2.connect(DATABASE_URL) @app.route('/find') def find(): lat = request.args.get('lat') lng = request.args.get('lng') radius = request.args.get('radius') ...
<commit_before>import os from flask import Flask, request import psycopg2 import json app = Flask(__name__) DATABASE_URL = os.environ['DATABASE_URL'] conn = psycopg2.connect(DATABASE_URL) @app.route('/find') def find(): lat = request.args.get('lat') lng = request.args.get('lng') radius = request.args.ge...
2ac185e96c4a6af91ab3df9d53f4436cd257a5fc
test/scripts/test_entanglement.py
test/scripts/test_entanglement.py
#!/usr/bin/env python import ecto import ecto_test def test_feedback(): plasm = ecto.Plasm() g = ecto_test.Generate("Generator", step=1.0, start=1.0) add = ecto_test.Add() source,sink = ecto.EntangledPair() plasm.connect(source[:] >> add['left'], g[:] >> add['right'], ...
#!/usr/bin/env python import ecto import ecto_test def test_feedback(): plasm = ecto.Plasm() g = ecto_test.Generate("Generator", step=1.0, start=1.0) add = ecto_test.Add() source,sink = ecto.EntangledPair() plasm.connect(source[:] >> add['left'], g[:] >> add['right'], ...
Disable viewing the plasm in test.
Disable viewing the plasm in test.
Python
bsd-3-clause
stonier/ecto,v4hn/ecto,stonier/ecto,drmateo/ecto,drmateo/ecto,drmateo/ecto,stonier/ecto,v4hn/ecto,v4hn/ecto,drmateo/ecto,stonier/ecto,v4hn/ecto,drmateo/ecto
#!/usr/bin/env python import ecto import ecto_test def test_feedback(): plasm = ecto.Plasm() g = ecto_test.Generate("Generator", step=1.0, start=1.0) add = ecto_test.Add() source,sink = ecto.EntangledPair() plasm.connect(source[:] >> add['left'], g[:] >> add['right'], ...
#!/usr/bin/env python import ecto import ecto_test def test_feedback(): plasm = ecto.Plasm() g = ecto_test.Generate("Generator", step=1.0, start=1.0) add = ecto_test.Add() source,sink = ecto.EntangledPair() plasm.connect(source[:] >> add['left'], g[:] >> add['right'], ...
<commit_before>#!/usr/bin/env python import ecto import ecto_test def test_feedback(): plasm = ecto.Plasm() g = ecto_test.Generate("Generator", step=1.0, start=1.0) add = ecto_test.Add() source,sink = ecto.EntangledPair() plasm.connect(source[:] >> add['left'], g[:] >> add['right...
#!/usr/bin/env python import ecto import ecto_test def test_feedback(): plasm = ecto.Plasm() g = ecto_test.Generate("Generator", step=1.0, start=1.0) add = ecto_test.Add() source,sink = ecto.EntangledPair() plasm.connect(source[:] >> add['left'], g[:] >> add['right'], ...
#!/usr/bin/env python import ecto import ecto_test def test_feedback(): plasm = ecto.Plasm() g = ecto_test.Generate("Generator", step=1.0, start=1.0) add = ecto_test.Add() source,sink = ecto.EntangledPair() plasm.connect(source[:] >> add['left'], g[:] >> add['right'], ...
<commit_before>#!/usr/bin/env python import ecto import ecto_test def test_feedback(): plasm = ecto.Plasm() g = ecto_test.Generate("Generator", step=1.0, start=1.0) add = ecto_test.Add() source,sink = ecto.EntangledPair() plasm.connect(source[:] >> add['left'], g[:] >> add['right...
9e4ca0829bcd7b3d5181bb452c80fb99c41f9820
source/tyr/tyr/rabbit_mq_handler.py
source/tyr/tyr/rabbit_mq_handler.py
# encoding=utf-8 from kombu import Exchange, Connection, Producer import logging class RabbitMqHandler(object): def __init__(self, connection, exchange_name, type='direct', durable=True): self._logger = logging.getLogger(__name__) try: self._connection = Connection(connection) ...
# encoding=utf-8 from kombu import Exchange, Connection, Producer import logging class RabbitMqHandler(object): def __init__(self, connection, exchange_name, type='direct', durable=True): self._logger = logging.getLogger(__name__) try: self._connection = Connection(connection) ...
Fix error message 'ChannelError: channel disconnected'
Fix error message 'ChannelError: channel disconnected'
Python
agpl-3.0
patochectp/navitia,ballouche/navitia,ballouche/navitia,CanalTP/navitia,patochectp/navitia,kinnou02/navitia,antoine-de/navitia,antoine-de/navitia,patochectp/navitia,pbougue/navitia,xlqian/navitia,pbougue/navitia,xlqian/navitia,Tisseo/navitia,CanalTP/navitia,CanalTP/navitia,ballouche/navitia,Tisseo/navitia,ballouche/navi...
# encoding=utf-8 from kombu import Exchange, Connection, Producer import logging class RabbitMqHandler(object): def __init__(self, connection, exchange_name, type='direct', durable=True): self._logger = logging.getLogger(__name__) try: self._connection = Connection(connection) ...
# encoding=utf-8 from kombu import Exchange, Connection, Producer import logging class RabbitMqHandler(object): def __init__(self, connection, exchange_name, type='direct', durable=True): self._logger = logging.getLogger(__name__) try: self._connection = Connection(connection) ...
<commit_before># encoding=utf-8 from kombu import Exchange, Connection, Producer import logging class RabbitMqHandler(object): def __init__(self, connection, exchange_name, type='direct', durable=True): self._logger = logging.getLogger(__name__) try: self._connection = Connection(conn...
# encoding=utf-8 from kombu import Exchange, Connection, Producer import logging class RabbitMqHandler(object): def __init__(self, connection, exchange_name, type='direct', durable=True): self._logger = logging.getLogger(__name__) try: self._connection = Connection(connection) ...
# encoding=utf-8 from kombu import Exchange, Connection, Producer import logging class RabbitMqHandler(object): def __init__(self, connection, exchange_name, type='direct', durable=True): self._logger = logging.getLogger(__name__) try: self._connection = Connection(connection) ...
<commit_before># encoding=utf-8 from kombu import Exchange, Connection, Producer import logging class RabbitMqHandler(object): def __init__(self, connection, exchange_name, type='direct', durable=True): self._logger = logging.getLogger(__name__) try: self._connection = Connection(conn...
daea13213632d5aa35e0bd3567e255903a857660
apps/accounts/middleware.py
apps/accounts/middleware.py
""" Middleware for the user accounts app. """ from django.utils import timezone class LastActivityDateUpdateMiddleware(object): """ Middleware for updating the "last activity date" of authenticated users. """ def process_request(self, request): """ Process the request, update the las...
""" Middleware for the user accounts app. """ from django.utils import timezone class LastActivityDateUpdateMiddleware(object): """ Middleware for updating the "last activity date" of authenticated users. """ def process_request(self, request): """ Process the request, update the las...
Update docstring and add fixme for future revision
Update docstring and add fixme for future revision
Python
agpl-3.0
TamiaLab/carnetdumaker,TamiaLab/carnetdumaker,TamiaLab/carnetdumaker,TamiaLab/carnetdumaker
""" Middleware for the user accounts app. """ from django.utils import timezone class LastActivityDateUpdateMiddleware(object): """ Middleware for updating the "last activity date" of authenticated users. """ def process_request(self, request): """ Process the request, update the las...
""" Middleware for the user accounts app. """ from django.utils import timezone class LastActivityDateUpdateMiddleware(object): """ Middleware for updating the "last activity date" of authenticated users. """ def process_request(self, request): """ Process the request, update the las...
<commit_before>""" Middleware for the user accounts app. """ from django.utils import timezone class LastActivityDateUpdateMiddleware(object): """ Middleware for updating the "last activity date" of authenticated users. """ def process_request(self, request): """ Process the request,...
""" Middleware for the user accounts app. """ from django.utils import timezone class LastActivityDateUpdateMiddleware(object): """ Middleware for updating the "last activity date" of authenticated users. """ def process_request(self, request): """ Process the request, update the las...
""" Middleware for the user accounts app. """ from django.utils import timezone class LastActivityDateUpdateMiddleware(object): """ Middleware for updating the "last activity date" of authenticated users. """ def process_request(self, request): """ Process the request, update the las...
<commit_before>""" Middleware for the user accounts app. """ from django.utils import timezone class LastActivityDateUpdateMiddleware(object): """ Middleware for updating the "last activity date" of authenticated users. """ def process_request(self, request): """ Process the request,...
76c4a59070ef1e8562cc30bd28ac88ff82636d9c
cscslackbot/logconfig/__init__.py
cscslackbot/logconfig/__init__.py
import logging import logging.config import logging.handlers import six import sys from ..utils import from_human_readable def configure(config): format = config.get('format', None) datefmt = config.get('datefmt', None) fmtstyle = config.get('fmtstyle', '%') if six.PY2: formatter = logging.Fo...
import logging import logging.config import logging.handlers import six import sys from ..utils import from_human_readable def configure(config): format = config.get('format', None) datefmt = config.get('datefmt', None) formatter = logging.Formatter(format, datefmt) handlers = [] # Console handl...
Remove support for logging format style - doesn't work in Python 2 at all
Remove support for logging format style - doesn't work in Python 2 at all
Python
mit
rollforbugs/cscslackbot,rollforbugs/cscslackbot
import logging import logging.config import logging.handlers import six import sys from ..utils import from_human_readable def configure(config): format = config.get('format', None) datefmt = config.get('datefmt', None) fmtstyle = config.get('fmtstyle', '%') if six.PY2: formatter = logging.Fo...
import logging import logging.config import logging.handlers import six import sys from ..utils import from_human_readable def configure(config): format = config.get('format', None) datefmt = config.get('datefmt', None) formatter = logging.Formatter(format, datefmt) handlers = [] # Console handl...
<commit_before>import logging import logging.config import logging.handlers import six import sys from ..utils import from_human_readable def configure(config): format = config.get('format', None) datefmt = config.get('datefmt', None) fmtstyle = config.get('fmtstyle', '%') if six.PY2: formatt...
import logging import logging.config import logging.handlers import six import sys from ..utils import from_human_readable def configure(config): format = config.get('format', None) datefmt = config.get('datefmt', None) formatter = logging.Formatter(format, datefmt) handlers = [] # Console handl...
import logging import logging.config import logging.handlers import six import sys from ..utils import from_human_readable def configure(config): format = config.get('format', None) datefmt = config.get('datefmt', None) fmtstyle = config.get('fmtstyle', '%') if six.PY2: formatter = logging.Fo...
<commit_before>import logging import logging.config import logging.handlers import six import sys from ..utils import from_human_readable def configure(config): format = config.get('format', None) datefmt = config.get('datefmt', None) fmtstyle = config.get('fmtstyle', '%') if six.PY2: formatt...
220013558f83523113ca58381a6b6d283178e3be
flask-app/setup.py
flask-app/setup.py
# -*- coding: utf-8 -*- from setuptools import setup, find_packages with open('README.rst') as f: readme = f.read() with open('LICENSE') as f: license = f.read() setup( name='nickITAPI', version='0.1.1', description='', long_description=readme, author='digIT', # author_email='', # ...
# -*- coding: utf-8 -*- from setuptools import setup, find_packages with open('README.rst') as f: readme = f.read() with open('LICENSE') as f: license = f.read() setup( name='nickITAPI', version='0.1.1', description='', long_description=readme, author='digIT', # author_email='', # ...
Add ldap3 to required modules
Add ldap3 to required modules
Python
mit
cthit/nickIT,cthit/nickIT,cthit/nickIT
# -*- coding: utf-8 -*- from setuptools import setup, find_packages with open('README.rst') as f: readme = f.read() with open('LICENSE') as f: license = f.read() setup( name='nickITAPI', version='0.1.1', description='', long_description=readme, author='digIT', # author_email='', # ...
# -*- coding: utf-8 -*- from setuptools import setup, find_packages with open('README.rst') as f: readme = f.read() with open('LICENSE') as f: license = f.read() setup( name='nickITAPI', version='0.1.1', description='', long_description=readme, author='digIT', # author_email='', # ...
<commit_before># -*- coding: utf-8 -*- from setuptools import setup, find_packages with open('README.rst') as f: readme = f.read() with open('LICENSE') as f: license = f.read() setup( name='nickITAPI', version='0.1.1', description='', long_description=readme, author='digIT', # author_...
# -*- coding: utf-8 -*- from setuptools import setup, find_packages with open('README.rst') as f: readme = f.read() with open('LICENSE') as f: license = f.read() setup( name='nickITAPI', version='0.1.1', description='', long_description=readme, author='digIT', # author_email='', # ...
# -*- coding: utf-8 -*- from setuptools import setup, find_packages with open('README.rst') as f: readme = f.read() with open('LICENSE') as f: license = f.read() setup( name='nickITAPI', version='0.1.1', description='', long_description=readme, author='digIT', # author_email='', # ...
<commit_before># -*- coding: utf-8 -*- from setuptools import setup, find_packages with open('README.rst') as f: readme = f.read() with open('LICENSE') as f: license = f.read() setup( name='nickITAPI', version='0.1.1', description='', long_description=readme, author='digIT', # author_...
4f7a64f3060c196a434e504847efc511e34537f6
asyncssh/crypto/__init__.py
asyncssh/crypto/__init__.py
# Copyright (c) 2014-2015 by Ron Frederick <[email protected]>. # All rights reserved. # # This program and the accompanying materials are made available under # the terms of the Eclipse Public License v1.0 which accompanies this # distribution and is available at: # # http://www.eclipse.org/legal/epl-v10.html # #...
# Copyright (c) 2014-2015 by Ron Frederick <[email protected]>. # All rights reserved. # # This program and the accompanying materials are made available under # the terms of the Eclipse Public License v1.0 which accompanies this # distribution and is available at: # # http://www.eclipse.org/legal/epl-v10.html # #...
Allow Curve25519DH import to fail in crypto package
Allow Curve25519DH import to fail in crypto package With the refactoring to avoid pylint warnings, a problem was introduced in importing the crypto module when the curve25519 dependencies were unavailable. This commit fixes that problem.
Python
epl-1.0
jonathanslenders/asyncssh
# Copyright (c) 2014-2015 by Ron Frederick <[email protected]>. # All rights reserved. # # This program and the accompanying materials are made available under # the terms of the Eclipse Public License v1.0 which accompanies this # distribution and is available at: # # http://www.eclipse.org/legal/epl-v10.html # #...
# Copyright (c) 2014-2015 by Ron Frederick <[email protected]>. # All rights reserved. # # This program and the accompanying materials are made available under # the terms of the Eclipse Public License v1.0 which accompanies this # distribution and is available at: # # http://www.eclipse.org/legal/epl-v10.html # #...
<commit_before># Copyright (c) 2014-2015 by Ron Frederick <[email protected]>. # All rights reserved. # # This program and the accompanying materials are made available under # the terms of the Eclipse Public License v1.0 which accompanies this # distribution and is available at: # # http://www.eclipse.org/legal/e...
# Copyright (c) 2014-2015 by Ron Frederick <[email protected]>. # All rights reserved. # # This program and the accompanying materials are made available under # the terms of the Eclipse Public License v1.0 which accompanies this # distribution and is available at: # # http://www.eclipse.org/legal/epl-v10.html # #...
# Copyright (c) 2014-2015 by Ron Frederick <[email protected]>. # All rights reserved. # # This program and the accompanying materials are made available under # the terms of the Eclipse Public License v1.0 which accompanies this # distribution and is available at: # # http://www.eclipse.org/legal/epl-v10.html # #...
<commit_before># Copyright (c) 2014-2015 by Ron Frederick <[email protected]>. # All rights reserved. # # This program and the accompanying materials are made available under # the terms of the Eclipse Public License v1.0 which accompanies this # distribution and is available at: # # http://www.eclipse.org/legal/e...
d85b58a0edce8321312eff66f16fc72439e4426a
app/sense.py
app/sense.py
#!/usr/bin/env python3 from Sensor import SenseController from KeyDispatcher import KeyDispatcher from Display import Display from DataLogger import SQLiteLogger DEVICE = "PiSense" class Handler: def __init__(self, display, logger, sensor): self.display = display self.logger = logger se...
#!/usr/bin/env python3 from Sensor import SenseController from KeyDispatcher import KeyDispatcher from Display import Display from DataLogger import SQLiteLogger import time DEVICE = "PiSense" DELAY = 0.0 class Handler: def __init__(self, display, logger, sensor): self.display = display self.lo...
Add ability to control read rate
Add ability to control read rate
Python
mit
thelonious/g2x,gizmo-cda/g2x,gizmo-cda/g2x,gizmo-cda/g2x,gizmo-cda/g2x,thelonious/g2x
#!/usr/bin/env python3 from Sensor import SenseController from KeyDispatcher import KeyDispatcher from Display import Display from DataLogger import SQLiteLogger DEVICE = "PiSense" class Handler: def __init__(self, display, logger, sensor): self.display = display self.logger = logger se...
#!/usr/bin/env python3 from Sensor import SenseController from KeyDispatcher import KeyDispatcher from Display import Display from DataLogger import SQLiteLogger import time DEVICE = "PiSense" DELAY = 0.0 class Handler: def __init__(self, display, logger, sensor): self.display = display self.lo...
<commit_before>#!/usr/bin/env python3 from Sensor import SenseController from KeyDispatcher import KeyDispatcher from Display import Display from DataLogger import SQLiteLogger DEVICE = "PiSense" class Handler: def __init__(self, display, logger, sensor): self.display = display self.logger = lo...
#!/usr/bin/env python3 from Sensor import SenseController from KeyDispatcher import KeyDispatcher from Display import Display from DataLogger import SQLiteLogger import time DEVICE = "PiSense" DELAY = 0.0 class Handler: def __init__(self, display, logger, sensor): self.display = display self.lo...
#!/usr/bin/env python3 from Sensor import SenseController from KeyDispatcher import KeyDispatcher from Display import Display from DataLogger import SQLiteLogger DEVICE = "PiSense" class Handler: def __init__(self, display, logger, sensor): self.display = display self.logger = logger se...
<commit_before>#!/usr/bin/env python3 from Sensor import SenseController from KeyDispatcher import KeyDispatcher from Display import Display from DataLogger import SQLiteLogger DEVICE = "PiSense" class Handler: def __init__(self, display, logger, sensor): self.display = display self.logger = lo...
4a476e31d16273afc99abed408efba37936af620
virtool/hmm/utils.py
virtool/hmm/utils.py
import semver import virtool.github def format_hmm_release(updated, release, installed): # The release dict will only be replaced if there is a 200 response from GitHub. A 304 indicates the release # has not changed and `None` is returned from `get_release()`. if updated is None: return None ...
import semver import virtool.github def format_hmm_release(updated, release, installed): # The release dict will only be replaced if there is a 200 response from GitHub. A 304 indicates the release # has not changed and `None` is returned from `get_release()`. if updated is None: return None ...
Fix HMM release formatting bug
Fix HMM release formatting bug
Python
mit
virtool/virtool,virtool/virtool,igboyes/virtool,igboyes/virtool
import semver import virtool.github def format_hmm_release(updated, release, installed): # The release dict will only be replaced if there is a 200 response from GitHub. A 304 indicates the release # has not changed and `None` is returned from `get_release()`. if updated is None: return None ...
import semver import virtool.github def format_hmm_release(updated, release, installed): # The release dict will only be replaced if there is a 200 response from GitHub. A 304 indicates the release # has not changed and `None` is returned from `get_release()`. if updated is None: return None ...
<commit_before>import semver import virtool.github def format_hmm_release(updated, release, installed): # The release dict will only be replaced if there is a 200 response from GitHub. A 304 indicates the release # has not changed and `None` is returned from `get_release()`. if updated is None: re...
import semver import virtool.github def format_hmm_release(updated, release, installed): # The release dict will only be replaced if there is a 200 response from GitHub. A 304 indicates the release # has not changed and `None` is returned from `get_release()`. if updated is None: return None ...
import semver import virtool.github def format_hmm_release(updated, release, installed): # The release dict will only be replaced if there is a 200 response from GitHub. A 304 indicates the release # has not changed and `None` is returned from `get_release()`. if updated is None: return None ...
<commit_before>import semver import virtool.github def format_hmm_release(updated, release, installed): # The release dict will only be replaced if there is a 200 response from GitHub. A 304 indicates the release # has not changed and `None` is returned from `get_release()`. if updated is None: re...
93873f19a651b786f2413b073a9372dae7bb67a9
codecademy/Car.py
codecademy/Car.py
class Car(object): condition = "new" def __init__(self, model, color, mpg): self.model = model self.color = color self.mpg = mpg def display_car(self): print "This is a %s %s with %s MPG." % (self.color, self.model, str(self.mpg)) my_car = Car("DeLorean", "silver", 88) pri...
class Car(object): condition = "new" def __init__(self, model, color, mpg): self.model = model self.color = color self.mpg = mpg def display_car(self): print "This is a %s %s with %s MPG." % (self.color, self.model, str(self.mpg)) def drive_car(self): self.condi...
Add a sub class for car
Add a sub class for car
Python
apache-2.0
haozai309/hello_python
class Car(object): condition = "new" def __init__(self, model, color, mpg): self.model = model self.color = color self.mpg = mpg def display_car(self): print "This is a %s %s with %s MPG." % (self.color, self.model, str(self.mpg)) my_car = Car("DeLorean", "silver", 88) pri...
class Car(object): condition = "new" def __init__(self, model, color, mpg): self.model = model self.color = color self.mpg = mpg def display_car(self): print "This is a %s %s with %s MPG." % (self.color, self.model, str(self.mpg)) def drive_car(self): self.condi...
<commit_before>class Car(object): condition = "new" def __init__(self, model, color, mpg): self.model = model self.color = color self.mpg = mpg def display_car(self): print "This is a %s %s with %s MPG." % (self.color, self.model, str(self.mpg)) my_car = Car("DeLorean", "s...
class Car(object): condition = "new" def __init__(self, model, color, mpg): self.model = model self.color = color self.mpg = mpg def display_car(self): print "This is a %s %s with %s MPG." % (self.color, self.model, str(self.mpg)) def drive_car(self): self.condi...
class Car(object): condition = "new" def __init__(self, model, color, mpg): self.model = model self.color = color self.mpg = mpg def display_car(self): print "This is a %s %s with %s MPG." % (self.color, self.model, str(self.mpg)) my_car = Car("DeLorean", "silver", 88) pri...
<commit_before>class Car(object): condition = "new" def __init__(self, model, color, mpg): self.model = model self.color = color self.mpg = mpg def display_car(self): print "This is a %s %s with %s MPG." % (self.color, self.model, str(self.mpg)) my_car = Car("DeLorean", "s...
9171777c3945b3a1324d9b20ff607fd340747b58
cinder/version.py
cinder/version.py
# Copyright 2011 OpenStack Foundation # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable l...
# Copyright 2011 OpenStack Foundation # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable l...
Remove runtime dep on python-pbr, python-d2to1
Remove runtime dep on python-pbr, python-d2to1 Requires RPM spec to fill in REDHATCINDERVERSION.
Python
apache-2.0
redhat-openstack/cinder,redhat-openstack/cinder
# Copyright 2011 OpenStack Foundation # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable l...
# Copyright 2011 OpenStack Foundation # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable l...
<commit_before># Copyright 2011 OpenStack Foundation # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required ...
# Copyright 2011 OpenStack Foundation # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable l...
# Copyright 2011 OpenStack Foundation # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable l...
<commit_before># Copyright 2011 OpenStack Foundation # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required ...
2a4891506f02e20d6a6f0e10a346b8fb30d54767
mozaik_membership_payment/models/account_payment.py
mozaik_membership_payment/models/account_payment.py
# Copyright 2018 ACSONE SA/NV # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). from odoo import api, models class AccountPayment(models.Model): _inherit = "account.payment" @api.depends("journal_id", "partner_id", "partner_type", "is_internal_transfer") def _compute_destination_account_i...
# Copyright 2018 ACSONE SA/NV # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). from odoo import api, models from odoo.fields import first class AccountPayment(models.Model): _inherit = "account.payment" @api.depends("journal_id", "partner_id", "partner_type", "is_internal_transfer") def ...
Fix the account for memberships payements
Fix the account for memberships payements
Python
agpl-3.0
mozaik-association/mozaik,mozaik-association/mozaik
# Copyright 2018 ACSONE SA/NV # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). from odoo import api, models class AccountPayment(models.Model): _inherit = "account.payment" @api.depends("journal_id", "partner_id", "partner_type", "is_internal_transfer") def _compute_destination_account_i...
# Copyright 2018 ACSONE SA/NV # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). from odoo import api, models from odoo.fields import first class AccountPayment(models.Model): _inherit = "account.payment" @api.depends("journal_id", "partner_id", "partner_type", "is_internal_transfer") def ...
<commit_before># Copyright 2018 ACSONE SA/NV # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). from odoo import api, models class AccountPayment(models.Model): _inherit = "account.payment" @api.depends("journal_id", "partner_id", "partner_type", "is_internal_transfer") def _compute_destin...
# Copyright 2018 ACSONE SA/NV # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). from odoo import api, models from odoo.fields import first class AccountPayment(models.Model): _inherit = "account.payment" @api.depends("journal_id", "partner_id", "partner_type", "is_internal_transfer") def ...
# Copyright 2018 ACSONE SA/NV # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). from odoo import api, models class AccountPayment(models.Model): _inherit = "account.payment" @api.depends("journal_id", "partner_id", "partner_type", "is_internal_transfer") def _compute_destination_account_i...
<commit_before># Copyright 2018 ACSONE SA/NV # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). from odoo import api, models class AccountPayment(models.Model): _inherit = "account.payment" @api.depends("journal_id", "partner_id", "partner_type", "is_internal_transfer") def _compute_destin...
2b0a11a1adf4167fb55f9b90fc87a8b8518a24a7
atmo/apps.py
atmo/apps.py
from django.apps import AppConfig from django.conf import settings import session_csrf class AtmoAppConfig(AppConfig): name = 'atmo' def ready(self): # The app is now ready. Include any monkey patches here. # Monkey patch CSRF to switch to session based CSRF. Session # based CSRF wi...
from django.apps import AppConfig from django.conf import settings import session_csrf class AtmoAppConfig(AppConfig): name = 'atmo' def ready(self): # The app is now ready. Include any monkey patches here. # Monkey patch CSRF to switch to session based CSRF. Session # based CSRF wi...
Fix rq jobs registration check
Fix rq jobs registration check
Python
mpl-2.0
mozilla/telemetry-analysis-service,mozilla/telemetry-analysis-service,mozilla/telemetry-analysis-service,mozilla/telemetry-analysis-service
from django.apps import AppConfig from django.conf import settings import session_csrf class AtmoAppConfig(AppConfig): name = 'atmo' def ready(self): # The app is now ready. Include any monkey patches here. # Monkey patch CSRF to switch to session based CSRF. Session # based CSRF wi...
from django.apps import AppConfig from django.conf import settings import session_csrf class AtmoAppConfig(AppConfig): name = 'atmo' def ready(self): # The app is now ready. Include any monkey patches here. # Monkey patch CSRF to switch to session based CSRF. Session # based CSRF wi...
<commit_before>from django.apps import AppConfig from django.conf import settings import session_csrf class AtmoAppConfig(AppConfig): name = 'atmo' def ready(self): # The app is now ready. Include any monkey patches here. # Monkey patch CSRF to switch to session based CSRF. Session ...
from django.apps import AppConfig from django.conf import settings import session_csrf class AtmoAppConfig(AppConfig): name = 'atmo' def ready(self): # The app is now ready. Include any monkey patches here. # Monkey patch CSRF to switch to session based CSRF. Session # based CSRF wi...
from django.apps import AppConfig from django.conf import settings import session_csrf class AtmoAppConfig(AppConfig): name = 'atmo' def ready(self): # The app is now ready. Include any monkey patches here. # Monkey patch CSRF to switch to session based CSRF. Session # based CSRF wi...
<commit_before>from django.apps import AppConfig from django.conf import settings import session_csrf class AtmoAppConfig(AppConfig): name = 'atmo' def ready(self): # The app is now ready. Include any monkey patches here. # Monkey patch CSRF to switch to session based CSRF. Session ...
57773d37b20285eba15cc78f4de4e3e344097624
game-log.py
game-log.py
from bs4 import BeautifulSoup, Tag import requests class YahooGameLog: def __init__(self, player_id): page = requests.get('http://sports.yahoo.com/nba/players/' + player_id + '/gamelog/') self.soup = BeautifulSoup(page.text, 'lxml')
from bs4 import BeautifulSoup, Tag import requests class YahooGameLog: def __init__(self, player_id): page = requests.get('http://sports.yahoo.com/nba/players/' + player_id + '/gamelog/') self.soup = BeautifulSoup(page.text, 'lxml') self.column_names = self.get_headers() def get_header...
Add yahoo game log header parsing
Add yahoo game log header parsing
Python
mit
arosenberg01/asdata
from bs4 import BeautifulSoup, Tag import requests class YahooGameLog: def __init__(self, player_id): page = requests.get('http://sports.yahoo.com/nba/players/' + player_id + '/gamelog/') self.soup = BeautifulSoup(page.text, 'lxml') Add yahoo game log header parsing
from bs4 import BeautifulSoup, Tag import requests class YahooGameLog: def __init__(self, player_id): page = requests.get('http://sports.yahoo.com/nba/players/' + player_id + '/gamelog/') self.soup = BeautifulSoup(page.text, 'lxml') self.column_names = self.get_headers() def get_header...
<commit_before>from bs4 import BeautifulSoup, Tag import requests class YahooGameLog: def __init__(self, player_id): page = requests.get('http://sports.yahoo.com/nba/players/' + player_id + '/gamelog/') self.soup = BeautifulSoup(page.text, 'lxml') <commit_msg>Add yahoo game log header parsing<com...
from bs4 import BeautifulSoup, Tag import requests class YahooGameLog: def __init__(self, player_id): page = requests.get('http://sports.yahoo.com/nba/players/' + player_id + '/gamelog/') self.soup = BeautifulSoup(page.text, 'lxml') self.column_names = self.get_headers() def get_header...
from bs4 import BeautifulSoup, Tag import requests class YahooGameLog: def __init__(self, player_id): page = requests.get('http://sports.yahoo.com/nba/players/' + player_id + '/gamelog/') self.soup = BeautifulSoup(page.text, 'lxml') Add yahoo game log header parsingfrom bs4 import BeautifulSoup, ...
<commit_before>from bs4 import BeautifulSoup, Tag import requests class YahooGameLog: def __init__(self, player_id): page = requests.get('http://sports.yahoo.com/nba/players/' + player_id + '/gamelog/') self.soup = BeautifulSoup(page.text, 'lxml') <commit_msg>Add yahoo game log header parsing<com...
f4f4d799409e4869276b84f032e60cdf516fcaf6
src/subcmds/init.py
src/subcmds/init.py
#! /usr/bin/env python import os import subprocess import config NAME="init" HELP="give git issues" def execute(args): # Check to see if the .ghi directories have already been created # If it doesn't exist, create it. if os.path.isdir(config.GHI_DIR) == False: os.makedirs(config.GHI_DIR) os.makedirs(config.IS...
#! /usr/bin/env python import config import os NAME="init" HELP="give git issues" def execute(args): # Check to see if the .ghi directories have already been created # If it doesn't exist, create it. if os.path.isdir(config.GHI_DIR) == False: os.makedirs(config.GHI_DIR) os.makedirs(config.ISSUES_DIR) elif os...
Remove no longer needed import
Remove no longer needed import
Python
apache-2.0
lorneliechty/ghi,lorneliechty/ghi
#! /usr/bin/env python import os import subprocess import config NAME="init" HELP="give git issues" def execute(args): # Check to see if the .ghi directories have already been created # If it doesn't exist, create it. if os.path.isdir(config.GHI_DIR) == False: os.makedirs(config.GHI_DIR) os.makedirs(config.IS...
#! /usr/bin/env python import config import os NAME="init" HELP="give git issues" def execute(args): # Check to see if the .ghi directories have already been created # If it doesn't exist, create it. if os.path.isdir(config.GHI_DIR) == False: os.makedirs(config.GHI_DIR) os.makedirs(config.ISSUES_DIR) elif os...
<commit_before>#! /usr/bin/env python import os import subprocess import config NAME="init" HELP="give git issues" def execute(args): # Check to see if the .ghi directories have already been created # If it doesn't exist, create it. if os.path.isdir(config.GHI_DIR) == False: os.makedirs(config.GHI_DIR) os.mak...
#! /usr/bin/env python import config import os NAME="init" HELP="give git issues" def execute(args): # Check to see if the .ghi directories have already been created # If it doesn't exist, create it. if os.path.isdir(config.GHI_DIR) == False: os.makedirs(config.GHI_DIR) os.makedirs(config.ISSUES_DIR) elif os...
#! /usr/bin/env python import os import subprocess import config NAME="init" HELP="give git issues" def execute(args): # Check to see if the .ghi directories have already been created # If it doesn't exist, create it. if os.path.isdir(config.GHI_DIR) == False: os.makedirs(config.GHI_DIR) os.makedirs(config.IS...
<commit_before>#! /usr/bin/env python import os import subprocess import config NAME="init" HELP="give git issues" def execute(args): # Check to see if the .ghi directories have already been created # If it doesn't exist, create it. if os.path.isdir(config.GHI_DIR) == False: os.makedirs(config.GHI_DIR) os.mak...
eb72c1fbd0b6764853d63ecc6f73e4281b34d411
alembic/versions/13f089849099_insert_school_data.py
alembic/versions/13f089849099_insert_school_data.py
"""Insert school data Revision ID: 13f089849099 Revises: 3cea1b2cfa Create Date: 2013-05-05 22:58:35.938292 """ # revision identifiers, used by Alembic. revision = '13f089849099' down_revision = '3cea1b2cfa' from os.path import abspath, dirname, join from alembic import op import sqlalchemy as sa proj_dir = dirn...
"""Insert school data Revision ID: 13f089849099 Revises: 3cea1b2cfa Create Date: 2013-05-05 22:58:35.938292 """ # revision identifiers, used by Alembic. revision = '13f089849099' down_revision = '3cea1b2cfa' from os.path import abspath, dirname, join from alembic import op import sqlalchemy as sa proj_dir = dirn...
Fix a bug in alembic downgrading script
Fix a bug in alembic downgrading script
Python
apache-2.0
teampopong/pokr.kr,teampopong/pokr.kr,teampopong/pokr.kr,teampopong/pokr.kr
"""Insert school data Revision ID: 13f089849099 Revises: 3cea1b2cfa Create Date: 2013-05-05 22:58:35.938292 """ # revision identifiers, used by Alembic. revision = '13f089849099' down_revision = '3cea1b2cfa' from os.path import abspath, dirname, join from alembic import op import sqlalchemy as sa proj_dir = dirn...
"""Insert school data Revision ID: 13f089849099 Revises: 3cea1b2cfa Create Date: 2013-05-05 22:58:35.938292 """ # revision identifiers, used by Alembic. revision = '13f089849099' down_revision = '3cea1b2cfa' from os.path import abspath, dirname, join from alembic import op import sqlalchemy as sa proj_dir = dirn...
<commit_before>"""Insert school data Revision ID: 13f089849099 Revises: 3cea1b2cfa Create Date: 2013-05-05 22:58:35.938292 """ # revision identifiers, used by Alembic. revision = '13f089849099' down_revision = '3cea1b2cfa' from os.path import abspath, dirname, join from alembic import op import sqlalchemy as sa ...
"""Insert school data Revision ID: 13f089849099 Revises: 3cea1b2cfa Create Date: 2013-05-05 22:58:35.938292 """ # revision identifiers, used by Alembic. revision = '13f089849099' down_revision = '3cea1b2cfa' from os.path import abspath, dirname, join from alembic import op import sqlalchemy as sa proj_dir = dirn...
"""Insert school data Revision ID: 13f089849099 Revises: 3cea1b2cfa Create Date: 2013-05-05 22:58:35.938292 """ # revision identifiers, used by Alembic. revision = '13f089849099' down_revision = '3cea1b2cfa' from os.path import abspath, dirname, join from alembic import op import sqlalchemy as sa proj_dir = dirn...
<commit_before>"""Insert school data Revision ID: 13f089849099 Revises: 3cea1b2cfa Create Date: 2013-05-05 22:58:35.938292 """ # revision identifiers, used by Alembic. revision = '13f089849099' down_revision = '3cea1b2cfa' from os.path import abspath, dirname, join from alembic import op import sqlalchemy as sa ...
37defc61f5722a8e988386cb4eed883f2205feb5
luminoso_api/save_token.py
luminoso_api/save_token.py
import argparse import os import sys from urllib.parse import urlparse from .v5_client import LuminosoClient, get_token_filename from .v5_constants import URL_BASE def main(): default_domain_base = urlparse(URL_BASE).netloc default_token_filename = get_token_filename() parser = argparse.ArgumentParser( ...
import argparse import os import sys from urllib.parse import urlparse from .v5_client import LuminosoClient, get_token_filename from .v5_constants import URL_BASE def _main(argv): default_domain_base = urlparse(URL_BASE).netloc default_token_filename = get_token_filename() parser = argparse.ArgumentPars...
Move main() into _main() to make testing easier
Move main() into _main() to make testing easier
Python
mit
LuminosoInsight/luminoso-api-client-python
import argparse import os import sys from urllib.parse import urlparse from .v5_client import LuminosoClient, get_token_filename from .v5_constants import URL_BASE def main(): default_domain_base = urlparse(URL_BASE).netloc default_token_filename = get_token_filename() parser = argparse.ArgumentParser( ...
import argparse import os import sys from urllib.parse import urlparse from .v5_client import LuminosoClient, get_token_filename from .v5_constants import URL_BASE def _main(argv): default_domain_base = urlparse(URL_BASE).netloc default_token_filename = get_token_filename() parser = argparse.ArgumentPars...
<commit_before>import argparse import os import sys from urllib.parse import urlparse from .v5_client import LuminosoClient, get_token_filename from .v5_constants import URL_BASE def main(): default_domain_base = urlparse(URL_BASE).netloc default_token_filename = get_token_filename() parser = argparse.Ar...
import argparse import os import sys from urllib.parse import urlparse from .v5_client import LuminosoClient, get_token_filename from .v5_constants import URL_BASE def _main(argv): default_domain_base = urlparse(URL_BASE).netloc default_token_filename = get_token_filename() parser = argparse.ArgumentPars...
import argparse import os import sys from urllib.parse import urlparse from .v5_client import LuminosoClient, get_token_filename from .v5_constants import URL_BASE def main(): default_domain_base = urlparse(URL_BASE).netloc default_token_filename = get_token_filename() parser = argparse.ArgumentParser( ...
<commit_before>import argparse import os import sys from urllib.parse import urlparse from .v5_client import LuminosoClient, get_token_filename from .v5_constants import URL_BASE def main(): default_domain_base = urlparse(URL_BASE).netloc default_token_filename = get_token_filename() parser = argparse.Ar...
128a0ae97e86d6dec6c149a7d3f8bccd7f8c499d
agents/DiffAgentBase.py
agents/DiffAgentBase.py
class DiffAgentBase(object): diff = [] noise_reduction = [] latest_observation = 0 current_prediction = [] name = '' behaviour = None working_behaviour_size = 2 def __init__(self, experience, knowledge, space): self.space = space self.experience = experience sel...
class DiffAgentBase(object): diff = [] noise_reduction = [] latest_observation = 0 current_prediction = [] name = '' behaviour = None working_behaviour_size = 2 def __init__(self, experience, knowledge, space): self.space = space self.experience = experience sel...
Break when done copying the working behaviour
Break when done copying the working behaviour
Python
apache-2.0
sergiuionescu/gym-agents
class DiffAgentBase(object): diff = [] noise_reduction = [] latest_observation = 0 current_prediction = [] name = '' behaviour = None working_behaviour_size = 2 def __init__(self, experience, knowledge, space): self.space = space self.experience = experience sel...
class DiffAgentBase(object): diff = [] noise_reduction = [] latest_observation = 0 current_prediction = [] name = '' behaviour = None working_behaviour_size = 2 def __init__(self, experience, knowledge, space): self.space = space self.experience = experience sel...
<commit_before>class DiffAgentBase(object): diff = [] noise_reduction = [] latest_observation = 0 current_prediction = [] name = '' behaviour = None working_behaviour_size = 2 def __init__(self, experience, knowledge, space): self.space = space self.experience = experie...
class DiffAgentBase(object): diff = [] noise_reduction = [] latest_observation = 0 current_prediction = [] name = '' behaviour = None working_behaviour_size = 2 def __init__(self, experience, knowledge, space): self.space = space self.experience = experience sel...
class DiffAgentBase(object): diff = [] noise_reduction = [] latest_observation = 0 current_prediction = [] name = '' behaviour = None working_behaviour_size = 2 def __init__(self, experience, knowledge, space): self.space = space self.experience = experience sel...
<commit_before>class DiffAgentBase(object): diff = [] noise_reduction = [] latest_observation = 0 current_prediction = [] name = '' behaviour = None working_behaviour_size = 2 def __init__(self, experience, knowledge, space): self.space = space self.experience = experie...
cdefb1fdb304939b35f8c881662fa220a57573dc
members/urls.py
members/urls.py
from django.conf.urls import patterns, url from django.contrib import auth urlpatterns = patterns('members.views', url(r'^login/$', 'login', name='login'), url(r'^logout/$', 'logout', name='logout'), url(r'^search/(?P<name>.*)/$', 'search', name='search'), url(r'^archive/$', 'archive_student_council', ...
from django.conf.urls import patterns, url from django.contrib import auth urlpatterns = patterns('members.views', url(r'^login/$', 'login', name='login'), url(r'^logout/$', 'logout', name='logout'), url(r'^search/(?P<name>.*)/$', 'search', name='search'), url(r'^archive/$', 'archive_student_council', ...
Add url for user's profile
Add url for user's profile
Python
mit
Hackfmi/Diaphanum,Hackfmi/Diaphanum
from django.conf.urls import patterns, url from django.contrib import auth urlpatterns = patterns('members.views', url(r'^login/$', 'login', name='login'), url(r'^logout/$', 'logout', name='logout'), url(r'^search/(?P<name>.*)/$', 'search', name='search'), url(r'^archive/$', 'archive_student_council', ...
from django.conf.urls import patterns, url from django.contrib import auth urlpatterns = patterns('members.views', url(r'^login/$', 'login', name='login'), url(r'^logout/$', 'logout', name='logout'), url(r'^search/(?P<name>.*)/$', 'search', name='search'), url(r'^archive/$', 'archive_student_council', ...
<commit_before>from django.conf.urls import patterns, url from django.contrib import auth urlpatterns = patterns('members.views', url(r'^login/$', 'login', name='login'), url(r'^logout/$', 'logout', name='logout'), url(r'^search/(?P<name>.*)/$', 'search', name='search'), url(r'^archive/$', 'archive_stu...
from django.conf.urls import patterns, url from django.contrib import auth urlpatterns = patterns('members.views', url(r'^login/$', 'login', name='login'), url(r'^logout/$', 'logout', name='logout'), url(r'^search/(?P<name>.*)/$', 'search', name='search'), url(r'^archive/$', 'archive_student_council', ...
from django.conf.urls import patterns, url from django.contrib import auth urlpatterns = patterns('members.views', url(r'^login/$', 'login', name='login'), url(r'^logout/$', 'logout', name='logout'), url(r'^search/(?P<name>.*)/$', 'search', name='search'), url(r'^archive/$', 'archive_student_council', ...
<commit_before>from django.conf.urls import patterns, url from django.contrib import auth urlpatterns = patterns('members.views', url(r'^login/$', 'login', name='login'), url(r'^logout/$', 'logout', name='logout'), url(r'^search/(?P<name>.*)/$', 'search', name='search'), url(r'^archive/$', 'archive_stu...
6d5a37ef127f2b1822645fcad6636880e92d5489
helusers/models.py
helusers/models.py
import uuid import logging from django.db import models from django.contrib.auth.models import AbstractUser as DjangoAbstractUser logger = logging.getLogger(__name__) class AbstractUser(DjangoAbstractUser): uuid = models.UUIDField(primary_key=True) department_name = models.CharField(max_length=50, null=True,...
import uuid import logging from django.db import models from django.contrib.auth.models import AbstractUser as DjangoAbstractUser logger = logging.getLogger(__name__) class AbstractUser(DjangoAbstractUser): uuid = models.UUIDField(primary_key=True) department_name = models.CharField(max_length=50, null=True,...
Remove primary_sid from common fields
Remove primary_sid from common fields
Python
bsd-2-clause
City-of-Helsinki/django-helusers,City-of-Helsinki/django-helusers
import uuid import logging from django.db import models from django.contrib.auth.models import AbstractUser as DjangoAbstractUser logger = logging.getLogger(__name__) class AbstractUser(DjangoAbstractUser): uuid = models.UUIDField(primary_key=True) department_name = models.CharField(max_length=50, null=True,...
import uuid import logging from django.db import models from django.contrib.auth.models import AbstractUser as DjangoAbstractUser logger = logging.getLogger(__name__) class AbstractUser(DjangoAbstractUser): uuid = models.UUIDField(primary_key=True) department_name = models.CharField(max_length=50, null=True,...
<commit_before>import uuid import logging from django.db import models from django.contrib.auth.models import AbstractUser as DjangoAbstractUser logger = logging.getLogger(__name__) class AbstractUser(DjangoAbstractUser): uuid = models.UUIDField(primary_key=True) department_name = models.CharField(max_length...
import uuid import logging from django.db import models from django.contrib.auth.models import AbstractUser as DjangoAbstractUser logger = logging.getLogger(__name__) class AbstractUser(DjangoAbstractUser): uuid = models.UUIDField(primary_key=True) department_name = models.CharField(max_length=50, null=True,...
import uuid import logging from django.db import models from django.contrib.auth.models import AbstractUser as DjangoAbstractUser logger = logging.getLogger(__name__) class AbstractUser(DjangoAbstractUser): uuid = models.UUIDField(primary_key=True) department_name = models.CharField(max_length=50, null=True,...
<commit_before>import uuid import logging from django.db import models from django.contrib.auth.models import AbstractUser as DjangoAbstractUser logger = logging.getLogger(__name__) class AbstractUser(DjangoAbstractUser): uuid = models.UUIDField(primary_key=True) department_name = models.CharField(max_length...
8382ee65c87c5eee976d4488ef91bdd5f801c06b
apitestcase/testcase.py
apitestcase/testcase.py
import requests class TestCase(object): """ Add assetion methods for HTTP Requests to TestCase """ def assertRequest(self, method="GET", url="", status_code=200, contains=None, **kwargs): """ Asserts requests on a given endpoint """ if contains is None: ...
import requests class TestCase(object): """ Add assetion methods for HTTP Requests to TestCase """ def assertRequest(self, method="GET", url="", status_code=200, contains=None, **kwargs): """ Asserts requests on a given endpoint """ if contains is None: ...
Remove return statements from assert methods
Remove return statements from assert methods
Python
mit
bramwelt/apitestcase
import requests class TestCase(object): """ Add assetion methods for HTTP Requests to TestCase """ def assertRequest(self, method="GET", url="", status_code=200, contains=None, **kwargs): """ Asserts requests on a given endpoint """ if contains is None: ...
import requests class TestCase(object): """ Add assetion methods for HTTP Requests to TestCase """ def assertRequest(self, method="GET", url="", status_code=200, contains=None, **kwargs): """ Asserts requests on a given endpoint """ if contains is None: ...
<commit_before>import requests class TestCase(object): """ Add assetion methods for HTTP Requests to TestCase """ def assertRequest(self, method="GET", url="", status_code=200, contains=None, **kwargs): """ Asserts requests on a given endpoint """ if contai...
import requests class TestCase(object): """ Add assetion methods for HTTP Requests to TestCase """ def assertRequest(self, method="GET", url="", status_code=200, contains=None, **kwargs): """ Asserts requests on a given endpoint """ if contains is None: ...
import requests class TestCase(object): """ Add assetion methods for HTTP Requests to TestCase """ def assertRequest(self, method="GET", url="", status_code=200, contains=None, **kwargs): """ Asserts requests on a given endpoint """ if contains is None: ...
<commit_before>import requests class TestCase(object): """ Add assetion methods for HTTP Requests to TestCase """ def assertRequest(self, method="GET", url="", status_code=200, contains=None, **kwargs): """ Asserts requests on a given endpoint """ if contai...
44c8098906375020b6d6b894601c356bd0fbd586
confluent/main.py
confluent/main.py
# Copyright 2013 IBM Corporation # All rights reserved # This is the main application. # It should check for existing UDP socket to negotiate socket listen takeover # It will have three paths into it: # -Unix domain socket # -TLS socket # -WSGI # Additionally, it will be able to receive particular UDP packets to...
# Copyright 2013 IBM Corporation # All rights reserved # This is the main application. # It should check for existing UDP socket to negotiate socket listen takeover # It will have three paths into it: # -Unix domain socket # -TLS socket # -WSGI # Additionally, it will be able to receive particular UDP packets to...
Add commented code to allow easily getting at the debug socket, needs eventlet fix to work
Add commented code to allow easily getting at the debug socket, needs eventlet fix to work
Python
apache-2.0
xcat2/confluent,michaelfardu/thinkconfluent,xcat2/confluent,michaelfardu/thinkconfluent,jjohnson42/confluent,jufm/confluent,xcat2/confluent,chenglch/confluent,xcat2/confluent,chenglch/confluent,whowutwut/confluent,jufm/confluent,jjohnson42/confluent,jufm/confluent,chenglch/confluent,jufm/confluent,whowutwut/confluent,x...
# Copyright 2013 IBM Corporation # All rights reserved # This is the main application. # It should check for existing UDP socket to negotiate socket listen takeover # It will have three paths into it: # -Unix domain socket # -TLS socket # -WSGI # Additionally, it will be able to receive particular UDP packets to...
# Copyright 2013 IBM Corporation # All rights reserved # This is the main application. # It should check for existing UDP socket to negotiate socket listen takeover # It will have three paths into it: # -Unix domain socket # -TLS socket # -WSGI # Additionally, it will be able to receive particular UDP packets to...
<commit_before># Copyright 2013 IBM Corporation # All rights reserved # This is the main application. # It should check for existing UDP socket to negotiate socket listen takeover # It will have three paths into it: # -Unix domain socket # -TLS socket # -WSGI # Additionally, it will be able to receive particular...
# Copyright 2013 IBM Corporation # All rights reserved # This is the main application. # It should check for existing UDP socket to negotiate socket listen takeover # It will have three paths into it: # -Unix domain socket # -TLS socket # -WSGI # Additionally, it will be able to receive particular UDP packets to...
# Copyright 2013 IBM Corporation # All rights reserved # This is the main application. # It should check for existing UDP socket to negotiate socket listen takeover # It will have three paths into it: # -Unix domain socket # -TLS socket # -WSGI # Additionally, it will be able to receive particular UDP packets to...
<commit_before># Copyright 2013 IBM Corporation # All rights reserved # This is the main application. # It should check for existing UDP socket to negotiate socket listen takeover # It will have three paths into it: # -Unix domain socket # -TLS socket # -WSGI # Additionally, it will be able to receive particular...
25cf672fa4a743b3c4cb198e5fdf19bd40991f35
life/__init__.py
life/__init__.py
RULES = 'B3/S23' WIDTH = 1280 HEIGHT = 720 CELL_SIZE = 8 DENSITY = .5
RULES = 'B3/S23' WIDTH = 1280 HEIGHT = 720 CELL_SIZE = 16 DENSITY = .2
Make the default cell size larger.
Make the default cell size larger.
Python
bsd-2-clause
lig/life
RULES = 'B3/S23' WIDTH = 1280 HEIGHT = 720 CELL_SIZE = 8 DENSITY = .5 Make the default cell size larger.
RULES = 'B3/S23' WIDTH = 1280 HEIGHT = 720 CELL_SIZE = 16 DENSITY = .2
<commit_before>RULES = 'B3/S23' WIDTH = 1280 HEIGHT = 720 CELL_SIZE = 8 DENSITY = .5 <commit_msg>Make the default cell size larger.<commit_after>
RULES = 'B3/S23' WIDTH = 1280 HEIGHT = 720 CELL_SIZE = 16 DENSITY = .2
RULES = 'B3/S23' WIDTH = 1280 HEIGHT = 720 CELL_SIZE = 8 DENSITY = .5 Make the default cell size larger.RULES = 'B3/S23' WIDTH = 1280 HEIGHT = 720 CELL_SIZE = 16 DENSITY = .2
<commit_before>RULES = 'B3/S23' WIDTH = 1280 HEIGHT = 720 CELL_SIZE = 8 DENSITY = .5 <commit_msg>Make the default cell size larger.<commit_after>RULES = 'B3/S23' WIDTH = 1280 HEIGHT = 720 CELL_SIZE = 16 DENSITY = .2
6e61c41a24e35e66d941b67945f135392b27397d
list_ami_datasets.py
list_ami_datasets.py
""" Groups AMI datasets by pointing direction, then dumps them in JSON format. """ import ami import json ami_rootdir = '/opt/ami' r = ami.Reduce(ami_rootdir) named_groups = r.group_pointings() json.dump(named_groups, open('groups.json', 'w'), sort_keys=True, indent=4)
#!/usr/bin/python """ Groups AMI datasets by pointing direction, then dumps them in JSON format. """ import json import optparse import sys import ami def main(): options, outputfilename = handle_args(sys.argv[1:]) r = ami.Reduce(options.amidir) named_groups = r.group_pointings() json.dump(named_grou...
Make listings script executable, add argument handling.
Make listings script executable, add argument handling.
Python
bsd-3-clause
timstaley/drive-ami
""" Groups AMI datasets by pointing direction, then dumps them in JSON format. """ import ami import json ami_rootdir = '/opt/ami' r = ami.Reduce(ami_rootdir) named_groups = r.group_pointings() json.dump(named_groups, open('groups.json', 'w'), sort_keys=True, indent=4) Make listings script executable, ad...
#!/usr/bin/python """ Groups AMI datasets by pointing direction, then dumps them in JSON format. """ import json import optparse import sys import ami def main(): options, outputfilename = handle_args(sys.argv[1:]) r = ami.Reduce(options.amidir) named_groups = r.group_pointings() json.dump(named_grou...
<commit_before>""" Groups AMI datasets by pointing direction, then dumps them in JSON format. """ import ami import json ami_rootdir = '/opt/ami' r = ami.Reduce(ami_rootdir) named_groups = r.group_pointings() json.dump(named_groups, open('groups.json', 'w'), sort_keys=True, indent=4) <commit_msg>Make lis...
#!/usr/bin/python """ Groups AMI datasets by pointing direction, then dumps them in JSON format. """ import json import optparse import sys import ami def main(): options, outputfilename = handle_args(sys.argv[1:]) r = ami.Reduce(options.amidir) named_groups = r.group_pointings() json.dump(named_grou...
""" Groups AMI datasets by pointing direction, then dumps them in JSON format. """ import ami import json ami_rootdir = '/opt/ami' r = ami.Reduce(ami_rootdir) named_groups = r.group_pointings() json.dump(named_groups, open('groups.json', 'w'), sort_keys=True, indent=4) Make listings script executable, ad...
<commit_before>""" Groups AMI datasets by pointing direction, then dumps them in JSON format. """ import ami import json ami_rootdir = '/opt/ami' r = ami.Reduce(ami_rootdir) named_groups = r.group_pointings() json.dump(named_groups, open('groups.json', 'w'), sort_keys=True, indent=4) <commit_msg>Make lis...
31c360fbdb3aa1393715e53ec4dfd86e59d68249
staticgen_demo/staticgen_views.py
staticgen_demo/staticgen_views.py
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.conf import settings from django.utils import translation from cms.models import Title from staticgen.staticgen_pool import staticgen_pool from staticgen.staticgen_views import StaticgenView class StaicgenDemoStaticViews(StaticgenView): ...
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.conf import settings from django.dispatch import receiver from django.utils import translation from cms.models import Title from cms.signals import page_moved, post_publish, post_unpublish from staticgen.models import Page from staticgen.st...
Mark CMS pages as changed .. using CMS publisher signals.
Mark CMS pages as changed .. using CMS publisher signals.
Python
bsd-3-clause
mishbahr/staticgen-demo,mishbahr/staticgen-demo,mishbahr/staticgen-demo
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.conf import settings from django.utils import translation from cms.models import Title from staticgen.staticgen_pool import staticgen_pool from staticgen.staticgen_views import StaticgenView class StaicgenDemoStaticViews(StaticgenView): ...
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.conf import settings from django.dispatch import receiver from django.utils import translation from cms.models import Title from cms.signals import page_moved, post_publish, post_unpublish from staticgen.models import Page from staticgen.st...
<commit_before># -*- coding: utf-8 -*- from __future__ import unicode_literals from django.conf import settings from django.utils import translation from cms.models import Title from staticgen.staticgen_pool import staticgen_pool from staticgen.staticgen_views import StaticgenView class StaicgenDemoStaticViews(Sta...
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.conf import settings from django.dispatch import receiver from django.utils import translation from cms.models import Title from cms.signals import page_moved, post_publish, post_unpublish from staticgen.models import Page from staticgen.st...
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.conf import settings from django.utils import translation from cms.models import Title from staticgen.staticgen_pool import staticgen_pool from staticgen.staticgen_views import StaticgenView class StaicgenDemoStaticViews(StaticgenView): ...
<commit_before># -*- coding: utf-8 -*- from __future__ import unicode_literals from django.conf import settings from django.utils import translation from cms.models import Title from staticgen.staticgen_pool import staticgen_pool from staticgen.staticgen_views import StaticgenView class StaicgenDemoStaticViews(Sta...
50d447a546cd939594aeb8fda84167cef27f0d5e
msmbuilder/scripts/msmb.py
msmbuilder/scripts/msmb.py
"""Statistical models for biomolecular dynamics""" from __future__ import print_function, absolute_import, division import sys from ..cmdline import App from ..commands import * from ..version import version # the commands register themselves when they're imported class MSMBuilderApp(App): def _subcommands(self):...
"""Statistical models for biomolecular dynamics""" from __future__ import print_function, absolute_import, division import sys from ..cmdline import App from ..commands import * from ..version import version # the commands register themselves when they're imported # Load external commands which register themselves # w...
Load plugins from entry point
Load plugins from entry point
Python
lgpl-2.1
brookehus/msmbuilder,stephenliu1989/msmbuilder,peastman/msmbuilder,brookehus/msmbuilder,dr-nate/msmbuilder,dotsdl/msmbuilder,peastman/msmbuilder,msultan/msmbuilder,mpharrigan/mixtape,stephenliu1989/msmbuilder,cxhernandez/msmbuilder,rmcgibbo/msmbuilder,cxhernandez/msmbuilder,msultan/msmbuilder,brookehus/msmbuilder,steph...
"""Statistical models for biomolecular dynamics""" from __future__ import print_function, absolute_import, division import sys from ..cmdline import App from ..commands import * from ..version import version # the commands register themselves when they're imported class MSMBuilderApp(App): def _subcommands(self):...
"""Statistical models for biomolecular dynamics""" from __future__ import print_function, absolute_import, division import sys from ..cmdline import App from ..commands import * from ..version import version # the commands register themselves when they're imported # Load external commands which register themselves # w...
<commit_before>"""Statistical models for biomolecular dynamics""" from __future__ import print_function, absolute_import, division import sys from ..cmdline import App from ..commands import * from ..version import version # the commands register themselves when they're imported class MSMBuilderApp(App): def _sub...
"""Statistical models for biomolecular dynamics""" from __future__ import print_function, absolute_import, division import sys from ..cmdline import App from ..commands import * from ..version import version # the commands register themselves when they're imported # Load external commands which register themselves # w...
"""Statistical models for biomolecular dynamics""" from __future__ import print_function, absolute_import, division import sys from ..cmdline import App from ..commands import * from ..version import version # the commands register themselves when they're imported class MSMBuilderApp(App): def _subcommands(self):...
<commit_before>"""Statistical models for biomolecular dynamics""" from __future__ import print_function, absolute_import, division import sys from ..cmdline import App from ..commands import * from ..version import version # the commands register themselves when they're imported class MSMBuilderApp(App): def _sub...
f9d63b418f69c77b01f9bed1d05fecdf8c028e7e
mvw/generator.py
mvw/generator.py
import os class Generator: def run(self, sourcedir, outputdir): sourcedir = os.path.normpath(sourcedir) outputdir = os.path.normpath(outputdir) prefix = len(sourcedir)+len(os.path.sep) for root, dirs, files in os.walk(sourcedir): relpath = os.path.join(outputdir, root[pr...
import os class Generator: def run(self, sourcedir, outputdir): sourcedir = os.path.normpath(sourcedir) outputdir = os.path.normpath(outputdir) prefix = len(sourcedir)+len(os.path.sep) for root, dirs, files in os.walk(sourcedir): destpath = os.path.join(outputdir, root[...
Call parse with markdown files, copy otherwise
Call parse with markdown files, copy otherwise
Python
mit
kevinbeaty/mvw
import os class Generator: def run(self, sourcedir, outputdir): sourcedir = os.path.normpath(sourcedir) outputdir = os.path.normpath(outputdir) prefix = len(sourcedir)+len(os.path.sep) for root, dirs, files in os.walk(sourcedir): relpath = os.path.join(outputdir, root[pr...
import os class Generator: def run(self, sourcedir, outputdir): sourcedir = os.path.normpath(sourcedir) outputdir = os.path.normpath(outputdir) prefix = len(sourcedir)+len(os.path.sep) for root, dirs, files in os.walk(sourcedir): destpath = os.path.join(outputdir, root[...
<commit_before>import os class Generator: def run(self, sourcedir, outputdir): sourcedir = os.path.normpath(sourcedir) outputdir = os.path.normpath(outputdir) prefix = len(sourcedir)+len(os.path.sep) for root, dirs, files in os.walk(sourcedir): relpath = os.path.join(out...
import os class Generator: def run(self, sourcedir, outputdir): sourcedir = os.path.normpath(sourcedir) outputdir = os.path.normpath(outputdir) prefix = len(sourcedir)+len(os.path.sep) for root, dirs, files in os.walk(sourcedir): destpath = os.path.join(outputdir, root[...
import os class Generator: def run(self, sourcedir, outputdir): sourcedir = os.path.normpath(sourcedir) outputdir = os.path.normpath(outputdir) prefix = len(sourcedir)+len(os.path.sep) for root, dirs, files in os.walk(sourcedir): relpath = os.path.join(outputdir, root[pr...
<commit_before>import os class Generator: def run(self, sourcedir, outputdir): sourcedir = os.path.normpath(sourcedir) outputdir = os.path.normpath(outputdir) prefix = len(sourcedir)+len(os.path.sep) for root, dirs, files in os.walk(sourcedir): relpath = os.path.join(out...
931024e081d380a5f754920c7992b359ce2cd2de
celery_progress/__init__.py
celery_progress/__init__.py
from django.conf import settings from django.utils.module_loading import import_by_path BACKEND = getattr(settings, 'CELERY_PROGRESS_BACKEND', 'celery_progress.backends.CeleryBackend') def get_backend(): return import_by_path(BACKEND) backend = get_backend()()
from django.conf import settings from django.utils.module_loading import import_by_path BACKEND = getattr(settings.configure(), 'CELERY_PROGRESS_BACKEND', 'celery_progress.backends.CeleryBackend') def get_backend(): return import_by_path(BACKEND) backend = get_backend()()
Call configure() on settings to ensure that the CELERY_PROGRESS_BACKEND variable can be picked up
Call configure() on settings to ensure that the CELERY_PROGRESS_BACKEND variable can be picked up
Python
bsd-3-clause
annaisystems/django-celery-progress,annaisystems/django-celery-progress,annaisystems/django-celery-progress
from django.conf import settings from django.utils.module_loading import import_by_path BACKEND = getattr(settings, 'CELERY_PROGRESS_BACKEND', 'celery_progress.backends.CeleryBackend') def get_backend(): return import_by_path(BACKEND) backend = get_backend()() Call configure() on settings to ...
from django.conf import settings from django.utils.module_loading import import_by_path BACKEND = getattr(settings.configure(), 'CELERY_PROGRESS_BACKEND', 'celery_progress.backends.CeleryBackend') def get_backend(): return import_by_path(BACKEND) backend = get_backend()()
<commit_before>from django.conf import settings from django.utils.module_loading import import_by_path BACKEND = getattr(settings, 'CELERY_PROGRESS_BACKEND', 'celery_progress.backends.CeleryBackend') def get_backend(): return import_by_path(BACKEND) backend = get_backend()() <commit_msg>Call ...
from django.conf import settings from django.utils.module_loading import import_by_path BACKEND = getattr(settings.configure(), 'CELERY_PROGRESS_BACKEND', 'celery_progress.backends.CeleryBackend') def get_backend(): return import_by_path(BACKEND) backend = get_backend()()
from django.conf import settings from django.utils.module_loading import import_by_path BACKEND = getattr(settings, 'CELERY_PROGRESS_BACKEND', 'celery_progress.backends.CeleryBackend') def get_backend(): return import_by_path(BACKEND) backend = get_backend()() Call configure() on settings to ...
<commit_before>from django.conf import settings from django.utils.module_loading import import_by_path BACKEND = getattr(settings, 'CELERY_PROGRESS_BACKEND', 'celery_progress.backends.CeleryBackend') def get_backend(): return import_by_path(BACKEND) backend = get_backend()() <commit_msg>Call ...
b982fcd13400e6e05c4b711f034f360bdbdbe07d
test/test_logger.py
test/test_logger.py
# encoding: utf-8 """ .. codeauthor:: Tsuyoshi Hombashi <[email protected]> """ from __future__ import print_function, unicode_literals import pytest from pytablewriter import set_log_level, set_logger logbook = pytest.importorskip("logbook", minversion="1.1.0") import logbook # isort:skip class Test...
# encoding: utf-8 """ .. codeauthor:: Tsuyoshi Hombashi <[email protected]> """ from __future__ import print_function, unicode_literals import pytest from pytablewriter import set_log_level, set_logger logbook = pytest.importorskip("logbook", minversion="0.12.3") import logbook # isort:skip class Tes...
Modify an importer skip minversion
Modify an importer skip minversion
Python
mit
thombashi/pytablewriter
# encoding: utf-8 """ .. codeauthor:: Tsuyoshi Hombashi <[email protected]> """ from __future__ import print_function, unicode_literals import pytest from pytablewriter import set_log_level, set_logger logbook = pytest.importorskip("logbook", minversion="1.1.0") import logbook # isort:skip class Test...
# encoding: utf-8 """ .. codeauthor:: Tsuyoshi Hombashi <[email protected]> """ from __future__ import print_function, unicode_literals import pytest from pytablewriter import set_log_level, set_logger logbook = pytest.importorskip("logbook", minversion="0.12.3") import logbook # isort:skip class Tes...
<commit_before># encoding: utf-8 """ .. codeauthor:: Tsuyoshi Hombashi <[email protected]> """ from __future__ import print_function, unicode_literals import pytest from pytablewriter import set_log_level, set_logger logbook = pytest.importorskip("logbook", minversion="1.1.0") import logbook # isort:sk...
# encoding: utf-8 """ .. codeauthor:: Tsuyoshi Hombashi <[email protected]> """ from __future__ import print_function, unicode_literals import pytest from pytablewriter import set_log_level, set_logger logbook = pytest.importorskip("logbook", minversion="0.12.3") import logbook # isort:skip class Tes...
# encoding: utf-8 """ .. codeauthor:: Tsuyoshi Hombashi <[email protected]> """ from __future__ import print_function, unicode_literals import pytest from pytablewriter import set_log_level, set_logger logbook = pytest.importorskip("logbook", minversion="1.1.0") import logbook # isort:skip class Test...
<commit_before># encoding: utf-8 """ .. codeauthor:: Tsuyoshi Hombashi <[email protected]> """ from __future__ import print_function, unicode_literals import pytest from pytablewriter import set_log_level, set_logger logbook = pytest.importorskip("logbook", minversion="1.1.0") import logbook # isort:sk...
18cbf5c9b357dc2941fd268b87a65649a086ab01
IPython/html/widgets/widget_output.py
IPython/html/widgets/widget_output.py
"""Output class. Represents a widget that can be used to display output within the widget area. """ # Copyright (c) IPython Development Team. # Distributed under the terms of the Modified BSD License. from .widget import DOMWidget import sys from IPython.utils.traitlets import Unicode, List from IPython.display im...
"""Output class. Represents a widget that can be used to display output within the widget area. """ # Copyright (c) IPython Development Team. # Distributed under the terms of the Modified BSD License. from .widget import DOMWidget import sys from IPython.utils.traitlets import Unicode, List from IPython.display im...
Add doc string to Output widget
Add doc string to Output widget
Python
bsd-3-clause
ipython/ipython,ipython/ipython
"""Output class. Represents a widget that can be used to display output within the widget area. """ # Copyright (c) IPython Development Team. # Distributed under the terms of the Modified BSD License. from .widget import DOMWidget import sys from IPython.utils.traitlets import Unicode, List from IPython.display im...
"""Output class. Represents a widget that can be used to display output within the widget area. """ # Copyright (c) IPython Development Team. # Distributed under the terms of the Modified BSD License. from .widget import DOMWidget import sys from IPython.utils.traitlets import Unicode, List from IPython.display im...
<commit_before>"""Output class. Represents a widget that can be used to display output within the widget area. """ # Copyright (c) IPython Development Team. # Distributed under the terms of the Modified BSD License. from .widget import DOMWidget import sys from IPython.utils.traitlets import Unicode, List from IPy...
"""Output class. Represents a widget that can be used to display output within the widget area. """ # Copyright (c) IPython Development Team. # Distributed under the terms of the Modified BSD License. from .widget import DOMWidget import sys from IPython.utils.traitlets import Unicode, List from IPython.display im...
"""Output class. Represents a widget that can be used to display output within the widget area. """ # Copyright (c) IPython Development Team. # Distributed under the terms of the Modified BSD License. from .widget import DOMWidget import sys from IPython.utils.traitlets import Unicode, List from IPython.display im...
<commit_before>"""Output class. Represents a widget that can be used to display output within the widget area. """ # Copyright (c) IPython Development Team. # Distributed under the terms of the Modified BSD License. from .widget import DOMWidget import sys from IPython.utils.traitlets import Unicode, List from IPy...
b6b9c6f3f8faaade428d044f93acd25edade075d
tools/pdtools/pdtools/__main__.py
tools/pdtools/pdtools/__main__.py
""" Paradrop command line utility. Environment Variables: PDSERVER_URL Paradrop controller URL [default: https://paradrop.org]. """ import os import click from . import chute from . import device from . import routers from . import store PDSERVER_URL = os.environ.get("PDSERVER_URL", "https://paradrop.org") ...
""" Paradrop command line utility. Environment Variables: PDSERVER_URL Paradrop controller URL [default: https://paradrop.org]. """ import os import click from . import chute from . import device from . import routers from . import store PDSERVER_URL = os.environ.get("PDSERVER_URL", "https://paradrop.org") ...
Enable '-h' help option from the pdtools root level.
Enable '-h' help option from the pdtools root level.
Python
apache-2.0
ParadropLabs/Paradrop,ParadropLabs/Paradrop,ParadropLabs/Paradrop
""" Paradrop command line utility. Environment Variables: PDSERVER_URL Paradrop controller URL [default: https://paradrop.org]. """ import os import click from . import chute from . import device from . import routers from . import store PDSERVER_URL = os.environ.get("PDSERVER_URL", "https://paradrop.org") ...
""" Paradrop command line utility. Environment Variables: PDSERVER_URL Paradrop controller URL [default: https://paradrop.org]. """ import os import click from . import chute from . import device from . import routers from . import store PDSERVER_URL = os.environ.get("PDSERVER_URL", "https://paradrop.org") ...
<commit_before>""" Paradrop command line utility. Environment Variables: PDSERVER_URL Paradrop controller URL [default: https://paradrop.org]. """ import os import click from . import chute from . import device from . import routers from . import store PDSERVER_URL = os.environ.get("PDSERVER_URL", "https://...
""" Paradrop command line utility. Environment Variables: PDSERVER_URL Paradrop controller URL [default: https://paradrop.org]. """ import os import click from . import chute from . import device from . import routers from . import store PDSERVER_URL = os.environ.get("PDSERVER_URL", "https://paradrop.org") ...
""" Paradrop command line utility. Environment Variables: PDSERVER_URL Paradrop controller URL [default: https://paradrop.org]. """ import os import click from . import chute from . import device from . import routers from . import store PDSERVER_URL = os.environ.get("PDSERVER_URL", "https://paradrop.org") ...
<commit_before>""" Paradrop command line utility. Environment Variables: PDSERVER_URL Paradrop controller URL [default: https://paradrop.org]. """ import os import click from . import chute from . import device from . import routers from . import store PDSERVER_URL = os.environ.get("PDSERVER_URL", "https://...
d546d6901859a5fee8a16ffea6df560ecbb1e280
tests/unit_tests.py
tests/unit_tests.py
#!/usr/bin/env python import os import sys import unittest parentDir = os.path.join(os.path.dirname(__file__), "../") sys.path.insert(0, parentDir) from oxyfloat import OxyFloat class DataTest(unittest.TestCase): def setUp(self): self.of = OxyFloat() def test_get_oxyfloats(self): float_list ...
#!/usr/bin/env python import os import sys import unittest parentDir = os.path.join(os.path.dirname(__file__), "../") sys.path.insert(0, parentDir) from oxyfloat import OxyFloat class DataTest(unittest.TestCase): def setUp(self): self.of = OxyFloat() def test_get_oxyfloats(self): self.oga_fl...
Add tests for reading profile data
Add tests for reading profile data
Python
mit
biofloat/biofloat,MBARIMike/biofloat,biofloat/biofloat,MBARIMike/biofloat,MBARIMike/oxyfloat,MBARIMike/oxyfloat
#!/usr/bin/env python import os import sys import unittest parentDir = os.path.join(os.path.dirname(__file__), "../") sys.path.insert(0, parentDir) from oxyfloat import OxyFloat class DataTest(unittest.TestCase): def setUp(self): self.of = OxyFloat() def test_get_oxyfloats(self): float_list ...
#!/usr/bin/env python import os import sys import unittest parentDir = os.path.join(os.path.dirname(__file__), "../") sys.path.insert(0, parentDir) from oxyfloat import OxyFloat class DataTest(unittest.TestCase): def setUp(self): self.of = OxyFloat() def test_get_oxyfloats(self): self.oga_fl...
<commit_before>#!/usr/bin/env python import os import sys import unittest parentDir = os.path.join(os.path.dirname(__file__), "../") sys.path.insert(0, parentDir) from oxyfloat import OxyFloat class DataTest(unittest.TestCase): def setUp(self): self.of = OxyFloat() def test_get_oxyfloats(self): ...
#!/usr/bin/env python import os import sys import unittest parentDir = os.path.join(os.path.dirname(__file__), "../") sys.path.insert(0, parentDir) from oxyfloat import OxyFloat class DataTest(unittest.TestCase): def setUp(self): self.of = OxyFloat() def test_get_oxyfloats(self): self.oga_fl...
#!/usr/bin/env python import os import sys import unittest parentDir = os.path.join(os.path.dirname(__file__), "../") sys.path.insert(0, parentDir) from oxyfloat import OxyFloat class DataTest(unittest.TestCase): def setUp(self): self.of = OxyFloat() def test_get_oxyfloats(self): float_list ...
<commit_before>#!/usr/bin/env python import os import sys import unittest parentDir = os.path.join(os.path.dirname(__file__), "../") sys.path.insert(0, parentDir) from oxyfloat import OxyFloat class DataTest(unittest.TestCase): def setUp(self): self.of = OxyFloat() def test_get_oxyfloats(self): ...
39f44c926eb16f2cd57fa344318bce652b158a3a
tests/shape/test_basic.py
tests/shape/test_basic.py
import pytest from unittest import TestCase from stylo.shape import Ellipse, Circle, Rectangle, Square from stylo.testing.shape import BaseShapeTest @pytest.mark.shape class TestEllipse(TestCase, BaseShapeTest): """Tests for the :code:`Ellipse` shape.""" def setUp(self): self.shape = Ellipse(0, 0, 1...
import pytest from unittest import TestCase from stylo.shape import Ellipse, Circle, Rectangle, Square, Triangle from stylo.testing.shape import BaseShapeTest @pytest.mark.shape class TestEllipse(TestCase, BaseShapeTest): """Tests for the :code:`Ellipse` shape.""" def setUp(self): self.shape = Ellip...
Add Triangle to shape tests
Add Triangle to shape tests
Python
mit
alcarney/stylo,alcarney/stylo
import pytest from unittest import TestCase from stylo.shape import Ellipse, Circle, Rectangle, Square from stylo.testing.shape import BaseShapeTest @pytest.mark.shape class TestEllipse(TestCase, BaseShapeTest): """Tests for the :code:`Ellipse` shape.""" def setUp(self): self.shape = Ellipse(0, 0, 1...
import pytest from unittest import TestCase from stylo.shape import Ellipse, Circle, Rectangle, Square, Triangle from stylo.testing.shape import BaseShapeTest @pytest.mark.shape class TestEllipse(TestCase, BaseShapeTest): """Tests for the :code:`Ellipse` shape.""" def setUp(self): self.shape = Ellip...
<commit_before>import pytest from unittest import TestCase from stylo.shape import Ellipse, Circle, Rectangle, Square from stylo.testing.shape import BaseShapeTest @pytest.mark.shape class TestEllipse(TestCase, BaseShapeTest): """Tests for the :code:`Ellipse` shape.""" def setUp(self): self.shape = ...
import pytest from unittest import TestCase from stylo.shape import Ellipse, Circle, Rectangle, Square, Triangle from stylo.testing.shape import BaseShapeTest @pytest.mark.shape class TestEllipse(TestCase, BaseShapeTest): """Tests for the :code:`Ellipse` shape.""" def setUp(self): self.shape = Ellip...
import pytest from unittest import TestCase from stylo.shape import Ellipse, Circle, Rectangle, Square from stylo.testing.shape import BaseShapeTest @pytest.mark.shape class TestEllipse(TestCase, BaseShapeTest): """Tests for the :code:`Ellipse` shape.""" def setUp(self): self.shape = Ellipse(0, 0, 1...
<commit_before>import pytest from unittest import TestCase from stylo.shape import Ellipse, Circle, Rectangle, Square from stylo.testing.shape import BaseShapeTest @pytest.mark.shape class TestEllipse(TestCase, BaseShapeTest): """Tests for the :code:`Ellipse` shape.""" def setUp(self): self.shape = ...
ca641bb6bfc65d82564cee684bc3192986806b71
vdb/flu_download.py
vdb/flu_download.py
import os,datetime from download import download from download import get_parser class flu_download(download): def __init__(self, **kwargs): download.__init__(self, **kwargs) if __name__=="__main__": parser = get_parser() args = parser.parse_args() fasta_fields = ['strain', 'virus', 'accession...
import os,datetime from download import download from download import get_parser class flu_download(download): def __init__(self, **kwargs): download.__init__(self, **kwargs) if __name__=="__main__": parser = get_parser() args = parser.parse_args() fasta_fields = ['strain', 'virus', 'accession...
Revise flu fasta fields to interface with nextflu.
Revise flu fasta fields to interface with nextflu.
Python
agpl-3.0
blab/nextstrain-db,nextstrain/fauna,nextstrain/fauna,blab/nextstrain-db
import os,datetime from download import download from download import get_parser class flu_download(download): def __init__(self, **kwargs): download.__init__(self, **kwargs) if __name__=="__main__": parser = get_parser() args = parser.parse_args() fasta_fields = ['strain', 'virus', 'accession...
import os,datetime from download import download from download import get_parser class flu_download(download): def __init__(self, **kwargs): download.__init__(self, **kwargs) if __name__=="__main__": parser = get_parser() args = parser.parse_args() fasta_fields = ['strain', 'virus', 'accession...
<commit_before>import os,datetime from download import download from download import get_parser class flu_download(download): def __init__(self, **kwargs): download.__init__(self, **kwargs) if __name__=="__main__": parser = get_parser() args = parser.parse_args() fasta_fields = ['strain', 'vir...
import os,datetime from download import download from download import get_parser class flu_download(download): def __init__(self, **kwargs): download.__init__(self, **kwargs) if __name__=="__main__": parser = get_parser() args = parser.parse_args() fasta_fields = ['strain', 'virus', 'accession...
import os,datetime from download import download from download import get_parser class flu_download(download): def __init__(self, **kwargs): download.__init__(self, **kwargs) if __name__=="__main__": parser = get_parser() args = parser.parse_args() fasta_fields = ['strain', 'virus', 'accession...
<commit_before>import os,datetime from download import download from download import get_parser class flu_download(download): def __init__(self, **kwargs): download.__init__(self, **kwargs) if __name__=="__main__": parser = get_parser() args = parser.parse_args() fasta_fields = ['strain', 'vir...
215401f586a6960c4165debf698f3a95c75a178b
comrade/views/simple.py
comrade/views/simple.py
from django.http import HttpResponse, HttpResponseServerError from django.template import RequestContext, loader from django.conf import settings from maintenancemode.http import HttpResponseTemporaryUnavailable import logging logger = logging.getLogger('comrade.views.simple') def status(request): logger.info("R...
from django.http import HttpResponse, HttpResponseServerError from django.template import RequestContext, loader from django.conf import settings from maintenancemode.http import HttpResponseTemporaryUnavailable import logging logger = logging.getLogger('comrade.views.simple') def status(request): logger.info("R...
Make status the last optional arg.
Make status the last optional arg.
Python
mit
bueda/django-comrade
from django.http import HttpResponse, HttpResponseServerError from django.template import RequestContext, loader from django.conf import settings from maintenancemode.http import HttpResponseTemporaryUnavailable import logging logger = logging.getLogger('comrade.views.simple') def status(request): logger.info("R...
from django.http import HttpResponse, HttpResponseServerError from django.template import RequestContext, loader from django.conf import settings from maintenancemode.http import HttpResponseTemporaryUnavailable import logging logger = logging.getLogger('comrade.views.simple') def status(request): logger.info("R...
<commit_before>from django.http import HttpResponse, HttpResponseServerError from django.template import RequestContext, loader from django.conf import settings from maintenancemode.http import HttpResponseTemporaryUnavailable import logging logger = logging.getLogger('comrade.views.simple') def status(request): ...
from django.http import HttpResponse, HttpResponseServerError from django.template import RequestContext, loader from django.conf import settings from maintenancemode.http import HttpResponseTemporaryUnavailable import logging logger = logging.getLogger('comrade.views.simple') def status(request): logger.info("R...
from django.http import HttpResponse, HttpResponseServerError from django.template import RequestContext, loader from django.conf import settings from maintenancemode.http import HttpResponseTemporaryUnavailable import logging logger = logging.getLogger('comrade.views.simple') def status(request): logger.info("R...
<commit_before>from django.http import HttpResponse, HttpResponseServerError from django.template import RequestContext, loader from django.conf import settings from maintenancemode.http import HttpResponseTemporaryUnavailable import logging logger = logging.getLogger('comrade.views.simple') def status(request): ...
80347266377f01932fe8277c7a12ce87663b9018
comtypes/messageloop.py
comtypes/messageloop.py
import ctypes from ctypes import WinDLL, byref, WinError from ctypes.wintypes import MSG _user32 = WinDLL("user32") GetMessage = _user32.GetMessageA GetMessage.argtypes = [ ctypes.c_void_p, ctypes.c_void_p, ctypes.c_uint, ctypes.c_uint, ] TranslateMessage = _user32.TranslateMessage Dispatc...
import ctypes from ctypes import WinDLL, byref, WinError from ctypes.wintypes import MSG _user32 = WinDLL("user32") GetMessage = _user32.GetMessageA GetMessage.argtypes = [ ctypes.c_void_p, ctypes.c_void_p, ctypes.c_uint, ctypes.c_uint, ] TranslateMessage = _user32.TranslateMessage Dispatc...
Use any for concise code
Use any for concise code
Python
mit
denfromufa/comtypes,denfromufa/comtypes,denfromufa/comtypes,denfromufa/comtypes,denfromufa/comtypes
import ctypes from ctypes import WinDLL, byref, WinError from ctypes.wintypes import MSG _user32 = WinDLL("user32") GetMessage = _user32.GetMessageA GetMessage.argtypes = [ ctypes.c_void_p, ctypes.c_void_p, ctypes.c_uint, ctypes.c_uint, ] TranslateMessage = _user32.TranslateMessage Dispatc...
import ctypes from ctypes import WinDLL, byref, WinError from ctypes.wintypes import MSG _user32 = WinDLL("user32") GetMessage = _user32.GetMessageA GetMessage.argtypes = [ ctypes.c_void_p, ctypes.c_void_p, ctypes.c_uint, ctypes.c_uint, ] TranslateMessage = _user32.TranslateMessage Dispatc...
<commit_before>import ctypes from ctypes import WinDLL, byref, WinError from ctypes.wintypes import MSG _user32 = WinDLL("user32") GetMessage = _user32.GetMessageA GetMessage.argtypes = [ ctypes.c_void_p, ctypes.c_void_p, ctypes.c_uint, ctypes.c_uint, ] TranslateMessage = _user32.TranslateM...
import ctypes from ctypes import WinDLL, byref, WinError from ctypes.wintypes import MSG _user32 = WinDLL("user32") GetMessage = _user32.GetMessageA GetMessage.argtypes = [ ctypes.c_void_p, ctypes.c_void_p, ctypes.c_uint, ctypes.c_uint, ] TranslateMessage = _user32.TranslateMessage Dispatc...
import ctypes from ctypes import WinDLL, byref, WinError from ctypes.wintypes import MSG _user32 = WinDLL("user32") GetMessage = _user32.GetMessageA GetMessage.argtypes = [ ctypes.c_void_p, ctypes.c_void_p, ctypes.c_uint, ctypes.c_uint, ] TranslateMessage = _user32.TranslateMessage Dispatc...
<commit_before>import ctypes from ctypes import WinDLL, byref, WinError from ctypes.wintypes import MSG _user32 = WinDLL("user32") GetMessage = _user32.GetMessageA GetMessage.argtypes = [ ctypes.c_void_p, ctypes.c_void_p, ctypes.c_uint, ctypes.c_uint, ] TranslateMessage = _user32.TranslateM...
f768173dab101e8333766cd11f33599397c682d0
dasem/__init__.py
dasem/__init__.py
"""dasem.""" from __future__ import absolute_import from .fullmonty import Word2Vec __all__ = ['Word2Vec']
"""dasem.""" from __future__ import absolute_import from .fullmonty import Word2Vec __all__ = ('Word2Vec',)
Change for style checking warning
Change for style checking warning
Python
apache-2.0
fnielsen/dasem,fnielsen/dasem
"""dasem.""" from __future__ import absolute_import from .fullmonty import Word2Vec __all__ = ['Word2Vec'] Change for style checking warning
"""dasem.""" from __future__ import absolute_import from .fullmonty import Word2Vec __all__ = ('Word2Vec',)
<commit_before>"""dasem.""" from __future__ import absolute_import from .fullmonty import Word2Vec __all__ = ['Word2Vec'] <commit_msg>Change for style checking warning<commit_after>
"""dasem.""" from __future__ import absolute_import from .fullmonty import Word2Vec __all__ = ('Word2Vec',)
"""dasem.""" from __future__ import absolute_import from .fullmonty import Word2Vec __all__ = ['Word2Vec'] Change for style checking warning"""dasem.""" from __future__ import absolute_import from .fullmonty import Word2Vec __all__ = ('Word2Vec',)
<commit_before>"""dasem.""" from __future__ import absolute_import from .fullmonty import Word2Vec __all__ = ['Word2Vec'] <commit_msg>Change for style checking warning<commit_after>"""dasem.""" from __future__ import absolute_import from .fullmonty import Word2Vec __all__ = ('Word2Vec',)
58d739f8c229967b53655376a01c1e3af6034ae1
cyder/base/constants.py
cyder/base/constants.py
ACTION_CREATE = 0 ACTION_VIEW = 1 ACTION_UPDATE = 2 ACTION_DELETE = 3 ACTIONS = { ACTION_CREATE: 'Create', ACTION_VIEW: 'View', ACTION_UPDATE: 'Update', ACTION_DELETE: 'Delete', } LEVEL_GUEST = 0 LEVEL_USER = 1 LEVEL_ADMIN = 2 LEVELS = { LEVEL_GUEST: 'Guest', LEVEL_USER: 'User', LEVEL_AD...
ACTION_CREATE = 0 ACTION_VIEW = 1 ACTION_UPDATE = 2 ACTION_DELETE = 3 ACTIONS = { ACTION_CREATE: 'Create', ACTION_VIEW: 'View', ACTION_UPDATE: 'Update', ACTION_DELETE: 'Delete', } LEVEL_GUEST = 0 LEVEL_USER = 1 LEVEL_ADMIN = 2 LEVELS = { LEVEL_GUEST: 'Guest', LEVEL_USER: 'User', LEVEL_AD...
Fix spelling of 'IPv4' and 'IPv6' (cosmetic)
Fix spelling of 'IPv4' and 'IPv6' (cosmetic)
Python
bsd-3-clause
drkitty/cyder,akeym/cyder,OSU-Net/cyder,zeeman/cyder,zeeman/cyder,murrown/cyder,akeym/cyder,zeeman/cyder,OSU-Net/cyder,OSU-Net/cyder,drkitty/cyder,murrown/cyder,zeeman/cyder,murrown/cyder,akeym/cyder,OSU-Net/cyder,drkitty/cyder,murrown/cyder,akeym/cyder,drkitty/cyder
ACTION_CREATE = 0 ACTION_VIEW = 1 ACTION_UPDATE = 2 ACTION_DELETE = 3 ACTIONS = { ACTION_CREATE: 'Create', ACTION_VIEW: 'View', ACTION_UPDATE: 'Update', ACTION_DELETE: 'Delete', } LEVEL_GUEST = 0 LEVEL_USER = 1 LEVEL_ADMIN = 2 LEVELS = { LEVEL_GUEST: 'Guest', LEVEL_USER: 'User', LEVEL_AD...
ACTION_CREATE = 0 ACTION_VIEW = 1 ACTION_UPDATE = 2 ACTION_DELETE = 3 ACTIONS = { ACTION_CREATE: 'Create', ACTION_VIEW: 'View', ACTION_UPDATE: 'Update', ACTION_DELETE: 'Delete', } LEVEL_GUEST = 0 LEVEL_USER = 1 LEVEL_ADMIN = 2 LEVELS = { LEVEL_GUEST: 'Guest', LEVEL_USER: 'User', LEVEL_AD...
<commit_before>ACTION_CREATE = 0 ACTION_VIEW = 1 ACTION_UPDATE = 2 ACTION_DELETE = 3 ACTIONS = { ACTION_CREATE: 'Create', ACTION_VIEW: 'View', ACTION_UPDATE: 'Update', ACTION_DELETE: 'Delete', } LEVEL_GUEST = 0 LEVEL_USER = 1 LEVEL_ADMIN = 2 LEVELS = { LEVEL_GUEST: 'Guest', LEVEL_USER: 'User...
ACTION_CREATE = 0 ACTION_VIEW = 1 ACTION_UPDATE = 2 ACTION_DELETE = 3 ACTIONS = { ACTION_CREATE: 'Create', ACTION_VIEW: 'View', ACTION_UPDATE: 'Update', ACTION_DELETE: 'Delete', } LEVEL_GUEST = 0 LEVEL_USER = 1 LEVEL_ADMIN = 2 LEVELS = { LEVEL_GUEST: 'Guest', LEVEL_USER: 'User', LEVEL_AD...
ACTION_CREATE = 0 ACTION_VIEW = 1 ACTION_UPDATE = 2 ACTION_DELETE = 3 ACTIONS = { ACTION_CREATE: 'Create', ACTION_VIEW: 'View', ACTION_UPDATE: 'Update', ACTION_DELETE: 'Delete', } LEVEL_GUEST = 0 LEVEL_USER = 1 LEVEL_ADMIN = 2 LEVELS = { LEVEL_GUEST: 'Guest', LEVEL_USER: 'User', LEVEL_AD...
<commit_before>ACTION_CREATE = 0 ACTION_VIEW = 1 ACTION_UPDATE = 2 ACTION_DELETE = 3 ACTIONS = { ACTION_CREATE: 'Create', ACTION_VIEW: 'View', ACTION_UPDATE: 'Update', ACTION_DELETE: 'Delete', } LEVEL_GUEST = 0 LEVEL_USER = 1 LEVEL_ADMIN = 2 LEVELS = { LEVEL_GUEST: 'Guest', LEVEL_USER: 'User...
c326becad43949999d151cd1e10fcb75f9d2b148
lib/constants.py
lib/constants.py
SQL_PORT = 15000 JSON_RPC_PORT = 15598 HTTP_PORT = 15597 JSON_PUBSUB_PORT = 15596
SQL_PORT = 15000 JSON_RPC_PORT = 15598 HTTP_PORT = 15597 HTTPS_PORT = 443 JSON_PUBSUB_PORT = 15596
Add missing constant for ssl listener.
Add missing constant for ssl listener.
Python
apache-2.0
MediaMath/qasino,MediaMath/qasino
SQL_PORT = 15000 JSON_RPC_PORT = 15598 HTTP_PORT = 15597 JSON_PUBSUB_PORT = 15596 Add missing constant for ssl listener.
SQL_PORT = 15000 JSON_RPC_PORT = 15598 HTTP_PORT = 15597 HTTPS_PORT = 443 JSON_PUBSUB_PORT = 15596
<commit_before> SQL_PORT = 15000 JSON_RPC_PORT = 15598 HTTP_PORT = 15597 JSON_PUBSUB_PORT = 15596 <commit_msg>Add missing constant for ssl listener.<commit_after>
SQL_PORT = 15000 JSON_RPC_PORT = 15598 HTTP_PORT = 15597 HTTPS_PORT = 443 JSON_PUBSUB_PORT = 15596
SQL_PORT = 15000 JSON_RPC_PORT = 15598 HTTP_PORT = 15597 JSON_PUBSUB_PORT = 15596 Add missing constant for ssl listener. SQL_PORT = 15000 JSON_RPC_PORT = 15598 HTTP_PORT = 15597 HTTPS_PORT = 443 JSON_PUBSUB_PORT = 15596
<commit_before> SQL_PORT = 15000 JSON_RPC_PORT = 15598 HTTP_PORT = 15597 JSON_PUBSUB_PORT = 15596 <commit_msg>Add missing constant for ssl listener.<commit_after> SQL_PORT = 15000 JSON_RPC_PORT = 15598 HTTP_PORT = 15597 HTTPS_PORT = 443 JSON_PUBSUB_PORT = 15596
25628ca0b7065e8682f45b8e03e5f80a569c520d
dsub/_dsub_version.py
dsub/_dsub_version.py
# Copyright 2017 Google Inc. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or a...
# Copyright 2017 Google Inc. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or a...
Update dsub version to 0.3.10.dev0
Update dsub version to 0.3.10.dev0 PiperOrigin-RevId: 319887839
Python
apache-2.0
DataBiosphere/dsub,DataBiosphere/dsub
# Copyright 2017 Google Inc. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or a...
# Copyright 2017 Google Inc. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or a...
<commit_before># Copyright 2017 Google Inc. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by appl...
# Copyright 2017 Google Inc. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or a...
# Copyright 2017 Google Inc. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or a...
<commit_before># Copyright 2017 Google Inc. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by appl...
cd6752a2866631eeea0dcbcf37f24d825f5e4a50
vpc/vpc_content/search_indexes.py
vpc/vpc_content/search_indexes.py
import datetime from haystack.indexes import SearchIndex, CharField, DateTimeField from haystack import site from models import Author, Material class AuthorIndex(SearchIndex): # the used template contains fullname and author bio # Zniper thinks this line below also is OK: # text = CharField(document=True...
import datetime from haystack.indexes import SearchIndex, RealTimeSearchIndex from haystack.indexes import CharField, DateTimeField from haystack import site from models import Author, Material class AuthorIndex(RealTimeSearchIndex): # the used template contains fullname and author bio # Zniper thinks this li...
Make indexing on real time
Make indexing on real time
Python
agpl-3.0
voer-platform/vp.repo,voer-platform/vp.repo,voer-platform/vp.repo,voer-platform/vp.repo
import datetime from haystack.indexes import SearchIndex, CharField, DateTimeField from haystack import site from models import Author, Material class AuthorIndex(SearchIndex): # the used template contains fullname and author bio # Zniper thinks this line below also is OK: # text = CharField(document=True...
import datetime from haystack.indexes import SearchIndex, RealTimeSearchIndex from haystack.indexes import CharField, DateTimeField from haystack import site from models import Author, Material class AuthorIndex(RealTimeSearchIndex): # the used template contains fullname and author bio # Zniper thinks this li...
<commit_before>import datetime from haystack.indexes import SearchIndex, CharField, DateTimeField from haystack import site from models import Author, Material class AuthorIndex(SearchIndex): # the used template contains fullname and author bio # Zniper thinks this line below also is OK: # text = CharFiel...
import datetime from haystack.indexes import SearchIndex, RealTimeSearchIndex from haystack.indexes import CharField, DateTimeField from haystack import site from models import Author, Material class AuthorIndex(RealTimeSearchIndex): # the used template contains fullname and author bio # Zniper thinks this li...
import datetime from haystack.indexes import SearchIndex, CharField, DateTimeField from haystack import site from models import Author, Material class AuthorIndex(SearchIndex): # the used template contains fullname and author bio # Zniper thinks this line below also is OK: # text = CharField(document=True...
<commit_before>import datetime from haystack.indexes import SearchIndex, CharField, DateTimeField from haystack import site from models import Author, Material class AuthorIndex(SearchIndex): # the used template contains fullname and author bio # Zniper thinks this line below also is OK: # text = CharFiel...
618909832a9df101d240c737786e28c761c76912
json2csv.py
json2csv.py
import json def main(): input_json = json.load(open("photo_id_to_business_id.json")) # print the header of output csv file print 'photo_id,business_id,label' # for each entry in input json file print one csv row for i in xrange(len(input_json)): photo_id = input_json[i]['photo_id'...
import json def main(): input_json = json.load(open("photos/photo_id_to_business_id.json")) # print the header of output csv file print 'photo_id,business_id,label' # for each entry in input json file print one csv row for i in xrange(len(input_json)): photo_id = input_json[i]['ph...
Change location of photos json file
Change location of photos json file
Python
mit
aysent/yelp-photo-explorer
import json def main(): input_json = json.load(open("photo_id_to_business_id.json")) # print the header of output csv file print 'photo_id,business_id,label' # for each entry in input json file print one csv row for i in xrange(len(input_json)): photo_id = input_json[i]['photo_id'...
import json def main(): input_json = json.load(open("photos/photo_id_to_business_id.json")) # print the header of output csv file print 'photo_id,business_id,label' # for each entry in input json file print one csv row for i in xrange(len(input_json)): photo_id = input_json[i]['ph...
<commit_before>import json def main(): input_json = json.load(open("photo_id_to_business_id.json")) # print the header of output csv file print 'photo_id,business_id,label' # for each entry in input json file print one csv row for i in xrange(len(input_json)): photo_id = input_jso...
import json def main(): input_json = json.load(open("photos/photo_id_to_business_id.json")) # print the header of output csv file print 'photo_id,business_id,label' # for each entry in input json file print one csv row for i in xrange(len(input_json)): photo_id = input_json[i]['ph...
import json def main(): input_json = json.load(open("photo_id_to_business_id.json")) # print the header of output csv file print 'photo_id,business_id,label' # for each entry in input json file print one csv row for i in xrange(len(input_json)): photo_id = input_json[i]['photo_id'...
<commit_before>import json def main(): input_json = json.load(open("photo_id_to_business_id.json")) # print the header of output csv file print 'photo_id,business_id,label' # for each entry in input json file print one csv row for i in xrange(len(input_json)): photo_id = input_jso...
611165bccb307611945f7a44ecb8f66cf4381da6
dbconnect.py
dbconnect.py
import MySQLdb def connection(): conn = MySQLdb.connect(host="localhost", user="root", passwd="gichin124", db="tripmeal") c = conn.cursor() return c, conn
import MySQLdb import urlparse import os urlparse.uses_netloc.append('mysql') try: if 'DATABASES' not in locals(): DATABASES = {} if 'DATABASE_URL' in os.environ: url = urlparse.urlparse(os.environ['DATABASE_URL']) # Ensure default database exists. DATABASES['default'] = DATA...
Add the new settings for the database
Add the new settings for the database
Python
mit
DanielAndreasen/TripMeal,DanielAndreasen/TripMeal
import MySQLdb def connection(): conn = MySQLdb.connect(host="localhost", user="root", passwd="gichin124", db="tripmeal") c = conn.cursor() return c, conn Add the new settings for the database
import MySQLdb import urlparse import os urlparse.uses_netloc.append('mysql') try: if 'DATABASES' not in locals(): DATABASES = {} if 'DATABASE_URL' in os.environ: url = urlparse.urlparse(os.environ['DATABASE_URL']) # Ensure default database exists. DATABASES['default'] = DATA...
<commit_before>import MySQLdb def connection(): conn = MySQLdb.connect(host="localhost", user="root", passwd="gichin124", db="tripmeal") c = conn.cursor() return c, conn <commit_msg>Add the new settings for the database<commi...
import MySQLdb import urlparse import os urlparse.uses_netloc.append('mysql') try: if 'DATABASES' not in locals(): DATABASES = {} if 'DATABASE_URL' in os.environ: url = urlparse.urlparse(os.environ['DATABASE_URL']) # Ensure default database exists. DATABASES['default'] = DATA...
import MySQLdb def connection(): conn = MySQLdb.connect(host="localhost", user="root", passwd="gichin124", db="tripmeal") c = conn.cursor() return c, conn Add the new settings for the databaseimport MySQLdb import urlparse im...
<commit_before>import MySQLdb def connection(): conn = MySQLdb.connect(host="localhost", user="root", passwd="gichin124", db="tripmeal") c = conn.cursor() return c, conn <commit_msg>Add the new settings for the database<commi...
d0c8968766a06e8c426e75edddb9c6ce88d080a0
fsspec/implementations/tests/test_common.py
fsspec/implementations/tests/test_common.py
import datetime import pytest from fsspec import AbstractFileSystem from fsspec.implementations.tests.conftest import READ_ONLY_FILESYSTEMS TEST_FILE = 'file' @pytest.mark.parametrize("fs", ['local'], indirect=["fs"]) def test_created(fs: AbstractFileSystem): try: fs.touch(TEST_FILE) created = ...
import datetime import pytest from fsspec import AbstractFileSystem from fsspec.implementations.tests.conftest import READ_ONLY_FILESYSTEMS TEST_FILE = 'file' @pytest.mark.parametrize("fs", ['local'], indirect=["fs"]) def test_created(fs: AbstractFileSystem): try: fs.touch(TEST_FILE) created = ...
Fix typo in test assertion
Fix typo in test assertion
Python
bsd-3-clause
fsspec/filesystem_spec,intake/filesystem_spec,fsspec/filesystem_spec
import datetime import pytest from fsspec import AbstractFileSystem from fsspec.implementations.tests.conftest import READ_ONLY_FILESYSTEMS TEST_FILE = 'file' @pytest.mark.parametrize("fs", ['local'], indirect=["fs"]) def test_created(fs: AbstractFileSystem): try: fs.touch(TEST_FILE) created = ...
import datetime import pytest from fsspec import AbstractFileSystem from fsspec.implementations.tests.conftest import READ_ONLY_FILESYSTEMS TEST_FILE = 'file' @pytest.mark.parametrize("fs", ['local'], indirect=["fs"]) def test_created(fs: AbstractFileSystem): try: fs.touch(TEST_FILE) created = ...
<commit_before>import datetime import pytest from fsspec import AbstractFileSystem from fsspec.implementations.tests.conftest import READ_ONLY_FILESYSTEMS TEST_FILE = 'file' @pytest.mark.parametrize("fs", ['local'], indirect=["fs"]) def test_created(fs: AbstractFileSystem): try: fs.touch(TEST_FILE) ...
import datetime import pytest from fsspec import AbstractFileSystem from fsspec.implementations.tests.conftest import READ_ONLY_FILESYSTEMS TEST_FILE = 'file' @pytest.mark.parametrize("fs", ['local'], indirect=["fs"]) def test_created(fs: AbstractFileSystem): try: fs.touch(TEST_FILE) created = ...
import datetime import pytest from fsspec import AbstractFileSystem from fsspec.implementations.tests.conftest import READ_ONLY_FILESYSTEMS TEST_FILE = 'file' @pytest.mark.parametrize("fs", ['local'], indirect=["fs"]) def test_created(fs: AbstractFileSystem): try: fs.touch(TEST_FILE) created = ...
<commit_before>import datetime import pytest from fsspec import AbstractFileSystem from fsspec.implementations.tests.conftest import READ_ONLY_FILESYSTEMS TEST_FILE = 'file' @pytest.mark.parametrize("fs", ['local'], indirect=["fs"]) def test_created(fs: AbstractFileSystem): try: fs.touch(TEST_FILE) ...
80e5af1599303cd012a348c7d5503bdfca433ce2
tests/test_manager.py
tests/test_manager.py
def test_ensure_authority(manager_transaction): authority1 = manager_transaction.ensure_authority( name='Test Authority', rank=0, cardinality=1234 ) assert authority1.name == 'Test Authority' assert authority1.rank == 0 assert authority1.cardinality == 1234 authority2 = ...
def test_ensure_authority(manager_transaction): authority1 = manager_transaction.ensure_authority( name='Test Authority', cardinality=1234 ) assert authority1.name == 'Test Authority' assert authority1.cardinality == 1234 authority2 = manager_transaction.ensure_authority( na...
Fix the one measly test
Fix the one measly test
Python
mit
scolby33/OCSPdash,scolby33/OCSPdash,scolby33/OCSPdash
def test_ensure_authority(manager_transaction): authority1 = manager_transaction.ensure_authority( name='Test Authority', rank=0, cardinality=1234 ) assert authority1.name == 'Test Authority' assert authority1.rank == 0 assert authority1.cardinality == 1234 authority2 = ...
def test_ensure_authority(manager_transaction): authority1 = manager_transaction.ensure_authority( name='Test Authority', cardinality=1234 ) assert authority1.name == 'Test Authority' assert authority1.cardinality == 1234 authority2 = manager_transaction.ensure_authority( na...
<commit_before>def test_ensure_authority(manager_transaction): authority1 = manager_transaction.ensure_authority( name='Test Authority', rank=0, cardinality=1234 ) assert authority1.name == 'Test Authority' assert authority1.rank == 0 assert authority1.cardinality == 1234 ...
def test_ensure_authority(manager_transaction): authority1 = manager_transaction.ensure_authority( name='Test Authority', cardinality=1234 ) assert authority1.name == 'Test Authority' assert authority1.cardinality == 1234 authority2 = manager_transaction.ensure_authority( na...
def test_ensure_authority(manager_transaction): authority1 = manager_transaction.ensure_authority( name='Test Authority', rank=0, cardinality=1234 ) assert authority1.name == 'Test Authority' assert authority1.rank == 0 assert authority1.cardinality == 1234 authority2 = ...
<commit_before>def test_ensure_authority(manager_transaction): authority1 = manager_transaction.ensure_authority( name='Test Authority', rank=0, cardinality=1234 ) assert authority1.name == 'Test Authority' assert authority1.rank == 0 assert authority1.cardinality == 1234 ...
4a838a3e1df1f832a013b3e8a18e5474b06d0f9a
easy_bake.py
easy_bake.py
import RPi.GPIO as gpio import time #use board numbering on the pi gpio.setmode(gpio.BOARD) gpio.setup(40, gpio.OUT) gpio.setup(38, gpio.OUT) #true and 1 are the same gpio.output(40, True) gpio.output(38, 1) while True: gpio.output(40, True) gpio.output(38, False) time.sleep(4) gpio.output(40, 0) gpio.ou...
import RPi.GPIO as gpio import time #use board numbering on the pi gpio.setmode(gpio.BOARD) output_pins = [40, 38] gpio.setup(output_pins, gpio.OUT) #true and 1 are the same # gpio.output(40, True) # gpio.output(38, 1) while True: gpio.output(output_pins, (True, False)) # gpio.output(40, True) # gpio.output(...
Add in array or tuple of pins
Add in array or tuple of pins
Python
mit
emgreen33/easy_bake,emgreen33/easy_bake
import RPi.GPIO as gpio import time #use board numbering on the pi gpio.setmode(gpio.BOARD) gpio.setup(40, gpio.OUT) gpio.setup(38, gpio.OUT) #true and 1 are the same gpio.output(40, True) gpio.output(38, 1) while True: gpio.output(40, True) gpio.output(38, False) time.sleep(4) gpio.output(40, 0) gpio.ou...
import RPi.GPIO as gpio import time #use board numbering on the pi gpio.setmode(gpio.BOARD) output_pins = [40, 38] gpio.setup(output_pins, gpio.OUT) #true and 1 are the same # gpio.output(40, True) # gpio.output(38, 1) while True: gpio.output(output_pins, (True, False)) # gpio.output(40, True) # gpio.output(...
<commit_before>import RPi.GPIO as gpio import time #use board numbering on the pi gpio.setmode(gpio.BOARD) gpio.setup(40, gpio.OUT) gpio.setup(38, gpio.OUT) #true and 1 are the same gpio.output(40, True) gpio.output(38, 1) while True: gpio.output(40, True) gpio.output(38, False) time.sleep(4) gpio.output(4...
import RPi.GPIO as gpio import time #use board numbering on the pi gpio.setmode(gpio.BOARD) output_pins = [40, 38] gpio.setup(output_pins, gpio.OUT) #true and 1 are the same # gpio.output(40, True) # gpio.output(38, 1) while True: gpio.output(output_pins, (True, False)) # gpio.output(40, True) # gpio.output(...
import RPi.GPIO as gpio import time #use board numbering on the pi gpio.setmode(gpio.BOARD) gpio.setup(40, gpio.OUT) gpio.setup(38, gpio.OUT) #true and 1 are the same gpio.output(40, True) gpio.output(38, 1) while True: gpio.output(40, True) gpio.output(38, False) time.sleep(4) gpio.output(40, 0) gpio.ou...
<commit_before>import RPi.GPIO as gpio import time #use board numbering on the pi gpio.setmode(gpio.BOARD) gpio.setup(40, gpio.OUT) gpio.setup(38, gpio.OUT) #true and 1 are the same gpio.output(40, True) gpio.output(38, 1) while True: gpio.output(40, True) gpio.output(38, False) time.sleep(4) gpio.output(4...
f542b05f9a344c6a39b6ed3b163deddc3086be26
pybinding/model.py
pybinding/model.py
import _pybinding from scipy.sparse import csr_matrix as _csrmatrix class Model(_pybinding.Model): def __init__(self, *params): super().__init__() self.add(*params) def add(self, *params): for param in params: if param is None: continue if isin...
import _pybinding from scipy.sparse import csr_matrix as _csrmatrix from .system import System as _System from .hamiltonian import Hamiltonian as _Hamiltonian from .solver.solver_ex import SolverEx as _Solver class Model(_pybinding.Model): def __init__(self, *params): super().__init__() self.add(*...
Annotate return types of Model properties
Annotate return types of Model properties
Python
bsd-2-clause
MAndelkovic/pybinding,dean0x7d/pybinding,dean0x7d/pybinding,MAndelkovic/pybinding,MAndelkovic/pybinding,dean0x7d/pybinding
import _pybinding from scipy.sparse import csr_matrix as _csrmatrix class Model(_pybinding.Model): def __init__(self, *params): super().__init__() self.add(*params) def add(self, *params): for param in params: if param is None: continue if isin...
import _pybinding from scipy.sparse import csr_matrix as _csrmatrix from .system import System as _System from .hamiltonian import Hamiltonian as _Hamiltonian from .solver.solver_ex import SolverEx as _Solver class Model(_pybinding.Model): def __init__(self, *params): super().__init__() self.add(*...
<commit_before>import _pybinding from scipy.sparse import csr_matrix as _csrmatrix class Model(_pybinding.Model): def __init__(self, *params): super().__init__() self.add(*params) def add(self, *params): for param in params: if param is None: continue ...
import _pybinding from scipy.sparse import csr_matrix as _csrmatrix from .system import System as _System from .hamiltonian import Hamiltonian as _Hamiltonian from .solver.solver_ex import SolverEx as _Solver class Model(_pybinding.Model): def __init__(self, *params): super().__init__() self.add(*...
import _pybinding from scipy.sparse import csr_matrix as _csrmatrix class Model(_pybinding.Model): def __init__(self, *params): super().__init__() self.add(*params) def add(self, *params): for param in params: if param is None: continue if isin...
<commit_before>import _pybinding from scipy.sparse import csr_matrix as _csrmatrix class Model(_pybinding.Model): def __init__(self, *params): super().__init__() self.add(*params) def add(self, *params): for param in params: if param is None: continue ...
259a4377b19f1140d46a5c8f7389121806fe7e01
pombola/south_africa/urls.py
pombola/south_africa/urls.py
from django.conf.urls import patterns, include, url from pombola.south_africa.views import LatLonDetailView, SAPlaceDetailSub, SAOrganisationDetailView urlpatterns = patterns('pombola.south_africa.views', url(r'^place/latlon/(?P<lat>[0-9\.-]+),(?P<lon>[0-9\.-]+)/', LatLonDetailView.as_view(), name='latlon'), ...
from django.conf.urls import patterns, include, url from pombola.south_africa.views import LatLonDetailView, SAPlaceDetailSub, SAOrganisationDetailView from pombola.core.urls import organisation_patterns # Override the organisation url so we can vary it depending on the organisation type. for index, pattern in enumer...
Use a different method to override the url in SA
Use a different method to override the url in SA This is not an ideal solution, but seems to do the job. The problem with the way it was previously was that it the /organisation/all route way getting skipped as the /organisation/:slug route was always matching.
Python
agpl-3.0
mysociety/pombola,ken-muturi/pombola,patricmutwiri/pombola,patricmutwiri/pombola,mysociety/pombola,ken-muturi/pombola,mysociety/pombola,ken-muturi/pombola,patricmutwiri/pombola,mysociety/pombola,hzj123/56th,geoffkilpin/pombola,hzj123/56th,mysociety/pombola,geoffkilpin/pombola,ken-muturi/pombola,geoffkilpin/pombola,geof...
from django.conf.urls import patterns, include, url from pombola.south_africa.views import LatLonDetailView, SAPlaceDetailSub, SAOrganisationDetailView urlpatterns = patterns('pombola.south_africa.views', url(r'^place/latlon/(?P<lat>[0-9\.-]+),(?P<lon>[0-9\.-]+)/', LatLonDetailView.as_view(), name='latlon'), ...
from django.conf.urls import patterns, include, url from pombola.south_africa.views import LatLonDetailView, SAPlaceDetailSub, SAOrganisationDetailView from pombola.core.urls import organisation_patterns # Override the organisation url so we can vary it depending on the organisation type. for index, pattern in enumer...
<commit_before>from django.conf.urls import patterns, include, url from pombola.south_africa.views import LatLonDetailView, SAPlaceDetailSub, SAOrganisationDetailView urlpatterns = patterns('pombola.south_africa.views', url(r'^place/latlon/(?P<lat>[0-9\.-]+),(?P<lon>[0-9\.-]+)/', LatLonDetailView.as_view(), name=...
from django.conf.urls import patterns, include, url from pombola.south_africa.views import LatLonDetailView, SAPlaceDetailSub, SAOrganisationDetailView from pombola.core.urls import organisation_patterns # Override the organisation url so we can vary it depending on the organisation type. for index, pattern in enumer...
from django.conf.urls import patterns, include, url from pombola.south_africa.views import LatLonDetailView, SAPlaceDetailSub, SAOrganisationDetailView urlpatterns = patterns('pombola.south_africa.views', url(r'^place/latlon/(?P<lat>[0-9\.-]+),(?P<lon>[0-9\.-]+)/', LatLonDetailView.as_view(), name='latlon'), ...
<commit_before>from django.conf.urls import patterns, include, url from pombola.south_africa.views import LatLonDetailView, SAPlaceDetailSub, SAOrganisationDetailView urlpatterns = patterns('pombola.south_africa.views', url(r'^place/latlon/(?P<lat>[0-9\.-]+),(?P<lon>[0-9\.-]+)/', LatLonDetailView.as_view(), name=...
0b1d2a43e4f9858bcb9d9bf9edf3dfae417f133d
satchless/util/__init__.py
satchless/util/__init__.py
from decimal import Decimal from django.http import HttpResponse from django.utils import simplejson def decimal_format(value, min_decimal_places=0): decimal_tuple = value.as_tuple() have_decimal_places = -decimal_tuple.exponent digits = list(decimal_tuple.digits) while have_decimal_places < min_decima...
from decimal import Decimal from django.http import HttpResponse from django.utils import simplejson def decimal_format(value, min_decimal_places=0): decimal_tuple = value.as_tuple() have_decimal_places = -decimal_tuple.exponent digits = list(decimal_tuple.digits) while have_decimal_places < min_decima...
Add a huge hack to treat Decimals like floats
Add a huge hack to treat Decimals like floats This commit provided to you by highly trained professional stuntmen, do not try to reproduce any of this at home!
Python
bsd-3-clause
taedori81/satchless,fusionbox/satchless,fusionbox/satchless,fusionbox/satchless
from decimal import Decimal from django.http import HttpResponse from django.utils import simplejson def decimal_format(value, min_decimal_places=0): decimal_tuple = value.as_tuple() have_decimal_places = -decimal_tuple.exponent digits = list(decimal_tuple.digits) while have_decimal_places < min_decima...
from decimal import Decimal from django.http import HttpResponse from django.utils import simplejson def decimal_format(value, min_decimal_places=0): decimal_tuple = value.as_tuple() have_decimal_places = -decimal_tuple.exponent digits = list(decimal_tuple.digits) while have_decimal_places < min_decima...
<commit_before>from decimal import Decimal from django.http import HttpResponse from django.utils import simplejson def decimal_format(value, min_decimal_places=0): decimal_tuple = value.as_tuple() have_decimal_places = -decimal_tuple.exponent digits = list(decimal_tuple.digits) while have_decimal_plac...
from decimal import Decimal from django.http import HttpResponse from django.utils import simplejson def decimal_format(value, min_decimal_places=0): decimal_tuple = value.as_tuple() have_decimal_places = -decimal_tuple.exponent digits = list(decimal_tuple.digits) while have_decimal_places < min_decima...
from decimal import Decimal from django.http import HttpResponse from django.utils import simplejson def decimal_format(value, min_decimal_places=0): decimal_tuple = value.as_tuple() have_decimal_places = -decimal_tuple.exponent digits = list(decimal_tuple.digits) while have_decimal_places < min_decima...
<commit_before>from decimal import Decimal from django.http import HttpResponse from django.utils import simplejson def decimal_format(value, min_decimal_places=0): decimal_tuple = value.as_tuple() have_decimal_places = -decimal_tuple.exponent digits = list(decimal_tuple.digits) while have_decimal_plac...
17080ab6511d045b0bc27b3c04102fbcefa5c330
modules/icons.py
modules/icons.py
import sublime from os import path _plugin_name = "Git Conflict Resolver" _icon_folder = path.join(_plugin_name, "gutter") _icons = { "ours": "ours", "ancestor": "ancestor", "theirs": "theirs" } def get(group): base = "" extension = "" if int(sublime.version()) < 3000: base = path.j...
import sublime _plugin_name = "Git Conflict Resolver" _icon_folder = "/".join([_plugin_name, "gutter"]) _icons = { "ours": "ours", "ancestor": "ancestor", "theirs": "theirs" } def get(group): base = "" extension = "" if int(sublime.version()) < 3000: base = "/".join(["..", _icon_fold...
Fix sublime icon pathing by using "/" instead of os.path.join
Fix sublime icon pathing by using "/" instead of os.path.join
Python
mit
Zeeker/sublime-GitConflictResolver,Zeeker/sublime-GitConflictResolver
import sublime from os import path _plugin_name = "Git Conflict Resolver" _icon_folder = path.join(_plugin_name, "gutter") _icons = { "ours": "ours", "ancestor": "ancestor", "theirs": "theirs" } def get(group): base = "" extension = "" if int(sublime.version()) < 3000: base = path.j...
import sublime _plugin_name = "Git Conflict Resolver" _icon_folder = "/".join([_plugin_name, "gutter"]) _icons = { "ours": "ours", "ancestor": "ancestor", "theirs": "theirs" } def get(group): base = "" extension = "" if int(sublime.version()) < 3000: base = "/".join(["..", _icon_fold...
<commit_before>import sublime from os import path _plugin_name = "Git Conflict Resolver" _icon_folder = path.join(_plugin_name, "gutter") _icons = { "ours": "ours", "ancestor": "ancestor", "theirs": "theirs" } def get(group): base = "" extension = "" if int(sublime.version()) < 3000: ...
import sublime _plugin_name = "Git Conflict Resolver" _icon_folder = "/".join([_plugin_name, "gutter"]) _icons = { "ours": "ours", "ancestor": "ancestor", "theirs": "theirs" } def get(group): base = "" extension = "" if int(sublime.version()) < 3000: base = "/".join(["..", _icon_fold...
import sublime from os import path _plugin_name = "Git Conflict Resolver" _icon_folder = path.join(_plugin_name, "gutter") _icons = { "ours": "ours", "ancestor": "ancestor", "theirs": "theirs" } def get(group): base = "" extension = "" if int(sublime.version()) < 3000: base = path.j...
<commit_before>import sublime from os import path _plugin_name = "Git Conflict Resolver" _icon_folder = path.join(_plugin_name, "gutter") _icons = { "ours": "ours", "ancestor": "ancestor", "theirs": "theirs" } def get(group): base = "" extension = "" if int(sublime.version()) < 3000: ...
874816497e7a9bd0e091a62a9e9b33ae832eb130
pyjsonts/time_series_json.py
pyjsonts/time_series_json.py
import json import ijson class TimeSeriesJSON: def __init__(self, f=None, fn=None, tag='item'): """ :param f: file object (_io.TextIOWrapper) :param fn: file name as a string :param tag: tag for dividing json items default value is 'item' because this value is default ...
import json import ijson class TimeSeriesJSON: def __init__(self, f=None, fn=None, tag='item'): """ :param f: file object (_io.TextIOWrapper) :param fn: file name as a string :param tag: tag for dividing json items default value is 'item' because this value is default ...
Remove unnecessary backslashes in parse_json_items
Remove unnecessary backslashes in parse_json_items
Python
apache-2.0
jeongmincha/pyjsonts
import json import ijson class TimeSeriesJSON: def __init__(self, f=None, fn=None, tag='item'): """ :param f: file object (_io.TextIOWrapper) :param fn: file name as a string :param tag: tag for dividing json items default value is 'item' because this value is default ...
import json import ijson class TimeSeriesJSON: def __init__(self, f=None, fn=None, tag='item'): """ :param f: file object (_io.TextIOWrapper) :param fn: file name as a string :param tag: tag for dividing json items default value is 'item' because this value is default ...
<commit_before>import json import ijson class TimeSeriesJSON: def __init__(self, f=None, fn=None, tag='item'): """ :param f: file object (_io.TextIOWrapper) :param fn: file name as a string :param tag: tag for dividing json items default value is 'item' because this va...
import json import ijson class TimeSeriesJSON: def __init__(self, f=None, fn=None, tag='item'): """ :param f: file object (_io.TextIOWrapper) :param fn: file name as a string :param tag: tag for dividing json items default value is 'item' because this value is default ...
import json import ijson class TimeSeriesJSON: def __init__(self, f=None, fn=None, tag='item'): """ :param f: file object (_io.TextIOWrapper) :param fn: file name as a string :param tag: tag for dividing json items default value is 'item' because this value is default ...
<commit_before>import json import ijson class TimeSeriesJSON: def __init__(self, f=None, fn=None, tag='item'): """ :param f: file object (_io.TextIOWrapper) :param fn: file name as a string :param tag: tag for dividing json items default value is 'item' because this va...
5cf8f3326b6995a871df7f2b61b25ff529216103
recordpeeker/command_line.py
recordpeeker/command_line.py
import argparse import os import json import sys def parse_args(argv): parser = argparse.ArgumentParser("Test") parser.add_argument("--port", "-p", type=int, default=8080, help="Specify the port recordpeeker runs on") parser.add_argument("--verbosity", "-v", default=0, type=int, choices=[0,1,2,3], help="Sp...
import argparse import os import json import sys def parse_args(argv): parser = argparse.ArgumentParser("Test") parser.add_argument("--port", "-p", type=int, default=8080, help="Specify the port recordpeeker runs on") parser.add_argument("--verbosity", "-v", default=0, type=int, choices=[0,1,2,3], help="Sp...
Fix bustage for script calls
Fix bustage for script calls
Python
mit
jonchang/recordpeeker
import argparse import os import json import sys def parse_args(argv): parser = argparse.ArgumentParser("Test") parser.add_argument("--port", "-p", type=int, default=8080, help="Specify the port recordpeeker runs on") parser.add_argument("--verbosity", "-v", default=0, type=int, choices=[0,1,2,3], help="Sp...
import argparse import os import json import sys def parse_args(argv): parser = argparse.ArgumentParser("Test") parser.add_argument("--port", "-p", type=int, default=8080, help="Specify the port recordpeeker runs on") parser.add_argument("--verbosity", "-v", default=0, type=int, choices=[0,1,2,3], help="Sp...
<commit_before>import argparse import os import json import sys def parse_args(argv): parser = argparse.ArgumentParser("Test") parser.add_argument("--port", "-p", type=int, default=8080, help="Specify the port recordpeeker runs on") parser.add_argument("--verbosity", "-v", default=0, type=int, choices=[0,1...
import argparse import os import json import sys def parse_args(argv): parser = argparse.ArgumentParser("Test") parser.add_argument("--port", "-p", type=int, default=8080, help="Specify the port recordpeeker runs on") parser.add_argument("--verbosity", "-v", default=0, type=int, choices=[0,1,2,3], help="Sp...
import argparse import os import json import sys def parse_args(argv): parser = argparse.ArgumentParser("Test") parser.add_argument("--port", "-p", type=int, default=8080, help="Specify the port recordpeeker runs on") parser.add_argument("--verbosity", "-v", default=0, type=int, choices=[0,1,2,3], help="Sp...
<commit_before>import argparse import os import json import sys def parse_args(argv): parser = argparse.ArgumentParser("Test") parser.add_argument("--port", "-p", type=int, default=8080, help="Specify the port recordpeeker runs on") parser.add_argument("--verbosity", "-v", default=0, type=int, choices=[0,1...
f3875b1d9aed5f847b11846a27f7652e4c548b6c
modules/karma.py
modules/karma.py
import discord from modules.botModule import BotModule class Karma(BotModule): name = 'karma' description = 'Monitors messages for reactions and adds karma accordingly.' help_text = 'This module has no callable functions' trigger_string = '!reddit' listen_for_reaction = True...
import discord from modules.botModule import BotModule class Karma(BotModule): name = 'karma' description = 'Monitors messages for reactions and adds karma accordingly.' help_text = 'This module has no callable functions' trigger_string = '!reddit' module_db = 'karma.json' ...
Add logic and code for database operations (untested)
Add logic and code for database operations (untested)
Python
mit
suclearnub/scubot
import discord from modules.botModule import BotModule class Karma(BotModule): name = 'karma' description = 'Monitors messages for reactions and adds karma accordingly.' help_text = 'This module has no callable functions' trigger_string = '!reddit' listen_for_reaction = True...
import discord from modules.botModule import BotModule class Karma(BotModule): name = 'karma' description = 'Monitors messages for reactions and adds karma accordingly.' help_text = 'This module has no callable functions' trigger_string = '!reddit' module_db = 'karma.json' ...
<commit_before>import discord from modules.botModule import BotModule class Karma(BotModule): name = 'karma' description = 'Monitors messages for reactions and adds karma accordingly.' help_text = 'This module has no callable functions' trigger_string = '!reddit' listen_for_...
import discord from modules.botModule import BotModule class Karma(BotModule): name = 'karma' description = 'Monitors messages for reactions and adds karma accordingly.' help_text = 'This module has no callable functions' trigger_string = '!reddit' module_db = 'karma.json' ...
import discord from modules.botModule import BotModule class Karma(BotModule): name = 'karma' description = 'Monitors messages for reactions and adds karma accordingly.' help_text = 'This module has no callable functions' trigger_string = '!reddit' listen_for_reaction = True...
<commit_before>import discord from modules.botModule import BotModule class Karma(BotModule): name = 'karma' description = 'Monitors messages for reactions and adds karma accordingly.' help_text = 'This module has no callable functions' trigger_string = '!reddit' listen_for_...
cd8fe432077bdd65122189dd9191d7a5b8788e48
reinforcement-learning/play.py
reinforcement-learning/play.py
"""This is the agent which currently takes the action with highest immediate reward.""" import env import time env.make("pygame") for episode in range(10): env.reset() episode_reward = 0 for t in range(100): episode_reward += env.actual_reward if env.done: print( ...
"""This is the agent which currently takes the action with highest immediate reward.""" import time start = time.time() import env import rl env.make("text") for episode in range(1000): env.reset() episode_reward = 0 for t in range(100): episode_reward += env.actual_reward if env.done: ...
Use proper q learning for agent.
Use proper q learning for agent.
Python
mit
danieloconell/Louis
"""This is the agent which currently takes the action with highest immediate reward.""" import env import time env.make("pygame") for episode in range(10): env.reset() episode_reward = 0 for t in range(100): episode_reward += env.actual_reward if env.done: print( ...
"""This is the agent which currently takes the action with highest immediate reward.""" import time start = time.time() import env import rl env.make("text") for episode in range(1000): env.reset() episode_reward = 0 for t in range(100): episode_reward += env.actual_reward if env.done: ...
<commit_before>"""This is the agent which currently takes the action with highest immediate reward.""" import env import time env.make("pygame") for episode in range(10): env.reset() episode_reward = 0 for t in range(100): episode_reward += env.actual_reward if env.done: print(...
"""This is the agent which currently takes the action with highest immediate reward.""" import time start = time.time() import env import rl env.make("text") for episode in range(1000): env.reset() episode_reward = 0 for t in range(100): episode_reward += env.actual_reward if env.done: ...
"""This is the agent which currently takes the action with highest immediate reward.""" import env import time env.make("pygame") for episode in range(10): env.reset() episode_reward = 0 for t in range(100): episode_reward += env.actual_reward if env.done: print( ...
<commit_before>"""This is the agent which currently takes the action with highest immediate reward.""" import env import time env.make("pygame") for episode in range(10): env.reset() episode_reward = 0 for t in range(100): episode_reward += env.actual_reward if env.done: print(...
fd6cc34c682c773273bcdd9d09d2f7f2e4d91700
ocr/tfhelpers.py
ocr/tfhelpers.py
# -*- coding: utf-8 -*- """ Loading and using trained models from tensorflow """ import tensorflow as tf class Graph(): """ Loading and running isolated tf graph """ def __init__(self, loc): self.graph = tf.Graph() self.sess = tf.Session(graph=self.graph) with self.graph.as_default(): ...
# -*- coding: utf-8 -*- """ Loading and using trained models from tensorflow """ import tensorflow as tf class Graph(): """ Loading and running isolated tf graph """ def __init__(self, loc, operation='activation', input_name='x'): """ loc: location of file containing saved model operati...
Update Graph class for loading saved models Requires renaming operations in models -> re-train them
Update Graph class for loading saved models Requires renaming operations in models -> re-train them
Python
mit
Breta01/handwriting-ocr
# -*- coding: utf-8 -*- """ Loading and using trained models from tensorflow """ import tensorflow as tf class Graph(): """ Loading and running isolated tf graph """ def __init__(self, loc): self.graph = tf.Graph() self.sess = tf.Session(graph=self.graph) with self.graph.as_default(): ...
# -*- coding: utf-8 -*- """ Loading and using trained models from tensorflow """ import tensorflow as tf class Graph(): """ Loading and running isolated tf graph """ def __init__(self, loc, operation='activation', input_name='x'): """ loc: location of file containing saved model operati...
<commit_before># -*- coding: utf-8 -*- """ Loading and using trained models from tensorflow """ import tensorflow as tf class Graph(): """ Loading and running isolated tf graph """ def __init__(self, loc): self.graph = tf.Graph() self.sess = tf.Session(graph=self.graph) with self.graph....
# -*- coding: utf-8 -*- """ Loading and using trained models from tensorflow """ import tensorflow as tf class Graph(): """ Loading and running isolated tf graph """ def __init__(self, loc, operation='activation', input_name='x'): """ loc: location of file containing saved model operati...
# -*- coding: utf-8 -*- """ Loading and using trained models from tensorflow """ import tensorflow as tf class Graph(): """ Loading and running isolated tf graph """ def __init__(self, loc): self.graph = tf.Graph() self.sess = tf.Session(graph=self.graph) with self.graph.as_default(): ...
<commit_before># -*- coding: utf-8 -*- """ Loading and using trained models from tensorflow """ import tensorflow as tf class Graph(): """ Loading and running isolated tf graph """ def __init__(self, loc): self.graph = tf.Graph() self.sess = tf.Session(graph=self.graph) with self.graph....
bb4c1375082d68a78e194d3d1d3399eadc0d1b12
dlstats/errors.py
dlstats/errors.py
class DlstatsException(Exception): def __init__(self, *args, **kwargs): self.provider_name = kwargs.pop("provider_name", None) self.dataset_code = kwargs.pop("dataset_code", None) super().__init__(*args, **kwargs) class RejectFrequency(DlstatsException): def __init__(self, *args,...
class DlstatsException(Exception): def __init__(self, *args, **kwargs): self.provider_name = kwargs.pop("provider_name", None) self.dataset_code = kwargs.pop("dataset_code", None) self.comments = kwargs.pop("comments", None) super().__init__(*args, **kwargs) class RejectFreque...
Add exception for interrupt data process
Add exception for interrupt data process
Python
agpl-3.0
Widukind/dlstats,Widukind/dlstats
class DlstatsException(Exception): def __init__(self, *args, **kwargs): self.provider_name = kwargs.pop("provider_name", None) self.dataset_code = kwargs.pop("dataset_code", None) super().__init__(*args, **kwargs) class RejectFrequency(DlstatsException): def __init__(self, *args,...
class DlstatsException(Exception): def __init__(self, *args, **kwargs): self.provider_name = kwargs.pop("provider_name", None) self.dataset_code = kwargs.pop("dataset_code", None) self.comments = kwargs.pop("comments", None) super().__init__(*args, **kwargs) class RejectFreque...
<commit_before> class DlstatsException(Exception): def __init__(self, *args, **kwargs): self.provider_name = kwargs.pop("provider_name", None) self.dataset_code = kwargs.pop("dataset_code", None) super().__init__(*args, **kwargs) class RejectFrequency(DlstatsException): def __init...
class DlstatsException(Exception): def __init__(self, *args, **kwargs): self.provider_name = kwargs.pop("provider_name", None) self.dataset_code = kwargs.pop("dataset_code", None) self.comments = kwargs.pop("comments", None) super().__init__(*args, **kwargs) class RejectFreque...
class DlstatsException(Exception): def __init__(self, *args, **kwargs): self.provider_name = kwargs.pop("provider_name", None) self.dataset_code = kwargs.pop("dataset_code", None) super().__init__(*args, **kwargs) class RejectFrequency(DlstatsException): def __init__(self, *args,...
<commit_before> class DlstatsException(Exception): def __init__(self, *args, **kwargs): self.provider_name = kwargs.pop("provider_name", None) self.dataset_code = kwargs.pop("dataset_code", None) super().__init__(*args, **kwargs) class RejectFrequency(DlstatsException): def __init...
aa8117c288fc45743554450448178c47246b088f
devicehive/transport.py
devicehive/transport.py
def init(name, data_format_class, data_format_options, handler_class, handler_options): transport_class_name = '%sTransport' % name.title() transport_module = __import__('devicehive.transports.%s_transport' % name, fromlist=[transport_class_name]) return getattr(tr...
def init(name, data_format_class, data_format_options, handler_class, handler_options): transport_class_name = '%sTransport' % name.title() transport_module = __import__('devicehive.transports.%s_transport' % name, fromlist=[transport_class_name]) return getattr(tr...
Remove Request and Response classes
Remove Request and Response classes
Python
apache-2.0
devicehive/devicehive-python
def init(name, data_format_class, data_format_options, handler_class, handler_options): transport_class_name = '%sTransport' % name.title() transport_module = __import__('devicehive.transports.%s_transport' % name, fromlist=[transport_class_name]) return getattr(tr...
def init(name, data_format_class, data_format_options, handler_class, handler_options): transport_class_name = '%sTransport' % name.title() transport_module = __import__('devicehive.transports.%s_transport' % name, fromlist=[transport_class_name]) return getattr(tr...
<commit_before>def init(name, data_format_class, data_format_options, handler_class, handler_options): transport_class_name = '%sTransport' % name.title() transport_module = __import__('devicehive.transports.%s_transport' % name, fromlist=[transport_class_name]) re...
def init(name, data_format_class, data_format_options, handler_class, handler_options): transport_class_name = '%sTransport' % name.title() transport_module = __import__('devicehive.transports.%s_transport' % name, fromlist=[transport_class_name]) return getattr(tr...
def init(name, data_format_class, data_format_options, handler_class, handler_options): transport_class_name = '%sTransport' % name.title() transport_module = __import__('devicehive.transports.%s_transport' % name, fromlist=[transport_class_name]) return getattr(tr...
<commit_before>def init(name, data_format_class, data_format_options, handler_class, handler_options): transport_class_name = '%sTransport' % name.title() transport_module = __import__('devicehive.transports.%s_transport' % name, fromlist=[transport_class_name]) re...
145b40c1b855b9f40eddf4682f4361112e459323
lcddaemon.py
lcddaemon.py
#!/usr/bin/env python3 #-*- coding: utf-8 -*- """ This script is the launcher of the daemon. """ import sys import threading from core.daemonargs import parse_arguments from core.message import set_default_repeat from core.message import set_default_ttl from core.message import set_default_duration from core.queue im...
#!/usr/bin/env python3 #-*- coding: utf-8 -*- """ This script is the launcher of the daemon. """ import sys import threading from core.daemonargs import parse_arguments from core.message import set_default_repeat from core.message import set_default_ttl from core.message import set_default_duration from core.queue im...
Update to load dynamically the module selected by user.
Update to load dynamically the module selected by user.
Python
mit
juliendelplanque/lcddaemon
#!/usr/bin/env python3 #-*- coding: utf-8 -*- """ This script is the launcher of the daemon. """ import sys import threading from core.daemonargs import parse_arguments from core.message import set_default_repeat from core.message import set_default_ttl from core.message import set_default_duration from core.queue im...
#!/usr/bin/env python3 #-*- coding: utf-8 -*- """ This script is the launcher of the daemon. """ import sys import threading from core.daemonargs import parse_arguments from core.message import set_default_repeat from core.message import set_default_ttl from core.message import set_default_duration from core.queue im...
<commit_before>#!/usr/bin/env python3 #-*- coding: utf-8 -*- """ This script is the launcher of the daemon. """ import sys import threading from core.daemonargs import parse_arguments from core.message import set_default_repeat from core.message import set_default_ttl from core.message import set_default_duration fro...
#!/usr/bin/env python3 #-*- coding: utf-8 -*- """ This script is the launcher of the daemon. """ import sys import threading from core.daemonargs import parse_arguments from core.message import set_default_repeat from core.message import set_default_ttl from core.message import set_default_duration from core.queue im...
#!/usr/bin/env python3 #-*- coding: utf-8 -*- """ This script is the launcher of the daemon. """ import sys import threading from core.daemonargs import parse_arguments from core.message import set_default_repeat from core.message import set_default_ttl from core.message import set_default_duration from core.queue im...
<commit_before>#!/usr/bin/env python3 #-*- coding: utf-8 -*- """ This script is the launcher of the daemon. """ import sys import threading from core.daemonargs import parse_arguments from core.message import set_default_repeat from core.message import set_default_ttl from core.message import set_default_duration fro...
51372716e1fdf6f7ea516b76e37a7600598362db
connector_base_product/__openerp__.py
connector_base_product/__openerp__.py
# -*- coding: utf-8 -*- ############################################################################## # # Author: David BEAL, Copyright Akretion, 2014 # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the...
# -*- coding: utf-8 -*- ############################################################################## # # Author: David BEAL, Copyright Akretion, 2014 # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the...
Use the new links for websites (with odoo) and for the prestashop connector
Use the new links for websites (with odoo) and for the prestashop connector
Python
agpl-3.0
OCA/connector,OCA/connector
# -*- coding: utf-8 -*- ############################################################################## # # Author: David BEAL, Copyright Akretion, 2014 # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the...
# -*- coding: utf-8 -*- ############################################################################## # # Author: David BEAL, Copyright Akretion, 2014 # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the...
<commit_before># -*- coding: utf-8 -*- ############################################################################## # # Author: David BEAL, Copyright Akretion, 2014 # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # p...
# -*- coding: utf-8 -*- ############################################################################## # # Author: David BEAL, Copyright Akretion, 2014 # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the...
# -*- coding: utf-8 -*- ############################################################################## # # Author: David BEAL, Copyright Akretion, 2014 # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the...
<commit_before># -*- coding: utf-8 -*- ############################################################################## # # Author: David BEAL, Copyright Akretion, 2014 # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # p...
a626e97bdb8816ed46760c55ad402b64e391538a
revenue/admin.py
revenue/admin.py
from django.contrib import admin from django.core.exceptions import ValidationError from django.forms import BaseInlineFormSet, ModelForm from django.utils.translation import ugettext_lazy as _ from revenue.models import Receipt, FeeLine class FeeLinesInlineFormSet(BaseInlineFormSet): def clean(self): su...
from django.contrib import admin from django.core.exceptions import ValidationError from django import forms from django.utils.translation import ugettext_lazy as _ from revenue.models import Receipt, FeeLine class FeeLinesInlineFormSet(forms.BaseInlineFormSet): def clean(self): super(FeeLinesInlineFormS...
Fix how we calculate total to really account for deleted objects
Fix how we calculate total to really account for deleted objects
Python
mpl-2.0
jackbravo/condorest-django,jackbravo/condorest-django,jackbravo/condorest-django
from django.contrib import admin from django.core.exceptions import ValidationError from django.forms import BaseInlineFormSet, ModelForm from django.utils.translation import ugettext_lazy as _ from revenue.models import Receipt, FeeLine class FeeLinesInlineFormSet(BaseInlineFormSet): def clean(self): su...
from django.contrib import admin from django.core.exceptions import ValidationError from django import forms from django.utils.translation import ugettext_lazy as _ from revenue.models import Receipt, FeeLine class FeeLinesInlineFormSet(forms.BaseInlineFormSet): def clean(self): super(FeeLinesInlineFormS...
<commit_before>from django.contrib import admin from django.core.exceptions import ValidationError from django.forms import BaseInlineFormSet, ModelForm from django.utils.translation import ugettext_lazy as _ from revenue.models import Receipt, FeeLine class FeeLinesInlineFormSet(BaseInlineFormSet): def clean(se...
from django.contrib import admin from django.core.exceptions import ValidationError from django import forms from django.utils.translation import ugettext_lazy as _ from revenue.models import Receipt, FeeLine class FeeLinesInlineFormSet(forms.BaseInlineFormSet): def clean(self): super(FeeLinesInlineFormS...
from django.contrib import admin from django.core.exceptions import ValidationError from django.forms import BaseInlineFormSet, ModelForm from django.utils.translation import ugettext_lazy as _ from revenue.models import Receipt, FeeLine class FeeLinesInlineFormSet(BaseInlineFormSet): def clean(self): su...
<commit_before>from django.contrib import admin from django.core.exceptions import ValidationError from django.forms import BaseInlineFormSet, ModelForm from django.utils.translation import ugettext_lazy as _ from revenue.models import Receipt, FeeLine class FeeLinesInlineFormSet(BaseInlineFormSet): def clean(se...
c2a3d8621e01d453da0043f5fe9afeba0a064224
presets/icons.py
presets/icons.py
import os import bpy import bpy.utils.previews from .. import util asset_previews = bpy.utils.previews.new() def load_previews(lib, start=0): global asset_previews enum_items = [] lib_dir = presets_library = util.get_addon_prefs().presets_library.path for i,asset in enumerate(lib.presets): p...
import os import bpy import bpy.utils.previews from .. import util asset_previews = bpy.utils.previews.new() def get_presets_for_lib(lib): items = list(lib.presets) for sub_group in lib.sub_groups: items.extend(get_presets_for_lib(sub_group)) return items def load_previews(lib): global asset_...
Fix order in icon preview.
Fix order in icon preview.
Python
mit
prman-pixar/RenderManForBlender,adminradio/RenderManForBlender,prman-pixar/RenderManForBlender
import os import bpy import bpy.utils.previews from .. import util asset_previews = bpy.utils.previews.new() def load_previews(lib, start=0): global asset_previews enum_items = [] lib_dir = presets_library = util.get_addon_prefs().presets_library.path for i,asset in enumerate(lib.presets): p...
import os import bpy import bpy.utils.previews from .. import util asset_previews = bpy.utils.previews.new() def get_presets_for_lib(lib): items = list(lib.presets) for sub_group in lib.sub_groups: items.extend(get_presets_for_lib(sub_group)) return items def load_previews(lib): global asset_...
<commit_before>import os import bpy import bpy.utils.previews from .. import util asset_previews = bpy.utils.previews.new() def load_previews(lib, start=0): global asset_previews enum_items = [] lib_dir = presets_library = util.get_addon_prefs().presets_library.path for i,asset in enumerate(lib.pres...
import os import bpy import bpy.utils.previews from .. import util asset_previews = bpy.utils.previews.new() def get_presets_for_lib(lib): items = list(lib.presets) for sub_group in lib.sub_groups: items.extend(get_presets_for_lib(sub_group)) return items def load_previews(lib): global asset_...
import os import bpy import bpy.utils.previews from .. import util asset_previews = bpy.utils.previews.new() def load_previews(lib, start=0): global asset_previews enum_items = [] lib_dir = presets_library = util.get_addon_prefs().presets_library.path for i,asset in enumerate(lib.presets): p...
<commit_before>import os import bpy import bpy.utils.previews from .. import util asset_previews = bpy.utils.previews.new() def load_previews(lib, start=0): global asset_previews enum_items = [] lib_dir = presets_library = util.get_addon_prefs().presets_library.path for i,asset in enumerate(lib.pres...
c66427aae7e251450ccb241ebbd0663127e1f6c1
tests/test_application.py
tests/test_application.py
from .helpers import BaseApplicationTest, BaseAPIClientMixin class DataAPIClientMixin(BaseAPIClientMixin): data_api_client_patch_path = 'app.main.views.marketplace.data_api_client' class TestApplication(DataAPIClientMixin, BaseApplicationTest): def test_index(self): response = self.client.get('/') ...
from .helpers import BaseApplicationTest, BaseAPIClientMixin class DataAPIClientMixin(BaseAPIClientMixin): data_api_client_patch_path = 'app.main.views.marketplace.data_api_client' class TestApplication(DataAPIClientMixin, BaseApplicationTest): def test_index(self): response = self.client.get('/') ...
Update redirect test to status 308
Update redirect test to status 308
Python
mit
alphagov/digitalmarketplace-buyer-frontend,alphagov/digitalmarketplace-buyer-frontend,alphagov/digitalmarketplace-buyer-frontend,alphagov/digitalmarketplace-buyer-frontend
from .helpers import BaseApplicationTest, BaseAPIClientMixin class DataAPIClientMixin(BaseAPIClientMixin): data_api_client_patch_path = 'app.main.views.marketplace.data_api_client' class TestApplication(DataAPIClientMixin, BaseApplicationTest): def test_index(self): response = self.client.get('/') ...
from .helpers import BaseApplicationTest, BaseAPIClientMixin class DataAPIClientMixin(BaseAPIClientMixin): data_api_client_patch_path = 'app.main.views.marketplace.data_api_client' class TestApplication(DataAPIClientMixin, BaseApplicationTest): def test_index(self): response = self.client.get('/') ...
<commit_before>from .helpers import BaseApplicationTest, BaseAPIClientMixin class DataAPIClientMixin(BaseAPIClientMixin): data_api_client_patch_path = 'app.main.views.marketplace.data_api_client' class TestApplication(DataAPIClientMixin, BaseApplicationTest): def test_index(self): response = self.cl...
from .helpers import BaseApplicationTest, BaseAPIClientMixin class DataAPIClientMixin(BaseAPIClientMixin): data_api_client_patch_path = 'app.main.views.marketplace.data_api_client' class TestApplication(DataAPIClientMixin, BaseApplicationTest): def test_index(self): response = self.client.get('/') ...
from .helpers import BaseApplicationTest, BaseAPIClientMixin class DataAPIClientMixin(BaseAPIClientMixin): data_api_client_patch_path = 'app.main.views.marketplace.data_api_client' class TestApplication(DataAPIClientMixin, BaseApplicationTest): def test_index(self): response = self.client.get('/') ...
<commit_before>from .helpers import BaseApplicationTest, BaseAPIClientMixin class DataAPIClientMixin(BaseAPIClientMixin): data_api_client_patch_path = 'app.main.views.marketplace.data_api_client' class TestApplication(DataAPIClientMixin, BaseApplicationTest): def test_index(self): response = self.cl...
0298ace270749a6de89595a5bb566739dc63b16e
jsk_apc2016_common/scripts/install_trained_data.py
jsk_apc2016_common/scripts/install_trained_data.py
#!/usr/bin/env python from jsk_data import download_data def main(): PKG = 'jsk_apc2016_common' download_data( pkg_name=PKG, path='trained_data/vgg16_96000.chainermodel', url='https://drive.google.com/uc?id=0B9P1L--7Wd2vOTdzOGlJcGM1N00', md5='3c993d333cf554684b5162c9f69b20cf'...
#!/usr/bin/env python from jsk_data import download_data def main(): PKG = 'jsk_apc2016_common' download_data( pkg_name=PKG, path='trained_data/vgg16_96000.chainermodel', url='https://drive.google.com/uc?id=0B9P1L--7Wd2vOTdzOGlJcGM1N00', md5='3c993d333cf554684b5162c9f69b20cf'...
Add vgg16 trained_data to download
Add vgg16 trained_data to download
Python
bsd-3-clause
pazeshun/jsk_apc,pazeshun/jsk_apc,pazeshun/jsk_apc,pazeshun/jsk_apc,pazeshun/jsk_apc
#!/usr/bin/env python from jsk_data import download_data def main(): PKG = 'jsk_apc2016_common' download_data( pkg_name=PKG, path='trained_data/vgg16_96000.chainermodel', url='https://drive.google.com/uc?id=0B9P1L--7Wd2vOTdzOGlJcGM1N00', md5='3c993d333cf554684b5162c9f69b20cf'...
#!/usr/bin/env python from jsk_data import download_data def main(): PKG = 'jsk_apc2016_common' download_data( pkg_name=PKG, path='trained_data/vgg16_96000.chainermodel', url='https://drive.google.com/uc?id=0B9P1L--7Wd2vOTdzOGlJcGM1N00', md5='3c993d333cf554684b5162c9f69b20cf'...
<commit_before>#!/usr/bin/env python from jsk_data import download_data def main(): PKG = 'jsk_apc2016_common' download_data( pkg_name=PKG, path='trained_data/vgg16_96000.chainermodel', url='https://drive.google.com/uc?id=0B9P1L--7Wd2vOTdzOGlJcGM1N00', md5='3c993d333cf554684b...
#!/usr/bin/env python from jsk_data import download_data def main(): PKG = 'jsk_apc2016_common' download_data( pkg_name=PKG, path='trained_data/vgg16_96000.chainermodel', url='https://drive.google.com/uc?id=0B9P1L--7Wd2vOTdzOGlJcGM1N00', md5='3c993d333cf554684b5162c9f69b20cf'...
#!/usr/bin/env python from jsk_data import download_data def main(): PKG = 'jsk_apc2016_common' download_data( pkg_name=PKG, path='trained_data/vgg16_96000.chainermodel', url='https://drive.google.com/uc?id=0B9P1L--7Wd2vOTdzOGlJcGM1N00', md5='3c993d333cf554684b5162c9f69b20cf'...
<commit_before>#!/usr/bin/env python from jsk_data import download_data def main(): PKG = 'jsk_apc2016_common' download_data( pkg_name=PKG, path='trained_data/vgg16_96000.chainermodel', url='https://drive.google.com/uc?id=0B9P1L--7Wd2vOTdzOGlJcGM1N00', md5='3c993d333cf554684b...
7bcc78cd428fa6d76c11b2f19886ec5e798411c6
pavement.py
pavement.py
from paver.easy import * @task def release_unix(): sh('python setup.py clean') sh('rm -f h5py_config.pickle') sh('python setup.py build --hdf5-version=1.8.4 --mpi=no') sh('python setup.py test') sh('python setup.py sdist') print("Unix release done. Distribution tar file is in dist/") @task de...
from paver.easy import * @task def release_unix(): sh('python setup.py clean') sh('rm -f h5py_config.pickle') sh('python setup.py build --hdf5-version=1.8.4 --mpi=no') sh('python setup.py test') sh('python setup.py sdist') print("Unix release done. Distribution tar file is in dist/") @task de...
Add pre-release git paver task
Add pre-release git paver task
Python
bsd-3-clause
h5py/h5py,h5py/h5py,h5py/h5py
from paver.easy import * @task def release_unix(): sh('python setup.py clean') sh('rm -f h5py_config.pickle') sh('python setup.py build --hdf5-version=1.8.4 --mpi=no') sh('python setup.py test') sh('python setup.py sdist') print("Unix release done. Distribution tar file is in dist/") @task de...
from paver.easy import * @task def release_unix(): sh('python setup.py clean') sh('rm -f h5py_config.pickle') sh('python setup.py build --hdf5-version=1.8.4 --mpi=no') sh('python setup.py test') sh('python setup.py sdist') print("Unix release done. Distribution tar file is in dist/") @task de...
<commit_before>from paver.easy import * @task def release_unix(): sh('python setup.py clean') sh('rm -f h5py_config.pickle') sh('python setup.py build --hdf5-version=1.8.4 --mpi=no') sh('python setup.py test') sh('python setup.py sdist') print("Unix release done. Distribution tar file is in di...
from paver.easy import * @task def release_unix(): sh('python setup.py clean') sh('rm -f h5py_config.pickle') sh('python setup.py build --hdf5-version=1.8.4 --mpi=no') sh('python setup.py test') sh('python setup.py sdist') print("Unix release done. Distribution tar file is in dist/") @task de...
from paver.easy import * @task def release_unix(): sh('python setup.py clean') sh('rm -f h5py_config.pickle') sh('python setup.py build --hdf5-version=1.8.4 --mpi=no') sh('python setup.py test') sh('python setup.py sdist') print("Unix release done. Distribution tar file is in dist/") @task de...
<commit_before>from paver.easy import * @task def release_unix(): sh('python setup.py clean') sh('rm -f h5py_config.pickle') sh('python setup.py build --hdf5-version=1.8.4 --mpi=no') sh('python setup.py test') sh('python setup.py sdist') print("Unix release done. Distribution tar file is in di...
3e81a2bfd026475b9ab0548c3127aa102066707d
guest-talks/20170828-oo-intro/exercises/test_square_grid.py
guest-talks/20170828-oo-intro/exercises/test_square_grid.py
import unittest from square_grid import SquareGrid class TestSquareGrid(unittest.TestCase): def setUp(self): a = [0] * 3 b = [1] * 3 c = [2] * 3 self.matrix= [a,b,c] self.good_grid = SquareGrid(self.matrix) def test_error_on_mixed_dimensions(self): """Test objec...
import unittest from square_grid import SquareGrid class TestSquareGrid(unittest.TestCase): def setUp(self): a = [0] * 3 b = [1] * 3 c = [2] * 3 self.matrix= [a,b,c] self.good_grid = SquareGrid(self.matrix) def test_error_on_mixed_dimensions(self): """Test objec...
Use literals in tests instead of code ;)
Use literals in tests instead of code ;)
Python
mit
noisebridge/PythonClass,razzius/PyClassLessons,PyClass/PyClassLessons,PyClass/PyClassLessons,noisebridge/PythonClass,razzius/PyClassLessons,noisebridge/PythonClass,razzius/PyClassLessons,noisebridge/PythonClass,PyClass/PyClassLessons,razzius/PyClassLessons
import unittest from square_grid import SquareGrid class TestSquareGrid(unittest.TestCase): def setUp(self): a = [0] * 3 b = [1] * 3 c = [2] * 3 self.matrix= [a,b,c] self.good_grid = SquareGrid(self.matrix) def test_error_on_mixed_dimensions(self): """Test objec...
import unittest from square_grid import SquareGrid class TestSquareGrid(unittest.TestCase): def setUp(self): a = [0] * 3 b = [1] * 3 c = [2] * 3 self.matrix= [a,b,c] self.good_grid = SquareGrid(self.matrix) def test_error_on_mixed_dimensions(self): """Test objec...
<commit_before>import unittest from square_grid import SquareGrid class TestSquareGrid(unittest.TestCase): def setUp(self): a = [0] * 3 b = [1] * 3 c = [2] * 3 self.matrix= [a,b,c] self.good_grid = SquareGrid(self.matrix) def test_error_on_mixed_dimensions(self): ...
import unittest from square_grid import SquareGrid class TestSquareGrid(unittest.TestCase): def setUp(self): a = [0] * 3 b = [1] * 3 c = [2] * 3 self.matrix= [a,b,c] self.good_grid = SquareGrid(self.matrix) def test_error_on_mixed_dimensions(self): """Test objec...
import unittest from square_grid import SquareGrid class TestSquareGrid(unittest.TestCase): def setUp(self): a = [0] * 3 b = [1] * 3 c = [2] * 3 self.matrix= [a,b,c] self.good_grid = SquareGrid(self.matrix) def test_error_on_mixed_dimensions(self): """Test objec...
<commit_before>import unittest from square_grid import SquareGrid class TestSquareGrid(unittest.TestCase): def setUp(self): a = [0] * 3 b = [1] * 3 c = [2] * 3 self.matrix= [a,b,c] self.good_grid = SquareGrid(self.matrix) def test_error_on_mixed_dimensions(self): ...
b57be89c94d050dd1e5f4279f91170982b00cc2e
polyaxon/clusters/management/commands/clean_experiments.py
polyaxon/clusters/management/commands/clean_experiments.py
from django.core.management import BaseCommand from experiments.models import Experiment from spawner import scheduler from spawner.utils.constants import ExperimentLifeCycle class Command(BaseCommand): def handle(self, *args, **options): for experiment in Experiment.objects.filter( exper...
from django.core.management import BaseCommand from experiments.models import Experiment from spawner import scheduler from spawner.utils.constants import ExperimentLifeCycle class Command(BaseCommand): def handle(self, *args, **options): for experiment in Experiment.objects.filter( exper...
Update status when stopping experiments
Update status when stopping experiments
Python
apache-2.0
polyaxon/polyaxon,polyaxon/polyaxon,polyaxon/polyaxon
from django.core.management import BaseCommand from experiments.models import Experiment from spawner import scheduler from spawner.utils.constants import ExperimentLifeCycle class Command(BaseCommand): def handle(self, *args, **options): for experiment in Experiment.objects.filter( exper...
from django.core.management import BaseCommand from experiments.models import Experiment from spawner import scheduler from spawner.utils.constants import ExperimentLifeCycle class Command(BaseCommand): def handle(self, *args, **options): for experiment in Experiment.objects.filter( exper...
<commit_before>from django.core.management import BaseCommand from experiments.models import Experiment from spawner import scheduler from spawner.utils.constants import ExperimentLifeCycle class Command(BaseCommand): def handle(self, *args, **options): for experiment in Experiment.objects.filter( ...
from django.core.management import BaseCommand from experiments.models import Experiment from spawner import scheduler from spawner.utils.constants import ExperimentLifeCycle class Command(BaseCommand): def handle(self, *args, **options): for experiment in Experiment.objects.filter( exper...
from django.core.management import BaseCommand from experiments.models import Experiment from spawner import scheduler from spawner.utils.constants import ExperimentLifeCycle class Command(BaseCommand): def handle(self, *args, **options): for experiment in Experiment.objects.filter( exper...
<commit_before>from django.core.management import BaseCommand from experiments.models import Experiment from spawner import scheduler from spawner.utils.constants import ExperimentLifeCycle class Command(BaseCommand): def handle(self, *args, **options): for experiment in Experiment.objects.filter( ...
48ee32acb12519dc644dce5b4f95d285a3176242
flocker/restapi/_logging.py
flocker/restapi/_logging.py
# Copyright Hybrid Logic Ltd. See LICENSE file for details. """ This module defines the Eliot log events emitted by the API implementation. """ __all__ = [ "JSON_REQUEST", "REQUEST", ] from eliot import Field, ActionType LOG_SYSTEM = u"api" METHOD = Field.forTypes( u"method", [unicode, bytes], u"T...
# Copyright Hybrid Logic Ltd. See LICENSE file for details. """ This module defines the Eliot log events emitted by the API implementation. """ __all__ = [ "JSON_REQUEST", "REQUEST", ] from eliot import Field, ActionType LOG_SYSTEM = u"api" METHOD = Field(u"method", lambda method: method, ...
Address review comment: Just pass through fields we aren't changing.
Address review comment: Just pass through fields we aren't changing.
Python
apache-2.0
Azulinho/flocker,lukemarsden/flocker,mbrukman/flocker,agonzalezro/flocker,achanda/flocker,Azulinho/flocker,1d4Nf6/flocker,runcom/flocker,LaynePeng/flocker,moypray/flocker,lukemarsden/flocker,achanda/flocker,wallnerryan/flocker-profiles,AndyHuu/flocker,Azulinho/flocker,runcom/flocker,1d4Nf6/flocker,adamtheturtle/flocker...
# Copyright Hybrid Logic Ltd. See LICENSE file for details. """ This module defines the Eliot log events emitted by the API implementation. """ __all__ = [ "JSON_REQUEST", "REQUEST", ] from eliot import Field, ActionType LOG_SYSTEM = u"api" METHOD = Field.forTypes( u"method", [unicode, bytes], u"T...
# Copyright Hybrid Logic Ltd. See LICENSE file for details. """ This module defines the Eliot log events emitted by the API implementation. """ __all__ = [ "JSON_REQUEST", "REQUEST", ] from eliot import Field, ActionType LOG_SYSTEM = u"api" METHOD = Field(u"method", lambda method: method, ...
<commit_before># Copyright Hybrid Logic Ltd. See LICENSE file for details. """ This module defines the Eliot log events emitted by the API implementation. """ __all__ = [ "JSON_REQUEST", "REQUEST", ] from eliot import Field, ActionType LOG_SYSTEM = u"api" METHOD = Field.forTypes( u"method", [unico...
# Copyright Hybrid Logic Ltd. See LICENSE file for details. """ This module defines the Eliot log events emitted by the API implementation. """ __all__ = [ "JSON_REQUEST", "REQUEST", ] from eliot import Field, ActionType LOG_SYSTEM = u"api" METHOD = Field(u"method", lambda method: method, ...
# Copyright Hybrid Logic Ltd. See LICENSE file for details. """ This module defines the Eliot log events emitted by the API implementation. """ __all__ = [ "JSON_REQUEST", "REQUEST", ] from eliot import Field, ActionType LOG_SYSTEM = u"api" METHOD = Field.forTypes( u"method", [unicode, bytes], u"T...
<commit_before># Copyright Hybrid Logic Ltd. See LICENSE file for details. """ This module defines the Eliot log events emitted by the API implementation. """ __all__ = [ "JSON_REQUEST", "REQUEST", ] from eliot import Field, ActionType LOG_SYSTEM = u"api" METHOD = Field.forTypes( u"method", [unico...
c9ca005e8129c784e108bb77719f201e110433f1
settings/models.py
settings/models.py
from django.db import models # Create your models here. class GlobalSettings(models.Model): DOMAIN_NAME = 'FQDN' FORCE_HTTPS = 'HTTPS' ADMIN_MAIL = 'ADM_MAIL' ADMIN_NAME = 'ADM_NAME' KEY_CHOICES = ( (DOMAIN_NAME, 'Domain Name'), (FORCE_HTTPS, 'Force HTTPS'), (ADMIN_MAIL, 'Admin de-mail'), (ADMIN_NAME, ...
from django.db import models # Create your models here. class GlobalSettings(models.Model): DOMAIN_NAME = 'FQDN' FORCE_HTTPS = 'HTTPS' ADMIN_MAIL = 'ADM_MAIL' ADMIN_NAME = 'ADM_NAME' KEY_CHOICES = ( (DOMAIN_NAME, 'Domain Name'), (FORCE_HTTPS, 'Force HTTPS'), (ADMIN_MAIL, 'Admin de-mail'), (ADMIN_NAME, ...
Fix uniqueness for voting systems
Fix uniqueness for voting systems
Python
mit
kuboschek/jay,OpenJUB/jay,kuboschek/jay,kuboschek/jay,OpenJUB/jay,OpenJUB/jay
from django.db import models # Create your models here. class GlobalSettings(models.Model): DOMAIN_NAME = 'FQDN' FORCE_HTTPS = 'HTTPS' ADMIN_MAIL = 'ADM_MAIL' ADMIN_NAME = 'ADM_NAME' KEY_CHOICES = ( (DOMAIN_NAME, 'Domain Name'), (FORCE_HTTPS, 'Force HTTPS'), (ADMIN_MAIL, 'Admin de-mail'), (ADMIN_NAME, ...
from django.db import models # Create your models here. class GlobalSettings(models.Model): DOMAIN_NAME = 'FQDN' FORCE_HTTPS = 'HTTPS' ADMIN_MAIL = 'ADM_MAIL' ADMIN_NAME = 'ADM_NAME' KEY_CHOICES = ( (DOMAIN_NAME, 'Domain Name'), (FORCE_HTTPS, 'Force HTTPS'), (ADMIN_MAIL, 'Admin de-mail'), (ADMIN_NAME, ...
<commit_before>from django.db import models # Create your models here. class GlobalSettings(models.Model): DOMAIN_NAME = 'FQDN' FORCE_HTTPS = 'HTTPS' ADMIN_MAIL = 'ADM_MAIL' ADMIN_NAME = 'ADM_NAME' KEY_CHOICES = ( (DOMAIN_NAME, 'Domain Name'), (FORCE_HTTPS, 'Force HTTPS'), (ADMIN_MAIL, 'Admin de-mail'), ...
from django.db import models # Create your models here. class GlobalSettings(models.Model): DOMAIN_NAME = 'FQDN' FORCE_HTTPS = 'HTTPS' ADMIN_MAIL = 'ADM_MAIL' ADMIN_NAME = 'ADM_NAME' KEY_CHOICES = ( (DOMAIN_NAME, 'Domain Name'), (FORCE_HTTPS, 'Force HTTPS'), (ADMIN_MAIL, 'Admin de-mail'), (ADMIN_NAME, ...
from django.db import models # Create your models here. class GlobalSettings(models.Model): DOMAIN_NAME = 'FQDN' FORCE_HTTPS = 'HTTPS' ADMIN_MAIL = 'ADM_MAIL' ADMIN_NAME = 'ADM_NAME' KEY_CHOICES = ( (DOMAIN_NAME, 'Domain Name'), (FORCE_HTTPS, 'Force HTTPS'), (ADMIN_MAIL, 'Admin de-mail'), (ADMIN_NAME, ...
<commit_before>from django.db import models # Create your models here. class GlobalSettings(models.Model): DOMAIN_NAME = 'FQDN' FORCE_HTTPS = 'HTTPS' ADMIN_MAIL = 'ADM_MAIL' ADMIN_NAME = 'ADM_NAME' KEY_CHOICES = ( (DOMAIN_NAME, 'Domain Name'), (FORCE_HTTPS, 'Force HTTPS'), (ADMIN_MAIL, 'Admin de-mail'), ...
7938589c950b9b36d215aa85224c931a080c104e
statsd/gauge.py
statsd/gauge.py
import statsd import decimal class Gauge(statsd.Client): '''Class to implement a statsd gauge ''' def send(self, subname, value): '''Send the data to statsd via self.connection :keyword subname: The subname to report the data to (appended to the client name) :keyword...
import statsd from . import compat class Gauge(statsd.Client): '''Class to implement a statsd gauge ''' def send(self, subname, value): '''Send the data to statsd via self.connection :keyword subname: The subname to report the data to (appended to the client name) :...
Use compat.NUM_TYPES due to removal of long in py3k
Use compat.NUM_TYPES due to removal of long in py3k
Python
bsd-3-clause
wolph/python-statsd
import statsd import decimal class Gauge(statsd.Client): '''Class to implement a statsd gauge ''' def send(self, subname, value): '''Send the data to statsd via self.connection :keyword subname: The subname to report the data to (appended to the client name) :keyword...
import statsd from . import compat class Gauge(statsd.Client): '''Class to implement a statsd gauge ''' def send(self, subname, value): '''Send the data to statsd via self.connection :keyword subname: The subname to report the data to (appended to the client name) :...
<commit_before>import statsd import decimal class Gauge(statsd.Client): '''Class to implement a statsd gauge ''' def send(self, subname, value): '''Send the data to statsd via self.connection :keyword subname: The subname to report the data to (appended to the client name) ...
import statsd from . import compat class Gauge(statsd.Client): '''Class to implement a statsd gauge ''' def send(self, subname, value): '''Send the data to statsd via self.connection :keyword subname: The subname to report the data to (appended to the client name) :...
import statsd import decimal class Gauge(statsd.Client): '''Class to implement a statsd gauge ''' def send(self, subname, value): '''Send the data to statsd via self.connection :keyword subname: The subname to report the data to (appended to the client name) :keyword...
<commit_before>import statsd import decimal class Gauge(statsd.Client): '''Class to implement a statsd gauge ''' def send(self, subname, value): '''Send the data to statsd via self.connection :keyword subname: The subname to report the data to (appended to the client name) ...
9e62292ed25860a2e376c5d98c8ff7762bc1346b
scripts/slave/chromium/dart_buildbot_run.py
scripts/slave/chromium/dart_buildbot_run.py
#!/usr/bin/env python # Copyright (c) 2012 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """Entry point for the dartium buildbots. This script is called from buildbot and reports results using the buildbot annotation sc...
#!/usr/bin/env python # Copyright (c) 2012 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """Entry point for the dartium buildbots. This script is called from buildbot and reports results using the buildbot annotation sc...
Use the annotated steps from the dart dir
Use the annotated steps from the dart dir TBR=whesse Review URL: https://codereview.chromium.org/352223009 git-svn-id: 239fca9b83025a0b6f823aeeca02ba5be3d9fd76@280292 0039d316-1c4b-4281-b951-d872f2087c98
Python
bsd-3-clause
eunchong/build,eunchong/build,eunchong/build,eunchong/build
#!/usr/bin/env python # Copyright (c) 2012 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """Entry point for the dartium buildbots. This script is called from buildbot and reports results using the buildbot annotation sc...
#!/usr/bin/env python # Copyright (c) 2012 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """Entry point for the dartium buildbots. This script is called from buildbot and reports results using the buildbot annotation sc...
<commit_before>#!/usr/bin/env python # Copyright (c) 2012 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """Entry point for the dartium buildbots. This script is called from buildbot and reports results using the buildbo...
#!/usr/bin/env python # Copyright (c) 2012 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """Entry point for the dartium buildbots. This script is called from buildbot and reports results using the buildbot annotation sc...
#!/usr/bin/env python # Copyright (c) 2012 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """Entry point for the dartium buildbots. This script is called from buildbot and reports results using the buildbot annotation sc...
<commit_before>#!/usr/bin/env python # Copyright (c) 2012 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """Entry point for the dartium buildbots. This script is called from buildbot and reports results using the buildbo...
10009f8a19b417359d41a5e83ff5083e6862b891
algorithms/math/sieve_eratosthenes.py
algorithms/math/sieve_eratosthenes.py
""" sieve_eratosthenes.py Implementation of the Sieve of Eratosthenes algorithm. Depth First Search Overview: ------------------------ Is a simple, ancient algorithm for finding all prime numbers up to any given limit. It does so by iteratively marking as composite (i.e. not prime) the m...
""" sieve_eratosthenes.py Implementation of the Sieve of Eratosthenes algorithm. Sieve of Eratosthenes Overview: ------------------------ Is a simple, ancient algorithm for finding all prime numbers up to any given limit. It does so by iteratively marking as composite (i.e. not prime) th...
Fix Sieve of Eratosthenes Overview header
Fix Sieve of Eratosthenes Overview header
Python
bsd-3-clause
rexshihaoren/algorithms,stphivos/algorithms
""" sieve_eratosthenes.py Implementation of the Sieve of Eratosthenes algorithm. Depth First Search Overview: ------------------------ Is a simple, ancient algorithm for finding all prime numbers up to any given limit. It does so by iteratively marking as composite (i.e. not prime) the m...
""" sieve_eratosthenes.py Implementation of the Sieve of Eratosthenes algorithm. Sieve of Eratosthenes Overview: ------------------------ Is a simple, ancient algorithm for finding all prime numbers up to any given limit. It does so by iteratively marking as composite (i.e. not prime) th...
<commit_before>""" sieve_eratosthenes.py Implementation of the Sieve of Eratosthenes algorithm. Depth First Search Overview: ------------------------ Is a simple, ancient algorithm for finding all prime numbers up to any given limit. It does so by iteratively marking as composite (i.e. not pr...
""" sieve_eratosthenes.py Implementation of the Sieve of Eratosthenes algorithm. Sieve of Eratosthenes Overview: ------------------------ Is a simple, ancient algorithm for finding all prime numbers up to any given limit. It does so by iteratively marking as composite (i.e. not prime) th...
""" sieve_eratosthenes.py Implementation of the Sieve of Eratosthenes algorithm. Depth First Search Overview: ------------------------ Is a simple, ancient algorithm for finding all prime numbers up to any given limit. It does so by iteratively marking as composite (i.e. not prime) the m...
<commit_before>""" sieve_eratosthenes.py Implementation of the Sieve of Eratosthenes algorithm. Depth First Search Overview: ------------------------ Is a simple, ancient algorithm for finding all prime numbers up to any given limit. It does so by iteratively marking as composite (i.e. not pr...