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
e560ea4a419e1e61d776245b99ffa0e60b4d0e22
InvenTree/stock/forms.py
InvenTree/stock/forms.py
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django import forms from InvenTree.forms import HelperForm from .models import StockLocation, StockItem class EditStockLocationForm(HelperForm): class Meta: model = StockLocation fields = [ 'name', 'par...
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django import forms from InvenTree.forms import HelperForm from .models import StockLocation, StockItem class EditStockLocationForm(HelperForm): class Meta: model = StockLocation fields = [ 'name', 'par...
Update edit form for StockItem
Update edit form for StockItem - Disallow direct quantity editing (must perform stocktake) - Add notes field to allow editing
Python
mit
SchrodingersGat/InvenTree,inventree/InvenTree,SchrodingersGat/InvenTree,inventree/InvenTree,SchrodingersGat/InvenTree,inventree/InvenTree,inventree/InvenTree,SchrodingersGat/InvenTree
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django import forms from InvenTree.forms import HelperForm from .models import StockLocation, StockItem class EditStockLocationForm(HelperForm): class Meta: model = StockLocation fields = [ 'name', 'par...
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django import forms from InvenTree.forms import HelperForm from .models import StockLocation, StockItem class EditStockLocationForm(HelperForm): class Meta: model = StockLocation fields = [ 'name', 'par...
<commit_before># -*- coding: utf-8 -*- from __future__ import unicode_literals from django import forms from InvenTree.forms import HelperForm from .models import StockLocation, StockItem class EditStockLocationForm(HelperForm): class Meta: model = StockLocation fields = [ 'name', ...
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django import forms from InvenTree.forms import HelperForm from .models import StockLocation, StockItem class EditStockLocationForm(HelperForm): class Meta: model = StockLocation fields = [ 'name', 'par...
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django import forms from InvenTree.forms import HelperForm from .models import StockLocation, StockItem class EditStockLocationForm(HelperForm): class Meta: model = StockLocation fields = [ 'name', 'par...
<commit_before># -*- coding: utf-8 -*- from __future__ import unicode_literals from django import forms from InvenTree.forms import HelperForm from .models import StockLocation, StockItem class EditStockLocationForm(HelperForm): class Meta: model = StockLocation fields = [ 'name', ...
f2b4e4758ae60526e8bb5c57e9c45b0a1901fa14
wagtail/wagtailforms/edit_handlers.py
wagtail/wagtailforms/edit_handlers.py
from __future__ import absolute_import, unicode_literals from django.template.loader import render_to_string from django.utils.safestring import mark_safe from django.utils.translation import ugettext as _ from wagtail.wagtailadmin.edit_handlers import EditHandler class BaseFormSubmissionsPanel(EditHandler): te...
from __future__ import absolute_import, unicode_literals from django.template.loader import render_to_string from django.utils.safestring import mark_safe from django.utils.translation import ugettext as _ from wagtail.wagtailadmin.edit_handlers import EditHandler class BaseFormSubmissionsPanel(EditHandler): te...
Use verbose name for FormSubmissionsPanel heading
Use verbose name for FormSubmissionsPanel heading
Python
bsd-3-clause
rsalmaso/wagtail,takeflight/wagtail,torchbox/wagtail,rsalmaso/wagtail,FlipperPA/wagtail,zerolab/wagtail,jnns/wagtail,nimasmi/wagtail,kaedroho/wagtail,thenewguy/wagtail,zerolab/wagtail,mikedingjan/wagtail,nimasmi/wagtail,wagtail/wagtail,thenewguy/wagtail,nutztherookie/wagtail,takeflight/wagtail,chrxr/wagtail,jnns/wagtai...
from __future__ import absolute_import, unicode_literals from django.template.loader import render_to_string from django.utils.safestring import mark_safe from django.utils.translation import ugettext as _ from wagtail.wagtailadmin.edit_handlers import EditHandler class BaseFormSubmissionsPanel(EditHandler): te...
from __future__ import absolute_import, unicode_literals from django.template.loader import render_to_string from django.utils.safestring import mark_safe from django.utils.translation import ugettext as _ from wagtail.wagtailadmin.edit_handlers import EditHandler class BaseFormSubmissionsPanel(EditHandler): te...
<commit_before>from __future__ import absolute_import, unicode_literals from django.template.loader import render_to_string from django.utils.safestring import mark_safe from django.utils.translation import ugettext as _ from wagtail.wagtailadmin.edit_handlers import EditHandler class BaseFormSubmissionsPanel(EditH...
from __future__ import absolute_import, unicode_literals from django.template.loader import render_to_string from django.utils.safestring import mark_safe from django.utils.translation import ugettext as _ from wagtail.wagtailadmin.edit_handlers import EditHandler class BaseFormSubmissionsPanel(EditHandler): te...
from __future__ import absolute_import, unicode_literals from django.template.loader import render_to_string from django.utils.safestring import mark_safe from django.utils.translation import ugettext as _ from wagtail.wagtailadmin.edit_handlers import EditHandler class BaseFormSubmissionsPanel(EditHandler): te...
<commit_before>from __future__ import absolute_import, unicode_literals from django.template.loader import render_to_string from django.utils.safestring import mark_safe from django.utils.translation import ugettext as _ from wagtail.wagtailadmin.edit_handlers import EditHandler class BaseFormSubmissionsPanel(EditH...
8026b5f309264d4e72c3bc503601468cf1cdfcdd
src/nodeconductor_assembly_waldur/packages/filters.py
src/nodeconductor_assembly_waldur/packages/filters.py
import django_filters from nodeconductor.core.filters import UUIDFilter from . import models class PackageTemplateFilter(django_filters.FilterSet): name = django_filters.CharFilter(lookup_type='icontains') settings_uuid = UUIDFilter(name='service_settings__uuid') class Meta(object): model = mod...
import django_filters from nodeconductor.core.filters import UUIDFilter from . import models class PackageTemplateFilter(django_filters.FilterSet): name = django_filters.CharFilter(lookup_type='icontains') settings_uuid = UUIDFilter(name='service_settings__uuid') class Meta(object): model = mod...
Enable filtering OpenStack package by customer and project (WAL-49)
Enable filtering OpenStack package by customer and project (WAL-49)
Python
mit
opennode/waldur-mastermind,opennode/waldur-mastermind,opennode/waldur-mastermind,opennode/nodeconductor-assembly-waldur,opennode/waldur-mastermind,opennode/nodeconductor-assembly-waldur,opennode/nodeconductor-assembly-waldur
import django_filters from nodeconductor.core.filters import UUIDFilter from . import models class PackageTemplateFilter(django_filters.FilterSet): name = django_filters.CharFilter(lookup_type='icontains') settings_uuid = UUIDFilter(name='service_settings__uuid') class Meta(object): model = mod...
import django_filters from nodeconductor.core.filters import UUIDFilter from . import models class PackageTemplateFilter(django_filters.FilterSet): name = django_filters.CharFilter(lookup_type='icontains') settings_uuid = UUIDFilter(name='service_settings__uuid') class Meta(object): model = mod...
<commit_before>import django_filters from nodeconductor.core.filters import UUIDFilter from . import models class PackageTemplateFilter(django_filters.FilterSet): name = django_filters.CharFilter(lookup_type='icontains') settings_uuid = UUIDFilter(name='service_settings__uuid') class Meta(object): ...
import django_filters from nodeconductor.core.filters import UUIDFilter from . import models class PackageTemplateFilter(django_filters.FilterSet): name = django_filters.CharFilter(lookup_type='icontains') settings_uuid = UUIDFilter(name='service_settings__uuid') class Meta(object): model = mod...
import django_filters from nodeconductor.core.filters import UUIDFilter from . import models class PackageTemplateFilter(django_filters.FilterSet): name = django_filters.CharFilter(lookup_type='icontains') settings_uuid = UUIDFilter(name='service_settings__uuid') class Meta(object): model = mod...
<commit_before>import django_filters from nodeconductor.core.filters import UUIDFilter from . import models class PackageTemplateFilter(django_filters.FilterSet): name = django_filters.CharFilter(lookup_type='icontains') settings_uuid = UUIDFilter(name='service_settings__uuid') class Meta(object): ...
79614ed2cf4936358a2f7beca703210720883df2
netbox/netbox/graphql/types.py
netbox/netbox/graphql/types.py
import graphene from graphene.types.generic import GenericScalar from graphene_django import DjangoObjectType __all__ = ( 'BaseObjectType', 'ObjectType', 'TaggedObjectType', ) class BaseObjectType(DjangoObjectType): """ Base GraphQL object type for all NetBox objects """ class Meta: ...
import graphene from django.contrib.contenttypes.models import ContentType from graphene.types.generic import GenericScalar from graphene_django import DjangoObjectType __all__ = ( 'BaseObjectType', 'ObjectType', 'TaggedObjectType', ) # # Base types # class BaseObjectType(DjangoObjectType): """ ...
Add GraphQL type for ContentType
Add GraphQL type for ContentType
Python
apache-2.0
digitalocean/netbox,digitalocean/netbox,digitalocean/netbox,digitalocean/netbox
import graphene from graphene.types.generic import GenericScalar from graphene_django import DjangoObjectType __all__ = ( 'BaseObjectType', 'ObjectType', 'TaggedObjectType', ) class BaseObjectType(DjangoObjectType): """ Base GraphQL object type for all NetBox objects """ class Meta: ...
import graphene from django.contrib.contenttypes.models import ContentType from graphene.types.generic import GenericScalar from graphene_django import DjangoObjectType __all__ = ( 'BaseObjectType', 'ObjectType', 'TaggedObjectType', ) # # Base types # class BaseObjectType(DjangoObjectType): """ ...
<commit_before>import graphene from graphene.types.generic import GenericScalar from graphene_django import DjangoObjectType __all__ = ( 'BaseObjectType', 'ObjectType', 'TaggedObjectType', ) class BaseObjectType(DjangoObjectType): """ Base GraphQL object type for all NetBox objects """ cl...
import graphene from django.contrib.contenttypes.models import ContentType from graphene.types.generic import GenericScalar from graphene_django import DjangoObjectType __all__ = ( 'BaseObjectType', 'ObjectType', 'TaggedObjectType', ) # # Base types # class BaseObjectType(DjangoObjectType): """ ...
import graphene from graphene.types.generic import GenericScalar from graphene_django import DjangoObjectType __all__ = ( 'BaseObjectType', 'ObjectType', 'TaggedObjectType', ) class BaseObjectType(DjangoObjectType): """ Base GraphQL object type for all NetBox objects """ class Meta: ...
<commit_before>import graphene from graphene.types.generic import GenericScalar from graphene_django import DjangoObjectType __all__ = ( 'BaseObjectType', 'ObjectType', 'TaggedObjectType', ) class BaseObjectType(DjangoObjectType): """ Base GraphQL object type for all NetBox objects """ cl...
b55812bd94b20a31ba2f9a64eedbcbb811dc4257
camkes/internal/dictutils.py
camkes/internal/dictutils.py
# # Copyright 2014, NICTA # # This software may be distributed and modified according to the terms of # the BSD 2-Clause license. Note that NO WARRANTY is provided. # See "LICENSE_BSD2.txt" for details. # # @TAG(NICTA_BSD) # '''Various helpers for doing advanced things with dictionaries.''' def get_fields(s): '''...
# # Copyright 2014, NICTA # # This software may be distributed and modified according to the terms of # the BSD 2-Clause license. Note that NO WARRANTY is provided. # See "LICENSE_BSD2.txt" for details. # # @TAG(NICTA_BSD) # '''Various helpers for doing advanced things with dictionaries.''' import re def get_fields(...
Support non-string formats in `get_fields`.
Support non-string formats in `get_fields`. This commit rewrites the `get_fields` function to be simpler and more general. The previous implementation relied on ad hoc dict mocking and only supported format strings involving string-valued formats ('%(name)s'). From this commit other formats (e.g. '%(name)04d') are sup...
Python
bsd-2-clause
smaccm/camkes-tool,smaccm/camkes-tool,smaccm/camkes-tool,smaccm/camkes-tool
# # Copyright 2014, NICTA # # This software may be distributed and modified according to the terms of # the BSD 2-Clause license. Note that NO WARRANTY is provided. # See "LICENSE_BSD2.txt" for details. # # @TAG(NICTA_BSD) # '''Various helpers for doing advanced things with dictionaries.''' def get_fields(s): '''...
# # Copyright 2014, NICTA # # This software may be distributed and modified according to the terms of # the BSD 2-Clause license. Note that NO WARRANTY is provided. # See "LICENSE_BSD2.txt" for details. # # @TAG(NICTA_BSD) # '''Various helpers for doing advanced things with dictionaries.''' import re def get_fields(...
<commit_before># # Copyright 2014, NICTA # # This software may be distributed and modified according to the terms of # the BSD 2-Clause license. Note that NO WARRANTY is provided. # See "LICENSE_BSD2.txt" for details. # # @TAG(NICTA_BSD) # '''Various helpers for doing advanced things with dictionaries.''' def get_fie...
# # Copyright 2014, NICTA # # This software may be distributed and modified according to the terms of # the BSD 2-Clause license. Note that NO WARRANTY is provided. # See "LICENSE_BSD2.txt" for details. # # @TAG(NICTA_BSD) # '''Various helpers for doing advanced things with dictionaries.''' import re def get_fields(...
# # Copyright 2014, NICTA # # This software may be distributed and modified according to the terms of # the BSD 2-Clause license. Note that NO WARRANTY is provided. # See "LICENSE_BSD2.txt" for details. # # @TAG(NICTA_BSD) # '''Various helpers for doing advanced things with dictionaries.''' def get_fields(s): '''...
<commit_before># # Copyright 2014, NICTA # # This software may be distributed and modified according to the terms of # the BSD 2-Clause license. Note that NO WARRANTY is provided. # See "LICENSE_BSD2.txt" for details. # # @TAG(NICTA_BSD) # '''Various helpers for doing advanced things with dictionaries.''' def get_fie...
d852356e932a5112308a8c65c1ff6f14019a6835
factory/tools/cat_StarterLog.py
factory/tools/cat_StarterLog.py
#!/bin/env python # # cat_StarterLog.py # # Print out the StarterLog for a glidein output file # # Usage: cat_StarterLog.py logname # import os.path import sys STARTUP_DIR=sys.path[0] sys.path.append(os.path.join(STARTUP_DIR,"lib")) import gWftLogParser USAGE="Usage: cat_StarterLog.py <logname>" def main(): try:...
#!/bin/env python # # cat_StarterLog.py # # Print out the StarterLog for a glidein output file # # Usage: cat_StarterLog.py logname # import os.path import sys STARTUP_DIR=sys.path[0] sys.path.append(os.path.join(STARTUP_DIR,"lib")) import gWftLogParser USAGE="Usage: cat_StarterLog.py [-monitor] <logname>" def main(...
Add support for monitor starterlog
Add support for monitor starterlog
Python
bsd-3-clause
holzman/glideinwms-old,holzman/glideinwms-old,bbockelm/glideinWMS,bbockelm/glideinWMS,bbockelm/glideinWMS,holzman/glideinwms-old,bbockelm/glideinWMS
#!/bin/env python # # cat_StarterLog.py # # Print out the StarterLog for a glidein output file # # Usage: cat_StarterLog.py logname # import os.path import sys STARTUP_DIR=sys.path[0] sys.path.append(os.path.join(STARTUP_DIR,"lib")) import gWftLogParser USAGE="Usage: cat_StarterLog.py <logname>" def main(): try:...
#!/bin/env python # # cat_StarterLog.py # # Print out the StarterLog for a glidein output file # # Usage: cat_StarterLog.py logname # import os.path import sys STARTUP_DIR=sys.path[0] sys.path.append(os.path.join(STARTUP_DIR,"lib")) import gWftLogParser USAGE="Usage: cat_StarterLog.py [-monitor] <logname>" def main(...
<commit_before>#!/bin/env python # # cat_StarterLog.py # # Print out the StarterLog for a glidein output file # # Usage: cat_StarterLog.py logname # import os.path import sys STARTUP_DIR=sys.path[0] sys.path.append(os.path.join(STARTUP_DIR,"lib")) import gWftLogParser USAGE="Usage: cat_StarterLog.py <logname>" def m...
#!/bin/env python # # cat_StarterLog.py # # Print out the StarterLog for a glidein output file # # Usage: cat_StarterLog.py logname # import os.path import sys STARTUP_DIR=sys.path[0] sys.path.append(os.path.join(STARTUP_DIR,"lib")) import gWftLogParser USAGE="Usage: cat_StarterLog.py [-monitor] <logname>" def main(...
#!/bin/env python # # cat_StarterLog.py # # Print out the StarterLog for a glidein output file # # Usage: cat_StarterLog.py logname # import os.path import sys STARTUP_DIR=sys.path[0] sys.path.append(os.path.join(STARTUP_DIR,"lib")) import gWftLogParser USAGE="Usage: cat_StarterLog.py <logname>" def main(): try:...
<commit_before>#!/bin/env python # # cat_StarterLog.py # # Print out the StarterLog for a glidein output file # # Usage: cat_StarterLog.py logname # import os.path import sys STARTUP_DIR=sys.path[0] sys.path.append(os.path.join(STARTUP_DIR,"lib")) import gWftLogParser USAGE="Usage: cat_StarterLog.py <logname>" def m...
def129e32bf731351253e210b53c44cf8c57c302
planetstack/openstack_observer/steps/sync_images.py
planetstack/openstack_observer/steps/sync_images.py
import os import base64 from django.db.models import F, Q from xos.config import Config from observer.openstacksyncstep import OpenStackSyncStep from core.models.image import Image class SyncImages(OpenStackSyncStep): provides=[Image] requested_interval=0 observes=Image def fetch_pending(self, deleted...
import os import base64 from django.db.models import F, Q from xos.config import Config from observer.openstacksyncstep import OpenStackSyncStep from core.models.image import Image class SyncImages(OpenStackSyncStep): provides=[Image] requested_interval=0 observes=Image def fetch_pending(self, deleted...
Check the existence of the images_path
Check the existence of the images_path ERROR:planetstack.log:[Errno 2] No such file or directory: '/opt/xos/images' BEG TRACEBACK Traceback (most recent call last): File "/opt/xos/observer/event_loop.py", line 349, in sync failed_objects = sync_step(failed=list(self.failed_step_objects), deletion=deletion) Fil...
Python
apache-2.0
wathsalav/xos,wathsalav/xos,wathsalav/xos,wathsalav/xos
import os import base64 from django.db.models import F, Q from xos.config import Config from observer.openstacksyncstep import OpenStackSyncStep from core.models.image import Image class SyncImages(OpenStackSyncStep): provides=[Image] requested_interval=0 observes=Image def fetch_pending(self, deleted...
import os import base64 from django.db.models import F, Q from xos.config import Config from observer.openstacksyncstep import OpenStackSyncStep from core.models.image import Image class SyncImages(OpenStackSyncStep): provides=[Image] requested_interval=0 observes=Image def fetch_pending(self, deleted...
<commit_before>import os import base64 from django.db.models import F, Q from xos.config import Config from observer.openstacksyncstep import OpenStackSyncStep from core.models.image import Image class SyncImages(OpenStackSyncStep): provides=[Image] requested_interval=0 observes=Image def fetch_pendin...
import os import base64 from django.db.models import F, Q from xos.config import Config from observer.openstacksyncstep import OpenStackSyncStep from core.models.image import Image class SyncImages(OpenStackSyncStep): provides=[Image] requested_interval=0 observes=Image def fetch_pending(self, deleted...
import os import base64 from django.db.models import F, Q from xos.config import Config from observer.openstacksyncstep import OpenStackSyncStep from core.models.image import Image class SyncImages(OpenStackSyncStep): provides=[Image] requested_interval=0 observes=Image def fetch_pending(self, deleted...
<commit_before>import os import base64 from django.db.models import F, Q from xos.config import Config from observer.openstacksyncstep import OpenStackSyncStep from core.models.image import Image class SyncImages(OpenStackSyncStep): provides=[Image] requested_interval=0 observes=Image def fetch_pendin...
541c5d55fd083877a10c63b071bf0176f628a5cb
src/utils/management/commands/dump_file_text_to_db.py
src/utils/management/commands/dump_file_text_to_db.py
from django.core.management.base import BaseCommand from submission.models import Article from core.models import File class Command(BaseCommand): """Dumps the text of files to the database using FileText Model""" help = """ Dumps the text of galley files into the database, which populates the ...
from django.core.management.base import BaseCommand from submission.models import Article from core.models import File class Command(BaseCommand): """Dumps the text of files to the database using FileText Model""" help = """ Dumps the text of galley files into the database, which populates the ...
Fix wrong CLI argument type
Fix wrong CLI argument type
Python
agpl-3.0
BirkbeckCTP/janeway,BirkbeckCTP/janeway,BirkbeckCTP/janeway,BirkbeckCTP/janeway
from django.core.management.base import BaseCommand from submission.models import Article from core.models import File class Command(BaseCommand): """Dumps the text of files to the database using FileText Model""" help = """ Dumps the text of galley files into the database, which populates the ...
from django.core.management.base import BaseCommand from submission.models import Article from core.models import File class Command(BaseCommand): """Dumps the text of files to the database using FileText Model""" help = """ Dumps the text of galley files into the database, which populates the ...
<commit_before>from django.core.management.base import BaseCommand from submission.models import Article from core.models import File class Command(BaseCommand): """Dumps the text of files to the database using FileText Model""" help = """ Dumps the text of galley files into the database, which popu...
from django.core.management.base import BaseCommand from submission.models import Article from core.models import File class Command(BaseCommand): """Dumps the text of files to the database using FileText Model""" help = """ Dumps the text of galley files into the database, which populates the ...
from django.core.management.base import BaseCommand from submission.models import Article from core.models import File class Command(BaseCommand): """Dumps the text of files to the database using FileText Model""" help = """ Dumps the text of galley files into the database, which populates the ...
<commit_before>from django.core.management.base import BaseCommand from submission.models import Article from core.models import File class Command(BaseCommand): """Dumps the text of files to the database using FileText Model""" help = """ Dumps the text of galley files into the database, which popu...
5968e99eb8e040686d345c6d77c71bb5975e5f29
simple-cipher/simple_cipher.py
simple-cipher/simple_cipher.py
import math import secrets from string import ascii_lowercase class Cipher(object): def __init__(self, key=None): if not key: key = Cipher._random_key() if not key.isalpha() or not key.islower(): raise ValueError("Key must consist only of lowercase letters") self.ke...
import math import secrets from string import ascii_lowercase class Cipher(object): def __init__(self, key=None): if not key: key = self._random_key() if not key.isalpha() or not key.islower(): raise ValueError("Key must consist only of lowercase letters") self.key ...
Use super() and self within the Cipher and Caesar classes
Use super() and self within the Cipher and Caesar classes
Python
agpl-3.0
CubicComet/exercism-python-solutions
import math import secrets from string import ascii_lowercase class Cipher(object): def __init__(self, key=None): if not key: key = Cipher._random_key() if not key.isalpha() or not key.islower(): raise ValueError("Key must consist only of lowercase letters") self.ke...
import math import secrets from string import ascii_lowercase class Cipher(object): def __init__(self, key=None): if not key: key = self._random_key() if not key.isalpha() or not key.islower(): raise ValueError("Key must consist only of lowercase letters") self.key ...
<commit_before>import math import secrets from string import ascii_lowercase class Cipher(object): def __init__(self, key=None): if not key: key = Cipher._random_key() if not key.isalpha() or not key.islower(): raise ValueError("Key must consist only of lowercase letters") ...
import math import secrets from string import ascii_lowercase class Cipher(object): def __init__(self, key=None): if not key: key = self._random_key() if not key.isalpha() or not key.islower(): raise ValueError("Key must consist only of lowercase letters") self.key ...
import math import secrets from string import ascii_lowercase class Cipher(object): def __init__(self, key=None): if not key: key = Cipher._random_key() if not key.isalpha() or not key.islower(): raise ValueError("Key must consist only of lowercase letters") self.ke...
<commit_before>import math import secrets from string import ascii_lowercase class Cipher(object): def __init__(self, key=None): if not key: key = Cipher._random_key() if not key.isalpha() or not key.islower(): raise ValueError("Key must consist only of lowercase letters") ...
6cae50cd400fec3a99f72fd9b60cf3a2cce0db24
skimage/morphology/__init__.py
skimage/morphology/__init__.py
from .binary import (binary_erosion, binary_dilation, binary_opening, binary_closing) from .grey import * from .selem import * from .ccomp import label from .watershed import watershed, is_local_maximum from ._skeletonize import skeletonize, medial_axis from .convex_hull import convex_hull_image fr...
from .binary import (binary_erosion, binary_dilation, binary_opening, binary_closing) from .grey import (erosion, dilation, opening, closing, white_tophat, black_tophat, greyscale_erode, greyscale_dilate, greyscale_open, greyscale_close, greyscale_white_top_hat...
Add __all__ to morphology package
Add __all__ to morphology package
Python
bsd-3-clause
michaelaye/scikit-image,vighneshbirodkar/scikit-image,paalge/scikit-image,blink1073/scikit-image,oew1v07/scikit-image,SamHames/scikit-image,chintak/scikit-image,vighneshbirodkar/scikit-image,oew1v07/scikit-image,chriscrosscutler/scikit-image,rjeli/scikit-image,michaelpacer/scikit-image,michaelpacer/scikit-image,michael...
from .binary import (binary_erosion, binary_dilation, binary_opening, binary_closing) from .grey import * from .selem import * from .ccomp import label from .watershed import watershed, is_local_maximum from ._skeletonize import skeletonize, medial_axis from .convex_hull import convex_hull_image fr...
from .binary import (binary_erosion, binary_dilation, binary_opening, binary_closing) from .grey import (erosion, dilation, opening, closing, white_tophat, black_tophat, greyscale_erode, greyscale_dilate, greyscale_open, greyscale_close, greyscale_white_top_hat...
<commit_before>from .binary import (binary_erosion, binary_dilation, binary_opening, binary_closing) from .grey import * from .selem import * from .ccomp import label from .watershed import watershed, is_local_maximum from ._skeletonize import skeletonize, medial_axis from .convex_hull import conve...
from .binary import (binary_erosion, binary_dilation, binary_opening, binary_closing) from .grey import (erosion, dilation, opening, closing, white_tophat, black_tophat, greyscale_erode, greyscale_dilate, greyscale_open, greyscale_close, greyscale_white_top_hat...
from .binary import (binary_erosion, binary_dilation, binary_opening, binary_closing) from .grey import * from .selem import * from .ccomp import label from .watershed import watershed, is_local_maximum from ._skeletonize import skeletonize, medial_axis from .convex_hull import convex_hull_image fr...
<commit_before>from .binary import (binary_erosion, binary_dilation, binary_opening, binary_closing) from .grey import * from .selem import * from .ccomp import label from .watershed import watershed, is_local_maximum from ._skeletonize import skeletonize, medial_axis from .convex_hull import conve...
3e1d59b91cfe84dd57558047a2d841fe5cc9bd6b
bdp/platform/frontend/setup.py
bdp/platform/frontend/setup.py
""" Created on 21/03/2012 @author: losa, sortega """ import os from setuptools import setup, find_packages def find_files(path): files = [] for dirname, subdirnames, filenames in os.walk(path): for subdirname in subdirnames: files.extend(find_files(os.path.join(dirname, subdirname))) ...
""" Created on 21/03/2012 @author: losa, sortega """ import os from setuptools import setup, find_packages def find_files(path): files = [] for dirname, subdirnames, filenames in os.walk(path): for subdirname in subdirnames: files.extend(find_files(os.path.join(dirname, subdirname))) ...
Add pylint to installation requirements
Add pylint to installation requirements
Python
apache-2.0
telefonicaid/fiware-cosmos-platform,telefonicaid/fiware-cosmos-platform,telefonicaid/fiware-cosmos-platform,telefonicaid/fiware-cosmos-platform,telefonicaid/fiware-cosmos-platform
""" Created on 21/03/2012 @author: losa, sortega """ import os from setuptools import setup, find_packages def find_files(path): files = [] for dirname, subdirnames, filenames in os.walk(path): for subdirname in subdirnames: files.extend(find_files(os.path.join(dirname, subdirname))) ...
""" Created on 21/03/2012 @author: losa, sortega """ import os from setuptools import setup, find_packages def find_files(path): files = [] for dirname, subdirnames, filenames in os.walk(path): for subdirname in subdirnames: files.extend(find_files(os.path.join(dirname, subdirname))) ...
<commit_before>""" Created on 21/03/2012 @author: losa, sortega """ import os from setuptools import setup, find_packages def find_files(path): files = [] for dirname, subdirnames, filenames in os.walk(path): for subdirname in subdirnames: files.extend(find_files(os.path.join(dirname, s...
""" Created on 21/03/2012 @author: losa, sortega """ import os from setuptools import setup, find_packages def find_files(path): files = [] for dirname, subdirnames, filenames in os.walk(path): for subdirname in subdirnames: files.extend(find_files(os.path.join(dirname, subdirname))) ...
""" Created on 21/03/2012 @author: losa, sortega """ import os from setuptools import setup, find_packages def find_files(path): files = [] for dirname, subdirnames, filenames in os.walk(path): for subdirname in subdirnames: files.extend(find_files(os.path.join(dirname, subdirname))) ...
<commit_before>""" Created on 21/03/2012 @author: losa, sortega """ import os from setuptools import setup, find_packages def find_files(path): files = [] for dirname, subdirnames, filenames in os.walk(path): for subdirname in subdirnames: files.extend(find_files(os.path.join(dirname, s...
b887bfef4f5070ddea0fd448e6e6bf70cf994070
roulier/carriers/gls_fr/rest/carrier_action.py
roulier/carriers/gls_fr/rest/carrier_action.py
"""Implementation for Laposte.""" from roulier.carrier_action import CarrierGetLabel from roulier.roulier import factory from .api import GlsEuApiParcel from .encoder import GlsEuEncoder from .decoder import GlsEuDecoderGetLabel from .transport import GlsEuTransport class GlsEuGetabel(CarrierGetLabel): """Imple...
"""Implementation for Laposte.""" from roulier.carrier_action import CarrierGetLabel from roulier.roulier import factory from .api import GlsEuApiParcel from .encoder import GlsEuEncoder from .decoder import GlsEuDecoderGetLabel from .transport import GlsEuTransport class GlsEuGetabel(CarrierGetLabel): """Imple...
Update test url for gls web api v1
[FIX] Update test url for gls web api v1
Python
agpl-3.0
akretion/roulier
"""Implementation for Laposte.""" from roulier.carrier_action import CarrierGetLabel from roulier.roulier import factory from .api import GlsEuApiParcel from .encoder import GlsEuEncoder from .decoder import GlsEuDecoderGetLabel from .transport import GlsEuTransport class GlsEuGetabel(CarrierGetLabel): """Imple...
"""Implementation for Laposte.""" from roulier.carrier_action import CarrierGetLabel from roulier.roulier import factory from .api import GlsEuApiParcel from .encoder import GlsEuEncoder from .decoder import GlsEuDecoderGetLabel from .transport import GlsEuTransport class GlsEuGetabel(CarrierGetLabel): """Imple...
<commit_before>"""Implementation for Laposte.""" from roulier.carrier_action import CarrierGetLabel from roulier.roulier import factory from .api import GlsEuApiParcel from .encoder import GlsEuEncoder from .decoder import GlsEuDecoderGetLabel from .transport import GlsEuTransport class GlsEuGetabel(CarrierGetLabel...
"""Implementation for Laposte.""" from roulier.carrier_action import CarrierGetLabel from roulier.roulier import factory from .api import GlsEuApiParcel from .encoder import GlsEuEncoder from .decoder import GlsEuDecoderGetLabel from .transport import GlsEuTransport class GlsEuGetabel(CarrierGetLabel): """Imple...
"""Implementation for Laposte.""" from roulier.carrier_action import CarrierGetLabel from roulier.roulier import factory from .api import GlsEuApiParcel from .encoder import GlsEuEncoder from .decoder import GlsEuDecoderGetLabel from .transport import GlsEuTransport class GlsEuGetabel(CarrierGetLabel): """Imple...
<commit_before>"""Implementation for Laposte.""" from roulier.carrier_action import CarrierGetLabel from roulier.roulier import factory from .api import GlsEuApiParcel from .encoder import GlsEuEncoder from .decoder import GlsEuDecoderGetLabel from .transport import GlsEuTransport class GlsEuGetabel(CarrierGetLabel...
052228bb3ba3c8ec13452f5a8328ed77c30e565d
images/hub/canvasauthenticator/canvasauthenticator/__init__.py
images/hub/canvasauthenticator/canvasauthenticator/__init__.py
from traitlets import List, Unicode from oauthenticator.generic import GenericOAuthenticator from tornado import gen canvas_site = 'https://ucberkeley.test.instructure.com/' class CanvasAuthenticator(GenericOAuthenticator): allowed_email_domains = List( [], config=True, help=""" L...
from traitlets import List, Unicode from oauthenticator.generic import GenericOAuthenticator from tornado import gen canvas_site = 'https://ucberkeley.test.instructure.com/' class CanvasAuthenticator(GenericOAuthenticator): allowed_email_domains = List( [], config=True, help=""" L...
Normalize usernames properly to prevent clashes from guest accounts
Normalize usernames properly to prevent clashes from guest accounts Guest accounts can have non berkeley.edu emails, and might get access to a berkeley.edu user's home directory. This will prevent that.
Python
bsd-3-clause
ryanlovett/datahub,berkeley-dsep-infra/datahub,ryanlovett/datahub,ryanlovett/datahub,berkeley-dsep-infra/datahub,berkeley-dsep-infra/datahub
from traitlets import List, Unicode from oauthenticator.generic import GenericOAuthenticator from tornado import gen canvas_site = 'https://ucberkeley.test.instructure.com/' class CanvasAuthenticator(GenericOAuthenticator): allowed_email_domains = List( [], config=True, help=""" L...
from traitlets import List, Unicode from oauthenticator.generic import GenericOAuthenticator from tornado import gen canvas_site = 'https://ucberkeley.test.instructure.com/' class CanvasAuthenticator(GenericOAuthenticator): allowed_email_domains = List( [], config=True, help=""" L...
<commit_before>from traitlets import List, Unicode from oauthenticator.generic import GenericOAuthenticator from tornado import gen canvas_site = 'https://ucberkeley.test.instructure.com/' class CanvasAuthenticator(GenericOAuthenticator): allowed_email_domains = List( [], config=True, hel...
from traitlets import List, Unicode from oauthenticator.generic import GenericOAuthenticator from tornado import gen canvas_site = 'https://ucberkeley.test.instructure.com/' class CanvasAuthenticator(GenericOAuthenticator): allowed_email_domains = List( [], config=True, help=""" L...
from traitlets import List, Unicode from oauthenticator.generic import GenericOAuthenticator from tornado import gen canvas_site = 'https://ucberkeley.test.instructure.com/' class CanvasAuthenticator(GenericOAuthenticator): allowed_email_domains = List( [], config=True, help=""" L...
<commit_before>from traitlets import List, Unicode from oauthenticator.generic import GenericOAuthenticator from tornado import gen canvas_site = 'https://ucberkeley.test.instructure.com/' class CanvasAuthenticator(GenericOAuthenticator): allowed_email_domains = List( [], config=True, hel...
c3aad1ab31b84cce97555c56ec44986addca5ee8
create_schemas_and_tables.py
create_schemas_and_tables.py
#! /usr/bin/env python3 import os import subprocess ODIE_DIR = os.path.dirname(__file__) subprocess.call([os.path.join(ODIE_DIR, 'create_garfield_models.py')]) subprocess.call([os.path.join(ODIE_DIR, 'create_fsmi_models.py')])
#! /usr/bin/env python3 import os import subprocess ODIE_DIR = os.path.dirname(__file__) # due to Flask-SQLA only using a single MetaData object even when handling multiple # databases, we can't create let it create all our models at once (otherwise it # tries to create Enums in all databases, which will fail due to...
Add comment explaining unconventional model creation
Add comment explaining unconventional model creation
Python
mit
fjalir/odie-server,Kha/odie-server,Kha/odie-server,fjalir/odie-server,fjalir/odie-server,Kha/odie-server,fsmi/odie-server,fsmi/odie-server,fsmi/odie-server
#! /usr/bin/env python3 import os import subprocess ODIE_DIR = os.path.dirname(__file__) subprocess.call([os.path.join(ODIE_DIR, 'create_garfield_models.py')]) subprocess.call([os.path.join(ODIE_DIR, 'create_fsmi_models.py')]) Add comment explaining unconventional model creation
#! /usr/bin/env python3 import os import subprocess ODIE_DIR = os.path.dirname(__file__) # due to Flask-SQLA only using a single MetaData object even when handling multiple # databases, we can't create let it create all our models at once (otherwise it # tries to create Enums in all databases, which will fail due to...
<commit_before>#! /usr/bin/env python3 import os import subprocess ODIE_DIR = os.path.dirname(__file__) subprocess.call([os.path.join(ODIE_DIR, 'create_garfield_models.py')]) subprocess.call([os.path.join(ODIE_DIR, 'create_fsmi_models.py')]) <commit_msg>Add comment explaining unconventional model creation<commit_aft...
#! /usr/bin/env python3 import os import subprocess ODIE_DIR = os.path.dirname(__file__) # due to Flask-SQLA only using a single MetaData object even when handling multiple # databases, we can't create let it create all our models at once (otherwise it # tries to create Enums in all databases, which will fail due to...
#! /usr/bin/env python3 import os import subprocess ODIE_DIR = os.path.dirname(__file__) subprocess.call([os.path.join(ODIE_DIR, 'create_garfield_models.py')]) subprocess.call([os.path.join(ODIE_DIR, 'create_fsmi_models.py')]) Add comment explaining unconventional model creation#! /usr/bin/env python3 import os imp...
<commit_before>#! /usr/bin/env python3 import os import subprocess ODIE_DIR = os.path.dirname(__file__) subprocess.call([os.path.join(ODIE_DIR, 'create_garfield_models.py')]) subprocess.call([os.path.join(ODIE_DIR, 'create_fsmi_models.py')]) <commit_msg>Add comment explaining unconventional model creation<commit_aft...
94db336d4006af775542b5adaf6853b3d88b912c
jacquard/directory/__init__.py
jacquard/directory/__init__.py
import pkg_resources def open_directory(engine, kwargs): entry_point = None for candidate_entry_point in pkg_resources.iter_entry_points( 'jacquard.directory_engines', name=engine, ): entry_point = candidate_entry_point if entry_point is None: raise RuntimeError("Cann...
Add open directory utility function
Add open directory utility function
Python
mit
prophile/jacquard,prophile/jacquard
Add open directory utility function
import pkg_resources def open_directory(engine, kwargs): entry_point = None for candidate_entry_point in pkg_resources.iter_entry_points( 'jacquard.directory_engines', name=engine, ): entry_point = candidate_entry_point if entry_point is None: raise RuntimeError("Cann...
<commit_before><commit_msg>Add open directory utility function<commit_after>
import pkg_resources def open_directory(engine, kwargs): entry_point = None for candidate_entry_point in pkg_resources.iter_entry_points( 'jacquard.directory_engines', name=engine, ): entry_point = candidate_entry_point if entry_point is None: raise RuntimeError("Cann...
Add open directory utility functionimport pkg_resources def open_directory(engine, kwargs): entry_point = None for candidate_entry_point in pkg_resources.iter_entry_points( 'jacquard.directory_engines', name=engine, ): entry_point = candidate_entry_point if entry_point is Non...
<commit_before><commit_msg>Add open directory utility function<commit_after>import pkg_resources def open_directory(engine, kwargs): entry_point = None for candidate_entry_point in pkg_resources.iter_entry_points( 'jacquard.directory_engines', name=engine, ): entry_point = candida...
3934ed699cdb0b472c09ad238ee4284b0050869c
prime-factors/prime_factors.py
prime-factors/prime_factors.py
def prime_factors(n): factors = [] factor = 2 while n != 1: while n % factor == 0: factors += [factor] n //= factor factor += 1 return factors
def prime_factors(n): factors = [] while n % 2 == 0: factors += [2] n //= 2 factor = 3 while n != 1: while n % factor == 0: factors += [factor] n //= factor factor += 2 return factors
Make solution more efficient by only testing odd numbers
Make solution more efficient by only testing odd numbers
Python
agpl-3.0
CubicComet/exercism-python-solutions
def prime_factors(n): factors = [] factor = 2 while n != 1: while n % factor == 0: factors += [factor] n //= factor factor += 1 return factors Make solution more efficient by only testing odd numbers
def prime_factors(n): factors = [] while n % 2 == 0: factors += [2] n //= 2 factor = 3 while n != 1: while n % factor == 0: factors += [factor] n //= factor factor += 2 return factors
<commit_before>def prime_factors(n): factors = [] factor = 2 while n != 1: while n % factor == 0: factors += [factor] n //= factor factor += 1 return factors <commit_msg>Make solution more efficient by only testing odd numbers<commit_after>
def prime_factors(n): factors = [] while n % 2 == 0: factors += [2] n //= 2 factor = 3 while n != 1: while n % factor == 0: factors += [factor] n //= factor factor += 2 return factors
def prime_factors(n): factors = [] factor = 2 while n != 1: while n % factor == 0: factors += [factor] n //= factor factor += 1 return factors Make solution more efficient by only testing odd numbersdef prime_factors(n): factors = [] while n % 2 == 0: ...
<commit_before>def prime_factors(n): factors = [] factor = 2 while n != 1: while n % factor == 0: factors += [factor] n //= factor factor += 1 return factors <commit_msg>Make solution more efficient by only testing odd numbers<commit_after>def prime_factors(n): ...
a5d6793758de7badcc84bd377ea2dddc472d9a6b
imgcat/ipython_magic.py
imgcat/ipython_magic.py
from IPython.core.magic import (Magics, magics_class, line_magic) from IPython.display import display as ipython_display from IPython.display import Markdown import io import PIL.Image def _is_ipython_notebook(): try: # pylint: disable=undefined-variable return 'IPKernelApp' in get_ipython().conf...
from IPython.core.magic import (Magics, magics_class, line_magic) from IPython.display import display as ipython_display from IPython.display import Markdown import io import os import PIL.Image def _is_ipython_notebook(): try: # pylint: disable=undefined-variable return 'IPKernelApp' in get_ipyt...
Support `%imgcat <filename>` for the ipython magic
Support `%imgcat <filename>` for the ipython magic If <filename> is an existing path, do not evaluate it as a code but display the image file itself. Otherwise, evaluate the expression.
Python
mit
wookayin/python-imgcat
from IPython.core.magic import (Magics, magics_class, line_magic) from IPython.display import display as ipython_display from IPython.display import Markdown import io import PIL.Image def _is_ipython_notebook(): try: # pylint: disable=undefined-variable return 'IPKernelApp' in get_ipython().conf...
from IPython.core.magic import (Magics, magics_class, line_magic) from IPython.display import display as ipython_display from IPython.display import Markdown import io import os import PIL.Image def _is_ipython_notebook(): try: # pylint: disable=undefined-variable return 'IPKernelApp' in get_ipyt...
<commit_before>from IPython.core.magic import (Magics, magics_class, line_magic) from IPython.display import display as ipython_display from IPython.display import Markdown import io import PIL.Image def _is_ipython_notebook(): try: # pylint: disable=undefined-variable return 'IPKernelApp' in get...
from IPython.core.magic import (Magics, magics_class, line_magic) from IPython.display import display as ipython_display from IPython.display import Markdown import io import os import PIL.Image def _is_ipython_notebook(): try: # pylint: disable=undefined-variable return 'IPKernelApp' in get_ipyt...
from IPython.core.magic import (Magics, magics_class, line_magic) from IPython.display import display as ipython_display from IPython.display import Markdown import io import PIL.Image def _is_ipython_notebook(): try: # pylint: disable=undefined-variable return 'IPKernelApp' in get_ipython().conf...
<commit_before>from IPython.core.magic import (Magics, magics_class, line_magic) from IPython.display import display as ipython_display from IPython.display import Markdown import io import PIL.Image def _is_ipython_notebook(): try: # pylint: disable=undefined-variable return 'IPKernelApp' in get...
7961fe22b76b8dd75172a848c645b26d87dc2776
tests/training_tests/test_chatterbot_corpus_training.py
tests/training_tests/test_chatterbot_corpus_training.py
from tests.base_case import ChatBotTestCase from chatterbot.trainers import ChatterBotCorpusTrainer class ChatterBotCorpusTrainingTestCase(ChatBotTestCase): """ Test case for training with data from the ChatterBot Corpus. """ def setUp(self): super(ChatterBotCorpusTrainingTestCase, self).setU...
from tests.base_case import ChatBotTestCase from chatterbot.trainers import ChatterBotCorpusTrainer class ChatterBotCorpusTrainingTestCase(ChatBotTestCase): """ Test case for training with data from the ChatterBot Corpus. """ def setUp(self): super(ChatterBotCorpusTrainingTestCase, self).setU...
Switch to list equality check
Switch to list equality check
Python
bsd-3-clause
vkosuri/ChatterBot,gunthercox/ChatterBot
from tests.base_case import ChatBotTestCase from chatterbot.trainers import ChatterBotCorpusTrainer class ChatterBotCorpusTrainingTestCase(ChatBotTestCase): """ Test case for training with data from the ChatterBot Corpus. """ def setUp(self): super(ChatterBotCorpusTrainingTestCase, self).setU...
from tests.base_case import ChatBotTestCase from chatterbot.trainers import ChatterBotCorpusTrainer class ChatterBotCorpusTrainingTestCase(ChatBotTestCase): """ Test case for training with data from the ChatterBot Corpus. """ def setUp(self): super(ChatterBotCorpusTrainingTestCase, self).setU...
<commit_before>from tests.base_case import ChatBotTestCase from chatterbot.trainers import ChatterBotCorpusTrainer class ChatterBotCorpusTrainingTestCase(ChatBotTestCase): """ Test case for training with data from the ChatterBot Corpus. """ def setUp(self): super(ChatterBotCorpusTrainingTestC...
from tests.base_case import ChatBotTestCase from chatterbot.trainers import ChatterBotCorpusTrainer class ChatterBotCorpusTrainingTestCase(ChatBotTestCase): """ Test case for training with data from the ChatterBot Corpus. """ def setUp(self): super(ChatterBotCorpusTrainingTestCase, self).setU...
from tests.base_case import ChatBotTestCase from chatterbot.trainers import ChatterBotCorpusTrainer class ChatterBotCorpusTrainingTestCase(ChatBotTestCase): """ Test case for training with data from the ChatterBot Corpus. """ def setUp(self): super(ChatterBotCorpusTrainingTestCase, self).setU...
<commit_before>from tests.base_case import ChatBotTestCase from chatterbot.trainers import ChatterBotCorpusTrainer class ChatterBotCorpusTrainingTestCase(ChatBotTestCase): """ Test case for training with data from the ChatterBot Corpus. """ def setUp(self): super(ChatterBotCorpusTrainingTestC...
3beffa750d68c2104b740193f0386be464829a1a
libpb/__init__.py
libpb/__init__.py
"""FreeBSD port building infrastructure.""" from __future__ import absolute_import from . import event def stop(kill=False, kill_clean=False): """Stop building ports and cleanup.""" from os import killpg from signal import SIGTERM, SIGKILL from .builder import builders from .env import cpus, flags from ....
"""FreeBSD port building infrastructure.""" from __future__ import absolute_import from . import event def stop(kill=False, kill_clean=False): """Stop building ports and cleanup.""" from os import killpg from signal import SIGTERM, SIGKILL from .builder import builders from .env import cpus, flags from ....
Use SystemExit, not exit() to initiate a shutdown.
Use SystemExit, not exit() to initiate a shutdown. exit() has unintented side affects, such as closing stdin, that are undesired as stdin is assumed to be writable while libpb/event/run unwinds (i.e. Top monitor).
Python
bsd-2-clause
DragonSA/portbuilder,DragonSA/portbuilder
"""FreeBSD port building infrastructure.""" from __future__ import absolute_import from . import event def stop(kill=False, kill_clean=False): """Stop building ports and cleanup.""" from os import killpg from signal import SIGTERM, SIGKILL from .builder import builders from .env import cpus, flags from ....
"""FreeBSD port building infrastructure.""" from __future__ import absolute_import from . import event def stop(kill=False, kill_clean=False): """Stop building ports and cleanup.""" from os import killpg from signal import SIGTERM, SIGKILL from .builder import builders from .env import cpus, flags from ....
<commit_before>"""FreeBSD port building infrastructure.""" from __future__ import absolute_import from . import event def stop(kill=False, kill_clean=False): """Stop building ports and cleanup.""" from os import killpg from signal import SIGTERM, SIGKILL from .builder import builders from .env import cpus,...
"""FreeBSD port building infrastructure.""" from __future__ import absolute_import from . import event def stop(kill=False, kill_clean=False): """Stop building ports and cleanup.""" from os import killpg from signal import SIGTERM, SIGKILL from .builder import builders from .env import cpus, flags from ....
"""FreeBSD port building infrastructure.""" from __future__ import absolute_import from . import event def stop(kill=False, kill_clean=False): """Stop building ports and cleanup.""" from os import killpg from signal import SIGTERM, SIGKILL from .builder import builders from .env import cpus, flags from ....
<commit_before>"""FreeBSD port building infrastructure.""" from __future__ import absolute_import from . import event def stop(kill=False, kill_clean=False): """Stop building ports and cleanup.""" from os import killpg from signal import SIGTERM, SIGKILL from .builder import builders from .env import cpus,...
7c1a630057ce78f36c1d2406bb7109e72dee4ee3
storm/src/py/resources/index.py
storm/src/py/resources/index.py
# -*- coding: utf-8 -*- from elasticsearch import Elasticsearch from elasticsearch.exceptions import NotFoundError from storm import Bolt, log class ESIndexBolt(Bolt): def initialize(self, conf, context): log('bolt initializing') # TODO: Make connection params configurable. self.es = Elas...
# -*- coding: utf-8 -*- from elasticsearch import Elasticsearch from elasticsearch.client import IndicesClient from elasticsearch.exceptions import NotFoundError from elasticsearch.exceptions import TransportError from storm import Bolt, log class ESIndexBolt(Bolt): def initialize(self, conf, context): l...
Add dynamic mapping creation with nested type
Add dynamic mapping creation with nested type
Python
bsd-2-clause
cutoffthetop/recommender,cutoffthetop/recommender,cutoffthetop/recommender
# -*- coding: utf-8 -*- from elasticsearch import Elasticsearch from elasticsearch.exceptions import NotFoundError from storm import Bolt, log class ESIndexBolt(Bolt): def initialize(self, conf, context): log('bolt initializing') # TODO: Make connection params configurable. self.es = Elas...
# -*- coding: utf-8 -*- from elasticsearch import Elasticsearch from elasticsearch.client import IndicesClient from elasticsearch.exceptions import NotFoundError from elasticsearch.exceptions import TransportError from storm import Bolt, log class ESIndexBolt(Bolt): def initialize(self, conf, context): l...
<commit_before># -*- coding: utf-8 -*- from elasticsearch import Elasticsearch from elasticsearch.exceptions import NotFoundError from storm import Bolt, log class ESIndexBolt(Bolt): def initialize(self, conf, context): log('bolt initializing') # TODO: Make connection params configurable. ...
# -*- coding: utf-8 -*- from elasticsearch import Elasticsearch from elasticsearch.client import IndicesClient from elasticsearch.exceptions import NotFoundError from elasticsearch.exceptions import TransportError from storm import Bolt, log class ESIndexBolt(Bolt): def initialize(self, conf, context): l...
# -*- coding: utf-8 -*- from elasticsearch import Elasticsearch from elasticsearch.exceptions import NotFoundError from storm import Bolt, log class ESIndexBolt(Bolt): def initialize(self, conf, context): log('bolt initializing') # TODO: Make connection params configurable. self.es = Elas...
<commit_before># -*- coding: utf-8 -*- from elasticsearch import Elasticsearch from elasticsearch.exceptions import NotFoundError from storm import Bolt, log class ESIndexBolt(Bolt): def initialize(self, conf, context): log('bolt initializing') # TODO: Make connection params configurable. ...
1ffdbcb9766136b0aee4be4f2f067fabf456e30f
opps/__init__.py
opps/__init__.py
#!/usr/bin/env python # -*- coding: utf-8 -*- import pkg_resources pkg_resources.declare_namespace(__name__) VERSION = (0, 1, 6) __version__ = ".".join(map(str, VERSION)) __status__ = "Development" __description__ = u"Opps CMS websites magazines and high-traffic" __author__ = u"Thiago Avelino" __credits__ = [] __em...
#!/usr/bin/env python # -*- coding: utf-8 -*- import pkg_resources pkg_resources.declare_namespace(__name__) VERSION = (0, 1, 7, 'dev') __version__ = ".".join(map(str, VERSION)) __status__ = "Development" __description__ = u"Opps CMS websites magazines and high-traffic" __author__ = u"Thiago Avelino" __credits__ = ...
Set developer version 0.1.7 start developer version on date 2013.04.16
Set developer version 0.1.7 start developer version on date 2013.04.16
Python
mit
opps/opps,YACOWS/opps,jeanmask/opps,opps/opps,jeanmask/opps,jeanmask/opps,williamroot/opps,williamroot/opps,opps/opps,williamroot/opps,opps/opps,YACOWS/opps,williamroot/opps,YACOWS/opps,YACOWS/opps,jeanmask/opps
#!/usr/bin/env python # -*- coding: utf-8 -*- import pkg_resources pkg_resources.declare_namespace(__name__) VERSION = (0, 1, 6) __version__ = ".".join(map(str, VERSION)) __status__ = "Development" __description__ = u"Opps CMS websites magazines and high-traffic" __author__ = u"Thiago Avelino" __credits__ = [] __em...
#!/usr/bin/env python # -*- coding: utf-8 -*- import pkg_resources pkg_resources.declare_namespace(__name__) VERSION = (0, 1, 7, 'dev') __version__ = ".".join(map(str, VERSION)) __status__ = "Development" __description__ = u"Opps CMS websites magazines and high-traffic" __author__ = u"Thiago Avelino" __credits__ = ...
<commit_before>#!/usr/bin/env python # -*- coding: utf-8 -*- import pkg_resources pkg_resources.declare_namespace(__name__) VERSION = (0, 1, 6) __version__ = ".".join(map(str, VERSION)) __status__ = "Development" __description__ = u"Opps CMS websites magazines and high-traffic" __author__ = u"Thiago Avelino" __cred...
#!/usr/bin/env python # -*- coding: utf-8 -*- import pkg_resources pkg_resources.declare_namespace(__name__) VERSION = (0, 1, 7, 'dev') __version__ = ".".join(map(str, VERSION)) __status__ = "Development" __description__ = u"Opps CMS websites magazines and high-traffic" __author__ = u"Thiago Avelino" __credits__ = ...
#!/usr/bin/env python # -*- coding: utf-8 -*- import pkg_resources pkg_resources.declare_namespace(__name__) VERSION = (0, 1, 6) __version__ = ".".join(map(str, VERSION)) __status__ = "Development" __description__ = u"Opps CMS websites magazines and high-traffic" __author__ = u"Thiago Avelino" __credits__ = [] __em...
<commit_before>#!/usr/bin/env python # -*- coding: utf-8 -*- import pkg_resources pkg_resources.declare_namespace(__name__) VERSION = (0, 1, 6) __version__ = ".".join(map(str, VERSION)) __status__ = "Development" __description__ = u"Opps CMS websites magazines and high-traffic" __author__ = u"Thiago Avelino" __cred...
aa84c6dccbff76a4e3b081dfb334b64bb3e6664f
test/functional/rpc_deprecated.py
test/functional/rpc_deprecated.py
#!/usr/bin/env python3 # Copyright (c) 2017 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. """Test deprecation of RPC calls.""" from test_framework.test_framework import BitcoinTestFramework from test_f...
#!/usr/bin/env python3 # Copyright (c) 2017 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. """Test deprecation of RPC calls.""" from test_framework.test_framework import BitcoinTestFramework class Depr...
Remove test for deprecated createmultsig option
[tests] Remove test for deprecated createmultsig option
Python
mit
DigitalPandacoin/pandacoin,peercoin/peercoin,DigitalPandacoin/pandacoin,peercoin/peercoin,DigitalPandacoin/pandacoin,DigitalPandacoin/pandacoin,peercoin/peercoin,peercoin/peercoin,DigitalPandacoin/pandacoin,peercoin/peercoin,peercoin/peercoin,DigitalPandacoin/pandacoin
#!/usr/bin/env python3 # Copyright (c) 2017 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. """Test deprecation of RPC calls.""" from test_framework.test_framework import BitcoinTestFramework from test_f...
#!/usr/bin/env python3 # Copyright (c) 2017 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. """Test deprecation of RPC calls.""" from test_framework.test_framework import BitcoinTestFramework class Depr...
<commit_before>#!/usr/bin/env python3 # Copyright (c) 2017 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. """Test deprecation of RPC calls.""" from test_framework.test_framework import BitcoinTestFramew...
#!/usr/bin/env python3 # Copyright (c) 2017 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. """Test deprecation of RPC calls.""" from test_framework.test_framework import BitcoinTestFramework class Depr...
#!/usr/bin/env python3 # Copyright (c) 2017 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. """Test deprecation of RPC calls.""" from test_framework.test_framework import BitcoinTestFramework from test_f...
<commit_before>#!/usr/bin/env python3 # Copyright (c) 2017 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. """Test deprecation of RPC calls.""" from test_framework.test_framework import BitcoinTestFramew...
8798381c93c49d6f7a83320c3ae27c348e95b8ff
testhook/templatetags/testhook.py
testhook/templatetags/testhook.py
import sys from django.template import Library, TemplateSyntaxError from django.conf import settings from django.utils.safestring import mark_safe from django.utils.text import slugify if sys.version_info[0] == 2: str = basestring register = Library() @register.simple_tag def testhook(name, *args): if not g...
import sys from django.template import Library, TemplateSyntaxError from django.conf import settings from django.utils.safestring import mark_safe from django.utils.text import slugify if sys.version_info[0] == 2: str = basestring register = Library() @register.simple_tag def testhook(name, *args): if not g...
Simplify exception handling of required argument
Simplify exception handling of required argument
Python
apache-2.0
jjanssen/django-testhook
import sys from django.template import Library, TemplateSyntaxError from django.conf import settings from django.utils.safestring import mark_safe from django.utils.text import slugify if sys.version_info[0] == 2: str = basestring register = Library() @register.simple_tag def testhook(name, *args): if not g...
import sys from django.template import Library, TemplateSyntaxError from django.conf import settings from django.utils.safestring import mark_safe from django.utils.text import slugify if sys.version_info[0] == 2: str = basestring register = Library() @register.simple_tag def testhook(name, *args): if not g...
<commit_before>import sys from django.template import Library, TemplateSyntaxError from django.conf import settings from django.utils.safestring import mark_safe from django.utils.text import slugify if sys.version_info[0] == 2: str = basestring register = Library() @register.simple_tag def testhook(name, *args...
import sys from django.template import Library, TemplateSyntaxError from django.conf import settings from django.utils.safestring import mark_safe from django.utils.text import slugify if sys.version_info[0] == 2: str = basestring register = Library() @register.simple_tag def testhook(name, *args): if not g...
import sys from django.template import Library, TemplateSyntaxError from django.conf import settings from django.utils.safestring import mark_safe from django.utils.text import slugify if sys.version_info[0] == 2: str = basestring register = Library() @register.simple_tag def testhook(name, *args): if not g...
<commit_before>import sys from django.template import Library, TemplateSyntaxError from django.conf import settings from django.utils.safestring import mark_safe from django.utils.text import slugify if sys.version_info[0] == 2: str = basestring register = Library() @register.simple_tag def testhook(name, *args...
790442eb5523f6992e8943ee1db5817cb27abdea
lingvo/jax/base_model_params.py
lingvo/jax/base_model_params.py
# Lint as: python3 # Copyright 2021 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless ...
# Lint as: python3 # Copyright 2021 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless ...
Add decoder_datasets() to BaseModelParams to indicate which datasets are to be decoded.
Add decoder_datasets() to BaseModelParams to indicate which datasets are to be decoded. PiperOrigin-RevId: 413779472
Python
apache-2.0
tensorflow/lingvo,tensorflow/lingvo,tensorflow/lingvo,tensorflow/lingvo
# Lint as: python3 # Copyright 2021 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless ...
# Lint as: python3 # Copyright 2021 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless ...
<commit_before># Lint as: python3 # Copyright 2021 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-...
# Lint as: python3 # Copyright 2021 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless ...
# Lint as: python3 # Copyright 2021 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless ...
<commit_before># Lint as: python3 # Copyright 2021 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-...
8c9d69b16f0c2848865a37b4a30325315f6d6735
longclaw/project_template/products/migrations/0001_initial.py
longclaw/project_template/products/migrations/0001_initial.py
# -*- coding: utf-8 -*- # Generated by Django 1.10.4 on 2017-02-19 11:14 from __future__ import unicode_literals from django.db import migrations, models import django.db.models.deletion import django_extensions.db.fields import modelcluster.fields import wagtail.wagtailcore.fields class Migration(migrations.Migrati...
# -*- coding: utf-8 -*- # Generated by Django 1.10.4 on 2017-02-19 11:14 from __future__ import unicode_literals from django.db import migrations, models import django.db.models.deletion import django_extensions.db.fields import modelcluster.fields import wagtail.wagtailcore.fields class Migration(migrations.Migrati...
Correct migration in project template
Correct migration in project template
Python
mit
JamesRamm/longclaw,JamesRamm/longclaw,JamesRamm/longclaw,JamesRamm/longclaw
# -*- coding: utf-8 -*- # Generated by Django 1.10.4 on 2017-02-19 11:14 from __future__ import unicode_literals from django.db import migrations, models import django.db.models.deletion import django_extensions.db.fields import modelcluster.fields import wagtail.wagtailcore.fields class Migration(migrations.Migrati...
# -*- coding: utf-8 -*- # Generated by Django 1.10.4 on 2017-02-19 11:14 from __future__ import unicode_literals from django.db import migrations, models import django.db.models.deletion import django_extensions.db.fields import modelcluster.fields import wagtail.wagtailcore.fields class Migration(migrations.Migrati...
<commit_before># -*- coding: utf-8 -*- # Generated by Django 1.10.4 on 2017-02-19 11:14 from __future__ import unicode_literals from django.db import migrations, models import django.db.models.deletion import django_extensions.db.fields import modelcluster.fields import wagtail.wagtailcore.fields class Migration(mig...
# -*- coding: utf-8 -*- # Generated by Django 1.10.4 on 2017-02-19 11:14 from __future__ import unicode_literals from django.db import migrations, models import django.db.models.deletion import django_extensions.db.fields import modelcluster.fields import wagtail.wagtailcore.fields class Migration(migrations.Migrati...
# -*- coding: utf-8 -*- # Generated by Django 1.10.4 on 2017-02-19 11:14 from __future__ import unicode_literals from django.db import migrations, models import django.db.models.deletion import django_extensions.db.fields import modelcluster.fields import wagtail.wagtailcore.fields class Migration(migrations.Migrati...
<commit_before># -*- coding: utf-8 -*- # Generated by Django 1.10.4 on 2017-02-19 11:14 from __future__ import unicode_literals from django.db import migrations, models import django.db.models.deletion import django_extensions.db.fields import modelcluster.fields import wagtail.wagtailcore.fields class Migration(mig...
fe6c924532750f646303fe82728795717b830819
piper/version.py
piper/version.py
from piper.abc import DynamicItem from piper.utils import oneshot class Version(DynamicItem): """ Base for versioning classes """ def __str__(self): # pragma: nocover return self.get_version() def get_version(self): raise NotImplementedError() class StaticVersion(Version): ...
from piper.abc import DynamicItem from piper.utils import oneshot class Version(DynamicItem): """ Base for versioning classes """ def __str__(self): # pragma: nocover return self.get_version() def get_version(self): raise NotImplementedError() class StaticVersion(Version): ...
Remove argument defaulting from Version()
Remove argument defaulting from Version() It was moved to the ABC and subsequently the check was left behind.
Python
mit
thiderman/piper
from piper.abc import DynamicItem from piper.utils import oneshot class Version(DynamicItem): """ Base for versioning classes """ def __str__(self): # pragma: nocover return self.get_version() def get_version(self): raise NotImplementedError() class StaticVersion(Version): ...
from piper.abc import DynamicItem from piper.utils import oneshot class Version(DynamicItem): """ Base for versioning classes """ def __str__(self): # pragma: nocover return self.get_version() def get_version(self): raise NotImplementedError() class StaticVersion(Version): ...
<commit_before>from piper.abc import DynamicItem from piper.utils import oneshot class Version(DynamicItem): """ Base for versioning classes """ def __str__(self): # pragma: nocover return self.get_version() def get_version(self): raise NotImplementedError() class StaticVersi...
from piper.abc import DynamicItem from piper.utils import oneshot class Version(DynamicItem): """ Base for versioning classes """ def __str__(self): # pragma: nocover return self.get_version() def get_version(self): raise NotImplementedError() class StaticVersion(Version): ...
from piper.abc import DynamicItem from piper.utils import oneshot class Version(DynamicItem): """ Base for versioning classes """ def __str__(self): # pragma: nocover return self.get_version() def get_version(self): raise NotImplementedError() class StaticVersion(Version): ...
<commit_before>from piper.abc import DynamicItem from piper.utils import oneshot class Version(DynamicItem): """ Base for versioning classes """ def __str__(self): # pragma: nocover return self.get_version() def get_version(self): raise NotImplementedError() class StaticVersi...
cd68d5bf444385334841a5ce07058cddb314ff82
lobster/cmssw/data/merge_cfg.py
lobster/cmssw/data/merge_cfg.py
import FWCore.ParameterSet.Config as cms from FWCore.ParameterSet.VarParsing import VarParsing import subprocess import os import sys options = VarParsing('analysis') options.register('chirp', default=None, mytype=VarParsing.varType.string) options.register('inputs', mult=VarParsing.multiplicity.list, mytype=VarParsin...
import FWCore.ParameterSet.Config as cms from FWCore.ParameterSet.VarParsing import VarParsing import subprocess import os import sys options = VarParsing('analysis') options.register('chirp', default=None, mytype=VarParsing.varType.string) options.register('inputs', mult=VarParsing.multiplicity.list, mytype=VarParsin...
Disable duplicate check mode for merging-- this can cause events to be thrown out for MC data.
Disable duplicate check mode for merging-- this can cause events to be thrown out for MC data.
Python
mit
matz-e/lobster,matz-e/lobster,matz-e/lobster
import FWCore.ParameterSet.Config as cms from FWCore.ParameterSet.VarParsing import VarParsing import subprocess import os import sys options = VarParsing('analysis') options.register('chirp', default=None, mytype=VarParsing.varType.string) options.register('inputs', mult=VarParsing.multiplicity.list, mytype=VarParsin...
import FWCore.ParameterSet.Config as cms from FWCore.ParameterSet.VarParsing import VarParsing import subprocess import os import sys options = VarParsing('analysis') options.register('chirp', default=None, mytype=VarParsing.varType.string) options.register('inputs', mult=VarParsing.multiplicity.list, mytype=VarParsin...
<commit_before>import FWCore.ParameterSet.Config as cms from FWCore.ParameterSet.VarParsing import VarParsing import subprocess import os import sys options = VarParsing('analysis') options.register('chirp', default=None, mytype=VarParsing.varType.string) options.register('inputs', mult=VarParsing.multiplicity.list, m...
import FWCore.ParameterSet.Config as cms from FWCore.ParameterSet.VarParsing import VarParsing import subprocess import os import sys options = VarParsing('analysis') options.register('chirp', default=None, mytype=VarParsing.varType.string) options.register('inputs', mult=VarParsing.multiplicity.list, mytype=VarParsin...
import FWCore.ParameterSet.Config as cms from FWCore.ParameterSet.VarParsing import VarParsing import subprocess import os import sys options = VarParsing('analysis') options.register('chirp', default=None, mytype=VarParsing.varType.string) options.register('inputs', mult=VarParsing.multiplicity.list, mytype=VarParsin...
<commit_before>import FWCore.ParameterSet.Config as cms from FWCore.ParameterSet.VarParsing import VarParsing import subprocess import os import sys options = VarParsing('analysis') options.register('chirp', default=None, mytype=VarParsing.varType.string) options.register('inputs', mult=VarParsing.multiplicity.list, m...
5da32c725200d9f3b319be40ae5c2d302dc72249
cloudbridge/cloud/providers/azure/test/test_azure_resource_group.py
cloudbridge/cloud/providers/azure/test/test_azure_resource_group.py
from cloudbridge.cloud.providers.azure.test.helpers import ProviderTestBase class AzureResourceGroupTestCase(ProviderTestBase): def test_resource_group_create(self): resource_group_params = {'location': self.provider.region_name} rg = self.provider.azure_client. \ create_resource_group...
from cloudbridge.cloud.providers.azure.test.helpers import ProviderTestBase class AzureResourceGroupTestCase(ProviderTestBase): def test_resource_group_create(self): resource_group_params = {'location': self.provider.region_name} rg = self.provider.azure_client. \ create_resource_group...
Update resource group unit test
Update resource group unit test
Python
mit
gvlproject/libcloudbridge,gvlproject/cloudbridge
from cloudbridge.cloud.providers.azure.test.helpers import ProviderTestBase class AzureResourceGroupTestCase(ProviderTestBase): def test_resource_group_create(self): resource_group_params = {'location': self.provider.region_name} rg = self.provider.azure_client. \ create_resource_group...
from cloudbridge.cloud.providers.azure.test.helpers import ProviderTestBase class AzureResourceGroupTestCase(ProviderTestBase): def test_resource_group_create(self): resource_group_params = {'location': self.provider.region_name} rg = self.provider.azure_client. \ create_resource_group...
<commit_before>from cloudbridge.cloud.providers.azure.test.helpers import ProviderTestBase class AzureResourceGroupTestCase(ProviderTestBase): def test_resource_group_create(self): resource_group_params = {'location': self.provider.region_name} rg = self.provider.azure_client. \ create...
from cloudbridge.cloud.providers.azure.test.helpers import ProviderTestBase class AzureResourceGroupTestCase(ProviderTestBase): def test_resource_group_create(self): resource_group_params = {'location': self.provider.region_name} rg = self.provider.azure_client. \ create_resource_group...
from cloudbridge.cloud.providers.azure.test.helpers import ProviderTestBase class AzureResourceGroupTestCase(ProviderTestBase): def test_resource_group_create(self): resource_group_params = {'location': self.provider.region_name} rg = self.provider.azure_client. \ create_resource_group...
<commit_before>from cloudbridge.cloud.providers.azure.test.helpers import ProviderTestBase class AzureResourceGroupTestCase(ProviderTestBase): def test_resource_group_create(self): resource_group_params = {'location': self.provider.region_name} rg = self.provider.azure_client. \ create...
afc18ff91bde4e6e6da554c7f9e520e5cac89fa2
streams.py
streams.py
import praw r = praw.Reddit(user_agent='nba_stream_parser') submissions = r.get_subreddit('nbastreams').get_hot(limit=10) for submission in submissions: print(submission.selftext_html)
from bs4 import BeautifulSoup import html import praw r = praw.Reddit(user_agent='nba_stream_parser') def get_streams_for_team(teams): teams.append('Game Thread') submissions = r.get_subreddit('nbastreams').get_hot(limit=20) streams = [] for submission in submissions: if all(team in submissio...
Add comment parser; get stream links for any (2) team(s)
Add comment parser; get stream links for any (2) team(s)
Python
mit
kshvmdn/NBAScores,kshvmdn/nba.js,kshvmdn/nba-scores
import praw r = praw.Reddit(user_agent='nba_stream_parser') submissions = r.get_subreddit('nbastreams').get_hot(limit=10) for submission in submissions: print(submission.selftext_html) Add comment parser; get stream links for any (2) team(s)
from bs4 import BeautifulSoup import html import praw r = praw.Reddit(user_agent='nba_stream_parser') def get_streams_for_team(teams): teams.append('Game Thread') submissions = r.get_subreddit('nbastreams').get_hot(limit=20) streams = [] for submission in submissions: if all(team in submissio...
<commit_before>import praw r = praw.Reddit(user_agent='nba_stream_parser') submissions = r.get_subreddit('nbastreams').get_hot(limit=10) for submission in submissions: print(submission.selftext_html) <commit_msg>Add comment parser; get stream links for any (2) team(s)<commit_after>
from bs4 import BeautifulSoup import html import praw r = praw.Reddit(user_agent='nba_stream_parser') def get_streams_for_team(teams): teams.append('Game Thread') submissions = r.get_subreddit('nbastreams').get_hot(limit=20) streams = [] for submission in submissions: if all(team in submissio...
import praw r = praw.Reddit(user_agent='nba_stream_parser') submissions = r.get_subreddit('nbastreams').get_hot(limit=10) for submission in submissions: print(submission.selftext_html) Add comment parser; get stream links for any (2) team(s)from bs4 import BeautifulSoup import html import praw r = praw.Reddit(use...
<commit_before>import praw r = praw.Reddit(user_agent='nba_stream_parser') submissions = r.get_subreddit('nbastreams').get_hot(limit=10) for submission in submissions: print(submission.selftext_html) <commit_msg>Add comment parser; get stream links for any (2) team(s)<commit_after>from bs4 import BeautifulSoup imp...
46a376698851957813287fcb8deb1e7ebc222914
alfred_listener/__main__.py
alfred_listener/__main__.py
#!/usr/bin/env python import os from argh import arg, ArghParser from functools import wraps def with_app(func): @wraps(func) @arg('--config', help='Path to config file', required=True) def wrapper(*args, **kwargs): config = args[0].config from alfred_listener import create_app ap...
#!/usr/bin/env python import os from argh import arg, ArghParser from functools import wraps def with_app(func): @wraps(func) @arg('--config', help='Path to config file', required=True) def wrapper(*args, **kwargs): config = args[0].config from alfred_listener import create_app ap...
Add an option to disable code reloader to runserver command
Add an option to disable code reloader to runserver command
Python
isc
alfredhq/alfred-listener
#!/usr/bin/env python import os from argh import arg, ArghParser from functools import wraps def with_app(func): @wraps(func) @arg('--config', help='Path to config file', required=True) def wrapper(*args, **kwargs): config = args[0].config from alfred_listener import create_app ap...
#!/usr/bin/env python import os from argh import arg, ArghParser from functools import wraps def with_app(func): @wraps(func) @arg('--config', help='Path to config file', required=True) def wrapper(*args, **kwargs): config = args[0].config from alfred_listener import create_app ap...
<commit_before>#!/usr/bin/env python import os from argh import arg, ArghParser from functools import wraps def with_app(func): @wraps(func) @arg('--config', help='Path to config file', required=True) def wrapper(*args, **kwargs): config = args[0].config from alfred_listener import create...
#!/usr/bin/env python import os from argh import arg, ArghParser from functools import wraps def with_app(func): @wraps(func) @arg('--config', help='Path to config file', required=True) def wrapper(*args, **kwargs): config = args[0].config from alfred_listener import create_app ap...
#!/usr/bin/env python import os from argh import arg, ArghParser from functools import wraps def with_app(func): @wraps(func) @arg('--config', help='Path to config file', required=True) def wrapper(*args, **kwargs): config = args[0].config from alfred_listener import create_app ap...
<commit_before>#!/usr/bin/env python import os from argh import arg, ArghParser from functools import wraps def with_app(func): @wraps(func) @arg('--config', help='Path to config file', required=True) def wrapper(*args, **kwargs): config = args[0].config from alfred_listener import create...
e0ff626423944ed3b1e08ddeebbfcf60885307a5
tempest/stress/actions/volume_create_delete.py
tempest/stress/actions/volume_create_delete.py
# Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # di...
# Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # di...
Fix stress test which was not changed to receive one client value
Fix stress test which was not changed to receive one client value Change-Id: I186f2827c91d8b1eabd0769dda4765a973bf42b4 Closes-Bug: 1413980
Python
apache-2.0
tudorvio/tempest,yamt/tempest,jamielennox/tempest,xbezdick/tempest,hpcloud-mon/tempest,tudorvio/tempest,varunarya10/tempest,neerja28/Tempest,danielmellado/tempest,zsoltdudas/lis-tempest,jaspreetw/tempest,FujitsuEnablingSoftwareTechnologyGmbH/tempest,cisco-openstack/tempest,afaheem88/tempest,hpcloud-mon/tempest,vedujosh...
# Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # di...
# Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # di...
<commit_before># Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, s...
# Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # di...
# Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # di...
<commit_before># Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, s...
d37631451ad65588fdd8ab6cb300769deca3d043
modules/roles.py
modules/roles.py
import discord import shlex from modules.botModule import BotModule class Roles(BotModule): name = 'Roles' description = 'Allow for the assignment and removal of roles.' help_text = '' trigger_string = '!role' # String to listen for as trigger async def parse_command(self, message, client): ...
import discord import shlex from modules.botModule import BotModule class Roles(BotModule): name = 'Roles' description = 'Allow for the assignment and removal of roles.' help_text = 'Usage: `!roles "role_name"`. This will add you to that role if allowed.' ' Executing it when you already ...
Add help text for Roles module.
Add help text for Roles module.
Python
mit
suclearnub/scubot
import discord import shlex from modules.botModule import BotModule class Roles(BotModule): name = 'Roles' description = 'Allow for the assignment and removal of roles.' help_text = '' trigger_string = '!role' # String to listen for as trigger async def parse_command(self, message, client): ...
import discord import shlex from modules.botModule import BotModule class Roles(BotModule): name = 'Roles' description = 'Allow for the assignment and removal of roles.' help_text = 'Usage: `!roles "role_name"`. This will add you to that role if allowed.' ' Executing it when you already ...
<commit_before>import discord import shlex from modules.botModule import BotModule class Roles(BotModule): name = 'Roles' description = 'Allow for the assignment and removal of roles.' help_text = '' trigger_string = '!role' # String to listen for as trigger async def parse_command(self, mess...
import discord import shlex from modules.botModule import BotModule class Roles(BotModule): name = 'Roles' description = 'Allow for the assignment and removal of roles.' help_text = 'Usage: `!roles "role_name"`. This will add you to that role if allowed.' ' Executing it when you already ...
import discord import shlex from modules.botModule import BotModule class Roles(BotModule): name = 'Roles' description = 'Allow for the assignment and removal of roles.' help_text = '' trigger_string = '!role' # String to listen for as trigger async def parse_command(self, message, client): ...
<commit_before>import discord import shlex from modules.botModule import BotModule class Roles(BotModule): name = 'Roles' description = 'Allow for the assignment and removal of roles.' help_text = '' trigger_string = '!role' # String to listen for as trigger async def parse_command(self, mess...
ba42df4296a02396e823ee9692fb84eb0deb8b7c
corehq/messaging/smsbackends/start_enterprise/views.py
corehq/messaging/smsbackends/start_enterprise/views.py
from __future__ import absolute_import from corehq.apps.sms.views import IncomingBackendView from corehq.messaging.smsbackends.start_enterprise.models import ( StartEnterpriseBackend, StartEnterpriseDeliveryReceipt, ) from datetime import datetime from django.http import HttpResponse, HttpResponseBadRequest c...
from __future__ import absolute_import import logging from corehq.apps.sms.views import IncomingBackendView from corehq.messaging.smsbackends.start_enterprise.models import ( StartEnterpriseBackend, StartEnterpriseDeliveryReceipt, ) from datetime import datetime from django.http import HttpResponse, HttpRespons...
Add logging to delivery receipt view
Add logging to delivery receipt view
Python
bsd-3-clause
dimagi/commcare-hq,dimagi/commcare-hq,dimagi/commcare-hq,dimagi/commcare-hq,dimagi/commcare-hq
from __future__ import absolute_import from corehq.apps.sms.views import IncomingBackendView from corehq.messaging.smsbackends.start_enterprise.models import ( StartEnterpriseBackend, StartEnterpriseDeliveryReceipt, ) from datetime import datetime from django.http import HttpResponse, HttpResponseBadRequest c...
from __future__ import absolute_import import logging from corehq.apps.sms.views import IncomingBackendView from corehq.messaging.smsbackends.start_enterprise.models import ( StartEnterpriseBackend, StartEnterpriseDeliveryReceipt, ) from datetime import datetime from django.http import HttpResponse, HttpRespons...
<commit_before>from __future__ import absolute_import from corehq.apps.sms.views import IncomingBackendView from corehq.messaging.smsbackends.start_enterprise.models import ( StartEnterpriseBackend, StartEnterpriseDeliveryReceipt, ) from datetime import datetime from django.http import HttpResponse, HttpRespons...
from __future__ import absolute_import import logging from corehq.apps.sms.views import IncomingBackendView from corehq.messaging.smsbackends.start_enterprise.models import ( StartEnterpriseBackend, StartEnterpriseDeliveryReceipt, ) from datetime import datetime from django.http import HttpResponse, HttpRespons...
from __future__ import absolute_import from corehq.apps.sms.views import IncomingBackendView from corehq.messaging.smsbackends.start_enterprise.models import ( StartEnterpriseBackend, StartEnterpriseDeliveryReceipt, ) from datetime import datetime from django.http import HttpResponse, HttpResponseBadRequest c...
<commit_before>from __future__ import absolute_import from corehq.apps.sms.views import IncomingBackendView from corehq.messaging.smsbackends.start_enterprise.models import ( StartEnterpriseBackend, StartEnterpriseDeliveryReceipt, ) from datetime import datetime from django.http import HttpResponse, HttpRespons...
7ca228c6454ae208c8a42cc1d138566cc7d19084
mufg_simulator.py
mufg_simulator.py
#!/usr/bin/pyton from __future__ import division import random initial_items = int(raw_input("how many items do you have at the start?: ") or "50") iteration_days = int(raw_input("how many days do you have to multiple them?: ") or "100") trials = 1000 def iterate_n_days(n, initial_items): current_items = initial_i...
#!/usr/bin/pyton from __future__ import division import random initial_items = int(raw_input("how many items do you have at the start?: ") or "50") iteration_days = int(raw_input("how many days do you have to multiple them?: ") or "100") trials = 1000 def iterate_n_days(n, initial_items): current_items = initial_i...
Correct off by one error in trial count
Correct off by one error in trial count
Python
apache-2.0
nikolawannabe/mufg_simulator
#!/usr/bin/pyton from __future__ import division import random initial_items = int(raw_input("how many items do you have at the start?: ") or "50") iteration_days = int(raw_input("how many days do you have to multiple them?: ") or "100") trials = 1000 def iterate_n_days(n, initial_items): current_items = initial_i...
#!/usr/bin/pyton from __future__ import division import random initial_items = int(raw_input("how many items do you have at the start?: ") or "50") iteration_days = int(raw_input("how many days do you have to multiple them?: ") or "100") trials = 1000 def iterate_n_days(n, initial_items): current_items = initial_i...
<commit_before>#!/usr/bin/pyton from __future__ import division import random initial_items = int(raw_input("how many items do you have at the start?: ") or "50") iteration_days = int(raw_input("how many days do you have to multiple them?: ") or "100") trials = 1000 def iterate_n_days(n, initial_items): current_it...
#!/usr/bin/pyton from __future__ import division import random initial_items = int(raw_input("how many items do you have at the start?: ") or "50") iteration_days = int(raw_input("how many days do you have to multiple them?: ") or "100") trials = 1000 def iterate_n_days(n, initial_items): current_items = initial_i...
#!/usr/bin/pyton from __future__ import division import random initial_items = int(raw_input("how many items do you have at the start?: ") or "50") iteration_days = int(raw_input("how many days do you have to multiple them?: ") or "100") trials = 1000 def iterate_n_days(n, initial_items): current_items = initial_i...
<commit_before>#!/usr/bin/pyton from __future__ import division import random initial_items = int(raw_input("how many items do you have at the start?: ") or "50") iteration_days = int(raw_input("how many days do you have to multiple them?: ") or "100") trials = 1000 def iterate_n_days(n, initial_items): current_it...
1999e66070b02a30460c76d90787c7c20905363a
kboard/board/tests/test_templatetags.py
kboard/board/tests/test_templatetags.py
from .base import BoardAppTest from board.templatetags.url_parameter import url_parameter class UrlParameterTest(BoardAppTest): def test_contains_correct_string(self): parameter = { 'a': 13, 'query': 'hello', 'b': 'This is a test' } url_string = url_para...
from .base import BoardAppTest from board.templatetags.url_parameter import url_parameter from board.templatetags.hide_ip import hide_ip class UrlParameterTest(BoardAppTest): def test_contains_correct_string(self): parameter = { 'a': 13, 'query': 'hello', 'b': 'This is ...
Add test of hide ip template tag
Add test of hide ip template tag
Python
mit
kboard/kboard,cjh5414/kboard,hyesun03/k-board,hyesun03/k-board,hyesun03/k-board,kboard/kboard,guswnsxodlf/k-board,kboard/kboard,guswnsxodlf/k-board,cjh5414/kboard,guswnsxodlf/k-board,cjh5414/kboard,darjeeling/k-board
from .base import BoardAppTest from board.templatetags.url_parameter import url_parameter class UrlParameterTest(BoardAppTest): def test_contains_correct_string(self): parameter = { 'a': 13, 'query': 'hello', 'b': 'This is a test' } url_string = url_para...
from .base import BoardAppTest from board.templatetags.url_parameter import url_parameter from board.templatetags.hide_ip import hide_ip class UrlParameterTest(BoardAppTest): def test_contains_correct_string(self): parameter = { 'a': 13, 'query': 'hello', 'b': 'This is ...
<commit_before>from .base import BoardAppTest from board.templatetags.url_parameter import url_parameter class UrlParameterTest(BoardAppTest): def test_contains_correct_string(self): parameter = { 'a': 13, 'query': 'hello', 'b': 'This is a test' } url_st...
from .base import BoardAppTest from board.templatetags.url_parameter import url_parameter from board.templatetags.hide_ip import hide_ip class UrlParameterTest(BoardAppTest): def test_contains_correct_string(self): parameter = { 'a': 13, 'query': 'hello', 'b': 'This is ...
from .base import BoardAppTest from board.templatetags.url_parameter import url_parameter class UrlParameterTest(BoardAppTest): def test_contains_correct_string(self): parameter = { 'a': 13, 'query': 'hello', 'b': 'This is a test' } url_string = url_para...
<commit_before>from .base import BoardAppTest from board.templatetags.url_parameter import url_parameter class UrlParameterTest(BoardAppTest): def test_contains_correct_string(self): parameter = { 'a': 13, 'query': 'hello', 'b': 'This is a test' } url_st...
32e066988a902f19d171225891f0a52a13945526
frappe/patches/v12_0/move_form_attachments_to_attachments_folder.py
frappe/patches/v12_0/move_form_attachments_to_attachments_folder.py
import frappe def execute(): frappe.db.sql(''' UPDATE tabFile SET folder = 'Home/Attachments' WHERE ifnull(attached_to_doctype, '') != '' ''')
import frappe def execute(): frappe.db.sql(''' UPDATE tabFile SET folder = 'Home/Attachments' WHERE ifnull(attached_to_doctype, '') != '' AND folder = 'Home' ''')
Move files only from Home folder
fix(patch): Move files only from Home folder
Python
mit
mhbu50/frappe,frappe/frappe,vjFaLk/frappe,adityahase/frappe,adityahase/frappe,mhbu50/frappe,mhbu50/frappe,vjFaLk/frappe,vjFaLk/frappe,StrellaGroup/frappe,yashodhank/frappe,yashodhank/frappe,frappe/frappe,almeidapaulopt/frappe,yashodhank/frappe,StrellaGroup/frappe,yashodhank/frappe,vjFaLk/frappe,saurabh6790/frappe,mhbu5...
import frappe def execute(): frappe.db.sql(''' UPDATE tabFile SET folder = 'Home/Attachments' WHERE ifnull(attached_to_doctype, '') != '' ''') fix(patch): Move files only from Home folder
import frappe def execute(): frappe.db.sql(''' UPDATE tabFile SET folder = 'Home/Attachments' WHERE ifnull(attached_to_doctype, '') != '' AND folder = 'Home' ''')
<commit_before>import frappe def execute(): frappe.db.sql(''' UPDATE tabFile SET folder = 'Home/Attachments' WHERE ifnull(attached_to_doctype, '') != '' ''') <commit_msg>fix(patch): Move files only from Home folder<commit_after>
import frappe def execute(): frappe.db.sql(''' UPDATE tabFile SET folder = 'Home/Attachments' WHERE ifnull(attached_to_doctype, '') != '' AND folder = 'Home' ''')
import frappe def execute(): frappe.db.sql(''' UPDATE tabFile SET folder = 'Home/Attachments' WHERE ifnull(attached_to_doctype, '') != '' ''') fix(patch): Move files only from Home folderimport frappe def execute(): frappe.db.sql(''' UPDATE tabFile SET folder = 'Home/Attachments' WHERE ifnull(attached_...
<commit_before>import frappe def execute(): frappe.db.sql(''' UPDATE tabFile SET folder = 'Home/Attachments' WHERE ifnull(attached_to_doctype, '') != '' ''') <commit_msg>fix(patch): Move files only from Home folder<commit_after>import frappe def execute(): frappe.db.sql(''' UPDATE tabFile SET folder = 'H...
fe3559103917f6e9b61d0f6515502e3e530896cf
inidiff/cli.py
inidiff/cli.py
from __future__ import print_function from . import diff import argparse RED = '\033[1;31m' GREEN = '\033[1;32m' END = '\033[0m' def format_option(opt): """Return a formatted option in the form name=value.""" return '{}={}\n'.format(opt.option, opt.value) def format_output(first, second, color=True): ...
from __future__ import print_function import argparse import sys from . import diff RED = '\033[1;31m' GREEN = '\033[1;32m' END = '\033[0m' def format_option(opt): """Return a formatted option in the form name=value.""" return '{}={}\n'.format(opt.option, opt.value) def format_output(first, second, colo...
Exit with 1 if there's a difference
Exit with 1 if there's a difference
Python
mit
kragniz/inidiff
from __future__ import print_function from . import diff import argparse RED = '\033[1;31m' GREEN = '\033[1;32m' END = '\033[0m' def format_option(opt): """Return a formatted option in the form name=value.""" return '{}={}\n'.format(opt.option, opt.value) def format_output(first, second, color=True): ...
from __future__ import print_function import argparse import sys from . import diff RED = '\033[1;31m' GREEN = '\033[1;32m' END = '\033[0m' def format_option(opt): """Return a formatted option in the form name=value.""" return '{}={}\n'.format(opt.option, opt.value) def format_output(first, second, colo...
<commit_before>from __future__ import print_function from . import diff import argparse RED = '\033[1;31m' GREEN = '\033[1;32m' END = '\033[0m' def format_option(opt): """Return a formatted option in the form name=value.""" return '{}={}\n'.format(opt.option, opt.value) def format_output(first, second, ...
from __future__ import print_function import argparse import sys from . import diff RED = '\033[1;31m' GREEN = '\033[1;32m' END = '\033[0m' def format_option(opt): """Return a formatted option in the form name=value.""" return '{}={}\n'.format(opt.option, opt.value) def format_output(first, second, colo...
from __future__ import print_function from . import diff import argparse RED = '\033[1;31m' GREEN = '\033[1;32m' END = '\033[0m' def format_option(opt): """Return a formatted option in the form name=value.""" return '{}={}\n'.format(opt.option, opt.value) def format_output(first, second, color=True): ...
<commit_before>from __future__ import print_function from . import diff import argparse RED = '\033[1;31m' GREEN = '\033[1;32m' END = '\033[0m' def format_option(opt): """Return a formatted option in the form name=value.""" return '{}={}\n'.format(opt.option, opt.value) def format_output(first, second, ...
5227ef25d9944c5e33b4a4f7e58259e3646ae52a
interactive.py
interactive.py
#Main program executor import pyRecipeBook import FoodGroups #Welcome screen welcomeMessage = "Welcome to pyRecipeBook!\n" welcomeMessage += "Enter a command below:\n" print(welcomeMessage) # pre = '# ' on = True #Keep asking for inpyt while(on): command = input(pre) #Run command #Exiting commands "Thank you f...
#Main program executor import pyRecipeBook import FoodGroups #Welcome screen welcomeMessage = "Welcome to pyRecipeBook!\n" welcomeMessage += "Enter a command below:\n" print(welcomeMessage) #Method to run commands def runCommand(command): if command.strip() == 'exit': return False else: return True # pre = '#...
Update interacitve.py - Add a method to run predefined commands.
Update interacitve.py - Add a method to run predefined commands.
Python
mit
VictorLoren/pyRecipeBook
#Main program executor import pyRecipeBook import FoodGroups #Welcome screen welcomeMessage = "Welcome to pyRecipeBook!\n" welcomeMessage += "Enter a command below:\n" print(welcomeMessage) # pre = '# ' on = True #Keep asking for inpyt while(on): command = input(pre) #Run command #Exiting commands "Thank you f...
#Main program executor import pyRecipeBook import FoodGroups #Welcome screen welcomeMessage = "Welcome to pyRecipeBook!\n" welcomeMessage += "Enter a command below:\n" print(welcomeMessage) #Method to run commands def runCommand(command): if command.strip() == 'exit': return False else: return True # pre = '#...
<commit_before>#Main program executor import pyRecipeBook import FoodGroups #Welcome screen welcomeMessage = "Welcome to pyRecipeBook!\n" welcomeMessage += "Enter a command below:\n" print(welcomeMessage) # pre = '# ' on = True #Keep asking for inpyt while(on): command = input(pre) #Run command #Exiting command...
#Main program executor import pyRecipeBook import FoodGroups #Welcome screen welcomeMessage = "Welcome to pyRecipeBook!\n" welcomeMessage += "Enter a command below:\n" print(welcomeMessage) #Method to run commands def runCommand(command): if command.strip() == 'exit': return False else: return True # pre = '#...
#Main program executor import pyRecipeBook import FoodGroups #Welcome screen welcomeMessage = "Welcome to pyRecipeBook!\n" welcomeMessage += "Enter a command below:\n" print(welcomeMessage) # pre = '# ' on = True #Keep asking for inpyt while(on): command = input(pre) #Run command #Exiting commands "Thank you f...
<commit_before>#Main program executor import pyRecipeBook import FoodGroups #Welcome screen welcomeMessage = "Welcome to pyRecipeBook!\n" welcomeMessage += "Enter a command below:\n" print(welcomeMessage) # pre = '# ' on = True #Keep asking for inpyt while(on): command = input(pre) #Run command #Exiting command...
aa65464c86c562a690ba42901fa9dc24f17ba714
xbrowse_server/base/management/commands/add_project.py
xbrowse_server/base/management/commands/add_project.py
from django.core.management.base import BaseCommand from xbrowse_server.base.models import Project class Command(BaseCommand): def handle(self, *args, **options): project_id = args[0] if Project.objects.filter(project_id=project_id).exists(): raise Exception("Project exists :(") ...
from django.core.management.base import BaseCommand from xbrowse_server.base.models import Project import sys class Command(BaseCommand): def handle(self, *args, **options): project_id = args[0] if "." in project_id: sys.exit("ERROR: A '.' in the project ID is not supported") ...
Print error if dot in project ids
Print error if dot in project ids
Python
agpl-3.0
ssadedin/seqr,ssadedin/seqr,macarthur-lab/xbrowse,macarthur-lab/seqr,macarthur-lab/xbrowse,macarthur-lab/xbrowse,macarthur-lab/seqr,macarthur-lab/seqr,macarthur-lab/xbrowse,macarthur-lab/seqr,macarthur-lab/xbrowse,macarthur-lab/seqr,ssadedin/seqr,macarthur-lab/xbrowse,ssadedin/seqr,ssadedin/seqr
from django.core.management.base import BaseCommand from xbrowse_server.base.models import Project class Command(BaseCommand): def handle(self, *args, **options): project_id = args[0] if Project.objects.filter(project_id=project_id).exists(): raise Exception("Project exists :(") ...
from django.core.management.base import BaseCommand from xbrowse_server.base.models import Project import sys class Command(BaseCommand): def handle(self, *args, **options): project_id = args[0] if "." in project_id: sys.exit("ERROR: A '.' in the project ID is not supported") ...
<commit_before>from django.core.management.base import BaseCommand from xbrowse_server.base.models import Project class Command(BaseCommand): def handle(self, *args, **options): project_id = args[0] if Project.objects.filter(project_id=project_id).exists(): raise Exception("Project ex...
from django.core.management.base import BaseCommand from xbrowse_server.base.models import Project import sys class Command(BaseCommand): def handle(self, *args, **options): project_id = args[0] if "." in project_id: sys.exit("ERROR: A '.' in the project ID is not supported") ...
from django.core.management.base import BaseCommand from xbrowse_server.base.models import Project class Command(BaseCommand): def handle(self, *args, **options): project_id = args[0] if Project.objects.filter(project_id=project_id).exists(): raise Exception("Project exists :(") ...
<commit_before>from django.core.management.base import BaseCommand from xbrowse_server.base.models import Project class Command(BaseCommand): def handle(self, *args, **options): project_id = args[0] if Project.objects.filter(project_id=project_id).exists(): raise Exception("Project ex...
1b7509d8bd624bbf33352f622d8c03be6f3e35f2
src/sentry/api/serializers/models/organization_member.py
src/sentry/api/serializers/models/organization_member.py
from __future__ import absolute_import from sentry.api.serializers import Serializer, register from sentry.models import OrganizationMember @register(OrganizationMember) class OrganizationMemberSerializer(Serializer): def serialize(self, obj, attrs, user): d = { 'id': str(obj.id), ...
from __future__ import absolute_import from sentry.api.serializers import Serializer, register from sentry.models import OrganizationMember from sentry.utils.avatar import get_gravatar_url @register(OrganizationMember) class OrganizationMemberSerializer(Serializer): def serialize(self, obj, attrs, user): ...
Add avatarUrl to team member serializers
Add avatarUrl to team member serializers Conflicts: src/sentry/api/serializers/models/organization_member.py src/sentry/api/serializers/models/release.py cherry-pick 8ee1bee748ae7f51987ea8ec5ee10795b656cfd9
Python
bsd-3-clause
jean/sentry,gencer/sentry,looker/sentry,ngonzalvez/sentry,gg7/sentry,mvaled/sentry,nicholasserra/sentry,wong2/sentry,beeftornado/sentry,JamesMura/sentry,alexm92/sentry,JamesMura/sentry,korealerts1/sentry,wujuguang/sentry,BayanGroup/sentry,imankulov/sentry,fotinakis/sentry,JTCunning/sentry,kevinlondon/sentry,jean/sentry...
from __future__ import absolute_import from sentry.api.serializers import Serializer, register from sentry.models import OrganizationMember @register(OrganizationMember) class OrganizationMemberSerializer(Serializer): def serialize(self, obj, attrs, user): d = { 'id': str(obj.id), ...
from __future__ import absolute_import from sentry.api.serializers import Serializer, register from sentry.models import OrganizationMember from sentry.utils.avatar import get_gravatar_url @register(OrganizationMember) class OrganizationMemberSerializer(Serializer): def serialize(self, obj, attrs, user): ...
<commit_before>from __future__ import absolute_import from sentry.api.serializers import Serializer, register from sentry.models import OrganizationMember @register(OrganizationMember) class OrganizationMemberSerializer(Serializer): def serialize(self, obj, attrs, user): d = { 'id': str(obj.i...
from __future__ import absolute_import from sentry.api.serializers import Serializer, register from sentry.models import OrganizationMember from sentry.utils.avatar import get_gravatar_url @register(OrganizationMember) class OrganizationMemberSerializer(Serializer): def serialize(self, obj, attrs, user): ...
from __future__ import absolute_import from sentry.api.serializers import Serializer, register from sentry.models import OrganizationMember @register(OrganizationMember) class OrganizationMemberSerializer(Serializer): def serialize(self, obj, attrs, user): d = { 'id': str(obj.id), ...
<commit_before>from __future__ import absolute_import from sentry.api.serializers import Serializer, register from sentry.models import OrganizationMember @register(OrganizationMember) class OrganizationMemberSerializer(Serializer): def serialize(self, obj, attrs, user): d = { 'id': str(obj.i...
91ea026fa0c354c81cf0a1e52dbbe626b83a00f8
app.py
app.py
import feedparser from flask import Flask, render_template app = Flask(__name__) BBC_FEED = "http://feeds.bbci.co.uk/news/rss.xml" @app.route("/") def index(): feed = feedparser.parse(BBC_FEED) return render_template("index.html", feed=feed.get('entries')) if __name__ == "__main__": app.run()
import requests from flask import Flask, render_template app = Flask(__name__) BBC_FEED = "http://feeds.bbci.co.uk/news/rss.xml" API_KEY = "c4002216fa5446d582b5f31d73959d36" @app.route("/") def index(): r = requests.get( f"https://newsapi.org/v1/articles?source=the-next-web&sortBy=latest&apiKey={API_KEY}...
Use requests instead of feedparser.
Use requests instead of feedparser.
Python
mit
alchermd/headlines,alchermd/headlines
import feedparser from flask import Flask, render_template app = Flask(__name__) BBC_FEED = "http://feeds.bbci.co.uk/news/rss.xml" @app.route("/") def index(): feed = feedparser.parse(BBC_FEED) return render_template("index.html", feed=feed.get('entries')) if __name__ == "__main__": app.run()Use reques...
import requests from flask import Flask, render_template app = Flask(__name__) BBC_FEED = "http://feeds.bbci.co.uk/news/rss.xml" API_KEY = "c4002216fa5446d582b5f31d73959d36" @app.route("/") def index(): r = requests.get( f"https://newsapi.org/v1/articles?source=the-next-web&sortBy=latest&apiKey={API_KEY}...
<commit_before>import feedparser from flask import Flask, render_template app = Flask(__name__) BBC_FEED = "http://feeds.bbci.co.uk/news/rss.xml" @app.route("/") def index(): feed = feedparser.parse(BBC_FEED) return render_template("index.html", feed=feed.get('entries')) if __name__ == "__main__": app....
import requests from flask import Flask, render_template app = Flask(__name__) BBC_FEED = "http://feeds.bbci.co.uk/news/rss.xml" API_KEY = "c4002216fa5446d582b5f31d73959d36" @app.route("/") def index(): r = requests.get( f"https://newsapi.org/v1/articles?source=the-next-web&sortBy=latest&apiKey={API_KEY}...
import feedparser from flask import Flask, render_template app = Flask(__name__) BBC_FEED = "http://feeds.bbci.co.uk/news/rss.xml" @app.route("/") def index(): feed = feedparser.parse(BBC_FEED) return render_template("index.html", feed=feed.get('entries')) if __name__ == "__main__": app.run()Use reques...
<commit_before>import feedparser from flask import Flask, render_template app = Flask(__name__) BBC_FEED = "http://feeds.bbci.co.uk/news/rss.xml" @app.route("/") def index(): feed = feedparser.parse(BBC_FEED) return render_template("index.html", feed=feed.get('entries')) if __name__ == "__main__": app....
79e23159c308a69896c464eda13c043dbbc8086e
thezombies/management/commands/validate_all_data_catalogs.py
thezombies/management/commands/validate_all_data_catalogs.py
from django.core.management.base import NoArgsCommand from thezombies.tasks.main import validate_data_catalogs class Command(NoArgsCommand): """Validate all of the agency data catalogs""" def handle_noargs(self): validator_group = validate_data_catalogs.delay() self.stdout.write(u"\nSpawned d...
from django.core.management.base import NoArgsCommand from thezombies.tasks.main import validate_data_catalogs class Command(NoArgsCommand): """Validate all of the agency data catalogs""" def handle_noargs(self, **options): validator_group = validate_data_catalogs.delay() self.stdout.write(u"...
Fix options on NoArgsCommand. Huh.
Fix options on NoArgsCommand. Huh.
Python
bsd-3-clause
sunlightlabs/thezombies,sunlightlabs/thezombies,sunlightlabs/thezombies,sunlightlabs/thezombies
from django.core.management.base import NoArgsCommand from thezombies.tasks.main import validate_data_catalogs class Command(NoArgsCommand): """Validate all of the agency data catalogs""" def handle_noargs(self): validator_group = validate_data_catalogs.delay() self.stdout.write(u"\nSpawned d...
from django.core.management.base import NoArgsCommand from thezombies.tasks.main import validate_data_catalogs class Command(NoArgsCommand): """Validate all of the agency data catalogs""" def handle_noargs(self, **options): validator_group = validate_data_catalogs.delay() self.stdout.write(u"...
<commit_before>from django.core.management.base import NoArgsCommand from thezombies.tasks.main import validate_data_catalogs class Command(NoArgsCommand): """Validate all of the agency data catalogs""" def handle_noargs(self): validator_group = validate_data_catalogs.delay() self.stdout.writ...
from django.core.management.base import NoArgsCommand from thezombies.tasks.main import validate_data_catalogs class Command(NoArgsCommand): """Validate all of the agency data catalogs""" def handle_noargs(self, **options): validator_group = validate_data_catalogs.delay() self.stdout.write(u"...
from django.core.management.base import NoArgsCommand from thezombies.tasks.main import validate_data_catalogs class Command(NoArgsCommand): """Validate all of the agency data catalogs""" def handle_noargs(self): validator_group = validate_data_catalogs.delay() self.stdout.write(u"\nSpawned d...
<commit_before>from django.core.management.base import NoArgsCommand from thezombies.tasks.main import validate_data_catalogs class Command(NoArgsCommand): """Validate all of the agency data catalogs""" def handle_noargs(self): validator_group = validate_data_catalogs.delay() self.stdout.writ...
7ca17e79f8c3dba7bc04377e7746a383a281562d
serverless_helpers/__init__.py
serverless_helpers/__init__.py
# -*- coding: utf-8 -*- # MIT Licensed, Copyright (c) 2016 Ryan Scott Brown <sb@ryansb.com> import dotenv
# -*- coding: utf-8 -*- # MIT Licensed, Copyright (c) 2016 Ryan Scott Brown <sb@ryansb.com> from dotenv import load_dotenv, get_key, set_key, unset_key def load_envs(path): import os path, _ = os.path.split(path) if path == '/': # bail out when you reach top of the FS load_dotenv(os.path.j...
Add `load_envs` to take a base path and recurse up, looking for .envs
Add `load_envs` to take a base path and recurse up, looking for .envs
Python
mit
serverless/serverless-helpers-py
# -*- coding: utf-8 -*- # MIT Licensed, Copyright (c) 2016 Ryan Scott Brown <sb@ryansb.com> import dotenv Add `load_envs` to take a base path and recurse up, looking for .envs
# -*- coding: utf-8 -*- # MIT Licensed, Copyright (c) 2016 Ryan Scott Brown <sb@ryansb.com> from dotenv import load_dotenv, get_key, set_key, unset_key def load_envs(path): import os path, _ = os.path.split(path) if path == '/': # bail out when you reach top of the FS load_dotenv(os.path.j...
<commit_before># -*- coding: utf-8 -*- # MIT Licensed, Copyright (c) 2016 Ryan Scott Brown <sb@ryansb.com> import dotenv <commit_msg>Add `load_envs` to take a base path and recurse up, looking for .envs<commit_after>
# -*- coding: utf-8 -*- # MIT Licensed, Copyright (c) 2016 Ryan Scott Brown <sb@ryansb.com> from dotenv import load_dotenv, get_key, set_key, unset_key def load_envs(path): import os path, _ = os.path.split(path) if path == '/': # bail out when you reach top of the FS load_dotenv(os.path.j...
# -*- coding: utf-8 -*- # MIT Licensed, Copyright (c) 2016 Ryan Scott Brown <sb@ryansb.com> import dotenv Add `load_envs` to take a base path and recurse up, looking for .envs# -*- coding: utf-8 -*- # MIT Licensed, Copyright (c) 2016 Ryan Scott Brown <sb@ryansb.com> from dotenv import load_dotenv, get_key, set_key, u...
<commit_before># -*- coding: utf-8 -*- # MIT Licensed, Copyright (c) 2016 Ryan Scott Brown <sb@ryansb.com> import dotenv <commit_msg>Add `load_envs` to take a base path and recurse up, looking for .envs<commit_after># -*- coding: utf-8 -*- # MIT Licensed, Copyright (c) 2016 Ryan Scott Brown <sb@ryansb.com> from doten...
4c019b149510f74f614240d031ef03f96fa017e4
lab_members/urls.py
lab_members/urls.py
from django.conf.urls import patterns, url from lab_members.views import ScientistListView, ScientistDetailView urlpatterns = patterns('', url(r'^$', ScientistListView.as_view(), name='scientist_list'), url(r'^(?P<slug>[^/]+)$', ScientistDetailView.as_view(), name='scientist_detail'), )
from django.conf.urls import patterns, url from lab_members.views import ScientistListView, ScientistDetailView urlpatterns = patterns('', url(r'^$', ScientistListView.as_view(), name='scientist_list'), url(r'^(?P<slug>[^/]+)/$', ScientistDetailView.as_view(), name='scientist_detail'), )
Add trailing '/' for scientist detail URL pattern
Add trailing '/' for scientist detail URL pattern
Python
bsd-3-clause
mfcovington/django-lab-members,mfcovington/django-lab-members,mfcovington/django-lab-members
from django.conf.urls import patterns, url from lab_members.views import ScientistListView, ScientistDetailView urlpatterns = patterns('', url(r'^$', ScientistListView.as_view(), name='scientist_list'), url(r'^(?P<slug>[^/]+)$', ScientistDetailView.as_view(), name='scientist_detail'), ) Add trailing '/' for sc...
from django.conf.urls import patterns, url from lab_members.views import ScientistListView, ScientistDetailView urlpatterns = patterns('', url(r'^$', ScientistListView.as_view(), name='scientist_list'), url(r'^(?P<slug>[^/]+)/$', ScientistDetailView.as_view(), name='scientist_detail'), )
<commit_before>from django.conf.urls import patterns, url from lab_members.views import ScientistListView, ScientistDetailView urlpatterns = patterns('', url(r'^$', ScientistListView.as_view(), name='scientist_list'), url(r'^(?P<slug>[^/]+)$', ScientistDetailView.as_view(), name='scientist_detail'), ) <commit_...
from django.conf.urls import patterns, url from lab_members.views import ScientistListView, ScientistDetailView urlpatterns = patterns('', url(r'^$', ScientistListView.as_view(), name='scientist_list'), url(r'^(?P<slug>[^/]+)/$', ScientistDetailView.as_view(), name='scientist_detail'), )
from django.conf.urls import patterns, url from lab_members.views import ScientistListView, ScientistDetailView urlpatterns = patterns('', url(r'^$', ScientistListView.as_view(), name='scientist_list'), url(r'^(?P<slug>[^/]+)$', ScientistDetailView.as_view(), name='scientist_detail'), ) Add trailing '/' for sc...
<commit_before>from django.conf.urls import patterns, url from lab_members.views import ScientistListView, ScientistDetailView urlpatterns = patterns('', url(r'^$', ScientistListView.as_view(), name='scientist_list'), url(r'^(?P<slug>[^/]+)$', ScientistDetailView.as_view(), name='scientist_detail'), ) <commit_...
4d793c8790b714e7e923d276cc139d9ca70e5a7d
temba/msgs/migrations/0089_populate_broadcast_send_all.py
temba/msgs/migrations/0089_populate_broadcast_send_all.py
# -*- coding: utf-8 -*- # Generated by Django 1.10.6 on 2017-04-06 17:33 from __future__ import unicode_literals from django.db import migrations, models from temba.utils import chunk_list def do_populate_send_all(Broadcast): broadcast_ids = Broadcast.objects.all().values_list('id', flat=True) broadcast_cou...
# -*- coding: utf-8 -*- # Generated by Django 1.10.6 on 2017-04-06 17:33 from __future__ import unicode_literals from django.db import migrations, models from temba.utils import chunk_list def do_populate_send_all(Broadcast): broadcast_ids = Broadcast.objects.all().values_list('id', flat=True) broadcast_cou...
Tweak order of operations in populate migration
Tweak order of operations in populate migration
Python
agpl-3.0
pulilab/rapidpro,pulilab/rapidpro,pulilab/rapidpro,pulilab/rapidpro,pulilab/rapidpro
# -*- coding: utf-8 -*- # Generated by Django 1.10.6 on 2017-04-06 17:33 from __future__ import unicode_literals from django.db import migrations, models from temba.utils import chunk_list def do_populate_send_all(Broadcast): broadcast_ids = Broadcast.objects.all().values_list('id', flat=True) broadcast_cou...
# -*- coding: utf-8 -*- # Generated by Django 1.10.6 on 2017-04-06 17:33 from __future__ import unicode_literals from django.db import migrations, models from temba.utils import chunk_list def do_populate_send_all(Broadcast): broadcast_ids = Broadcast.objects.all().values_list('id', flat=True) broadcast_cou...
<commit_before># -*- coding: utf-8 -*- # Generated by Django 1.10.6 on 2017-04-06 17:33 from __future__ import unicode_literals from django.db import migrations, models from temba.utils import chunk_list def do_populate_send_all(Broadcast): broadcast_ids = Broadcast.objects.all().values_list('id', flat=True) ...
# -*- coding: utf-8 -*- # Generated by Django 1.10.6 on 2017-04-06 17:33 from __future__ import unicode_literals from django.db import migrations, models from temba.utils import chunk_list def do_populate_send_all(Broadcast): broadcast_ids = Broadcast.objects.all().values_list('id', flat=True) broadcast_cou...
# -*- coding: utf-8 -*- # Generated by Django 1.10.6 on 2017-04-06 17:33 from __future__ import unicode_literals from django.db import migrations, models from temba.utils import chunk_list def do_populate_send_all(Broadcast): broadcast_ids = Broadcast.objects.all().values_list('id', flat=True) broadcast_cou...
<commit_before># -*- coding: utf-8 -*- # Generated by Django 1.10.6 on 2017-04-06 17:33 from __future__ import unicode_literals from django.db import migrations, models from temba.utils import chunk_list def do_populate_send_all(Broadcast): broadcast_ids = Broadcast.objects.all().values_list('id', flat=True) ...
cfbb2e479577cdc3bce8f5f61dcc5ff5042fab48
api_tests/institutions/views/test_institution_detail.py
api_tests/institutions/views/test_institution_detail.py
from nose.tools import * # flake8: noqa from tests.base import ApiTestCase from osf_tests.factories import InstitutionFactory from api.base.settings.defaults import API_BASE class TestInstitutionDetail(ApiTestCase): def setUp(self): super(TestInstitutionDetail, self).setUp() self.institution = I...
import pytest from api.base.settings.defaults import API_BASE from osf_tests.factories import InstitutionFactory @pytest.mark.django_db class TestInstitutionDetail: @pytest.fixture() def institution(self): return InstitutionFactory() @pytest.fixture() def url_institution(self): def u...
Convert institutions detail to pytest
Convert institutions detail to pytest
Python
apache-2.0
HalcyonChimera/osf.io,cslzchen/osf.io,mfraezz/osf.io,leb2dg/osf.io,mattclark/osf.io,HalcyonChimera/osf.io,baylee-d/osf.io,aaxelb/osf.io,Johnetordoff/osf.io,caneruguz/osf.io,sloria/osf.io,leb2dg/osf.io,cslzchen/osf.io,cslzchen/osf.io,adlius/osf.io,caneruguz/osf.io,CenterForOpenScience/osf.io,felliott/osf.io,pattisdr/osf...
from nose.tools import * # flake8: noqa from tests.base import ApiTestCase from osf_tests.factories import InstitutionFactory from api.base.settings.defaults import API_BASE class TestInstitutionDetail(ApiTestCase): def setUp(self): super(TestInstitutionDetail, self).setUp() self.institution = I...
import pytest from api.base.settings.defaults import API_BASE from osf_tests.factories import InstitutionFactory @pytest.mark.django_db class TestInstitutionDetail: @pytest.fixture() def institution(self): return InstitutionFactory() @pytest.fixture() def url_institution(self): def u...
<commit_before>from nose.tools import * # flake8: noqa from tests.base import ApiTestCase from osf_tests.factories import InstitutionFactory from api.base.settings.defaults import API_BASE class TestInstitutionDetail(ApiTestCase): def setUp(self): super(TestInstitutionDetail, self).setUp() self....
import pytest from api.base.settings.defaults import API_BASE from osf_tests.factories import InstitutionFactory @pytest.mark.django_db class TestInstitutionDetail: @pytest.fixture() def institution(self): return InstitutionFactory() @pytest.fixture() def url_institution(self): def u...
from nose.tools import * # flake8: noqa from tests.base import ApiTestCase from osf_tests.factories import InstitutionFactory from api.base.settings.defaults import API_BASE class TestInstitutionDetail(ApiTestCase): def setUp(self): super(TestInstitutionDetail, self).setUp() self.institution = I...
<commit_before>from nose.tools import * # flake8: noqa from tests.base import ApiTestCase from osf_tests.factories import InstitutionFactory from api.base.settings.defaults import API_BASE class TestInstitutionDetail(ApiTestCase): def setUp(self): super(TestInstitutionDetail, self).setUp() self....
1082be09cee7d94a245d89469dea9ff347c2796e
app/routes/users/schemas.py
app/routes/users/schemas.py
from app.schema_validation.definitions import uuid, datetime post_create_user_schema = { "$schema": "http://json-schema.org/draft-04/schema#", "description": "POST schema for creating user", "type": "object", "properties": { 'email': {"type": "string"}, 'name': {"type": "string"}, ...
from app.schema_validation.definitions import uuid, datetime post_create_user_schema = { "$schema": "http://json-schema.org/draft-04/schema#", "description": "POST schema for creating user", "type": "object", "properties": { 'email': {"type": "string"}, 'name': {"type": "string"}, ...
Drop email as property from post_update_user_schema
Drop email as property from post_update_user_schema
Python
mit
NewAcropolis/api,NewAcropolis/api,NewAcropolis/api
from app.schema_validation.definitions import uuid, datetime post_create_user_schema = { "$schema": "http://json-schema.org/draft-04/schema#", "description": "POST schema for creating user", "type": "object", "properties": { 'email': {"type": "string"}, 'name': {"type": "string"}, ...
from app.schema_validation.definitions import uuid, datetime post_create_user_schema = { "$schema": "http://json-schema.org/draft-04/schema#", "description": "POST schema for creating user", "type": "object", "properties": { 'email': {"type": "string"}, 'name': {"type": "string"}, ...
<commit_before>from app.schema_validation.definitions import uuid, datetime post_create_user_schema = { "$schema": "http://json-schema.org/draft-04/schema#", "description": "POST schema for creating user", "type": "object", "properties": { 'email': {"type": "string"}, 'name': {"type": ...
from app.schema_validation.definitions import uuid, datetime post_create_user_schema = { "$schema": "http://json-schema.org/draft-04/schema#", "description": "POST schema for creating user", "type": "object", "properties": { 'email': {"type": "string"}, 'name': {"type": "string"}, ...
from app.schema_validation.definitions import uuid, datetime post_create_user_schema = { "$schema": "http://json-schema.org/draft-04/schema#", "description": "POST schema for creating user", "type": "object", "properties": { 'email': {"type": "string"}, 'name': {"type": "string"}, ...
<commit_before>from app.schema_validation.definitions import uuid, datetime post_create_user_schema = { "$schema": "http://json-schema.org/draft-04/schema#", "description": "POST schema for creating user", "type": "object", "properties": { 'email': {"type": "string"}, 'name': {"type": ...
a65d6ae9a6be0988bb74ecff7982c91be5273c58
meinberlin/apps/bplan/management/commands/bplan_auto_archive.py
meinberlin/apps/bplan/management/commands/bplan_auto_archive.py
from django.core.management.base import BaseCommand from meinberlin.apps.bplan import models as bplan_models class Command(BaseCommand): help = 'Archive finished bplan projects.' def handle(self, *args, **options): bplans = bplan_models.Bplan.objects.filter(is_draft=False) for bplan in bplan...
from datetime import timedelta from django.core.management.base import BaseCommand from django.utils import timezone from meinberlin.apps.bplan import models as bplan_models class Command(BaseCommand): help = 'Archive finished bplan projects and delete old statements.' def handle(self, *args, **options): ...
Delete statements from archived bplans
Delete statements from archived bplans After a bplan is archived it's related statements may be deleted. For simpler development/deployment the auto_archive script is extended to delete the statements, altough it may have been possible to add another command. To prevent from loosing statements that are created just b...
Python
agpl-3.0
liqd/a4-meinberlin,liqd/a4-meinberlin,liqd/a4-meinberlin,liqd/a4-meinberlin
from django.core.management.base import BaseCommand from meinberlin.apps.bplan import models as bplan_models class Command(BaseCommand): help = 'Archive finished bplan projects.' def handle(self, *args, **options): bplans = bplan_models.Bplan.objects.filter(is_draft=False) for bplan in bplan...
from datetime import timedelta from django.core.management.base import BaseCommand from django.utils import timezone from meinberlin.apps.bplan import models as bplan_models class Command(BaseCommand): help = 'Archive finished bplan projects and delete old statements.' def handle(self, *args, **options): ...
<commit_before>from django.core.management.base import BaseCommand from meinberlin.apps.bplan import models as bplan_models class Command(BaseCommand): help = 'Archive finished bplan projects.' def handle(self, *args, **options): bplans = bplan_models.Bplan.objects.filter(is_draft=False) for...
from datetime import timedelta from django.core.management.base import BaseCommand from django.utils import timezone from meinberlin.apps.bplan import models as bplan_models class Command(BaseCommand): help = 'Archive finished bplan projects and delete old statements.' def handle(self, *args, **options): ...
from django.core.management.base import BaseCommand from meinberlin.apps.bplan import models as bplan_models class Command(BaseCommand): help = 'Archive finished bplan projects.' def handle(self, *args, **options): bplans = bplan_models.Bplan.objects.filter(is_draft=False) for bplan in bplan...
<commit_before>from django.core.management.base import BaseCommand from meinberlin.apps.bplan import models as bplan_models class Command(BaseCommand): help = 'Archive finished bplan projects.' def handle(self, *args, **options): bplans = bplan_models.Bplan.objects.filter(is_draft=False) for...
1f2d0b0978d55d471322ec3e8a93464f9da4c59b
xlsxcompose.py
xlsxcompose.py
import argparse __author__ = 'perks' if __name__ == '__main__': parser = argparse.ArgumentParser( description='Migrate columns from one spreadsheet to columns in a new spreadsheet.' ) parser.add_argument( '-i', '--input', help='Input .xlsx file', ...
__author__ = 'perks' from xlutils.copy import copy from xlrd import open_workbook import xlsxwriter def compose(input, output, mappings): START_ROW = 501 END_ROW = 1000 rb = open_workbook(input) r_sheet = rb.sheet_by_name("CLEAN") workbook = xlsxwriter.Workbook(output) worksheet = workbook.a...
Load settings from file, fix logic
Load settings from file, fix logic
Python
mit
perks/xlsxcompose
import argparse __author__ = 'perks' if __name__ == '__main__': parser = argparse.ArgumentParser( description='Migrate columns from one spreadsheet to columns in a new spreadsheet.' ) parser.add_argument( '-i', '--input', help='Input .xlsx file', ...
__author__ = 'perks' from xlutils.copy import copy from xlrd import open_workbook import xlsxwriter def compose(input, output, mappings): START_ROW = 501 END_ROW = 1000 rb = open_workbook(input) r_sheet = rb.sheet_by_name("CLEAN") workbook = xlsxwriter.Workbook(output) worksheet = workbook.a...
<commit_before>import argparse __author__ = 'perks' if __name__ == '__main__': parser = argparse.ArgumentParser( description='Migrate columns from one spreadsheet to columns in a new spreadsheet.' ) parser.add_argument( '-i', '--input', help='Input .xlsx...
__author__ = 'perks' from xlutils.copy import copy from xlrd import open_workbook import xlsxwriter def compose(input, output, mappings): START_ROW = 501 END_ROW = 1000 rb = open_workbook(input) r_sheet = rb.sheet_by_name("CLEAN") workbook = xlsxwriter.Workbook(output) worksheet = workbook.a...
import argparse __author__ = 'perks' if __name__ == '__main__': parser = argparse.ArgumentParser( description='Migrate columns from one spreadsheet to columns in a new spreadsheet.' ) parser.add_argument( '-i', '--input', help='Input .xlsx file', ...
<commit_before>import argparse __author__ = 'perks' if __name__ == '__main__': parser = argparse.ArgumentParser( description='Migrate columns from one spreadsheet to columns in a new spreadsheet.' ) parser.add_argument( '-i', '--input', help='Input .xlsx...
d8f8d7d2e6b9c7537a4f5cdd2c3b7251017186a3
xutils/util.py
xutils/util.py
# -*- coding: utf-8 -*- from subprocess import check_output def which(command, which="/usr/bin/which"): """Find and return the first absolute path of command used by `which`. If not found, return "". """ try: return check_output([which, command]).split("\n")[0] except Exception: ...
# -*- coding: utf-8 -*- from subprocess import check_output as _check_output from xutils import PY3, to_unicode if PY3: def check_output(cmd, timeout=None, encoding=None, **kwargs): return _check_output(cmd, timeout=timeout, encoding=encoding, **kwargs) else: def check_output(cmd, timeout=None, encod...
Add check_output to be compatible with Py2 and Py3
Add check_output to be compatible with Py2 and Py3
Python
mit
xgfone/xutils,xgfone/pycom
# -*- coding: utf-8 -*- from subprocess import check_output def which(command, which="/usr/bin/which"): """Find and return the first absolute path of command used by `which`. If not found, return "". """ try: return check_output([which, command]).split("\n")[0] except Exception: ...
# -*- coding: utf-8 -*- from subprocess import check_output as _check_output from xutils import PY3, to_unicode if PY3: def check_output(cmd, timeout=None, encoding=None, **kwargs): return _check_output(cmd, timeout=timeout, encoding=encoding, **kwargs) else: def check_output(cmd, timeout=None, encod...
<commit_before># -*- coding: utf-8 -*- from subprocess import check_output def which(command, which="/usr/bin/which"): """Find and return the first absolute path of command used by `which`. If not found, return "". """ try: return check_output([which, command]).split("\n")[0] except Exc...
# -*- coding: utf-8 -*- from subprocess import check_output as _check_output from xutils import PY3, to_unicode if PY3: def check_output(cmd, timeout=None, encoding=None, **kwargs): return _check_output(cmd, timeout=timeout, encoding=encoding, **kwargs) else: def check_output(cmd, timeout=None, encod...
# -*- coding: utf-8 -*- from subprocess import check_output def which(command, which="/usr/bin/which"): """Find and return the first absolute path of command used by `which`. If not found, return "". """ try: return check_output([which, command]).split("\n")[0] except Exception: ...
<commit_before># -*- coding: utf-8 -*- from subprocess import check_output def which(command, which="/usr/bin/which"): """Find and return the first absolute path of command used by `which`. If not found, return "". """ try: return check_output([which, command]).split("\n")[0] except Exc...
b06f7fb883e3e5dd03aa86e2ad8646f1ed907ce1
awx/fact/__init__.py
awx/fact/__init__.py
# Copyright (c) 2015 Ansible, Inc. # All Rights Reserved. import logging logger = logging.getLogger('awx.fact')
# Copyright (c) 2015 Ansible, Inc. # All Rights Reserved.
Remove logging from fact init
Remove logging from fact init
Python
apache-2.0
wwitzel3/awx,wwitzel3/awx,snahelou/awx,snahelou/awx,wwitzel3/awx,snahelou/awx,snahelou/awx,wwitzel3/awx
# Copyright (c) 2015 Ansible, Inc. # All Rights Reserved. import logging logger = logging.getLogger('awx.fact') Remove logging from fact init
# Copyright (c) 2015 Ansible, Inc. # All Rights Reserved.
<commit_before># Copyright (c) 2015 Ansible, Inc. # All Rights Reserved. import logging logger = logging.getLogger('awx.fact') <commit_msg>Remove logging from fact init<commit_after>
# Copyright (c) 2015 Ansible, Inc. # All Rights Reserved.
# Copyright (c) 2015 Ansible, Inc. # All Rights Reserved. import logging logger = logging.getLogger('awx.fact') Remove logging from fact init# Copyright (c) 2015 Ansible, Inc. # All Rights Reserved.
<commit_before># Copyright (c) 2015 Ansible, Inc. # All Rights Reserved. import logging logger = logging.getLogger('awx.fact') <commit_msg>Remove logging from fact init<commit_after># Copyright (c) 2015 Ansible, Inc. # All Rights Reserved.
28dd3f171fe422ba6e15530e7dc4f6d7d831ba09
xbrowse_server/base/management/commands/reload_family.py
xbrowse_server/base/management/commands/reload_family.py
from django.core.management.base import BaseCommand from xbrowse_server import xbrowse_controls from xbrowse_server.base.models import Project from xbrowse_server.mall import get_datastore class Command(BaseCommand): def add_arguments(self, parser): parser.add_argument('args', nargs='*') parser....
from django.core.management.base import BaseCommand from xbrowse_server import xbrowse_controls from xbrowse_server.base.models import Project from xbrowse_server.mall import get_datastore class Command(BaseCommand): def add_arguments(self, parser): parser.add_argument('args', nargs='*') parser....
Fix reload command for projects where each chrom is in a different vcf
Fix reload command for projects where each chrom is in a different vcf
Python
agpl-3.0
ssadedin/seqr,macarthur-lab/xbrowse,macarthur-lab/seqr,ssadedin/seqr,macarthur-lab/seqr,ssadedin/seqr,macarthur-lab/xbrowse,macarthur-lab/xbrowse,ssadedin/seqr,macarthur-lab/xbrowse,ssadedin/seqr,macarthur-lab/xbrowse,macarthur-lab/seqr,macarthur-lab/seqr,macarthur-lab/seqr,macarthur-lab/xbrowse
from django.core.management.base import BaseCommand from xbrowse_server import xbrowse_controls from xbrowse_server.base.models import Project from xbrowse_server.mall import get_datastore class Command(BaseCommand): def add_arguments(self, parser): parser.add_argument('args', nargs='*') parser....
from django.core.management.base import BaseCommand from xbrowse_server import xbrowse_controls from xbrowse_server.base.models import Project from xbrowse_server.mall import get_datastore class Command(BaseCommand): def add_arguments(self, parser): parser.add_argument('args', nargs='*') parser....
<commit_before>from django.core.management.base import BaseCommand from xbrowse_server import xbrowse_controls from xbrowse_server.base.models import Project from xbrowse_server.mall import get_datastore class Command(BaseCommand): def add_arguments(self, parser): parser.add_argument('args', nargs='*') ...
from django.core.management.base import BaseCommand from xbrowse_server import xbrowse_controls from xbrowse_server.base.models import Project from xbrowse_server.mall import get_datastore class Command(BaseCommand): def add_arguments(self, parser): parser.add_argument('args', nargs='*') parser....
from django.core.management.base import BaseCommand from xbrowse_server import xbrowse_controls from xbrowse_server.base.models import Project from xbrowse_server.mall import get_datastore class Command(BaseCommand): def add_arguments(self, parser): parser.add_argument('args', nargs='*') parser....
<commit_before>from django.core.management.base import BaseCommand from xbrowse_server import xbrowse_controls from xbrowse_server.base.models import Project from xbrowse_server.mall import get_datastore class Command(BaseCommand): def add_arguments(self, parser): parser.add_argument('args', nargs='*') ...
f535f44e625663d21f26d8879f293206ec60cf39
lms/envs/dev_int.py
lms/envs/dev_int.py
""" This enables use of course listings by subdomain. To see it in action, point the following domains to 127.0.0.1 in your /etc/hosts file: berkeley.dev harvard.dev mit.dev Note that OS X has a bug where using *.local domains is excruciatingly slow, so use *.dev domains instead for local testing. """ from .dev...
""" This enables use of course listings by subdomain. To see it in action, point the following domains to 127.0.0.1 in your /etc/hosts file: berkeley.dev harvard.dev mit.dev Note that OS X has a bug where using *.local domains is excruciatingly slow, so use *.dev domains instead for local testing. """ from .dev...
Fix typo that caused two classes to not get loaded
Fix typo that caused two classes to not get loaded
Python
agpl-3.0
J861449197/edx-platform,nanolearningllc/edx-platform-cypress-2,Semi-global/edx-platform,dcosentino/edx-platform,beni55/edx-platform,xuxiao19910803/edx-platform,pelikanchik/edx-platform,dkarakats/edx-platform,adoosii/edx-platform,shashank971/edx-platform,shabab12/edx-platform,nttks/jenkins-test,knehez/edx-platform,aufer...
""" This enables use of course listings by subdomain. To see it in action, point the following domains to 127.0.0.1 in your /etc/hosts file: berkeley.dev harvard.dev mit.dev Note that OS X has a bug where using *.local domains is excruciatingly slow, so use *.dev domains instead for local testing. """ from .dev...
""" This enables use of course listings by subdomain. To see it in action, point the following domains to 127.0.0.1 in your /etc/hosts file: berkeley.dev harvard.dev mit.dev Note that OS X has a bug where using *.local domains is excruciatingly slow, so use *.dev domains instead for local testing. """ from .dev...
<commit_before>""" This enables use of course listings by subdomain. To see it in action, point the following domains to 127.0.0.1 in your /etc/hosts file: berkeley.dev harvard.dev mit.dev Note that OS X has a bug where using *.local domains is excruciatingly slow, so use *.dev domains instead for local testing...
""" This enables use of course listings by subdomain. To see it in action, point the following domains to 127.0.0.1 in your /etc/hosts file: berkeley.dev harvard.dev mit.dev Note that OS X has a bug where using *.local domains is excruciatingly slow, so use *.dev domains instead for local testing. """ from .dev...
""" This enables use of course listings by subdomain. To see it in action, point the following domains to 127.0.0.1 in your /etc/hosts file: berkeley.dev harvard.dev mit.dev Note that OS X has a bug where using *.local domains is excruciatingly slow, so use *.dev domains instead for local testing. """ from .dev...
<commit_before>""" This enables use of course listings by subdomain. To see it in action, point the following domains to 127.0.0.1 in your /etc/hosts file: berkeley.dev harvard.dev mit.dev Note that OS X has a bug where using *.local domains is excruciatingly slow, so use *.dev domains instead for local testing...
1acd2471f667abf78155ee71fe9c6d8487a284ee
sklearn/linear_model/tests/test_isotonic_regression.py
sklearn/linear_model/tests/test_isotonic_regression.py
import numpy as np from numpy.testing import assert_array_equal from sklearn.linear_model.isotonic_regression_ import isotonic_regression from sklearn.linear_model import IsotonicRegression from nose.tools import assert_raises def test_isotonic_regression(): y = np.array([3, 7, 5, 9, 8, 7, 10]) y_ = np.arra...
import numpy as np from numpy.testing import assert_array_equal from sklearn.linear_model.isotonic_regression_ import isotonic_regression from sklearn.linear_model import IsotonicRegression from nose.tools import assert_raises def test_isotonic_regression(): y = np.array([3, 7, 5, 9, 8, 7, 10]) y_ = np.arra...
FIX : fix LLE test (don't ask me why...)
FIX : fix LLE test (don't ask me why...)
Python
bsd-3-clause
untom/scikit-learn,trungnt13/scikit-learn,nrhine1/scikit-learn,hrjn/scikit-learn,arjoly/scikit-learn,rohanp/scikit-learn,khkaminska/scikit-learn,ky822/scikit-learn,JosmanPS/scikit-learn,madjelan/scikit-learn,PatrickOReilly/scikit-learn,arjoly/scikit-learn,fabioticconi/scikit-learn,olologin/scikit-learn,saiwing-yeung/sc...
import numpy as np from numpy.testing import assert_array_equal from sklearn.linear_model.isotonic_regression_ import isotonic_regression from sklearn.linear_model import IsotonicRegression from nose.tools import assert_raises def test_isotonic_regression(): y = np.array([3, 7, 5, 9, 8, 7, 10]) y_ = np.arra...
import numpy as np from numpy.testing import assert_array_equal from sklearn.linear_model.isotonic_regression_ import isotonic_regression from sklearn.linear_model import IsotonicRegression from nose.tools import assert_raises def test_isotonic_regression(): y = np.array([3, 7, 5, 9, 8, 7, 10]) y_ = np.arra...
<commit_before>import numpy as np from numpy.testing import assert_array_equal from sklearn.linear_model.isotonic_regression_ import isotonic_regression from sklearn.linear_model import IsotonicRegression from nose.tools import assert_raises def test_isotonic_regression(): y = np.array([3, 7, 5, 9, 8, 7, 10]) ...
import numpy as np from numpy.testing import assert_array_equal from sklearn.linear_model.isotonic_regression_ import isotonic_regression from sklearn.linear_model import IsotonicRegression from nose.tools import assert_raises def test_isotonic_regression(): y = np.array([3, 7, 5, 9, 8, 7, 10]) y_ = np.arra...
import numpy as np from numpy.testing import assert_array_equal from sklearn.linear_model.isotonic_regression_ import isotonic_regression from sklearn.linear_model import IsotonicRegression from nose.tools import assert_raises def test_isotonic_regression(): y = np.array([3, 7, 5, 9, 8, 7, 10]) y_ = np.arra...
<commit_before>import numpy as np from numpy.testing import assert_array_equal from sklearn.linear_model.isotonic_regression_ import isotonic_regression from sklearn.linear_model import IsotonicRegression from nose.tools import assert_raises def test_isotonic_regression(): y = np.array([3, 7, 5, 9, 8, 7, 10]) ...
7cdc7d1157f7bd37277115d378d76a1daf717b47
source/run.py
source/run.py
# -*- coding: utf-8 -*- from autoreiv import AutoReiv bot = AutoReiv() bot.load() try: bot.run(bot.config.get('login'), bot.config.get('password')) except KeyboardInterrupt: bot.close() finally: print('* Bye!')
# -*- coding: utf-8 -*- import asyncio import time from autoreiv import AutoReiv def main(): while True: bot = AutoReiv() bot.load() try: bot.run(bot.config.get('login'), bot.config.get('password')) except Exception as e: print('* Crashed with error: {}'.format(e)) finally: print('* Disconnected....
Fix the main loop & reconnecting
Fix the main loop & reconnecting
Python
mit
diath/AutoReiv
# -*- coding: utf-8 -*- from autoreiv import AutoReiv bot = AutoReiv() bot.load() try: bot.run(bot.config.get('login'), bot.config.get('password')) except KeyboardInterrupt: bot.close() finally: print('* Bye!') Fix the main loop & reconnecting
# -*- coding: utf-8 -*- import asyncio import time from autoreiv import AutoReiv def main(): while True: bot = AutoReiv() bot.load() try: bot.run(bot.config.get('login'), bot.config.get('password')) except Exception as e: print('* Crashed with error: {}'.format(e)) finally: print('* Disconnected....
<commit_before># -*- coding: utf-8 -*- from autoreiv import AutoReiv bot = AutoReiv() bot.load() try: bot.run(bot.config.get('login'), bot.config.get('password')) except KeyboardInterrupt: bot.close() finally: print('* Bye!') <commit_msg>Fix the main loop & reconnecting<commit_after>
# -*- coding: utf-8 -*- import asyncio import time from autoreiv import AutoReiv def main(): while True: bot = AutoReiv() bot.load() try: bot.run(bot.config.get('login'), bot.config.get('password')) except Exception as e: print('* Crashed with error: {}'.format(e)) finally: print('* Disconnected....
# -*- coding: utf-8 -*- from autoreiv import AutoReiv bot = AutoReiv() bot.load() try: bot.run(bot.config.get('login'), bot.config.get('password')) except KeyboardInterrupt: bot.close() finally: print('* Bye!') Fix the main loop & reconnecting# -*- coding: utf-8 -*- import asyncio import time from autoreiv import...
<commit_before># -*- coding: utf-8 -*- from autoreiv import AutoReiv bot = AutoReiv() bot.load() try: bot.run(bot.config.get('login'), bot.config.get('password')) except KeyboardInterrupt: bot.close() finally: print('* Bye!') <commit_msg>Fix the main loop & reconnecting<commit_after># -*- coding: utf-8 -*- import ...
656e6bfb18212990fc33a0e5b4d394c807c8d3ab
photutils/utils/tests/test_colormaps.py
photutils/utils/tests/test_colormaps.py
# Licensed under a 3-clause BSD style license - see LICENSE.rst from __future__ import (absolute_import, division, print_function, unicode_literals) from astropy.tests.helper import pytest from ..colormaps import random_cmap def test_colormap(): cmap = random_cmap(100, random_state=12345) ...
# Licensed under a 3-clause BSD style license - see LICENSE.rst from __future__ import (absolute_import, division, print_function, unicode_literals) from astropy.tests.helper import pytest from ..colormaps import random_cmap try: import matplotlib HAS_MATPLOTLIB = True except ImportErro...
Check for matplotlib in tests
Check for matplotlib in tests
Python
bsd-3-clause
astropy/photutils,larrybradley/photutils
# Licensed under a 3-clause BSD style license - see LICENSE.rst from __future__ import (absolute_import, division, print_function, unicode_literals) from astropy.tests.helper import pytest from ..colormaps import random_cmap def test_colormap(): cmap = random_cmap(100, random_state=12345) ...
# Licensed under a 3-clause BSD style license - see LICENSE.rst from __future__ import (absolute_import, division, print_function, unicode_literals) from astropy.tests.helper import pytest from ..colormaps import random_cmap try: import matplotlib HAS_MATPLOTLIB = True except ImportErro...
<commit_before># Licensed under a 3-clause BSD style license - see LICENSE.rst from __future__ import (absolute_import, division, print_function, unicode_literals) from astropy.tests.helper import pytest from ..colormaps import random_cmap def test_colormap(): cmap = random_cmap(100, rando...
# Licensed under a 3-clause BSD style license - see LICENSE.rst from __future__ import (absolute_import, division, print_function, unicode_literals) from astropy.tests.helper import pytest from ..colormaps import random_cmap try: import matplotlib HAS_MATPLOTLIB = True except ImportErro...
# Licensed under a 3-clause BSD style license - see LICENSE.rst from __future__ import (absolute_import, division, print_function, unicode_literals) from astropy.tests.helper import pytest from ..colormaps import random_cmap def test_colormap(): cmap = random_cmap(100, random_state=12345) ...
<commit_before># Licensed under a 3-clause BSD style license - see LICENSE.rst from __future__ import (absolute_import, division, print_function, unicode_literals) from astropy.tests.helper import pytest from ..colormaps import random_cmap def test_colormap(): cmap = random_cmap(100, rando...
f112e7754e4f4368f0a82c3aae3a58f5300176f0
spacy/language_data/tag_map.py
spacy/language_data/tag_map.py
# encoding: utf8 from __future__ import unicode_literals from ..symbols import * TAG_MAP = { "ADV": {POS: ADV}, "NOUN": {POS: NOUN}, "ADP": {POS: ADP}, "PRON": {POS: PRON}, "SCONJ": {POS: SCONJ}, "PROPN": {POS: PROPN}, "DET": {POS: DET}, "SYM": {POS: ...
# encoding: utf8 from __future__ import unicode_literals from ..symbols import * TAG_MAP = { "ADV": {POS: ADV}, "NOUN": {POS: NOUN}, "ADP": {POS: ADP}, "PRON": {POS: PRON}, "SCONJ": {POS: SCONJ}, "PROPN": {POS: PROPN}, "DET": {POS: DET}, "SYM": {POS: ...
Add PART to tag map
Add PART to tag map 16 of the 17 PoS tags in the UD tag set is added; PART is missing.
Python
mit
banglakit/spaCy,raphael0202/spaCy,recognai/spaCy,spacy-io/spaCy,explosion/spaCy,spacy-io/spaCy,spacy-io/spaCy,honnibal/spaCy,recognai/spaCy,Gregory-Howard/spaCy,aikramer2/spaCy,Gregory-Howard/spaCy,oroszgy/spaCy.hu,oroszgy/spaCy.hu,raphael0202/spaCy,recognai/spaCy,Gregory-Howard/spaCy,aikramer2/spaCy,explosion/spaCy,ho...
# encoding: utf8 from __future__ import unicode_literals from ..symbols import * TAG_MAP = { "ADV": {POS: ADV}, "NOUN": {POS: NOUN}, "ADP": {POS: ADP}, "PRON": {POS: PRON}, "SCONJ": {POS: SCONJ}, "PROPN": {POS: PROPN}, "DET": {POS: DET}, "SYM": {POS: ...
# encoding: utf8 from __future__ import unicode_literals from ..symbols import * TAG_MAP = { "ADV": {POS: ADV}, "NOUN": {POS: NOUN}, "ADP": {POS: ADP}, "PRON": {POS: PRON}, "SCONJ": {POS: SCONJ}, "PROPN": {POS: PROPN}, "DET": {POS: DET}, "SYM": {POS: ...
<commit_before># encoding: utf8 from __future__ import unicode_literals from ..symbols import * TAG_MAP = { "ADV": {POS: ADV}, "NOUN": {POS: NOUN}, "ADP": {POS: ADP}, "PRON": {POS: PRON}, "SCONJ": {POS: SCONJ}, "PROPN": {POS: PROPN}, "DET": {POS: DET}, "SY...
# encoding: utf8 from __future__ import unicode_literals from ..symbols import * TAG_MAP = { "ADV": {POS: ADV}, "NOUN": {POS: NOUN}, "ADP": {POS: ADP}, "PRON": {POS: PRON}, "SCONJ": {POS: SCONJ}, "PROPN": {POS: PROPN}, "DET": {POS: DET}, "SYM": {POS: ...
# encoding: utf8 from __future__ import unicode_literals from ..symbols import * TAG_MAP = { "ADV": {POS: ADV}, "NOUN": {POS: NOUN}, "ADP": {POS: ADP}, "PRON": {POS: PRON}, "SCONJ": {POS: SCONJ}, "PROPN": {POS: PROPN}, "DET": {POS: DET}, "SYM": {POS: ...
<commit_before># encoding: utf8 from __future__ import unicode_literals from ..symbols import * TAG_MAP = { "ADV": {POS: ADV}, "NOUN": {POS: NOUN}, "ADP": {POS: ADP}, "PRON": {POS: PRON}, "SCONJ": {POS: SCONJ}, "PROPN": {POS: PROPN}, "DET": {POS: DET}, "SY...
32f30d869dd79f57bc5a00afc1f3ef55a1818ba8
phileo/models.py
phileo/models.py
from django.conf import settings from django.db import models from django.utils import timezone from django.contrib.contenttypes.models import ContentType from django.contrib.contenttypes import generic # Compatibility with custom user models, while keeping backwards-compatibility with <1.5 AUTH_USER_MODEL = getattr(...
from django.conf import settings from django.db import models from django.utils import timezone from django.contrib.contenttypes.models import ContentType from django.contrib.contenttypes import generic # Compatibility with custom user models, while keeping backwards-compatibility with <1.5 AUTH_USER_MODEL = getattr(...
Fix potential unicode issues with Like.__unicode__()
Fix potential unicode issues with Like.__unicode__()
Python
mit
rizumu/pinax-likes,jacobwegner/phileo,jacobwegner/phileo,pinax/pinax-likes,pinax/phileo,rizumu/pinax-likes,pinax/phileo
from django.conf import settings from django.db import models from django.utils import timezone from django.contrib.contenttypes.models import ContentType from django.contrib.contenttypes import generic # Compatibility with custom user models, while keeping backwards-compatibility with <1.5 AUTH_USER_MODEL = getattr(...
from django.conf import settings from django.db import models from django.utils import timezone from django.contrib.contenttypes.models import ContentType from django.contrib.contenttypes import generic # Compatibility with custom user models, while keeping backwards-compatibility with <1.5 AUTH_USER_MODEL = getattr(...
<commit_before>from django.conf import settings from django.db import models from django.utils import timezone from django.contrib.contenttypes.models import ContentType from django.contrib.contenttypes import generic # Compatibility with custom user models, while keeping backwards-compatibility with <1.5 AUTH_USER_M...
from django.conf import settings from django.db import models from django.utils import timezone from django.contrib.contenttypes.models import ContentType from django.contrib.contenttypes import generic # Compatibility with custom user models, while keeping backwards-compatibility with <1.5 AUTH_USER_MODEL = getattr(...
from django.conf import settings from django.db import models from django.utils import timezone from django.contrib.contenttypes.models import ContentType from django.contrib.contenttypes import generic # Compatibility with custom user models, while keeping backwards-compatibility with <1.5 AUTH_USER_MODEL = getattr(...
<commit_before>from django.conf import settings from django.db import models from django.utils import timezone from django.contrib.contenttypes.models import ContentType from django.contrib.contenttypes import generic # Compatibility with custom user models, while keeping backwards-compatibility with <1.5 AUTH_USER_M...
c38e6b497457886cf829111b89d3f102765f0eb3
takeyourmeds/reminders/tasks.py
takeyourmeds/reminders/tasks.py
from __future__ import absolute_import import traceback from celery import shared_task from celery.utils.log import get_task_logger from django.contrib.staticfiles.storage import staticfiles_storage from takeyourmeds.utils.dt import local_time from takeyourmeds.telephony.utils import send_sms, make_call from .mode...
from __future__ import absolute_import import traceback from celery import shared_task from celery.utils.log import get_task_logger from django.contrib.staticfiles.storage import staticfiles_storage from takeyourmeds.utils.dt import local_time from takeyourmeds.telephony.utils import send_sms, make_call from .mode...
Split into own method for clariy and "return" support
Split into own method for clariy and "return" support
Python
mit
takeyourmeds/takeyourmeds-web,takeyourmeds/takeyourmeds-web,takeyourmeds/takeyourmeds-web,takeyourmeds/takeyourmeds-web
from __future__ import absolute_import import traceback from celery import shared_task from celery.utils.log import get_task_logger from django.contrib.staticfiles.storage import staticfiles_storage from takeyourmeds.utils.dt import local_time from takeyourmeds.telephony.utils import send_sms, make_call from .mode...
from __future__ import absolute_import import traceback from celery import shared_task from celery.utils.log import get_task_logger from django.contrib.staticfiles.storage import staticfiles_storage from takeyourmeds.utils.dt import local_time from takeyourmeds.telephony.utils import send_sms, make_call from .mode...
<commit_before>from __future__ import absolute_import import traceback from celery import shared_task from celery.utils.log import get_task_logger from django.contrib.staticfiles.storage import staticfiles_storage from takeyourmeds.utils.dt import local_time from takeyourmeds.telephony.utils import send_sms, make_c...
from __future__ import absolute_import import traceback from celery import shared_task from celery.utils.log import get_task_logger from django.contrib.staticfiles.storage import staticfiles_storage from takeyourmeds.utils.dt import local_time from takeyourmeds.telephony.utils import send_sms, make_call from .mode...
from __future__ import absolute_import import traceback from celery import shared_task from celery.utils.log import get_task_logger from django.contrib.staticfiles.storage import staticfiles_storage from takeyourmeds.utils.dt import local_time from takeyourmeds.telephony.utils import send_sms, make_call from .mode...
<commit_before>from __future__ import absolute_import import traceback from celery import shared_task from celery.utils.log import get_task_logger from django.contrib.staticfiles.storage import staticfiles_storage from takeyourmeds.utils.dt import local_time from takeyourmeds.telephony.utils import send_sms, make_c...
c34c6e2ac2f4574a3ef770a8a3687c17a130a783
parsescrapegenerate/__init__.py
parsescrapegenerate/__init__.py
# -*- coding: utf-8 -*- """ parsescrapegenerate --------------- Main package for ParseScapeFeed """ __title__ = 'ParseScrapeGenerate' __version__ = '0.1.0'
# -*- coding: utf-8 -*- """ parsescrapegenerate --------------- Main package for ParseScrapeGenerate """ __title__ = 'ParseScrapeGenerate' __version__ = '0.1.0'
Make sure correct project name is used throughout
Make sure correct project name is used throughout
Python
bsd-3-clause
jonyamo/parsescrapegenerate,jonyamo/parsescrapegenerate
# -*- coding: utf-8 -*- """ parsescrapegenerate --------------- Main package for ParseScapeFeed """ __title__ = 'ParseScrapeGenerate' __version__ = '0.1.0' Make sure correct project name is used throughout
# -*- coding: utf-8 -*- """ parsescrapegenerate --------------- Main package for ParseScrapeGenerate """ __title__ = 'ParseScrapeGenerate' __version__ = '0.1.0'
<commit_before># -*- coding: utf-8 -*- """ parsescrapegenerate --------------- Main package for ParseScapeFeed """ __title__ = 'ParseScrapeGenerate' __version__ = '0.1.0' <commit_msg>Make sure correct project name is used throughout<commit_after>
# -*- coding: utf-8 -*- """ parsescrapegenerate --------------- Main package for ParseScrapeGenerate """ __title__ = 'ParseScrapeGenerate' __version__ = '0.1.0'
# -*- coding: utf-8 -*- """ parsescrapegenerate --------------- Main package for ParseScapeFeed """ __title__ = 'ParseScrapeGenerate' __version__ = '0.1.0' Make sure correct project name is used throughout# -*- coding: utf-8 -*- """ parsescrapegenerate --------------- Main package for ParseScrapeGenerate """ __...
<commit_before># -*- coding: utf-8 -*- """ parsescrapegenerate --------------- Main package for ParseScapeFeed """ __title__ = 'ParseScrapeGenerate' __version__ = '0.1.0' <commit_msg>Make sure correct project name is used throughout<commit_after># -*- coding: utf-8 -*- """ parsescrapegenerate --------------- Mai...
ee0922cecbce8617afe36e9555078d5a3ba21878
src/django_future/management/commands/runscheduledjobs.py
src/django_future/management/commands/runscheduledjobs.py
"""Run scheduled jobs.""" import datetime from optparse import make_option from django.core.management.base import NoArgsCommand from django_future import run_jobs class Command(NoArgsCommand): option_list = NoArgsCommand.option_list + ( make_option('--delete-completed', '-d', action='store_true', ...
"""Run scheduled jobs.""" import datetime from optparse import make_option from django.core.management.base import NoArgsCommand, CommandError from django_future import run_jobs class Command(NoArgsCommand): option_list = NoArgsCommand.option_list + ( make_option('--delete-completed', '-d', action='stor...
Raise a nicer CommandError instead of showing the ValueError on the command line.
Raise a nicer CommandError instead of showing the ValueError on the command line.
Python
mit
shrubberysoft/django-future
"""Run scheduled jobs.""" import datetime from optparse import make_option from django.core.management.base import NoArgsCommand from django_future import run_jobs class Command(NoArgsCommand): option_list = NoArgsCommand.option_list + ( make_option('--delete-completed', '-d', action='store_true', ...
"""Run scheduled jobs.""" import datetime from optparse import make_option from django.core.management.base import NoArgsCommand, CommandError from django_future import run_jobs class Command(NoArgsCommand): option_list = NoArgsCommand.option_list + ( make_option('--delete-completed', '-d', action='stor...
<commit_before>"""Run scheduled jobs.""" import datetime from optparse import make_option from django.core.management.base import NoArgsCommand from django_future import run_jobs class Command(NoArgsCommand): option_list = NoArgsCommand.option_list + ( make_option('--delete-completed', '-d', action='sto...
"""Run scheduled jobs.""" import datetime from optparse import make_option from django.core.management.base import NoArgsCommand, CommandError from django_future import run_jobs class Command(NoArgsCommand): option_list = NoArgsCommand.option_list + ( make_option('--delete-completed', '-d', action='stor...
"""Run scheduled jobs.""" import datetime from optparse import make_option from django.core.management.base import NoArgsCommand from django_future import run_jobs class Command(NoArgsCommand): option_list = NoArgsCommand.option_list + ( make_option('--delete-completed', '-d', action='store_true', ...
<commit_before>"""Run scheduled jobs.""" import datetime from optparse import make_option from django.core.management.base import NoArgsCommand from django_future import run_jobs class Command(NoArgsCommand): option_list = NoArgsCommand.option_list + ( make_option('--delete-completed', '-d', action='sto...
79e4839c06d8a3ae8de0c9a7c0cf7b536016dde3
pyglab/pyglab.py
pyglab/pyglab.py
_defaults = { 'api_url': 'api/v3', } from .apirequest import ApiRequest, RequestType from .users import Users class Pyglab(object): def __init__(self, url, token, api_url=_defaults['api_url']): self._base_url = url.rstrip('/') + '/' + api_url.strip() self._token = token self._user = No...
_defaults = { 'api_url': 'api/v3', } from .apirequest import ApiRequest, RequestType from .users import Users class Pyglab(object): def __init__(self, url, token, api_url=_defaults['api_url']): self._base_url = url.rstrip('/') + '/' + api_url.strip() self._token = token self._user = No...
Create exactly one users function.
Create exactly one users function.
Python
mit
sloede/pyglab,sloede/pyglab
_defaults = { 'api_url': 'api/v3', } from .apirequest import ApiRequest, RequestType from .users import Users class Pyglab(object): def __init__(self, url, token, api_url=_defaults['api_url']): self._base_url = url.rstrip('/') + '/' + api_url.strip() self._token = token self._user = No...
_defaults = { 'api_url': 'api/v3', } from .apirequest import ApiRequest, RequestType from .users import Users class Pyglab(object): def __init__(self, url, token, api_url=_defaults['api_url']): self._base_url = url.rstrip('/') + '/' + api_url.strip() self._token = token self._user = No...
<commit_before>_defaults = { 'api_url': 'api/v3', } from .apirequest import ApiRequest, RequestType from .users import Users class Pyglab(object): def __init__(self, url, token, api_url=_defaults['api_url']): self._base_url = url.rstrip('/') + '/' + api_url.strip() self._token = token ...
_defaults = { 'api_url': 'api/v3', } from .apirequest import ApiRequest, RequestType from .users import Users class Pyglab(object): def __init__(self, url, token, api_url=_defaults['api_url']): self._base_url = url.rstrip('/') + '/' + api_url.strip() self._token = token self._user = No...
_defaults = { 'api_url': 'api/v3', } from .apirequest import ApiRequest, RequestType from .users import Users class Pyglab(object): def __init__(self, url, token, api_url=_defaults['api_url']): self._base_url = url.rstrip('/') + '/' + api_url.strip() self._token = token self._user = No...
<commit_before>_defaults = { 'api_url': 'api/v3', } from .apirequest import ApiRequest, RequestType from .users import Users class Pyglab(object): def __init__(self, url, token, api_url=_defaults['api_url']): self._base_url = url.rstrip('/') + '/' + api_url.strip() self._token = token ...
01ade9ff21440aa0aedd7e32f2338003a256e912
readux/books/tests/__init__.py
readux/books/tests/__init__.py
# import tests so django will discover and run them from readux.books.tests.models import * from readux.books.tests.views import * from readux.books.tests.tei import * from readux.books.tests.annotate import * from readux.books.tests.markdown_tei import *
# import tests so django will discover and run them from readux.books.tests.models import * from readux.books.tests.views import * from readux.books.tests.tei import * from readux.books.tests.annotate import * from readux.books.tests.markdown_tei import * from readux.books.tests.export import * from readux.books.tests...
Include consumer and export tests when running testsuite
Include consumer and export tests when running testsuite
Python
apache-2.0
emory-libraries/readux,emory-libraries/readux,emory-libraries/readux
# import tests so django will discover and run them from readux.books.tests.models import * from readux.books.tests.views import * from readux.books.tests.tei import * from readux.books.tests.annotate import * from readux.books.tests.markdown_tei import * Include consumer and export tests when running testsuite
# import tests so django will discover and run them from readux.books.tests.models import * from readux.books.tests.views import * from readux.books.tests.tei import * from readux.books.tests.annotate import * from readux.books.tests.markdown_tei import * from readux.books.tests.export import * from readux.books.tests...
<commit_before># import tests so django will discover and run them from readux.books.tests.models import * from readux.books.tests.views import * from readux.books.tests.tei import * from readux.books.tests.annotate import * from readux.books.tests.markdown_tei import * <commit_msg>Include consumer and export tests...
# import tests so django will discover and run them from readux.books.tests.models import * from readux.books.tests.views import * from readux.books.tests.tei import * from readux.books.tests.annotate import * from readux.books.tests.markdown_tei import * from readux.books.tests.export import * from readux.books.tests...
# import tests so django will discover and run them from readux.books.tests.models import * from readux.books.tests.views import * from readux.books.tests.tei import * from readux.books.tests.annotate import * from readux.books.tests.markdown_tei import * Include consumer and export tests when running testsuite# im...
<commit_before># import tests so django will discover and run them from readux.books.tests.models import * from readux.books.tests.views import * from readux.books.tests.tei import * from readux.books.tests.annotate import * from readux.books.tests.markdown_tei import * <commit_msg>Include consumer and export tests...
8d24a632dde955a9e4e093fe8764bc598cf65f4c
dynamic_subdomains/defaults.py
dynamic_subdomains/defaults.py
from django.core.exceptions import ImproperlyConfigured from django.utils.datastructures import SortedDict def patterns(*args): subdomains = SortedDict() for x in args: name = x['name'] if name in subdomains: raise ImproperlyConfigured("Duplicate subdomain name: %s" % name) ...
from django.core.exceptions import ImproperlyConfigured from django.utils.datastructures import SortedDict def patterns(*args): subdomains = SortedDict() for x in args: name = x['name'] if name in subdomains: raise ImproperlyConfigured("Duplicate subdomain name: %s" % name) ...
Remove unnecessary protection against using "default" as a subdomainconf
Remove unnecessary protection against using "default" as a subdomainconf Thanks to Jannis Leidel <jezdez@enn.io> for the pointer. Signed-off-by: Chris Lamb <711c73f64afdce07b7e38039a96d2224209e9a6c@playfire.com>
Python
bsd-3-clause
playfire/django-dynamic-subdomains
from django.core.exceptions import ImproperlyConfigured from django.utils.datastructures import SortedDict def patterns(*args): subdomains = SortedDict() for x in args: name = x['name'] if name in subdomains: raise ImproperlyConfigured("Duplicate subdomain name: %s" % name) ...
from django.core.exceptions import ImproperlyConfigured from django.utils.datastructures import SortedDict def patterns(*args): subdomains = SortedDict() for x in args: name = x['name'] if name in subdomains: raise ImproperlyConfigured("Duplicate subdomain name: %s" % name) ...
<commit_before>from django.core.exceptions import ImproperlyConfigured from django.utils.datastructures import SortedDict def patterns(*args): subdomains = SortedDict() for x in args: name = x['name'] if name in subdomains: raise ImproperlyConfigured("Duplicate subdomain name: %s"...
from django.core.exceptions import ImproperlyConfigured from django.utils.datastructures import SortedDict def patterns(*args): subdomains = SortedDict() for x in args: name = x['name'] if name in subdomains: raise ImproperlyConfigured("Duplicate subdomain name: %s" % name) ...
from django.core.exceptions import ImproperlyConfigured from django.utils.datastructures import SortedDict def patterns(*args): subdomains = SortedDict() for x in args: name = x['name'] if name in subdomains: raise ImproperlyConfigured("Duplicate subdomain name: %s" % name) ...
<commit_before>from django.core.exceptions import ImproperlyConfigured from django.utils.datastructures import SortedDict def patterns(*args): subdomains = SortedDict() for x in args: name = x['name'] if name in subdomains: raise ImproperlyConfigured("Duplicate subdomain name: %s"...
9672bd20203bc4235910080cca6d79c3b8e126b1
nupic/research/frameworks/dendrites/modules/__init__.py
nupic/research/frameworks/dendrites/modules/__init__.py
# ---------------------------------------------------------------------- # Numenta Platform for Intelligent Computing (NuPIC) # Copyright (C) 2021, Numenta, Inc. Unless you have an agreement # with Numenta, Inc., for a separate license for this software code, the # following terms and conditions apply: # # This progra...
# ---------------------------------------------------------------------- # Numenta Platform for Intelligent Computing (NuPIC) # Copyright (C) 2021, Numenta, Inc. Unless you have an agreement # with Numenta, Inc., for a separate license for this software code, the # following terms and conditions apply: # # This progra...
Add DendriticLayerBase to init to ease experimentation
Add DendriticLayerBase to init to ease experimentation
Python
agpl-3.0
mrcslws/nupic.research,subutai/nupic.research,numenta/nupic.research,subutai/nupic.research,numenta/nupic.research,mrcslws/nupic.research
# ---------------------------------------------------------------------- # Numenta Platform for Intelligent Computing (NuPIC) # Copyright (C) 2021, Numenta, Inc. Unless you have an agreement # with Numenta, Inc., for a separate license for this software code, the # following terms and conditions apply: # # This progra...
# ---------------------------------------------------------------------- # Numenta Platform for Intelligent Computing (NuPIC) # Copyright (C) 2021, Numenta, Inc. Unless you have an agreement # with Numenta, Inc., for a separate license for this software code, the # following terms and conditions apply: # # This progra...
<commit_before># ---------------------------------------------------------------------- # Numenta Platform for Intelligent Computing (NuPIC) # Copyright (C) 2021, Numenta, Inc. Unless you have an agreement # with Numenta, Inc., for a separate license for this software code, the # following terms and conditions apply: ...
# ---------------------------------------------------------------------- # Numenta Platform for Intelligent Computing (NuPIC) # Copyright (C) 2021, Numenta, Inc. Unless you have an agreement # with Numenta, Inc., for a separate license for this software code, the # following terms and conditions apply: # # This progra...
# ---------------------------------------------------------------------- # Numenta Platform for Intelligent Computing (NuPIC) # Copyright (C) 2021, Numenta, Inc. Unless you have an agreement # with Numenta, Inc., for a separate license for this software code, the # following terms and conditions apply: # # This progra...
<commit_before># ---------------------------------------------------------------------- # Numenta Platform for Intelligent Computing (NuPIC) # Copyright (C) 2021, Numenta, Inc. Unless you have an agreement # with Numenta, Inc., for a separate license for this software code, the # following terms and conditions apply: ...
b49ecba8c0a8ca05351b3eff6c1c244064bb5081
tests/test_vector2_equality.py
tests/test_vector2_equality.py
import ppb_vector def test_equal(): test_vector_1 = ppb_vector.Vector2(50, 800) test_vector_2 = ppb_vector.Vector2(50, 800) assert test_vector_1 == test_vector_2 def test_not_equal(): test_vector_1 = ppb_vector.Vector2(800, 800) test_vector_2 = ppb_vector.Vector2(50, 800) assert test_vector_1 != test_ve...
from hypothesis import given from ppb_vector import Vector2 from utils import vectors def test_equal(): test_vector_1 = Vector2(50, 800) test_vector_2 = Vector2(50, 800) assert test_vector_1 == test_vector_2 @given(x=vectors(), y=vectors()) def test_not_equal_equivalent(x: Vector2, y: Vector2): assert (x !=...
Replace test for != with an Hypothesis test
tests/equality: Replace test for != with an Hypothesis test
Python
artistic-2.0
ppb/ppb-vector,ppb/ppb-vector
import ppb_vector def test_equal(): test_vector_1 = ppb_vector.Vector2(50, 800) test_vector_2 = ppb_vector.Vector2(50, 800) assert test_vector_1 == test_vector_2 def test_not_equal(): test_vector_1 = ppb_vector.Vector2(800, 800) test_vector_2 = ppb_vector.Vector2(50, 800) assert test_vector_1 != test_ve...
from hypothesis import given from ppb_vector import Vector2 from utils import vectors def test_equal(): test_vector_1 = Vector2(50, 800) test_vector_2 = Vector2(50, 800) assert test_vector_1 == test_vector_2 @given(x=vectors(), y=vectors()) def test_not_equal_equivalent(x: Vector2, y: Vector2): assert (x !=...
<commit_before>import ppb_vector def test_equal(): test_vector_1 = ppb_vector.Vector2(50, 800) test_vector_2 = ppb_vector.Vector2(50, 800) assert test_vector_1 == test_vector_2 def test_not_equal(): test_vector_1 = ppb_vector.Vector2(800, 800) test_vector_2 = ppb_vector.Vector2(50, 800) assert test_vect...
from hypothesis import given from ppb_vector import Vector2 from utils import vectors def test_equal(): test_vector_1 = Vector2(50, 800) test_vector_2 = Vector2(50, 800) assert test_vector_1 == test_vector_2 @given(x=vectors(), y=vectors()) def test_not_equal_equivalent(x: Vector2, y: Vector2): assert (x !=...
import ppb_vector def test_equal(): test_vector_1 = ppb_vector.Vector2(50, 800) test_vector_2 = ppb_vector.Vector2(50, 800) assert test_vector_1 == test_vector_2 def test_not_equal(): test_vector_1 = ppb_vector.Vector2(800, 800) test_vector_2 = ppb_vector.Vector2(50, 800) assert test_vector_1 != test_ve...
<commit_before>import ppb_vector def test_equal(): test_vector_1 = ppb_vector.Vector2(50, 800) test_vector_2 = ppb_vector.Vector2(50, 800) assert test_vector_1 == test_vector_2 def test_not_equal(): test_vector_1 = ppb_vector.Vector2(800, 800) test_vector_2 = ppb_vector.Vector2(50, 800) assert test_vect...
8f4a8c2d463f3ed1592fcd1655de6435b4f2a047
dataproperty/type/_typecode.py
dataproperty/type/_typecode.py
# encoding: utf-8 """ .. codeauthor:: Tsuyoshi Hombashi <gogogo.vm@gmail.com> """ from __future__ import absolute_import class Typecode(object): NONE = 0 INT = 1 << 0 FLOAT = 1 << 1 STRING = 1 << 2 DATETIME = 1 << 3 INFINITY = 1 << 4 NAN = 1 << 5 BOOL = 1 << 6 DEFAULT_TYPENAME_T...
# encoding: utf-8 """ .. codeauthor:: Tsuyoshi Hombashi <gogogo.vm@gmail.com> """ from __future__ import absolute_import class Typecode(object): NONE = 0 INT = 1 << 0 # delete in the future INTEGER = 1 << 0 FLOAT = 1 << 1 STRING = 1 << 2 DATETIME = 1 << 3 INFINITY = 1 << 4 NAN = 1 <...
Add INTEGER type as alias of INT type
Add INTEGER type as alias of INT type
Python
mit
thombashi/DataProperty
# encoding: utf-8 """ .. codeauthor:: Tsuyoshi Hombashi <gogogo.vm@gmail.com> """ from __future__ import absolute_import class Typecode(object): NONE = 0 INT = 1 << 0 FLOAT = 1 << 1 STRING = 1 << 2 DATETIME = 1 << 3 INFINITY = 1 << 4 NAN = 1 << 5 BOOL = 1 << 6 DEFAULT_TYPENAME_T...
# encoding: utf-8 """ .. codeauthor:: Tsuyoshi Hombashi <gogogo.vm@gmail.com> """ from __future__ import absolute_import class Typecode(object): NONE = 0 INT = 1 << 0 # delete in the future INTEGER = 1 << 0 FLOAT = 1 << 1 STRING = 1 << 2 DATETIME = 1 << 3 INFINITY = 1 << 4 NAN = 1 <...
<commit_before># encoding: utf-8 """ .. codeauthor:: Tsuyoshi Hombashi <gogogo.vm@gmail.com> """ from __future__ import absolute_import class Typecode(object): NONE = 0 INT = 1 << 0 FLOAT = 1 << 1 STRING = 1 << 2 DATETIME = 1 << 3 INFINITY = 1 << 4 NAN = 1 << 5 BOOL = 1 << 6 DEF...
# encoding: utf-8 """ .. codeauthor:: Tsuyoshi Hombashi <gogogo.vm@gmail.com> """ from __future__ import absolute_import class Typecode(object): NONE = 0 INT = 1 << 0 # delete in the future INTEGER = 1 << 0 FLOAT = 1 << 1 STRING = 1 << 2 DATETIME = 1 << 3 INFINITY = 1 << 4 NAN = 1 <...
# encoding: utf-8 """ .. codeauthor:: Tsuyoshi Hombashi <gogogo.vm@gmail.com> """ from __future__ import absolute_import class Typecode(object): NONE = 0 INT = 1 << 0 FLOAT = 1 << 1 STRING = 1 << 2 DATETIME = 1 << 3 INFINITY = 1 << 4 NAN = 1 << 5 BOOL = 1 << 6 DEFAULT_TYPENAME_T...
<commit_before># encoding: utf-8 """ .. codeauthor:: Tsuyoshi Hombashi <gogogo.vm@gmail.com> """ from __future__ import absolute_import class Typecode(object): NONE = 0 INT = 1 << 0 FLOAT = 1 << 1 STRING = 1 << 2 DATETIME = 1 << 3 INFINITY = 1 << 4 NAN = 1 << 5 BOOL = 1 << 6 DEF...
0a19e2a0dd7bed604e5ddd402d2d9f47b2760d77
bagpipe/bgp/engine/flowspec.py
bagpipe/bgp/engine/flowspec.py
from exabgp.bgp.message.update.nlri.flow import Flow as ExaBGPFlow from exabgp.bgp.message.update.nlri.nlri import NLRI from exabgp.reactor.protocol import AFI from exabgp.reactor.protocol import SAFI import logging log = logging.getLogger(__name__) @NLRI.register(AFI.ipv4, SAFI.flow_vpn, force=True) @NLRI.register...
from exabgp.bgp.message.update.nlri.flow import Flow as ExaBGPFlow from exabgp.bgp.message.update.nlri.nlri import NLRI from exabgp.reactor.protocol import AFI from exabgp.reactor.protocol import SAFI import logging log = logging.getLogger(__name__) @NLRI.register(AFI.ipv4, SAFI.flow_vpn, force=True) @NLRI.register...
Fix eq/hash for FlowSpec NLRI
Fix eq/hash for FlowSpec NLRI Bogus eq/hash was preventing withdraws from behaving properly.
Python
apache-2.0
openstack/networking-bagpipe,openstack/networking-bagpipe-l2,openstack/networking-bagpipe,stackforge/networking-bagpipe-l2,openstack/networking-bagpipe-l2,stackforge/networking-bagpipe-l2
from exabgp.bgp.message.update.nlri.flow import Flow as ExaBGPFlow from exabgp.bgp.message.update.nlri.nlri import NLRI from exabgp.reactor.protocol import AFI from exabgp.reactor.protocol import SAFI import logging log = logging.getLogger(__name__) @NLRI.register(AFI.ipv4, SAFI.flow_vpn, force=True) @NLRI.register...
from exabgp.bgp.message.update.nlri.flow import Flow as ExaBGPFlow from exabgp.bgp.message.update.nlri.nlri import NLRI from exabgp.reactor.protocol import AFI from exabgp.reactor.protocol import SAFI import logging log = logging.getLogger(__name__) @NLRI.register(AFI.ipv4, SAFI.flow_vpn, force=True) @NLRI.register...
<commit_before>from exabgp.bgp.message.update.nlri.flow import Flow as ExaBGPFlow from exabgp.bgp.message.update.nlri.nlri import NLRI from exabgp.reactor.protocol import AFI from exabgp.reactor.protocol import SAFI import logging log = logging.getLogger(__name__) @NLRI.register(AFI.ipv4, SAFI.flow_vpn, force=True)...
from exabgp.bgp.message.update.nlri.flow import Flow as ExaBGPFlow from exabgp.bgp.message.update.nlri.nlri import NLRI from exabgp.reactor.protocol import AFI from exabgp.reactor.protocol import SAFI import logging log = logging.getLogger(__name__) @NLRI.register(AFI.ipv4, SAFI.flow_vpn, force=True) @NLRI.register...
from exabgp.bgp.message.update.nlri.flow import Flow as ExaBGPFlow from exabgp.bgp.message.update.nlri.nlri import NLRI from exabgp.reactor.protocol import AFI from exabgp.reactor.protocol import SAFI import logging log = logging.getLogger(__name__) @NLRI.register(AFI.ipv4, SAFI.flow_vpn, force=True) @NLRI.register...
<commit_before>from exabgp.bgp.message.update.nlri.flow import Flow as ExaBGPFlow from exabgp.bgp.message.update.nlri.nlri import NLRI from exabgp.reactor.protocol import AFI from exabgp.reactor.protocol import SAFI import logging log = logging.getLogger(__name__) @NLRI.register(AFI.ipv4, SAFI.flow_vpn, force=True)...
20fa7e30e4658984a4057f5c99ef293216f57815
base_phone/controllers/main.py
base_phone/controllers/main.py
# -*- coding: utf-8 -*- ############################################################################## # # Base Phone module for Odoo # Copyright (C) 2014-2015 Alexis de Lattre (alexis@via.ecp.fr) # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero...
# -*- coding: utf-8 -*- ############################################################################## # # Base Phone module for Odoo # Copyright (C) 2014-2015 Alexis de Lattre (alexis@via.ecp.fr) # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero...
Make click2dial work in real life
Make click2dial work in real life
Python
agpl-3.0
OCA/connector-telephony,OCA/connector-telephony,OCA/connector-telephony,OCA/connector-telephony
# -*- coding: utf-8 -*- ############################################################################## # # Base Phone module for Odoo # Copyright (C) 2014-2015 Alexis de Lattre (alexis@via.ecp.fr) # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero...
# -*- coding: utf-8 -*- ############################################################################## # # Base Phone module for Odoo # Copyright (C) 2014-2015 Alexis de Lattre (alexis@via.ecp.fr) # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero...
<commit_before># -*- coding: utf-8 -*- ############################################################################## # # Base Phone module for Odoo # Copyright (C) 2014-2015 Alexis de Lattre (alexis@via.ecp.fr) # # This program is free software: you can redistribute it and/or modify # it under the terms of...
# -*- coding: utf-8 -*- ############################################################################## # # Base Phone module for Odoo # Copyright (C) 2014-2015 Alexis de Lattre (alexis@via.ecp.fr) # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero...
# -*- coding: utf-8 -*- ############################################################################## # # Base Phone module for Odoo # Copyright (C) 2014-2015 Alexis de Lattre (alexis@via.ecp.fr) # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero...
<commit_before># -*- coding: utf-8 -*- ############################################################################## # # Base Phone module for Odoo # Copyright (C) 2014-2015 Alexis de Lattre (alexis@via.ecp.fr) # # This program is free software: you can redistribute it and/or modify # it under the terms of...
78c96e56b46f800c972bcdb5c5aa525d73d84a80
src/setuptools_scm/__main__.py
src/setuptools_scm/__main__.py
import sys from setuptools_scm import _get_version from setuptools_scm import get_version from setuptools_scm.config import Configuration from setuptools_scm.integration import find_files def main() -> None: files = list(sorted(find_files("."), key=len)) try: pyproject = next(fname for fname in files...
import argparse import os import warnings from setuptools_scm import _get_version from setuptools_scm.config import Configuration from setuptools_scm.discover import walk_potential_roots from setuptools_scm.integration import find_files def main() -> None: opts = _get_cli_opts() root = opts.root or "." ...
Add options to better control CLI command
Add options to better control CLI command Instead of trying to guess the `pyprojec.toml` file by looking at the files controlled by the SCM, use explicit options to control it.
Python
mit
pypa/setuptools_scm,pypa/setuptools_scm,RonnyPfannschmidt/setuptools_scm,RonnyPfannschmidt/setuptools_scm
import sys from setuptools_scm import _get_version from setuptools_scm import get_version from setuptools_scm.config import Configuration from setuptools_scm.integration import find_files def main() -> None: files = list(sorted(find_files("."), key=len)) try: pyproject = next(fname for fname in files...
import argparse import os import warnings from setuptools_scm import _get_version from setuptools_scm.config import Configuration from setuptools_scm.discover import walk_potential_roots from setuptools_scm.integration import find_files def main() -> None: opts = _get_cli_opts() root = opts.root or "." ...
<commit_before>import sys from setuptools_scm import _get_version from setuptools_scm import get_version from setuptools_scm.config import Configuration from setuptools_scm.integration import find_files def main() -> None: files = list(sorted(find_files("."), key=len)) try: pyproject = next(fname for...
import argparse import os import warnings from setuptools_scm import _get_version from setuptools_scm.config import Configuration from setuptools_scm.discover import walk_potential_roots from setuptools_scm.integration import find_files def main() -> None: opts = _get_cli_opts() root = opts.root or "." ...
import sys from setuptools_scm import _get_version from setuptools_scm import get_version from setuptools_scm.config import Configuration from setuptools_scm.integration import find_files def main() -> None: files = list(sorted(find_files("."), key=len)) try: pyproject = next(fname for fname in files...
<commit_before>import sys from setuptools_scm import _get_version from setuptools_scm import get_version from setuptools_scm.config import Configuration from setuptools_scm.integration import find_files def main() -> None: files = list(sorted(find_files("."), key=len)) try: pyproject = next(fname for...
261f48b4b8c61baea26389017994678aa6cc9c73
scanblog/scanning/management/commands/fixuploadperms.py
scanblog/scanning/management/commands/fixuploadperms.py
import os from django.core.management.base import BaseCommand from django.conf import settings class Command(BaseCommand): args = '' help = "Set all permissions in the uploads directory for deploy." def handle(self, *args, **kwargs): for dirname in (os.path.join(settings.MEDIA_ROOT, settings.UPLO...
import os from django.core.management.base import BaseCommand from django.conf import settings class Command(BaseCommand): args = '' help = "Set all permissions in the uploads directory for deploy." def handle(self, *args, **kwargs): for dirname in (os.path.join(settings.MEDIA_ROOT, settings.UPLO...
Revert to non-parallel chmod (argument list too long)
Revert to non-parallel chmod (argument list too long)
Python
agpl-3.0
yourcelf/btb,yourcelf/btb,yourcelf/btb,yourcelf/btb,yourcelf/btb
import os from django.core.management.base import BaseCommand from django.conf import settings class Command(BaseCommand): args = '' help = "Set all permissions in the uploads directory for deploy." def handle(self, *args, **kwargs): for dirname in (os.path.join(settings.MEDIA_ROOT, settings.UPLO...
import os from django.core.management.base import BaseCommand from django.conf import settings class Command(BaseCommand): args = '' help = "Set all permissions in the uploads directory for deploy." def handle(self, *args, **kwargs): for dirname in (os.path.join(settings.MEDIA_ROOT, settings.UPLO...
<commit_before>import os from django.core.management.base import BaseCommand from django.conf import settings class Command(BaseCommand): args = '' help = "Set all permissions in the uploads directory for deploy." def handle(self, *args, **kwargs): for dirname in (os.path.join(settings.MEDIA_ROOT...
import os from django.core.management.base import BaseCommand from django.conf import settings class Command(BaseCommand): args = '' help = "Set all permissions in the uploads directory for deploy." def handle(self, *args, **kwargs): for dirname in (os.path.join(settings.MEDIA_ROOT, settings.UPLO...
import os from django.core.management.base import BaseCommand from django.conf import settings class Command(BaseCommand): args = '' help = "Set all permissions in the uploads directory for deploy." def handle(self, *args, **kwargs): for dirname in (os.path.join(settings.MEDIA_ROOT, settings.UPLO...
<commit_before>import os from django.core.management.base import BaseCommand from django.conf import settings class Command(BaseCommand): args = '' help = "Set all permissions in the uploads directory for deploy." def handle(self, *args, **kwargs): for dirname in (os.path.join(settings.MEDIA_ROOT...
0b19a32d8d0d2f10e53ecaf545c7be15d29f8e82
posts/feeds.py
posts/feeds.py
from django.contrib.syndication.views import Feed from posts.models import Post from helpers import get_post_url, post_as_components from settings import BLOG_FULL_TITLE, BLOG_DESCRIPTION import markdown class LatestEntries(Feed): title = BLOG_FULL_TITLE link = '/' description = BLOG_DESCRIPTION def i...
from django.contrib.syndication.views import Feed from posts.models import Post from helpers import get_post_url, post_as_components from blog.settings import BLOG_FULL_TITLE, BLOG_DESCRIPTION import markdown class LatestEntries(Feed): title = BLOG_FULL_TITLE link = '/' description = BLOG_DESCRIPTION ...
Fix a bug introduced by the last commit.
Fix a bug introduced by the last commit.
Python
mit
Lukasa/minimalog
from django.contrib.syndication.views import Feed from posts.models import Post from helpers import get_post_url, post_as_components from settings import BLOG_FULL_TITLE, BLOG_DESCRIPTION import markdown class LatestEntries(Feed): title = BLOG_FULL_TITLE link = '/' description = BLOG_DESCRIPTION def i...
from django.contrib.syndication.views import Feed from posts.models import Post from helpers import get_post_url, post_as_components from blog.settings import BLOG_FULL_TITLE, BLOG_DESCRIPTION import markdown class LatestEntries(Feed): title = BLOG_FULL_TITLE link = '/' description = BLOG_DESCRIPTION ...
<commit_before>from django.contrib.syndication.views import Feed from posts.models import Post from helpers import get_post_url, post_as_components from settings import BLOG_FULL_TITLE, BLOG_DESCRIPTION import markdown class LatestEntries(Feed): title = BLOG_FULL_TITLE link = '/' description = BLOG_DESCRIP...
from django.contrib.syndication.views import Feed from posts.models import Post from helpers import get_post_url, post_as_components from blog.settings import BLOG_FULL_TITLE, BLOG_DESCRIPTION import markdown class LatestEntries(Feed): title = BLOG_FULL_TITLE link = '/' description = BLOG_DESCRIPTION ...
from django.contrib.syndication.views import Feed from posts.models import Post from helpers import get_post_url, post_as_components from settings import BLOG_FULL_TITLE, BLOG_DESCRIPTION import markdown class LatestEntries(Feed): title = BLOG_FULL_TITLE link = '/' description = BLOG_DESCRIPTION def i...
<commit_before>from django.contrib.syndication.views import Feed from posts.models import Post from helpers import get_post_url, post_as_components from settings import BLOG_FULL_TITLE, BLOG_DESCRIPTION import markdown class LatestEntries(Feed): title = BLOG_FULL_TITLE link = '/' description = BLOG_DESCRIP...
35b076258427e5641ba25b67d804b009a05d49c5
tests/helpers.py
tests/helpers.py
import re from contextlib import contextmanager from datetime import timedelta from django.utils import timezone from freezegun import freeze_time @contextmanager def active_phase(module, phase_type): now = timezone.now() phase = module.phase_set.create( start_date=now, end_date=now + timedel...
import re from contextlib import contextmanager from datetime import timedelta from django.utils import timezone from freezegun import freeze_time @contextmanager def active_phase(module, phase_type): now = timezone.now() phase = module.phase_set.create( start_date=now, end_date=now + timedel...
Make regex helper accept more types
tests/helper: Make regex helper accept more types
Python
agpl-3.0
liqd/adhocracy4,liqd/adhocracy4,liqd/adhocracy4,liqd/adhocracy4
import re from contextlib import contextmanager from datetime import timedelta from django.utils import timezone from freezegun import freeze_time @contextmanager def active_phase(module, phase_type): now = timezone.now() phase = module.phase_set.create( start_date=now, end_date=now + timedel...
import re from contextlib import contextmanager from datetime import timedelta from django.utils import timezone from freezegun import freeze_time @contextmanager def active_phase(module, phase_type): now = timezone.now() phase = module.phase_set.create( start_date=now, end_date=now + timedel...
<commit_before>import re from contextlib import contextmanager from datetime import timedelta from django.utils import timezone from freezegun import freeze_time @contextmanager def active_phase(module, phase_type): now = timezone.now() phase = module.phase_set.create( start_date=now, end_dat...
import re from contextlib import contextmanager from datetime import timedelta from django.utils import timezone from freezegun import freeze_time @contextmanager def active_phase(module, phase_type): now = timezone.now() phase = module.phase_set.create( start_date=now, end_date=now + timedel...
import re from contextlib import contextmanager from datetime import timedelta from django.utils import timezone from freezegun import freeze_time @contextmanager def active_phase(module, phase_type): now = timezone.now() phase = module.phase_set.create( start_date=now, end_date=now + timedel...
<commit_before>import re from contextlib import contextmanager from datetime import timedelta from django.utils import timezone from freezegun import freeze_time @contextmanager def active_phase(module, phase_type): now = timezone.now() phase = module.phase_set.create( start_date=now, end_dat...
7806937a4a3b9853becdf963dbcbfe79a256097d
rapidsms/router/celery/tasks.py
rapidsms/router/celery/tasks.py
import celery from celery.utils.log import get_task_logger from rapidsms.errors import MessageSendingError logger = get_task_logger(__name__) @celery.task def receive_async(text, connection_id, message_id, fields): """Task used to send inbound message through router phases.""" from rapidsms.models import Co...
import celery import logging from rapidsms.errors import MessageSendingError logger = logging.getLogger(__name__) @celery.task def receive_async(text, connection_id, message_id, fields): """Task used to send inbound message through router phases.""" from rapidsms.models import Connection from rapidsms.r...
Refactor logging in celery router
Refactor logging in celery router Send logging for celery router tasks to the 'rapidsms' logger rather than the 'celery' logger, and make sure celery knows the task failed by re-raising the exception.
Python
bsd-3-clause
eHealthAfrica/rapidsms,eHealthAfrica/rapidsms,lsgunth/rapidsms,peterayeni/rapidsms,peterayeni/rapidsms,caktus/rapidsms,peterayeni/rapidsms,ehealthafrica-ci/rapidsms,caktus/rapidsms,catalpainternational/rapidsms,lsgunth/rapidsms,lsgunth/rapidsms,peterayeni/rapidsms,ehealthafrica-ci/rapidsms,catalpainternational/rapidsms...
import celery from celery.utils.log import get_task_logger from rapidsms.errors import MessageSendingError logger = get_task_logger(__name__) @celery.task def receive_async(text, connection_id, message_id, fields): """Task used to send inbound message through router phases.""" from rapidsms.models import Co...
import celery import logging from rapidsms.errors import MessageSendingError logger = logging.getLogger(__name__) @celery.task def receive_async(text, connection_id, message_id, fields): """Task used to send inbound message through router phases.""" from rapidsms.models import Connection from rapidsms.r...
<commit_before>import celery from celery.utils.log import get_task_logger from rapidsms.errors import MessageSendingError logger = get_task_logger(__name__) @celery.task def receive_async(text, connection_id, message_id, fields): """Task used to send inbound message through router phases.""" from rapidsms.m...
import celery import logging from rapidsms.errors import MessageSendingError logger = logging.getLogger(__name__) @celery.task def receive_async(text, connection_id, message_id, fields): """Task used to send inbound message through router phases.""" from rapidsms.models import Connection from rapidsms.r...
import celery from celery.utils.log import get_task_logger from rapidsms.errors import MessageSendingError logger = get_task_logger(__name__) @celery.task def receive_async(text, connection_id, message_id, fields): """Task used to send inbound message through router phases.""" from rapidsms.models import Co...
<commit_before>import celery from celery.utils.log import get_task_logger from rapidsms.errors import MessageSendingError logger = get_task_logger(__name__) @celery.task def receive_async(text, connection_id, message_id, fields): """Task used to send inbound message through router phases.""" from rapidsms.m...
f304e2437870e553056fef1808b1218886143a27
ResourcePool.py
ResourcePool.py
#Copyright (C) 2011,2012 Colin Rice #This software is licensed under an included MIT license. #See the file entitled LICENSE #If you were not provided with a copy of the license please contact: # Colin Rice colin@daedrum.net import threading class ResourceGenerator: def __init__(self, generate = lambda:None,...
#Copyright (C) 2011,2012 Colin Rice #This software is licensed under an included MIT license. #See the file entitled LICENSE #If you were not provided with a copy of the license please contact: # Colin Rice colin@daedrum.net import threading class ResourceGenerator: def __init__(self, generate = lambda:None,...
Make use allow more connections per pool. Now capped at 10.
Make use allow more connections per pool. Now capped at 10.
Python
mit
c00w/bitHopper,c00w/bitHopper
#Copyright (C) 2011,2012 Colin Rice #This software is licensed under an included MIT license. #See the file entitled LICENSE #If you were not provided with a copy of the license please contact: # Colin Rice colin@daedrum.net import threading class ResourceGenerator: def __init__(self, generate = lambda:None,...
#Copyright (C) 2011,2012 Colin Rice #This software is licensed under an included MIT license. #See the file entitled LICENSE #If you were not provided with a copy of the license please contact: # Colin Rice colin@daedrum.net import threading class ResourceGenerator: def __init__(self, generate = lambda:None,...
<commit_before>#Copyright (C) 2011,2012 Colin Rice #This software is licensed under an included MIT license. #See the file entitled LICENSE #If you were not provided with a copy of the license please contact: # Colin Rice colin@daedrum.net import threading class ResourceGenerator: def __init__(self, generate...
#Copyright (C) 2011,2012 Colin Rice #This software is licensed under an included MIT license. #See the file entitled LICENSE #If you were not provided with a copy of the license please contact: # Colin Rice colin@daedrum.net import threading class ResourceGenerator: def __init__(self, generate = lambda:None,...
#Copyright (C) 2011,2012 Colin Rice #This software is licensed under an included MIT license. #See the file entitled LICENSE #If you were not provided with a copy of the license please contact: # Colin Rice colin@daedrum.net import threading class ResourceGenerator: def __init__(self, generate = lambda:None,...
<commit_before>#Copyright (C) 2011,2012 Colin Rice #This software is licensed under an included MIT license. #See the file entitled LICENSE #If you were not provided with a copy of the license please contact: # Colin Rice colin@daedrum.net import threading class ResourceGenerator: def __init__(self, generate...
24bac74c13a8bc1a54a2629ed757ab5ce36f133c
fedimg/messenger.py
fedimg/messenger.py
#!/bin/env python # -*- coding: utf8 -*- import fedmsg def message(image_name, dest, status): """ Takes an upload destination (ex. "EC2-east") and a status (ex. "failed"). Emits a fedmsg appropriate for each image upload task. """ fedmsg.publish(topic='image.upload', modname='fedimg', msg={ 'ima...
#!/bin/env python # -*- coding: utf8 -*- import fedmsg def message(image_name, dest, status): """ Takes an upload destination (ex. "EC2-east") and a status (ex. "failed"). Emits a fedmsg appropriate for each image upload task. """ fedmsg.publish(topic='image.upload', modname='fedimg', msg={ 'ima...
Make fedmsg message attribute 'image_name', not just 'image'
Make fedmsg message attribute 'image_name', not just 'image'
Python
agpl-3.0
fedora-infra/fedimg,fedora-infra/fedimg
#!/bin/env python # -*- coding: utf8 -*- import fedmsg def message(image_name, dest, status): """ Takes an upload destination (ex. "EC2-east") and a status (ex. "failed"). Emits a fedmsg appropriate for each image upload task. """ fedmsg.publish(topic='image.upload', modname='fedimg', msg={ 'ima...
#!/bin/env python # -*- coding: utf8 -*- import fedmsg def message(image_name, dest, status): """ Takes an upload destination (ex. "EC2-east") and a status (ex. "failed"). Emits a fedmsg appropriate for each image upload task. """ fedmsg.publish(topic='image.upload', modname='fedimg', msg={ 'ima...
<commit_before>#!/bin/env python # -*- coding: utf8 -*- import fedmsg def message(image_name, dest, status): """ Takes an upload destination (ex. "EC2-east") and a status (ex. "failed"). Emits a fedmsg appropriate for each image upload task. """ fedmsg.publish(topic='image.upload', modname='fedimg', msg...
#!/bin/env python # -*- coding: utf8 -*- import fedmsg def message(image_name, dest, status): """ Takes an upload destination (ex. "EC2-east") and a status (ex. "failed"). Emits a fedmsg appropriate for each image upload task. """ fedmsg.publish(topic='image.upload', modname='fedimg', msg={ 'ima...
#!/bin/env python # -*- coding: utf8 -*- import fedmsg def message(image_name, dest, status): """ Takes an upload destination (ex. "EC2-east") and a status (ex. "failed"). Emits a fedmsg appropriate for each image upload task. """ fedmsg.publish(topic='image.upload', modname='fedimg', msg={ 'ima...
<commit_before>#!/bin/env python # -*- coding: utf8 -*- import fedmsg def message(image_name, dest, status): """ Takes an upload destination (ex. "EC2-east") and a status (ex. "failed"). Emits a fedmsg appropriate for each image upload task. """ fedmsg.publish(topic='image.upload', modname='fedimg', msg...
ce2855d82331fc7bb1ffdb07761d6ad235a1c6c9
transport/tests/test_models.py
transport/tests/test_models.py
from django.test import TestCase from org.models import Organization from ..models import Bus class BusModelTest(TestCase): def setUp(self): self.org = Organization.objects.create( name='Some Org', logo='/media/logos/some-org-logo.jpg', description='We are a familiar ...
from django.test import TestCase from org.models import Organization from ..models import Bus, Route class BusModelTest(TestCase): def setUp(self): self.org = Organization.objects.create( name='Some Org', logo='/media/logos/some-org-logo.jpg', description='We are a fa...
Add some Route model tests
Add some Route model tests
Python
mit
arturfelipe/condobus,arturfelipe/condobus,arturfelipe/condobus,arturfelipe/condobus
from django.test import TestCase from org.models import Organization from ..models import Bus class BusModelTest(TestCase): def setUp(self): self.org = Organization.objects.create( name='Some Org', logo='/media/logos/some-org-logo.jpg', description='We are a familiar ...
from django.test import TestCase from org.models import Organization from ..models import Bus, Route class BusModelTest(TestCase): def setUp(self): self.org = Organization.objects.create( name='Some Org', logo='/media/logos/some-org-logo.jpg', description='We are a fa...
<commit_before>from django.test import TestCase from org.models import Organization from ..models import Bus class BusModelTest(TestCase): def setUp(self): self.org = Organization.objects.create( name='Some Org', logo='/media/logos/some-org-logo.jpg', description='We ...
from django.test import TestCase from org.models import Organization from ..models import Bus, Route class BusModelTest(TestCase): def setUp(self): self.org = Organization.objects.create( name='Some Org', logo='/media/logos/some-org-logo.jpg', description='We are a fa...
from django.test import TestCase from org.models import Organization from ..models import Bus class BusModelTest(TestCase): def setUp(self): self.org = Organization.objects.create( name='Some Org', logo='/media/logos/some-org-logo.jpg', description='We are a familiar ...
<commit_before>from django.test import TestCase from org.models import Organization from ..models import Bus class BusModelTest(TestCase): def setUp(self): self.org = Organization.objects.create( name='Some Org', logo='/media/logos/some-org-logo.jpg', description='We ...
ce5e322367a15198bdbea9d32401b8c779d0e4bf
config.py
config.py
#! /usr/bin/env python import os import warnings import yaml class Config(object): config_fname = "configuration.yaml" def __init__(self, config_fname=None): config_fname = config_fname or self.config_fname fo = open(config_fname, "r") blob = fo.read() fo.close() self...
#! /usr/bin/env python import os import warnings import yaml class Config(object): config_fname = "configuration.yaml" def __init__(self, config_fname=None): config_fname = config_fname or self.config_fname fo = open(config_fname, "r") blob = fo.read() fo.close() self...
Add Config.get() to skip KeyErrors
Add Config.get() to skip KeyErrors Adds common `dict.get()` pattern to our own Config class, to enable use of fallbacks or `None`, as appropriate.
Python
apache-2.0
rossrader/destalinator
#! /usr/bin/env python import os import warnings import yaml class Config(object): config_fname = "configuration.yaml" def __init__(self, config_fname=None): config_fname = config_fname or self.config_fname fo = open(config_fname, "r") blob = fo.read() fo.close() self...
#! /usr/bin/env python import os import warnings import yaml class Config(object): config_fname = "configuration.yaml" def __init__(self, config_fname=None): config_fname = config_fname or self.config_fname fo = open(config_fname, "r") blob = fo.read() fo.close() self...
<commit_before>#! /usr/bin/env python import os import warnings import yaml class Config(object): config_fname = "configuration.yaml" def __init__(self, config_fname=None): config_fname = config_fname or self.config_fname fo = open(config_fname, "r") blob = fo.read() fo.close...
#! /usr/bin/env python import os import warnings import yaml class Config(object): config_fname = "configuration.yaml" def __init__(self, config_fname=None): config_fname = config_fname or self.config_fname fo = open(config_fname, "r") blob = fo.read() fo.close() self...
#! /usr/bin/env python import os import warnings import yaml class Config(object): config_fname = "configuration.yaml" def __init__(self, config_fname=None): config_fname = config_fname or self.config_fname fo = open(config_fname, "r") blob = fo.read() fo.close() self...
<commit_before>#! /usr/bin/env python import os import warnings import yaml class Config(object): config_fname = "configuration.yaml" def __init__(self, config_fname=None): config_fname = config_fname or self.config_fname fo = open(config_fname, "r") blob = fo.read() fo.close...
e63e2ddb84a8716da1568f82119db46f9d723a11
students/urls.py
students/urls.py
from django.conf.urls import include, url from . import views app_name = "students" urlpatterns = [ url(r'^home/$', views.home, name='home'), url(r'^booking/$', views.booking, name='booking'), url(r'^booking/list/$', views.booking_list, name='list_booking'), url(r'^booking/(?P<booking_id>[\d]+)/delete...
from django.conf.urls import include, url from . import views app_name = "students" urlpatterns = [ url(r'^home/$', views.home, name='home'), url(r'^booking/$', views.booking, name='booking'), url(r'^booking/list/$', views.booking_list, name='list_booking'), url(r'^booking/listall/(?P<booking_date>\d{...
Add url for 'list all bookings' view.
Add url for 'list all bookings' view.
Python
mit
muhummadPatel/raspied,muhummadPatel/raspied,muhummadPatel/raspied
from django.conf.urls import include, url from . import views app_name = "students" urlpatterns = [ url(r'^home/$', views.home, name='home'), url(r'^booking/$', views.booking, name='booking'), url(r'^booking/list/$', views.booking_list, name='list_booking'), url(r'^booking/(?P<booking_id>[\d]+)/delete...
from django.conf.urls import include, url from . import views app_name = "students" urlpatterns = [ url(r'^home/$', views.home, name='home'), url(r'^booking/$', views.booking, name='booking'), url(r'^booking/list/$', views.booking_list, name='list_booking'), url(r'^booking/listall/(?P<booking_date>\d{...
<commit_before>from django.conf.urls import include, url from . import views app_name = "students" urlpatterns = [ url(r'^home/$', views.home, name='home'), url(r'^booking/$', views.booking, name='booking'), url(r'^booking/list/$', views.booking_list, name='list_booking'), url(r'^booking/(?P<booking_i...
from django.conf.urls import include, url from . import views app_name = "students" urlpatterns = [ url(r'^home/$', views.home, name='home'), url(r'^booking/$', views.booking, name='booking'), url(r'^booking/list/$', views.booking_list, name='list_booking'), url(r'^booking/listall/(?P<booking_date>\d{...
from django.conf.urls import include, url from . import views app_name = "students" urlpatterns = [ url(r'^home/$', views.home, name='home'), url(r'^booking/$', views.booking, name='booking'), url(r'^booking/list/$', views.booking_list, name='list_booking'), url(r'^booking/(?P<booking_id>[\d]+)/delete...
<commit_before>from django.conf.urls import include, url from . import views app_name = "students" urlpatterns = [ url(r'^home/$', views.home, name='home'), url(r'^booking/$', views.booking, name='booking'), url(r'^booking/list/$', views.booking_list, name='list_booking'), url(r'^booking/(?P<booking_i...
35af07bc99c7527b84e11a8632bfb396823326f3
backlog/__init__.py
backlog/__init__.py
__version__ = (0, 2, 2, '', 0) def get_version(): version = '%d.%d.%d' % __version__[0:3] if __version__[3]: version = '%s-%s%s' % (version, __version__[3], (__version__[4] and str(__version__[4])) or '') return version
__version__ = (0, 2, 3, 'dev', 0) def get_version(): version = '%d.%d.%d' % __version__[0:3] if __version__[3]: version = '%s-%s%s' % (version, __version__[3], (__version__[4] and str(__version__[4])) or '') return version
Set the next patch release number
Set the next patch release number
Python
bsd-3-clause
jszakmeister/trac-backlog,jszakmeister/trac-backlog
__version__ = (0, 2, 2, '', 0) def get_version(): version = '%d.%d.%d' % __version__[0:3] if __version__[3]: version = '%s-%s%s' % (version, __version__[3], (__version__[4] and str(__version__[4])) or '') return version Set the next patch release number
__version__ = (0, 2, 3, 'dev', 0) def get_version(): version = '%d.%d.%d' % __version__[0:3] if __version__[3]: version = '%s-%s%s' % (version, __version__[3], (__version__[4] and str(__version__[4])) or '') return version
<commit_before>__version__ = (0, 2, 2, '', 0) def get_version(): version = '%d.%d.%d' % __version__[0:3] if __version__[3]: version = '%s-%s%s' % (version, __version__[3], (__version__[4] and str(__version__[4])) or '') return version <commit_msg>Set the next patch releas...
__version__ = (0, 2, 3, 'dev', 0) def get_version(): version = '%d.%d.%d' % __version__[0:3] if __version__[3]: version = '%s-%s%s' % (version, __version__[3], (__version__[4] and str(__version__[4])) or '') return version
__version__ = (0, 2, 2, '', 0) def get_version(): version = '%d.%d.%d' % __version__[0:3] if __version__[3]: version = '%s-%s%s' % (version, __version__[3], (__version__[4] and str(__version__[4])) or '') return version Set the next patch release number__version__ = (0, 2...
<commit_before>__version__ = (0, 2, 2, '', 0) def get_version(): version = '%d.%d.%d' % __version__[0:3] if __version__[3]: version = '%s-%s%s' % (version, __version__[3], (__version__[4] and str(__version__[4])) or '') return version <commit_msg>Set the next patch releas...
a138d7126acd1418e4bec47aeecf5a96076d1acf
djangae/contrib/backup/urls.py
djangae/contrib/backup/urls.py
from django.conf.urls import include, url from . import views urlpatterns = ( url( '^create-datastore-backup$', views.create_datastore_backup, name="create_datastore_backup" ), )
from django.conf.urls import url from . import views urlpatterns = ( url( '^create-datastore-backup/?$', views.create_datastore_backup, name="create_datastore_backup" ), )
Fix the backup url to match the docs (and retain backwards compatibility)
Fix the backup url to match the docs (and retain backwards compatibility)
Python
bsd-3-clause
potatolondon/djangae,potatolondon/djangae
from django.conf.urls import include, url from . import views urlpatterns = ( url( '^create-datastore-backup$', views.create_datastore_backup, name="create_datastore_backup" ), ) Fix the backup url to match the docs (and retain backwards compatibility)
from django.conf.urls import url from . import views urlpatterns = ( url( '^create-datastore-backup/?$', views.create_datastore_backup, name="create_datastore_backup" ), )
<commit_before>from django.conf.urls import include, url from . import views urlpatterns = ( url( '^create-datastore-backup$', views.create_datastore_backup, name="create_datastore_backup" ), ) <commit_msg>Fix the backup url to match the docs (and retain backwards compatibility)<commit...
from django.conf.urls import url from . import views urlpatterns = ( url( '^create-datastore-backup/?$', views.create_datastore_backup, name="create_datastore_backup" ), )
from django.conf.urls import include, url from . import views urlpatterns = ( url( '^create-datastore-backup$', views.create_datastore_backup, name="create_datastore_backup" ), ) Fix the backup url to match the docs (and retain backwards compatibility)from django.conf.urls import url ...
<commit_before>from django.conf.urls import include, url from . import views urlpatterns = ( url( '^create-datastore-backup$', views.create_datastore_backup, name="create_datastore_backup" ), ) <commit_msg>Fix the backup url to match the docs (and retain backwards compatibility)<commit...
9c2efa3df7d39ef6724fb031d0bb674eb7195b2e
tv-script-generation/helper.py
tv-script-generation/helper.py
import os import pickle def load_data(path): """ Load Dataset from File """ input_file = os.path.join(path) with open(input_file, "r") as f: data = f.read() return data def preprocess_and_save_data(dataset_path, token_lookup, create_lookup_tables): """ Preprocess Text Data ...
import os import pickle def load_data(path): """ Load Dataset from File """ input_file = os.path.join(path) with open(input_file, "r") as f: data = f.read() return data def preprocess_and_save_data(dataset_path, token_lookup, create_lookup_tables): """ Preprocess Text Data ...
Remove copyright notice during preprocessing
Remove copyright notice during preprocessing
Python
mit
elenduuche/deep-learning,elenduuche/deep-learning
import os import pickle def load_data(path): """ Load Dataset from File """ input_file = os.path.join(path) with open(input_file, "r") as f: data = f.read() return data def preprocess_and_save_data(dataset_path, token_lookup, create_lookup_tables): """ Preprocess Text Data ...
import os import pickle def load_data(path): """ Load Dataset from File """ input_file = os.path.join(path) with open(input_file, "r") as f: data = f.read() return data def preprocess_and_save_data(dataset_path, token_lookup, create_lookup_tables): """ Preprocess Text Data ...
<commit_before>import os import pickle def load_data(path): """ Load Dataset from File """ input_file = os.path.join(path) with open(input_file, "r") as f: data = f.read() return data def preprocess_and_save_data(dataset_path, token_lookup, create_lookup_tables): """ Preproc...
import os import pickle def load_data(path): """ Load Dataset from File """ input_file = os.path.join(path) with open(input_file, "r") as f: data = f.read() return data def preprocess_and_save_data(dataset_path, token_lookup, create_lookup_tables): """ Preprocess Text Data ...
import os import pickle def load_data(path): """ Load Dataset from File """ input_file = os.path.join(path) with open(input_file, "r") as f: data = f.read() return data def preprocess_and_save_data(dataset_path, token_lookup, create_lookup_tables): """ Preprocess Text Data ...
<commit_before>import os import pickle def load_data(path): """ Load Dataset from File """ input_file = os.path.join(path) with open(input_file, "r") as f: data = f.read() return data def preprocess_and_save_data(dataset_path, token_lookup, create_lookup_tables): """ Preproc...
6bc25787dec8530b20db0a43b754c04f0170b9d8
symfit/api.py
symfit/api.py
# Overwrite behavior of sympy objects to make more sense for this project. import symfit.core.operators # Expose useful objects. from symfit.core.fit import ( Fit, Model, Constraint, ODEModel, ModelError, CallableModel, CallableNumericalModel ) from symfit.core.fit_results import FitResults from symfit.core.ar...
# Overwrite behavior of sympy objects to make more sense for this project. import symfit.core.operators # Expose useful objects. from symfit.core.fit import ( Fit, Model, Constraint, ODEModel, ModelError, CallableModel, CallableNumericalModel, GradientModel ) from symfit.core.fit_results import FitResults from...
Add GradientModel to the API
Add GradientModel to the API
Python
mit
tBuLi/symfit
# Overwrite behavior of sympy objects to make more sense for this project. import symfit.core.operators # Expose useful objects. from symfit.core.fit import ( Fit, Model, Constraint, ODEModel, ModelError, CallableModel, CallableNumericalModel ) from symfit.core.fit_results import FitResults from symfit.core.ar...
# Overwrite behavior of sympy objects to make more sense for this project. import symfit.core.operators # Expose useful objects. from symfit.core.fit import ( Fit, Model, Constraint, ODEModel, ModelError, CallableModel, CallableNumericalModel, GradientModel ) from symfit.core.fit_results import FitResults from...
<commit_before># Overwrite behavior of sympy objects to make more sense for this project. import symfit.core.operators # Expose useful objects. from symfit.core.fit import ( Fit, Model, Constraint, ODEModel, ModelError, CallableModel, CallableNumericalModel ) from symfit.core.fit_results import FitResults from...
# Overwrite behavior of sympy objects to make more sense for this project. import symfit.core.operators # Expose useful objects. from symfit.core.fit import ( Fit, Model, Constraint, ODEModel, ModelError, CallableModel, CallableNumericalModel, GradientModel ) from symfit.core.fit_results import FitResults from...
# Overwrite behavior of sympy objects to make more sense for this project. import symfit.core.operators # Expose useful objects. from symfit.core.fit import ( Fit, Model, Constraint, ODEModel, ModelError, CallableModel, CallableNumericalModel ) from symfit.core.fit_results import FitResults from symfit.core.ar...
<commit_before># Overwrite behavior of sympy objects to make more sense for this project. import symfit.core.operators # Expose useful objects. from symfit.core.fit import ( Fit, Model, Constraint, ODEModel, ModelError, CallableModel, CallableNumericalModel ) from symfit.core.fit_results import FitResults from...
169b5ec57404360d0c9c1c438aa357f62f61b9cf
contrib/chatops/actions/format_result.py
contrib/chatops/actions/format_result.py
import jinja2 import six import os from st2actions.runners.pythonrunner import Action from st2client.client import Client class FormatResultAction(Action): def __init__(self, config): super(FormatResultAction, self).__init__(config) api_url = os.environ.get('ST2_ACTION_API_URL', None) tok...
import jinja2 import six import os from st2actions.runners.pythonrunner import Action from st2client.client import Client class FormatResultAction(Action): def __init__(self, config): super(FormatResultAction, self).__init__(config) api_url = os.environ.get('ST2_ACTION_API_URL', None) tok...
Return empty string if result output is disabled
Return empty string if result output is disabled
Python
apache-2.0
StackStorm/st2,pixelrebel/st2,emedvedev/st2,peak6/st2,Plexxi/st2,Plexxi/st2,lakshmi-kannan/st2,lakshmi-kannan/st2,punalpatel/st2,emedvedev/st2,dennybaa/st2,punalpatel/st2,nzlosh/st2,nzlosh/st2,peak6/st2,peak6/st2,StackStorm/st2,armab/st2,StackStorm/st2,punalpatel/st2,emedvedev/st2,nzlosh/st2,Plexxi/st2,tonybaloney/st2,...
import jinja2 import six import os from st2actions.runners.pythonrunner import Action from st2client.client import Client class FormatResultAction(Action): def __init__(self, config): super(FormatResultAction, self).__init__(config) api_url = os.environ.get('ST2_ACTION_API_URL', None) tok...
import jinja2 import six import os from st2actions.runners.pythonrunner import Action from st2client.client import Client class FormatResultAction(Action): def __init__(self, config): super(FormatResultAction, self).__init__(config) api_url = os.environ.get('ST2_ACTION_API_URL', None) tok...
<commit_before>import jinja2 import six import os from st2actions.runners.pythonrunner import Action from st2client.client import Client class FormatResultAction(Action): def __init__(self, config): super(FormatResultAction, self).__init__(config) api_url = os.environ.get('ST2_ACTION_API_URL', No...
import jinja2 import six import os from st2actions.runners.pythonrunner import Action from st2client.client import Client class FormatResultAction(Action): def __init__(self, config): super(FormatResultAction, self).__init__(config) api_url = os.environ.get('ST2_ACTION_API_URL', None) tok...
import jinja2 import six import os from st2actions.runners.pythonrunner import Action from st2client.client import Client class FormatResultAction(Action): def __init__(self, config): super(FormatResultAction, self).__init__(config) api_url = os.environ.get('ST2_ACTION_API_URL', None) tok...
<commit_before>import jinja2 import six import os from st2actions.runners.pythonrunner import Action from st2client.client import Client class FormatResultAction(Action): def __init__(self, config): super(FormatResultAction, self).__init__(config) api_url = os.environ.get('ST2_ACTION_API_URL', No...
42f2b69639b34644f42507bc65d399f423e348ef
tests/grammar_unified_tests.py
tests/grammar_unified_tests.py
from unittest import TestCase from regparser.grammar.unified import * class GrammarCommonTests(TestCase): def test_depth1_p(self): text = '(c)(2)(ii)(A)(<E T="03">2</E>)' result = depth1_p.parseString(text) self.assertEqual('c', result.p1) self.assertEqual('2', result.p2) ...
# -*- coding: utf-8 -*- from unittest import TestCase from regparser.grammar.unified import * class GrammarCommonTests(TestCase): def test_depth1_p(self): text = '(c)(2)(ii)(A)(<E T="03">2</E>)' result = depth1_p.parseString(text) self.assertEqual('c', result.p1) self.assertEqual...
Add tests for marker_comment from ascott1/appendix-ref
Add tests for marker_comment from ascott1/appendix-ref
Python
cc0-1.0
grapesmoker/regulations-parser,willbarton/regulations-parser,adderall/regulations-parser
from unittest import TestCase from regparser.grammar.unified import * class GrammarCommonTests(TestCase): def test_depth1_p(self): text = '(c)(2)(ii)(A)(<E T="03">2</E>)' result = depth1_p.parseString(text) self.assertEqual('c', result.p1) self.assertEqual('2', result.p2) ...
# -*- coding: utf-8 -*- from unittest import TestCase from regparser.grammar.unified import * class GrammarCommonTests(TestCase): def test_depth1_p(self): text = '(c)(2)(ii)(A)(<E T="03">2</E>)' result = depth1_p.parseString(text) self.assertEqual('c', result.p1) self.assertEqual...
<commit_before>from unittest import TestCase from regparser.grammar.unified import * class GrammarCommonTests(TestCase): def test_depth1_p(self): text = '(c)(2)(ii)(A)(<E T="03">2</E>)' result = depth1_p.parseString(text) self.assertEqual('c', result.p1) self.assertEqual('2', res...
# -*- coding: utf-8 -*- from unittest import TestCase from regparser.grammar.unified import * class GrammarCommonTests(TestCase): def test_depth1_p(self): text = '(c)(2)(ii)(A)(<E T="03">2</E>)' result = depth1_p.parseString(text) self.assertEqual('c', result.p1) self.assertEqual...
from unittest import TestCase from regparser.grammar.unified import * class GrammarCommonTests(TestCase): def test_depth1_p(self): text = '(c)(2)(ii)(A)(<E T="03">2</E>)' result = depth1_p.parseString(text) self.assertEqual('c', result.p1) self.assertEqual('2', result.p2) ...
<commit_before>from unittest import TestCase from regparser.grammar.unified import * class GrammarCommonTests(TestCase): def test_depth1_p(self): text = '(c)(2)(ii)(A)(<E T="03">2</E>)' result = depth1_p.parseString(text) self.assertEqual('c', result.p1) self.assertEqual('2', res...
33ed550e08f405ee1a93123c12f05c0daaa13ad2
dthm4kaiako/config/__init__.py
dthm4kaiako/config/__init__.py
"""Configuration for Django system.""" __version__ = "0.18.4" __version_info__ = tuple( [ int(num) if num.isdigit() else num for num in __version__.replace("-", ".", 1).split(".") ] )
"""Configuration for Django system.""" __version__ = "0.18.5" __version_info__ = tuple( [ int(num) if num.isdigit() else num for num in __version__.replace("-", ".", 1).split(".") ] )
Increment version number to 0.18.5
Increment version number to 0.18.5
Python
mit
uccser/cs4teachers,uccser/cs4teachers,uccser/cs4teachers,uccser/cs4teachers
"""Configuration for Django system.""" __version__ = "0.18.4" __version_info__ = tuple( [ int(num) if num.isdigit() else num for num in __version__.replace("-", ".", 1).split(".") ] ) Increment version number to 0.18.5
"""Configuration for Django system.""" __version__ = "0.18.5" __version_info__ = tuple( [ int(num) if num.isdigit() else num for num in __version__.replace("-", ".", 1).split(".") ] )
<commit_before>"""Configuration for Django system.""" __version__ = "0.18.4" __version_info__ = tuple( [ int(num) if num.isdigit() else num for num in __version__.replace("-", ".", 1).split(".") ] ) <commit_msg>Increment version number to 0.18.5<commit_after>
"""Configuration for Django system.""" __version__ = "0.18.5" __version_info__ = tuple( [ int(num) if num.isdigit() else num for num in __version__.replace("-", ".", 1).split(".") ] )
"""Configuration for Django system.""" __version__ = "0.18.4" __version_info__ = tuple( [ int(num) if num.isdigit() else num for num in __version__.replace("-", ".", 1).split(".") ] ) Increment version number to 0.18.5"""Configuration for Django system.""" __version__ = "0.18.5" __version_info...
<commit_before>"""Configuration for Django system.""" __version__ = "0.18.4" __version_info__ = tuple( [ int(num) if num.isdigit() else num for num in __version__.replace("-", ".", 1).split(".") ] ) <commit_msg>Increment version number to 0.18.5<commit_after>"""Configuration for Django system."...
bcf4f87e3690986827d8d34eea5e7edfc03485e2
cassandra_migrate/test/test_cql.py
cassandra_migrate/test/test_cql.py
from __future__ import unicode_literals import pytest from cassandra_migrate.cql import CqlSplitter @pytest.mark.parametrize('cql,statements', [ # Two statements, with whitespace (''' CREATE TABLE hello; CREATE TABLE world; ''', ['CREATE TABLE hello', 'CREATE TABLE world']), # Two st...
from __future__ import unicode_literals import pytest from cassandra_migrate.cql import CqlSplitter @pytest.mark.parametrize('cql,statements', [ # Two statements, with whitespace (''' CREATE TABLE hello; CREATE TABLE world; ''', ['CREATE TABLE hello', 'CREATE TABLE world']), # Two st...
Add CQL-splitting test case for double-dollar-sign strings
Add CQL-splitting test case for double-dollar-sign strings
Python
mit
Cobliteam/cassandra-migrate,Cobliteam/cassandra-migrate
from __future__ import unicode_literals import pytest from cassandra_migrate.cql import CqlSplitter @pytest.mark.parametrize('cql,statements', [ # Two statements, with whitespace (''' CREATE TABLE hello; CREATE TABLE world; ''', ['CREATE TABLE hello', 'CREATE TABLE world']), # Two st...
from __future__ import unicode_literals import pytest from cassandra_migrate.cql import CqlSplitter @pytest.mark.parametrize('cql,statements', [ # Two statements, with whitespace (''' CREATE TABLE hello; CREATE TABLE world; ''', ['CREATE TABLE hello', 'CREATE TABLE world']), # Two st...
<commit_before>from __future__ import unicode_literals import pytest from cassandra_migrate.cql import CqlSplitter @pytest.mark.parametrize('cql,statements', [ # Two statements, with whitespace (''' CREATE TABLE hello; CREATE TABLE world; ''', ['CREATE TABLE hello', 'CREATE TABLE world']...
from __future__ import unicode_literals import pytest from cassandra_migrate.cql import CqlSplitter @pytest.mark.parametrize('cql,statements', [ # Two statements, with whitespace (''' CREATE TABLE hello; CREATE TABLE world; ''', ['CREATE TABLE hello', 'CREATE TABLE world']), # Two st...
from __future__ import unicode_literals import pytest from cassandra_migrate.cql import CqlSplitter @pytest.mark.parametrize('cql,statements', [ # Two statements, with whitespace (''' CREATE TABLE hello; CREATE TABLE world; ''', ['CREATE TABLE hello', 'CREATE TABLE world']), # Two st...
<commit_before>from __future__ import unicode_literals import pytest from cassandra_migrate.cql import CqlSplitter @pytest.mark.parametrize('cql,statements', [ # Two statements, with whitespace (''' CREATE TABLE hello; CREATE TABLE world; ''', ['CREATE TABLE hello', 'CREATE TABLE world']...
0f981d86802706edb78b7d76f6c4b68198876032
tests/steps/express-install.py
tests/steps/express-install.py
#!/usr/bin/python from __future__ import unicode_literals import libvirt from general import libvirt_domain_get_val, libvirt_domain_get_context def libvirt_domain_get_install_state(title): state = None conn = libvirt.openReadOnly(None) doms = conn.listAllDomains() for dom in doms: try: ...
#!/usr/bin/python from __future__ import unicode_literals import libvirt from time import sleep from general import libvirt_domain_get_val, libvirt_domain_get_context def libvirt_domain_get_install_state(title): state = None conn = libvirt.openReadOnly(None) doms = conn.listAllDomains() for dom in do...
Add "Installation finished check" step
tests: Add "Installation finished check" step Step that asks libvirt every minute if VM state is installed. Step fails after specified amount of time, if not. https://bugzilla.gnome.org/show_bug.cgi?id=748006
Python
lgpl-2.1
vbenes/gnome-boxes,vbenes/gnome-boxes
#!/usr/bin/python from __future__ import unicode_literals import libvirt from general import libvirt_domain_get_val, libvirt_domain_get_context def libvirt_domain_get_install_state(title): state = None conn = libvirt.openReadOnly(None) doms = conn.listAllDomains() for dom in doms: try: ...
#!/usr/bin/python from __future__ import unicode_literals import libvirt from time import sleep from general import libvirt_domain_get_val, libvirt_domain_get_context def libvirt_domain_get_install_state(title): state = None conn = libvirt.openReadOnly(None) doms = conn.listAllDomains() for dom in do...
<commit_before>#!/usr/bin/python from __future__ import unicode_literals import libvirt from general import libvirt_domain_get_val, libvirt_domain_get_context def libvirt_domain_get_install_state(title): state = None conn = libvirt.openReadOnly(None) doms = conn.listAllDomains() for dom in doms: ...
#!/usr/bin/python from __future__ import unicode_literals import libvirt from time import sleep from general import libvirt_domain_get_val, libvirt_domain_get_context def libvirt_domain_get_install_state(title): state = None conn = libvirt.openReadOnly(None) doms = conn.listAllDomains() for dom in do...
#!/usr/bin/python from __future__ import unicode_literals import libvirt from general import libvirt_domain_get_val, libvirt_domain_get_context def libvirt_domain_get_install_state(title): state = None conn = libvirt.openReadOnly(None) doms = conn.listAllDomains() for dom in doms: try: ...
<commit_before>#!/usr/bin/python from __future__ import unicode_literals import libvirt from general import libvirt_domain_get_val, libvirt_domain_get_context def libvirt_domain_get_install_state(title): state = None conn = libvirt.openReadOnly(None) doms = conn.listAllDomains() for dom in doms: ...
46017b7c1f480f5cb94ca0ef380b0666f8b77d0f
helevents/models.py
helevents/models.py
from django.db import models from helusers.models import AbstractUser class User(AbstractUser): def __str__(self): return ' - '.join([super().__str__(), self.get_display_name(), self.email]) def get_display_name(self): return '{0} {1}'.format(self.first_name, self.last_name).strip() def ...
from django.db import models from helusers.models import AbstractUser class User(AbstractUser): def __str__(self): return ' - '.join([self.get_display_name(), self.email]) def get_display_name(self): return '{0} {1}'.format(self.first_name, self.last_name).strip() def get_default_organiz...
Remove uuid display from user string
Remove uuid display from user string
Python
mit
City-of-Helsinki/linkedevents,City-of-Helsinki/linkedevents,City-of-Helsinki/linkedevents
from django.db import models from helusers.models import AbstractUser class User(AbstractUser): def __str__(self): return ' - '.join([super().__str__(), self.get_display_name(), self.email]) def get_display_name(self): return '{0} {1}'.format(self.first_name, self.last_name).strip() def ...
from django.db import models from helusers.models import AbstractUser class User(AbstractUser): def __str__(self): return ' - '.join([self.get_display_name(), self.email]) def get_display_name(self): return '{0} {1}'.format(self.first_name, self.last_name).strip() def get_default_organiz...
<commit_before>from django.db import models from helusers.models import AbstractUser class User(AbstractUser): def __str__(self): return ' - '.join([super().__str__(), self.get_display_name(), self.email]) def get_display_name(self): return '{0} {1}'.format(self.first_name, self.last_name).st...
from django.db import models from helusers.models import AbstractUser class User(AbstractUser): def __str__(self): return ' - '.join([self.get_display_name(), self.email]) def get_display_name(self): return '{0} {1}'.format(self.first_name, self.last_name).strip() def get_default_organiz...
from django.db import models from helusers.models import AbstractUser class User(AbstractUser): def __str__(self): return ' - '.join([super().__str__(), self.get_display_name(), self.email]) def get_display_name(self): return '{0} {1}'.format(self.first_name, self.last_name).strip() def ...
<commit_before>from django.db import models from helusers.models import AbstractUser class User(AbstractUser): def __str__(self): return ' - '.join([super().__str__(), self.get_display_name(), self.email]) def get_display_name(self): return '{0} {1}'.format(self.first_name, self.last_name).st...
8eb4f1e660de74837c7d05b1ee9076a58a551093
test/python_api/default-constructor/sb_stringlist.py
test/python_api/default-constructor/sb_stringlist.py
""" Fuzz tests an object after the default construction to make sure it does not crash lldb. """ import sys import lldb def fuzz_obj(obj): obj.AppendString("another string") obj.AppendList(None, 0) obj.AppendList(lldb.SBStringList()) obj.GetSize() obj.GetStringAtIndex(0xffffffff) obj.Clear() ...
""" Fuzz tests an object after the default construction to make sure it does not crash lldb. """ import sys import lldb def fuzz_obj(obj): obj.AppendString("another string") obj.AppendString(None) obj.AppendList(None, 0) obj.AppendList(lldb.SBStringList()) obj.GetSize() obj.GetStringAtIndex(0x...
Add fuzz call to SBStringList.AppendString(None). LLDB should not crash.
Add fuzz call to SBStringList.AppendString(None). LLDB should not crash. git-svn-id: 4c4cc70b1ef44ba2b7963015e681894188cea27e@146935 91177308-0d34-0410-b5e6-96231b3b80d8
Python
apache-2.0
llvm-mirror/lldb,apple/swift-lldb,apple/swift-lldb,llvm-mirror/lldb,llvm-mirror/lldb,llvm-mirror/lldb,llvm-mirror/lldb,apple/swift-lldb,apple/swift-lldb,apple/swift-lldb,apple/swift-lldb
""" Fuzz tests an object after the default construction to make sure it does not crash lldb. """ import sys import lldb def fuzz_obj(obj): obj.AppendString("another string") obj.AppendList(None, 0) obj.AppendList(lldb.SBStringList()) obj.GetSize() obj.GetStringAtIndex(0xffffffff) obj.Clear() ...
""" Fuzz tests an object after the default construction to make sure it does not crash lldb. """ import sys import lldb def fuzz_obj(obj): obj.AppendString("another string") obj.AppendString(None) obj.AppendList(None, 0) obj.AppendList(lldb.SBStringList()) obj.GetSize() obj.GetStringAtIndex(0x...
<commit_before>""" Fuzz tests an object after the default construction to make sure it does not crash lldb. """ import sys import lldb def fuzz_obj(obj): obj.AppendString("another string") obj.AppendList(None, 0) obj.AppendList(lldb.SBStringList()) obj.GetSize() obj.GetStringAtIndex(0xffffffff) ...
""" Fuzz tests an object after the default construction to make sure it does not crash lldb. """ import sys import lldb def fuzz_obj(obj): obj.AppendString("another string") obj.AppendString(None) obj.AppendList(None, 0) obj.AppendList(lldb.SBStringList()) obj.GetSize() obj.GetStringAtIndex(0x...
""" Fuzz tests an object after the default construction to make sure it does not crash lldb. """ import sys import lldb def fuzz_obj(obj): obj.AppendString("another string") obj.AppendList(None, 0) obj.AppendList(lldb.SBStringList()) obj.GetSize() obj.GetStringAtIndex(0xffffffff) obj.Clear() ...
<commit_before>""" Fuzz tests an object after the default construction to make sure it does not crash lldb. """ import sys import lldb def fuzz_obj(obj): obj.AppendString("another string") obj.AppendList(None, 0) obj.AppendList(lldb.SBStringList()) obj.GetSize() obj.GetStringAtIndex(0xffffffff) ...
ae00c60510e28c0852ac6ad14bab86563b5e1399
mica/common.py
mica/common.py
# Licensed under a 3-clause BSD style license - see LICENSE.rst """ Common definitions for Mica subpackages """ import os class MissingDataError(Exception): pass FLIGHT_MICA_ARCHIVE = os.path.join(os.environ['SKA'], 'data', 'mica', 'archive') # The MICA_ARCHIVE env. var can be a colon-delimited path, which allo...
# Licensed under a 3-clause BSD style license - see LICENSE.rst """ Common definitions for Mica subpackages """ import os class MissingDataError(Exception): pass FLIGHT_MICA_ARCHIVE = os.path.join(os.environ['SKA'], 'data', 'mica', 'archive') # The MICA_ARCHIVE env. var can be a colon-delimited path, which allo...
Use os.pathsep instead of ':' for windows compat
Use os.pathsep instead of ':' for windows compat
Python
bsd-3-clause
sot/mica,sot/mica
# Licensed under a 3-clause BSD style license - see LICENSE.rst """ Common definitions for Mica subpackages """ import os class MissingDataError(Exception): pass FLIGHT_MICA_ARCHIVE = os.path.join(os.environ['SKA'], 'data', 'mica', 'archive') # The MICA_ARCHIVE env. var can be a colon-delimited path, which allo...
# Licensed under a 3-clause BSD style license - see LICENSE.rst """ Common definitions for Mica subpackages """ import os class MissingDataError(Exception): pass FLIGHT_MICA_ARCHIVE = os.path.join(os.environ['SKA'], 'data', 'mica', 'archive') # The MICA_ARCHIVE env. var can be a colon-delimited path, which allo...
<commit_before># Licensed under a 3-clause BSD style license - see LICENSE.rst """ Common definitions for Mica subpackages """ import os class MissingDataError(Exception): pass FLIGHT_MICA_ARCHIVE = os.path.join(os.environ['SKA'], 'data', 'mica', 'archive') # The MICA_ARCHIVE env. var can be a colon-delimited p...
# Licensed under a 3-clause BSD style license - see LICENSE.rst """ Common definitions for Mica subpackages """ import os class MissingDataError(Exception): pass FLIGHT_MICA_ARCHIVE = os.path.join(os.environ['SKA'], 'data', 'mica', 'archive') # The MICA_ARCHIVE env. var can be a colon-delimited path, which allo...
# Licensed under a 3-clause BSD style license - see LICENSE.rst """ Common definitions for Mica subpackages """ import os class MissingDataError(Exception): pass FLIGHT_MICA_ARCHIVE = os.path.join(os.environ['SKA'], 'data', 'mica', 'archive') # The MICA_ARCHIVE env. var can be a colon-delimited path, which allo...
<commit_before># Licensed under a 3-clause BSD style license - see LICENSE.rst """ Common definitions for Mica subpackages """ import os class MissingDataError(Exception): pass FLIGHT_MICA_ARCHIVE = os.path.join(os.environ['SKA'], 'data', 'mica', 'archive') # The MICA_ARCHIVE env. var can be a colon-delimited p...
c04d8dfaf3b4fcbddedb0973a501609ffb9472f6
simpleflow/settings/__init__.py
simpleflow/settings/__init__.py
import sys from future.utils import iteritems from . import base def put_setting(key, value): setattr(sys.modules[__name__], key, value) _keys.add(key) def configure(dct): for k, v in iteritems(dct): put_setting(k, v) # initialize a list of settings names _keys = set() # look for settings a...
from pprint import pformat import sys from future.utils import iteritems from . import base def put_setting(key, value): setattr(sys.modules[__name__], key, value) _keys.add(key) def configure(dct): for k, v in iteritems(dct): put_setting(k, v) def print_settings(): for key in sorted(_ke...
Add utility method to print all settings
Add utility method to print all settings
Python
mit
botify-labs/simpleflow,botify-labs/simpleflow
import sys from future.utils import iteritems from . import base def put_setting(key, value): setattr(sys.modules[__name__], key, value) _keys.add(key) def configure(dct): for k, v in iteritems(dct): put_setting(k, v) # initialize a list of settings names _keys = set() # look for settings a...
from pprint import pformat import sys from future.utils import iteritems from . import base def put_setting(key, value): setattr(sys.modules[__name__], key, value) _keys.add(key) def configure(dct): for k, v in iteritems(dct): put_setting(k, v) def print_settings(): for key in sorted(_ke...
<commit_before>import sys from future.utils import iteritems from . import base def put_setting(key, value): setattr(sys.modules[__name__], key, value) _keys.add(key) def configure(dct): for k, v in iteritems(dct): put_setting(k, v) # initialize a list of settings names _keys = set() # look...
from pprint import pformat import sys from future.utils import iteritems from . import base def put_setting(key, value): setattr(sys.modules[__name__], key, value) _keys.add(key) def configure(dct): for k, v in iteritems(dct): put_setting(k, v) def print_settings(): for key in sorted(_ke...
import sys from future.utils import iteritems from . import base def put_setting(key, value): setattr(sys.modules[__name__], key, value) _keys.add(key) def configure(dct): for k, v in iteritems(dct): put_setting(k, v) # initialize a list of settings names _keys = set() # look for settings a...
<commit_before>import sys from future.utils import iteritems from . import base def put_setting(key, value): setattr(sys.modules[__name__], key, value) _keys.add(key) def configure(dct): for k, v in iteritems(dct): put_setting(k, v) # initialize a list of settings names _keys = set() # look...
db02cadeb115bf3f7a8dd9be40d8a62d75d3559f
corehq/apps/hqwebapp/middleware.py
corehq/apps/hqwebapp/middleware.py
from django.middleware.csrf import CsrfViewMiddleware, REASON_NO_CSRF_COOKIE, REASON_BAD_TOKEN from corehq.util.soft_assert import soft_assert from django.conf import settings class HQCsrfViewMiddleWare(CsrfViewMiddleware): def _reject(self, request, reason): if settings.CSRF_ALWAYS_OFF and reason in [R...
import logging from django.middleware.csrf import CsrfViewMiddleware, REASON_NO_CSRF_COOKIE, REASON_BAD_TOKEN from django.conf import settings logger = logging.getLogger('') class HQCsrfViewMiddleWare(CsrfViewMiddleware): def _reject(self, request, reason): if settings.CSRF_ALWAYS_OFF and reason in [R...
Revert "Revert "log to file, don't email""
Revert "Revert "log to file, don't email"" This reverts commit 95245bb7fab6efe5a72cb8abbf4380a26b72a720.
Python
bsd-3-clause
qedsoftware/commcare-hq,dimagi/commcare-hq,dimagi/commcare-hq,dimagi/commcare-hq,dimagi/commcare-hq,qedsoftware/commcare-hq,qedsoftware/commcare-hq,qedsoftware/commcare-hq,qedsoftware/commcare-hq,dimagi/commcare-hq
from django.middleware.csrf import CsrfViewMiddleware, REASON_NO_CSRF_COOKIE, REASON_BAD_TOKEN from corehq.util.soft_assert import soft_assert from django.conf import settings class HQCsrfViewMiddleWare(CsrfViewMiddleware): def _reject(self, request, reason): if settings.CSRF_ALWAYS_OFF and reason in [R...
import logging from django.middleware.csrf import CsrfViewMiddleware, REASON_NO_CSRF_COOKIE, REASON_BAD_TOKEN from django.conf import settings logger = logging.getLogger('') class HQCsrfViewMiddleWare(CsrfViewMiddleware): def _reject(self, request, reason): if settings.CSRF_ALWAYS_OFF and reason in [R...
<commit_before>from django.middleware.csrf import CsrfViewMiddleware, REASON_NO_CSRF_COOKIE, REASON_BAD_TOKEN from corehq.util.soft_assert import soft_assert from django.conf import settings class HQCsrfViewMiddleWare(CsrfViewMiddleware): def _reject(self, request, reason): if settings.CSRF_ALWAYS_OFF a...
import logging from django.middleware.csrf import CsrfViewMiddleware, REASON_NO_CSRF_COOKIE, REASON_BAD_TOKEN from django.conf import settings logger = logging.getLogger('') class HQCsrfViewMiddleWare(CsrfViewMiddleware): def _reject(self, request, reason): if settings.CSRF_ALWAYS_OFF and reason in [R...
from django.middleware.csrf import CsrfViewMiddleware, REASON_NO_CSRF_COOKIE, REASON_BAD_TOKEN from corehq.util.soft_assert import soft_assert from django.conf import settings class HQCsrfViewMiddleWare(CsrfViewMiddleware): def _reject(self, request, reason): if settings.CSRF_ALWAYS_OFF and reason in [R...
<commit_before>from django.middleware.csrf import CsrfViewMiddleware, REASON_NO_CSRF_COOKIE, REASON_BAD_TOKEN from corehq.util.soft_assert import soft_assert from django.conf import settings class HQCsrfViewMiddleWare(CsrfViewMiddleware): def _reject(self, request, reason): if settings.CSRF_ALWAYS_OFF a...
eef7f3797a6228c9e06717c3be49801a10b457a5
registries/views.py
registries/views.py
from django.http import HttpResponse from rest_framework.generics import ListCreateAPIView, RetrieveUpdateDestroyAPIView from rest_framework.response import Response from registries.models import Organization from registries.serializers import DrillerListSerializer, DrillerSerializer class APIDrillerListCreateView(Lis...
from django.http import HttpResponse from rest_framework.generics import ListCreateAPIView, RetrieveUpdateDestroyAPIView from rest_framework.response import Response from registries.models import Organization from registries.serializers import DrillerListSerializer, DrillerSerializer class APIDrillerListCreateView(Lis...
Add docstrings to view classes
Add docstrings to view classes
Python
apache-2.0
bcgov/gwells,rstens/gwells,rstens/gwells,rstens/gwells,bcgov/gwells,bcgov/gwells,bcgov/gwells,rstens/gwells
from django.http import HttpResponse from rest_framework.generics import ListCreateAPIView, RetrieveUpdateDestroyAPIView from rest_framework.response import Response from registries.models import Organization from registries.serializers import DrillerListSerializer, DrillerSerializer class APIDrillerListCreateView(Lis...
from django.http import HttpResponse from rest_framework.generics import ListCreateAPIView, RetrieveUpdateDestroyAPIView from rest_framework.response import Response from registries.models import Organization from registries.serializers import DrillerListSerializer, DrillerSerializer class APIDrillerListCreateView(Lis...
<commit_before>from django.http import HttpResponse from rest_framework.generics import ListCreateAPIView, RetrieveUpdateDestroyAPIView from rest_framework.response import Response from registries.models import Organization from registries.serializers import DrillerListSerializer, DrillerSerializer class APIDrillerLis...
from django.http import HttpResponse from rest_framework.generics import ListCreateAPIView, RetrieveUpdateDestroyAPIView from rest_framework.response import Response from registries.models import Organization from registries.serializers import DrillerListSerializer, DrillerSerializer class APIDrillerListCreateView(Lis...
from django.http import HttpResponse from rest_framework.generics import ListCreateAPIView, RetrieveUpdateDestroyAPIView from rest_framework.response import Response from registries.models import Organization from registries.serializers import DrillerListSerializer, DrillerSerializer class APIDrillerListCreateView(Lis...
<commit_before>from django.http import HttpResponse from rest_framework.generics import ListCreateAPIView, RetrieveUpdateDestroyAPIView from rest_framework.response import Response from registries.models import Organization from registries.serializers import DrillerListSerializer, DrillerSerializer class APIDrillerLis...
3902e8183a9b5aab416b3574c3c415d9cc5c1740
src/test/test_location_info.py
src/test/test_location_info.py
import pytest import pytz from astral import LocationInfo class TestLocationInfo: def test_Default(self): loc = LocationInfo() assert loc.name == "Greenwich" assert loc.region == "England" assert loc.timezone == "Europe/London" assert loc.latitude == pytest.approx(51.4733, ...
import pytest import pytz from astral import LocationInfo class TestLocationInfo: def test_Default(self): loc = LocationInfo() assert loc.name == "Greenwich" assert loc.region == "England" assert loc.timezone == "Europe/London" assert loc.latitude == pytest.approx(51.4733, ...
Make sure we're testing the right function!
Make sure we're testing the right function!
Python
apache-2.0
sffjunkie/astral,sffjunkie/astral
import pytest import pytz from astral import LocationInfo class TestLocationInfo: def test_Default(self): loc = LocationInfo() assert loc.name == "Greenwich" assert loc.region == "England" assert loc.timezone == "Europe/London" assert loc.latitude == pytest.approx(51.4733, ...
import pytest import pytz from astral import LocationInfo class TestLocationInfo: def test_Default(self): loc = LocationInfo() assert loc.name == "Greenwich" assert loc.region == "England" assert loc.timezone == "Europe/London" assert loc.latitude == pytest.approx(51.4733, ...
<commit_before>import pytest import pytz from astral import LocationInfo class TestLocationInfo: def test_Default(self): loc = LocationInfo() assert loc.name == "Greenwich" assert loc.region == "England" assert loc.timezone == "Europe/London" assert loc.latitude == pytest.a...
import pytest import pytz from astral import LocationInfo class TestLocationInfo: def test_Default(self): loc = LocationInfo() assert loc.name == "Greenwich" assert loc.region == "England" assert loc.timezone == "Europe/London" assert loc.latitude == pytest.approx(51.4733, ...
import pytest import pytz from astral import LocationInfo class TestLocationInfo: def test_Default(self): loc = LocationInfo() assert loc.name == "Greenwich" assert loc.region == "England" assert loc.timezone == "Europe/London" assert loc.latitude == pytest.approx(51.4733, ...
<commit_before>import pytest import pytz from astral import LocationInfo class TestLocationInfo: def test_Default(self): loc = LocationInfo() assert loc.name == "Greenwich" assert loc.region == "England" assert loc.timezone == "Europe/London" assert loc.latitude == pytest.a...
17bbc99919b4c799f0bee94d4dac458aab7d695a
common/imagenet_server/main.py
common/imagenet_server/main.py
#!/usr/bin/python import logging import os import cv2 import numpy as np import image_getter def main(): # Configure root logger. root = logging.getLogger() root.setLevel(logging.DEBUG) file_handler = logging.FileHandler("test_image_getter.log") file_handler.setLevel(logging.DEBUG) stream_handler = log...
#!/usr/bin/python import logging def _configure_logging(): """ Configure logging handlers. """ # Configure root logger. root = logging.getLogger() root.setLevel(logging.DEBUG) file_handler = logging.FileHandler("test_image_getter.log") file_handler.setLevel(logging.DEBUG) stream_handler = logging.Stream...
Make imagenet server tester logging better.
Make imagenet server tester logging better.
Python
mit
djpetti/rpinets,djpetti/rpinets
#!/usr/bin/python import logging import os import cv2 import numpy as np import image_getter def main(): # Configure root logger. root = logging.getLogger() root.setLevel(logging.DEBUG) file_handler = logging.FileHandler("test_image_getter.log") file_handler.setLevel(logging.DEBUG) stream_handler = log...
#!/usr/bin/python import logging def _configure_logging(): """ Configure logging handlers. """ # Configure root logger. root = logging.getLogger() root.setLevel(logging.DEBUG) file_handler = logging.FileHandler("test_image_getter.log") file_handler.setLevel(logging.DEBUG) stream_handler = logging.Stream...
<commit_before>#!/usr/bin/python import logging import os import cv2 import numpy as np import image_getter def main(): # Configure root logger. root = logging.getLogger() root.setLevel(logging.DEBUG) file_handler = logging.FileHandler("test_image_getter.log") file_handler.setLevel(logging.DEBUG) strea...
#!/usr/bin/python import logging def _configure_logging(): """ Configure logging handlers. """ # Configure root logger. root = logging.getLogger() root.setLevel(logging.DEBUG) file_handler = logging.FileHandler("test_image_getter.log") file_handler.setLevel(logging.DEBUG) stream_handler = logging.Stream...
#!/usr/bin/python import logging import os import cv2 import numpy as np import image_getter def main(): # Configure root logger. root = logging.getLogger() root.setLevel(logging.DEBUG) file_handler = logging.FileHandler("test_image_getter.log") file_handler.setLevel(logging.DEBUG) stream_handler = log...
<commit_before>#!/usr/bin/python import logging import os import cv2 import numpy as np import image_getter def main(): # Configure root logger. root = logging.getLogger() root.setLevel(logging.DEBUG) file_handler = logging.FileHandler("test_image_getter.log") file_handler.setLevel(logging.DEBUG) strea...
a31e62f2a981f7662aee8a35ad195252a542d08d
plugins/say.py
plugins/say.py
from motobot import command, action @command('say') def say_command(bot, message, database): masters = [ "Moto-chan", "Motoko11", "Akahige", "betholas", "Baradium", "Cold_slither", "Drahken" ] if message.nick.lower() not in [x.lower() for x in m...
from motobot import command, action @command('say') def say_command(bot, message, database): masters = [ "Moto-chan", "Motoko11", "MotoNyan", "Akahige", "betholas", "Baradium", "Cold_slither", "Drahken" ] if message.nick.lower() not in [...
Add MotoNyan to mad hax
Add MotoNyan to mad hax
Python
mit
Motoko11/MotoBot
from motobot import command, action @command('say') def say_command(bot, message, database): masters = [ "Moto-chan", "Motoko11", "Akahige", "betholas", "Baradium", "Cold_slither", "Drahken" ] if message.nick.lower() not in [x.lower() for x in m...
from motobot import command, action @command('say') def say_command(bot, message, database): masters = [ "Moto-chan", "Motoko11", "MotoNyan", "Akahige", "betholas", "Baradium", "Cold_slither", "Drahken" ] if message.nick.lower() not in [...
<commit_before>from motobot import command, action @command('say') def say_command(bot, message, database): masters = [ "Moto-chan", "Motoko11", "Akahige", "betholas", "Baradium", "Cold_slither", "Drahken" ] if message.nick.lower() not in [x.low...
from motobot import command, action @command('say') def say_command(bot, message, database): masters = [ "Moto-chan", "Motoko11", "MotoNyan", "Akahige", "betholas", "Baradium", "Cold_slither", "Drahken" ] if message.nick.lower() not in [...
from motobot import command, action @command('say') def say_command(bot, message, database): masters = [ "Moto-chan", "Motoko11", "Akahige", "betholas", "Baradium", "Cold_slither", "Drahken" ] if message.nick.lower() not in [x.lower() for x in m...
<commit_before>from motobot import command, action @command('say') def say_command(bot, message, database): masters = [ "Moto-chan", "Motoko11", "Akahige", "betholas", "Baradium", "Cold_slither", "Drahken" ] if message.nick.lower() not in [x.low...
662101e89943fe62b7036894140272e2f9ea4f78
ibmcnx/test/test.py
ibmcnx/test/test.py
import ibmcnx.test.loadFunction loadFilesService() FilesPolicyService.browse( "title", "true", 1, 25 )
import ibmcnx.test.loadFunction ibmcnx.test.loadFunction.loadFilesService() FilesPolicyService.browse( "title", "true", 1, 25 )
Customize scripts to work with menu
Customize scripts to work with menu
Python
apache-2.0
stoeps13/ibmcnx2,stoeps13/ibmcnx2
import ibmcnx.test.loadFunction loadFilesService() FilesPolicyService.browse( "title", "true", 1, 25 ) Customize scripts to work with menu
import ibmcnx.test.loadFunction ibmcnx.test.loadFunction.loadFilesService() FilesPolicyService.browse( "title", "true", 1, 25 )
<commit_before>import ibmcnx.test.loadFunction loadFilesService() FilesPolicyService.browse( "title", "true", 1, 25 ) <commit_msg>Customize scripts to work with menu<commit_after>
import ibmcnx.test.loadFunction ibmcnx.test.loadFunction.loadFilesService() FilesPolicyService.browse( "title", "true", 1, 25 )
import ibmcnx.test.loadFunction loadFilesService() FilesPolicyService.browse( "title", "true", 1, 25 ) Customize scripts to work with menuimport ibmcnx.test.loadFunction ibmcnx.test.loadFunction.loadFilesService() FilesPolicyService.browse( "title", "true", 1, 25 )
<commit_before>import ibmcnx.test.loadFunction loadFilesService() FilesPolicyService.browse( "title", "true", 1, 25 ) <commit_msg>Customize scripts to work with menu<commit_after>import ibmcnx.test.loadFunction ibmcnx.test.loadFunction.loadFilesService() FilesPolicyService.browse( "title", "true", 1, 25 )
61c87725b1b6a4c5294b630df4c8c018d9db73a8
ingestors/worker.py
ingestors/worker.py
import logging from followthemoney import model from servicelayer.worker import Worker from servicelayer.jobs import JobStage as Stage from ingestors.manager import Manager log = logging.getLogger(__name__) class IngestWorker(Worker): """A long running task runner that uses Redis as a task queue""" def dis...
import logging from followthemoney import model from servicelayer.worker import Worker from servicelayer.jobs import JobStage as Stage from ingestors.manager import Manager log = logging.getLogger(__name__) class IngestWorker(Worker): """A long running task runner that uses Redis as a task queue""" def dis...
Remove job when done and match servicelayer api
Remove job when done and match servicelayer api
Python
mit
alephdata/ingestors
import logging from followthemoney import model from servicelayer.worker import Worker from servicelayer.jobs import JobStage as Stage from ingestors.manager import Manager log = logging.getLogger(__name__) class IngestWorker(Worker): """A long running task runner that uses Redis as a task queue""" def dis...
import logging from followthemoney import model from servicelayer.worker import Worker from servicelayer.jobs import JobStage as Stage from ingestors.manager import Manager log = logging.getLogger(__name__) class IngestWorker(Worker): """A long running task runner that uses Redis as a task queue""" def dis...
<commit_before>import logging from followthemoney import model from servicelayer.worker import Worker from servicelayer.jobs import JobStage as Stage from ingestors.manager import Manager log = logging.getLogger(__name__) class IngestWorker(Worker): """A long running task runner that uses Redis as a task queue"...
import logging from followthemoney import model from servicelayer.worker import Worker from servicelayer.jobs import JobStage as Stage from ingestors.manager import Manager log = logging.getLogger(__name__) class IngestWorker(Worker): """A long running task runner that uses Redis as a task queue""" def dis...
import logging from followthemoney import model from servicelayer.worker import Worker from servicelayer.jobs import JobStage as Stage from ingestors.manager import Manager log = logging.getLogger(__name__) class IngestWorker(Worker): """A long running task runner that uses Redis as a task queue""" def dis...
<commit_before>import logging from followthemoney import model from servicelayer.worker import Worker from servicelayer.jobs import JobStage as Stage from ingestors.manager import Manager log = logging.getLogger(__name__) class IngestWorker(Worker): """A long running task runner that uses Redis as a task queue"...
89b463c5ce29e89bfcf444de9a8d73bc1ad78fc8
omop_harvest/migrations/0003_avocado_metadata_migration.py
omop_harvest/migrations/0003_avocado_metadata_migration.py
# -*- coding: utf-8 -*- from south.v2 import DataMigration class Migration(DataMigration): def forwards(self, orm): "Perform a 'safe' load using Avocado's backup utilities." from avocado.core import backup backup.safe_load(u'0001_avocado_metadata', backup_path=None, using='defa...
# -*- coding: utf-8 -*- from south.v2 import DataMigration class Migration(DataMigration): depends_on = ( ("avocado", "0031_auto__add_field_dataquery_tree__add_field_datacontext_tree"), ) def forwards(self, orm): "Perform a 'safe' load using Avocado's backup utilities." from avocad...
Add avocado dependency to metadata migration.
Add avocado dependency to metadata migration. Signed-off-by: Aaron Browne <a437ff1f67cf5e38cd2f6119addad5bba3897ae0@gmail.com>
Python
bsd-2-clause
chop-dbhi/omop_harvest,chop-dbhi/omop_harvest,chop-dbhi/omop_harvest
# -*- coding: utf-8 -*- from south.v2 import DataMigration class Migration(DataMigration): def forwards(self, orm): "Perform a 'safe' load using Avocado's backup utilities." from avocado.core import backup backup.safe_load(u'0001_avocado_metadata', backup_path=None, using='defa...
# -*- coding: utf-8 -*- from south.v2 import DataMigration class Migration(DataMigration): depends_on = ( ("avocado", "0031_auto__add_field_dataquery_tree__add_field_datacontext_tree"), ) def forwards(self, orm): "Perform a 'safe' load using Avocado's backup utilities." from avocad...
<commit_before># -*- coding: utf-8 -*- from south.v2 import DataMigration class Migration(DataMigration): def forwards(self, orm): "Perform a 'safe' load using Avocado's backup utilities." from avocado.core import backup backup.safe_load(u'0001_avocado_metadata', backup_path=None, ...
# -*- coding: utf-8 -*- from south.v2 import DataMigration class Migration(DataMigration): depends_on = ( ("avocado", "0031_auto__add_field_dataquery_tree__add_field_datacontext_tree"), ) def forwards(self, orm): "Perform a 'safe' load using Avocado's backup utilities." from avocad...
# -*- coding: utf-8 -*- from south.v2 import DataMigration class Migration(DataMigration): def forwards(self, orm): "Perform a 'safe' load using Avocado's backup utilities." from avocado.core import backup backup.safe_load(u'0001_avocado_metadata', backup_path=None, using='defa...
<commit_before># -*- coding: utf-8 -*- from south.v2 import DataMigration class Migration(DataMigration): def forwards(self, orm): "Perform a 'safe' load using Avocado's backup utilities." from avocado.core import backup backup.safe_load(u'0001_avocado_metadata', backup_path=None, ...