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
813ebbce962e7d59602a1f1693359b9d61bbef07
byceps/services/email/service.py
byceps/services/email/service.py
""" byceps.services.email.service ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :Copyright: 2006-2017 Jochen Kupperschmidt :License: Modified BSD, see LICENSE for details. """ from typing import List, Optional from ... import email from ...typing import BrandID from .models import EmailConfig def find_sender_address_for_brand(br...
""" byceps.services.email.service ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :Copyright: 2006-2017 Jochen Kupperschmidt :License: Modified BSD, see LICENSE for details. """ from typing import List, Optional from ... import email from ...typing import BrandID from .models import EmailConfig def find_sender_address_for_brand(br...
Return `None` if no email configuration exists for brand instead of raising an exception
Return `None` if no email configuration exists for brand instead of raising an exception
Python
bsd-3-clause
homeworkprod/byceps,homeworkprod/byceps,m-ober/byceps,m-ober/byceps,m-ober/byceps,homeworkprod/byceps
""" byceps.services.email.service ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :Copyright: 2006-2017 Jochen Kupperschmidt :License: Modified BSD, see LICENSE for details. """ from typing import List, Optional from ... import email from ...typing import BrandID from .models import EmailConfig def find_sender_address_for_brand(br...
""" byceps.services.email.service ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :Copyright: 2006-2017 Jochen Kupperschmidt :License: Modified BSD, see LICENSE for details. """ from typing import List, Optional from ... import email from ...typing import BrandID from .models import EmailConfig def find_sender_address_for_brand(br...
<commit_before>""" byceps.services.email.service ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :Copyright: 2006-2017 Jochen Kupperschmidt :License: Modified BSD, see LICENSE for details. """ from typing import List, Optional from ... import email from ...typing import BrandID from .models import EmailConfig def find_sender_addre...
""" byceps.services.email.service ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :Copyright: 2006-2017 Jochen Kupperschmidt :License: Modified BSD, see LICENSE for details. """ from typing import List, Optional from ... import email from ...typing import BrandID from .models import EmailConfig def find_sender_address_for_brand(br...
""" byceps.services.email.service ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :Copyright: 2006-2017 Jochen Kupperschmidt :License: Modified BSD, see LICENSE for details. """ from typing import List, Optional from ... import email from ...typing import BrandID from .models import EmailConfig def find_sender_address_for_brand(br...
<commit_before>""" byceps.services.email.service ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :Copyright: 2006-2017 Jochen Kupperschmidt :License: Modified BSD, see LICENSE for details. """ from typing import List, Optional from ... import email from ...typing import BrandID from .models import EmailConfig def find_sender_addre...
7822598afa31f0f556766c53ecff27cb8aca76d6
chipy_org/apps/meetings/utils.py
chipy_org/apps/meetings/utils.py
from django.core.exceptions import ObjectDoesNotExist import requests from apps.meetings.models import Meeting, RSVP def meetup_meeting_sync(api_key, meetup_event_id): url = "http://api.meetup.com/2/rsvps" params = dict(key=api_key, event_id=meetup_event_id) api_response = requests.get(url, params=params)...
from django.core.exceptions import ObjectDoesNotExist import requests from apps.meetings.models import Meeting, RSVP def get_rsvp(meeting, meetup_member): """ Handles getting the rsvp instance to update from Meetup. Will return a new instance if needed. If there is a name collision, it will update th...
Handle name collisions from meetup by attaching the meetup id to the user. While not perfect, should be good enough.
Handle name collisions from meetup by attaching the meetup id to the user. While not perfect, should be good enough.
Python
mit
brianray/chipy.org,brianray/chipy.org,bharathelangovan/chipy.org,tanyaschlusser/chipy.org,chicagopython/chipy.org,agfor/chipy.org,brianray/chipy.org,tanyaschlusser/chipy.org,chicagopython/chipy.org,agfor/chipy.org,chicagopython/chipy.org,bharathelangovan/chipy.org,chicagopython/chipy.org,agfor/chipy.org,tanyaschlusser/...
from django.core.exceptions import ObjectDoesNotExist import requests from apps.meetings.models import Meeting, RSVP def meetup_meeting_sync(api_key, meetup_event_id): url = "http://api.meetup.com/2/rsvps" params = dict(key=api_key, event_id=meetup_event_id) api_response = requests.get(url, params=params)...
from django.core.exceptions import ObjectDoesNotExist import requests from apps.meetings.models import Meeting, RSVP def get_rsvp(meeting, meetup_member): """ Handles getting the rsvp instance to update from Meetup. Will return a new instance if needed. If there is a name collision, it will update th...
<commit_before>from django.core.exceptions import ObjectDoesNotExist import requests from apps.meetings.models import Meeting, RSVP def meetup_meeting_sync(api_key, meetup_event_id): url = "http://api.meetup.com/2/rsvps" params = dict(key=api_key, event_id=meetup_event_id) api_response = requests.get(url,...
from django.core.exceptions import ObjectDoesNotExist import requests from apps.meetings.models import Meeting, RSVP def get_rsvp(meeting, meetup_member): """ Handles getting the rsvp instance to update from Meetup. Will return a new instance if needed. If there is a name collision, it will update th...
from django.core.exceptions import ObjectDoesNotExist import requests from apps.meetings.models import Meeting, RSVP def meetup_meeting_sync(api_key, meetup_event_id): url = "http://api.meetup.com/2/rsvps" params = dict(key=api_key, event_id=meetup_event_id) api_response = requests.get(url, params=params)...
<commit_before>from django.core.exceptions import ObjectDoesNotExist import requests from apps.meetings.models import Meeting, RSVP def meetup_meeting_sync(api_key, meetup_event_id): url = "http://api.meetup.com/2/rsvps" params = dict(key=api_key, event_id=meetup_event_id) api_response = requests.get(url,...
fb719c54a41d90e07b62c82d1995f9c3149b68ec
adhocracy4/projects/views.py
adhocracy4/projects/views.py
from django.views import generic from rules.contrib import views as rules_views from . import mixins, models class ProjectDetailView(rules_views.PermissionRequiredMixin, mixins.PhaseDispatchMixin, generic.DetailView): model = models.Project permission_required...
from django.views import generic from rules.contrib import views as rules_views from . import mixins, models class ProjectDetailView(rules_views.PermissionRequiredMixin, mixins.PhaseDispatchMixin, generic.DetailView): model = models.Project permission_required...
Remove project property which is already set by the PhaseDispatchMixin
Remove project property which is already set by the PhaseDispatchMixin
Python
agpl-3.0
liqd/adhocracy4,liqd/adhocracy4,liqd/adhocracy4,liqd/adhocracy4
from django.views import generic from rules.contrib import views as rules_views from . import mixins, models class ProjectDetailView(rules_views.PermissionRequiredMixin, mixins.PhaseDispatchMixin, generic.DetailView): model = models.Project permission_required...
from django.views import generic from rules.contrib import views as rules_views from . import mixins, models class ProjectDetailView(rules_views.PermissionRequiredMixin, mixins.PhaseDispatchMixin, generic.DetailView): model = models.Project permission_required...
<commit_before>from django.views import generic from rules.contrib import views as rules_views from . import mixins, models class ProjectDetailView(rules_views.PermissionRequiredMixin, mixins.PhaseDispatchMixin, generic.DetailView): model = models.Project perm...
from django.views import generic from rules.contrib import views as rules_views from . import mixins, models class ProjectDetailView(rules_views.PermissionRequiredMixin, mixins.PhaseDispatchMixin, generic.DetailView): model = models.Project permission_required...
from django.views import generic from rules.contrib import views as rules_views from . import mixins, models class ProjectDetailView(rules_views.PermissionRequiredMixin, mixins.PhaseDispatchMixin, generic.DetailView): model = models.Project permission_required...
<commit_before>from django.views import generic from rules.contrib import views as rules_views from . import mixins, models class ProjectDetailView(rules_views.PermissionRequiredMixin, mixins.PhaseDispatchMixin, generic.DetailView): model = models.Project perm...
a910295b2cbffdcb78c99218a48cb0120ecc3085
ynr/apps/ynr_refactoring/settings.py
ynr/apps/ynr_refactoring/settings.py
from .helpers.popolo_fields import simple_fields SIMPLE_POPOLO_FIELDS = simple_fields
from enum import Enum, unique from .helpers.popolo_fields import simple_fields SIMPLE_POPOLO_FIELDS = simple_fields @unique class PersonIdentifierFields(Enum): email = "Email" facebook_page_url = "Facebook Page" facebook_personal_url = "Facebook Personal" homepage_url = "Homepage" linkedin_url =...
Add Enum for PersonIdentifier Fields
Add Enum for PersonIdentifier Fields This is similar to the work to remove SimplePopoloFields from the database layer. The values here are all the values we want in the initial version of the "n-links" on the person page model. One day we want to enable any type of link, specified by the user. That's too big a change...
Python
agpl-3.0
DemocracyClub/yournextrepresentative,DemocracyClub/yournextrepresentative,DemocracyClub/yournextrepresentative
from .helpers.popolo_fields import simple_fields SIMPLE_POPOLO_FIELDS = simple_fields Add Enum for PersonIdentifier Fields This is similar to the work to remove SimplePopoloFields from the database layer. The values here are all the values we want in the initial version of the "n-links" on the person page model. One...
from enum import Enum, unique from .helpers.popolo_fields import simple_fields SIMPLE_POPOLO_FIELDS = simple_fields @unique class PersonIdentifierFields(Enum): email = "Email" facebook_page_url = "Facebook Page" facebook_personal_url = "Facebook Personal" homepage_url = "Homepage" linkedin_url =...
<commit_before>from .helpers.popolo_fields import simple_fields SIMPLE_POPOLO_FIELDS = simple_fields <commit_msg>Add Enum for PersonIdentifier Fields This is similar to the work to remove SimplePopoloFields from the database layer. The values here are all the values we want in the initial version of the "n-links" on ...
from enum import Enum, unique from .helpers.popolo_fields import simple_fields SIMPLE_POPOLO_FIELDS = simple_fields @unique class PersonIdentifierFields(Enum): email = "Email" facebook_page_url = "Facebook Page" facebook_personal_url = "Facebook Personal" homepage_url = "Homepage" linkedin_url =...
from .helpers.popolo_fields import simple_fields SIMPLE_POPOLO_FIELDS = simple_fields Add Enum for PersonIdentifier Fields This is similar to the work to remove SimplePopoloFields from the database layer. The values here are all the values we want in the initial version of the "n-links" on the person page model. One...
<commit_before>from .helpers.popolo_fields import simple_fields SIMPLE_POPOLO_FIELDS = simple_fields <commit_msg>Add Enum for PersonIdentifier Fields This is similar to the work to remove SimplePopoloFields from the database layer. The values here are all the values we want in the initial version of the "n-links" on ...
c8785033d313f0b6b78eff4bb01c7fa2df330f0d
djpjax/middleware.py
djpjax/middleware.py
import re from djpjax.utils import strip_pjax_parameter from django.conf import settings import djpjax class DjangoPJAXMiddleware(object): def __init__(self): djpjax_setting = getattr(settings, 'DJPJAX_DECORATE_URLS', []) self.decorated_urls = tuple( (re.compile(url_regex), getattr(d...
import re from djpjax.utils import strip_pjax_parameter from django.conf import settings import djpjax class DjangoPJAXMiddleware(object): def __init__(self): djpjax_setting = getattr(settings, 'DJPJAX_DECORATED_URLS', []) self.decorated_urls = tuple( (re.compile(url_regex), getattr(...
Change setting name to DJPJAX_DECORATED_URLS.
Change setting name to DJPJAX_DECORATED_URLS.
Python
bsd-3-clause
AlexHill/djpj,AlexHill/djpj
import re from djpjax.utils import strip_pjax_parameter from django.conf import settings import djpjax class DjangoPJAXMiddleware(object): def __init__(self): djpjax_setting = getattr(settings, 'DJPJAX_DECORATE_URLS', []) self.decorated_urls = tuple( (re.compile(url_regex), getattr(d...
import re from djpjax.utils import strip_pjax_parameter from django.conf import settings import djpjax class DjangoPJAXMiddleware(object): def __init__(self): djpjax_setting = getattr(settings, 'DJPJAX_DECORATED_URLS', []) self.decorated_urls = tuple( (re.compile(url_regex), getattr(...
<commit_before>import re from djpjax.utils import strip_pjax_parameter from django.conf import settings import djpjax class DjangoPJAXMiddleware(object): def __init__(self): djpjax_setting = getattr(settings, 'DJPJAX_DECORATE_URLS', []) self.decorated_urls = tuple( (re.compile(url_re...
import re from djpjax.utils import strip_pjax_parameter from django.conf import settings import djpjax class DjangoPJAXMiddleware(object): def __init__(self): djpjax_setting = getattr(settings, 'DJPJAX_DECORATED_URLS', []) self.decorated_urls = tuple( (re.compile(url_regex), getattr(...
import re from djpjax.utils import strip_pjax_parameter from django.conf import settings import djpjax class DjangoPJAXMiddleware(object): def __init__(self): djpjax_setting = getattr(settings, 'DJPJAX_DECORATE_URLS', []) self.decorated_urls = tuple( (re.compile(url_regex), getattr(d...
<commit_before>import re from djpjax.utils import strip_pjax_parameter from django.conf import settings import djpjax class DjangoPJAXMiddleware(object): def __init__(self): djpjax_setting = getattr(settings, 'DJPJAX_DECORATE_URLS', []) self.decorated_urls = tuple( (re.compile(url_re...
0b3499beebeb789323d293513fdfc98565f6e02a
examples/IPLoM_example.py
examples/IPLoM_example.py
# for local run, before pygraphc packaging import sys sys.path.insert(0, '../pygraphc/misc') from IPLoM import * RawLogPath = '/home/hudan/Git/labeled-authlog/dataset/161.166.232.17/' RawLogFile = 'auth.log.anon' OutputPath = './results' para = Para(path=RawLogPath, logname=RawLogFile, save_path=OutputPath) myparser ...
# for local run, before pygraphc packaging import sys sys.path.insert(0, '../pygraphc/misc') from IPLoM import * sys.path.insert(0, '../pygraphc/clustering') from ClusterUtility import * from ClusterEvaluation import * ip_address = '161.166.232.17' standard_path = '/home/hudan/Git/labeled-authlog/dataset/' + ip_addres...
Add evaluation metrics to example
Add evaluation metrics to example
Python
mit
studiawan/pygraphc
# for local run, before pygraphc packaging import sys sys.path.insert(0, '../pygraphc/misc') from IPLoM import * RawLogPath = '/home/hudan/Git/labeled-authlog/dataset/161.166.232.17/' RawLogFile = 'auth.log.anon' OutputPath = './results' para = Para(path=RawLogPath, logname=RawLogFile, save_path=OutputPath) myparser ...
# for local run, before pygraphc packaging import sys sys.path.insert(0, '../pygraphc/misc') from IPLoM import * sys.path.insert(0, '../pygraphc/clustering') from ClusterUtility import * from ClusterEvaluation import * ip_address = '161.166.232.17' standard_path = '/home/hudan/Git/labeled-authlog/dataset/' + ip_addres...
<commit_before># for local run, before pygraphc packaging import sys sys.path.insert(0, '../pygraphc/misc') from IPLoM import * RawLogPath = '/home/hudan/Git/labeled-authlog/dataset/161.166.232.17/' RawLogFile = 'auth.log.anon' OutputPath = './results' para = Para(path=RawLogPath, logname=RawLogFile, save_path=OutputP...
# for local run, before pygraphc packaging import sys sys.path.insert(0, '../pygraphc/misc') from IPLoM import * sys.path.insert(0, '../pygraphc/clustering') from ClusterUtility import * from ClusterEvaluation import * ip_address = '161.166.232.17' standard_path = '/home/hudan/Git/labeled-authlog/dataset/' + ip_addres...
# for local run, before pygraphc packaging import sys sys.path.insert(0, '../pygraphc/misc') from IPLoM import * RawLogPath = '/home/hudan/Git/labeled-authlog/dataset/161.166.232.17/' RawLogFile = 'auth.log.anon' OutputPath = './results' para = Para(path=RawLogPath, logname=RawLogFile, save_path=OutputPath) myparser ...
<commit_before># for local run, before pygraphc packaging import sys sys.path.insert(0, '../pygraphc/misc') from IPLoM import * RawLogPath = '/home/hudan/Git/labeled-authlog/dataset/161.166.232.17/' RawLogFile = 'auth.log.anon' OutputPath = './results' para = Para(path=RawLogPath, logname=RawLogFile, save_path=OutputP...
f3f210b523f1733e48bb6316ecbb15e198dd503c
examples/field_example.py
examples/field_example.py
import graphene class Person(graphene.Interface): name = graphene.String() age = graphene.ID() class Patron(Person): id = graphene.ID() class Query(graphene.ObjectType): patron = graphene.Field(Patron) def resolve_patron(self, args, info): return Patron(id=1, name='Demo') schema = g...
import graphene class Patron(graphene.ObjectType): id = graphene.ID() name = graphene.String() age = graphene.ID() class Query(graphene.ObjectType): patron = graphene.Field(Patron) def resolve_patron(self, args, info): return Patron(id=1, name='Demo') schema = graphene.Schema(query=Qu...
Modify the field example to remove the use of interface
Modify the field example to remove the use of interface
Python
mit
sjhewitt/graphene,Globegitter/graphene,Globegitter/graphene,graphql-python/graphene,graphql-python/graphene,sjhewitt/graphene
import graphene class Person(graphene.Interface): name = graphene.String() age = graphene.ID() class Patron(Person): id = graphene.ID() class Query(graphene.ObjectType): patron = graphene.Field(Patron) def resolve_patron(self, args, info): return Patron(id=1, name='Demo') schema = g...
import graphene class Patron(graphene.ObjectType): id = graphene.ID() name = graphene.String() age = graphene.ID() class Query(graphene.ObjectType): patron = graphene.Field(Patron) def resolve_patron(self, args, info): return Patron(id=1, name='Demo') schema = graphene.Schema(query=Qu...
<commit_before>import graphene class Person(graphene.Interface): name = graphene.String() age = graphene.ID() class Patron(Person): id = graphene.ID() class Query(graphene.ObjectType): patron = graphene.Field(Patron) def resolve_patron(self, args, info): return Patron(id=1, name='Dem...
import graphene class Patron(graphene.ObjectType): id = graphene.ID() name = graphene.String() age = graphene.ID() class Query(graphene.ObjectType): patron = graphene.Field(Patron) def resolve_patron(self, args, info): return Patron(id=1, name='Demo') schema = graphene.Schema(query=Qu...
import graphene class Person(graphene.Interface): name = graphene.String() age = graphene.ID() class Patron(Person): id = graphene.ID() class Query(graphene.ObjectType): patron = graphene.Field(Patron) def resolve_patron(self, args, info): return Patron(id=1, name='Demo') schema = g...
<commit_before>import graphene class Person(graphene.Interface): name = graphene.String() age = graphene.ID() class Patron(Person): id = graphene.ID() class Query(graphene.ObjectType): patron = graphene.Field(Patron) def resolve_patron(self, args, info): return Patron(id=1, name='Dem...
ed4666b0d1bf5b8f82e298dfb043cce158c4ba2f
morepath/tests/fixtures/template_unknown_extension_no_render.py
morepath/tests/fixtures/template_unknown_extension_no_render.py
import morepath import os from .template_engine import FormatLoader class App(morepath.App): pass @App.path(path='{name}') class Person(object): def __init__(self, name): self.name = name @App.template_loader(extension='.unknown') def get_template_loader(template_directories, settings): return...
import morepath import os from .template_engine import FormatLoader class App(morepath.App): pass @App.path(path='{name}') class Person(object): def __init__(self, name): self.name = name @App.template_loader(extension='.unknown') def get_template_loader(template_directories, settings): return...
Fix so that error under test actually gets triggered.
Fix so that error under test actually gets triggered.
Python
bsd-3-clause
taschini/morepath,faassen/morepath,morepath/morepath
import morepath import os from .template_engine import FormatLoader class App(morepath.App): pass @App.path(path='{name}') class Person(object): def __init__(self, name): self.name = name @App.template_loader(extension='.unknown') def get_template_loader(template_directories, settings): return...
import morepath import os from .template_engine import FormatLoader class App(morepath.App): pass @App.path(path='{name}') class Person(object): def __init__(self, name): self.name = name @App.template_loader(extension='.unknown') def get_template_loader(template_directories, settings): return...
<commit_before>import morepath import os from .template_engine import FormatLoader class App(morepath.App): pass @App.path(path='{name}') class Person(object): def __init__(self, name): self.name = name @App.template_loader(extension='.unknown') def get_template_loader(template_directories, settin...
import morepath import os from .template_engine import FormatLoader class App(morepath.App): pass @App.path(path='{name}') class Person(object): def __init__(self, name): self.name = name @App.template_loader(extension='.unknown') def get_template_loader(template_directories, settings): return...
import morepath import os from .template_engine import FormatLoader class App(morepath.App): pass @App.path(path='{name}') class Person(object): def __init__(self, name): self.name = name @App.template_loader(extension='.unknown') def get_template_loader(template_directories, settings): return...
<commit_before>import morepath import os from .template_engine import FormatLoader class App(morepath.App): pass @App.path(path='{name}') class Person(object): def __init__(self, name): self.name = name @App.template_loader(extension='.unknown') def get_template_loader(template_directories, settin...
27fe9d6531a2e76affd9388db53c0433062a9cfa
photonix/photos/management/commands/create_library.py
photonix/photos/management/commands/create_library.py
import os from pathlib import Path from django.contrib.auth import get_user_model from django.core.management.base import BaseCommand from django.db.utils import IntegrityError from photonix.photos.models import Library, LibraryPath, LibraryUser from photonix.photos.utils.db import record_photo from photonix.photos.u...
import os from pathlib import Path from django.contrib.auth import get_user_model from django.core.management.base import BaseCommand from django.db.utils import IntegrityError from photonix.photos.models import Library, LibraryPath, LibraryUser from photonix.photos.utils.db import record_photo from photonix.photos.u...
Fix path cannot be set when creating new library
Fix path cannot be set when creating new library
Python
agpl-3.0
damianmoore/photo-manager,damianmoore/photo-manager,damianmoore/photo-manager,damianmoore/photo-manager
import os from pathlib import Path from django.contrib.auth import get_user_model from django.core.management.base import BaseCommand from django.db.utils import IntegrityError from photonix.photos.models import Library, LibraryPath, LibraryUser from photonix.photos.utils.db import record_photo from photonix.photos.u...
import os from pathlib import Path from django.contrib.auth import get_user_model from django.core.management.base import BaseCommand from django.db.utils import IntegrityError from photonix.photos.models import Library, LibraryPath, LibraryUser from photonix.photos.utils.db import record_photo from photonix.photos.u...
<commit_before>import os from pathlib import Path from django.contrib.auth import get_user_model from django.core.management.base import BaseCommand from django.db.utils import IntegrityError from photonix.photos.models import Library, LibraryPath, LibraryUser from photonix.photos.utils.db import record_photo from ph...
import os from pathlib import Path from django.contrib.auth import get_user_model from django.core.management.base import BaseCommand from django.db.utils import IntegrityError from photonix.photos.models import Library, LibraryPath, LibraryUser from photonix.photos.utils.db import record_photo from photonix.photos.u...
import os from pathlib import Path from django.contrib.auth import get_user_model from django.core.management.base import BaseCommand from django.db.utils import IntegrityError from photonix.photos.models import Library, LibraryPath, LibraryUser from photonix.photos.utils.db import record_photo from photonix.photos.u...
<commit_before>import os from pathlib import Path from django.contrib.auth import get_user_model from django.core.management.base import BaseCommand from django.db.utils import IntegrityError from photonix.photos.models import Library, LibraryPath, LibraryUser from photonix.photos.utils.db import record_photo from ph...
93756f6f72d9f797c058bedcb3d6d7546a5a83f3
server/management/commands/friendly_model_name.py
server/management/commands/friendly_model_name.py
''' Retrieves the firendly model name for machines that don't have one yet. ''' from django.core.management.base import BaseCommand, CommandError from server.models import Machine from django.db.models import Q import server.utils as utils class Command(BaseCommand): help = 'Retrieves friendly model names for ma...
"""Retrieves the friendly model name for machines that don't have one yet.""" from django.core.management.base import BaseCommand, CommandError from django.db.models import Q import server.utils as utils from server.models import Machine class Command(BaseCommand): help = 'Retrieves friendly model names for mac...
Fix missing paren, imports, spelling.
Fix missing paren, imports, spelling.
Python
apache-2.0
sheagcraig/sal,salopensource/sal,salopensource/sal,salopensource/sal,sheagcraig/sal,sheagcraig/sal,sheagcraig/sal,salopensource/sal
''' Retrieves the firendly model name for machines that don't have one yet. ''' from django.core.management.base import BaseCommand, CommandError from server.models import Machine from django.db.models import Q import server.utils as utils class Command(BaseCommand): help = 'Retrieves friendly model names for ma...
"""Retrieves the friendly model name for machines that don't have one yet.""" from django.core.management.base import BaseCommand, CommandError from django.db.models import Q import server.utils as utils from server.models import Machine class Command(BaseCommand): help = 'Retrieves friendly model names for mac...
<commit_before>''' Retrieves the firendly model name for machines that don't have one yet. ''' from django.core.management.base import BaseCommand, CommandError from server.models import Machine from django.db.models import Q import server.utils as utils class Command(BaseCommand): help = 'Retrieves friendly mod...
"""Retrieves the friendly model name for machines that don't have one yet.""" from django.core.management.base import BaseCommand, CommandError from django.db.models import Q import server.utils as utils from server.models import Machine class Command(BaseCommand): help = 'Retrieves friendly model names for mac...
''' Retrieves the firendly model name for machines that don't have one yet. ''' from django.core.management.base import BaseCommand, CommandError from server.models import Machine from django.db.models import Q import server.utils as utils class Command(BaseCommand): help = 'Retrieves friendly model names for ma...
<commit_before>''' Retrieves the firendly model name for machines that don't have one yet. ''' from django.core.management.base import BaseCommand, CommandError from server.models import Machine from django.db.models import Q import server.utils as utils class Command(BaseCommand): help = 'Retrieves friendly mod...
ab41dfa53325ee90032c4ed1b2e6e3c90b808ecf
contact/views.py
contact/views.py
import binascii from django.shortcuts import render, redirect, get_object_or_404 from django.contrib import messages from django.db import IntegrityError, transaction from django.conf import settings from django.template.loader import render_to_string from django.core.mail import send_mail from django.core.urlresolve...
import binascii from django.shortcuts import render from django.contrib import messages from django.core.mail import send_mail from contact.forms import ContactForm # Create your views here. def contact(request): form_init = { 'username': request.user.username, 'ip_address': request.ME...
Clean up import, pre-fill email address
Clean up import, pre-fill email address If user is logged in, their email address is automatically filled in for them. Also fixed an error with the messages usage, namely I forgot to pass in the request object.
Python
mit
Kromey/akwriters,Kromey/akwriters,Kromey/fbxnano,Kromey/fbxnano,Kromey/fbxnano,Kromey/fbxnano,Kromey/akwriters,Kromey/akwriters
import binascii from django.shortcuts import render, redirect, get_object_or_404 from django.contrib import messages from django.db import IntegrityError, transaction from django.conf import settings from django.template.loader import render_to_string from django.core.mail import send_mail from django.core.urlresolve...
import binascii from django.shortcuts import render from django.contrib import messages from django.core.mail import send_mail from contact.forms import ContactForm # Create your views here. def contact(request): form_init = { 'username': request.user.username, 'ip_address': request.ME...
<commit_before>import binascii from django.shortcuts import render, redirect, get_object_or_404 from django.contrib import messages from django.db import IntegrityError, transaction from django.conf import settings from django.template.loader import render_to_string from django.core.mail import send_mail from django....
import binascii from django.shortcuts import render from django.contrib import messages from django.core.mail import send_mail from contact.forms import ContactForm # Create your views here. def contact(request): form_init = { 'username': request.user.username, 'ip_address': request.ME...
import binascii from django.shortcuts import render, redirect, get_object_or_404 from django.contrib import messages from django.db import IntegrityError, transaction from django.conf import settings from django.template.loader import render_to_string from django.core.mail import send_mail from django.core.urlresolve...
<commit_before>import binascii from django.shortcuts import render, redirect, get_object_or_404 from django.contrib import messages from django.db import IntegrityError, transaction from django.conf import settings from django.template.loader import render_to_string from django.core.mail import send_mail from django....
0f4dc67fb9522801f010853d25939c0ef531f8ff
lbrynet/__init__.py
lbrynet/__init__.py
import logging __version__ = "0.16.0rc7" version = tuple(__version__.split('.')) logging.getLogger(__name__).addHandler(logging.NullHandler())
import logging __version__ = "0.16.0rc8" version = tuple(__version__.split('.')) logging.getLogger(__name__).addHandler(logging.NullHandler())
Bump version 0.16.0rc7 --> 0.16.0rc8
Bump version 0.16.0rc7 --> 0.16.0rc8 Signed-off-by: Jack Robison <[email protected]>
Python
mit
lbryio/lbry,lbryio/lbry,lbryio/lbry
import logging __version__ = "0.16.0rc7" version = tuple(__version__.split('.')) logging.getLogger(__name__).addHandler(logging.NullHandler()) Bump version 0.16.0rc7 --> 0.16.0rc8 Signed-off-by: Jack Robison <[email protected]>
import logging __version__ = "0.16.0rc8" version = tuple(__version__.split('.')) logging.getLogger(__name__).addHandler(logging.NullHandler())
<commit_before>import logging __version__ = "0.16.0rc7" version = tuple(__version__.split('.')) logging.getLogger(__name__).addHandler(logging.NullHandler()) <commit_msg>Bump version 0.16.0rc7 --> 0.16.0rc8 Signed-off-by: Jack Robison <[email protected]><commit_after>
import logging __version__ = "0.16.0rc8" version = tuple(__version__.split('.')) logging.getLogger(__name__).addHandler(logging.NullHandler())
import logging __version__ = "0.16.0rc7" version = tuple(__version__.split('.')) logging.getLogger(__name__).addHandler(logging.NullHandler()) Bump version 0.16.0rc7 --> 0.16.0rc8 Signed-off-by: Jack Robison <[email protected]>import logging __version__ = "0.16.0rc8" version = tuple(_...
<commit_before>import logging __version__ = "0.16.0rc7" version = tuple(__version__.split('.')) logging.getLogger(__name__).addHandler(logging.NullHandler()) <commit_msg>Bump version 0.16.0rc7 --> 0.16.0rc8 Signed-off-by: Jack Robison <[email protected]><commit_after>import logging __...
7641293947dba9f721cdd0364a638b9f7714033a
examples/pax_mininet_node.py
examples/pax_mininet_node.py
# coding: latin-1 """ pax_mininet_node.py: Defines PaxNode which allows Pax to behave as the sole packet hander on a node. """ from mininet.node import Node from mininet.log import info, warn class PaxNode( Node ): "PaxNode: A node which allows Pax to behave as the sole packet hander on that node." def __in...
# coding: latin-1 """ pax_mininet_node.py: Defines PaxNode which allows Pax to behave as the sole packet hander on a node. """ from mininet.node import Node from mininet.log import info, warn class PaxNode( Node ): "PaxNode: A node which allows Pax to behave as the sole packet hander on that node." def __in...
Fix bug in Pax Mininet node class
Fix bug in Pax Mininet node class
Python
apache-2.0
niksu/pax,TMVector/pax,niksu/pax,niksu/pax,TMVector/pax
# coding: latin-1 """ pax_mininet_node.py: Defines PaxNode which allows Pax to behave as the sole packet hander on a node. """ from mininet.node import Node from mininet.log import info, warn class PaxNode( Node ): "PaxNode: A node which allows Pax to behave as the sole packet hander on that node." def __in...
# coding: latin-1 """ pax_mininet_node.py: Defines PaxNode which allows Pax to behave as the sole packet hander on a node. """ from mininet.node import Node from mininet.log import info, warn class PaxNode( Node ): "PaxNode: A node which allows Pax to behave as the sole packet hander on that node." def __in...
<commit_before># coding: latin-1 """ pax_mininet_node.py: Defines PaxNode which allows Pax to behave as the sole packet hander on a node. """ from mininet.node import Node from mininet.log import info, warn class PaxNode( Node ): "PaxNode: A node which allows Pax to behave as the sole packet hander on that node....
# coding: latin-1 """ pax_mininet_node.py: Defines PaxNode which allows Pax to behave as the sole packet hander on a node. """ from mininet.node import Node from mininet.log import info, warn class PaxNode( Node ): "PaxNode: A node which allows Pax to behave as the sole packet hander on that node." def __in...
# coding: latin-1 """ pax_mininet_node.py: Defines PaxNode which allows Pax to behave as the sole packet hander on a node. """ from mininet.node import Node from mininet.log import info, warn class PaxNode( Node ): "PaxNode: A node which allows Pax to behave as the sole packet hander on that node." def __in...
<commit_before># coding: latin-1 """ pax_mininet_node.py: Defines PaxNode which allows Pax to behave as the sole packet hander on a node. """ from mininet.node import Node from mininet.log import info, warn class PaxNode( Node ): "PaxNode: A node which allows Pax to behave as the sole packet hander on that node....
bc979e995162c441cd37b3368154e5ed842694f5
cartoframes/core/logger.py
cartoframes/core/logger.py
import sys import logging def init_logger(): logging.basicConfig( stream=sys.stdout, format='%(asctime)s - %(levelname)s - %(message)s', level=logging.INFO) return logging.getLogger('CARTOframes') def set_log_level(level): """Set the level of the log in the library. Args: ...
import sys import logging def init_logger(formatter): handler = logging.StreamHandler(sys.stdout) handler.setFormatter(logging.Formatter(formatter)) logging.basicConfig( level=logging.INFO, handlers=[handler]) return handler, logging.getLogger('CARTOframes') handler, log = init_logge...
Apply long log formatter only in debug
Apply long log formatter only in debug
Python
bsd-3-clause
CartoDB/cartoframes,CartoDB/cartoframes
import sys import logging def init_logger(): logging.basicConfig( stream=sys.stdout, format='%(asctime)s - %(levelname)s - %(message)s', level=logging.INFO) return logging.getLogger('CARTOframes') def set_log_level(level): """Set the level of the log in the library. Args: ...
import sys import logging def init_logger(formatter): handler = logging.StreamHandler(sys.stdout) handler.setFormatter(logging.Formatter(formatter)) logging.basicConfig( level=logging.INFO, handlers=[handler]) return handler, logging.getLogger('CARTOframes') handler, log = init_logge...
<commit_before>import sys import logging def init_logger(): logging.basicConfig( stream=sys.stdout, format='%(asctime)s - %(levelname)s - %(message)s', level=logging.INFO) return logging.getLogger('CARTOframes') def set_log_level(level): """Set the level of the log in the library...
import sys import logging def init_logger(formatter): handler = logging.StreamHandler(sys.stdout) handler.setFormatter(logging.Formatter(formatter)) logging.basicConfig( level=logging.INFO, handlers=[handler]) return handler, logging.getLogger('CARTOframes') handler, log = init_logge...
import sys import logging def init_logger(): logging.basicConfig( stream=sys.stdout, format='%(asctime)s - %(levelname)s - %(message)s', level=logging.INFO) return logging.getLogger('CARTOframes') def set_log_level(level): """Set the level of the log in the library. Args: ...
<commit_before>import sys import logging def init_logger(): logging.basicConfig( stream=sys.stdout, format='%(asctime)s - %(levelname)s - %(message)s', level=logging.INFO) return logging.getLogger('CARTOframes') def set_log_level(level): """Set the level of the log in the library...
09a78126595ff355f59f70e4f381c3e2c4bef045
apps/innovate/tests/test_views.py
apps/innovate/tests/test_views.py
from django.core.urlresolvers import reverse from django.test import Client from projects.models import Project from innovate import urls def test_routes(): c = Client() for pattern in urls.urlpatterns: response = c.get(reverse(pattern.name)) assert response.status_code == 301 assert ...
from django.core.urlresolvers import reverse from django.test import Client from django.test.client import RequestFactory from projects.models import Project from innovate import urls from innovate.views import handle404, handle500 def test_routes(): c = Client() for pattern in urls.urlpatterns: resp...
Add tests for the 404 and 500 error handlers.
Add tests for the 404 and 500 error handlers.
Python
bsd-3-clause
mozilla/mozilla-ignite,mozilla/mozilla-ignite,mozilla/mozilla-ignite,mozilla/mozilla-ignite
from django.core.urlresolvers import reverse from django.test import Client from projects.models import Project from innovate import urls def test_routes(): c = Client() for pattern in urls.urlpatterns: response = c.get(reverse(pattern.name)) assert response.status_code == 301 assert ...
from django.core.urlresolvers import reverse from django.test import Client from django.test.client import RequestFactory from projects.models import Project from innovate import urls from innovate.views import handle404, handle500 def test_routes(): c = Client() for pattern in urls.urlpatterns: resp...
<commit_before>from django.core.urlresolvers import reverse from django.test import Client from projects.models import Project from innovate import urls def test_routes(): c = Client() for pattern in urls.urlpatterns: response = c.get(reverse(pattern.name)) assert response.status_code == 301 ...
from django.core.urlresolvers import reverse from django.test import Client from django.test.client import RequestFactory from projects.models import Project from innovate import urls from innovate.views import handle404, handle500 def test_routes(): c = Client() for pattern in urls.urlpatterns: resp...
from django.core.urlresolvers import reverse from django.test import Client from projects.models import Project from innovate import urls def test_routes(): c = Client() for pattern in urls.urlpatterns: response = c.get(reverse(pattern.name)) assert response.status_code == 301 assert ...
<commit_before>from django.core.urlresolvers import reverse from django.test import Client from projects.models import Project from innovate import urls def test_routes(): c = Client() for pattern in urls.urlpatterns: response = c.get(reverse(pattern.name)) assert response.status_code == 301 ...
536746eaf35f4a2899a747bfe0b1e8918f9ec8c9
httoop/header/__init__.py
httoop/header/__init__.py
# -*- coding: utf-8 -*- """HTTP headers .. seealso:: :rfc:`2616#section-2.2` .. seealso:: :rfc:`2616#section-4.2` .. seealso:: :rfc:`2616#section-14` """ __all__ = ['Headers'] # FIXME: python3? # TODO: add a MAXIMUM of 500 headers? import inspect from httoop.header.element import HEADER, HeaderElement, HeaderTyp...
# -*- coding: utf-8 -*- """HTTP headers .. seealso:: :rfc:`2616#section-2.2` .. seealso:: :rfc:`2616#section-4.2` .. seealso:: :rfc:`2616#section-14` """ __all__ = ['Headers'] # FIXME: python3? # TODO: add a MAXIMUM of 500 headers? import inspect from httoop.header.element import HEADER, HeaderElement, HeaderTyp...
Add all header elements to httoop.header
Add all header elements to httoop.header
Python
mit
spaceone/httoop,spaceone/httoop,spaceone/httoop
# -*- coding: utf-8 -*- """HTTP headers .. seealso:: :rfc:`2616#section-2.2` .. seealso:: :rfc:`2616#section-4.2` .. seealso:: :rfc:`2616#section-14` """ __all__ = ['Headers'] # FIXME: python3? # TODO: add a MAXIMUM of 500 headers? import inspect from httoop.header.element import HEADER, HeaderElement, HeaderTyp...
# -*- coding: utf-8 -*- """HTTP headers .. seealso:: :rfc:`2616#section-2.2` .. seealso:: :rfc:`2616#section-4.2` .. seealso:: :rfc:`2616#section-14` """ __all__ = ['Headers'] # FIXME: python3? # TODO: add a MAXIMUM of 500 headers? import inspect from httoop.header.element import HEADER, HeaderElement, HeaderTyp...
<commit_before># -*- coding: utf-8 -*- """HTTP headers .. seealso:: :rfc:`2616#section-2.2` .. seealso:: :rfc:`2616#section-4.2` .. seealso:: :rfc:`2616#section-14` """ __all__ = ['Headers'] # FIXME: python3? # TODO: add a MAXIMUM of 500 headers? import inspect from httoop.header.element import HEADER, HeaderEle...
# -*- coding: utf-8 -*- """HTTP headers .. seealso:: :rfc:`2616#section-2.2` .. seealso:: :rfc:`2616#section-4.2` .. seealso:: :rfc:`2616#section-14` """ __all__ = ['Headers'] # FIXME: python3? # TODO: add a MAXIMUM of 500 headers? import inspect from httoop.header.element import HEADER, HeaderElement, HeaderTyp...
# -*- coding: utf-8 -*- """HTTP headers .. seealso:: :rfc:`2616#section-2.2` .. seealso:: :rfc:`2616#section-4.2` .. seealso:: :rfc:`2616#section-14` """ __all__ = ['Headers'] # FIXME: python3? # TODO: add a MAXIMUM of 500 headers? import inspect from httoop.header.element import HEADER, HeaderElement, HeaderTyp...
<commit_before># -*- coding: utf-8 -*- """HTTP headers .. seealso:: :rfc:`2616#section-2.2` .. seealso:: :rfc:`2616#section-4.2` .. seealso:: :rfc:`2616#section-14` """ __all__ = ['Headers'] # FIXME: python3? # TODO: add a MAXIMUM of 500 headers? import inspect from httoop.header.element import HEADER, HeaderEle...
fe451116ffcb12621600310b6d4ca9b6316494ff
scripts/zpe.py
scripts/zpe.py
import logging from vaspy.iter import OutCar _logger = logging.getLogger("vaspy.script") if "__main__" == __name__: outcar = OutCar() poscar = outcar.poscar freq_types = outcar.freq_types # Frequency info. _logger.info("{:<10s}{:<20s}".format("atom", "freq_type")) _logger.info("-"*25) i...
import logging from vaspy.iter import OutCar _logger = logging.getLogger("vaspy.script") if "__main__" == __name__: outcar = OutCar() poscar = outcar.poscar freq_types = outcar.freq_types # Frequency info. _logger.info("{:<10s}{:<10s}{:<20s}".format("atom", "type", "freq_type")) _logger.info...
Add atom type info output.
Add atom type info output.
Python
mit
PytLab/VASPy,PytLab/VASPy
import logging from vaspy.iter import OutCar _logger = logging.getLogger("vaspy.script") if "__main__" == __name__: outcar = OutCar() poscar = outcar.poscar freq_types = outcar.freq_types # Frequency info. _logger.info("{:<10s}{:<20s}".format("atom", "freq_type")) _logger.info("-"*25) i...
import logging from vaspy.iter import OutCar _logger = logging.getLogger("vaspy.script") if "__main__" == __name__: outcar = OutCar() poscar = outcar.poscar freq_types = outcar.freq_types # Frequency info. _logger.info("{:<10s}{:<10s}{:<20s}".format("atom", "type", "freq_type")) _logger.info...
<commit_before>import logging from vaspy.iter import OutCar _logger = logging.getLogger("vaspy.script") if "__main__" == __name__: outcar = OutCar() poscar = outcar.poscar freq_types = outcar.freq_types # Frequency info. _logger.info("{:<10s}{:<20s}".format("atom", "freq_type")) _logger.info...
import logging from vaspy.iter import OutCar _logger = logging.getLogger("vaspy.script") if "__main__" == __name__: outcar = OutCar() poscar = outcar.poscar freq_types = outcar.freq_types # Frequency info. _logger.info("{:<10s}{:<10s}{:<20s}".format("atom", "type", "freq_type")) _logger.info...
import logging from vaspy.iter import OutCar _logger = logging.getLogger("vaspy.script") if "__main__" == __name__: outcar = OutCar() poscar = outcar.poscar freq_types = outcar.freq_types # Frequency info. _logger.info("{:<10s}{:<20s}".format("atom", "freq_type")) _logger.info("-"*25) i...
<commit_before>import logging from vaspy.iter import OutCar _logger = logging.getLogger("vaspy.script") if "__main__" == __name__: outcar = OutCar() poscar = outcar.poscar freq_types = outcar.freq_types # Frequency info. _logger.info("{:<10s}{:<20s}".format("atom", "freq_type")) _logger.info...
24fe59c0f5df9343337549eb4495d6ca0e1e58d1
iconizer/iconizer_main.py
iconizer/iconizer_main.py
#!/usr/bin/env python # -*- coding: utf-8 -*- from iconizer.console.launcher import CrossGuiLauncher from iconizer.qtconsole.PyQtGuiFactory import PyQtGuiFactory class Iconizer(object): def __init__(self): self.server = CrossGuiLauncher(PyQtGuiFactory()) self.server.start() self.server.sta...
#!/usr/bin/env python # -*- coding: utf-8 -*- from iconizer.console.launcher import CrossGuiLauncher from iconizer.qtconsole.PyQtGuiFactory import PyQtGuiFactory class Iconizer(object): def start_gui(self): self.server = CrossGuiLauncher(PyQtGuiFactory()) self.server.start() self.server.st...
Move GUI creation out of __init__ function.
Move GUI creation out of __init__ function.
Python
bsd-3-clause
weijia/iconizer
#!/usr/bin/env python # -*- coding: utf-8 -*- from iconizer.console.launcher import CrossGuiLauncher from iconizer.qtconsole.PyQtGuiFactory import PyQtGuiFactory class Iconizer(object): def __init__(self): self.server = CrossGuiLauncher(PyQtGuiFactory()) self.server.start() self.server.sta...
#!/usr/bin/env python # -*- coding: utf-8 -*- from iconizer.console.launcher import CrossGuiLauncher from iconizer.qtconsole.PyQtGuiFactory import PyQtGuiFactory class Iconizer(object): def start_gui(self): self.server = CrossGuiLauncher(PyQtGuiFactory()) self.server.start() self.server.st...
<commit_before>#!/usr/bin/env python # -*- coding: utf-8 -*- from iconizer.console.launcher import CrossGuiLauncher from iconizer.qtconsole.PyQtGuiFactory import PyQtGuiFactory class Iconizer(object): def __init__(self): self.server = CrossGuiLauncher(PyQtGuiFactory()) self.server.start() ...
#!/usr/bin/env python # -*- coding: utf-8 -*- from iconizer.console.launcher import CrossGuiLauncher from iconizer.qtconsole.PyQtGuiFactory import PyQtGuiFactory class Iconizer(object): def start_gui(self): self.server = CrossGuiLauncher(PyQtGuiFactory()) self.server.start() self.server.st...
#!/usr/bin/env python # -*- coding: utf-8 -*- from iconizer.console.launcher import CrossGuiLauncher from iconizer.qtconsole.PyQtGuiFactory import PyQtGuiFactory class Iconizer(object): def __init__(self): self.server = CrossGuiLauncher(PyQtGuiFactory()) self.server.start() self.server.sta...
<commit_before>#!/usr/bin/env python # -*- coding: utf-8 -*- from iconizer.console.launcher import CrossGuiLauncher from iconizer.qtconsole.PyQtGuiFactory import PyQtGuiFactory class Iconizer(object): def __init__(self): self.server = CrossGuiLauncher(PyQtGuiFactory()) self.server.start() ...
3b5feba4141dab974f7e6e343af76694e49246d4
app/settings/prod.py
app/settings/prod.py
import dj_database_url from .default import * DEBUG = False SECRET_KEY = os.getenv('DJANGO_SECRET_KEY', None) ALLOWED_HOSTS = ['agendaodonto.herokuapp.com'] DATABASES = {'default': dj_database_url.config()} CORS_ORIGIN_WHITELIST = ( 'https://agendaodonto.com', 'https://backend.agendaodonto.com', ) DJOSER[...
import dj_database_url from .default import * DEBUG = False SECRET_KEY = os.getenv('DJANGO_SECRET_KEY', None) ALLOWED_HOSTS = ['agendaodonto.herokuapp.com'] DATABASES = {'default': dj_database_url.config()} CORS_ORIGIN_WHITELIST = ( 'agendaodonto.com', 'backend.agendaodonto.com', ) DJOSER['DOMAIN'] = 'age...
Remove the scheme from the domain
fix: Remove the scheme from the domain
Python
agpl-3.0
agendaodonto/server,agendaodonto/server
import dj_database_url from .default import * DEBUG = False SECRET_KEY = os.getenv('DJANGO_SECRET_KEY', None) ALLOWED_HOSTS = ['agendaodonto.herokuapp.com'] DATABASES = {'default': dj_database_url.config()} CORS_ORIGIN_WHITELIST = ( 'https://agendaodonto.com', 'https://backend.agendaodonto.com', ) DJOSER[...
import dj_database_url from .default import * DEBUG = False SECRET_KEY = os.getenv('DJANGO_SECRET_KEY', None) ALLOWED_HOSTS = ['agendaodonto.herokuapp.com'] DATABASES = {'default': dj_database_url.config()} CORS_ORIGIN_WHITELIST = ( 'agendaodonto.com', 'backend.agendaodonto.com', ) DJOSER['DOMAIN'] = 'age...
<commit_before>import dj_database_url from .default import * DEBUG = False SECRET_KEY = os.getenv('DJANGO_SECRET_KEY', None) ALLOWED_HOSTS = ['agendaodonto.herokuapp.com'] DATABASES = {'default': dj_database_url.config()} CORS_ORIGIN_WHITELIST = ( 'https://agendaodonto.com', 'https://backend.agendaodonto.c...
import dj_database_url from .default import * DEBUG = False SECRET_KEY = os.getenv('DJANGO_SECRET_KEY', None) ALLOWED_HOSTS = ['agendaodonto.herokuapp.com'] DATABASES = {'default': dj_database_url.config()} CORS_ORIGIN_WHITELIST = ( 'agendaodonto.com', 'backend.agendaodonto.com', ) DJOSER['DOMAIN'] = 'age...
import dj_database_url from .default import * DEBUG = False SECRET_KEY = os.getenv('DJANGO_SECRET_KEY', None) ALLOWED_HOSTS = ['agendaodonto.herokuapp.com'] DATABASES = {'default': dj_database_url.config()} CORS_ORIGIN_WHITELIST = ( 'https://agendaodonto.com', 'https://backend.agendaodonto.com', ) DJOSER[...
<commit_before>import dj_database_url from .default import * DEBUG = False SECRET_KEY = os.getenv('DJANGO_SECRET_KEY', None) ALLOWED_HOSTS = ['agendaodonto.herokuapp.com'] DATABASES = {'default': dj_database_url.config()} CORS_ORIGIN_WHITELIST = ( 'https://agendaodonto.com', 'https://backend.agendaodonto.c...
dad3eb5c1b0e188671884e97260422a90bdd5c21
gitcommitautosave.py
gitcommitautosave.py
"""Git Commit Auto Save. Sublime Text 3 package to auto save commit messages when the window is closed. This allows the user to close the window without having to save before, or having to deal with the "Save File" popup. """ import sublime_plugin class GitCommitAutoSave(sublime_plugin.EventListener): def on_load(s...
"""Git Commit Auto Save. Sublime Text 3 package to auto save commit messages when the window is closed. This allows the user to close the window without having to save before, or having to deal with the "Save File" popup. """ import sublime_plugin class GitCommitAutoSave(sublime_plugin.EventListener): def on_load(s...
Fix 'NoneType' object has no attribute 'endswith'
Fix 'NoneType' object has no attribute 'endswith'
Python
mit
aristidesfl/sublime-git-commit-message-auto-save
"""Git Commit Auto Save. Sublime Text 3 package to auto save commit messages when the window is closed. This allows the user to close the window without having to save before, or having to deal with the "Save File" popup. """ import sublime_plugin class GitCommitAutoSave(sublime_plugin.EventListener): def on_load(s...
"""Git Commit Auto Save. Sublime Text 3 package to auto save commit messages when the window is closed. This allows the user to close the window without having to save before, or having to deal with the "Save File" popup. """ import sublime_plugin class GitCommitAutoSave(sublime_plugin.EventListener): def on_load(s...
<commit_before>"""Git Commit Auto Save. Sublime Text 3 package to auto save commit messages when the window is closed. This allows the user to close the window without having to save before, or having to deal with the "Save File" popup. """ import sublime_plugin class GitCommitAutoSave(sublime_plugin.EventListener):...
"""Git Commit Auto Save. Sublime Text 3 package to auto save commit messages when the window is closed. This allows the user to close the window without having to save before, or having to deal with the "Save File" popup. """ import sublime_plugin class GitCommitAutoSave(sublime_plugin.EventListener): def on_load(s...
"""Git Commit Auto Save. Sublime Text 3 package to auto save commit messages when the window is closed. This allows the user to close the window without having to save before, or having to deal with the "Save File" popup. """ import sublime_plugin class GitCommitAutoSave(sublime_plugin.EventListener): def on_load(s...
<commit_before>"""Git Commit Auto Save. Sublime Text 3 package to auto save commit messages when the window is closed. This allows the user to close the window without having to save before, or having to deal with the "Save File" popup. """ import sublime_plugin class GitCommitAutoSave(sublime_plugin.EventListener):...
c300453131360ef9c48586f48287d6c24b3a94a2
jsonrpcclient/__init__.py
jsonrpcclient/__init__.py
"""__init__.py""" from .request import Request, Notification
"""__init__.py""" from .request import Request, Notification from .http_client import HTTPClient def request(endpoint, method, *args, **kwargs): """ A convenience function. Instantiates and executes a HTTPClient request, then throws it away. """ return HTTPClient(endpoint).request(method, *args, *...
Add convenience functions 'request' and 'notify'
Add convenience functions 'request' and 'notify' Closes #54
Python
mit
bcb/jsonrpcclient
"""__init__.py""" from .request import Request, Notification Add convenience functions 'request' and 'notify' Closes #54
"""__init__.py""" from .request import Request, Notification from .http_client import HTTPClient def request(endpoint, method, *args, **kwargs): """ A convenience function. Instantiates and executes a HTTPClient request, then throws it away. """ return HTTPClient(endpoint).request(method, *args, *...
<commit_before>"""__init__.py""" from .request import Request, Notification <commit_msg>Add convenience functions 'request' and 'notify' Closes #54<commit_after>
"""__init__.py""" from .request import Request, Notification from .http_client import HTTPClient def request(endpoint, method, *args, **kwargs): """ A convenience function. Instantiates and executes a HTTPClient request, then throws it away. """ return HTTPClient(endpoint).request(method, *args, *...
"""__init__.py""" from .request import Request, Notification Add convenience functions 'request' and 'notify' Closes #54"""__init__.py""" from .request import Request, Notification from .http_client import HTTPClient def request(endpoint, method, *args, **kwargs): """ A convenience function. Instantiates and...
<commit_before>"""__init__.py""" from .request import Request, Notification <commit_msg>Add convenience functions 'request' and 'notify' Closes #54<commit_after>"""__init__.py""" from .request import Request, Notification from .http_client import HTTPClient def request(endpoint, method, *args, **kwargs): """ ...
aecaecfa20caba28af1e8117ffc14eeb6460872e
deployment/config.py
deployment/config.py
class Azure: resource_group = "MajavaShakki" location = "northeurope" cosmosdb_name = f"{resource_group}mongo".lower() plan_name = f"{resource_group}Plan" site_name = f"{resource_group}Site" class Mongo: database_name = "Majavashakki" collection_throughput = 400 system_indexes_collection = "undefined" ...
class Azure: resource_group = "MajavaShakki" location = "northeurope" cosmosdb_name = f"{resource_group}mongo".lower() plan_name = f"{resource_group}Plan" site_name = f"{resource_group}Site" class Mongo: database_name = "Majavashakki" collection_throughput = 400 system_indexes_collection = "undefined" ...
Configure throughput for games collection
Configure throughput for games collection The collection gamemodels should be deleted when it is no longer in use
Python
mit
Majavapaja/Mursushakki,Majavapaja/Mursushakki,Majavapaja/Mursushakki,Majavapaja/Mursushakki,Majavapaja/Mursushakki,Majavapaja/Mursushakki
class Azure: resource_group = "MajavaShakki" location = "northeurope" cosmosdb_name = f"{resource_group}mongo".lower() plan_name = f"{resource_group}Plan" site_name = f"{resource_group}Site" class Mongo: database_name = "Majavashakki" collection_throughput = 400 system_indexes_collection = "undefined" ...
class Azure: resource_group = "MajavaShakki" location = "northeurope" cosmosdb_name = f"{resource_group}mongo".lower() plan_name = f"{resource_group}Plan" site_name = f"{resource_group}Site" class Mongo: database_name = "Majavashakki" collection_throughput = 400 system_indexes_collection = "undefined" ...
<commit_before>class Azure: resource_group = "MajavaShakki" location = "northeurope" cosmosdb_name = f"{resource_group}mongo".lower() plan_name = f"{resource_group}Plan" site_name = f"{resource_group}Site" class Mongo: database_name = "Majavashakki" collection_throughput = 400 system_indexes_collection...
class Azure: resource_group = "MajavaShakki" location = "northeurope" cosmosdb_name = f"{resource_group}mongo".lower() plan_name = f"{resource_group}Plan" site_name = f"{resource_group}Site" class Mongo: database_name = "Majavashakki" collection_throughput = 400 system_indexes_collection = "undefined" ...
class Azure: resource_group = "MajavaShakki" location = "northeurope" cosmosdb_name = f"{resource_group}mongo".lower() plan_name = f"{resource_group}Plan" site_name = f"{resource_group}Site" class Mongo: database_name = "Majavashakki" collection_throughput = 400 system_indexes_collection = "undefined" ...
<commit_before>class Azure: resource_group = "MajavaShakki" location = "northeurope" cosmosdb_name = f"{resource_group}mongo".lower() plan_name = f"{resource_group}Plan" site_name = f"{resource_group}Site" class Mongo: database_name = "Majavashakki" collection_throughput = 400 system_indexes_collection...
91b9e5d71c323be2e5e0d1aa16e47cc49d45acc4
likes/middleware.py
likes/middleware.py
try: from hashlib import md5 except ImportError: from md5 import md5 from django.http import HttpResponseBadRequest from secretballot.middleware import SecretBallotIpUseragentMiddleware class SecretBallotUserIpUseragentMiddleware(SecretBallotIpUseragentMiddleware): def generate_token(self, request): ...
try: from hashlib import md5 except ImportError: from md5 import md5 from django.http import HttpResponseBadRequest from secretballot.middleware import SecretBallotIpUseragentMiddleware class SecretBallotUserIpUseragentMiddleware(SecretBallotIpUseragentMiddleware): def generate_token(self, request): ...
Fix hashing for Python 3
Fix hashing for Python 3
Python
bsd-3-clause
Afnarel/django-likes,Afnarel/django-likes,Afnarel/django-likes
try: from hashlib import md5 except ImportError: from md5 import md5 from django.http import HttpResponseBadRequest from secretballot.middleware import SecretBallotIpUseragentMiddleware class SecretBallotUserIpUseragentMiddleware(SecretBallotIpUseragentMiddleware): def generate_token(self, request): ...
try: from hashlib import md5 except ImportError: from md5 import md5 from django.http import HttpResponseBadRequest from secretballot.middleware import SecretBallotIpUseragentMiddleware class SecretBallotUserIpUseragentMiddleware(SecretBallotIpUseragentMiddleware): def generate_token(self, request): ...
<commit_before>try: from hashlib import md5 except ImportError: from md5 import md5 from django.http import HttpResponseBadRequest from secretballot.middleware import SecretBallotIpUseragentMiddleware class SecretBallotUserIpUseragentMiddleware(SecretBallotIpUseragentMiddleware): def generate_token(sel...
try: from hashlib import md5 except ImportError: from md5 import md5 from django.http import HttpResponseBadRequest from secretballot.middleware import SecretBallotIpUseragentMiddleware class SecretBallotUserIpUseragentMiddleware(SecretBallotIpUseragentMiddleware): def generate_token(self, request): ...
try: from hashlib import md5 except ImportError: from md5 import md5 from django.http import HttpResponseBadRequest from secretballot.middleware import SecretBallotIpUseragentMiddleware class SecretBallotUserIpUseragentMiddleware(SecretBallotIpUseragentMiddleware): def generate_token(self, request): ...
<commit_before>try: from hashlib import md5 except ImportError: from md5 import md5 from django.http import HttpResponseBadRequest from secretballot.middleware import SecretBallotIpUseragentMiddleware class SecretBallotUserIpUseragentMiddleware(SecretBallotIpUseragentMiddleware): def generate_token(sel...
c62e1b325a536294b3285f8cbcad7d66a415ee23
heat/objects/base.py
heat/objects/base.py
# Copyright 2015 Intel Corp. # # 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 agr...
# Copyright 2015 Intel Corp. # # 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 agr...
Use a weakref for the data object context
Use a weakref for the data object context There are no known circular reference issues caused by storing the context in data objects, but the following changes will refer to data objects in the context, so this change prevents any later issues. Change-Id: I3680e5678003cf339a98fbb7a2b1b387fb2243c0 Related-Bug: #157885...
Python
apache-2.0
noironetworks/heat,openstack/heat,openstack/heat,cwolferh/heat-scratch,noironetworks/heat,cwolferh/heat-scratch
# Copyright 2015 Intel Corp. # # 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 agr...
# Copyright 2015 Intel Corp. # # 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 agr...
<commit_before># Copyright 2015 Intel Corp. # # 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 applic...
# Copyright 2015 Intel Corp. # # 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 agr...
# Copyright 2015 Intel Corp. # # 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 agr...
<commit_before># Copyright 2015 Intel Corp. # # 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 applic...
c6dae4cbd8d8dcbcd323526c2811fea9525bcb74
__init__.py
__init__.py
import spyral.memoize import spyral.point import spyral.camera import spyral.util import spyral.sprite import spyral.gui import spyral.scene import spyral._lib import pygame director = scene.Director() def init(): pygame.init() pygame.font.init()
import spyral.memoize import spyral.point import spyral.camera import spyral.util import spyral.sprite import spyral.gui import spyral.scene import spyral._lib import spyral.event import pygame director = scene.Director() def init(): pygame.init() pygame.font.init()
Add an event module import
Add an event module import
Python
lgpl-2.1
platipy/spyral
import spyral.memoize import spyral.point import spyral.camera import spyral.util import spyral.sprite import spyral.gui import spyral.scene import spyral._lib import pygame director = scene.Director() def init(): pygame.init() pygame.font.init()Add an event module import
import spyral.memoize import spyral.point import spyral.camera import spyral.util import spyral.sprite import spyral.gui import spyral.scene import spyral._lib import spyral.event import pygame director = scene.Director() def init(): pygame.init() pygame.font.init()
<commit_before>import spyral.memoize import spyral.point import spyral.camera import spyral.util import spyral.sprite import spyral.gui import spyral.scene import spyral._lib import pygame director = scene.Director() def init(): pygame.init() pygame.font.init()<commit_msg>Add an event module import<commit_aft...
import spyral.memoize import spyral.point import spyral.camera import spyral.util import spyral.sprite import spyral.gui import spyral.scene import spyral._lib import spyral.event import pygame director = scene.Director() def init(): pygame.init() pygame.font.init()
import spyral.memoize import spyral.point import spyral.camera import spyral.util import spyral.sprite import spyral.gui import spyral.scene import spyral._lib import pygame director = scene.Director() def init(): pygame.init() pygame.font.init()Add an event module importimport spyral.memoize import spyral.po...
<commit_before>import spyral.memoize import spyral.point import spyral.camera import spyral.util import spyral.sprite import spyral.gui import spyral.scene import spyral._lib import pygame director = scene.Director() def init(): pygame.init() pygame.font.init()<commit_msg>Add an event module import<commit_aft...
42701f0ba5147bbd1aeeb2871f1b9970bcb7e01e
pygraphc/clustering/ClusterUtility.py
pygraphc/clustering/ClusterUtility.py
from itertools import combinations class ClusterUtility(object): @staticmethod def get_geometric_mean(weights): multiplication = 1 for weight in weights: multiplication = multiplication * weight gmean = 0.0 multiplication = round(multiplication, 5) if multi...
from itertools import combinations class ClusterUtility(object): @staticmethod def get_geometric_mean(weights): multiplication = 1 for weight in weights: multiplication = multiplication * weight gmean = 0.0 if multiplication > 0.0: k = float(len(weights...
Remove round of multiplication result for get_geometric_mean and bug fix get edge weight
Remove round of multiplication result for get_geometric_mean and bug fix get edge weight
Python
mit
studiawan/pygraphc
from itertools import combinations class ClusterUtility(object): @staticmethod def get_geometric_mean(weights): multiplication = 1 for weight in weights: multiplication = multiplication * weight gmean = 0.0 multiplication = round(multiplication, 5) if multi...
from itertools import combinations class ClusterUtility(object): @staticmethod def get_geometric_mean(weights): multiplication = 1 for weight in weights: multiplication = multiplication * weight gmean = 0.0 if multiplication > 0.0: k = float(len(weights...
<commit_before>from itertools import combinations class ClusterUtility(object): @staticmethod def get_geometric_mean(weights): multiplication = 1 for weight in weights: multiplication = multiplication * weight gmean = 0.0 multiplication = round(multiplication, 5) ...
from itertools import combinations class ClusterUtility(object): @staticmethod def get_geometric_mean(weights): multiplication = 1 for weight in weights: multiplication = multiplication * weight gmean = 0.0 if multiplication > 0.0: k = float(len(weights...
from itertools import combinations class ClusterUtility(object): @staticmethod def get_geometric_mean(weights): multiplication = 1 for weight in weights: multiplication = multiplication * weight gmean = 0.0 multiplication = round(multiplication, 5) if multi...
<commit_before>from itertools import combinations class ClusterUtility(object): @staticmethod def get_geometric_mean(weights): multiplication = 1 for weight in weights: multiplication = multiplication * weight gmean = 0.0 multiplication = round(multiplication, 5) ...
039a19032bebd1e6852990f8aacf05042f000070
args.py
args.py
import inspect def argspec_set(func): if not hasattr(func, 'argspec'): func.argspec = inspect.getargspec(func) def argspec_iscompat(func, lenargs): spec = func.argspec minargs = len(spec.args) - len(spec.defaults or ()) maxargs = len(spec.args) if spec.varargs is None else None return lena...
import inspect def argspec_set(func): if not hasattr(func, 'argspec'): func.argspec = inspect.getargspec(func) def argspec_iscompat(func, lenargs): spec = func.argspec minargs = len(spec.args) - len(spec.defaults or ()) maxargs = len(spec.args) if spec.varargs is None else float("infinity") ...
Simplify funcion arg compatibility check
Simplify funcion arg compatibility check
Python
mit
infogulch/pyspades-events
import inspect def argspec_set(func): if not hasattr(func, 'argspec'): func.argspec = inspect.getargspec(func) def argspec_iscompat(func, lenargs): spec = func.argspec minargs = len(spec.args) - len(spec.defaults or ()) maxargs = len(spec.args) if spec.varargs is None else None return lena...
import inspect def argspec_set(func): if not hasattr(func, 'argspec'): func.argspec = inspect.getargspec(func) def argspec_iscompat(func, lenargs): spec = func.argspec minargs = len(spec.args) - len(spec.defaults or ()) maxargs = len(spec.args) if spec.varargs is None else float("infinity") ...
<commit_before>import inspect def argspec_set(func): if not hasattr(func, 'argspec'): func.argspec = inspect.getargspec(func) def argspec_iscompat(func, lenargs): spec = func.argspec minargs = len(spec.args) - len(spec.defaults or ()) maxargs = len(spec.args) if spec.varargs is None else None ...
import inspect def argspec_set(func): if not hasattr(func, 'argspec'): func.argspec = inspect.getargspec(func) def argspec_iscompat(func, lenargs): spec = func.argspec minargs = len(spec.args) - len(spec.defaults or ()) maxargs = len(spec.args) if spec.varargs is None else float("infinity") ...
import inspect def argspec_set(func): if not hasattr(func, 'argspec'): func.argspec = inspect.getargspec(func) def argspec_iscompat(func, lenargs): spec = func.argspec minargs = len(spec.args) - len(spec.defaults or ()) maxargs = len(spec.args) if spec.varargs is None else None return lena...
<commit_before>import inspect def argspec_set(func): if not hasattr(func, 'argspec'): func.argspec = inspect.getargspec(func) def argspec_iscompat(func, lenargs): spec = func.argspec minargs = len(spec.args) - len(spec.defaults or ()) maxargs = len(spec.args) if spec.varargs is None else None ...
bdfc87ff9f9b67f038248052805327278309e558
openacademy/model/openacademy_session.py
openacademy/model/openacademy_session.py
from openerp import fields, models class Session(models.Model): _name = 'openacademy.session' name = fields.Char(required=True) start_date = fields.Date() duration = fields.Float(digits=(6, 2), help="Duration in days") seats = fields.Integer(string="Number of seats") instructor_id = fields.Many2one...
from openerp import fields, models class Session(models.Model): _name = 'openacademy.session' name = fields.Char(required=True) start_date = fields.Date() duration = fields.Float(digits=(6, 2), help="Duration in days") seats = fields.Integer(string="Number of seats") instructor_id = fields.Many2one...
Add domain or and ilike
[REF] openacademy: Add domain or and ilike
Python
apache-2.0
mapuerta/openacademy-proyect
from openerp import fields, models class Session(models.Model): _name = 'openacademy.session' name = fields.Char(required=True) start_date = fields.Date() duration = fields.Float(digits=(6, 2), help="Duration in days") seats = fields.Integer(string="Number of seats") instructor_id = fields.Many2one...
from openerp import fields, models class Session(models.Model): _name = 'openacademy.session' name = fields.Char(required=True) start_date = fields.Date() duration = fields.Float(digits=(6, 2), help="Duration in days") seats = fields.Integer(string="Number of seats") instructor_id = fields.Many2one...
<commit_before> from openerp import fields, models class Session(models.Model): _name = 'openacademy.session' name = fields.Char(required=True) start_date = fields.Date() duration = fields.Float(digits=(6, 2), help="Duration in days") seats = fields.Integer(string="Number of seats") instructor_id = ...
from openerp import fields, models class Session(models.Model): _name = 'openacademy.session' name = fields.Char(required=True) start_date = fields.Date() duration = fields.Float(digits=(6, 2), help="Duration in days") seats = fields.Integer(string="Number of seats") instructor_id = fields.Many2one...
from openerp import fields, models class Session(models.Model): _name = 'openacademy.session' name = fields.Char(required=True) start_date = fields.Date() duration = fields.Float(digits=(6, 2), help="Duration in days") seats = fields.Integer(string="Number of seats") instructor_id = fields.Many2one...
<commit_before> from openerp import fields, models class Session(models.Model): _name = 'openacademy.session' name = fields.Char(required=True) start_date = fields.Date() duration = fields.Float(digits=(6, 2), help="Duration in days") seats = fields.Integer(string="Number of seats") instructor_id = ...
8d50750ae94e2c94059dcbf1009dd46441d44842
__init__.py
__init__.py
# -*- coding: utf-8 -*- from flask import Flask, render_template from flask.ext.mongoengine import MongoEngine, MongoEngineSessionInterface import configparser from .momentjs import momentjs app = Flask(__name__) # Security WTF_CSRF_ENABLED = True app.config['SECRET_KEY'] = '2bN9UUaBpcjrxR' app.jinja_env.globals['mome...
# -*- coding: utf-8 -*- from flask import Flask, render_template from flask.ext.mongoengine import MongoEngine, MongoEngineSessionInterface import configparser from .momentjs import momentjs app = Flask(__name__) # Security WTF_CSRF_ENABLED = True app.config['SECRET_KEY'] = '2bN9UUaBpcjrxR' app.jinja_env.globals['mome...
Update how we set the connection information for MongoDB to support Mongo 3.0.5
Update how we set the connection information for MongoDB to support Mongo 3.0.5 Signed-off-by: Robert Dempsey <[email protected]>
Python
mit
rdempsey/weight-tracker,rdempsey/weight-tracker,rdempsey/weight-tracker
# -*- coding: utf-8 -*- from flask import Flask, render_template from flask.ext.mongoengine import MongoEngine, MongoEngineSessionInterface import configparser from .momentjs import momentjs app = Flask(__name__) # Security WTF_CSRF_ENABLED = True app.config['SECRET_KEY'] = '2bN9UUaBpcjrxR' app.jinja_env.globals['mome...
# -*- coding: utf-8 -*- from flask import Flask, render_template from flask.ext.mongoengine import MongoEngine, MongoEngineSessionInterface import configparser from .momentjs import momentjs app = Flask(__name__) # Security WTF_CSRF_ENABLED = True app.config['SECRET_KEY'] = '2bN9UUaBpcjrxR' app.jinja_env.globals['mome...
<commit_before># -*- coding: utf-8 -*- from flask import Flask, render_template from flask.ext.mongoengine import MongoEngine, MongoEngineSessionInterface import configparser from .momentjs import momentjs app = Flask(__name__) # Security WTF_CSRF_ENABLED = True app.config['SECRET_KEY'] = '2bN9UUaBpcjrxR' app.jinja_en...
# -*- coding: utf-8 -*- from flask import Flask, render_template from flask.ext.mongoengine import MongoEngine, MongoEngineSessionInterface import configparser from .momentjs import momentjs app = Flask(__name__) # Security WTF_CSRF_ENABLED = True app.config['SECRET_KEY'] = '2bN9UUaBpcjrxR' app.jinja_env.globals['mome...
# -*- coding: utf-8 -*- from flask import Flask, render_template from flask.ext.mongoengine import MongoEngine, MongoEngineSessionInterface import configparser from .momentjs import momentjs app = Flask(__name__) # Security WTF_CSRF_ENABLED = True app.config['SECRET_KEY'] = '2bN9UUaBpcjrxR' app.jinja_env.globals['mome...
<commit_before># -*- coding: utf-8 -*- from flask import Flask, render_template from flask.ext.mongoengine import MongoEngine, MongoEngineSessionInterface import configparser from .momentjs import momentjs app = Flask(__name__) # Security WTF_CSRF_ENABLED = True app.config['SECRET_KEY'] = '2bN9UUaBpcjrxR' app.jinja_en...
5057b70a59c1a3c8301928c0297d4012bd96b21a
mapApp/views/index.py
mapApp/views/index.py
from django.shortcuts import render from mapApp.models import Incident, Theft, Hazard, Official, AlertArea from mapApp.forms import IncidentForm, HazardForm, TheftForm, GeofenceForm, EditForm import datetime def index(request, lat=None, lng=None, zoom=None): incidents = Incident.objects.select_related('point').all()...
from django.shortcuts import render from mapApp.models import Incident, Theft, Hazard, Official, AlertArea from mapApp.forms import IncidentForm, HazardForm, TheftForm, GeofenceForm, EditForm import datetime def index(request, lat=None, lng=None, zoom=None): incidents = Incident.objects.select_related('point').all()...
Remove expired hazards from main map
Remove expired hazards from main map
Python
mit
SPARLab/BikeMaps,SPARLab/BikeMaps,SPARLab/BikeMaps
from django.shortcuts import render from mapApp.models import Incident, Theft, Hazard, Official, AlertArea from mapApp.forms import IncidentForm, HazardForm, TheftForm, GeofenceForm, EditForm import datetime def index(request, lat=None, lng=None, zoom=None): incidents = Incident.objects.select_related('point').all()...
from django.shortcuts import render from mapApp.models import Incident, Theft, Hazard, Official, AlertArea from mapApp.forms import IncidentForm, HazardForm, TheftForm, GeofenceForm, EditForm import datetime def index(request, lat=None, lng=None, zoom=None): incidents = Incident.objects.select_related('point').all()...
<commit_before>from django.shortcuts import render from mapApp.models import Incident, Theft, Hazard, Official, AlertArea from mapApp.forms import IncidentForm, HazardForm, TheftForm, GeofenceForm, EditForm import datetime def index(request, lat=None, lng=None, zoom=None): incidents = Incident.objects.select_related...
from django.shortcuts import render from mapApp.models import Incident, Theft, Hazard, Official, AlertArea from mapApp.forms import IncidentForm, HazardForm, TheftForm, GeofenceForm, EditForm import datetime def index(request, lat=None, lng=None, zoom=None): incidents = Incident.objects.select_related('point').all()...
from django.shortcuts import render from mapApp.models import Incident, Theft, Hazard, Official, AlertArea from mapApp.forms import IncidentForm, HazardForm, TheftForm, GeofenceForm, EditForm import datetime def index(request, lat=None, lng=None, zoom=None): incidents = Incident.objects.select_related('point').all()...
<commit_before>from django.shortcuts import render from mapApp.models import Incident, Theft, Hazard, Official, AlertArea from mapApp.forms import IncidentForm, HazardForm, TheftForm, GeofenceForm, EditForm import datetime def index(request, lat=None, lng=None, zoom=None): incidents = Incident.objects.select_related...
19af4b621a50639a0c1156bab1c97c7b827b89a8
django_nose/tools.py
django_nose/tools.py
# vim: tabstop=4 expandtab autoindent shiftwidth=4 fileencoding=utf-8 """ Assertions that sort of follow Python unittest/Django test cases """ from django.test.testcases import TestCase import re ## Python from nose import tools for t in dir(tools): if t.startswith('assert_'): vars()[t] = getattr(tools...
# vim: tabstop=4 expandtab autoindent shiftwidth=4 fileencoding=utf-8 """ Provides Nose and Django test case assert functions """ from django.test.testcases import TestCase import re ## Python from nose import tools for t in dir(tools): if t.startswith('assert_'): vars()[t] = getattr(tools, t) ## Djan...
Make the heading doc string a bit more descriptive
Make the heading doc string a bit more descriptive
Python
bsd-3-clause
brilliant-org/django-nose,franciscoruiz/django-nose,sociateru/django-nose,millerdev/django-nose,fabiosantoscode/django-nose-123-fix,dgladkov/django-nose,aristiden7o/django-nose,krinart/django-nose,aristiden7o/django-nose,krinart/django-nose,fabiosantoscode/django-nose-123-fix,franciscoruiz/django-nose,millerdev/django-...
# vim: tabstop=4 expandtab autoindent shiftwidth=4 fileencoding=utf-8 """ Assertions that sort of follow Python unittest/Django test cases """ from django.test.testcases import TestCase import re ## Python from nose import tools for t in dir(tools): if t.startswith('assert_'): vars()[t] = getattr(tools...
# vim: tabstop=4 expandtab autoindent shiftwidth=4 fileencoding=utf-8 """ Provides Nose and Django test case assert functions """ from django.test.testcases import TestCase import re ## Python from nose import tools for t in dir(tools): if t.startswith('assert_'): vars()[t] = getattr(tools, t) ## Djan...
<commit_before># vim: tabstop=4 expandtab autoindent shiftwidth=4 fileencoding=utf-8 """ Assertions that sort of follow Python unittest/Django test cases """ from django.test.testcases import TestCase import re ## Python from nose import tools for t in dir(tools): if t.startswith('assert_'): vars()[t] ...
# vim: tabstop=4 expandtab autoindent shiftwidth=4 fileencoding=utf-8 """ Provides Nose and Django test case assert functions """ from django.test.testcases import TestCase import re ## Python from nose import tools for t in dir(tools): if t.startswith('assert_'): vars()[t] = getattr(tools, t) ## Djan...
# vim: tabstop=4 expandtab autoindent shiftwidth=4 fileencoding=utf-8 """ Assertions that sort of follow Python unittest/Django test cases """ from django.test.testcases import TestCase import re ## Python from nose import tools for t in dir(tools): if t.startswith('assert_'): vars()[t] = getattr(tools...
<commit_before># vim: tabstop=4 expandtab autoindent shiftwidth=4 fileencoding=utf-8 """ Assertions that sort of follow Python unittest/Django test cases """ from django.test.testcases import TestCase import re ## Python from nose import tools for t in dir(tools): if t.startswith('assert_'): vars()[t] ...
78ec1cffde6443016bae2c8aefdb67ab26bfab10
__init__.py
__init__.py
# Copyright (c) 2015 Ultimaker B.V. # Cura is released under the terms of the AGPLv3 or higher. from . import OctoPrintOutputDevicePlugin from . import DiscoverOctoPrintAction from UM.i18n import i18nCatalog catalog = i18nCatalog("cura") def getMetaData(): return { "type": "extension", "plugin": { ...
# Copyright (c) 2015 Ultimaker B.V. # Cura is released under the terms of the AGPLv3 or higher. from . import OctoPrintOutputDevicePlugin from . import DiscoverOctoPrintAction from UM.i18n import i18nCatalog catalog = i18nCatalog("cura") def getMetaData(): return { "type": "extension", "plugin": { ...
Update plugin information (name, description, version, author)
Update plugin information (name, description, version, author)
Python
agpl-3.0
fieldOfView/OctoPrintPlugin
# Copyright (c) 2015 Ultimaker B.V. # Cura is released under the terms of the AGPLv3 or higher. from . import OctoPrintOutputDevicePlugin from . import DiscoverOctoPrintAction from UM.i18n import i18nCatalog catalog = i18nCatalog("cura") def getMetaData(): return { "type": "extension", "plugin": { ...
# Copyright (c) 2015 Ultimaker B.V. # Cura is released under the terms of the AGPLv3 or higher. from . import OctoPrintOutputDevicePlugin from . import DiscoverOctoPrintAction from UM.i18n import i18nCatalog catalog = i18nCatalog("cura") def getMetaData(): return { "type": "extension", "plugin": { ...
<commit_before># Copyright (c) 2015 Ultimaker B.V. # Cura is released under the terms of the AGPLv3 or higher. from . import OctoPrintOutputDevicePlugin from . import DiscoverOctoPrintAction from UM.i18n import i18nCatalog catalog = i18nCatalog("cura") def getMetaData(): return { "type": "extension", ...
# Copyright (c) 2015 Ultimaker B.V. # Cura is released under the terms of the AGPLv3 or higher. from . import OctoPrintOutputDevicePlugin from . import DiscoverOctoPrintAction from UM.i18n import i18nCatalog catalog = i18nCatalog("cura") def getMetaData(): return { "type": "extension", "plugin": { ...
# Copyright (c) 2015 Ultimaker B.V. # Cura is released under the terms of the AGPLv3 or higher. from . import OctoPrintOutputDevicePlugin from . import DiscoverOctoPrintAction from UM.i18n import i18nCatalog catalog = i18nCatalog("cura") def getMetaData(): return { "type": "extension", "plugin": { ...
<commit_before># Copyright (c) 2015 Ultimaker B.V. # Cura is released under the terms of the AGPLv3 or higher. from . import OctoPrintOutputDevicePlugin from . import DiscoverOctoPrintAction from UM.i18n import i18nCatalog catalog = i18nCatalog("cura") def getMetaData(): return { "type": "extension", ...
762ba71537cebac83970fbfb19725054b127191b
__init__.py
__init__.py
from .blendergltf import *
if 'loaded' in locals(): import imp imp.reload(blendergltf) from .blendergltf import * else: loaded = True from .blendergltf import *
Improve reloading of the module
Improve reloading of the module
Python
apache-2.0
Kupoman/blendergltf,lukesanantonio/blendergltf
from .blendergltf import *Improve reloading of the module
if 'loaded' in locals(): import imp imp.reload(blendergltf) from .blendergltf import * else: loaded = True from .blendergltf import *
<commit_before>from .blendergltf import *<commit_msg>Improve reloading of the module<commit_after>
if 'loaded' in locals(): import imp imp.reload(blendergltf) from .blendergltf import * else: loaded = True from .blendergltf import *
from .blendergltf import *Improve reloading of the moduleif 'loaded' in locals(): import imp imp.reload(blendergltf) from .blendergltf import * else: loaded = True from .blendergltf import *
<commit_before>from .blendergltf import *<commit_msg>Improve reloading of the module<commit_after>if 'loaded' in locals(): import imp imp.reload(blendergltf) from .blendergltf import * else: loaded = True from .blendergltf import *
37069b80e9ab17f7d3cdbe8baf7085ff67780914
minimongo/__init__.py
minimongo/__init__.py
# -*- coding: utf-8 -*- ''' minimongo ~~~~~~~~~ Minimongo is a lightweight, schemaless, Pythonic Object-Oriented interface to MongoDB. ''' from minimongo.index import Index from minimongo.collection import Collection from minimongo.model import Model from minimongo.options import configure __all__ = (...
# -*- coding: utf-8 -*- ''' minimongo ~~~~~~~~~ Minimongo is a lightweight, schemaless, Pythonic Object-Oriented interface to MongoDB. ''' from minimongo.index import Index from minimongo.collection import Collection from minimongo.model import Model, AttrDict from minimongo.options import configure _...
Add AttrDict to the top level
Add AttrDict to the top level
Python
bsd-2-clause
terianil/minimongo,slacy/minimongo,terianil/minimongo
# -*- coding: utf-8 -*- ''' minimongo ~~~~~~~~~ Minimongo is a lightweight, schemaless, Pythonic Object-Oriented interface to MongoDB. ''' from minimongo.index import Index from minimongo.collection import Collection from minimongo.model import Model from minimongo.options import configure __all__ = (...
# -*- coding: utf-8 -*- ''' minimongo ~~~~~~~~~ Minimongo is a lightweight, schemaless, Pythonic Object-Oriented interface to MongoDB. ''' from minimongo.index import Index from minimongo.collection import Collection from minimongo.model import Model, AttrDict from minimongo.options import configure _...
<commit_before># -*- coding: utf-8 -*- ''' minimongo ~~~~~~~~~ Minimongo is a lightweight, schemaless, Pythonic Object-Oriented interface to MongoDB. ''' from minimongo.index import Index from minimongo.collection import Collection from minimongo.model import Model from minimongo.options import configu...
# -*- coding: utf-8 -*- ''' minimongo ~~~~~~~~~ Minimongo is a lightweight, schemaless, Pythonic Object-Oriented interface to MongoDB. ''' from minimongo.index import Index from minimongo.collection import Collection from minimongo.model import Model, AttrDict from minimongo.options import configure _...
# -*- coding: utf-8 -*- ''' minimongo ~~~~~~~~~ Minimongo is a lightweight, schemaless, Pythonic Object-Oriented interface to MongoDB. ''' from minimongo.index import Index from minimongo.collection import Collection from minimongo.model import Model from minimongo.options import configure __all__ = (...
<commit_before># -*- coding: utf-8 -*- ''' minimongo ~~~~~~~~~ Minimongo is a lightweight, schemaless, Pythonic Object-Oriented interface to MongoDB. ''' from minimongo.index import Index from minimongo.collection import Collection from minimongo.model import Model from minimongo.options import configu...
68c0f77155f0cc77634a8d73b2a1ab6cbd66bac1
handlers/issue_handler.py
handlers/issue_handler.py
class IssueHandler: def __init__(self, repos): self.repos = repos def handle(self, channel, prefix, issue): repo = self.find_repo(prefix, channel) if repo is not None: return "https://github.com/" + repo + "/issues/" + issue def find_repo(self, prefix, channel): for repo in self.repos: if prefix in r...
class IssueHandler: def __init__(self, repos): self.repos = repos def handle(self, channel, prefix, issue): repo = self.find_repo(prefix, channel) if repo is not None: return "https://github.com/" + repo + "/issues/" + issue def find_repo(self, prefix, channel): for repo in self.repos: if prefix is "...
Make issue prefix matching case-insensitive
Make issue prefix matching case-insensitive
Python
mit
azeier/hearthbot
class IssueHandler: def __init__(self, repos): self.repos = repos def handle(self, channel, prefix, issue): repo = self.find_repo(prefix, channel) if repo is not None: return "https://github.com/" + repo + "/issues/" + issue def find_repo(self, prefix, channel): for repo in self.repos: if prefix in r...
class IssueHandler: def __init__(self, repos): self.repos = repos def handle(self, channel, prefix, issue): repo = self.find_repo(prefix, channel) if repo is not None: return "https://github.com/" + repo + "/issues/" + issue def find_repo(self, prefix, channel): for repo in self.repos: if prefix is "...
<commit_before>class IssueHandler: def __init__(self, repos): self.repos = repos def handle(self, channel, prefix, issue): repo = self.find_repo(prefix, channel) if repo is not None: return "https://github.com/" + repo + "/issues/" + issue def find_repo(self, prefix, channel): for repo in self.repos: ...
class IssueHandler: def __init__(self, repos): self.repos = repos def handle(self, channel, prefix, issue): repo = self.find_repo(prefix, channel) if repo is not None: return "https://github.com/" + repo + "/issues/" + issue def find_repo(self, prefix, channel): for repo in self.repos: if prefix is "...
class IssueHandler: def __init__(self, repos): self.repos = repos def handle(self, channel, prefix, issue): repo = self.find_repo(prefix, channel) if repo is not None: return "https://github.com/" + repo + "/issues/" + issue def find_repo(self, prefix, channel): for repo in self.repos: if prefix in r...
<commit_before>class IssueHandler: def __init__(self, repos): self.repos = repos def handle(self, channel, prefix, issue): repo = self.find_repo(prefix, channel) if repo is not None: return "https://github.com/" + repo + "/issues/" + issue def find_repo(self, prefix, channel): for repo in self.repos: ...
95e1f9517d79fb48bb9601e2d94419c6e2c984ca
tools/data2c.py
tools/data2c.py
#!/usr/bin/python import sys import os.path import string def path2varname(path): path = os.path.basename(path) s = '' for c in path: if c in string.ascii_letters or c in string.digits: s += c else: s += '_' return s def main(): for path in sys.argv[1:]: ...
#!/usr/bin/python import sys import os.path import string import getopt cflag = 0 # clean output: just the hexdump def path2varname(path): path = os.path.basename(path) s = '' for c in path: if c in string.ascii_letters or c in string.digits: s += c else: s += '_' ...
Add -c option: output only hexdump, without C variable wrapper.
Add -c option: output only hexdump, without C variable wrapper.
Python
isc
S010/misc,S010/misc,S010/misc,S010/misc,S010/misc,S010/misc,S010/misc,S010/misc,S010/misc
#!/usr/bin/python import sys import os.path import string def path2varname(path): path = os.path.basename(path) s = '' for c in path: if c in string.ascii_letters or c in string.digits: s += c else: s += '_' return s def main(): for path in sys.argv[1:]: ...
#!/usr/bin/python import sys import os.path import string import getopt cflag = 0 # clean output: just the hexdump def path2varname(path): path = os.path.basename(path) s = '' for c in path: if c in string.ascii_letters or c in string.digits: s += c else: s += '_' ...
<commit_before>#!/usr/bin/python import sys import os.path import string def path2varname(path): path = os.path.basename(path) s = '' for c in path: if c in string.ascii_letters or c in string.digits: s += c else: s += '_' return s def main(): for path in s...
#!/usr/bin/python import sys import os.path import string import getopt cflag = 0 # clean output: just the hexdump def path2varname(path): path = os.path.basename(path) s = '' for c in path: if c in string.ascii_letters or c in string.digits: s += c else: s += '_' ...
#!/usr/bin/python import sys import os.path import string def path2varname(path): path = os.path.basename(path) s = '' for c in path: if c in string.ascii_letters or c in string.digits: s += c else: s += '_' return s def main(): for path in sys.argv[1:]: ...
<commit_before>#!/usr/bin/python import sys import os.path import string def path2varname(path): path = os.path.basename(path) s = '' for c in path: if c in string.ascii_letters or c in string.digits: s += c else: s += '_' return s def main(): for path in s...
aedc449ec40a2c0407a38608e8e800b09c6c25b0
tests/model.py
tests/model.py
import mongomock from mongo_thingy import Model def test_collection_alias(): col = mongomock.MongoClient().db.collection class Foo(Model): _collection = col assert Foo.collection == col def test_get_database_from_table(): col = mongomock.MongoClient().db.collection class Foo(Model): ...
import mongomock from mongo_thingy import Model def test_collection_alias(): col = mongomock.MongoClient().db.collection class Foo(Model): _collection = col assert Foo.collection == col def test_get_database_from_table(): col = mongomock.MongoClient().db.collection class Foo(Model): ...
Add a test for _get_table_from_database
Add a test for _get_table_from_database
Python
mit
numberly/mongo-thingy
import mongomock from mongo_thingy import Model def test_collection_alias(): col = mongomock.MongoClient().db.collection class Foo(Model): _collection = col assert Foo.collection == col def test_get_database_from_table(): col = mongomock.MongoClient().db.collection class Foo(Model): ...
import mongomock from mongo_thingy import Model def test_collection_alias(): col = mongomock.MongoClient().db.collection class Foo(Model): _collection = col assert Foo.collection == col def test_get_database_from_table(): col = mongomock.MongoClient().db.collection class Foo(Model): ...
<commit_before>import mongomock from mongo_thingy import Model def test_collection_alias(): col = mongomock.MongoClient().db.collection class Foo(Model): _collection = col assert Foo.collection == col def test_get_database_from_table(): col = mongomock.MongoClient().db.collection cla...
import mongomock from mongo_thingy import Model def test_collection_alias(): col = mongomock.MongoClient().db.collection class Foo(Model): _collection = col assert Foo.collection == col def test_get_database_from_table(): col = mongomock.MongoClient().db.collection class Foo(Model): ...
import mongomock from mongo_thingy import Model def test_collection_alias(): col = mongomock.MongoClient().db.collection class Foo(Model): _collection = col assert Foo.collection == col def test_get_database_from_table(): col = mongomock.MongoClient().db.collection class Foo(Model): ...
<commit_before>import mongomock from mongo_thingy import Model def test_collection_alias(): col = mongomock.MongoClient().db.collection class Foo(Model): _collection = col assert Foo.collection == col def test_get_database_from_table(): col = mongomock.MongoClient().db.collection cla...
7c5747688dffd41737c841ac354c4947939006c3
django_excel_tools/exceptions.py
django_excel_tools/exceptions.py
class BaseExcelError(Exception): def __init__(self, message): super(BaseExcelError, self).__init__() self.message = message class ValidationError(BaseExcelError): pass class ColumnNotEqualError(BaseExcelError): pass class FieldNotExist(BaseExcelError): pass class SerializerConfi...
class BaseExcelError(Exception): def __init__(self, message): super(BaseExcelError, self).__init__() self.message = message class ColumnNotEqualError(BaseExcelError): pass class FieldNotExist(BaseExcelError): pass class ImportOperationFailed(BaseExcelError): pass class Serialize...
Add exception for import operation error and validation error
Add exception for import operation error and validation error
Python
mit
NorakGithub/django-excel-tools
class BaseExcelError(Exception): def __init__(self, message): super(BaseExcelError, self).__init__() self.message = message class ValidationError(BaseExcelError): pass class ColumnNotEqualError(BaseExcelError): pass class FieldNotExist(BaseExcelError): pass class SerializerConfi...
class BaseExcelError(Exception): def __init__(self, message): super(BaseExcelError, self).__init__() self.message = message class ColumnNotEqualError(BaseExcelError): pass class FieldNotExist(BaseExcelError): pass class ImportOperationFailed(BaseExcelError): pass class Serialize...
<commit_before>class BaseExcelError(Exception): def __init__(self, message): super(BaseExcelError, self).__init__() self.message = message class ValidationError(BaseExcelError): pass class ColumnNotEqualError(BaseExcelError): pass class FieldNotExist(BaseExcelError): pass class ...
class BaseExcelError(Exception): def __init__(self, message): super(BaseExcelError, self).__init__() self.message = message class ColumnNotEqualError(BaseExcelError): pass class FieldNotExist(BaseExcelError): pass class ImportOperationFailed(BaseExcelError): pass class Serialize...
class BaseExcelError(Exception): def __init__(self, message): super(BaseExcelError, self).__init__() self.message = message class ValidationError(BaseExcelError): pass class ColumnNotEqualError(BaseExcelError): pass class FieldNotExist(BaseExcelError): pass class SerializerConfi...
<commit_before>class BaseExcelError(Exception): def __init__(self, message): super(BaseExcelError, self).__init__() self.message = message class ValidationError(BaseExcelError): pass class ColumnNotEqualError(BaseExcelError): pass class FieldNotExist(BaseExcelError): pass class ...
b4e879e6bbfae9bf5692df2fb3b715f9e376041d
app/priu.py
app/priu.py
import os, sys import json as _json from flask import Flask, Response, request app = Flask(__name__) app.debug = True import lib @app.route("/", methods=["HEAD", "GET", "POST", "DELETE", "PUT"]) def adapter(): json = request.get_data() decoded = _json.loads(json) docker_json = _json.loads(decoded['Clien...
import os, sys import json as _json from flask import Flask, Response, request app = Flask(__name__) app.debug = True import lib @app.route("/", methods=["HEAD", "GET", "POST", "DELETE", "PUT"]) def adapter(): json = request.get_data() decoded = _json.loads(json) docker_json = _json.loads(decoded['Clien...
Support for diallowing official images.
Support for diallowing official images.
Python
apache-2.0
robhaswell/powerstrip-restrict-image-user
import os, sys import json as _json from flask import Flask, Response, request app = Flask(__name__) app.debug = True import lib @app.route("/", methods=["HEAD", "GET", "POST", "DELETE", "PUT"]) def adapter(): json = request.get_data() decoded = _json.loads(json) docker_json = _json.loads(decoded['Clien...
import os, sys import json as _json from flask import Flask, Response, request app = Flask(__name__) app.debug = True import lib @app.route("/", methods=["HEAD", "GET", "POST", "DELETE", "PUT"]) def adapter(): json = request.get_data() decoded = _json.loads(json) docker_json = _json.loads(decoded['Clien...
<commit_before>import os, sys import json as _json from flask import Flask, Response, request app = Flask(__name__) app.debug = True import lib @app.route("/", methods=["HEAD", "GET", "POST", "DELETE", "PUT"]) def adapter(): json = request.get_data() decoded = _json.loads(json) docker_json = _json.loads...
import os, sys import json as _json from flask import Flask, Response, request app = Flask(__name__) app.debug = True import lib @app.route("/", methods=["HEAD", "GET", "POST", "DELETE", "PUT"]) def adapter(): json = request.get_data() decoded = _json.loads(json) docker_json = _json.loads(decoded['Clien...
import os, sys import json as _json from flask import Flask, Response, request app = Flask(__name__) app.debug = True import lib @app.route("/", methods=["HEAD", "GET", "POST", "DELETE", "PUT"]) def adapter(): json = request.get_data() decoded = _json.loads(json) docker_json = _json.loads(decoded['Clien...
<commit_before>import os, sys import json as _json from flask import Flask, Response, request app = Flask(__name__) app.debug = True import lib @app.route("/", methods=["HEAD", "GET", "POST", "DELETE", "PUT"]) def adapter(): json = request.get_data() decoded = _json.loads(json) docker_json = _json.loads...
8e4d77636a9846296225ddbfab872be4c7486261
dask_distance/_pycompat.py
dask_distance/_pycompat.py
# -*- coding: utf-8 -*- try: irange = xrange except NameError: irange = range
# -*- coding: utf-8 -*- try: irange = xrange except NameError: irange = range try: from itertools import izip except ImportError: izip = zip
Add izip for Python 2/3 compatibility
Add izip for Python 2/3 compatibility Simply use `izip` from `itertools` on Python 2 and alias `izip` as `zip` on Python 3. This way an iterable form of `zip` remains available on both Python 2 and Python 3 that is named `izip`. Should help avoid having the performance of the two implementations from diverging too far...
Python
bsd-3-clause
jakirkham/dask-distance
# -*- coding: utf-8 -*- try: irange = xrange except NameError: irange = range Add izip for Python 2/3 compatibility Simply use `izip` from `itertools` on Python 2 and alias `izip` as `zip` on Python 3. This way an iterable form of `zip` remains available on both Python 2 and Python 3 that is named `izip`. Sh...
# -*- coding: utf-8 -*- try: irange = xrange except NameError: irange = range try: from itertools import izip except ImportError: izip = zip
<commit_before># -*- coding: utf-8 -*- try: irange = xrange except NameError: irange = range <commit_msg>Add izip for Python 2/3 compatibility Simply use `izip` from `itertools` on Python 2 and alias `izip` as `zip` on Python 3. This way an iterable form of `zip` remains available on both Python 2 and Python...
# -*- coding: utf-8 -*- try: irange = xrange except NameError: irange = range try: from itertools import izip except ImportError: izip = zip
# -*- coding: utf-8 -*- try: irange = xrange except NameError: irange = range Add izip for Python 2/3 compatibility Simply use `izip` from `itertools` on Python 2 and alias `izip` as `zip` on Python 3. This way an iterable form of `zip` remains available on both Python 2 and Python 3 that is named `izip`. Sh...
<commit_before># -*- coding: utf-8 -*- try: irange = xrange except NameError: irange = range <commit_msg>Add izip for Python 2/3 compatibility Simply use `izip` from `itertools` on Python 2 and alias `izip` as `zip` on Python 3. This way an iterable form of `zip` remains available on both Python 2 and Python...
114f6eb7fc6e7bf7e2cbc885ded0063adce3eccc
api/init/graphqlapi/batch.py
api/init/graphqlapi/batch.py
import docker def execute_batch(batch_id: int): container_name = f'mobydq-batch-{batch_id}' client = docker.from_env() client.containers.run( name=container_name, image='mobydq-scripts', network='mobydq-network', command=['python', 'run.py', 'execute_batch', batch_id], ...
import docker def execute_batch(batch_id: int): container_name = f'mobydq-batch-{batch_id}' client = docker.from_env() client.containers.run( name=container_name, image='mobydq-scripts', network='mobydq-network', command=['python', 'run.py', 'execute_batch', batch_id], ...
Add new line at the end of file
Add new line at the end of file
Python
apache-2.0
alexisrolland/data-quality,alexisrolland/data-quality,alexisrolland/data-quality,alexisrolland/data-quality
import docker def execute_batch(batch_id: int): container_name = f'mobydq-batch-{batch_id}' client = docker.from_env() client.containers.run( name=container_name, image='mobydq-scripts', network='mobydq-network', command=['python', 'run.py', 'execute_batch', batch_id], ...
import docker def execute_batch(batch_id: int): container_name = f'mobydq-batch-{batch_id}' client = docker.from_env() client.containers.run( name=container_name, image='mobydq-scripts', network='mobydq-network', command=['python', 'run.py', 'execute_batch', batch_id], ...
<commit_before>import docker def execute_batch(batch_id: int): container_name = f'mobydq-batch-{batch_id}' client = docker.from_env() client.containers.run( name=container_name, image='mobydq-scripts', network='mobydq-network', command=['python', 'run.py', 'execute_batch', ...
import docker def execute_batch(batch_id: int): container_name = f'mobydq-batch-{batch_id}' client = docker.from_env() client.containers.run( name=container_name, image='mobydq-scripts', network='mobydq-network', command=['python', 'run.py', 'execute_batch', batch_id], ...
import docker def execute_batch(batch_id: int): container_name = f'mobydq-batch-{batch_id}' client = docker.from_env() client.containers.run( name=container_name, image='mobydq-scripts', network='mobydq-network', command=['python', 'run.py', 'execute_batch', batch_id], ...
<commit_before>import docker def execute_batch(batch_id: int): container_name = f'mobydq-batch-{batch_id}' client = docker.from_env() client.containers.run( name=container_name, image='mobydq-scripts', network='mobydq-network', command=['python', 'run.py', 'execute_batch', ...
21541a4a1b2fcdfaa4bb7d2fbebf7db702eebacc
app/main.py
app/main.py
import csv import yaml import parse import deparse def main(): with open('data/features.csv', 'r') as f: segments = [segment for segment in csv.DictReader(f)] with open('data/diacritics.yaml') as f: diacritics = yaml.load(f) with open('data/feature-strings-with-diacritics.csv') as f: ...
import csv import yaml import parse import evolve import deparse def evolve_words(words, available_rules, generations=5): '''Evolves the given list of words according to the given list of rules, for a number of generations. If no more applicable rules are available, the evolution will stop early. Returns...
Create basic flow of evolution process.
Create basic flow of evolution process.
Python
mit
kdelwat/LangEvolve,kdelwat/LangEvolve,kdelwat/LangEvolve
import csv import yaml import parse import deparse def main(): with open('data/features.csv', 'r') as f: segments = [segment for segment in csv.DictReader(f)] with open('data/diacritics.yaml') as f: diacritics = yaml.load(f) with open('data/feature-strings-with-diacritics.csv') as f: ...
import csv import yaml import parse import evolve import deparse def evolve_words(words, available_rules, generations=5): '''Evolves the given list of words according to the given list of rules, for a number of generations. If no more applicable rules are available, the evolution will stop early. Returns...
<commit_before>import csv import yaml import parse import deparse def main(): with open('data/features.csv', 'r') as f: segments = [segment for segment in csv.DictReader(f)] with open('data/diacritics.yaml') as f: diacritics = yaml.load(f) with open('data/feature-strings-with-diacritics...
import csv import yaml import parse import evolve import deparse def evolve_words(words, available_rules, generations=5): '''Evolves the given list of words according to the given list of rules, for a number of generations. If no more applicable rules are available, the evolution will stop early. Returns...
import csv import yaml import parse import deparse def main(): with open('data/features.csv', 'r') as f: segments = [segment for segment in csv.DictReader(f)] with open('data/diacritics.yaml') as f: diacritics = yaml.load(f) with open('data/feature-strings-with-diacritics.csv') as f: ...
<commit_before>import csv import yaml import parse import deparse def main(): with open('data/features.csv', 'r') as f: segments = [segment for segment in csv.DictReader(f)] with open('data/diacritics.yaml') as f: diacritics = yaml.load(f) with open('data/feature-strings-with-diacritics...
04f8e26d2dfd29c0958372098f4199d833977c62
app/main/views/frameworks.py
app/main/views/frameworks.py
from flask import jsonify from sqlalchemy.types import String from sqlalchemy import func import datetime from .. import main from ...models import db, Framework, DraftService, Service, User, Supplier, SelectionAnswers, AuditEvent @main.route('/frameworks', methods=['GET']) def list_frameworks(): frameworks = Fr...
from flask import jsonify from sqlalchemy.types import String from sqlalchemy import func import datetime from .. import main from ...models import db, Framework, DraftService, Service, User, Supplier, SelectionAnswers, AuditEvent @main.route('/frameworks', methods=['GET']) def list_frameworks(): frameworks = Fr...
Use UTC time (we want to standardise on this)
Use UTC time (we want to standardise on this)
Python
mit
alphagov/digitalmarketplace-api,alphagov/digitalmarketplace-api,alphagov/digitalmarketplace-api
from flask import jsonify from sqlalchemy.types import String from sqlalchemy import func import datetime from .. import main from ...models import db, Framework, DraftService, Service, User, Supplier, SelectionAnswers, AuditEvent @main.route('/frameworks', methods=['GET']) def list_frameworks(): frameworks = Fr...
from flask import jsonify from sqlalchemy.types import String from sqlalchemy import func import datetime from .. import main from ...models import db, Framework, DraftService, Service, User, Supplier, SelectionAnswers, AuditEvent @main.route('/frameworks', methods=['GET']) def list_frameworks(): frameworks = Fr...
<commit_before>from flask import jsonify from sqlalchemy.types import String from sqlalchemy import func import datetime from .. import main from ...models import db, Framework, DraftService, Service, User, Supplier, SelectionAnswers, AuditEvent @main.route('/frameworks', methods=['GET']) def list_frameworks(): ...
from flask import jsonify from sqlalchemy.types import String from sqlalchemy import func import datetime from .. import main from ...models import db, Framework, DraftService, Service, User, Supplier, SelectionAnswers, AuditEvent @main.route('/frameworks', methods=['GET']) def list_frameworks(): frameworks = Fr...
from flask import jsonify from sqlalchemy.types import String from sqlalchemy import func import datetime from .. import main from ...models import db, Framework, DraftService, Service, User, Supplier, SelectionAnswers, AuditEvent @main.route('/frameworks', methods=['GET']) def list_frameworks(): frameworks = Fr...
<commit_before>from flask import jsonify from sqlalchemy.types import String from sqlalchemy import func import datetime from .. import main from ...models import db, Framework, DraftService, Service, User, Supplier, SelectionAnswers, AuditEvent @main.route('/frameworks', methods=['GET']) def list_frameworks(): ...
fe4a0e0b86300f7da5f45a5541ee9c42c0a76ab7
docker_manager/dispatcher.py
docker_manager/dispatcher.py
import requests_unixsocket import urllib import json import re def dockerapi_dispatcher(app,request): method = request.method uri = re.match(r"^.+/dockerapi/(.+)", request.url).group(1) session = requests_unixsocket.Session() unix_socket = urllib.quote_plus( app.config['SOCKET'] ) return getattr(s...
import requests_unixsocket import urllib import re def dockerapi_dispatcher(app,request): method = request.method uri = re.match(r"^.+/dockerapi/(.+)", request.url).group(1) session = requests_unixsocket.Session() unix_socket = urllib.quote_plus( app.config['SOCKET'] ) return getattr(session,metho...
Remove unsed json module import
Remove unsed json module import
Python
apache-2.0
nathanIL/docker-manager,nathanIL/docker-manager,nathanIL/docker-manager
import requests_unixsocket import urllib import json import re def dockerapi_dispatcher(app,request): method = request.method uri = re.match(r"^.+/dockerapi/(.+)", request.url).group(1) session = requests_unixsocket.Session() unix_socket = urllib.quote_plus( app.config['SOCKET'] ) return getattr(s...
import requests_unixsocket import urllib import re def dockerapi_dispatcher(app,request): method = request.method uri = re.match(r"^.+/dockerapi/(.+)", request.url).group(1) session = requests_unixsocket.Session() unix_socket = urllib.quote_plus( app.config['SOCKET'] ) return getattr(session,metho...
<commit_before>import requests_unixsocket import urllib import json import re def dockerapi_dispatcher(app,request): method = request.method uri = re.match(r"^.+/dockerapi/(.+)", request.url).group(1) session = requests_unixsocket.Session() unix_socket = urllib.quote_plus( app.config['SOCKET'] ) r...
import requests_unixsocket import urllib import re def dockerapi_dispatcher(app,request): method = request.method uri = re.match(r"^.+/dockerapi/(.+)", request.url).group(1) session = requests_unixsocket.Session() unix_socket = urllib.quote_plus( app.config['SOCKET'] ) return getattr(session,metho...
import requests_unixsocket import urllib import json import re def dockerapi_dispatcher(app,request): method = request.method uri = re.match(r"^.+/dockerapi/(.+)", request.url).group(1) session = requests_unixsocket.Session() unix_socket = urllib.quote_plus( app.config['SOCKET'] ) return getattr(s...
<commit_before>import requests_unixsocket import urllib import json import re def dockerapi_dispatcher(app,request): method = request.method uri = re.match(r"^.+/dockerapi/(.+)", request.url).group(1) session = requests_unixsocket.Session() unix_socket = urllib.quote_plus( app.config['SOCKET'] ) r...
1b18d81f673e9f982e9778823198cbc336285db4
tests/grammar_creation_test/NonterminalAddingTest.py
tests/grammar_creation_test/NonterminalAddingTest.py
#!/usr/bin/env python """ :Author Patrik Valkovic :Created 23.06.2017 16:39 :Licence GNUv3 Part of grammpy """ from unittest import TestCase, main from grammpy import * class NonterminalAddingTest(TestCase): pass if __name__ == '__main__': main()
#!/usr/bin/env python """ :Author Patrik Valkovic :Created 23.06.2017 16:39 :Licence GNUv3 Part of grammpy """ from unittest import TestCase, main from grammpy import * from grammpy.exceptions import NotNonterminalException class A(Nonterminal): pass class B(Nonterminal): pass class C(Nonterminal): ...
Add test of adding nonterminals when grammar is create
Add test of adding nonterminals when grammar is create
Python
mit
PatrikValkovic/grammpy
#!/usr/bin/env python """ :Author Patrik Valkovic :Created 23.06.2017 16:39 :Licence GNUv3 Part of grammpy """ from unittest import TestCase, main from grammpy import * class NonterminalAddingTest(TestCase): pass if __name__ == '__main__': main() Add test of adding nonterminals when grammar is create
#!/usr/bin/env python """ :Author Patrik Valkovic :Created 23.06.2017 16:39 :Licence GNUv3 Part of grammpy """ from unittest import TestCase, main from grammpy import * from grammpy.exceptions import NotNonterminalException class A(Nonterminal): pass class B(Nonterminal): pass class C(Nonterminal): ...
<commit_before>#!/usr/bin/env python """ :Author Patrik Valkovic :Created 23.06.2017 16:39 :Licence GNUv3 Part of grammpy """ from unittest import TestCase, main from grammpy import * class NonterminalAddingTest(TestCase): pass if __name__ == '__main__': main() <commit_msg>Add test of adding nonterminals ...
#!/usr/bin/env python """ :Author Patrik Valkovic :Created 23.06.2017 16:39 :Licence GNUv3 Part of grammpy """ from unittest import TestCase, main from grammpy import * from grammpy.exceptions import NotNonterminalException class A(Nonterminal): pass class B(Nonterminal): pass class C(Nonterminal): ...
#!/usr/bin/env python """ :Author Patrik Valkovic :Created 23.06.2017 16:39 :Licence GNUv3 Part of grammpy """ from unittest import TestCase, main from grammpy import * class NonterminalAddingTest(TestCase): pass if __name__ == '__main__': main() Add test of adding nonterminals when grammar is create#!/us...
<commit_before>#!/usr/bin/env python """ :Author Patrik Valkovic :Created 23.06.2017 16:39 :Licence GNUv3 Part of grammpy """ from unittest import TestCase, main from grammpy import * class NonterminalAddingTest(TestCase): pass if __name__ == '__main__': main() <commit_msg>Add test of adding nonterminals ...
a81e3f43b83fb003b9708e3a7a581da1dc9190c1
django_project/api/urls.py
django_project/api/urls.py
# -*- coding: utf-8 -*- from django.conf.urls import patterns, url from .views import LocalitiesAPI, LocalityAPI urlpatterns = patterns( '', url( r'^localities$', LocalitiesAPI.as_view(), name='api_localities' ), url( r'^localitiy/(?P<uuid>\w{32})$', LocalityAPI.as_view(), ...
# -*- coding: utf-8 -*- from django.conf.urls import patterns, url from .views import LocalitiesAPI, LocalityAPI urlpatterns = patterns( '', url( r'^localities$', LocalitiesAPI.as_view(), name='api_localities' ), url( r'^locality/(?P<uuid>\w{32})$', LocalityAPI.as_view(), ...
Fix spelling for api/locality/:uuid URL
Fix spelling for api/locality/:uuid URL Closes #121
Python
bsd-2-clause
ismailsunni/healthsites,ismailsunni/healthsites,ismailsunni/healthsites,ismailsunni/healthsites
# -*- coding: utf-8 -*- from django.conf.urls import patterns, url from .views import LocalitiesAPI, LocalityAPI urlpatterns = patterns( '', url( r'^localities$', LocalitiesAPI.as_view(), name='api_localities' ), url( r'^localitiy/(?P<uuid>\w{32})$', LocalityAPI.as_view(), ...
# -*- coding: utf-8 -*- from django.conf.urls import patterns, url from .views import LocalitiesAPI, LocalityAPI urlpatterns = patterns( '', url( r'^localities$', LocalitiesAPI.as_view(), name='api_localities' ), url( r'^locality/(?P<uuid>\w{32})$', LocalityAPI.as_view(), ...
<commit_before># -*- coding: utf-8 -*- from django.conf.urls import patterns, url from .views import LocalitiesAPI, LocalityAPI urlpatterns = patterns( '', url( r'^localities$', LocalitiesAPI.as_view(), name='api_localities' ), url( r'^localitiy/(?P<uuid>\w{32})$', LocalityAPI....
# -*- coding: utf-8 -*- from django.conf.urls import patterns, url from .views import LocalitiesAPI, LocalityAPI urlpatterns = patterns( '', url( r'^localities$', LocalitiesAPI.as_view(), name='api_localities' ), url( r'^locality/(?P<uuid>\w{32})$', LocalityAPI.as_view(), ...
# -*- coding: utf-8 -*- from django.conf.urls import patterns, url from .views import LocalitiesAPI, LocalityAPI urlpatterns = patterns( '', url( r'^localities$', LocalitiesAPI.as_view(), name='api_localities' ), url( r'^localitiy/(?P<uuid>\w{32})$', LocalityAPI.as_view(), ...
<commit_before># -*- coding: utf-8 -*- from django.conf.urls import patterns, url from .views import LocalitiesAPI, LocalityAPI urlpatterns = patterns( '', url( r'^localities$', LocalitiesAPI.as_view(), name='api_localities' ), url( r'^localitiy/(?P<uuid>\w{32})$', LocalityAPI....
8b04e4de91f60a2727f9c7a6f5a56d86279c667d
avalonstar/apps/live/urls.py
avalonstar/apps/live/urls.py
# -*- coding: utf-8 -*- from django.conf import settings from django.conf.urls import patterns, include, url from django.views.generic import RedirectView from .views import AwayView, DiscussionView, GameView, PrologueView urlpatterns = patterns('', # Because sooner or later, avalonstar.tv/ will be a welcome pag...
# -*- coding: utf-8 -*- from django.conf import settings from django.conf.urls import patterns, include, url from django.views.generic import RedirectView from .views import (AwayView, DiscussionView, EpilogueView, GameView, PrologueView) urlpatterns = patterns('', # Because sooner or later, avalonstar.tv/ w...
Add a URL conf for the EpilogueView.
Add a URL conf for the EpilogueView.
Python
apache-2.0
bryanveloso/avalonstar-tv,bryanveloso/avalonstar-tv,bryanveloso/avalonstar-tv
# -*- coding: utf-8 -*- from django.conf import settings from django.conf.urls import patterns, include, url from django.views.generic import RedirectView from .views import AwayView, DiscussionView, GameView, PrologueView urlpatterns = patterns('', # Because sooner or later, avalonstar.tv/ will be a welcome pag...
# -*- coding: utf-8 -*- from django.conf import settings from django.conf.urls import patterns, include, url from django.views.generic import RedirectView from .views import (AwayView, DiscussionView, EpilogueView, GameView, PrologueView) urlpatterns = patterns('', # Because sooner or later, avalonstar.tv/ w...
<commit_before># -*- coding: utf-8 -*- from django.conf import settings from django.conf.urls import patterns, include, url from django.views.generic import RedirectView from .views import AwayView, DiscussionView, GameView, PrologueView urlpatterns = patterns('', # Because sooner or later, avalonstar.tv/ will b...
# -*- coding: utf-8 -*- from django.conf import settings from django.conf.urls import patterns, include, url from django.views.generic import RedirectView from .views import (AwayView, DiscussionView, EpilogueView, GameView, PrologueView) urlpatterns = patterns('', # Because sooner or later, avalonstar.tv/ w...
# -*- coding: utf-8 -*- from django.conf import settings from django.conf.urls import patterns, include, url from django.views.generic import RedirectView from .views import AwayView, DiscussionView, GameView, PrologueView urlpatterns = patterns('', # Because sooner or later, avalonstar.tv/ will be a welcome pag...
<commit_before># -*- coding: utf-8 -*- from django.conf import settings from django.conf.urls import patterns, include, url from django.views.generic import RedirectView from .views import AwayView, DiscussionView, GameView, PrologueView urlpatterns = patterns('', # Because sooner or later, avalonstar.tv/ will b...
78ec6813df74c153501b109b31383a07f02bde07
furious/_pkg_meta.py
furious/_pkg_meta.py
version_info = (1, 2, 0) version = '.'.join(map(str, version_info))
version_info = (1, 3, 0) version = '.'.join(map(str, version_info))
Upgrade the version to 1.3.0
Upgrade the version to 1.3.0
Python
apache-2.0
beaulyddon-wf/furious,Workiva/furious,mattsanders-wf/furious,beaulyddon-wf/furious,mattsanders-wf/furious,andreleblanc-wf/furious,Workiva/furious,andreleblanc-wf/furious
version_info = (1, 2, 0) version = '.'.join(map(str, version_info)) Upgrade the version to 1.3.0
version_info = (1, 3, 0) version = '.'.join(map(str, version_info))
<commit_before>version_info = (1, 2, 0) version = '.'.join(map(str, version_info)) <commit_msg>Upgrade the version to 1.3.0<commit_after>
version_info = (1, 3, 0) version = '.'.join(map(str, version_info))
version_info = (1, 2, 0) version = '.'.join(map(str, version_info)) Upgrade the version to 1.3.0version_info = (1, 3, 0) version = '.'.join(map(str, version_info))
<commit_before>version_info = (1, 2, 0) version = '.'.join(map(str, version_info)) <commit_msg>Upgrade the version to 1.3.0<commit_after>version_info = (1, 3, 0) version = '.'.join(map(str, version_info))
5cbbe25d9bbfbea804d22f399ec16ed438c492e4
moss/plots.py
moss/plots.py
import os.path as op import numpy as np import nibabel as nib import seaborn as sns def plot_mask_distribution(fname, hist=False): """Plot the distribution of voxel coordinates in a mask file. Parameters ---------- fname : string path to binary mask file Returns ------- ax : matpl...
import os.path as op import numpy as np import nibabel as nib import matplotlib.pyplot as plt import seaborn as sns def plot_mask_distribution(fname, ax=None, hist=False): """Plot the distribution of voxel coordinates in a mask file. Parameters ---------- fname : string path to binary mask fil...
Allow for shade or hist in mask plot
Allow for shade or hist in mask plot
Python
bsd-3-clause
mwaskom/moss,mwaskom/moss
import os.path as op import numpy as np import nibabel as nib import seaborn as sns def plot_mask_distribution(fname, hist=False): """Plot the distribution of voxel coordinates in a mask file. Parameters ---------- fname : string path to binary mask file Returns ------- ax : matpl...
import os.path as op import numpy as np import nibabel as nib import matplotlib.pyplot as plt import seaborn as sns def plot_mask_distribution(fname, ax=None, hist=False): """Plot the distribution of voxel coordinates in a mask file. Parameters ---------- fname : string path to binary mask fil...
<commit_before>import os.path as op import numpy as np import nibabel as nib import seaborn as sns def plot_mask_distribution(fname, hist=False): """Plot the distribution of voxel coordinates in a mask file. Parameters ---------- fname : string path to binary mask file Returns -------...
import os.path as op import numpy as np import nibabel as nib import matplotlib.pyplot as plt import seaborn as sns def plot_mask_distribution(fname, ax=None, hist=False): """Plot the distribution of voxel coordinates in a mask file. Parameters ---------- fname : string path to binary mask fil...
import os.path as op import numpy as np import nibabel as nib import seaborn as sns def plot_mask_distribution(fname, hist=False): """Plot the distribution of voxel coordinates in a mask file. Parameters ---------- fname : string path to binary mask file Returns ------- ax : matpl...
<commit_before>import os.path as op import numpy as np import nibabel as nib import seaborn as sns def plot_mask_distribution(fname, hist=False): """Plot the distribution of voxel coordinates in a mask file. Parameters ---------- fname : string path to binary mask file Returns -------...
77a6ff9fa19349bcb9428e79b7a7bf05cb4fb2a2
demo/apps/catalogue/migrations/0011_auto_20160616_1335.py
demo/apps/catalogue/migrations/0011_auto_20160616_1335.py
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ('wagtailimages', '0013_make_rendition_upload_callable'), ('catalogue', '0010_auto_20160616_1048'), ...
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ('wagtailimages', '0013_make_rendition_upload_callable'), ('catalogue', '0010_auto_20160616_1048'), ...
Add field instead of alter field
Add field instead of alter field
Python
mit
pgovers/oscar-wagtail-demo,pgovers/oscar-wagtail-demo
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ('wagtailimages', '0013_make_rendition_upload_callable'), ('catalogue', '0010_auto_20160616_1048'), ...
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ('wagtailimages', '0013_make_rendition_upload_callable'), ('catalogue', '0010_auto_20160616_1048'), ...
<commit_before># -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ('wagtailimages', '0013_make_rendition_upload_callable'), ('catalogue', '0010_auto_2016...
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ('wagtailimages', '0013_make_rendition_upload_callable'), ('catalogue', '0010_auto_20160616_1048'), ...
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ('wagtailimages', '0013_make_rendition_upload_callable'), ('catalogue', '0010_auto_20160616_1048'), ...
<commit_before># -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ('wagtailimages', '0013_make_rendition_upload_callable'), ('catalogue', '0010_auto_2016...
99f862b6c123b8c6d81e931254c061e64431bccc
pysingcells/logger.py
pysingcells/logger.py
# -*- coding: utf-8 -*- """ Function related to logging """ # stp import import sys import logging # fief import from fief import filter_effective_parameters as fief log = logging.getLogger() @fief def setup_logging(options): log_level = 10 if "logging_level" in options else options["logging_level"] ...
# -*- coding: utf-8 -*- """ Function related to logging """ # stp import import sys import logging # fief import from fief import filter_effective_parameters as fief log = logging.getLogger() @fief def setup_logging(options): log_level = 10 if "logging_level" in options else options["logging_level"] ...
Add time in logging trace
Add time in logging trace
Python
mit
Fougere87/pysingcells
# -*- coding: utf-8 -*- """ Function related to logging """ # stp import import sys import logging # fief import from fief import filter_effective_parameters as fief log = logging.getLogger() @fief def setup_logging(options): log_level = 10 if "logging_level" in options else options["logging_level"] ...
# -*- coding: utf-8 -*- """ Function related to logging """ # stp import import sys import logging # fief import from fief import filter_effective_parameters as fief log = logging.getLogger() @fief def setup_logging(options): log_level = 10 if "logging_level" in options else options["logging_level"] ...
<commit_before> # -*- coding: utf-8 -*- """ Function related to logging """ # stp import import sys import logging # fief import from fief import filter_effective_parameters as fief log = logging.getLogger() @fief def setup_logging(options): log_level = 10 if "logging_level" in options else options["loggi...
# -*- coding: utf-8 -*- """ Function related to logging """ # stp import import sys import logging # fief import from fief import filter_effective_parameters as fief log = logging.getLogger() @fief def setup_logging(options): log_level = 10 if "logging_level" in options else options["logging_level"] ...
# -*- coding: utf-8 -*- """ Function related to logging """ # stp import import sys import logging # fief import from fief import filter_effective_parameters as fief log = logging.getLogger() @fief def setup_logging(options): log_level = 10 if "logging_level" in options else options["logging_level"] ...
<commit_before> # -*- coding: utf-8 -*- """ Function related to logging """ # stp import import sys import logging # fief import from fief import filter_effective_parameters as fief log = logging.getLogger() @fief def setup_logging(options): log_level = 10 if "logging_level" in options else options["loggi...
1bc174d357423964191625faad6733466320face
application.py
application.py
import os import sentry_sdk from flask import Flask from sentry_sdk.integrations.flask import FlaskIntegration from sentry_sdk.integrations import logging from app import create_app sentry_sdk.init( dsn=os.environ['SENTRY_DSN'], integrations=[FlaskIntegration()], environment=os.environ['NOTIFY_ENVIRONMEN...
import os import sentry_sdk from flask import Flask from sentry_sdk.integrations.flask import FlaskIntegration from sentry_sdk.integrations.redis import RedisIntegration from sentry_sdk.integrations import logging from app import create_app sentry_sdk.init( dsn=os.environ['SENTRY_DSN'], integrations=[FlaskIn...
Add RedisIntegration to Sentry trial
Add RedisIntegration to Sentry trial This should expose additional performance stats.
Python
mit
alphagov/notifications-admin,alphagov/notifications-admin,alphagov/notifications-admin,alphagov/notifications-admin
import os import sentry_sdk from flask import Flask from sentry_sdk.integrations.flask import FlaskIntegration from sentry_sdk.integrations import logging from app import create_app sentry_sdk.init( dsn=os.environ['SENTRY_DSN'], integrations=[FlaskIntegration()], environment=os.environ['NOTIFY_ENVIRONMEN...
import os import sentry_sdk from flask import Flask from sentry_sdk.integrations.flask import FlaskIntegration from sentry_sdk.integrations.redis import RedisIntegration from sentry_sdk.integrations import logging from app import create_app sentry_sdk.init( dsn=os.environ['SENTRY_DSN'], integrations=[FlaskIn...
<commit_before>import os import sentry_sdk from flask import Flask from sentry_sdk.integrations.flask import FlaskIntegration from sentry_sdk.integrations import logging from app import create_app sentry_sdk.init( dsn=os.environ['SENTRY_DSN'], integrations=[FlaskIntegration()], environment=os.environ['NO...
import os import sentry_sdk from flask import Flask from sentry_sdk.integrations.flask import FlaskIntegration from sentry_sdk.integrations.redis import RedisIntegration from sentry_sdk.integrations import logging from app import create_app sentry_sdk.init( dsn=os.environ['SENTRY_DSN'], integrations=[FlaskIn...
import os import sentry_sdk from flask import Flask from sentry_sdk.integrations.flask import FlaskIntegration from sentry_sdk.integrations import logging from app import create_app sentry_sdk.init( dsn=os.environ['SENTRY_DSN'], integrations=[FlaskIntegration()], environment=os.environ['NOTIFY_ENVIRONMEN...
<commit_before>import os import sentry_sdk from flask import Flask from sentry_sdk.integrations.flask import FlaskIntegration from sentry_sdk.integrations import logging from app import create_app sentry_sdk.init( dsn=os.environ['SENTRY_DSN'], integrations=[FlaskIntegration()], environment=os.environ['NO...
6de1eb3e3279af6fa09ddafd0e220becac7edf21
author/urls.py
author/urls.py
from django.conf.urls import patterns from django.conf.urls import url from django.views.generic.base import RedirectView from django.core.urlresolvers import reverse_lazy from django.contrib.auth.views import login from django.contrib.auth.decorators import login_required from author import views urlpatterns = patt...
from django.conf.urls import patterns from django.conf.urls import url from django.views.generic.base import RedirectView from django.core.urlresolvers import reverse_lazy from django.contrib.contenttypes.models import ContentType from django.contrib.auth.models import Permission from django.contrib.auth.views import l...
Add permission checks in author app
Add permission checks in author app
Python
bsd-3-clause
stefantsov/blackbox3,stefantsov/blackbox3,stefantsov/blackbox3
from django.conf.urls import patterns from django.conf.urls import url from django.views.generic.base import RedirectView from django.core.urlresolvers import reverse_lazy from django.contrib.auth.views import login from django.contrib.auth.decorators import login_required from author import views urlpatterns = patt...
from django.conf.urls import patterns from django.conf.urls import url from django.views.generic.base import RedirectView from django.core.urlresolvers import reverse_lazy from django.contrib.contenttypes.models import ContentType from django.contrib.auth.models import Permission from django.contrib.auth.views import l...
<commit_before>from django.conf.urls import patterns from django.conf.urls import url from django.views.generic.base import RedirectView from django.core.urlresolvers import reverse_lazy from django.contrib.auth.views import login from django.contrib.auth.decorators import login_required from author import views url...
from django.conf.urls import patterns from django.conf.urls import url from django.views.generic.base import RedirectView from django.core.urlresolvers import reverse_lazy from django.contrib.contenttypes.models import ContentType from django.contrib.auth.models import Permission from django.contrib.auth.views import l...
from django.conf.urls import patterns from django.conf.urls import url from django.views.generic.base import RedirectView from django.core.urlresolvers import reverse_lazy from django.contrib.auth.views import login from django.contrib.auth.decorators import login_required from author import views urlpatterns = patt...
<commit_before>from django.conf.urls import patterns from django.conf.urls import url from django.views.generic.base import RedirectView from django.core.urlresolvers import reverse_lazy from django.contrib.auth.views import login from django.contrib.auth.decorators import login_required from author import views url...
c80c9aa63426f138d725eeecf74f386fbee61aed
gistmail.py
gistmail.py
"""\ GistMail Email [email protected] with a link and get a response with that article's summary. """ from summarize import summarize_page from flask import Flask, render_template # Flask application app = Flask(__name__) # Configuration app.config.from_object('settings') app.config.from_envvar('SETTINGS_MODULE', s...
"""\ GistMail Email [email protected] with a link and get a response with that article's summary. """ from summarize import summarize_page from flask import Flask, render_template, request # Flask application app = Flask(__name__) # Configuration app.config.from_object('settings') app.config.from_envvar('SETTINGS_M...
Add GET handler to /incoming.
Add GET handler to /incoming.
Python
mit
joeyespo/gistmail.com,joeyespo/gistmail.com
"""\ GistMail Email [email protected] with a link and get a response with that article's summary. """ from summarize import summarize_page from flask import Flask, render_template # Flask application app = Flask(__name__) # Configuration app.config.from_object('settings') app.config.from_envvar('SETTINGS_MODULE', s...
"""\ GistMail Email [email protected] with a link and get a response with that article's summary. """ from summarize import summarize_page from flask import Flask, render_template, request # Flask application app = Flask(__name__) # Configuration app.config.from_object('settings') app.config.from_envvar('SETTINGS_M...
<commit_before>"""\ GistMail Email [email protected] with a link and get a response with that article's summary. """ from summarize import summarize_page from flask import Flask, render_template # Flask application app = Flask(__name__) # Configuration app.config.from_object('settings') app.config.from_envvar('SETT...
"""\ GistMail Email [email protected] with a link and get a response with that article's summary. """ from summarize import summarize_page from flask import Flask, render_template, request # Flask application app = Flask(__name__) # Configuration app.config.from_object('settings') app.config.from_envvar('SETTINGS_M...
"""\ GistMail Email [email protected] with a link and get a response with that article's summary. """ from summarize import summarize_page from flask import Flask, render_template # Flask application app = Flask(__name__) # Configuration app.config.from_object('settings') app.config.from_envvar('SETTINGS_MODULE', s...
<commit_before>"""\ GistMail Email [email protected] with a link and get a response with that article's summary. """ from summarize import summarize_page from flask import Flask, render_template # Flask application app = Flask(__name__) # Configuration app.config.from_object('settings') app.config.from_envvar('SETT...
69029424035c8506a46b94422fd347871ee51269
accelerator/tests/factories/program_family_factory.py
accelerator/tests/factories/program_family_factory.py
# MIT License # Copyright (c) 2017 MassChallenge, Inc. from __future__ import unicode_literals import swapper from factory import ( DjangoModelFactory, Sequence, ) from accelerator.apps import AcceleratorConfig ProgramFamily = swapper.load_model(AcceleratorConfig.name, 'ProgramFamily') class ProgramFamily...
# MIT License # Copyright (c) 2017 MassChallenge, Inc. from __future__ import unicode_literals import swapper from factory import ( DjangoModelFactory, Sequence, ) from accelerator.apps import AcceleratorConfig ProgramFamily = swapper.load_model(AcceleratorConfig.name, 'ProgramFamily') class ProgramFamily...
Add new field to factory
Add new field to factory
Python
mit
masschallenge/django-accelerator,masschallenge/django-accelerator
# MIT License # Copyright (c) 2017 MassChallenge, Inc. from __future__ import unicode_literals import swapper from factory import ( DjangoModelFactory, Sequence, ) from accelerator.apps import AcceleratorConfig ProgramFamily = swapper.load_model(AcceleratorConfig.name, 'ProgramFamily') class ProgramFamily...
# MIT License # Copyright (c) 2017 MassChallenge, Inc. from __future__ import unicode_literals import swapper from factory import ( DjangoModelFactory, Sequence, ) from accelerator.apps import AcceleratorConfig ProgramFamily = swapper.load_model(AcceleratorConfig.name, 'ProgramFamily') class ProgramFamily...
<commit_before># MIT License # Copyright (c) 2017 MassChallenge, Inc. from __future__ import unicode_literals import swapper from factory import ( DjangoModelFactory, Sequence, ) from accelerator.apps import AcceleratorConfig ProgramFamily = swapper.load_model(AcceleratorConfig.name, 'ProgramFamily') clas...
# MIT License # Copyright (c) 2017 MassChallenge, Inc. from __future__ import unicode_literals import swapper from factory import ( DjangoModelFactory, Sequence, ) from accelerator.apps import AcceleratorConfig ProgramFamily = swapper.load_model(AcceleratorConfig.name, 'ProgramFamily') class ProgramFamily...
# MIT License # Copyright (c) 2017 MassChallenge, Inc. from __future__ import unicode_literals import swapper from factory import ( DjangoModelFactory, Sequence, ) from accelerator.apps import AcceleratorConfig ProgramFamily = swapper.load_model(AcceleratorConfig.name, 'ProgramFamily') class ProgramFamily...
<commit_before># MIT License # Copyright (c) 2017 MassChallenge, Inc. from __future__ import unicode_literals import swapper from factory import ( DjangoModelFactory, Sequence, ) from accelerator.apps import AcceleratorConfig ProgramFamily = swapper.load_model(AcceleratorConfig.name, 'ProgramFamily') clas...
3860e0a9ac99c4c4422630e4133bf3b35927bf41
conf_site/sponsorship/tests/__init__.py
conf_site/sponsorship/tests/__init__.py
import factory from symposion.schedule.tests.factories import ConferenceFactory from symposion.sponsorship.models import SponsorLevel, Sponsor class SponsorLevelFactory(factory.django.DjangoModelFactory): conference = factory.SubFactory(ConferenceFactory) name = factory.Faker("color_name") order = factor...
import factory from symposion.schedule.tests.factories import ConferenceFactory from symposion.sponsorship.models import SponsorLevel, Sponsor class SponsorLevelFactory(factory.django.DjangoModelFactory): conference = factory.SubFactory(ConferenceFactory) name = factory.Faker("color_name") order = factor...
Allow SponsorFactory to create active sponsors.
Allow SponsorFactory to create active sponsors.
Python
mit
pydata/conf_site,pydata/conf_site,pydata/conf_site
import factory from symposion.schedule.tests.factories import ConferenceFactory from symposion.sponsorship.models import SponsorLevel, Sponsor class SponsorLevelFactory(factory.django.DjangoModelFactory): conference = factory.SubFactory(ConferenceFactory) name = factory.Faker("color_name") order = factor...
import factory from symposion.schedule.tests.factories import ConferenceFactory from symposion.sponsorship.models import SponsorLevel, Sponsor class SponsorLevelFactory(factory.django.DjangoModelFactory): conference = factory.SubFactory(ConferenceFactory) name = factory.Faker("color_name") order = factor...
<commit_before>import factory from symposion.schedule.tests.factories import ConferenceFactory from symposion.sponsorship.models import SponsorLevel, Sponsor class SponsorLevelFactory(factory.django.DjangoModelFactory): conference = factory.SubFactory(ConferenceFactory) name = factory.Faker("color_name") ...
import factory from symposion.schedule.tests.factories import ConferenceFactory from symposion.sponsorship.models import SponsorLevel, Sponsor class SponsorLevelFactory(factory.django.DjangoModelFactory): conference = factory.SubFactory(ConferenceFactory) name = factory.Faker("color_name") order = factor...
import factory from symposion.schedule.tests.factories import ConferenceFactory from symposion.sponsorship.models import SponsorLevel, Sponsor class SponsorLevelFactory(factory.django.DjangoModelFactory): conference = factory.SubFactory(ConferenceFactory) name = factory.Faker("color_name") order = factor...
<commit_before>import factory from symposion.schedule.tests.factories import ConferenceFactory from symposion.sponsorship.models import SponsorLevel, Sponsor class SponsorLevelFactory(factory.django.DjangoModelFactory): conference = factory.SubFactory(ConferenceFactory) name = factory.Faker("color_name") ...
58321c0471f10169ea5c0f705cdb35825036d77f
cat_leds.py
cat_leds.py
#!/usr/bin/env python """Display standard input on LEDs.""" import sys import RPi.GPIO as GPIO from seven_segment import print_leds pins = [17, 23, 24, 22, 27, 25, 5] GPIO.setmode(GPIO.BCM) GPIO.setup(pins, GPIO.OUT) pipe_contents = sys.stdin.read() print_leds(pipe_contents, pins) GPIO.cleanup()
#!/usr/bin/env python """Display standard input on LEDs.""" import sys import RPi.GPIO as GPIO from seven_segment import print_leds pins = [6, 19, 5, 13, 20, 12, 16] GPIO.setmode(GPIO.BCM) GPIO.setup(pins, GPIO.OUT) pipe_contents = sys.stdin.read() print_leds(pipe_contents, pins, 1/2.0) GPIO.cleanup()
Set up for my new 7 seg display.
Set up for my new 7 seg display.
Python
mit
zimolzak/Raspberry-Pi-newbie,zimolzak/Raspberry-Pi-newbie,zimolzak/Raspberry-Pi-newbie,zimolzak/Raspberry-Pi-newbie,zimolzak/Raspberry-Pi-newbie
#!/usr/bin/env python """Display standard input on LEDs.""" import sys import RPi.GPIO as GPIO from seven_segment import print_leds pins = [17, 23, 24, 22, 27, 25, 5] GPIO.setmode(GPIO.BCM) GPIO.setup(pins, GPIO.OUT) pipe_contents = sys.stdin.read() print_leds(pipe_contents, pins) GPIO.cleanup() Set up for my new...
#!/usr/bin/env python """Display standard input on LEDs.""" import sys import RPi.GPIO as GPIO from seven_segment import print_leds pins = [6, 19, 5, 13, 20, 12, 16] GPIO.setmode(GPIO.BCM) GPIO.setup(pins, GPIO.OUT) pipe_contents = sys.stdin.read() print_leds(pipe_contents, pins, 1/2.0) GPIO.cleanup()
<commit_before>#!/usr/bin/env python """Display standard input on LEDs.""" import sys import RPi.GPIO as GPIO from seven_segment import print_leds pins = [17, 23, 24, 22, 27, 25, 5] GPIO.setmode(GPIO.BCM) GPIO.setup(pins, GPIO.OUT) pipe_contents = sys.stdin.read() print_leds(pipe_contents, pins) GPIO.cleanup() <c...
#!/usr/bin/env python """Display standard input on LEDs.""" import sys import RPi.GPIO as GPIO from seven_segment import print_leds pins = [6, 19, 5, 13, 20, 12, 16] GPIO.setmode(GPIO.BCM) GPIO.setup(pins, GPIO.OUT) pipe_contents = sys.stdin.read() print_leds(pipe_contents, pins, 1/2.0) GPIO.cleanup()
#!/usr/bin/env python """Display standard input on LEDs.""" import sys import RPi.GPIO as GPIO from seven_segment import print_leds pins = [17, 23, 24, 22, 27, 25, 5] GPIO.setmode(GPIO.BCM) GPIO.setup(pins, GPIO.OUT) pipe_contents = sys.stdin.read() print_leds(pipe_contents, pins) GPIO.cleanup() Set up for my new...
<commit_before>#!/usr/bin/env python """Display standard input on LEDs.""" import sys import RPi.GPIO as GPIO from seven_segment import print_leds pins = [17, 23, 24, 22, 27, 25, 5] GPIO.setmode(GPIO.BCM) GPIO.setup(pins, GPIO.OUT) pipe_contents = sys.stdin.read() print_leds(pipe_contents, pins) GPIO.cleanup() <c...
caaf8e40c99f410b09580b81c4fa7a094395319c
test/test_progress_bar.py
test/test_progress_bar.py
import pytest from downloads.download import _progress_bar @pytest.mark.parametrize( "current,block_size,total_size", [ ( 100, 32, 100 * 32, ), ( 75, 32, 100 * 32, ), ( 50, ...
import pytest from downloads.download import _progress_bar @pytest.mark.parametrize( "current,block_size,total_size", [ ( 100, 32, 100 * 32, ), ( 75, 32, 100 * 32, ), ( 50, ...
Test width of progress bar
Test width of progress bar
Python
mit
audy/downloads
import pytest from downloads.download import _progress_bar @pytest.mark.parametrize( "current,block_size,total_size", [ ( 100, 32, 100 * 32, ), ( 75, 32, 100 * 32, ), ( 50, ...
import pytest from downloads.download import _progress_bar @pytest.mark.parametrize( "current,block_size,total_size", [ ( 100, 32, 100 * 32, ), ( 75, 32, 100 * 32, ), ( 50, ...
<commit_before>import pytest from downloads.download import _progress_bar @pytest.mark.parametrize( "current,block_size,total_size", [ ( 100, 32, 100 * 32, ), ( 75, 32, 100 * 32, ), ( 5...
import pytest from downloads.download import _progress_bar @pytest.mark.parametrize( "current,block_size,total_size", [ ( 100, 32, 100 * 32, ), ( 75, 32, 100 * 32, ), ( 50, ...
import pytest from downloads.download import _progress_bar @pytest.mark.parametrize( "current,block_size,total_size", [ ( 100, 32, 100 * 32, ), ( 75, 32, 100 * 32, ), ( 50, ...
<commit_before>import pytest from downloads.download import _progress_bar @pytest.mark.parametrize( "current,block_size,total_size", [ ( 100, 32, 100 * 32, ), ( 75, 32, 100 * 32, ), ( 5...
6b777abcc694ff8991cd522300d8d545fb49586a
cct/core2/stronginfo.py
cct/core2/stronginfo.py
import logging import colorlog logging.STRONGINFO = logging.DEBUG + 5 logging.addLevelName(logging.STRONGINFO, 'STRONGINFO') def logStrongInfo(msg, *args, **kwargs): """Log a message with severity 'STRONGINFO' on the root logger. If the logger has no handlers, call basicConfig() to add a console handler with...
import logging import colorlog logging.STRONGINFO = logging.INFO + 5 logging.addLevelName(logging.STRONGINFO, 'STRONGINFO') def logStrongInfo(msg, *args, **kwargs): """Log a message with severity 'STRONGINFO' on the root logger. If the logger has no handlers, call basicConfig() to add a console handler with ...
Correct priority for STRONGINFO log level
Correct priority for STRONGINFO log level
Python
bsd-3-clause
awacha/cct,awacha/cct,awacha/cct
import logging import colorlog logging.STRONGINFO = logging.DEBUG + 5 logging.addLevelName(logging.STRONGINFO, 'STRONGINFO') def logStrongInfo(msg, *args, **kwargs): """Log a message with severity 'STRONGINFO' on the root logger. If the logger has no handlers, call basicConfig() to add a console handler with...
import logging import colorlog logging.STRONGINFO = logging.INFO + 5 logging.addLevelName(logging.STRONGINFO, 'STRONGINFO') def logStrongInfo(msg, *args, **kwargs): """Log a message with severity 'STRONGINFO' on the root logger. If the logger has no handlers, call basicConfig() to add a console handler with ...
<commit_before>import logging import colorlog logging.STRONGINFO = logging.DEBUG + 5 logging.addLevelName(logging.STRONGINFO, 'STRONGINFO') def logStrongInfo(msg, *args, **kwargs): """Log a message with severity 'STRONGINFO' on the root logger. If the logger has no handlers, call basicConfig() to add a conso...
import logging import colorlog logging.STRONGINFO = logging.INFO + 5 logging.addLevelName(logging.STRONGINFO, 'STRONGINFO') def logStrongInfo(msg, *args, **kwargs): """Log a message with severity 'STRONGINFO' on the root logger. If the logger has no handlers, call basicConfig() to add a console handler with ...
import logging import colorlog logging.STRONGINFO = logging.DEBUG + 5 logging.addLevelName(logging.STRONGINFO, 'STRONGINFO') def logStrongInfo(msg, *args, **kwargs): """Log a message with severity 'STRONGINFO' on the root logger. If the logger has no handlers, call basicConfig() to add a console handler with...
<commit_before>import logging import colorlog logging.STRONGINFO = logging.DEBUG + 5 logging.addLevelName(logging.STRONGINFO, 'STRONGINFO') def logStrongInfo(msg, *args, **kwargs): """Log a message with severity 'STRONGINFO' on the root logger. If the logger has no handlers, call basicConfig() to add a conso...
d2079a26f1a259aa69dea061be2b192137030fd1
ckanext/nhm/lib/form.py
ckanext/nhm/lib/form.py
#!/usr/bin/env python # encoding: utf-8 # # This file is part of ckanext-nhm # Created by the Natural History Museum in London, UK def list_to_form_options(values, allow_empty=False, allow_empty_text='None'): '''Format a list of values into a list of dict suitable for use in forms: [{value: x, name: y}] ...
#!/usr/bin/env python # encoding: utf-8 # # This file is part of ckanext-nhm # Created by the Natural History Museum in London, UK def list_to_form_options(values, allow_empty=False, allow_empty_text='None'): '''Format a list of values into a list of dict suitable for use in forms: [{value: x, name: y}] ...
Switch empty value to empty string rather than None
Switch empty value to empty string rather than None When None is used this is rendered in the HTML as a string, which then when it is returned to the CKAN server becomes 'None' not None. An empty string represents no value better.
Python
mit
NaturalHistoryMuseum/ckanext-nhm,NaturalHistoryMuseum/ckanext-nhm,NaturalHistoryMuseum/ckanext-nhm
#!/usr/bin/env python # encoding: utf-8 # # This file is part of ckanext-nhm # Created by the Natural History Museum in London, UK def list_to_form_options(values, allow_empty=False, allow_empty_text='None'): '''Format a list of values into a list of dict suitable for use in forms: [{value: x, name: y}] ...
#!/usr/bin/env python # encoding: utf-8 # # This file is part of ckanext-nhm # Created by the Natural History Museum in London, UK def list_to_form_options(values, allow_empty=False, allow_empty_text='None'): '''Format a list of values into a list of dict suitable for use in forms: [{value: x, name: y}] ...
<commit_before>#!/usr/bin/env python # encoding: utf-8 # # This file is part of ckanext-nhm # Created by the Natural History Museum in London, UK def list_to_form_options(values, allow_empty=False, allow_empty_text='None'): '''Format a list of values into a list of dict suitable for use in forms: [{value: x, ...
#!/usr/bin/env python # encoding: utf-8 # # This file is part of ckanext-nhm # Created by the Natural History Museum in London, UK def list_to_form_options(values, allow_empty=False, allow_empty_text='None'): '''Format a list of values into a list of dict suitable for use in forms: [{value: x, name: y}] ...
#!/usr/bin/env python # encoding: utf-8 # # This file is part of ckanext-nhm # Created by the Natural History Museum in London, UK def list_to_form_options(values, allow_empty=False, allow_empty_text='None'): '''Format a list of values into a list of dict suitable for use in forms: [{value: x, name: y}] ...
<commit_before>#!/usr/bin/env python # encoding: utf-8 # # This file is part of ckanext-nhm # Created by the Natural History Museum in London, UK def list_to_form_options(values, allow_empty=False, allow_empty_text='None'): '''Format a list of values into a list of dict suitable for use in forms: [{value: x, ...
f30d2f5b09ae3a62bff02165a173af6e25345a60
trevornet/nets/pynet/aimath.py
trevornet/nets/pynet/aimath.py
import math import sys def sigmoid(x): try: val = 1/(1 + math.exp(-x)) except OverflowError: val = sys.float_info.max return val def sigmoidprime(x): return (1 - sigmoid(x))*sigmoid(x)
import math import sys def sigmoid(x): try: val = 1/(1 + math.exp(-x)) except OverflowError: val = 0. return val def sigmoidprime(x): return (1 - sigmoid(x))*sigmoid(x)
Fix mistake in sigmoid function
Fix mistake in sigmoid function
Python
mit
tmerr/trevornet
import math import sys def sigmoid(x): try: val = 1/(1 + math.exp(-x)) except OverflowError: val = sys.float_info.max return val def sigmoidprime(x): return (1 - sigmoid(x))*sigmoid(x) Fix mistake in sigmoid function
import math import sys def sigmoid(x): try: val = 1/(1 + math.exp(-x)) except OverflowError: val = 0. return val def sigmoidprime(x): return (1 - sigmoid(x))*sigmoid(x)
<commit_before>import math import sys def sigmoid(x): try: val = 1/(1 + math.exp(-x)) except OverflowError: val = sys.float_info.max return val def sigmoidprime(x): return (1 - sigmoid(x))*sigmoid(x) <commit_msg>Fix mistake in sigmoid function<commit_after>
import math import sys def sigmoid(x): try: val = 1/(1 + math.exp(-x)) except OverflowError: val = 0. return val def sigmoidprime(x): return (1 - sigmoid(x))*sigmoid(x)
import math import sys def sigmoid(x): try: val = 1/(1 + math.exp(-x)) except OverflowError: val = sys.float_info.max return val def sigmoidprime(x): return (1 - sigmoid(x))*sigmoid(x) Fix mistake in sigmoid functionimport math import sys def sigmoid(x): try: val = 1/(1 + ...
<commit_before>import math import sys def sigmoid(x): try: val = 1/(1 + math.exp(-x)) except OverflowError: val = sys.float_info.max return val def sigmoidprime(x): return (1 - sigmoid(x))*sigmoid(x) <commit_msg>Fix mistake in sigmoid function<commit_after>import math import sys def s...
4510a4a22965d002bd41293fd8fe629c8285800d
tests/test_errors.py
tests/test_errors.py
# coding: pyxl import pytest from pyxl.codec.register import pyxl_decode from pyxl.codec.parser import ParseError def test_malformed_if(): with pytest.raises(ParseError): pyxl_decode(b""" <frag> <if cond="{true}">foo</if> this is incorrect! <else...
# coding: pyxl import pytest from pyxl.codec.register import pyxl_decode from pyxl.codec.parser import ParseError from pyxl.codec.html_tokenizer import BadCharError def test_malformed_if(): with pytest.raises(ParseError): pyxl_decode(b""" <frag> <if cond="{true}">foo</if> ...
Add test for BadCharError exception.
Add test for BadCharError exception.
Python
apache-2.0
pyxl4/pyxl4
# coding: pyxl import pytest from pyxl.codec.register import pyxl_decode from pyxl.codec.parser import ParseError def test_malformed_if(): with pytest.raises(ParseError): pyxl_decode(b""" <frag> <if cond="{true}">foo</if> this is incorrect! <else...
# coding: pyxl import pytest from pyxl.codec.register import pyxl_decode from pyxl.codec.parser import ParseError from pyxl.codec.html_tokenizer import BadCharError def test_malformed_if(): with pytest.raises(ParseError): pyxl_decode(b""" <frag> <if cond="{true}">foo</if> ...
<commit_before># coding: pyxl import pytest from pyxl.codec.register import pyxl_decode from pyxl.codec.parser import ParseError def test_malformed_if(): with pytest.raises(ParseError): pyxl_decode(b""" <frag> <if cond="{true}">foo</if> this is incorrect! ...
# coding: pyxl import pytest from pyxl.codec.register import pyxl_decode from pyxl.codec.parser import ParseError from pyxl.codec.html_tokenizer import BadCharError def test_malformed_if(): with pytest.raises(ParseError): pyxl_decode(b""" <frag> <if cond="{true}">foo</if> ...
# coding: pyxl import pytest from pyxl.codec.register import pyxl_decode from pyxl.codec.parser import ParseError def test_malformed_if(): with pytest.raises(ParseError): pyxl_decode(b""" <frag> <if cond="{true}">foo</if> this is incorrect! <else...
<commit_before># coding: pyxl import pytest from pyxl.codec.register import pyxl_decode from pyxl.codec.parser import ParseError def test_malformed_if(): with pytest.raises(ParseError): pyxl_decode(b""" <frag> <if cond="{true}">foo</if> this is incorrect! ...
25e4730c4614a26cdecd60eb0846e69578353d2c
tomcrypt/__init__.py
tomcrypt/__init__.py
import os import ctypes # We need to manually load the _core SO the first time so that we can specify # that it use the RTLD_GLOBAL flag. Otherwise (when not on a Mac) the runtime # linker will not be able to resolve undefined symbols in the other modules. _core_handle = ctypes.CDLL( os.path.join(os.path.dirname(...
import ctypes class Error(ValueError): def __init__(self, *args, **kwargs): self.code = kwargs.get('code', -1) ValueError.__init__(self, *args) class LibError(Error): pass # We need to manually load the _core the first time so that we can specify # that it use the RTLD_GLOBAL flag. Otherwi...
Use import to locate _core
Linking: Use import to locate _core Related to #8
Python
bsd-3-clause
mikeboers/PyTomCrypt,mikeboers/PyTomCrypt,mikeboers/PyTomCrypt
import os import ctypes # We need to manually load the _core SO the first time so that we can specify # that it use the RTLD_GLOBAL flag. Otherwise (when not on a Mac) the runtime # linker will not be able to resolve undefined symbols in the other modules. _core_handle = ctypes.CDLL( os.path.join(os.path.dirname(...
import ctypes class Error(ValueError): def __init__(self, *args, **kwargs): self.code = kwargs.get('code', -1) ValueError.__init__(self, *args) class LibError(Error): pass # We need to manually load the _core the first time so that we can specify # that it use the RTLD_GLOBAL flag. Otherwi...
<commit_before> import os import ctypes # We need to manually load the _core SO the first time so that we can specify # that it use the RTLD_GLOBAL flag. Otherwise (when not on a Mac) the runtime # linker will not be able to resolve undefined symbols in the other modules. _core_handle = ctypes.CDLL( os.path.join(o...
import ctypes class Error(ValueError): def __init__(self, *args, **kwargs): self.code = kwargs.get('code', -1) ValueError.__init__(self, *args) class LibError(Error): pass # We need to manually load the _core the first time so that we can specify # that it use the RTLD_GLOBAL flag. Otherwi...
import os import ctypes # We need to manually load the _core SO the first time so that we can specify # that it use the RTLD_GLOBAL flag. Otherwise (when not on a Mac) the runtime # linker will not be able to resolve undefined symbols in the other modules. _core_handle = ctypes.CDLL( os.path.join(os.path.dirname(...
<commit_before> import os import ctypes # We need to manually load the _core SO the first time so that we can specify # that it use the RTLD_GLOBAL flag. Otherwise (when not on a Mac) the runtime # linker will not be able to resolve undefined symbols in the other modules. _core_handle = ctypes.CDLL( os.path.join(o...
b4ce1a023bf047524f40ac63f40d46a70c8f6f77
src/dirtyfields/dirtyfields.py
src/dirtyfields/dirtyfields.py
# Adapted from http://stackoverflow.com/questions/110803/dirty-fields-in-django from django.db.models.signals import post_save class DirtyFieldsMixin(object): def __init__(self, *args, **kwargs): super(DirtyFieldsMixin, self).__init__(*args, **kwargs) post_save.connect(reset_state, sender=self.__cl...
# Adapted from http://stackoverflow.com/questions/110803/dirty-fields-in-django from django.db.models.signals import post_save class DirtyFieldsMixin(object): def __init__(self, *args, **kwargs): super(DirtyFieldsMixin, self).__init__(*args, **kwargs) post_save.connect(reset_state, sender=self.__cl...
Check primary keys for foreign key and one-to-one fields
Check primary keys for foreign key and one-to-one fields
Python
bsd-3-clause
stanhu/django-dirtyfields
# Adapted from http://stackoverflow.com/questions/110803/dirty-fields-in-django from django.db.models.signals import post_save class DirtyFieldsMixin(object): def __init__(self, *args, **kwargs): super(DirtyFieldsMixin, self).__init__(*args, **kwargs) post_save.connect(reset_state, sender=self.__cl...
# Adapted from http://stackoverflow.com/questions/110803/dirty-fields-in-django from django.db.models.signals import post_save class DirtyFieldsMixin(object): def __init__(self, *args, **kwargs): super(DirtyFieldsMixin, self).__init__(*args, **kwargs) post_save.connect(reset_state, sender=self.__cl...
<commit_before># Adapted from http://stackoverflow.com/questions/110803/dirty-fields-in-django from django.db.models.signals import post_save class DirtyFieldsMixin(object): def __init__(self, *args, **kwargs): super(DirtyFieldsMixin, self).__init__(*args, **kwargs) post_save.connect(reset_state, s...
# Adapted from http://stackoverflow.com/questions/110803/dirty-fields-in-django from django.db.models.signals import post_save class DirtyFieldsMixin(object): def __init__(self, *args, **kwargs): super(DirtyFieldsMixin, self).__init__(*args, **kwargs) post_save.connect(reset_state, sender=self.__cl...
# Adapted from http://stackoverflow.com/questions/110803/dirty-fields-in-django from django.db.models.signals import post_save class DirtyFieldsMixin(object): def __init__(self, *args, **kwargs): super(DirtyFieldsMixin, self).__init__(*args, **kwargs) post_save.connect(reset_state, sender=self.__cl...
<commit_before># Adapted from http://stackoverflow.com/questions/110803/dirty-fields-in-django from django.db.models.signals import post_save class DirtyFieldsMixin(object): def __init__(self, *args, **kwargs): super(DirtyFieldsMixin, self).__init__(*args, **kwargs) post_save.connect(reset_state, s...
625307615f0dac8801b35ac5689a92706556ad01
main.py
main.py
import struct id_i = 0 value_i = 0.0 id_i_1 = 0 value_i_1 = 1.0 number = 0 with open("sort.dat", "r") as f: for line in f: line = line.replace('(', '') line = line.replace(')', '') line = line.replace(' ', '') line = line.replace('\n', '') # print line [id, value] =...
Update the code of visualization.
Update the code of visualization.
Python
mit
SigmaQuan/NTM-Keras
Update the code of visualization.
import struct id_i = 0 value_i = 0.0 id_i_1 = 0 value_i_1 = 1.0 number = 0 with open("sort.dat", "r") as f: for line in f: line = line.replace('(', '') line = line.replace(')', '') line = line.replace(' ', '') line = line.replace('\n', '') # print line [id, value] =...
<commit_before><commit_msg>Update the code of visualization.<commit_after>
import struct id_i = 0 value_i = 0.0 id_i_1 = 0 value_i_1 = 1.0 number = 0 with open("sort.dat", "r") as f: for line in f: line = line.replace('(', '') line = line.replace(')', '') line = line.replace(' ', '') line = line.replace('\n', '') # print line [id, value] =...
Update the code of visualization.import struct id_i = 0 value_i = 0.0 id_i_1 = 0 value_i_1 = 1.0 number = 0 with open("sort.dat", "r") as f: for line in f: line = line.replace('(', '') line = line.replace(')', '') line = line.replace(' ', '') line = line.replace('\n', '') #...
<commit_before><commit_msg>Update the code of visualization.<commit_after>import struct id_i = 0 value_i = 0.0 id_i_1 = 0 value_i_1 = 1.0 number = 0 with open("sort.dat", "r") as f: for line in f: line = line.replace('(', '') line = line.replace(')', '') line = line.replace(' ', '') ...
67ea33e9e46ff321c2915d46a354d66756ff9c2b
main.py
main.py
#!/usr/bin/env python """ This is the main file for a script that reads info off a game on kongregate.com and acts upon it. """ # import line/s for builtin modules # import pyautogui __author__ = "Alex Flores Escarcega" __copyright__ = "Copyright 2007, Alex Flores Escarcega" __credits__ = ["Alex Flores Escarcega"] __...
#!/usr/bin/env python """ This is the main file for a script that reads info off a game on kongregate.com and acts upon it. """ # import line/s for builtin modules # import pyautogui __author__ = "Alex Flores Escarcega" __copyright__ = "Copyright 2007, Alex Flores Escarcega" __credits__ = ["Alex Flores Escarcega"] __...
Add method to find the coordinates of game
Add method to find the coordinates of game
Python
mit
hydrophilicsun/Automating-Endless-Expansion
#!/usr/bin/env python """ This is the main file for a script that reads info off a game on kongregate.com and acts upon it. """ # import line/s for builtin modules # import pyautogui __author__ = "Alex Flores Escarcega" __copyright__ = "Copyright 2007, Alex Flores Escarcega" __credits__ = ["Alex Flores Escarcega"] __...
#!/usr/bin/env python """ This is the main file for a script that reads info off a game on kongregate.com and acts upon it. """ # import line/s for builtin modules # import pyautogui __author__ = "Alex Flores Escarcega" __copyright__ = "Copyright 2007, Alex Flores Escarcega" __credits__ = ["Alex Flores Escarcega"] __...
<commit_before>#!/usr/bin/env python """ This is the main file for a script that reads info off a game on kongregate.com and acts upon it. """ # import line/s for builtin modules # import pyautogui __author__ = "Alex Flores Escarcega" __copyright__ = "Copyright 2007, Alex Flores Escarcega" __credits__ = ["Alex Flores...
#!/usr/bin/env python """ This is the main file for a script that reads info off a game on kongregate.com and acts upon it. """ # import line/s for builtin modules # import pyautogui __author__ = "Alex Flores Escarcega" __copyright__ = "Copyright 2007, Alex Flores Escarcega" __credits__ = ["Alex Flores Escarcega"] __...
#!/usr/bin/env python """ This is the main file for a script that reads info off a game on kongregate.com and acts upon it. """ # import line/s for builtin modules # import pyautogui __author__ = "Alex Flores Escarcega" __copyright__ = "Copyright 2007, Alex Flores Escarcega" __credits__ = ["Alex Flores Escarcega"] __...
<commit_before>#!/usr/bin/env python """ This is the main file for a script that reads info off a game on kongregate.com and acts upon it. """ # import line/s for builtin modules # import pyautogui __author__ = "Alex Flores Escarcega" __copyright__ = "Copyright 2007, Alex Flores Escarcega" __credits__ = ["Alex Flores...
8b6daefb98c20ddb288604f7aa2202c21df2c526
main.py
main.py
__author__ = 'alex' print 45 print 54
_author__ = 'alex' import sys import xml.dom.minidom as dom def get_Res_Matrix(length,nodes,nets_d,elem_type): Res = [[[] for j in range(length)] for i in range(length)] for i in range(nodes.length): if nodes[i].nodeType != elem_type: continue name = nodes[i].nodeName if name == "diode"...
Read and parse xml to Matrix
Read and parse xml to Matrix
Python
mit
BaydinAlexey/proglangs_baydin,BaydinAlexey/proglangs_baydin
__author__ = 'alex' print 45 print 54Read and parse xml to Matrix
_author__ = 'alex' import sys import xml.dom.minidom as dom def get_Res_Matrix(length,nodes,nets_d,elem_type): Res = [[[] for j in range(length)] for i in range(length)] for i in range(nodes.length): if nodes[i].nodeType != elem_type: continue name = nodes[i].nodeName if name == "diode"...
<commit_before>__author__ = 'alex' print 45 print 54<commit_msg>Read and parse xml to Matrix<commit_after>
_author__ = 'alex' import sys import xml.dom.minidom as dom def get_Res_Matrix(length,nodes,nets_d,elem_type): Res = [[[] for j in range(length)] for i in range(length)] for i in range(nodes.length): if nodes[i].nodeType != elem_type: continue name = nodes[i].nodeName if name == "diode"...
__author__ = 'alex' print 45 print 54Read and parse xml to Matrix_author__ = 'alex' import sys import xml.dom.minidom as dom def get_Res_Matrix(length,nodes,nets_d,elem_type): Res = [[[] for j in range(length)] for i in range(length)] for i in range(nodes.length): if nodes[i].nodeType != elem_type: ...
<commit_before>__author__ = 'alex' print 45 print 54<commit_msg>Read and parse xml to Matrix<commit_after>_author__ = 'alex' import sys import xml.dom.minidom as dom def get_Res_Matrix(length,nodes,nets_d,elem_type): Res = [[[] for j in range(length)] for i in range(length)] for i in range(nodes.length): ...
fa2fb3387912474eff2b6c2a14d6304fcf5cd1f8
erasmus/cogs/bible/testing_server_preferences_group.py
erasmus/cogs/bible/testing_server_preferences_group.py
from __future__ import annotations from typing import TYPE_CHECKING from botus_receptus.app_commands import test_guilds_only from discord import app_commands from .daily_bread.daily_bread_preferences_group import DailyBreadPreferencesGroup if TYPE_CHECKING: from ...erasmus import Erasmus from ...l10n import...
from __future__ import annotations from typing import TYPE_CHECKING from botus_receptus.app_commands import test_guilds_only from discord import app_commands from .daily_bread.daily_bread_preferences_group import DailyBreadPreferencesGroup if TYPE_CHECKING: from ...erasmus import Erasmus from ...l10n import...
Use serverprefs localizer for TestingServerPreferencesGroup
Use serverprefs localizer for TestingServerPreferencesGroup
Python
bsd-3-clause
bryanforbes/Erasmus
from __future__ import annotations from typing import TYPE_CHECKING from botus_receptus.app_commands import test_guilds_only from discord import app_commands from .daily_bread.daily_bread_preferences_group import DailyBreadPreferencesGroup if TYPE_CHECKING: from ...erasmus import Erasmus from ...l10n import...
from __future__ import annotations from typing import TYPE_CHECKING from botus_receptus.app_commands import test_guilds_only from discord import app_commands from .daily_bread.daily_bread_preferences_group import DailyBreadPreferencesGroup if TYPE_CHECKING: from ...erasmus import Erasmus from ...l10n import...
<commit_before>from __future__ import annotations from typing import TYPE_CHECKING from botus_receptus.app_commands import test_guilds_only from discord import app_commands from .daily_bread.daily_bread_preferences_group import DailyBreadPreferencesGroup if TYPE_CHECKING: from ...erasmus import Erasmus from...
from __future__ import annotations from typing import TYPE_CHECKING from botus_receptus.app_commands import test_guilds_only from discord import app_commands from .daily_bread.daily_bread_preferences_group import DailyBreadPreferencesGroup if TYPE_CHECKING: from ...erasmus import Erasmus from ...l10n import...
from __future__ import annotations from typing import TYPE_CHECKING from botus_receptus.app_commands import test_guilds_only from discord import app_commands from .daily_bread.daily_bread_preferences_group import DailyBreadPreferencesGroup if TYPE_CHECKING: from ...erasmus import Erasmus from ...l10n import...
<commit_before>from __future__ import annotations from typing import TYPE_CHECKING from botus_receptus.app_commands import test_guilds_only from discord import app_commands from .daily_bread.daily_bread_preferences_group import DailyBreadPreferencesGroup if TYPE_CHECKING: from ...erasmus import Erasmus from...
d044576e08e06dd6a2c68ab7868c281cd2979764
wsgi.py
wsgi.py
from app import create_app from credstash import getAllSecrets import os default_env_file = '/home/ubuntu/environment' environment = 'live' if os.path.isfile(default_env_file): with open(default_env_file, 'r') as environment_file: environment = environment_file.readline().strip() # on aws get secrets an...
from credstash import getAllSecrets import os default_env_file = '/home/ubuntu/environment' environment = 'live' if os.path.isfile(default_env_file): with open(default_env_file, 'r') as environment_file: environment = environment_file.readline().strip() # on aws get secrets and export to env os.environ....
Order of imports means the config doesn't get set up properly
Order of imports means the config doesn't get set up properly
Python
mit
gov-cjwaszczuk/notifications-admin,alphagov/notifications-admin,alphagov/notifications-admin,gov-cjwaszczuk/notifications-admin,alphagov/notifications-admin,gov-cjwaszczuk/notifications-admin,gov-cjwaszczuk/notifications-admin,alphagov/notifications-admin
from app import create_app from credstash import getAllSecrets import os default_env_file = '/home/ubuntu/environment' environment = 'live' if os.path.isfile(default_env_file): with open(default_env_file, 'r') as environment_file: environment = environment_file.readline().strip() # on aws get secrets an...
from credstash import getAllSecrets import os default_env_file = '/home/ubuntu/environment' environment = 'live' if os.path.isfile(default_env_file): with open(default_env_file, 'r') as environment_file: environment = environment_file.readline().strip() # on aws get secrets and export to env os.environ....
<commit_before>from app import create_app from credstash import getAllSecrets import os default_env_file = '/home/ubuntu/environment' environment = 'live' if os.path.isfile(default_env_file): with open(default_env_file, 'r') as environment_file: environment = environment_file.readline().strip() # on aws...
from credstash import getAllSecrets import os default_env_file = '/home/ubuntu/environment' environment = 'live' if os.path.isfile(default_env_file): with open(default_env_file, 'r') as environment_file: environment = environment_file.readline().strip() # on aws get secrets and export to env os.environ....
from app import create_app from credstash import getAllSecrets import os default_env_file = '/home/ubuntu/environment' environment = 'live' if os.path.isfile(default_env_file): with open(default_env_file, 'r') as environment_file: environment = environment_file.readline().strip() # on aws get secrets an...
<commit_before>from app import create_app from credstash import getAllSecrets import os default_env_file = '/home/ubuntu/environment' environment = 'live' if os.path.isfile(default_env_file): with open(default_env_file, 'r') as environment_file: environment = environment_file.readline().strip() # on aws...
f3ec0593bb67db25c4f5af4b3b00d82d5e4e0f04
csv2ofx/mappings/gls.py
csv2ofx/mappings/gls.py
from operator import itemgetter mapping = { 'has_header': True, 'currency': 'EUR', 'delimiter': ';', 'bank': 'GLS Bank', 'account': itemgetter('Kontonummer'), # Chop up the dotted German date format and put it in ridiculous M/D/Y order 'date': lambda r: r['Buchungstag'][3:5] + '/' ...
from __future__ import absolute_import from operator import itemgetter mapping = { 'has_header': True, 'currency': 'EUR', 'delimiter': ';', 'bank': 'GLS Bank', 'account': itemgetter('Kontonummer'), # Chop up the dotted German date format and put it in ridiculous M/D/Y order 'date': lambda ...
Add import for other python versions
Add import for other python versions
Python
mit
reubano/csv2ofx,reubano/csv2ofx
from operator import itemgetter mapping = { 'has_header': True, 'currency': 'EUR', 'delimiter': ';', 'bank': 'GLS Bank', 'account': itemgetter('Kontonummer'), # Chop up the dotted German date format and put it in ridiculous M/D/Y order 'date': lambda r: r['Buchungstag'][3:5] + '/' ...
from __future__ import absolute_import from operator import itemgetter mapping = { 'has_header': True, 'currency': 'EUR', 'delimiter': ';', 'bank': 'GLS Bank', 'account': itemgetter('Kontonummer'), # Chop up the dotted German date format and put it in ridiculous M/D/Y order 'date': lambda ...
<commit_before>from operator import itemgetter mapping = { 'has_header': True, 'currency': 'EUR', 'delimiter': ';', 'bank': 'GLS Bank', 'account': itemgetter('Kontonummer'), # Chop up the dotted German date format and put it in ridiculous M/D/Y order 'date': lambda r: r['Buchungsta...
from __future__ import absolute_import from operator import itemgetter mapping = { 'has_header': True, 'currency': 'EUR', 'delimiter': ';', 'bank': 'GLS Bank', 'account': itemgetter('Kontonummer'), # Chop up the dotted German date format and put it in ridiculous M/D/Y order 'date': lambda ...
from operator import itemgetter mapping = { 'has_header': True, 'currency': 'EUR', 'delimiter': ';', 'bank': 'GLS Bank', 'account': itemgetter('Kontonummer'), # Chop up the dotted German date format and put it in ridiculous M/D/Y order 'date': lambda r: r['Buchungstag'][3:5] + '/' ...
<commit_before>from operator import itemgetter mapping = { 'has_header': True, 'currency': 'EUR', 'delimiter': ';', 'bank': 'GLS Bank', 'account': itemgetter('Kontonummer'), # Chop up the dotted German date format and put it in ridiculous M/D/Y order 'date': lambda r: r['Buchungsta...
3e52078450a4205fdfaa2d4ba2448bce3d3d19d7
gpio_components/input_devices.py
gpio_components/input_devices.py
from RPi import GPIO GPIO.setmode(GPIO.BCM) GPIO.setwarnings(False) class InputDevice(object): def __init__(self, pin): self.pin = pin GPIO.setup(pin, GPIO.IN, GPIO.PUD_UP) def is_pressed(self): return GPIO.input(self.pin) == 0 class Button(InputDevice): pass
from RPi import GPIO GPIO.setmode(GPIO.BCM) GPIO.setwarnings(False) class InputDevice(object): def __init__(self, pin=None): if pin is None: raise InputDeviceError('No GPIO pin number given') self.pin = pin self.pull = GPIO.PUD_UP self.edge = GPIO.FALLING sel...
Add wait_for_input and add_callback methods to InputDevice
Add wait_for_input and add_callback methods to InputDevice
Python
bsd-3-clause
lurch/python-gpiozero,waveform80/gpio-zero,agiledata/python-gpiozero,Gadgetoid/python-gpiozero,cymplecy/python-gpioone,RPi-Distro/python-gpiozero,MrHarcombe/python-gpiozero
from RPi import GPIO GPIO.setmode(GPIO.BCM) GPIO.setwarnings(False) class InputDevice(object): def __init__(self, pin): self.pin = pin GPIO.setup(pin, GPIO.IN, GPIO.PUD_UP) def is_pressed(self): return GPIO.input(self.pin) == 0 class Button(InputDevice): pass Add wait_for_inpu...
from RPi import GPIO GPIO.setmode(GPIO.BCM) GPIO.setwarnings(False) class InputDevice(object): def __init__(self, pin=None): if pin is None: raise InputDeviceError('No GPIO pin number given') self.pin = pin self.pull = GPIO.PUD_UP self.edge = GPIO.FALLING sel...
<commit_before>from RPi import GPIO GPIO.setmode(GPIO.BCM) GPIO.setwarnings(False) class InputDevice(object): def __init__(self, pin): self.pin = pin GPIO.setup(pin, GPIO.IN, GPIO.PUD_UP) def is_pressed(self): return GPIO.input(self.pin) == 0 class Button(InputDevice): pass <c...
from RPi import GPIO GPIO.setmode(GPIO.BCM) GPIO.setwarnings(False) class InputDevice(object): def __init__(self, pin=None): if pin is None: raise InputDeviceError('No GPIO pin number given') self.pin = pin self.pull = GPIO.PUD_UP self.edge = GPIO.FALLING sel...
from RPi import GPIO GPIO.setmode(GPIO.BCM) GPIO.setwarnings(False) class InputDevice(object): def __init__(self, pin): self.pin = pin GPIO.setup(pin, GPIO.IN, GPIO.PUD_UP) def is_pressed(self): return GPIO.input(self.pin) == 0 class Button(InputDevice): pass Add wait_for_inpu...
<commit_before>from RPi import GPIO GPIO.setmode(GPIO.BCM) GPIO.setwarnings(False) class InputDevice(object): def __init__(self, pin): self.pin = pin GPIO.setup(pin, GPIO.IN, GPIO.PUD_UP) def is_pressed(self): return GPIO.input(self.pin) == 0 class Button(InputDevice): pass <c...
2f55855ed1c1ea7862e239af76fab57f32affc0c
hamlpy/views/generic/__init__.py
hamlpy/views/generic/__init__.py
from __future__ import print_function, unicode_literals import django.views.generic pouet = [ 'ArchiveIndexView', 'YearArchiveView', 'MonthArchiveView', 'WeekArchiveView', 'DayArchiveView', 'TodayArchiveView', 'DateDetailView', 'DetailView', 'CreateView', 'UpdateView', 'DeleteView', 'ListView', ] class ...
from __future__ import print_function, unicode_literals import django.views.generic pouet = [ 'ArchiveIndexView', 'YearArchiveView', 'MonthArchiveView', 'WeekArchiveView', 'DayArchiveView', 'TodayArchiveView', 'DateDetailView', 'DetailView', 'CreateView', 'UpdateView', 'DeleteView', 'ListView', ] class ...
Fix views file Python 3 issue
Fix views file Python 3 issue
Python
mit
Psycojoker/HamlPy,nyaruka/django-hamlpy,Psycojoker/HamlPy,nyaruka/django-hamlpy,Psycojoker/HamlPy
from __future__ import print_function, unicode_literals import django.views.generic pouet = [ 'ArchiveIndexView', 'YearArchiveView', 'MonthArchiveView', 'WeekArchiveView', 'DayArchiveView', 'TodayArchiveView', 'DateDetailView', 'DetailView', 'CreateView', 'UpdateView', 'DeleteView', 'ListView', ] class ...
from __future__ import print_function, unicode_literals import django.views.generic pouet = [ 'ArchiveIndexView', 'YearArchiveView', 'MonthArchiveView', 'WeekArchiveView', 'DayArchiveView', 'TodayArchiveView', 'DateDetailView', 'DetailView', 'CreateView', 'UpdateView', 'DeleteView', 'ListView', ] class ...
<commit_before>from __future__ import print_function, unicode_literals import django.views.generic pouet = [ 'ArchiveIndexView', 'YearArchiveView', 'MonthArchiveView', 'WeekArchiveView', 'DayArchiveView', 'TodayArchiveView', 'DateDetailView', 'DetailView', 'CreateView', 'UpdateView', 'DeleteView', 'ListVi...
from __future__ import print_function, unicode_literals import django.views.generic pouet = [ 'ArchiveIndexView', 'YearArchiveView', 'MonthArchiveView', 'WeekArchiveView', 'DayArchiveView', 'TodayArchiveView', 'DateDetailView', 'DetailView', 'CreateView', 'UpdateView', 'DeleteView', 'ListView', ] class ...
from __future__ import print_function, unicode_literals import django.views.generic pouet = [ 'ArchiveIndexView', 'YearArchiveView', 'MonthArchiveView', 'WeekArchiveView', 'DayArchiveView', 'TodayArchiveView', 'DateDetailView', 'DetailView', 'CreateView', 'UpdateView', 'DeleteView', 'ListView', ] class ...
<commit_before>from __future__ import print_function, unicode_literals import django.views.generic pouet = [ 'ArchiveIndexView', 'YearArchiveView', 'MonthArchiveView', 'WeekArchiveView', 'DayArchiveView', 'TodayArchiveView', 'DateDetailView', 'DetailView', 'CreateView', 'UpdateView', 'DeleteView', 'ListVi...
f61aa6a8088721c31510beef2145e3de7a46b1f4
mako_pipeline/__init__.py
mako_pipeline/__init__.py
# coding: utf-8 ASSETS = { 'debug': False, 'media_url': '/', } def configure(data): ASSETS.update(data)
# coding: utf-8 ASSETS = { 'debug': False, 'media_url': '/', } def configure(data=None): if data: ASSETS.update(data) return ASSETS
Return config when calling configure def
Return config when calling configure def
Python
mit
rcmachado/mako-pipeline
# coding: utf-8 ASSETS = { 'debug': False, 'media_url': '/', } def configure(data): ASSETS.update(data) Return config when calling configure def
# coding: utf-8 ASSETS = { 'debug': False, 'media_url': '/', } def configure(data=None): if data: ASSETS.update(data) return ASSETS
<commit_before># coding: utf-8 ASSETS = { 'debug': False, 'media_url': '/', } def configure(data): ASSETS.update(data) <commit_msg>Return config when calling configure def<commit_after>
# coding: utf-8 ASSETS = { 'debug': False, 'media_url': '/', } def configure(data=None): if data: ASSETS.update(data) return ASSETS
# coding: utf-8 ASSETS = { 'debug': False, 'media_url': '/', } def configure(data): ASSETS.update(data) Return config when calling configure def# coding: utf-8 ASSETS = { 'debug': False, 'media_url': '/', } def configure(data=None): if data: ASSETS.update(data) return ASSETS
<commit_before># coding: utf-8 ASSETS = { 'debug': False, 'media_url': '/', } def configure(data): ASSETS.update(data) <commit_msg>Return config when calling configure def<commit_after># coding: utf-8 ASSETS = { 'debug': False, 'media_url': '/', } def configure(data=None): if data: ...
ed437d9a5b4ccb29eb5240b176773a475ff371c3
grd/urls.py
grd/urls.py
from django.conf.urls import include, url from django.contrib import admin from rest_framework import routers from rest_framework.authtoken.views import obtain_auth_token from grd import views router = routers.SimpleRouter() router.register(r'devices', views.DeviceView) urlpatterns = [ # Examples: # url(r'^...
from django.conf.urls import include, url from django.contrib import admin from rest_framework import routers from rest_framework.authtoken.views import obtain_auth_token from grd import views router = routers.DefaultRouter() router.register(r'devices', views.DeviceView) urlpatterns = [ # Examples: # url(r'...
Use DefaultRouter which includes a default API root view.
Use DefaultRouter which includes a default API root view.
Python
agpl-3.0
eReuse/grd,eReuse/grd
from django.conf.urls import include, url from django.contrib import admin from rest_framework import routers from rest_framework.authtoken.views import obtain_auth_token from grd import views router = routers.SimpleRouter() router.register(r'devices', views.DeviceView) urlpatterns = [ # Examples: # url(r'^...
from django.conf.urls import include, url from django.contrib import admin from rest_framework import routers from rest_framework.authtoken.views import obtain_auth_token from grd import views router = routers.DefaultRouter() router.register(r'devices', views.DeviceView) urlpatterns = [ # Examples: # url(r'...
<commit_before>from django.conf.urls import include, url from django.contrib import admin from rest_framework import routers from rest_framework.authtoken.views import obtain_auth_token from grd import views router = routers.SimpleRouter() router.register(r'devices', views.DeviceView) urlpatterns = [ # Examples...
from django.conf.urls import include, url from django.contrib import admin from rest_framework import routers from rest_framework.authtoken.views import obtain_auth_token from grd import views router = routers.DefaultRouter() router.register(r'devices', views.DeviceView) urlpatterns = [ # Examples: # url(r'...
from django.conf.urls import include, url from django.contrib import admin from rest_framework import routers from rest_framework.authtoken.views import obtain_auth_token from grd import views router = routers.SimpleRouter() router.register(r'devices', views.DeviceView) urlpatterns = [ # Examples: # url(r'^...
<commit_before>from django.conf.urls import include, url from django.contrib import admin from rest_framework import routers from rest_framework.authtoken.views import obtain_auth_token from grd import views router = routers.SimpleRouter() router.register(r'devices', views.DeviceView) urlpatterns = [ # Examples...
0a9f378784e8c30cdf16d4d1caaf3b98f112bb90
nap/meta.py
nap/meta.py
from __future__ import unicode_literals class Meta(object): '''Generic container for Meta classes''' def __new__(cls, meta=None): # Return a new class base on ourselves attrs = dict( (name, getattr(meta, name)) for name in dir(meta) if not name[0] == '_' ...
from __future__ import unicode_literals class Meta(object): '''Generic container for Meta classes''' def __new__(cls, meta=None): # Return a new class base on ourselves attrs = dict( (name, getattr(meta, name)) for name in dir(meta) if not name[0] == '_' and...
Make Meta class enforce only known properties
Make Meta class enforce only known properties
Python
bsd-3-clause
MarkusH/django-nap,limbera/django-nap
from __future__ import unicode_literals class Meta(object): '''Generic container for Meta classes''' def __new__(cls, meta=None): # Return a new class base on ourselves attrs = dict( (name, getattr(meta, name)) for name in dir(meta) if not name[0] == '_' ...
from __future__ import unicode_literals class Meta(object): '''Generic container for Meta classes''' def __new__(cls, meta=None): # Return a new class base on ourselves attrs = dict( (name, getattr(meta, name)) for name in dir(meta) if not name[0] == '_' and...
<commit_before>from __future__ import unicode_literals class Meta(object): '''Generic container for Meta classes''' def __new__(cls, meta=None): # Return a new class base on ourselves attrs = dict( (name, getattr(meta, name)) for name in dir(meta) if not nam...
from __future__ import unicode_literals class Meta(object): '''Generic container for Meta classes''' def __new__(cls, meta=None): # Return a new class base on ourselves attrs = dict( (name, getattr(meta, name)) for name in dir(meta) if not name[0] == '_' and...
from __future__ import unicode_literals class Meta(object): '''Generic container for Meta classes''' def __new__(cls, meta=None): # Return a new class base on ourselves attrs = dict( (name, getattr(meta, name)) for name in dir(meta) if not name[0] == '_' ...
<commit_before>from __future__ import unicode_literals class Meta(object): '''Generic container for Meta classes''' def __new__(cls, meta=None): # Return a new class base on ourselves attrs = dict( (name, getattr(meta, name)) for name in dir(meta) if not nam...
ea5bfe240cc349144e089f606534726863f2c21b
media/sites/lapinkansa.py
media/sites/lapinkansa.py
import requests from bs4 import BeautifulSoup def nouda( url , out ): r = requests.get( url ) r.encoding = 'UTF-8' soup = BeautifulSoup( r.text ) teksti = soup.find_all( class_ ='post-meta' ) for string in teksti[0].stripped_strings: out.write( string.encode('utf8') + ' ' ) if __name__ == '__main__'...
import requests from bs4 import BeautifulSoup def nouda( url , out ): r = requests.get( url ) r.encoding = 'UTF-8' soup = BeautifulSoup( r.text ) teksti = soup.find_all( class_ = 'news-excerpt' ) for string in teksti[0].stripped_strings: out.write( string.encode('utf8') + ' ' ) if __name__ == '__mai...
Fix to new page layout
Fix to new page layout
Python
mit
HIIT/digivaalit-2015,HIIT/digivaalit-2015,HIIT/digivaalit-2015
import requests from bs4 import BeautifulSoup def nouda( url , out ): r = requests.get( url ) r.encoding = 'UTF-8' soup = BeautifulSoup( r.text ) teksti = soup.find_all( class_ ='post-meta' ) for string in teksti[0].stripped_strings: out.write( string.encode('utf8') + ' ' ) if __name__ == '__main__'...
import requests from bs4 import BeautifulSoup def nouda( url , out ): r = requests.get( url ) r.encoding = 'UTF-8' soup = BeautifulSoup( r.text ) teksti = soup.find_all( class_ = 'news-excerpt' ) for string in teksti[0].stripped_strings: out.write( string.encode('utf8') + ' ' ) if __name__ == '__mai...
<commit_before>import requests from bs4 import BeautifulSoup def nouda( url , out ): r = requests.get( url ) r.encoding = 'UTF-8' soup = BeautifulSoup( r.text ) teksti = soup.find_all( class_ ='post-meta' ) for string in teksti[0].stripped_strings: out.write( string.encode('utf8') + ' ' ) if __name_...
import requests from bs4 import BeautifulSoup def nouda( url , out ): r = requests.get( url ) r.encoding = 'UTF-8' soup = BeautifulSoup( r.text ) teksti = soup.find_all( class_ = 'news-excerpt' ) for string in teksti[0].stripped_strings: out.write( string.encode('utf8') + ' ' ) if __name__ == '__mai...
import requests from bs4 import BeautifulSoup def nouda( url , out ): r = requests.get( url ) r.encoding = 'UTF-8' soup = BeautifulSoup( r.text ) teksti = soup.find_all( class_ ='post-meta' ) for string in teksti[0].stripped_strings: out.write( string.encode('utf8') + ' ' ) if __name__ == '__main__'...
<commit_before>import requests from bs4 import BeautifulSoup def nouda( url , out ): r = requests.get( url ) r.encoding = 'UTF-8' soup = BeautifulSoup( r.text ) teksti = soup.find_all( class_ ='post-meta' ) for string in teksti[0].stripped_strings: out.write( string.encode('utf8') + ' ' ) if __name_...
c2355829706b2b728ca369474157cac58f9c35d1
examples/utils.py
examples/utils.py
import subprocess import os import sys STEPS = "Step:" RESULT = "Result:" SETUP = "Setup:" def enter_depend_test(): # Simple magic for using scripts within a source tree BASEDIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) if os.path.isdir(os.path.join(BASEDIR, 'depend_test_framework')):...
import subprocess import time import re import os import sys import paramiko STEPS = "Step:" RESULT = "Result:" SETUP = "Setup:" def enter_depend_test(): # Simple magic for using scripts within a source tree BASEDIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) if os.path.isdir(os.path.jo...
Add help function to run command in guest
Add help function to run command in guest Signed-off-by: Luyao Huang <[email protected]>
Python
mit
LuyaoHuang/depend-test-framework
import subprocess import os import sys STEPS = "Step:" RESULT = "Result:" SETUP = "Setup:" def enter_depend_test(): # Simple magic for using scripts within a source tree BASEDIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) if os.path.isdir(os.path.join(BASEDIR, 'depend_test_framework')):...
import subprocess import time import re import os import sys import paramiko STEPS = "Step:" RESULT = "Result:" SETUP = "Setup:" def enter_depend_test(): # Simple magic for using scripts within a source tree BASEDIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) if os.path.isdir(os.path.jo...
<commit_before>import subprocess import os import sys STEPS = "Step:" RESULT = "Result:" SETUP = "Setup:" def enter_depend_test(): # Simple magic for using scripts within a source tree BASEDIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) if os.path.isdir(os.path.join(BASEDIR, 'depend_tes...
import subprocess import time import re import os import sys import paramiko STEPS = "Step:" RESULT = "Result:" SETUP = "Setup:" def enter_depend_test(): # Simple magic for using scripts within a source tree BASEDIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) if os.path.isdir(os.path.jo...
import subprocess import os import sys STEPS = "Step:" RESULT = "Result:" SETUP = "Setup:" def enter_depend_test(): # Simple magic for using scripts within a source tree BASEDIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) if os.path.isdir(os.path.join(BASEDIR, 'depend_test_framework')):...
<commit_before>import subprocess import os import sys STEPS = "Step:" RESULT = "Result:" SETUP = "Setup:" def enter_depend_test(): # Simple magic for using scripts within a source tree BASEDIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) if os.path.isdir(os.path.join(BASEDIR, 'depend_tes...
24520fc982d0a1a2b1b6fa7b493888fbdd3ef6a8
util/versioncheck.py
util/versioncheck.py
#!/usr/bin/python from subprocess import check_output as co from sys import exit # Actually run bin/mn rather than importing via python path version = 'Mininet ' + co( 'PYTHONPATH=. bin/mn --version', shell=True ) version = version.strip() # Find all Mininet path references lines = co( "egrep -or 'Mininet [0-9\.]+\w...
#!/usr/bin/python from subprocess import check_output as co from sys import exit # Actually run bin/mn rather than importing via python path version = 'Mininet ' + co( 'PYTHONPATH=. bin/mn --version', shell=True ) version = version.strip() # Find all Mininet path references lines = co( "egrep -or 'Mininet [0-9\.\+]+...
Allow + in version number
Allow + in version number
Python
bsd-3-clause
mininet/mininet,mininet/mininet,mininet/mininet
#!/usr/bin/python from subprocess import check_output as co from sys import exit # Actually run bin/mn rather than importing via python path version = 'Mininet ' + co( 'PYTHONPATH=. bin/mn --version', shell=True ) version = version.strip() # Find all Mininet path references lines = co( "egrep -or 'Mininet [0-9\.]+\w...
#!/usr/bin/python from subprocess import check_output as co from sys import exit # Actually run bin/mn rather than importing via python path version = 'Mininet ' + co( 'PYTHONPATH=. bin/mn --version', shell=True ) version = version.strip() # Find all Mininet path references lines = co( "egrep -or 'Mininet [0-9\.\+]+...
<commit_before>#!/usr/bin/python from subprocess import check_output as co from sys import exit # Actually run bin/mn rather than importing via python path version = 'Mininet ' + co( 'PYTHONPATH=. bin/mn --version', shell=True ) version = version.strip() # Find all Mininet path references lines = co( "egrep -or 'Min...
#!/usr/bin/python from subprocess import check_output as co from sys import exit # Actually run bin/mn rather than importing via python path version = 'Mininet ' + co( 'PYTHONPATH=. bin/mn --version', shell=True ) version = version.strip() # Find all Mininet path references lines = co( "egrep -or 'Mininet [0-9\.\+]+...
#!/usr/bin/python from subprocess import check_output as co from sys import exit # Actually run bin/mn rather than importing via python path version = 'Mininet ' + co( 'PYTHONPATH=. bin/mn --version', shell=True ) version = version.strip() # Find all Mininet path references lines = co( "egrep -or 'Mininet [0-9\.]+\w...
<commit_before>#!/usr/bin/python from subprocess import check_output as co from sys import exit # Actually run bin/mn rather than importing via python path version = 'Mininet ' + co( 'PYTHONPATH=. bin/mn --version', shell=True ) version = version.strip() # Find all Mininet path references lines = co( "egrep -or 'Min...
7a5ad08262afa4b7f4b8f580755136145d681ace
tests/apps/tornado_server/__init__.py
tests/apps/tornado_server/__init__.py
# (c) Copyright IBM Corp. 2021 # (c) Copyright Instana Inc. 2020 import os import sys from ...helpers import testenv from ..utils import launch_background_thread app_thread = None if not any((app_thread, os.environ.get('GEVENT_TEST'), os.environ.get('CASSANDRA_TEST')): testenv["tornado_port"] = 10813 testenv...
# (c) Copyright IBM Corp. 2021 # (c) Copyright Instana Inc. 2020 import os import sys from ...helpers import testenv from ..utils import launch_background_thread app_thread = None if not any((app_thread, os.environ.get('GEVENT_TEST'), os.environ.get('CASSANDRA_TEST'))): testenv["tornado_port"] = 10813 testen...
Fix expression in tornado_server app
fix(test): Fix expression in tornado_server app Signed-off-by: Ferenc Géczi <[email protected]>
Python
mit
instana/python-sensor,instana/python-sensor
# (c) Copyright IBM Corp. 2021 # (c) Copyright Instana Inc. 2020 import os import sys from ...helpers import testenv from ..utils import launch_background_thread app_thread = None if not any((app_thread, os.environ.get('GEVENT_TEST'), os.environ.get('CASSANDRA_TEST')): testenv["tornado_port"] = 10813 testenv...
# (c) Copyright IBM Corp. 2021 # (c) Copyright Instana Inc. 2020 import os import sys from ...helpers import testenv from ..utils import launch_background_thread app_thread = None if not any((app_thread, os.environ.get('GEVENT_TEST'), os.environ.get('CASSANDRA_TEST'))): testenv["tornado_port"] = 10813 testen...
<commit_before># (c) Copyright IBM Corp. 2021 # (c) Copyright Instana Inc. 2020 import os import sys from ...helpers import testenv from ..utils import launch_background_thread app_thread = None if not any((app_thread, os.environ.get('GEVENT_TEST'), os.environ.get('CASSANDRA_TEST')): testenv["tornado_port"] = 10...
# (c) Copyright IBM Corp. 2021 # (c) Copyright Instana Inc. 2020 import os import sys from ...helpers import testenv from ..utils import launch_background_thread app_thread = None if not any((app_thread, os.environ.get('GEVENT_TEST'), os.environ.get('CASSANDRA_TEST'))): testenv["tornado_port"] = 10813 testen...
# (c) Copyright IBM Corp. 2021 # (c) Copyright Instana Inc. 2020 import os import sys from ...helpers import testenv from ..utils import launch_background_thread app_thread = None if not any((app_thread, os.environ.get('GEVENT_TEST'), os.environ.get('CASSANDRA_TEST')): testenv["tornado_port"] = 10813 testenv...
<commit_before># (c) Copyright IBM Corp. 2021 # (c) Copyright Instana Inc. 2020 import os import sys from ...helpers import testenv from ..utils import launch_background_thread app_thread = None if not any((app_thread, os.environ.get('GEVENT_TEST'), os.environ.get('CASSANDRA_TEST')): testenv["tornado_port"] = 10...
6d17a7becc0ddebceba0bd77f876bf9744a2d62e
server/patch_hosts.py
server/patch_hosts.py
#!/usr/bin/env python3 import argparse from qlmdm import set_gpg from qlmdm.server import patch_hosts set_gpg('server') def parse_args(): parser = argparse.ArgumentParser(description='Queue a patch for one or ' 'more hosts') parser.add_argument('--host', action='append...
#!/usr/bin/env python3 import argparse from qlmdm import set_gpg from qlmdm.server import patch_hosts set_gpg('server') def parse_args(): parser = argparse.ArgumentParser(description='Queue a patch for one or ' 'more hosts') parser.add_argument('--host', action='append'...
Remove extra space in usage message text
Remove extra space in usage message text
Python
apache-2.0
quantopian/PenguinDome,quantopian/PenguinDome
#!/usr/bin/env python3 import argparse from qlmdm import set_gpg from qlmdm.server import patch_hosts set_gpg('server') def parse_args(): parser = argparse.ArgumentParser(description='Queue a patch for one or ' 'more hosts') parser.add_argument('--host', action='append...
#!/usr/bin/env python3 import argparse from qlmdm import set_gpg from qlmdm.server import patch_hosts set_gpg('server') def parse_args(): parser = argparse.ArgumentParser(description='Queue a patch for one or ' 'more hosts') parser.add_argument('--host', action='append'...
<commit_before>#!/usr/bin/env python3 import argparse from qlmdm import set_gpg from qlmdm.server import patch_hosts set_gpg('server') def parse_args(): parser = argparse.ArgumentParser(description='Queue a patch for one or ' 'more hosts') parser.add_argument('--host',...
#!/usr/bin/env python3 import argparse from qlmdm import set_gpg from qlmdm.server import patch_hosts set_gpg('server') def parse_args(): parser = argparse.ArgumentParser(description='Queue a patch for one or ' 'more hosts') parser.add_argument('--host', action='append'...
#!/usr/bin/env python3 import argparse from qlmdm import set_gpg from qlmdm.server import patch_hosts set_gpg('server') def parse_args(): parser = argparse.ArgumentParser(description='Queue a patch for one or ' 'more hosts') parser.add_argument('--host', action='append...
<commit_before>#!/usr/bin/env python3 import argparse from qlmdm import set_gpg from qlmdm.server import patch_hosts set_gpg('server') def parse_args(): parser = argparse.ArgumentParser(description='Queue a patch for one or ' 'more hosts') parser.add_argument('--host',...
b21d63d8df7d17e150702c531ef449f409100eff
wot_clan_battles/views_auth.py
wot_clan_battles/views_auth.py
import six from django.http import HttpResponseRedirect from django.shortcuts import reverse from django.conf import settings from openid.consumer import consumer import wargaming wot = wargaming.WoT(settings.WARGAMING_KEY, language='ru', region='ru') def auth_callback(request): oidconsumer = consumer.Consume...
import six from django.http import HttpResponseRedirect from django.shortcuts import reverse from django.conf import settings from openid.consumer import consumer import wargaming wot = wargaming.WoT(settings.WARGAMING_KEY, language='ru', region='ru') def auth_callback(request): oidconsumer = consumer.Consume...
Remove debug print from view
Remove debug print from view
Python
mit
monester/wot-battles,monester/wot-battles,monester/wot-battles,monester/wot-battles
import six from django.http import HttpResponseRedirect from django.shortcuts import reverse from django.conf import settings from openid.consumer import consumer import wargaming wot = wargaming.WoT(settings.WARGAMING_KEY, language='ru', region='ru') def auth_callback(request): oidconsumer = consumer.Consume...
import six from django.http import HttpResponseRedirect from django.shortcuts import reverse from django.conf import settings from openid.consumer import consumer import wargaming wot = wargaming.WoT(settings.WARGAMING_KEY, language='ru', region='ru') def auth_callback(request): oidconsumer = consumer.Consume...
<commit_before>import six from django.http import HttpResponseRedirect from django.shortcuts import reverse from django.conf import settings from openid.consumer import consumer import wargaming wot = wargaming.WoT(settings.WARGAMING_KEY, language='ru', region='ru') def auth_callback(request): oidconsumer = c...
import six from django.http import HttpResponseRedirect from django.shortcuts import reverse from django.conf import settings from openid.consumer import consumer import wargaming wot = wargaming.WoT(settings.WARGAMING_KEY, language='ru', region='ru') def auth_callback(request): oidconsumer = consumer.Consume...
import six from django.http import HttpResponseRedirect from django.shortcuts import reverse from django.conf import settings from openid.consumer import consumer import wargaming wot = wargaming.WoT(settings.WARGAMING_KEY, language='ru', region='ru') def auth_callback(request): oidconsumer = consumer.Consume...
<commit_before>import six from django.http import HttpResponseRedirect from django.shortcuts import reverse from django.conf import settings from openid.consumer import consumer import wargaming wot = wargaming.WoT(settings.WARGAMING_KEY, language='ru', region='ru') def auth_callback(request): oidconsumer = c...
045c1405c4b8c7bc502814672c0da36e3e4a8a15
kolibri/deployment/default/settings/debug_panel.py
kolibri/deployment/default/settings/debug_panel.py
from __future__ import absolute_import, print_function, unicode_literals from .base import * # noqa INTERNAL_IPS = ['127.0.0.1'] DEBUG_TOOLBAR_CONFIG = { "SHOW_TOOLBAR_CALLBACK": lambda x: True, } MIDDLEWARE_CLASSES = ( 'debug_panel.middleware.DebugPanelMiddleware', ) + MIDDLEWARE_CLASSES # noqa INSTALLE...
from __future__ import absolute_import, print_function, unicode_literals from .base import * # noqa INTERNAL_IPS = ['127.0.0.1'] DEBUG_TOOLBAR_CONFIG = { "SHOW_TOOLBAR_CALLBACK": lambda x: True, } MIDDLEWARE_CLASSES = ( 'debug_panel.middleware.DebugPanelMiddleware', ) + MIDDLEWARE_CLASSES # noqa INSTALLE...
Add DEBUG_PANEL_ACTIVE setting back into custom DDT settings file
Add DEBUG_PANEL_ACTIVE setting back into custom DDT settings file
Python
mit
mrpau/kolibri,mrpau/kolibri,MingDai/kolibri,DXCanas/kolibri,DXCanas/kolibri,jonboiser/kolibri,lyw07/kolibri,benjaoming/kolibri,benjaoming/kolibri,christianmemije/kolibri,learningequality/kolibri,learningequality/kolibri,christianmemije/kolibri,lyw07/kolibri,MingDai/kolibri,jonboiser/kolibri,benjaoming/kolibri,mrpau/kol...
from __future__ import absolute_import, print_function, unicode_literals from .base import * # noqa INTERNAL_IPS = ['127.0.0.1'] DEBUG_TOOLBAR_CONFIG = { "SHOW_TOOLBAR_CALLBACK": lambda x: True, } MIDDLEWARE_CLASSES = ( 'debug_panel.middleware.DebugPanelMiddleware', ) + MIDDLEWARE_CLASSES # noqa INSTALLE...
from __future__ import absolute_import, print_function, unicode_literals from .base import * # noqa INTERNAL_IPS = ['127.0.0.1'] DEBUG_TOOLBAR_CONFIG = { "SHOW_TOOLBAR_CALLBACK": lambda x: True, } MIDDLEWARE_CLASSES = ( 'debug_panel.middleware.DebugPanelMiddleware', ) + MIDDLEWARE_CLASSES # noqa INSTALLE...
<commit_before>from __future__ import absolute_import, print_function, unicode_literals from .base import * # noqa INTERNAL_IPS = ['127.0.0.1'] DEBUG_TOOLBAR_CONFIG = { "SHOW_TOOLBAR_CALLBACK": lambda x: True, } MIDDLEWARE_CLASSES = ( 'debug_panel.middleware.DebugPanelMiddleware', ) + MIDDLEWARE_CLASSES #...
from __future__ import absolute_import, print_function, unicode_literals from .base import * # noqa INTERNAL_IPS = ['127.0.0.1'] DEBUG_TOOLBAR_CONFIG = { "SHOW_TOOLBAR_CALLBACK": lambda x: True, } MIDDLEWARE_CLASSES = ( 'debug_panel.middleware.DebugPanelMiddleware', ) + MIDDLEWARE_CLASSES # noqa INSTALLE...
from __future__ import absolute_import, print_function, unicode_literals from .base import * # noqa INTERNAL_IPS = ['127.0.0.1'] DEBUG_TOOLBAR_CONFIG = { "SHOW_TOOLBAR_CALLBACK": lambda x: True, } MIDDLEWARE_CLASSES = ( 'debug_panel.middleware.DebugPanelMiddleware', ) + MIDDLEWARE_CLASSES # noqa INSTALLE...
<commit_before>from __future__ import absolute_import, print_function, unicode_literals from .base import * # noqa INTERNAL_IPS = ['127.0.0.1'] DEBUG_TOOLBAR_CONFIG = { "SHOW_TOOLBAR_CALLBACK": lambda x: True, } MIDDLEWARE_CLASSES = ( 'debug_panel.middleware.DebugPanelMiddleware', ) + MIDDLEWARE_CLASSES #...
69a417c421d774c4998ae721b85211a60757ce85
fit_blackbody.py
fit_blackbody.py
import numpy as np from scipy.optimize import curve_fit from astropy import units as u from planck import planck_function def bb_flux(wavelength, temperature, angular_radius): bb_flux = (np.pi) * planck_function(wavelength, temperature) * (angular_radius)**2 return bb_flux def bb_flux_nounits(wavelength, tem...
import numpy as np from scipy.optimize import curve_fit from astropy import units as u from planck import planck_function, dplanck_dT def bb_flux(wavelength, temperature, angular_radius): bb_flux = (np.pi) * planck_function(wavelength, temperature) * (angular_radius)**2 return bb_flux def bb_flux_nounits(wav...
Add derivative of BB flux with temperature
Add derivative of BB flux with temperature Added functions which calculate the derivative of the blackbody flux with temperature (with units and without units)
Python
mit
JALusk/SNoBoL,JALusk/SuperBoL,JALusk/SNoBoL
import numpy as np from scipy.optimize import curve_fit from astropy import units as u from planck import planck_function def bb_flux(wavelength, temperature, angular_radius): bb_flux = (np.pi) * planck_function(wavelength, temperature) * (angular_radius)**2 return bb_flux def bb_flux_nounits(wavelength, tem...
import numpy as np from scipy.optimize import curve_fit from astropy import units as u from planck import planck_function, dplanck_dT def bb_flux(wavelength, temperature, angular_radius): bb_flux = (np.pi) * planck_function(wavelength, temperature) * (angular_radius)**2 return bb_flux def bb_flux_nounits(wav...
<commit_before>import numpy as np from scipy.optimize import curve_fit from astropy import units as u from planck import planck_function def bb_flux(wavelength, temperature, angular_radius): bb_flux = (np.pi) * planck_function(wavelength, temperature) * (angular_radius)**2 return bb_flux def bb_flux_nounits(...
import numpy as np from scipy.optimize import curve_fit from astropy import units as u from planck import planck_function, dplanck_dT def bb_flux(wavelength, temperature, angular_radius): bb_flux = (np.pi) * planck_function(wavelength, temperature) * (angular_radius)**2 return bb_flux def bb_flux_nounits(wav...
import numpy as np from scipy.optimize import curve_fit from astropy import units as u from planck import planck_function def bb_flux(wavelength, temperature, angular_radius): bb_flux = (np.pi) * planck_function(wavelength, temperature) * (angular_radius)**2 return bb_flux def bb_flux_nounits(wavelength, tem...
<commit_before>import numpy as np from scipy.optimize import curve_fit from astropy import units as u from planck import planck_function def bb_flux(wavelength, temperature, angular_radius): bb_flux = (np.pi) * planck_function(wavelength, temperature) * (angular_radius)**2 return bb_flux def bb_flux_nounits(...
fcc4eb6feaf05c950bcb0cb3f5861e631dacd8d4
migrations/versions/16ef0d8ffae1_add_user_roles.py
migrations/versions/16ef0d8ffae1_add_user_roles.py
"""Add user roles Revision ID: 16ef0d8ffae1 Revises: 8acb1453abb Create Date: 2015-03-17 15:45:05.406297 """ # revision identifiers, used by Alembic. revision = '16ef0d8ffae1' down_revision = '8acb1453abb' from alembic import op import sqlalchemy as sa from findaconf import db from findaconf.models import Group ...
"""Add user roles Revision ID: 16ef0d8ffae1 Revises: 8acb1453abb Create Date: 2015-03-17 15:45:05.406297 """ # revision identifiers, used by Alembic. revision = '16ef0d8ffae1' down_revision = '8acb1453abb' from alembic import op import sqlalchemy as sa from sqlalchemy.sql import table, column from findaconf.models...
Refactor data migration for Group model
Refactor data migration for Group model Undelying explanation as in commit f580a63909166efccc8030eb36d8b2fe697f7236
Python
mit
koorukuroo/findaconf,cuducos/findaconf,koorukuroo/findaconf,cuducos/findaconf,cuducos/findaconf,koorukuroo/findaconf
"""Add user roles Revision ID: 16ef0d8ffae1 Revises: 8acb1453abb Create Date: 2015-03-17 15:45:05.406297 """ # revision identifiers, used by Alembic. revision = '16ef0d8ffae1' down_revision = '8acb1453abb' from alembic import op import sqlalchemy as sa from findaconf import db from findaconf.models import Group ...
"""Add user roles Revision ID: 16ef0d8ffae1 Revises: 8acb1453abb Create Date: 2015-03-17 15:45:05.406297 """ # revision identifiers, used by Alembic. revision = '16ef0d8ffae1' down_revision = '8acb1453abb' from alembic import op import sqlalchemy as sa from sqlalchemy.sql import table, column from findaconf.models...
<commit_before>"""Add user roles Revision ID: 16ef0d8ffae1 Revises: 8acb1453abb Create Date: 2015-03-17 15:45:05.406297 """ # revision identifiers, used by Alembic. revision = '16ef0d8ffae1' down_revision = '8acb1453abb' from alembic import op import sqlalchemy as sa from findaconf import db from findaconf.models ...
"""Add user roles Revision ID: 16ef0d8ffae1 Revises: 8acb1453abb Create Date: 2015-03-17 15:45:05.406297 """ # revision identifiers, used by Alembic. revision = '16ef0d8ffae1' down_revision = '8acb1453abb' from alembic import op import sqlalchemy as sa from sqlalchemy.sql import table, column from findaconf.models...
"""Add user roles Revision ID: 16ef0d8ffae1 Revises: 8acb1453abb Create Date: 2015-03-17 15:45:05.406297 """ # revision identifiers, used by Alembic. revision = '16ef0d8ffae1' down_revision = '8acb1453abb' from alembic import op import sqlalchemy as sa from findaconf import db from findaconf.models import Group ...
<commit_before>"""Add user roles Revision ID: 16ef0d8ffae1 Revises: 8acb1453abb Create Date: 2015-03-17 15:45:05.406297 """ # revision identifiers, used by Alembic. revision = '16ef0d8ffae1' down_revision = '8acb1453abb' from alembic import op import sqlalchemy as sa from findaconf import db from findaconf.models ...
eddf3ec729fd385fd3ec2ec425db1d777a302e46
tensorprob/distributions/exponential.py
tensorprob/distributions/exponential.py
import tensorflow as tf from .. import config from ..distribution import Distribution @Distribution def Exponential(lambda_, name=None): X = tf.placeholder(config.dtype, name=name) Distribution.logp = tf.log(lambda_) - lambda_*X def cdf(lim): return tf.constant(1, dtype=config.dtype) - tf.exp(-...
import tensorflow as tf from .. import config from ..distribution import Distribution @Distribution def Exponential(lambda_, name=None): X = tf.placeholder(config.dtype, name=name) Distribution.logp = tf.log(lambda_) - lambda_*X def integral(lower, upper): return tf.exp(-lambda_*lower) - tf.exp...
Correct integral used for Exponential distributon
Correct integral used for Exponential distributon
Python
mit
ibab/tensorprob,tensorprob/tensorprob,ibab/tensorfit
import tensorflow as tf from .. import config from ..distribution import Distribution @Distribution def Exponential(lambda_, name=None): X = tf.placeholder(config.dtype, name=name) Distribution.logp = tf.log(lambda_) - lambda_*X def cdf(lim): return tf.constant(1, dtype=config.dtype) - tf.exp(-...
import tensorflow as tf from .. import config from ..distribution import Distribution @Distribution def Exponential(lambda_, name=None): X = tf.placeholder(config.dtype, name=name) Distribution.logp = tf.log(lambda_) - lambda_*X def integral(lower, upper): return tf.exp(-lambda_*lower) - tf.exp...
<commit_before>import tensorflow as tf from .. import config from ..distribution import Distribution @Distribution def Exponential(lambda_, name=None): X = tf.placeholder(config.dtype, name=name) Distribution.logp = tf.log(lambda_) - lambda_*X def cdf(lim): return tf.constant(1, dtype=config.dt...
import tensorflow as tf from .. import config from ..distribution import Distribution @Distribution def Exponential(lambda_, name=None): X = tf.placeholder(config.dtype, name=name) Distribution.logp = tf.log(lambda_) - lambda_*X def integral(lower, upper): return tf.exp(-lambda_*lower) - tf.exp...
import tensorflow as tf from .. import config from ..distribution import Distribution @Distribution def Exponential(lambda_, name=None): X = tf.placeholder(config.dtype, name=name) Distribution.logp = tf.log(lambda_) - lambda_*X def cdf(lim): return tf.constant(1, dtype=config.dtype) - tf.exp(-...
<commit_before>import tensorflow as tf from .. import config from ..distribution import Distribution @Distribution def Exponential(lambda_, name=None): X = tf.placeholder(config.dtype, name=name) Distribution.logp = tf.log(lambda_) - lambda_*X def cdf(lim): return tf.constant(1, dtype=config.dt...
56902792b2a7fdd25bd64781e9e98a63db2ee348
all/__init__.py
all/__init__.py
###---------------------------------------------------------------------------- from .help import HyperHelpCommand, HyperHelpNavigateCommand from .help import HyperHelpListener ###----------------------------------------------------------------------------
###---------------------------------------------------------------------------- __version_tuple = (1, 0, 0) __version__ = ".".join([str(num) for num in __version_tuple]) # These are exposed to Sublime to implement the core of the help system. from .help import HyperHelpCommand, HyperHelpNavigateCommand from .help im...
Include a package version number
Include a package version number This includes in the core package the concept of a version number that underlying code could use to determine what version of the core it is interfacing with. This is only really needed for packages that get at the underlying core code in hyperhelp, which at the moment would only be t...
Python
mit
OdatNurd/hyperhelp
###---------------------------------------------------------------------------- from .help import HyperHelpCommand, HyperHelpNavigateCommand from .help import HyperHelpListener ###---------------------------------------------------------------------------- Include a package version number This includes in the core...
###---------------------------------------------------------------------------- __version_tuple = (1, 0, 0) __version__ = ".".join([str(num) for num in __version_tuple]) # These are exposed to Sublime to implement the core of the help system. from .help import HyperHelpCommand, HyperHelpNavigateCommand from .help im...
<commit_before>###---------------------------------------------------------------------------- from .help import HyperHelpCommand, HyperHelpNavigateCommand from .help import HyperHelpListener ###---------------------------------------------------------------------------- <commit_msg>Include a package version number...
###---------------------------------------------------------------------------- __version_tuple = (1, 0, 0) __version__ = ".".join([str(num) for num in __version_tuple]) # These are exposed to Sublime to implement the core of the help system. from .help import HyperHelpCommand, HyperHelpNavigateCommand from .help im...
###---------------------------------------------------------------------------- from .help import HyperHelpCommand, HyperHelpNavigateCommand from .help import HyperHelpListener ###---------------------------------------------------------------------------- Include a package version number This includes in the core...
<commit_before>###---------------------------------------------------------------------------- from .help import HyperHelpCommand, HyperHelpNavigateCommand from .help import HyperHelpListener ###---------------------------------------------------------------------------- <commit_msg>Include a package version number...
28d48dd681dd20d839aa0748ee478947a0eb3da0
hiss/__init__.py
hiss/__init__.py
import pygame class Sprite(): def __init__(self, name): self.name = name self.costumes = [] def addCostume(self, costumePath): costume = pygame.image.load(costumePath) self.costumes.append(costume)
import pygame, time, random class Stage(): def __init__(self, name): self.name = name self.costumes = [] def addCostume(self, costumePath): costume = pygame.image.load(costumePath) self.costumes.append(costume) class Sprite(Stage): def __init__(self, name): ...
Split Sprite and Stage, begin code
Split Sprite and Stage, begin code The way I see it, sprites should be an extension of the stage. After all, the stage is like one big sprite that can't move. Also, begin code has been added.
Python
mit
PySlither/Slither,PySlither/Slither
import pygame class Sprite(): def __init__(self, name): self.name = name self.costumes = [] def addCostume(self, costumePath): costume = pygame.image.load(costumePath) self.costumes.append(costume) Split Sprite and Stage, begin code The way I see it, sprites should be an exten...
import pygame, time, random class Stage(): def __init__(self, name): self.name = name self.costumes = [] def addCostume(self, costumePath): costume = pygame.image.load(costumePath) self.costumes.append(costume) class Sprite(Stage): def __init__(self, name): ...
<commit_before>import pygame class Sprite(): def __init__(self, name): self.name = name self.costumes = [] def addCostume(self, costumePath): costume = pygame.image.load(costumePath) self.costumes.append(costume) <commit_msg>Split Sprite and Stage, begin code The way I see it,...
import pygame, time, random class Stage(): def __init__(self, name): self.name = name self.costumes = [] def addCostume(self, costumePath): costume = pygame.image.load(costumePath) self.costumes.append(costume) class Sprite(Stage): def __init__(self, name): ...
import pygame class Sprite(): def __init__(self, name): self.name = name self.costumes = [] def addCostume(self, costumePath): costume = pygame.image.load(costumePath) self.costumes.append(costume) Split Sprite and Stage, begin code The way I see it, sprites should be an exten...
<commit_before>import pygame class Sprite(): def __init__(self, name): self.name = name self.costumes = [] def addCostume(self, costumePath): costume = pygame.image.load(costumePath) self.costumes.append(costume) <commit_msg>Split Sprite and Stage, begin code The way I see it,...
eef8c0c99a6a02602cc9da75eadf180e65ad55b0
collectd_haproxy/__init__.py
collectd_haproxy/__init__.py
version_info = (1, 0, 1) __version__ = ".".join(map(str, version_info)) try: import collectd collectd_present = True except ImportError: collectd_present = False from .plugin import HAProxyPlugin if collectd_present: HAProxyPlugin.register(collectd)
try: import collectd collectd_present = True except ImportError: collectd_present = False from .plugin import HAProxyPlugin version_info = (1, 0, 1) __version__ = ".".join(map(str, version_info)) if collectd_present: HAProxyPlugin.register(collectd)
Fix style test complaing about non-top import.
Fix style test complaing about non-top import.
Python
mit
wglass/collectd-haproxy
version_info = (1, 0, 1) __version__ = ".".join(map(str, version_info)) try: import collectd collectd_present = True except ImportError: collectd_present = False from .plugin import HAProxyPlugin if collectd_present: HAProxyPlugin.register(collectd) Fix style test complaing about non-top import.
try: import collectd collectd_present = True except ImportError: collectd_present = False from .plugin import HAProxyPlugin version_info = (1, 0, 1) __version__ = ".".join(map(str, version_info)) if collectd_present: HAProxyPlugin.register(collectd)
<commit_before>version_info = (1, 0, 1) __version__ = ".".join(map(str, version_info)) try: import collectd collectd_present = True except ImportError: collectd_present = False from .plugin import HAProxyPlugin if collectd_present: HAProxyPlugin.register(collectd) <commit_msg>Fix style test complai...
try: import collectd collectd_present = True except ImportError: collectd_present = False from .plugin import HAProxyPlugin version_info = (1, 0, 1) __version__ = ".".join(map(str, version_info)) if collectd_present: HAProxyPlugin.register(collectd)
version_info = (1, 0, 1) __version__ = ".".join(map(str, version_info)) try: import collectd collectd_present = True except ImportError: collectd_present = False from .plugin import HAProxyPlugin if collectd_present: HAProxyPlugin.register(collectd) Fix style test complaing about non-top import.try...
<commit_before>version_info = (1, 0, 1) __version__ = ".".join(map(str, version_info)) try: import collectd collectd_present = True except ImportError: collectd_present = False from .plugin import HAProxyPlugin if collectd_present: HAProxyPlugin.register(collectd) <commit_msg>Fix style test complai...
342515edc89d6666a5dc9064de7d2ceea9a7b468
accelerator/tests/test_program_cycle.py
accelerator/tests/test_program_cycle.py
# MIT License # Copyright (c) 2017 MassChallenge, Inc. from __future__ import unicode_literals from django.test import TestCase from accelerator.tests.factories import ProgramCycleFactory class TestProgramCycle(TestCase): def test_display_name_no_short_name(self): cycle = ProgramCycleFactory(short_name...
# MIT License # Copyright (c) 2017 MassChallenge, Inc. from __future__ import unicode_literals from django.test import TestCase from accelerator.tests.factories import ProgramCycleFactory class TestProgramCycle(TestCase): def test_display_name_no_short_name(self): cycle = ProgramCycleFactory(short_name...
Add tests for the functionality added
[AC-7049] Add tests for the functionality added
Python
mit
masschallenge/django-accelerator,masschallenge/django-accelerator
# MIT License # Copyright (c) 2017 MassChallenge, Inc. from __future__ import unicode_literals from django.test import TestCase from accelerator.tests.factories import ProgramCycleFactory class TestProgramCycle(TestCase): def test_display_name_no_short_name(self): cycle = ProgramCycleFactory(short_name...
# MIT License # Copyright (c) 2017 MassChallenge, Inc. from __future__ import unicode_literals from django.test import TestCase from accelerator.tests.factories import ProgramCycleFactory class TestProgramCycle(TestCase): def test_display_name_no_short_name(self): cycle = ProgramCycleFactory(short_name...
<commit_before># MIT License # Copyright (c) 2017 MassChallenge, Inc. from __future__ import unicode_literals from django.test import TestCase from accelerator.tests.factories import ProgramCycleFactory class TestProgramCycle(TestCase): def test_display_name_no_short_name(self): cycle = ProgramCycleFac...
# MIT License # Copyright (c) 2017 MassChallenge, Inc. from __future__ import unicode_literals from django.test import TestCase from accelerator.tests.factories import ProgramCycleFactory class TestProgramCycle(TestCase): def test_display_name_no_short_name(self): cycle = ProgramCycleFactory(short_name...
# MIT License # Copyright (c) 2017 MassChallenge, Inc. from __future__ import unicode_literals from django.test import TestCase from accelerator.tests.factories import ProgramCycleFactory class TestProgramCycle(TestCase): def test_display_name_no_short_name(self): cycle = ProgramCycleFactory(short_name...
<commit_before># MIT License # Copyright (c) 2017 MassChallenge, Inc. from __future__ import unicode_literals from django.test import TestCase from accelerator.tests.factories import ProgramCycleFactory class TestProgramCycle(TestCase): def test_display_name_no_short_name(self): cycle = ProgramCycleFac...
8e10801ab28b3db02b301c27966aeaabc154329b
opps/core/models/image.py
opps/core/models/image.py
# -*- coding: utf-8 -*- from django.db import models from django.utils.translation import ugettext_lazy as _ from opps.core.models.publishable import Publishable class Image(Publishable): title = models.CharField(_(u"Title"), max_length=140) slug = models.SlugField(_(u"Slug"), max_length=150, blank=True) ...
# -*- coding: utf-8 -*- from django.db import models from django.utils.translation import ugettext_lazy as _ from opps.core.models.publishable import Publishable from opps.core.models import Source class Image(Publishable): title = models.CharField(_(u"Title"), max_length=140) slug = models.SlugField(_(u"S...
Change credit to source models
Change credit to source models
Python
mit
opps/opps,williamroot/opps,jeanmask/opps,williamroot/opps,opps/opps,williamroot/opps,YACOWS/opps,jeanmask/opps,YACOWS/opps,opps/opps,jeanmask/opps,jeanmask/opps,YACOWS/opps,williamroot/opps,YACOWS/opps,opps/opps
# -*- coding: utf-8 -*- from django.db import models from django.utils.translation import ugettext_lazy as _ from opps.core.models.publishable import Publishable class Image(Publishable): title = models.CharField(_(u"Title"), max_length=140) slug = models.SlugField(_(u"Slug"), max_length=150, blank=True) ...
# -*- coding: utf-8 -*- from django.db import models from django.utils.translation import ugettext_lazy as _ from opps.core.models.publishable import Publishable from opps.core.models import Source class Image(Publishable): title = models.CharField(_(u"Title"), max_length=140) slug = models.SlugField(_(u"S...
<commit_before># -*- coding: utf-8 -*- from django.db import models from django.utils.translation import ugettext_lazy as _ from opps.core.models.publishable import Publishable class Image(Publishable): title = models.CharField(_(u"Title"), max_length=140) slug = models.SlugField(_(u"Slug"), max_length=150...
# -*- coding: utf-8 -*- from django.db import models from django.utils.translation import ugettext_lazy as _ from opps.core.models.publishable import Publishable from opps.core.models import Source class Image(Publishable): title = models.CharField(_(u"Title"), max_length=140) slug = models.SlugField(_(u"S...
# -*- coding: utf-8 -*- from django.db import models from django.utils.translation import ugettext_lazy as _ from opps.core.models.publishable import Publishable class Image(Publishable): title = models.CharField(_(u"Title"), max_length=140) slug = models.SlugField(_(u"Slug"), max_length=150, blank=True) ...
<commit_before># -*- coding: utf-8 -*- from django.db import models from django.utils.translation import ugettext_lazy as _ from opps.core.models.publishable import Publishable class Image(Publishable): title = models.CharField(_(u"Title"), max_length=140) slug = models.SlugField(_(u"Slug"), max_length=150...
6dd1881fc2631602d7e34aede208abf42ed688aa
renderMenu.py
renderMenu.py
#!/usr/bin/env python import json, os, requests from awsauth import S3Auth from datetime import datetime from pytz import timezone from flask import Flask, render_template, url_for from models import app, db, FoodMenu, FoodServices MIXPANEL_TOKEN = os.environ.get('MIXPANEL_TOKEN') @app.route('/') def renderMenu(): n...
#!/usr/bin/env python import json, os, requests from awsauth import S3Auth from datetime import datetime from pytz import timezone from flask import Flask, render_template, url_for, jsonify from models import app, db, FoodMenu, FoodServices MIXPANEL_TOKEN = os.environ.get('MIXPANEL_TOKEN') @app.route('/') def renderM...
Add API endpoints to serve data in JSON format.
Add API endpoints to serve data in JSON format.
Python
mit
alykhank/FoodMenu,alykhank/FoodMenu,alykhank/FoodMenu
#!/usr/bin/env python import json, os, requests from awsauth import S3Auth from datetime import datetime from pytz import timezone from flask import Flask, render_template, url_for from models import app, db, FoodMenu, FoodServices MIXPANEL_TOKEN = os.environ.get('MIXPANEL_TOKEN') @app.route('/') def renderMenu(): n...
#!/usr/bin/env python import json, os, requests from awsauth import S3Auth from datetime import datetime from pytz import timezone from flask import Flask, render_template, url_for, jsonify from models import app, db, FoodMenu, FoodServices MIXPANEL_TOKEN = os.environ.get('MIXPANEL_TOKEN') @app.route('/') def renderM...
<commit_before>#!/usr/bin/env python import json, os, requests from awsauth import S3Auth from datetime import datetime from pytz import timezone from flask import Flask, render_template, url_for from models import app, db, FoodMenu, FoodServices MIXPANEL_TOKEN = os.environ.get('MIXPANEL_TOKEN') @app.route('/') def r...
#!/usr/bin/env python import json, os, requests from awsauth import S3Auth from datetime import datetime from pytz import timezone from flask import Flask, render_template, url_for, jsonify from models import app, db, FoodMenu, FoodServices MIXPANEL_TOKEN = os.environ.get('MIXPANEL_TOKEN') @app.route('/') def renderM...
#!/usr/bin/env python import json, os, requests from awsauth import S3Auth from datetime import datetime from pytz import timezone from flask import Flask, render_template, url_for from models import app, db, FoodMenu, FoodServices MIXPANEL_TOKEN = os.environ.get('MIXPANEL_TOKEN') @app.route('/') def renderMenu(): n...
<commit_before>#!/usr/bin/env python import json, os, requests from awsauth import S3Auth from datetime import datetime from pytz import timezone from flask import Flask, render_template, url_for from models import app, db, FoodMenu, FoodServices MIXPANEL_TOKEN = os.environ.get('MIXPANEL_TOKEN') @app.route('/') def r...
3b79447e1027cc4965ab3272c34740b82d79c66c
tools/perf/benchmarks/start_with_url.py
tools/perf/benchmarks/start_with_url.py
# Copyright 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. from measurements import startup import page_sets from telemetry import benchmark @benchmark.Disabled class StartWithUrlCold(benchmark.Benchmark): """Mea...
# Copyright 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. from measurements import startup import page_sets from telemetry import benchmark @benchmark.Enabled('android', 'has tabs') class StartWithUrlCold(benchmar...
Enable statup_with_url.cold benchmark on android.
Enable statup_with_url.cold benchmark on android. The benchmark works locally, and collects an important datapoint for our current optimization work. Review URL: https://codereview.chromium.org/508303004 Cr-Commit-Position: 972c6d2dc6dd5efdad1377c0d224e03eb8f276f7@{#298526}
Python
bsd-3-clause
axinging/chromium-crosswalk,mohamed--abdel-maksoud/chromium.src,fujunwei/chromium-crosswalk,TheTypoMaster/chromium-crosswalk,markYoungH/chromium.src,M4sse/chromium.src,markYoungH/chromium.src,jaruba/chromium.src,M4sse/chromium.src,chuan9/chromium-crosswalk,Jonekee/chromium.src,mohamed--abdel-maksoud/chromium.src,dushu1...
# Copyright 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. from measurements import startup import page_sets from telemetry import benchmark @benchmark.Disabled class StartWithUrlCold(benchmark.Benchmark): """Mea...
# Copyright 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. from measurements import startup import page_sets from telemetry import benchmark @benchmark.Enabled('android', 'has tabs') class StartWithUrlCold(benchmar...
<commit_before># Copyright 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. from measurements import startup import page_sets from telemetry import benchmark @benchmark.Disabled class StartWithUrlCold(benchmark.Bench...
# Copyright 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. from measurements import startup import page_sets from telemetry import benchmark @benchmark.Enabled('android', 'has tabs') class StartWithUrlCold(benchmar...
# Copyright 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. from measurements import startup import page_sets from telemetry import benchmark @benchmark.Disabled class StartWithUrlCold(benchmark.Benchmark): """Mea...
<commit_before># Copyright 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. from measurements import startup import page_sets from telemetry import benchmark @benchmark.Disabled class StartWithUrlCold(benchmark.Bench...
f177e6acbafa514f6e6ac4563cb92c49f3213618
data_structures/Stack/Python/Stack.py
data_structures/Stack/Python/Stack.py
# Author: AlexBanks97 # Purpose: LIFO Stack implementation using python array. # Date: October 15th 2017 class Stack(object): def __init__(self): # Initialize stack as empty array self.stack = []
# Author: AlexBanks97 # Purpose: LIFO Stack implementation using python array. # Date: October 15th 2017 class Stack(object): def __init__(self): # Initialize stack as empty array self.stack = [] # Return and remove the last element of the stack array. def pop(self): # If the stack...
Add pop method and implementation
Add pop method and implementation
Python
cc0-1.0
ZoranPandovski/al-go-rithms,Cnidarias/al-go-rithms,ZoranPandovski/al-go-rithms,EUNIX-TRIX/al-go-rithms,manikTharaka/al-go-rithms,ZoranPandovski/al-go-rithms,Deepak345/al-go-rithms,ZoranPandovski/al-go-rithms,EUNIX-TRIX/al-go-rithms,ZoranPandovski/al-go-rithms,Cnidarias/al-go-rithms,manikTharaka/al-go-rithms,Deepak345/a...
# Author: AlexBanks97 # Purpose: LIFO Stack implementation using python array. # Date: October 15th 2017 class Stack(object): def __init__(self): # Initialize stack as empty array self.stack = [] Add pop method and implementation
# Author: AlexBanks97 # Purpose: LIFO Stack implementation using python array. # Date: October 15th 2017 class Stack(object): def __init__(self): # Initialize stack as empty array self.stack = [] # Return and remove the last element of the stack array. def pop(self): # If the stack...
<commit_before># Author: AlexBanks97 # Purpose: LIFO Stack implementation using python array. # Date: October 15th 2017 class Stack(object): def __init__(self): # Initialize stack as empty array self.stack = [] <commit_msg>Add pop method and implementation<commit_after>
# Author: AlexBanks97 # Purpose: LIFO Stack implementation using python array. # Date: October 15th 2017 class Stack(object): def __init__(self): # Initialize stack as empty array self.stack = [] # Return and remove the last element of the stack array. def pop(self): # If the stack...
# Author: AlexBanks97 # Purpose: LIFO Stack implementation using python array. # Date: October 15th 2017 class Stack(object): def __init__(self): # Initialize stack as empty array self.stack = [] Add pop method and implementation# Author: AlexBanks97 # Purpose: LIFO Stack implementation using pytho...
<commit_before># Author: AlexBanks97 # Purpose: LIFO Stack implementation using python array. # Date: October 15th 2017 class Stack(object): def __init__(self): # Initialize stack as empty array self.stack = [] <commit_msg>Add pop method and implementation<commit_after># Author: AlexBanks97 # Purpo...
e0ce0095fd488852a7d565ecaf49eba0b8dbd7d5
db/sql_server/pyodbc.py
db/sql_server/pyodbc.py
from django.db import connection from django.db.models.fields import * from south.db import generic class DatabaseOperations(generic.DatabaseOperations): """ django-pyodbc (sql_server.pyodbc) implementation of database operations. """ def create_table(self, table_name, fields): # Tweak stuff a...
from django.db import connection from django.db.models.fields import * from south.db import generic class DatabaseOperations(generic.DatabaseOperations): """ django-pyodbc (sql_server.pyodbc) implementation of database operations. """ add_column_string = 'ALTER TABLE %s ADD %s;' def create_ta...
Add column support for sql server
Add column support for sql server --HG-- extra : convert_revision : svn%3A69d324d9-c39d-4fdc-8679-7745eae9e2c8/trunk%40111
Python
apache-2.0
theatlantic/django-south,theatlantic/django-south
from django.db import connection from django.db.models.fields import * from south.db import generic class DatabaseOperations(generic.DatabaseOperations): """ django-pyodbc (sql_server.pyodbc) implementation of database operations. """ def create_table(self, table_name, fields): # Tweak stuff a...
from django.db import connection from django.db.models.fields import * from south.db import generic class DatabaseOperations(generic.DatabaseOperations): """ django-pyodbc (sql_server.pyodbc) implementation of database operations. """ add_column_string = 'ALTER TABLE %s ADD %s;' def create_ta...
<commit_before>from django.db import connection from django.db.models.fields import * from south.db import generic class DatabaseOperations(generic.DatabaseOperations): """ django-pyodbc (sql_server.pyodbc) implementation of database operations. """ def create_table(self, table_name, fields): ...
from django.db import connection from django.db.models.fields import * from south.db import generic class DatabaseOperations(generic.DatabaseOperations): """ django-pyodbc (sql_server.pyodbc) implementation of database operations. """ add_column_string = 'ALTER TABLE %s ADD %s;' def create_ta...
from django.db import connection from django.db.models.fields import * from south.db import generic class DatabaseOperations(generic.DatabaseOperations): """ django-pyodbc (sql_server.pyodbc) implementation of database operations. """ def create_table(self, table_name, fields): # Tweak stuff a...
<commit_before>from django.db import connection from django.db.models.fields import * from south.db import generic class DatabaseOperations(generic.DatabaseOperations): """ django-pyodbc (sql_server.pyodbc) implementation of database operations. """ def create_table(self, table_name, fields): ...
98405875fd8ec682caa04244a900e6ce9eac9acb
pavement.py
pavement.py
import sys from paver.easy import task, needs, path, sh, cmdopts, options from paver.setuputils import setup, install_distutils_tasks from distutils.extension import Extension from distutils.dep_util import newer sys.path.insert(0, path('.').abspath()) import version setup(name='microdrop-plugin-manager', vers...
import platform import sys from paver.easy import task, needs, path, sh, cmdopts, options from paver.setuputils import setup, install_distutils_tasks from distutils.extension import Extension from distutils.dep_util import newer sys.path.insert(0, path('.').abspath()) import version install_requires = ['configobj',...
Add pywin32 as Windows required package
[FIX] Add pywin32 as Windows required package
Python
bsd-3-clause
wheeler-microfluidics/mpm
import sys from paver.easy import task, needs, path, sh, cmdopts, options from paver.setuputils import setup, install_distutils_tasks from distutils.extension import Extension from distutils.dep_util import newer sys.path.insert(0, path('.').abspath()) import version setup(name='microdrop-plugin-manager', vers...
import platform import sys from paver.easy import task, needs, path, sh, cmdopts, options from paver.setuputils import setup, install_distutils_tasks from distutils.extension import Extension from distutils.dep_util import newer sys.path.insert(0, path('.').abspath()) import version install_requires = ['configobj',...
<commit_before>import sys from paver.easy import task, needs, path, sh, cmdopts, options from paver.setuputils import setup, install_distutils_tasks from distutils.extension import Extension from distutils.dep_util import newer sys.path.insert(0, path('.').abspath()) import version setup(name='microdrop-plugin-manag...
import platform import sys from paver.easy import task, needs, path, sh, cmdopts, options from paver.setuputils import setup, install_distutils_tasks from distutils.extension import Extension from distutils.dep_util import newer sys.path.insert(0, path('.').abspath()) import version install_requires = ['configobj',...
import sys from paver.easy import task, needs, path, sh, cmdopts, options from paver.setuputils import setup, install_distutils_tasks from distutils.extension import Extension from distutils.dep_util import newer sys.path.insert(0, path('.').abspath()) import version setup(name='microdrop-plugin-manager', vers...
<commit_before>import sys from paver.easy import task, needs, path, sh, cmdopts, options from paver.setuputils import setup, install_distutils_tasks from distutils.extension import Extension from distutils.dep_util import newer sys.path.insert(0, path('.').abspath()) import version setup(name='microdrop-plugin-manag...
db2c50de660228745cc9a7fafaaa9b3d9e451aee
python/src/setup.py
python/src/setup.py
"""Setup specs for packaging, distributing, and installing gcs lib.""" import distribute_setup distribute_setup.use_setuptools() import setuptools setuptools.setup( name="GoogleAppEngineCloudStorageClient", version="1.8.3.1", packages=setuptools.find_packages(), author="Google App Engine", auth...
"""Setup specs for packaging, distributing, and installing gcs lib.""" import distribute_setup distribute_setup.use_setuptools() import setuptools setuptools.setup( name="GoogleAppEngineCloudStorageClient", version="1.9.0.0", packages=setuptools.find_packages(), author="Google App Engine", auth...
Create PyPI Release for 1.9.0.0.
PYTHON: Create PyPI Release for 1.9.0.0. Revision created by MOE tool push_codebase. MOE_MIGRATION=6943
Python
apache-2.0
aozarov/appengine-gcs-client,GoogleCloudPlatform/appengine-gcs-client,GoogleCloudPlatform/appengine-gcs-client,aozarov/appengine-gcs-client,GoogleCloudPlatform/appengine-gcs-client,aozarov/appengine-gcs-client
"""Setup specs for packaging, distributing, and installing gcs lib.""" import distribute_setup distribute_setup.use_setuptools() import setuptools setuptools.setup( name="GoogleAppEngineCloudStorageClient", version="1.8.3.1", packages=setuptools.find_packages(), author="Google App Engine", auth...
"""Setup specs for packaging, distributing, and installing gcs lib.""" import distribute_setup distribute_setup.use_setuptools() import setuptools setuptools.setup( name="GoogleAppEngineCloudStorageClient", version="1.9.0.0", packages=setuptools.find_packages(), author="Google App Engine", auth...
<commit_before>"""Setup specs for packaging, distributing, and installing gcs lib.""" import distribute_setup distribute_setup.use_setuptools() import setuptools setuptools.setup( name="GoogleAppEngineCloudStorageClient", version="1.8.3.1", packages=setuptools.find_packages(), author="Google App En...
"""Setup specs for packaging, distributing, and installing gcs lib.""" import distribute_setup distribute_setup.use_setuptools() import setuptools setuptools.setup( name="GoogleAppEngineCloudStorageClient", version="1.9.0.0", packages=setuptools.find_packages(), author="Google App Engine", auth...
"""Setup specs for packaging, distributing, and installing gcs lib.""" import distribute_setup distribute_setup.use_setuptools() import setuptools setuptools.setup( name="GoogleAppEngineCloudStorageClient", version="1.8.3.1", packages=setuptools.find_packages(), author="Google App Engine", auth...
<commit_before>"""Setup specs for packaging, distributing, and installing gcs lib.""" import distribute_setup distribute_setup.use_setuptools() import setuptools setuptools.setup( name="GoogleAppEngineCloudStorageClient", version="1.8.3.1", packages=setuptools.find_packages(), author="Google App En...
2b18bc0e0f3b9e0ca14935e2648fb9e6d637c8d0
backend/rest.py
backend/rest.py
#!/usr/bin/env python from mcapi.mcapp import app from mcapi import tservices, public, utils, private, access, process, machine, template, tservices from mcapi.user import account, datadirs, datafiles, reviews, ud, usergroups, projects, conditions from mcapi.stater import stater import sys if __name__ == '__main__': ...
#!/usr/bin/env python from mcapi.mcapp import app from mcapi import tservices, public, utils, private, access, process, machine, template, tservices from mcapi.user import account, datadirs, datafiles, reviews, ud, usergroups, projects, conditions from mcapi.stater import stater import sys from os import environ _HOS...
Allow host and port that the service listens on to be set from environment variables.
Allow host and port that the service listens on to be set from environment variables.
Python
mit
materials-commons/materialscommons.org,materials-commons/materialscommons.org,materials-commons/materialscommons.org,materials-commons/materialscommons.org,materials-commons/materialscommons.org
#!/usr/bin/env python from mcapi.mcapp import app from mcapi import tservices, public, utils, private, access, process, machine, template, tservices from mcapi.user import account, datadirs, datafiles, reviews, ud, usergroups, projects, conditions from mcapi.stater import stater import sys if __name__ == '__main__': ...
#!/usr/bin/env python from mcapi.mcapp import app from mcapi import tservices, public, utils, private, access, process, machine, template, tservices from mcapi.user import account, datadirs, datafiles, reviews, ud, usergroups, projects, conditions from mcapi.stater import stater import sys from os import environ _HOS...
<commit_before>#!/usr/bin/env python from mcapi.mcapp import app from mcapi import tservices, public, utils, private, access, process, machine, template, tservices from mcapi.user import account, datadirs, datafiles, reviews, ud, usergroups, projects, conditions from mcapi.stater import stater import sys if __name__ ...
#!/usr/bin/env python from mcapi.mcapp import app from mcapi import tservices, public, utils, private, access, process, machine, template, tservices from mcapi.user import account, datadirs, datafiles, reviews, ud, usergroups, projects, conditions from mcapi.stater import stater import sys from os import environ _HOS...
#!/usr/bin/env python from mcapi.mcapp import app from mcapi import tservices, public, utils, private, access, process, machine, template, tservices from mcapi.user import account, datadirs, datafiles, reviews, ud, usergroups, projects, conditions from mcapi.stater import stater import sys if __name__ == '__main__': ...
<commit_before>#!/usr/bin/env python from mcapi.mcapp import app from mcapi import tservices, public, utils, private, access, process, machine, template, tservices from mcapi.user import account, datadirs, datafiles, reviews, ud, usergroups, projects, conditions from mcapi.stater import stater import sys if __name__ ...
f764e9e0f3cba7c387952fe8f19aa702825e8378
tests/test_core/test_server.py
tests/test_core/test_server.py
from mock import patch import sure # noqa from moto.server import main def test_wrong_arguments(): try: main(["name", "test1", "test2", "test3"]) assert False, ("main() when called with the incorrect number of args" " should raise a system exit") except SystemExit: ...
from mock import patch import sure # noqa from moto.server import main, create_backend_app, DomainDispatcherApplication def test_wrong_arguments(): try: main(["name", "test1", "test2", "test3"]) assert False, ("main() when called with the incorrect number of args" " should...
Add more test coverage for the server.
Add more test coverage for the server.
Python
apache-2.0
william-richard/moto,Affirm/moto,Brett55/moto,gjtempleton/moto,whummer/moto,Affirm/moto,rocky4570/moto,ZuluPro/moto,spulec/moto,Brett55/moto,gjtempleton/moto,okomestudio/moto,ZuluPro/moto,alexdebrie/moto,rouge8/moto,william-richard/moto,gjtempleton/moto,botify-labs/moto,braintreeps/moto,2rs2ts/moto,spulec/moto,okomestu...
from mock import patch import sure # noqa from moto.server import main def test_wrong_arguments(): try: main(["name", "test1", "test2", "test3"]) assert False, ("main() when called with the incorrect number of args" " should raise a system exit") except SystemExit: ...
from mock import patch import sure # noqa from moto.server import main, create_backend_app, DomainDispatcherApplication def test_wrong_arguments(): try: main(["name", "test1", "test2", "test3"]) assert False, ("main() when called with the incorrect number of args" " should...
<commit_before>from mock import patch import sure # noqa from moto.server import main def test_wrong_arguments(): try: main(["name", "test1", "test2", "test3"]) assert False, ("main() when called with the incorrect number of args" " should raise a system exit") except ...
from mock import patch import sure # noqa from moto.server import main, create_backend_app, DomainDispatcherApplication def test_wrong_arguments(): try: main(["name", "test1", "test2", "test3"]) assert False, ("main() when called with the incorrect number of args" " should...
from mock import patch import sure # noqa from moto.server import main def test_wrong_arguments(): try: main(["name", "test1", "test2", "test3"]) assert False, ("main() when called with the incorrect number of args" " should raise a system exit") except SystemExit: ...
<commit_before>from mock import patch import sure # noqa from moto.server import main def test_wrong_arguments(): try: main(["name", "test1", "test2", "test3"]) assert False, ("main() when called with the incorrect number of args" " should raise a system exit") except ...
54add3fa95ab450e5afcbbf7fe8a3205bfc5889c
indra/tests/test_reading_scripts_aws.py
indra/tests/test_reading_scripts_aws.py
import boto3 from os import path, chdir from subprocess import check_call from nose.plugins.attrib import attr from indra.tools.reading import submit_reading_pipeline as srp s3 = boto3.client('s3') HERE = path.dirname(path.abspath(__file__)) @attr('nonpublic') def test_normal_pmid_reading_call(): chdir(path...
import boto3 from os import path, chdir from subprocess import check_call from nose.plugins.attrib import attr from indra.tools.reading import submit_reading_pipeline as srp from indra.sources import sparser s3 = boto3.client('s3') HERE = path.dirname(path.abspath(__file__)) @attr('nonpublic') def test_normal_p...
Add test with currently known-stall sentance.
Add test with currently known-stall sentance.
Python
bsd-2-clause
bgyori/indra,pvtodorov/indra,pvtodorov/indra,sorgerlab/indra,sorgerlab/indra,sorgerlab/indra,pvtodorov/indra,bgyori/indra,johnbachman/indra,pvtodorov/indra,sorgerlab/belpy,johnbachman/indra,johnbachman/indra,johnbachman/belpy,johnbachman/belpy,sorgerlab/belpy,sorgerlab/belpy,johnbachman/belpy,bgyori/indra
import boto3 from os import path, chdir from subprocess import check_call from nose.plugins.attrib import attr from indra.tools.reading import submit_reading_pipeline as srp s3 = boto3.client('s3') HERE = path.dirname(path.abspath(__file__)) @attr('nonpublic') def test_normal_pmid_reading_call(): chdir(path...
import boto3 from os import path, chdir from subprocess import check_call from nose.plugins.attrib import attr from indra.tools.reading import submit_reading_pipeline as srp from indra.sources import sparser s3 = boto3.client('s3') HERE = path.dirname(path.abspath(__file__)) @attr('nonpublic') def test_normal_p...
<commit_before> import boto3 from os import path, chdir from subprocess import check_call from nose.plugins.attrib import attr from indra.tools.reading import submit_reading_pipeline as srp s3 = boto3.client('s3') HERE = path.dirname(path.abspath(__file__)) @attr('nonpublic') def test_normal_pmid_reading_call():...
import boto3 from os import path, chdir from subprocess import check_call from nose.plugins.attrib import attr from indra.tools.reading import submit_reading_pipeline as srp from indra.sources import sparser s3 = boto3.client('s3') HERE = path.dirname(path.abspath(__file__)) @attr('nonpublic') def test_normal_p...
import boto3 from os import path, chdir from subprocess import check_call from nose.plugins.attrib import attr from indra.tools.reading import submit_reading_pipeline as srp s3 = boto3.client('s3') HERE = path.dirname(path.abspath(__file__)) @attr('nonpublic') def test_normal_pmid_reading_call(): chdir(path...
<commit_before> import boto3 from os import path, chdir from subprocess import check_call from nose.plugins.attrib import attr from indra.tools.reading import submit_reading_pipeline as srp s3 = boto3.client('s3') HERE = path.dirname(path.abspath(__file__)) @attr('nonpublic') def test_normal_pmid_reading_call():...
fbe78315efcbf646710da6bf7d6a9d6c26fa8645
bayesian_jobs/handlers/clean_postgres.py
bayesian_jobs/handlers/clean_postgres.py
from selinon import StoragePool from cucoslib.models import WorkerResult, Analysis from .base import BaseHandler class CleanPostgres(BaseHandler): """ Clean JSONB columns in Postgres """ def execute(self): s3 = StoragePool.get_connected_storage('S3Data') results = self.postgres.session.query...
from selinon import StoragePool from cucoslib.models import WorkerResult, Analysis from .base import BaseHandler class CleanPostgres(BaseHandler): """ Clean JSONB columns in Postgres """ def execute(self): s3 = StoragePool.get_connected_storage('S3Data') results = self.postgres.session.query...
Mark error flag if an object is not present on S3
Mark error flag if an object is not present on S3
Python
apache-2.0
fabric8-analytics/fabric8-analytics-jobs,fabric8-analytics/fabric8-analytics-jobs
from selinon import StoragePool from cucoslib.models import WorkerResult, Analysis from .base import BaseHandler class CleanPostgres(BaseHandler): """ Clean JSONB columns in Postgres """ def execute(self): s3 = StoragePool.get_connected_storage('S3Data') results = self.postgres.session.query...
from selinon import StoragePool from cucoslib.models import WorkerResult, Analysis from .base import BaseHandler class CleanPostgres(BaseHandler): """ Clean JSONB columns in Postgres """ def execute(self): s3 = StoragePool.get_connected_storage('S3Data') results = self.postgres.session.query...
<commit_before>from selinon import StoragePool from cucoslib.models import WorkerResult, Analysis from .base import BaseHandler class CleanPostgres(BaseHandler): """ Clean JSONB columns in Postgres """ def execute(self): s3 = StoragePool.get_connected_storage('S3Data') results = self.postgre...
from selinon import StoragePool from cucoslib.models import WorkerResult, Analysis from .base import BaseHandler class CleanPostgres(BaseHandler): """ Clean JSONB columns in Postgres """ def execute(self): s3 = StoragePool.get_connected_storage('S3Data') results = self.postgres.session.query...
from selinon import StoragePool from cucoslib.models import WorkerResult, Analysis from .base import BaseHandler class CleanPostgres(BaseHandler): """ Clean JSONB columns in Postgres """ def execute(self): s3 = StoragePool.get_connected_storage('S3Data') results = self.postgres.session.query...
<commit_before>from selinon import StoragePool from cucoslib.models import WorkerResult, Analysis from .base import BaseHandler class CleanPostgres(BaseHandler): """ Clean JSONB columns in Postgres """ def execute(self): s3 = StoragePool.get_connected_storage('S3Data') results = self.postgre...