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
e53d324f2ac4874c1f56bbf00dfee47c6b059e5d
fluidreview/admin.py
fluidreview/admin.py
"""Admin interface for fluidreview""" from django.contrib import admin from bootcamp.utils import get_field_names from fluidreview.models import WebhookRequest, OAuthToken class WebhookRequestAdmin(admin.ModelAdmin): """Admin for WebhookRequest""" model = WebhookRequest readonly_fields = get_field_names(...
"""Admin interface for fluidreview""" from django.contrib import admin from bootcamp.utils import get_field_names from fluidreview.models import WebhookRequest, OAuthToken class WebhookRequestAdmin(admin.ModelAdmin): """Admin for WebhookRequest""" model = WebhookRequest readonly_fields = get_field_names(...
Sort webhook requests by date
Sort webhook requests by date
Python
bsd-3-clause
mitodl/bootcamp-ecommerce,mitodl/bootcamp-ecommerce,mitodl/bootcamp-ecommerce,mitodl/bootcamp-ecommerce
"""Admin interface for fluidreview""" from django.contrib import admin from bootcamp.utils import get_field_names from fluidreview.models import WebhookRequest, OAuthToken class WebhookRequestAdmin(admin.ModelAdmin): """Admin for WebhookRequest""" model = WebhookRequest readonly_fields = get_field_names(...
"""Admin interface for fluidreview""" from django.contrib import admin from bootcamp.utils import get_field_names from fluidreview.models import WebhookRequest, OAuthToken class WebhookRequestAdmin(admin.ModelAdmin): """Admin for WebhookRequest""" model = WebhookRequest readonly_fields = get_field_names(...
<commit_before>"""Admin interface for fluidreview""" from django.contrib import admin from bootcamp.utils import get_field_names from fluidreview.models import WebhookRequest, OAuthToken class WebhookRequestAdmin(admin.ModelAdmin): """Admin for WebhookRequest""" model = WebhookRequest readonly_fields = g...
"""Admin interface for fluidreview""" from django.contrib import admin from bootcamp.utils import get_field_names from fluidreview.models import WebhookRequest, OAuthToken class WebhookRequestAdmin(admin.ModelAdmin): """Admin for WebhookRequest""" model = WebhookRequest readonly_fields = get_field_names(...
"""Admin interface for fluidreview""" from django.contrib import admin from bootcamp.utils import get_field_names from fluidreview.models import WebhookRequest, OAuthToken class WebhookRequestAdmin(admin.ModelAdmin): """Admin for WebhookRequest""" model = WebhookRequest readonly_fields = get_field_names(...
<commit_before>"""Admin interface for fluidreview""" from django.contrib import admin from bootcamp.utils import get_field_names from fluidreview.models import WebhookRequest, OAuthToken class WebhookRequestAdmin(admin.ModelAdmin): """Admin for WebhookRequest""" model = WebhookRequest readonly_fields = g...
fd6e6f07c1119142456c607c7bc10528c9214cc2
bluebottle/settings/production.py
bluebottle/settings/production.py
try: from .secrets import * except ImportError: import sys sys.exit('secrets.py settings file not found. Please run `prepare.sh` to create one.') from .base import * # # Put production server environment specific overrides below. # DEBUG = False TEMPLATE_DEBUG = DEBUG INSTALLED_APPS += ( 'gunicorn',...
try: from .secrets import * except ImportError: import sys sys.exit('secrets.py settings file not found. Please run `prepare.sh` to create one.') from .base import * # # Put production server environment specific overrides below. # DEBUG = False TEMPLATE_DEBUG = DEBUG INSTALLED_APPS += ( 'gunicorn',...
Adjust cowry return url now that we're up and running.
Adjust cowry return url now that we're up and running.
Python
bsd-3-clause
onepercentclub/onepercentclub-site,onepercentclub/onepercentclub-site,onepercentclub/onepercentclub-site,onepercentclub/onepercentclub-site,onepercentclub/onepercentclub-site
try: from .secrets import * except ImportError: import sys sys.exit('secrets.py settings file not found. Please run `prepare.sh` to create one.') from .base import * # # Put production server environment specific overrides below. # DEBUG = False TEMPLATE_DEBUG = DEBUG INSTALLED_APPS += ( 'gunicorn',...
try: from .secrets import * except ImportError: import sys sys.exit('secrets.py settings file not found. Please run `prepare.sh` to create one.') from .base import * # # Put production server environment specific overrides below. # DEBUG = False TEMPLATE_DEBUG = DEBUG INSTALLED_APPS += ( 'gunicorn',...
<commit_before>try: from .secrets import * except ImportError: import sys sys.exit('secrets.py settings file not found. Please run `prepare.sh` to create one.') from .base import * # # Put production server environment specific overrides below. # DEBUG = False TEMPLATE_DEBUG = DEBUG INSTALLED_APPS += ( ...
try: from .secrets import * except ImportError: import sys sys.exit('secrets.py settings file not found. Please run `prepare.sh` to create one.') from .base import * # # Put production server environment specific overrides below. # DEBUG = False TEMPLATE_DEBUG = DEBUG INSTALLED_APPS += ( 'gunicorn',...
try: from .secrets import * except ImportError: import sys sys.exit('secrets.py settings file not found. Please run `prepare.sh` to create one.') from .base import * # # Put production server environment specific overrides below. # DEBUG = False TEMPLATE_DEBUG = DEBUG INSTALLED_APPS += ( 'gunicorn',...
<commit_before>try: from .secrets import * except ImportError: import sys sys.exit('secrets.py settings file not found. Please run `prepare.sh` to create one.') from .base import * # # Put production server environment specific overrides below. # DEBUG = False TEMPLATE_DEBUG = DEBUG INSTALLED_APPS += ( ...
678ddb9813edbc8a0013e8cf9ae5ff17cf3c72f7
test/test_grid.py
test/test_grid.py
import pytest import torch from torch import Tensor import syft as sy def test_virtual_grid(workers): """This tests our ability to simplify tuple types. This test is pretty simple since tuples just serialize to themselves, with a tuple wrapper with the correct ID (1) for tuples so that the detailer k...
import pytest import torch from torch import Tensor import syft as sy def test_virtual_grid(workers): """This tests our ability to simplify tuple types. This test is pretty simple since tuples just serialize to themselves, with a tuple wrapper with the correct ID (1) for tuples so that the detailer k...
Fix test on grid search
Fix test on grid search
Python
apache-2.0
OpenMined/PySyft,OpenMined/PySyft,OpenMined/PySyft,OpenMined/PySyft
import pytest import torch from torch import Tensor import syft as sy def test_virtual_grid(workers): """This tests our ability to simplify tuple types. This test is pretty simple since tuples just serialize to themselves, with a tuple wrapper with the correct ID (1) for tuples so that the detailer k...
import pytest import torch from torch import Tensor import syft as sy def test_virtual_grid(workers): """This tests our ability to simplify tuple types. This test is pretty simple since tuples just serialize to themselves, with a tuple wrapper with the correct ID (1) for tuples so that the detailer k...
<commit_before>import pytest import torch from torch import Tensor import syft as sy def test_virtual_grid(workers): """This tests our ability to simplify tuple types. This test is pretty simple since tuples just serialize to themselves, with a tuple wrapper with the correct ID (1) for tuples so that...
import pytest import torch from torch import Tensor import syft as sy def test_virtual_grid(workers): """This tests our ability to simplify tuple types. This test is pretty simple since tuples just serialize to themselves, with a tuple wrapper with the correct ID (1) for tuples so that the detailer k...
import pytest import torch from torch import Tensor import syft as sy def test_virtual_grid(workers): """This tests our ability to simplify tuple types. This test is pretty simple since tuples just serialize to themselves, with a tuple wrapper with the correct ID (1) for tuples so that the detailer k...
<commit_before>import pytest import torch from torch import Tensor import syft as sy def test_virtual_grid(workers): """This tests our ability to simplify tuple types. This test is pretty simple since tuples just serialize to themselves, with a tuple wrapper with the correct ID (1) for tuples so that...
49cd32a7d1b3f70da19ed6f90d930646914d9756
testTwitterAPI.py
testTwitterAPI.py
''' Created on Apr 25, 2015 @author: Sherry ''' from json import dumps from twitterDataAcquisition import TwitterDataAcquisition def main(): twitterData = TwitterDataAcquisition() #jsonFile = ("twitter_data.json", "w") #jsonFile.write(str(twitterData)) #jsonFile.close() print dumps...
''' Created on Apr 25, 2015 @author: Sherry ''' from json import dumps from twitterDataAcquisition import TwitterDataAcquisition from twitterScreenScrape import TwitterScreenScrape def main(): appsList = ["Messenger", "Criminal Case", "Facebook", "Pandora Radio", "Instagram", "Snapchat", "Dubsmash"...
Include call for screen scraping
Include call for screen scraping
Python
apache-2.0
WenTr/TrendingApps
''' Created on Apr 25, 2015 @author: Sherry ''' from json import dumps from twitterDataAcquisition import TwitterDataAcquisition def main(): twitterData = TwitterDataAcquisition() #jsonFile = ("twitter_data.json", "w") #jsonFile.write(str(twitterData)) #jsonFile.close() print dumps...
''' Created on Apr 25, 2015 @author: Sherry ''' from json import dumps from twitterDataAcquisition import TwitterDataAcquisition from twitterScreenScrape import TwitterScreenScrape def main(): appsList = ["Messenger", "Criminal Case", "Facebook", "Pandora Radio", "Instagram", "Snapchat", "Dubsmash"...
<commit_before>''' Created on Apr 25, 2015 @author: Sherry ''' from json import dumps from twitterDataAcquisition import TwitterDataAcquisition def main(): twitterData = TwitterDataAcquisition() #jsonFile = ("twitter_data.json", "w") #jsonFile.write(str(twitterData)) #jsonFile.close() ...
''' Created on Apr 25, 2015 @author: Sherry ''' from json import dumps from twitterDataAcquisition import TwitterDataAcquisition from twitterScreenScrape import TwitterScreenScrape def main(): appsList = ["Messenger", "Criminal Case", "Facebook", "Pandora Radio", "Instagram", "Snapchat", "Dubsmash"...
''' Created on Apr 25, 2015 @author: Sherry ''' from json import dumps from twitterDataAcquisition import TwitterDataAcquisition def main(): twitterData = TwitterDataAcquisition() #jsonFile = ("twitter_data.json", "w") #jsonFile.write(str(twitterData)) #jsonFile.close() print dumps...
<commit_before>''' Created on Apr 25, 2015 @author: Sherry ''' from json import dumps from twitterDataAcquisition import TwitterDataAcquisition def main(): twitterData = TwitterDataAcquisition() #jsonFile = ("twitter_data.json", "w") #jsonFile.write(str(twitterData)) #jsonFile.close() ...
3e56590159d5685c668e6d6dfcea3164e82f87f5
cob/cli/testserver_cli.py
cob/cli/testserver_cli.py
import click import logbook from ..app import build_app from ..bootstrapping import ensure_project_bootstrapped _logger = logbook.Logger(__name__) @click.command() @click.option('-p', '--port', type=int, default=5000) @click.option('--debug/--no-debug', is_flag=True, default=True) def testserver(port, debug): e...
import click import logbook from ..app import build_app from ..bootstrapping import ensure_project_bootstrapped _logger = logbook.Logger(__name__) @click.command() @click.option('-p', '--port', type=int, default=5000) @click.option('--debug/--no-debug', is_flag=True, default=True) def testserver(port, debug): e...
Add debug log output to `cob testserver`
Add debug log output to `cob testserver`
Python
bsd-3-clause
getweber/weber-cli
import click import logbook from ..app import build_app from ..bootstrapping import ensure_project_bootstrapped _logger = logbook.Logger(__name__) @click.command() @click.option('-p', '--port', type=int, default=5000) @click.option('--debug/--no-debug', is_flag=True, default=True) def testserver(port, debug): e...
import click import logbook from ..app import build_app from ..bootstrapping import ensure_project_bootstrapped _logger = logbook.Logger(__name__) @click.command() @click.option('-p', '--port', type=int, default=5000) @click.option('--debug/--no-debug', is_flag=True, default=True) def testserver(port, debug): e...
<commit_before>import click import logbook from ..app import build_app from ..bootstrapping import ensure_project_bootstrapped _logger = logbook.Logger(__name__) @click.command() @click.option('-p', '--port', type=int, default=5000) @click.option('--debug/--no-debug', is_flag=True, default=True) def testserver(port...
import click import logbook from ..app import build_app from ..bootstrapping import ensure_project_bootstrapped _logger = logbook.Logger(__name__) @click.command() @click.option('-p', '--port', type=int, default=5000) @click.option('--debug/--no-debug', is_flag=True, default=True) def testserver(port, debug): e...
import click import logbook from ..app import build_app from ..bootstrapping import ensure_project_bootstrapped _logger = logbook.Logger(__name__) @click.command() @click.option('-p', '--port', type=int, default=5000) @click.option('--debug/--no-debug', is_flag=True, default=True) def testserver(port, debug): e...
<commit_before>import click import logbook from ..app import build_app from ..bootstrapping import ensure_project_bootstrapped _logger = logbook.Logger(__name__) @click.command() @click.option('-p', '--port', type=int, default=5000) @click.option('--debug/--no-debug', is_flag=True, default=True) def testserver(port...
dd64801ffa4949f0458eec2721a333a480a8fc3c
app/runserver.py
app/runserver.py
from flask_script import Manager from config.config import app manager = Manager(app) @manager.command def run_local(): app.run(debug=True) @manager.command def run_test(): # To-Do pass @manager.command def run_production(): # TO-DO pass if __name__ == '__main__': manager.run()
from flask_script import Manager from config.config import app manager = Manager(app) # Deploy for development @manager.command def run_dev(): app.run(debug=True) # Deploy for intergation tests @manager.command def run_test(): # To-Do pass # Deploy for production @manager.command def run_production(): ...
Change naming schema for deploy
Change naming schema for deploy
Python
mit
tforrest/soda-automation,tforrest/soda-automation
from flask_script import Manager from config.config import app manager = Manager(app) @manager.command def run_local(): app.run(debug=True) @manager.command def run_test(): # To-Do pass @manager.command def run_production(): # TO-DO pass if __name__ == '__main__': manager.run() Chan...
from flask_script import Manager from config.config import app manager = Manager(app) # Deploy for development @manager.command def run_dev(): app.run(debug=True) # Deploy for intergation tests @manager.command def run_test(): # To-Do pass # Deploy for production @manager.command def run_production(): ...
<commit_before>from flask_script import Manager from config.config import app manager = Manager(app) @manager.command def run_local(): app.run(debug=True) @manager.command def run_test(): # To-Do pass @manager.command def run_production(): # TO-DO pass if __name__ == '__main__': manager...
from flask_script import Manager from config.config import app manager = Manager(app) # Deploy for development @manager.command def run_dev(): app.run(debug=True) # Deploy for intergation tests @manager.command def run_test(): # To-Do pass # Deploy for production @manager.command def run_production(): ...
from flask_script import Manager from config.config import app manager = Manager(app) @manager.command def run_local(): app.run(debug=True) @manager.command def run_test(): # To-Do pass @manager.command def run_production(): # TO-DO pass if __name__ == '__main__': manager.run() Chan...
<commit_before>from flask_script import Manager from config.config import app manager = Manager(app) @manager.command def run_local(): app.run(debug=True) @manager.command def run_test(): # To-Do pass @manager.command def run_production(): # TO-DO pass if __name__ == '__main__': manager...
2b477a2f4cbbcb1ac25c48ace0597d3d5713cafd
tastytaps/urls.py
tastytaps/urls.py
from django.conf.urls import include, url from django.contrib import admin from .views import HomePageView urlpatterns = [ url(r'^$', HomePageView.as_view(), name='home'), url(r'^admin/', include(admin.site.urls)), ]
from django.conf.urls import url from .views import HomePageView urlpatterns = [ url(r'^$', HomePageView.as_view(), name='home'), ]
Drop the admin for srs this time
Drop the admin for srs this time
Python
bsd-3-clause
tastybrew/tastytaps,tastybrew/tastytaps
from django.conf.urls import include, url from django.contrib import admin from .views import HomePageView urlpatterns = [ url(r'^$', HomePageView.as_view(), name='home'), url(r'^admin/', include(admin.site.urls)), ] Drop the admin for srs this time
from django.conf.urls import url from .views import HomePageView urlpatterns = [ url(r'^$', HomePageView.as_view(), name='home'), ]
<commit_before>from django.conf.urls import include, url from django.contrib import admin from .views import HomePageView urlpatterns = [ url(r'^$', HomePageView.as_view(), name='home'), url(r'^admin/', include(admin.site.urls)), ] <commit_msg>Drop the admin for srs this time<commit_after>
from django.conf.urls import url from .views import HomePageView urlpatterns = [ url(r'^$', HomePageView.as_view(), name='home'), ]
from django.conf.urls import include, url from django.contrib import admin from .views import HomePageView urlpatterns = [ url(r'^$', HomePageView.as_view(), name='home'), url(r'^admin/', include(admin.site.urls)), ] Drop the admin for srs this timefrom django.conf.urls import url from .views import HomePag...
<commit_before>from django.conf.urls import include, url from django.contrib import admin from .views import HomePageView urlpatterns = [ url(r'^$', HomePageView.as_view(), name='home'), url(r'^admin/', include(admin.site.urls)), ] <commit_msg>Drop the admin for srs this time<commit_after>from django.conf.ur...
8b321c2aa37d57cc3cfc092ab2d887ce685284b6
junction/conferences/serializers.py
junction/conferences/serializers.py
from rest_framework import serializers from .models import Conference, ConferenceVenue, Room class ConferenceSerializer(serializers.HyperlinkedModelSerializer): status = serializers.CharField(source='get_status_display') class Meta: model = Conference fields = ('id', 'name', 'slug', 'descrip...
from rest_framework import serializers from .models import Conference, ConferenceVenue, Room class ConferenceSerializer(serializers.HyperlinkedModelSerializer): status = serializers.CharField(source='get_status_display') class Meta: model = Conference fields = ('id', 'name', 'slug', 'descrip...
Add id in the room, venue endpoint
Add id in the room, venue endpoint
Python
mit
praba230890/junction,nava45/junction,ChillarAnand/junction,farhaanbukhsh/junction,praba230890/junction,praba230890/junction,ChillarAnand/junction,farhaanbukhsh/junction,farhaanbukhsh/junction,pythonindia/junction,ChillarAnand/junction,nava45/junction,ChillarAnand/junction,praba230890/junction,pythonindia/junction,pytho...
from rest_framework import serializers from .models import Conference, ConferenceVenue, Room class ConferenceSerializer(serializers.HyperlinkedModelSerializer): status = serializers.CharField(source='get_status_display') class Meta: model = Conference fields = ('id', 'name', 'slug', 'descrip...
from rest_framework import serializers from .models import Conference, ConferenceVenue, Room class ConferenceSerializer(serializers.HyperlinkedModelSerializer): status = serializers.CharField(source='get_status_display') class Meta: model = Conference fields = ('id', 'name', 'slug', 'descrip...
<commit_before>from rest_framework import serializers from .models import Conference, ConferenceVenue, Room class ConferenceSerializer(serializers.HyperlinkedModelSerializer): status = serializers.CharField(source='get_status_display') class Meta: model = Conference fields = ('id', 'name', '...
from rest_framework import serializers from .models import Conference, ConferenceVenue, Room class ConferenceSerializer(serializers.HyperlinkedModelSerializer): status = serializers.CharField(source='get_status_display') class Meta: model = Conference fields = ('id', 'name', 'slug', 'descrip...
from rest_framework import serializers from .models import Conference, ConferenceVenue, Room class ConferenceSerializer(serializers.HyperlinkedModelSerializer): status = serializers.CharField(source='get_status_display') class Meta: model = Conference fields = ('id', 'name', 'slug', 'descrip...
<commit_before>from rest_framework import serializers from .models import Conference, ConferenceVenue, Room class ConferenceSerializer(serializers.HyperlinkedModelSerializer): status = serializers.CharField(source='get_status_display') class Meta: model = Conference fields = ('id', 'name', '...
1a88833845776d7592bbdef33571cd2da836cb91
ookoobah/tools.py
ookoobah/tools.py
class BaseTool (object): draw_locks = False def update_cursor(self, mouse): mouse.set_cursor(None) class DrawTool (BaseTool): def __init__(self, block_class): self.block_class = block_class def apply(self, pos, game, editor): old = game.grid.get(pos) if old.__class__ ==...
class BaseTool (object): draw_locks = False def update_cursor(self, mouse): mouse.set_cursor(None) class DrawTool (BaseTool): def __init__(self, block_class): self.block_class = block_class def apply(self, pos, game, editor): old = game.grid.get(pos) if old.__class__ ==...
Return update flag from erase tool.
Return update flag from erase tool. Fixes a bug introduced a couple commits earlier.
Python
mit
vickenty/ookoobah,vickenty/ookoobah,vickenty/ookoobah,vickenty/ookoobah,vickenty/ookoobah
class BaseTool (object): draw_locks = False def update_cursor(self, mouse): mouse.set_cursor(None) class DrawTool (BaseTool): def __init__(self, block_class): self.block_class = block_class def apply(self, pos, game, editor): old = game.grid.get(pos) if old.__class__ ==...
class BaseTool (object): draw_locks = False def update_cursor(self, mouse): mouse.set_cursor(None) class DrawTool (BaseTool): def __init__(self, block_class): self.block_class = block_class def apply(self, pos, game, editor): old = game.grid.get(pos) if old.__class__ ==...
<commit_before>class BaseTool (object): draw_locks = False def update_cursor(self, mouse): mouse.set_cursor(None) class DrawTool (BaseTool): def __init__(self, block_class): self.block_class = block_class def apply(self, pos, game, editor): old = game.grid.get(pos) if o...
class BaseTool (object): draw_locks = False def update_cursor(self, mouse): mouse.set_cursor(None) class DrawTool (BaseTool): def __init__(self, block_class): self.block_class = block_class def apply(self, pos, game, editor): old = game.grid.get(pos) if old.__class__ ==...
class BaseTool (object): draw_locks = False def update_cursor(self, mouse): mouse.set_cursor(None) class DrawTool (BaseTool): def __init__(self, block_class): self.block_class = block_class def apply(self, pos, game, editor): old = game.grid.get(pos) if old.__class__ ==...
<commit_before>class BaseTool (object): draw_locks = False def update_cursor(self, mouse): mouse.set_cursor(None) class DrawTool (BaseTool): def __init__(self, block_class): self.block_class = block_class def apply(self, pos, game, editor): old = game.grid.get(pos) if o...
2190e8dbdda5ed926fe9ab1875c0ad0d9bab690b
webparticipation/apps/send_token/tasks.py
webparticipation/apps/send_token/tasks.py
from celery import task from django.core.mail import EmailMessage from webparticipation.apps.ureporter.models import delete_user_from_rapidpro as delete_from @task() def send_verification_token(ureporter): if ureporter.token: subject = 'Hello' body = 'Welcome to ureport. To complete the registrati...
from celery import task from django.core.mail import EmailMessage from webparticipation.apps.ureporter.models import delete_user_from_rapidpro as delete_from @task() def send_verification_token(ureporter): if ureporter.token: subject = 'U-Report Registration' body = 'Thank you for registering with...
Change subject and content of registration email.
Change subject and content of registration email.
Python
agpl-3.0
rapidpro/ureport-web-participation,rapidpro/ureport-web-participation,rapidpro/ureport-web-participation
from celery import task from django.core.mail import EmailMessage from webparticipation.apps.ureporter.models import delete_user_from_rapidpro as delete_from @task() def send_verification_token(ureporter): if ureporter.token: subject = 'Hello' body = 'Welcome to ureport. To complete the registrati...
from celery import task from django.core.mail import EmailMessage from webparticipation.apps.ureporter.models import delete_user_from_rapidpro as delete_from @task() def send_verification_token(ureporter): if ureporter.token: subject = 'U-Report Registration' body = 'Thank you for registering with...
<commit_before>from celery import task from django.core.mail import EmailMessage from webparticipation.apps.ureporter.models import delete_user_from_rapidpro as delete_from @task() def send_verification_token(ureporter): if ureporter.token: subject = 'Hello' body = 'Welcome to ureport. To complete...
from celery import task from django.core.mail import EmailMessage from webparticipation.apps.ureporter.models import delete_user_from_rapidpro as delete_from @task() def send_verification_token(ureporter): if ureporter.token: subject = 'U-Report Registration' body = 'Thank you for registering with...
from celery import task from django.core.mail import EmailMessage from webparticipation.apps.ureporter.models import delete_user_from_rapidpro as delete_from @task() def send_verification_token(ureporter): if ureporter.token: subject = 'Hello' body = 'Welcome to ureport. To complete the registrati...
<commit_before>from celery import task from django.core.mail import EmailMessage from webparticipation.apps.ureporter.models import delete_user_from_rapidpro as delete_from @task() def send_verification_token(ureporter): if ureporter.token: subject = 'Hello' body = 'Welcome to ureport. To complete...
954030c1c7e048e00bda0fe129434b2e9391befd
utensils/views.py
utensils/views.py
# encoding: utf-8 from django.views.generic import ListView from .viewmixins import OrderByMixin, PaginateMixin, SearchFormMixin class BaseListView(PaginateMixin, OrderByMixin, SearchFormMixin, ListView): """ Defines a base list view that supports pagination, ordering and basic search. Supports a fi...
# encoding: utf-8 from django.views.generic import ListView from .viewmixins import OrderByMixin, PaginateMixin, SearchFormMixin class BaseListView(PaginateMixin, OrderByMixin, SearchFormMixin, ListView): """ Defines a base list view that supports pagination, ordering and basic search. Supports a fi...
Correct model reference in comments.
Correct model reference in comments.
Python
mit
code-kitchen/django-utensils,code-kitchen/django-utensils,code-kitchen/django-utensils
# encoding: utf-8 from django.views.generic import ListView from .viewmixins import OrderByMixin, PaginateMixin, SearchFormMixin class BaseListView(PaginateMixin, OrderByMixin, SearchFormMixin, ListView): """ Defines a base list view that supports pagination, ordering and basic search. Supports a fi...
# encoding: utf-8 from django.views.generic import ListView from .viewmixins import OrderByMixin, PaginateMixin, SearchFormMixin class BaseListView(PaginateMixin, OrderByMixin, SearchFormMixin, ListView): """ Defines a base list view that supports pagination, ordering and basic search. Supports a fi...
<commit_before># encoding: utf-8 from django.views.generic import ListView from .viewmixins import OrderByMixin, PaginateMixin, SearchFormMixin class BaseListView(PaginateMixin, OrderByMixin, SearchFormMixin, ListView): """ Defines a base list view that supports pagination, ordering and basic search. ...
# encoding: utf-8 from django.views.generic import ListView from .viewmixins import OrderByMixin, PaginateMixin, SearchFormMixin class BaseListView(PaginateMixin, OrderByMixin, SearchFormMixin, ListView): """ Defines a base list view that supports pagination, ordering and basic search. Supports a fi...
# encoding: utf-8 from django.views.generic import ListView from .viewmixins import OrderByMixin, PaginateMixin, SearchFormMixin class BaseListView(PaginateMixin, OrderByMixin, SearchFormMixin, ListView): """ Defines a base list view that supports pagination, ordering and basic search. Supports a fi...
<commit_before># encoding: utf-8 from django.views.generic import ListView from .viewmixins import OrderByMixin, PaginateMixin, SearchFormMixin class BaseListView(PaginateMixin, OrderByMixin, SearchFormMixin, ListView): """ Defines a base list view that supports pagination, ordering and basic search. ...
31f39a8bef65a3ea47c8f2c080b4f0ec769dbfb1
util/meta_line.py
util/meta_line.py
from colors import Colors from line import Line import re prefixes = [ ("Start", "", Colors.GREEN_FG), ("Pass", "", Colors.GREEN_FG), ("Debug", "", Colors.BLUE_FG), ("Error", "", Colors.RED_FG), ("Fail", "", Colors.RED_FG), ("Duration", "s;", Colo...
from colors import Colors from line import Line import re prefixes = [ ("Start", "", Colors.MAGENTA_FG), ("Pass", "", Colors.GREEN_FG), ("Fail", "", Colors.RED_FG), ("Debug", "", Colors.BLUE_FG), ("Error", "", Colors.RED_FG), ("Default", "", Color...
Add support for more instrument output types
Add support for more instrument output types
Python
mit
JBarberU/strawberry_py
from colors import Colors from line import Line import re prefixes = [ ("Start", "", Colors.GREEN_FG), ("Pass", "", Colors.GREEN_FG), ("Debug", "", Colors.BLUE_FG), ("Error", "", Colors.RED_FG), ("Fail", "", Colors.RED_FG), ("Duration", "s;", Colo...
from colors import Colors from line import Line import re prefixes = [ ("Start", "", Colors.MAGENTA_FG), ("Pass", "", Colors.GREEN_FG), ("Fail", "", Colors.RED_FG), ("Debug", "", Colors.BLUE_FG), ("Error", "", Colors.RED_FG), ("Default", "", Color...
<commit_before>from colors import Colors from line import Line import re prefixes = [ ("Start", "", Colors.GREEN_FG), ("Pass", "", Colors.GREEN_FG), ("Debug", "", Colors.BLUE_FG), ("Error", "", Colors.RED_FG), ("Fail", "", Colors.RED_FG), ("Durati...
from colors import Colors from line import Line import re prefixes = [ ("Start", "", Colors.MAGENTA_FG), ("Pass", "", Colors.GREEN_FG), ("Fail", "", Colors.RED_FG), ("Debug", "", Colors.BLUE_FG), ("Error", "", Colors.RED_FG), ("Default", "", Color...
from colors import Colors from line import Line import re prefixes = [ ("Start", "", Colors.GREEN_FG), ("Pass", "", Colors.GREEN_FG), ("Debug", "", Colors.BLUE_FG), ("Error", "", Colors.RED_FG), ("Fail", "", Colors.RED_FG), ("Duration", "s;", Colo...
<commit_before>from colors import Colors from line import Line import re prefixes = [ ("Start", "", Colors.GREEN_FG), ("Pass", "", Colors.GREEN_FG), ("Debug", "", Colors.BLUE_FG), ("Error", "", Colors.RED_FG), ("Fail", "", Colors.RED_FG), ("Durati...
7a6cd5ebe2e2fc357bc4f58409ca177f36814859
glanceclient/common/exceptions.py
glanceclient/common/exceptions.py
# This is here for compatibility purposes. Once all known OpenStack clients # are updated to use glanceclient.exc, this file should be removed from glanceclient.exc import * # noqa
# 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 # distributed u...
Add Apache 2.0 license to source file
Add Apache 2.0 license to source file As per OpenStack licensing guide lines [1]: [H102 H103] Newly contributed Source Code should be licensed under the Apache 2.0 license. [H104] Files with no code shouldn't contain any license header nor comments, and must be left completely empty. [1] http://docs.openstack.org/dev...
Python
apache-2.0
openstack/python-glanceclient,openstack/python-glanceclient
# This is here for compatibility purposes. Once all known OpenStack clients # are updated to use glanceclient.exc, this file should be removed from glanceclient.exc import * # noqa Add Apache 2.0 license to source file As per OpenStack licensing guide lines [1]: [H102 H103] Newly contributed Source Code should be lic...
# 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 # distributed u...
<commit_before># This is here for compatibility purposes. Once all known OpenStack clients # are updated to use glanceclient.exc, this file should be removed from glanceclient.exc import * # noqa <commit_msg>Add Apache 2.0 license to source file As per OpenStack licensing guide lines [1]: [H102 H103] Newly contribute...
# 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 # distributed u...
# This is here for compatibility purposes. Once all known OpenStack clients # are updated to use glanceclient.exc, this file should be removed from glanceclient.exc import * # noqa Add Apache 2.0 license to source file As per OpenStack licensing guide lines [1]: [H102 H103] Newly contributed Source Code should be lic...
<commit_before># This is here for compatibility purposes. Once all known OpenStack clients # are updated to use glanceclient.exc, this file should be removed from glanceclient.exc import * # noqa <commit_msg>Add Apache 2.0 license to source file As per OpenStack licensing guide lines [1]: [H102 H103] Newly contribute...
853bfc4d010f6c80bef6878a356df73a60f09596
test_config.py
test_config.py
import tempfile import shutil import os from voltgrid import ConfigManager def test_config_manager(): c = ConfigManager('voltgrid.conf.example') c.write_envs() def test_config_is_empty(): with tempfile.NamedTemporaryFile() as tmp_f: c = ConfigManager(tmp_f.name) def test_config_not_exist(): ...
import tempfile import shutil import os from voltgrid import ConfigManager VG_CFG = 'voltgrid.conf.example' def test_config_manager(): c = ConfigManager(VG_CFG) c.write_envs() def test_config_is_empty(): with tempfile.NamedTemporaryFile() as tmp_f: c = ConfigManager(tmp_f.name) def test_conf...
Fix test loading wrong config
Fix test loading wrong config
Python
bsd-3-clause
voltgrid/voltgrid-pie
import tempfile import shutil import os from voltgrid import ConfigManager def test_config_manager(): c = ConfigManager('voltgrid.conf.example') c.write_envs() def test_config_is_empty(): with tempfile.NamedTemporaryFile() as tmp_f: c = ConfigManager(tmp_f.name) def test_config_not_exist(): ...
import tempfile import shutil import os from voltgrid import ConfigManager VG_CFG = 'voltgrid.conf.example' def test_config_manager(): c = ConfigManager(VG_CFG) c.write_envs() def test_config_is_empty(): with tempfile.NamedTemporaryFile() as tmp_f: c = ConfigManager(tmp_f.name) def test_conf...
<commit_before>import tempfile import shutil import os from voltgrid import ConfigManager def test_config_manager(): c = ConfigManager('voltgrid.conf.example') c.write_envs() def test_config_is_empty(): with tempfile.NamedTemporaryFile() as tmp_f: c = ConfigManager(tmp_f.name) def test_config...
import tempfile import shutil import os from voltgrid import ConfigManager VG_CFG = 'voltgrid.conf.example' def test_config_manager(): c = ConfigManager(VG_CFG) c.write_envs() def test_config_is_empty(): with tempfile.NamedTemporaryFile() as tmp_f: c = ConfigManager(tmp_f.name) def test_conf...
import tempfile import shutil import os from voltgrid import ConfigManager def test_config_manager(): c = ConfigManager('voltgrid.conf.example') c.write_envs() def test_config_is_empty(): with tempfile.NamedTemporaryFile() as tmp_f: c = ConfigManager(tmp_f.name) def test_config_not_exist(): ...
<commit_before>import tempfile import shutil import os from voltgrid import ConfigManager def test_config_manager(): c = ConfigManager('voltgrid.conf.example') c.write_envs() def test_config_is_empty(): with tempfile.NamedTemporaryFile() as tmp_f: c = ConfigManager(tmp_f.name) def test_config...
0d7db5b134aaed2721dff8f7be300878fffa0c44
genestack_client/__init__.py
genestack_client/__init__.py
# -*- coding: utf-8 -*- import sys if not ((2, 7, 5) <= sys.version_info < (3, 0)): sys.stderr.write( 'Python version "%s" is not supported. Required version 2.7.5+, Python 3 is not supported\n' % sys.version ) exit(1) from version import __version__ from genestack_exceptions import (GenestackAu...
# -*- coding: utf-8 -*- import sys if not ((2, 7, 5) <= sys.version_info < (3, 0)): sys.stderr.write( 'Python version "%s" is not supported. Required version 2.7.5+, Python 3 is not supported\n' % sys.version ) exit(1) from version import __version__ from genestack_exceptions import (GenestackAu...
Delete findMetainfoRelatedTerms method from Genestack Core findMetainfoRelatedTerms is deleted
[JBKB-996] Delete findMetainfoRelatedTerms method from Genestack Core findMetainfoRelatedTerms is deleted
Python
mit
genestack/python-client
# -*- coding: utf-8 -*- import sys if not ((2, 7, 5) <= sys.version_info < (3, 0)): sys.stderr.write( 'Python version "%s" is not supported. Required version 2.7.5+, Python 3 is not supported\n' % sys.version ) exit(1) from version import __version__ from genestack_exceptions import (GenestackAu...
# -*- coding: utf-8 -*- import sys if not ((2, 7, 5) <= sys.version_info < (3, 0)): sys.stderr.write( 'Python version "%s" is not supported. Required version 2.7.5+, Python 3 is not supported\n' % sys.version ) exit(1) from version import __version__ from genestack_exceptions import (GenestackAu...
<commit_before># -*- coding: utf-8 -*- import sys if not ((2, 7, 5) <= sys.version_info < (3, 0)): sys.stderr.write( 'Python version "%s" is not supported. Required version 2.7.5+, Python 3 is not supported\n' % sys.version ) exit(1) from version import __version__ from genestack_exceptions impo...
# -*- coding: utf-8 -*- import sys if not ((2, 7, 5) <= sys.version_info < (3, 0)): sys.stderr.write( 'Python version "%s" is not supported. Required version 2.7.5+, Python 3 is not supported\n' % sys.version ) exit(1) from version import __version__ from genestack_exceptions import (GenestackAu...
# -*- coding: utf-8 -*- import sys if not ((2, 7, 5) <= sys.version_info < (3, 0)): sys.stderr.write( 'Python version "%s" is not supported. Required version 2.7.5+, Python 3 is not supported\n' % sys.version ) exit(1) from version import __version__ from genestack_exceptions import (GenestackAu...
<commit_before># -*- coding: utf-8 -*- import sys if not ((2, 7, 5) <= sys.version_info < (3, 0)): sys.stderr.write( 'Python version "%s" is not supported. Required version 2.7.5+, Python 3 is not supported\n' % sys.version ) exit(1) from version import __version__ from genestack_exceptions impo...
ac5b065e948a923f71b5f3bc9e98bcb8791a46c9
git_code_debt/write_logic.py
git_code_debt/write_logic.py
from __future__ import absolute_import from __future__ import unicode_literals def insert_metric_ids(db, metric_ids): for metric_id in metric_ids: db.execute( "INSERT INTO metric_names ('name') VALUES (?)", [metric_id], ) def insert_metric_values(db, metric_values, metric_mapping, co...
from __future__ import absolute_import from __future__ import unicode_literals def insert_metric_ids(db, metric_ids): values = [[x] for x in metric_ids] db.executemany("INSERT INTO metric_names ('name') VALUES (?)", values) def insert_metric_values(db, metric_values, metric_mapping, commit): values = [ ...
Use executemany instead of execute in write logic
Use executemany instead of execute in write logic
Python
mit
Yelp/git-code-debt,Yelp/git-code-debt,Yelp/git-code-debt,Yelp/git-code-debt
from __future__ import absolute_import from __future__ import unicode_literals def insert_metric_ids(db, metric_ids): for metric_id in metric_ids: db.execute( "INSERT INTO metric_names ('name') VALUES (?)", [metric_id], ) def insert_metric_values(db, metric_values, metric_mapping, co...
from __future__ import absolute_import from __future__ import unicode_literals def insert_metric_ids(db, metric_ids): values = [[x] for x in metric_ids] db.executemany("INSERT INTO metric_names ('name') VALUES (?)", values) def insert_metric_values(db, metric_values, metric_mapping, commit): values = [ ...
<commit_before>from __future__ import absolute_import from __future__ import unicode_literals def insert_metric_ids(db, metric_ids): for metric_id in metric_ids: db.execute( "INSERT INTO metric_names ('name') VALUES (?)", [metric_id], ) def insert_metric_values(db, metric_values, met...
from __future__ import absolute_import from __future__ import unicode_literals def insert_metric_ids(db, metric_ids): values = [[x] for x in metric_ids] db.executemany("INSERT INTO metric_names ('name') VALUES (?)", values) def insert_metric_values(db, metric_values, metric_mapping, commit): values = [ ...
from __future__ import absolute_import from __future__ import unicode_literals def insert_metric_ids(db, metric_ids): for metric_id in metric_ids: db.execute( "INSERT INTO metric_names ('name') VALUES (?)", [metric_id], ) def insert_metric_values(db, metric_values, metric_mapping, co...
<commit_before>from __future__ import absolute_import from __future__ import unicode_literals def insert_metric_ids(db, metric_ids): for metric_id in metric_ids: db.execute( "INSERT INTO metric_names ('name') VALUES (?)", [metric_id], ) def insert_metric_values(db, metric_values, met...
9a746c3ea33057efaf01cb8b700d4ea5d38863bf
tests/regression_test.py
tests/regression_test.py
""" A regression test for computing three kinds of spectrogram. Just to ensure we didn't break anything. """ import numpy as np import os from tfr.files import load_wav from tfr.spectrogram_features import spectrogram_features DATA_DIR = os.path.join(os.path.dirname(os.path.abspath(__file__)), 'data') def test_spec...
""" A regression test for computing three kinds of spectrogram. Just to ensure we didn't break anything. """ import numpy as np import os from tfr.files import load_wav from tfr.spectrogram_features import spectrogram_features DATA_DIR = os.path.join(os.path.dirname(os.path.abspath(__file__)), 'data') def test_spec...
Print the error in the regression test.
Print the error in the regression test.
Python
mit
bzamecnik/tfr,bzamecnik/tfr
""" A regression test for computing three kinds of spectrogram. Just to ensure we didn't break anything. """ import numpy as np import os from tfr.files import load_wav from tfr.spectrogram_features import spectrogram_features DATA_DIR = os.path.join(os.path.dirname(os.path.abspath(__file__)), 'data') def test_spec...
""" A regression test for computing three kinds of spectrogram. Just to ensure we didn't break anything. """ import numpy as np import os from tfr.files import load_wav from tfr.spectrogram_features import spectrogram_features DATA_DIR = os.path.join(os.path.dirname(os.path.abspath(__file__)), 'data') def test_spec...
<commit_before>""" A regression test for computing three kinds of spectrogram. Just to ensure we didn't break anything. """ import numpy as np import os from tfr.files import load_wav from tfr.spectrogram_features import spectrogram_features DATA_DIR = os.path.join(os.path.dirname(os.path.abspath(__file__)), 'data')...
""" A regression test for computing three kinds of spectrogram. Just to ensure we didn't break anything. """ import numpy as np import os from tfr.files import load_wav from tfr.spectrogram_features import spectrogram_features DATA_DIR = os.path.join(os.path.dirname(os.path.abspath(__file__)), 'data') def test_spec...
""" A regression test for computing three kinds of spectrogram. Just to ensure we didn't break anything. """ import numpy as np import os from tfr.files import load_wav from tfr.spectrogram_features import spectrogram_features DATA_DIR = os.path.join(os.path.dirname(os.path.abspath(__file__)), 'data') def test_spec...
<commit_before>""" A regression test for computing three kinds of spectrogram. Just to ensure we didn't break anything. """ import numpy as np import os from tfr.files import load_wav from tfr.spectrogram_features import spectrogram_features DATA_DIR = os.path.join(os.path.dirname(os.path.abspath(__file__)), 'data')...
6f6199240009ac91da7e663030125df439d8fe7e
tests/test_trust_list.py
tests/test_trust_list.py
# coding: utf-8 from __future__ import unicode_literals, division, absolute_import, print_function import unittest import sys from oscrypto import trust_list from asn1crypto.x509 import Certificate if sys.version_info < (3,): byte_cls = str else: byte_cls = bytes class TrustListTests(unittest.TestCase): ...
# coding: utf-8 from __future__ import unicode_literals, division, absolute_import, print_function import unittest import sys from oscrypto import trust_list from asn1crypto.x509 import Certificate if sys.version_info < (3,): byte_cls = str else: byte_cls = bytes class TrustListTests(unittest.TestCase): ...
Add more sanity checks to the trust list test
Add more sanity checks to the trust list test
Python
mit
wbond/oscrypto
# coding: utf-8 from __future__ import unicode_literals, division, absolute_import, print_function import unittest import sys from oscrypto import trust_list from asn1crypto.x509 import Certificate if sys.version_info < (3,): byte_cls = str else: byte_cls = bytes class TrustListTests(unittest.TestCase): ...
# coding: utf-8 from __future__ import unicode_literals, division, absolute_import, print_function import unittest import sys from oscrypto import trust_list from asn1crypto.x509 import Certificate if sys.version_info < (3,): byte_cls = str else: byte_cls = bytes class TrustListTests(unittest.TestCase): ...
<commit_before># coding: utf-8 from __future__ import unicode_literals, division, absolute_import, print_function import unittest import sys from oscrypto import trust_list from asn1crypto.x509 import Certificate if sys.version_info < (3,): byte_cls = str else: byte_cls = bytes class TrustListTests(unitte...
# coding: utf-8 from __future__ import unicode_literals, division, absolute_import, print_function import unittest import sys from oscrypto import trust_list from asn1crypto.x509 import Certificate if sys.version_info < (3,): byte_cls = str else: byte_cls = bytes class TrustListTests(unittest.TestCase): ...
# coding: utf-8 from __future__ import unicode_literals, division, absolute_import, print_function import unittest import sys from oscrypto import trust_list from asn1crypto.x509 import Certificate if sys.version_info < (3,): byte_cls = str else: byte_cls = bytes class TrustListTests(unittest.TestCase): ...
<commit_before># coding: utf-8 from __future__ import unicode_literals, division, absolute_import, print_function import unittest import sys from oscrypto import trust_list from asn1crypto.x509 import Certificate if sys.version_info < (3,): byte_cls = str else: byte_cls = bytes class TrustListTests(unitte...
1aaa2034020297fe78c2a0e12b713b835e13a156
thumborizeme/settings.py
thumborizeme/settings.py
import os # REDIS REDIS_HOST = '127.0.0.1' REDIS_PORT = 6379 HOST = os.environ.get('HOST', 'http://localhost:9000') THUMBOR_HOST = os.environ.get('HOST', 'http://localhost:8001')
import os # REDIS REDIS_HOST = os.environ.get('REDIS_URL', '127.0.0.1') REDIS_PORT = os.environ.get('REDIS_PORT', 6379) HOST = os.environ.get('HOST', 'http://localhost:9000') THUMBOR_HOST = os.environ.get('HOST', 'http://localhost:8001')
Change redis url and redis port
Change redis url and redis port
Python
mit
heynemann/thumborizeme,heynemann/thumborizeme,heynemann/thumborizeme
import os # REDIS REDIS_HOST = '127.0.0.1' REDIS_PORT = 6379 HOST = os.environ.get('HOST', 'http://localhost:9000') THUMBOR_HOST = os.environ.get('HOST', 'http://localhost:8001') Change redis url and redis port
import os # REDIS REDIS_HOST = os.environ.get('REDIS_URL', '127.0.0.1') REDIS_PORT = os.environ.get('REDIS_PORT', 6379) HOST = os.environ.get('HOST', 'http://localhost:9000') THUMBOR_HOST = os.environ.get('HOST', 'http://localhost:8001')
<commit_before>import os # REDIS REDIS_HOST = '127.0.0.1' REDIS_PORT = 6379 HOST = os.environ.get('HOST', 'http://localhost:9000') THUMBOR_HOST = os.environ.get('HOST', 'http://localhost:8001') <commit_msg>Change redis url and redis port<commit_after>
import os # REDIS REDIS_HOST = os.environ.get('REDIS_URL', '127.0.0.1') REDIS_PORT = os.environ.get('REDIS_PORT', 6379) HOST = os.environ.get('HOST', 'http://localhost:9000') THUMBOR_HOST = os.environ.get('HOST', 'http://localhost:8001')
import os # REDIS REDIS_HOST = '127.0.0.1' REDIS_PORT = 6379 HOST = os.environ.get('HOST', 'http://localhost:9000') THUMBOR_HOST = os.environ.get('HOST', 'http://localhost:8001') Change redis url and redis portimport os # REDIS REDIS_HOST = os.environ.get('REDIS_URL', '127.0.0.1') REDIS_PORT = os.environ.get('REDIS_...
<commit_before>import os # REDIS REDIS_HOST = '127.0.0.1' REDIS_PORT = 6379 HOST = os.environ.get('HOST', 'http://localhost:9000') THUMBOR_HOST = os.environ.get('HOST', 'http://localhost:8001') <commit_msg>Change redis url and redis port<commit_after>import os # REDIS REDIS_HOST = os.environ.get('REDIS_URL', '127.0....
cd70e1150d3822a0f158e06c382ad8841760040e
mla_game/apps/transcript/management/commands/update_stats_for_all_eligible_transcripts.py
mla_game/apps/transcript/management/commands/update_stats_for_all_eligible_transcripts.py
from django.core.management.base import BaseCommand from django.db.models import Prefetch from mla_game.apps.transcript.tasks import update_transcript_stats from ...models import ( Transcript, TranscriptPhraseVote, TranscriptPhraseCorrection, ) class Command(BaseCommand): help = '''Find all Transcripts with...
from django.core.management.base import BaseCommand from django.db.models import Prefetch from mla_game.apps.transcript.tasks import update_transcript_stats from ...models import ( Transcript, TranscriptPhraseVote, TranscriptPhraseCorrection, ) class Command(BaseCommand): help = '''Find all Transcripts with...
Update management command for various changes
Update management command for various changes
Python
mit
WGBH/FixIt,WGBH/FixIt,WGBH/FixIt
from django.core.management.base import BaseCommand from django.db.models import Prefetch from mla_game.apps.transcript.tasks import update_transcript_stats from ...models import ( Transcript, TranscriptPhraseVote, TranscriptPhraseCorrection, ) class Command(BaseCommand): help = '''Find all Transcripts with...
from django.core.management.base import BaseCommand from django.db.models import Prefetch from mla_game.apps.transcript.tasks import update_transcript_stats from ...models import ( Transcript, TranscriptPhraseVote, TranscriptPhraseCorrection, ) class Command(BaseCommand): help = '''Find all Transcripts with...
<commit_before>from django.core.management.base import BaseCommand from django.db.models import Prefetch from mla_game.apps.transcript.tasks import update_transcript_stats from ...models import ( Transcript, TranscriptPhraseVote, TranscriptPhraseCorrection, ) class Command(BaseCommand): help = '''Find all T...
from django.core.management.base import BaseCommand from django.db.models import Prefetch from mla_game.apps.transcript.tasks import update_transcript_stats from ...models import ( Transcript, TranscriptPhraseVote, TranscriptPhraseCorrection, ) class Command(BaseCommand): help = '''Find all Transcripts with...
from django.core.management.base import BaseCommand from django.db.models import Prefetch from mla_game.apps.transcript.tasks import update_transcript_stats from ...models import ( Transcript, TranscriptPhraseVote, TranscriptPhraseCorrection, ) class Command(BaseCommand): help = '''Find all Transcripts with...
<commit_before>from django.core.management.base import BaseCommand from django.db.models import Prefetch from mla_game.apps.transcript.tasks import update_transcript_stats from ...models import ( Transcript, TranscriptPhraseVote, TranscriptPhraseCorrection, ) class Command(BaseCommand): help = '''Find all T...
850d5be6b5a53bafd0197e1454da2583abb6db77
test/test_pipeline/components/regression/test_random_forests.py
test/test_pipeline/components/regression/test_random_forests.py
import unittest from autosklearn.pipeline.components.regression.random_forest import RandomForest from autosklearn.pipeline.util import _test_regressor, _test_regressor_iterative_fit import sklearn.metrics class RandomForestComponentTest(unittest.TestCase): def test_default_configuration(self): for i in...
import unittest from autosklearn.pipeline.components.regression.random_forest import RandomForest from autosklearn.pipeline.util import _test_regressor, _test_regressor_iterative_fit import sklearn.metrics class RandomForestComponentTest(unittest.TestCase): def test_default_configuration(self): for i in...
ADD test to test iterative fit sparse
ADD test to test iterative fit sparse
Python
bsd-3-clause
automl/auto-sklearn,automl/auto-sklearn
import unittest from autosklearn.pipeline.components.regression.random_forest import RandomForest from autosklearn.pipeline.util import _test_regressor, _test_regressor_iterative_fit import sklearn.metrics class RandomForestComponentTest(unittest.TestCase): def test_default_configuration(self): for i in...
import unittest from autosklearn.pipeline.components.regression.random_forest import RandomForest from autosklearn.pipeline.util import _test_regressor, _test_regressor_iterative_fit import sklearn.metrics class RandomForestComponentTest(unittest.TestCase): def test_default_configuration(self): for i in...
<commit_before>import unittest from autosklearn.pipeline.components.regression.random_forest import RandomForest from autosklearn.pipeline.util import _test_regressor, _test_regressor_iterative_fit import sklearn.metrics class RandomForestComponentTest(unittest.TestCase): def test_default_configuration(self): ...
import unittest from autosklearn.pipeline.components.regression.random_forest import RandomForest from autosklearn.pipeline.util import _test_regressor, _test_regressor_iterative_fit import sklearn.metrics class RandomForestComponentTest(unittest.TestCase): def test_default_configuration(self): for i in...
import unittest from autosklearn.pipeline.components.regression.random_forest import RandomForest from autosklearn.pipeline.util import _test_regressor, _test_regressor_iterative_fit import sklearn.metrics class RandomForestComponentTest(unittest.TestCase): def test_default_configuration(self): for i in...
<commit_before>import unittest from autosklearn.pipeline.components.regression.random_forest import RandomForest from autosklearn.pipeline.util import _test_regressor, _test_regressor_iterative_fit import sklearn.metrics class RandomForestComponentTest(unittest.TestCase): def test_default_configuration(self): ...
c9abba3a9ca6ccf1a9bed5fad5cda12557b3266c
tests/chainer_tests/training_tests/extensions_tests/test_plot_report.py
tests/chainer_tests/training_tests/extensions_tests/test_plot_report.py
import unittest import warnings from chainer import testing from chainer.training import extensions class TestPlotReport(unittest.TestCase): def test_available(self): try: import matplotlib # NOQA available = True except ImportError: available = False ...
import unittest import warnings from chainer import testing from chainer.training import extensions class TestPlotReport(unittest.TestCase): def test_available(self): try: import matplotlib # NOQA available = True except ImportError: available = False ...
Use plot_report._available instead of available()
Use plot_report._available instead of available()
Python
mit
hvy/chainer,jnishi/chainer,niboshi/chainer,keisuke-umezawa/chainer,wkentaro/chainer,hvy/chainer,chainer/chainer,jnishi/chainer,niboshi/chainer,okuta/chainer,keisuke-umezawa/chainer,wkentaro/chainer,hvy/chainer,okuta/chainer,okuta/chainer,chainer/chainer,hvy/chainer,ktnyt/chainer,ktnyt/chainer,wkentaro/chainer,jnishi/ch...
import unittest import warnings from chainer import testing from chainer.training import extensions class TestPlotReport(unittest.TestCase): def test_available(self): try: import matplotlib # NOQA available = True except ImportError: available = False ...
import unittest import warnings from chainer import testing from chainer.training import extensions class TestPlotReport(unittest.TestCase): def test_available(self): try: import matplotlib # NOQA available = True except ImportError: available = False ...
<commit_before>import unittest import warnings from chainer import testing from chainer.training import extensions class TestPlotReport(unittest.TestCase): def test_available(self): try: import matplotlib # NOQA available = True except ImportError: available ...
import unittest import warnings from chainer import testing from chainer.training import extensions class TestPlotReport(unittest.TestCase): def test_available(self): try: import matplotlib # NOQA available = True except ImportError: available = False ...
import unittest import warnings from chainer import testing from chainer.training import extensions class TestPlotReport(unittest.TestCase): def test_available(self): try: import matplotlib # NOQA available = True except ImportError: available = False ...
<commit_before>import unittest import warnings from chainer import testing from chainer.training import extensions class TestPlotReport(unittest.TestCase): def test_available(self): try: import matplotlib # NOQA available = True except ImportError: available ...
ca8b4640a858936f1f1cfdbed8e5ef1e771fe310
jugfile.py
jugfile.py
def compfeats(url): print 'Feats called: ', url return url def nfold(imgs, feats): print 'nfold called: ', imgs, feats imgs = ['images/img1.png','images/img2.png'] feats = [Compute('featurecomputation',compfeats,url=img) for img in imgs] tenfold = Compute('10 fold',nfold,imgs=imgs,feats=feats)
def compfeats(url): print 'Feats called: ', url return url+'feats' def nfold(imgs, feats): print 'nfold called: ', imgs, feats imgs = ['images/img1.png','images/img2.png'] feats = [Compute('featurecomputation',compfeats,url=img) for img in imgs] tenfold = Compute('10 fold',nfold,imgs=imgs,feats=feats)
Make sure we're calling functions correctly
Make sure we're calling functions correctly
Python
mit
luispedro/jug,luispedro/jug,unode/jug,unode/jug
def compfeats(url): print 'Feats called: ', url return url def nfold(imgs, feats): print 'nfold called: ', imgs, feats imgs = ['images/img1.png','images/img2.png'] feats = [Compute('featurecomputation',compfeats,url=img) for img in imgs] tenfold = Compute('10 fold',nfold,imgs=imgs,feats=feats) Make sure ...
def compfeats(url): print 'Feats called: ', url return url+'feats' def nfold(imgs, feats): print 'nfold called: ', imgs, feats imgs = ['images/img1.png','images/img2.png'] feats = [Compute('featurecomputation',compfeats,url=img) for img in imgs] tenfold = Compute('10 fold',nfold,imgs=imgs,feats=feats)
<commit_before>def compfeats(url): print 'Feats called: ', url return url def nfold(imgs, feats): print 'nfold called: ', imgs, feats imgs = ['images/img1.png','images/img2.png'] feats = [Compute('featurecomputation',compfeats,url=img) for img in imgs] tenfold = Compute('10 fold',nfold,imgs=imgs,feats=fea...
def compfeats(url): print 'Feats called: ', url return url+'feats' def nfold(imgs, feats): print 'nfold called: ', imgs, feats imgs = ['images/img1.png','images/img2.png'] feats = [Compute('featurecomputation',compfeats,url=img) for img in imgs] tenfold = Compute('10 fold',nfold,imgs=imgs,feats=feats)
def compfeats(url): print 'Feats called: ', url return url def nfold(imgs, feats): print 'nfold called: ', imgs, feats imgs = ['images/img1.png','images/img2.png'] feats = [Compute('featurecomputation',compfeats,url=img) for img in imgs] tenfold = Compute('10 fold',nfold,imgs=imgs,feats=feats) Make sure ...
<commit_before>def compfeats(url): print 'Feats called: ', url return url def nfold(imgs, feats): print 'nfold called: ', imgs, feats imgs = ['images/img1.png','images/img2.png'] feats = [Compute('featurecomputation',compfeats,url=img) for img in imgs] tenfold = Compute('10 fold',nfold,imgs=imgs,feats=fea...
060eeae718154c9b131a36c45e34d745530ff20d
launch_control/models/sw_image.py
launch_control/models/sw_image.py
""" Module with the SoftwareImage model. """ from launch_control.utils.json.pod import PlainOldData class SoftwareImage(PlainOldData): """ Model for representing software images. """ __slots__ = ('name',) def __init__(self, desc): self.name = name
""" Module with the SoftwareImage model. """ from launch_control.utils.json.pod import PlainOldData class SoftwareImage(PlainOldData): """ Model for representing software images. """ __slots__ = ('name',) def __init__(self, name): self.name = name
Fix slot name in SoftwareImage
Fix slot name in SoftwareImage
Python
agpl-3.0
Linaro/lava-server,OSSystems/lava-server,Linaro/lava-server,Linaro/lava-server,OSSystems/lava-server,Linaro/lava-server,OSSystems/lava-server
""" Module with the SoftwareImage model. """ from launch_control.utils.json.pod import PlainOldData class SoftwareImage(PlainOldData): """ Model for representing software images. """ __slots__ = ('name',) def __init__(self, desc): self.name = name Fix slot name in SoftwareImage
""" Module with the SoftwareImage model. """ from launch_control.utils.json.pod import PlainOldData class SoftwareImage(PlainOldData): """ Model for representing software images. """ __slots__ = ('name',) def __init__(self, name): self.name = name
<commit_before>""" Module with the SoftwareImage model. """ from launch_control.utils.json.pod import PlainOldData class SoftwareImage(PlainOldData): """ Model for representing software images. """ __slots__ = ('name',) def __init__(self, desc): self.name = name <commit_msg>Fix slot nam...
""" Module with the SoftwareImage model. """ from launch_control.utils.json.pod import PlainOldData class SoftwareImage(PlainOldData): """ Model for representing software images. """ __slots__ = ('name',) def __init__(self, name): self.name = name
""" Module with the SoftwareImage model. """ from launch_control.utils.json.pod import PlainOldData class SoftwareImage(PlainOldData): """ Model for representing software images. """ __slots__ = ('name',) def __init__(self, desc): self.name = name Fix slot name in SoftwareImage""" Modul...
<commit_before>""" Module with the SoftwareImage model. """ from launch_control.utils.json.pod import PlainOldData class SoftwareImage(PlainOldData): """ Model for representing software images. """ __slots__ = ('name',) def __init__(self, desc): self.name = name <commit_msg>Fix slot nam...
94737c504ffdf55ddc8a0a24561f52fc531b6047
djangorest_alchemy/apibuilder.py
djangorest_alchemy/apibuilder.py
""" API Builder Build dynamic API based on the provided SQLAlchemy model """ from managers import AlchemyModelManager from viewsets import AlchemyModelViewSet from rest_framework_nested import routers class APIModelBuilder(object): def __init__(self, models, base_managers, ...
""" API Builder Build dynamic API based on the provided SQLAlchemy model """ from managers import AlchemyModelManager from viewsets import AlchemyModelViewSet from routers import ReadOnlyRouter class APIModelBuilder(object): def __init__(self, models, base_managers, ...
Change to use read-only router for data-apis
Change to use read-only router for data-apis
Python
mit
dealertrack/djangorest-alchemy,pombredanne/djangorest-alchemy
""" API Builder Build dynamic API based on the provided SQLAlchemy model """ from managers import AlchemyModelManager from viewsets import AlchemyModelViewSet from rest_framework_nested import routers class APIModelBuilder(object): def __init__(self, models, base_managers, ...
""" API Builder Build dynamic API based on the provided SQLAlchemy model """ from managers import AlchemyModelManager from viewsets import AlchemyModelViewSet from routers import ReadOnlyRouter class APIModelBuilder(object): def __init__(self, models, base_managers, ...
<commit_before>""" API Builder Build dynamic API based on the provided SQLAlchemy model """ from managers import AlchemyModelManager from viewsets import AlchemyModelViewSet from rest_framework_nested import routers class APIModelBuilder(object): def __init__(self, models, base_m...
""" API Builder Build dynamic API based on the provided SQLAlchemy model """ from managers import AlchemyModelManager from viewsets import AlchemyModelViewSet from routers import ReadOnlyRouter class APIModelBuilder(object): def __init__(self, models, base_managers, ...
""" API Builder Build dynamic API based on the provided SQLAlchemy model """ from managers import AlchemyModelManager from viewsets import AlchemyModelViewSet from rest_framework_nested import routers class APIModelBuilder(object): def __init__(self, models, base_managers, ...
<commit_before>""" API Builder Build dynamic API based on the provided SQLAlchemy model """ from managers import AlchemyModelManager from viewsets import AlchemyModelViewSet from rest_framework_nested import routers class APIModelBuilder(object): def __init__(self, models, base_m...
6dcd30cba47798e8d6f2ef99f2b6c13cf7d60cad
migrations/versions/216_add_folder_separator_column_for_generic_.py
migrations/versions/216_add_folder_separator_column_for_generic_.py
"""add folder_separator column for generic imap Revision ID: 4f8e995d1dba Revises: 31aae1ecb374 Create Date: 2016-02-02 01:17:24.746355 """ # revision identifiers, used by Alembic. revision = '4f8e995d1dba' down_revision = '4bfecbcc7dbd' from alembic import op from sqlalchemy.sql import text def upgrade(): co...
"""add folder_separator column for generic imap Revision ID: 4f8e995d1dba Revises: 31aae1ecb374 Create Date: 2016-02-02 01:17:24.746355 """ # revision identifiers, used by Alembic. revision = '4f8e995d1dba' down_revision = '4bfecbcc7dbd' from alembic import op from sqlalchemy.sql import text def upgrade(): co...
Revert "merge alter statements together."
Revert "merge alter statements together." This reverts commit 0ed919a86c835956596e9e897423e6176625f158. Reverting all IMAP folder handling patches.
Python
agpl-3.0
closeio/nylas,nylas/sync-engine,closeio/nylas,jobscore/sync-engine,nylas/sync-engine,jobscore/sync-engine,nylas/sync-engine,closeio/nylas,nylas/sync-engine,jobscore/sync-engine,jobscore/sync-engine,closeio/nylas
"""add folder_separator column for generic imap Revision ID: 4f8e995d1dba Revises: 31aae1ecb374 Create Date: 2016-02-02 01:17:24.746355 """ # revision identifiers, used by Alembic. revision = '4f8e995d1dba' down_revision = '4bfecbcc7dbd' from alembic import op from sqlalchemy.sql import text def upgrade(): co...
"""add folder_separator column for generic imap Revision ID: 4f8e995d1dba Revises: 31aae1ecb374 Create Date: 2016-02-02 01:17:24.746355 """ # revision identifiers, used by Alembic. revision = '4f8e995d1dba' down_revision = '4bfecbcc7dbd' from alembic import op from sqlalchemy.sql import text def upgrade(): co...
<commit_before>"""add folder_separator column for generic imap Revision ID: 4f8e995d1dba Revises: 31aae1ecb374 Create Date: 2016-02-02 01:17:24.746355 """ # revision identifiers, used by Alembic. revision = '4f8e995d1dba' down_revision = '4bfecbcc7dbd' from alembic import op from sqlalchemy.sql import text def up...
"""add folder_separator column for generic imap Revision ID: 4f8e995d1dba Revises: 31aae1ecb374 Create Date: 2016-02-02 01:17:24.746355 """ # revision identifiers, used by Alembic. revision = '4f8e995d1dba' down_revision = '4bfecbcc7dbd' from alembic import op from sqlalchemy.sql import text def upgrade(): co...
"""add folder_separator column for generic imap Revision ID: 4f8e995d1dba Revises: 31aae1ecb374 Create Date: 2016-02-02 01:17:24.746355 """ # revision identifiers, used by Alembic. revision = '4f8e995d1dba' down_revision = '4bfecbcc7dbd' from alembic import op from sqlalchemy.sql import text def upgrade(): co...
<commit_before>"""add folder_separator column for generic imap Revision ID: 4f8e995d1dba Revises: 31aae1ecb374 Create Date: 2016-02-02 01:17:24.746355 """ # revision identifiers, used by Alembic. revision = '4f8e995d1dba' down_revision = '4bfecbcc7dbd' from alembic import op from sqlalchemy.sql import text def up...
f72b7ec93401bc817245c49790303fd925adb2c4
server/plugins/remoteconnection/machine_detail_remote_connection.py
server/plugins/remoteconnection/machine_detail_remote_connection.py
"""Machine detail plugin to allow easy VNC or SSH connections.""" import sal.plugin from server.models import Machine, SalSetting from server.utils import get_setting class RemoteConnection(sal.plugin.DetailPlugin): description = "Initiate VNC or SSH connections from a machine detail page." supported_os_fa...
"""Machine detail plugin to allow easy VNC or SSH connections.""" import sal.plugin from server.models import Machine, SalSetting from server.utils import get_setting class RemoteConnection(sal.plugin.DetailPlugin): description = "Initiate VNC or SSH connections from a machine detail page." supported_os_fa...
Fix user account prepending to machine detail remote connection plugin.
Fix user account prepending to machine detail remote connection plugin.
Python
apache-2.0
salopensource/sal,sheagcraig/sal,salopensource/sal,salopensource/sal,sheagcraig/sal,salopensource/sal,sheagcraig/sal,sheagcraig/sal
"""Machine detail plugin to allow easy VNC or SSH connections.""" import sal.plugin from server.models import Machine, SalSetting from server.utils import get_setting class RemoteConnection(sal.plugin.DetailPlugin): description = "Initiate VNC or SSH connections from a machine detail page." supported_os_fa...
"""Machine detail plugin to allow easy VNC or SSH connections.""" import sal.plugin from server.models import Machine, SalSetting from server.utils import get_setting class RemoteConnection(sal.plugin.DetailPlugin): description = "Initiate VNC or SSH connections from a machine detail page." supported_os_fa...
<commit_before>"""Machine detail plugin to allow easy VNC or SSH connections.""" import sal.plugin from server.models import Machine, SalSetting from server.utils import get_setting class RemoteConnection(sal.plugin.DetailPlugin): description = "Initiate VNC or SSH connections from a machine detail page." ...
"""Machine detail plugin to allow easy VNC or SSH connections.""" import sal.plugin from server.models import Machine, SalSetting from server.utils import get_setting class RemoteConnection(sal.plugin.DetailPlugin): description = "Initiate VNC or SSH connections from a machine detail page." supported_os_fa...
"""Machine detail plugin to allow easy VNC or SSH connections.""" import sal.plugin from server.models import Machine, SalSetting from server.utils import get_setting class RemoteConnection(sal.plugin.DetailPlugin): description = "Initiate VNC or SSH connections from a machine detail page." supported_os_fa...
<commit_before>"""Machine detail plugin to allow easy VNC or SSH connections.""" import sal.plugin from server.models import Machine, SalSetting from server.utils import get_setting class RemoteConnection(sal.plugin.DetailPlugin): description = "Initiate VNC or SSH connections from a machine detail page." ...
af173cbf4ca75c0c1dae459d2da8a1ebf54d0e50
debug_toolbar/panels/redirects.py
debug_toolbar/panels/redirects.py
from django.template.response import SimpleTemplateResponse from django.utils.translation import gettext_lazy as _ from debug_toolbar.panels import Panel class RedirectsPanel(Panel): """ Panel that intercepts redirects and displays a page with debug info. """ has_content = False nav_title = _("...
from django.template.response import SimpleTemplateResponse from django.utils.translation import gettext_lazy as _ from debug_toolbar.panels import Panel class RedirectsPanel(Panel): """ Panel that intercepts redirects and displays a page with debug info. """ has_content = False nav_title = _("...
Remove unnecessary coerce to int
Remove unnecessary coerce to int Since Django commit https://github.com/django/django/commit/190d2ff4a7a392adfe0b12552bd71871791d87aa HttpResponse.status_code is always an int.
Python
bsd-3-clause
tim-schilling/django-debug-toolbar,spookylukey/django-debug-toolbar,spookylukey/django-debug-toolbar,jazzband/django-debug-toolbar,django-debug-toolbar/django-debug-toolbar,tim-schilling/django-debug-toolbar,jazzband/django-debug-toolbar,tim-schilling/django-debug-toolbar,jazzband/django-debug-toolbar,django-debug-tool...
from django.template.response import SimpleTemplateResponse from django.utils.translation import gettext_lazy as _ from debug_toolbar.panels import Panel class RedirectsPanel(Panel): """ Panel that intercepts redirects and displays a page with debug info. """ has_content = False nav_title = _("...
from django.template.response import SimpleTemplateResponse from django.utils.translation import gettext_lazy as _ from debug_toolbar.panels import Panel class RedirectsPanel(Panel): """ Panel that intercepts redirects and displays a page with debug info. """ has_content = False nav_title = _("...
<commit_before>from django.template.response import SimpleTemplateResponse from django.utils.translation import gettext_lazy as _ from debug_toolbar.panels import Panel class RedirectsPanel(Panel): """ Panel that intercepts redirects and displays a page with debug info. """ has_content = False ...
from django.template.response import SimpleTemplateResponse from django.utils.translation import gettext_lazy as _ from debug_toolbar.panels import Panel class RedirectsPanel(Panel): """ Panel that intercepts redirects and displays a page with debug info. """ has_content = False nav_title = _("...
from django.template.response import SimpleTemplateResponse from django.utils.translation import gettext_lazy as _ from debug_toolbar.panels import Panel class RedirectsPanel(Panel): """ Panel that intercepts redirects and displays a page with debug info. """ has_content = False nav_title = _("...
<commit_before>from django.template.response import SimpleTemplateResponse from django.utils.translation import gettext_lazy as _ from debug_toolbar.panels import Panel class RedirectsPanel(Panel): """ Panel that intercepts redirects and displays a page with debug info. """ has_content = False ...
852989f9899593148d8f16b49142979c6ee509f2
offenerhaushalt/default_settings.py
offenerhaushalt/default_settings.py
DEBUG = True SECRET_KEY = 'no' SITES_FILE = 'sites.yaml' FREEZER_DESTINATION = '../build' FREEZER_REMOVE_EXTRA_FILES = True FLATPAGES_AUTO_RELOAD = True
DEBUG = True ASSETS_DEBUG = True SECRET_KEY = 'no' SITES_FILE = 'sites.yaml' FREEZER_DESTINATION = '../build' FREEZER_REMOVE_EXTRA_FILES = True FLATPAGES_AUTO_RELOAD = True
Switch assets to debug by default.
Switch assets to debug by default.
Python
mit
Opendatal/offenerhaushalt.de,Opendatal/offenerhaushalt.de,Opendatal/offenerhaushalt.de
DEBUG = True SECRET_KEY = 'no' SITES_FILE = 'sites.yaml' FREEZER_DESTINATION = '../build' FREEZER_REMOVE_EXTRA_FILES = True FLATPAGES_AUTO_RELOAD = TrueSwitch assets to debug by default.
DEBUG = True ASSETS_DEBUG = True SECRET_KEY = 'no' SITES_FILE = 'sites.yaml' FREEZER_DESTINATION = '../build' FREEZER_REMOVE_EXTRA_FILES = True FLATPAGES_AUTO_RELOAD = True
<commit_before>DEBUG = True SECRET_KEY = 'no' SITES_FILE = 'sites.yaml' FREEZER_DESTINATION = '../build' FREEZER_REMOVE_EXTRA_FILES = True FLATPAGES_AUTO_RELOAD = True<commit_msg>Switch assets to debug by default. <commit_after>
DEBUG = True ASSETS_DEBUG = True SECRET_KEY = 'no' SITES_FILE = 'sites.yaml' FREEZER_DESTINATION = '../build' FREEZER_REMOVE_EXTRA_FILES = True FLATPAGES_AUTO_RELOAD = True
DEBUG = True SECRET_KEY = 'no' SITES_FILE = 'sites.yaml' FREEZER_DESTINATION = '../build' FREEZER_REMOVE_EXTRA_FILES = True FLATPAGES_AUTO_RELOAD = TrueSwitch assets to debug by default. DEBUG = True ASSETS_DEBUG = True SECRET_KEY = 'no' SITES_FILE = 'sites.yaml' FREEZER_DESTINATION = '../build' FREEZER_REMOVE_EXTRA_...
<commit_before>DEBUG = True SECRET_KEY = 'no' SITES_FILE = 'sites.yaml' FREEZER_DESTINATION = '../build' FREEZER_REMOVE_EXTRA_FILES = True FLATPAGES_AUTO_RELOAD = True<commit_msg>Switch assets to debug by default. <commit_after>DEBUG = True ASSETS_DEBUG = True SECRET_KEY = 'no' SITES_FILE = 'sites.yaml' FREEZER_DESTI...
707f09d7d8f2c1e3ad37947a3084acb90faf84cf
IPython/extensions/tests/test_storemagic.py
IPython/extensions/tests/test_storemagic.py
import tempfile, os import nose.tools as nt ip = get_ipython() ip.magic('load_ext storemagic') def test_store_restore(): ip.user_ns['foo'] = 78 ip.magic('alias bar echo "hello"') tmpd = tempfile.mkdtemp() ip.magic('cd ' + tmpd) ip.magic('store foo') ip.magic('store bar') # Check stor...
import tempfile, os import nose.tools as nt ip = get_ipython() ip.magic('load_ext storemagic') def test_store_restore(): ip.user_ns['foo'] = 78 ip.magic('alias bar echo "hello"') tmpd = tempfile.mkdtemp() ip.magic('cd ' + tmpd) ip.magic('store foo') ip.magic('store bar') # Check stor...
Store magic test. On MacOSX the temp dir in /var is symlinked into /private/var thus making this comparison fail. This is solved by using os.path.realpath to expand the tempdir into is's real directory.
Store magic test. On MacOSX the temp dir in /var is symlinked into /private/var thus making this comparison fail. This is solved by using os.path.realpath to expand the tempdir into is's real directory.
Python
bsd-3-clause
ipython/ipython,ipython/ipython
import tempfile, os import nose.tools as nt ip = get_ipython() ip.magic('load_ext storemagic') def test_store_restore(): ip.user_ns['foo'] = 78 ip.magic('alias bar echo "hello"') tmpd = tempfile.mkdtemp() ip.magic('cd ' + tmpd) ip.magic('store foo') ip.magic('store bar') # Check stor...
import tempfile, os import nose.tools as nt ip = get_ipython() ip.magic('load_ext storemagic') def test_store_restore(): ip.user_ns['foo'] = 78 ip.magic('alias bar echo "hello"') tmpd = tempfile.mkdtemp() ip.magic('cd ' + tmpd) ip.magic('store foo') ip.magic('store bar') # Check stor...
<commit_before>import tempfile, os import nose.tools as nt ip = get_ipython() ip.magic('load_ext storemagic') def test_store_restore(): ip.user_ns['foo'] = 78 ip.magic('alias bar echo "hello"') tmpd = tempfile.mkdtemp() ip.magic('cd ' + tmpd) ip.magic('store foo') ip.magic('store bar') ...
import tempfile, os import nose.tools as nt ip = get_ipython() ip.magic('load_ext storemagic') def test_store_restore(): ip.user_ns['foo'] = 78 ip.magic('alias bar echo "hello"') tmpd = tempfile.mkdtemp() ip.magic('cd ' + tmpd) ip.magic('store foo') ip.magic('store bar') # Check stor...
import tempfile, os import nose.tools as nt ip = get_ipython() ip.magic('load_ext storemagic') def test_store_restore(): ip.user_ns['foo'] = 78 ip.magic('alias bar echo "hello"') tmpd = tempfile.mkdtemp() ip.magic('cd ' + tmpd) ip.magic('store foo') ip.magic('store bar') # Check stor...
<commit_before>import tempfile, os import nose.tools as nt ip = get_ipython() ip.magic('load_ext storemagic') def test_store_restore(): ip.user_ns['foo'] = 78 ip.magic('alias bar echo "hello"') tmpd = tempfile.mkdtemp() ip.magic('cd ' + tmpd) ip.magic('store foo') ip.magic('store bar') ...
617437824c875f368e8244bc6d9373217f15cb7d
website/project/utils.py
website/project/utils.py
from .views import node # Alias the project serializer serialize_node = node._view_project
# -*- coding: utf-8 -*- """Various node-related utilities.""" from website.project.views import node from website.project.views import file as file_views # Alias the project serializer serialize_node = node._view_project # File rendering utils get_cache_content = file_views.get_cache_content get_cache_path = file_vi...
Add aliases for MFR-related utilites
Add aliases for MFR-related utilites
Python
apache-2.0
revanthkolli/osf.io,Johnetordoff/osf.io,chrisseto/osf.io,felliott/osf.io,barbour-em/osf.io,emetsger/osf.io,njantrania/osf.io,danielneis/osf.io,caseyrygt/osf.io,emetsger/osf.io,crcresearch/osf.io,danielneis/osf.io,caseyrygt/osf.io,zachjanicki/osf.io,crcresearch/osf.io,brianjgeiger/osf.io,jmcarp/osf.io,leb2dg/osf.io,jinl...
from .views import node # Alias the project serializer serialize_node = node._view_project Add aliases for MFR-related utilites
# -*- coding: utf-8 -*- """Various node-related utilities.""" from website.project.views import node from website.project.views import file as file_views # Alias the project serializer serialize_node = node._view_project # File rendering utils get_cache_content = file_views.get_cache_content get_cache_path = file_vi...
<commit_before>from .views import node # Alias the project serializer serialize_node = node._view_project <commit_msg>Add aliases for MFR-related utilites<commit_after>
# -*- coding: utf-8 -*- """Various node-related utilities.""" from website.project.views import node from website.project.views import file as file_views # Alias the project serializer serialize_node = node._view_project # File rendering utils get_cache_content = file_views.get_cache_content get_cache_path = file_vi...
from .views import node # Alias the project serializer serialize_node = node._view_project Add aliases for MFR-related utilites# -*- coding: utf-8 -*- """Various node-related utilities.""" from website.project.views import node from website.project.views import file as file_views # Alias the project serializer seri...
<commit_before>from .views import node # Alias the project serializer serialize_node = node._view_project <commit_msg>Add aliases for MFR-related utilites<commit_after># -*- coding: utf-8 -*- """Various node-related utilities.""" from website.project.views import node from website.project.views import file as file_vi...
57ab42c16ddc8591153980b2f3bb8c4ba6090160
tests/conftest.py
tests/conftest.py
"""Module grouping session scoped PyTest fixtures.""" import pytest from _pytest.monkeypatch import MonkeyPatch import pydov def pytest_runtest_setup(): pydov.hooks = [] @pytest.fixture(scope='module') def monkeymodule(): mpatch = MonkeyPatch() yield mpatch mpatch.undo()
"""Module grouping session scoped PyTest fixtures.""" import pytest from _pytest.monkeypatch import MonkeyPatch import pydov def pytest_runtest_setup(): pydov.hooks = [] def pytest_configure(config): config.addinivalue_line("markers", "online: mark test that requires internet ac...
Add pytest hook to register online marker
Add pytest hook to register online marker
Python
mit
DOV-Vlaanderen/pydov
"""Module grouping session scoped PyTest fixtures.""" import pytest from _pytest.monkeypatch import MonkeyPatch import pydov def pytest_runtest_setup(): pydov.hooks = [] @pytest.fixture(scope='module') def monkeymodule(): mpatch = MonkeyPatch() yield mpatch mpatch.undo() Add pytest hook to registe...
"""Module grouping session scoped PyTest fixtures.""" import pytest from _pytest.monkeypatch import MonkeyPatch import pydov def pytest_runtest_setup(): pydov.hooks = [] def pytest_configure(config): config.addinivalue_line("markers", "online: mark test that requires internet ac...
<commit_before>"""Module grouping session scoped PyTest fixtures.""" import pytest from _pytest.monkeypatch import MonkeyPatch import pydov def pytest_runtest_setup(): pydov.hooks = [] @pytest.fixture(scope='module') def monkeymodule(): mpatch = MonkeyPatch() yield mpatch mpatch.undo() <commit_msg...
"""Module grouping session scoped PyTest fixtures.""" import pytest from _pytest.monkeypatch import MonkeyPatch import pydov def pytest_runtest_setup(): pydov.hooks = [] def pytest_configure(config): config.addinivalue_line("markers", "online: mark test that requires internet ac...
"""Module grouping session scoped PyTest fixtures.""" import pytest from _pytest.monkeypatch import MonkeyPatch import pydov def pytest_runtest_setup(): pydov.hooks = [] @pytest.fixture(scope='module') def monkeymodule(): mpatch = MonkeyPatch() yield mpatch mpatch.undo() Add pytest hook to registe...
<commit_before>"""Module grouping session scoped PyTest fixtures.""" import pytest from _pytest.monkeypatch import MonkeyPatch import pydov def pytest_runtest_setup(): pydov.hooks = [] @pytest.fixture(scope='module') def monkeymodule(): mpatch = MonkeyPatch() yield mpatch mpatch.undo() <commit_msg...
b9f40dd83a603f7457588190bd7d968e30fa74a7
frigg/settings/rest_framework.py
frigg/settings/rest_framework.py
REST_FRAMEWORK = { 'DEFAULT_THROTTLE_CLASSES': ( 'rest_framework.throttling.AnonRateThrottle', ), 'DEFAULT_THROTTLE_RATES': { 'anon': '5000/day', } }
REST_FRAMEWORK = { 'DEFAULT_RENDERER_CLASSES': ( 'rest_framework.renderers.JSONRenderer', ), 'DEFAULT_THROTTLE_CLASSES': ( 'rest_framework.throttling.AnonRateThrottle', ), 'DEFAULT_THROTTLE_RATES': { 'anon': '5000/day', } }
Set drf to onyl render json response on all requests
Set drf to onyl render json response on all requests
Python
mit
frigg/frigg-hq,frigg/frigg-hq,frigg/frigg-hq
REST_FRAMEWORK = { 'DEFAULT_THROTTLE_CLASSES': ( 'rest_framework.throttling.AnonRateThrottle', ), 'DEFAULT_THROTTLE_RATES': { 'anon': '5000/day', } } Set drf to onyl render json response on all requests
REST_FRAMEWORK = { 'DEFAULT_RENDERER_CLASSES': ( 'rest_framework.renderers.JSONRenderer', ), 'DEFAULT_THROTTLE_CLASSES': ( 'rest_framework.throttling.AnonRateThrottle', ), 'DEFAULT_THROTTLE_RATES': { 'anon': '5000/day', } }
<commit_before>REST_FRAMEWORK = { 'DEFAULT_THROTTLE_CLASSES': ( 'rest_framework.throttling.AnonRateThrottle', ), 'DEFAULT_THROTTLE_RATES': { 'anon': '5000/day', } } <commit_msg>Set drf to onyl render json response on all requests<commit_after>
REST_FRAMEWORK = { 'DEFAULT_RENDERER_CLASSES': ( 'rest_framework.renderers.JSONRenderer', ), 'DEFAULT_THROTTLE_CLASSES': ( 'rest_framework.throttling.AnonRateThrottle', ), 'DEFAULT_THROTTLE_RATES': { 'anon': '5000/day', } }
REST_FRAMEWORK = { 'DEFAULT_THROTTLE_CLASSES': ( 'rest_framework.throttling.AnonRateThrottle', ), 'DEFAULT_THROTTLE_RATES': { 'anon': '5000/day', } } Set drf to onyl render json response on all requestsREST_FRAMEWORK = { 'DEFAULT_RENDERER_CLASSES': ( 'rest_framework.renderers...
<commit_before>REST_FRAMEWORK = { 'DEFAULT_THROTTLE_CLASSES': ( 'rest_framework.throttling.AnonRateThrottle', ), 'DEFAULT_THROTTLE_RATES': { 'anon': '5000/day', } } <commit_msg>Set drf to onyl render json response on all requests<commit_after>REST_FRAMEWORK = { 'DEFAULT_RENDERER_CLAS...
2f14d64e73dba23a62e82fe3f4f06e6539356117
demo/datasetGeneration.py
demo/datasetGeneration.py
from demo7 import get_answer import json class TripleError(Exception): """ Raised when a triple contains connectors (e.g. AND, FIRST). """ def __init__(self, expression, message): self.expression = expression self.message = message def string_of_triple(t,missing,separator): if ...
from demo7 import get_answer import json class TripleError(Exception): """ Raised when a triple contains connectors (e.g. AND, FIRST). """ def __init__(self, expression, message): self.expression = expression self.message = message def string_of_triple(t,missing,separator): if ...
Revert "Do not display quesitons in script."
Revert "Do not display quesitons in script." This reverts commit 5c7286c1dc6348f2212266871876376df15592c0.
Python
agpl-3.0
ProjetPP/PPP-QuestionParsing-Grammatical,ProjetPP/PPP-QuestionParsing-Grammatical
from demo7 import get_answer import json class TripleError(Exception): """ Raised when a triple contains connectors (e.g. AND, FIRST). """ def __init__(self, expression, message): self.expression = expression self.message = message def string_of_triple(t,missing,separator): if ...
from demo7 import get_answer import json class TripleError(Exception): """ Raised when a triple contains connectors (e.g. AND, FIRST). """ def __init__(self, expression, message): self.expression = expression self.message = message def string_of_triple(t,missing,separator): if ...
<commit_before>from demo7 import get_answer import json class TripleError(Exception): """ Raised when a triple contains connectors (e.g. AND, FIRST). """ def __init__(self, expression, message): self.expression = expression self.message = message def string_of_triple(t,missing,sepa...
from demo7 import get_answer import json class TripleError(Exception): """ Raised when a triple contains connectors (e.g. AND, FIRST). """ def __init__(self, expression, message): self.expression = expression self.message = message def string_of_triple(t,missing,separator): if ...
from demo7 import get_answer import json class TripleError(Exception): """ Raised when a triple contains connectors (e.g. AND, FIRST). """ def __init__(self, expression, message): self.expression = expression self.message = message def string_of_triple(t,missing,separator): if ...
<commit_before>from demo7 import get_answer import json class TripleError(Exception): """ Raised when a triple contains connectors (e.g. AND, FIRST). """ def __init__(self, expression, message): self.expression = expression self.message = message def string_of_triple(t,missing,sepa...
0036095ed79c3ea6b14732555dbed9a987172366
ue-crash-dummy.py
ue-crash-dummy.py
from flask import Flask from flask_socketio import SocketIO ## Instanciate Flask (Static files and REST API) app = Flask(__name__) ## Instanciate SocketIO (Websockets, used for events) on top of it socketio = SocketIO(app) @socketio.on('testEvent') def test_event(): print "Got test event" @socketio.on('testEve...
from flask import Flask from flask_socketio import SocketIO ## Instanciate Flask (Static files and REST API) app = Flask(__name__) ## Instanciate SocketIO (Websockets, used for events) on top of it socketio = SocketIO(app) @socketio.on('testEvent') def test_event(_=None): print "Got test event" @socketio.on('t...
Add dummy parameter for UE4.
[Bugfix] Add dummy parameter for UE4. Signed-off-by: Juri Berlanda <5bfdca9e82c53adb0603ce7083f4ba4f2da5cacf@hotmail.com>
Python
mit
j-be/ue4-socketio-crash
from flask import Flask from flask_socketio import SocketIO ## Instanciate Flask (Static files and REST API) app = Flask(__name__) ## Instanciate SocketIO (Websockets, used for events) on top of it socketio = SocketIO(app) @socketio.on('testEvent') def test_event(): print "Got test event" @socketio.on('testEve...
from flask import Flask from flask_socketio import SocketIO ## Instanciate Flask (Static files and REST API) app = Flask(__name__) ## Instanciate SocketIO (Websockets, used for events) on top of it socketio = SocketIO(app) @socketio.on('testEvent') def test_event(_=None): print "Got test event" @socketio.on('t...
<commit_before>from flask import Flask from flask_socketio import SocketIO ## Instanciate Flask (Static files and REST API) app = Flask(__name__) ## Instanciate SocketIO (Websockets, used for events) on top of it socketio = SocketIO(app) @socketio.on('testEvent') def test_event(): print "Got test event" @socke...
from flask import Flask from flask_socketio import SocketIO ## Instanciate Flask (Static files and REST API) app = Flask(__name__) ## Instanciate SocketIO (Websockets, used for events) on top of it socketio = SocketIO(app) @socketio.on('testEvent') def test_event(_=None): print "Got test event" @socketio.on('t...
from flask import Flask from flask_socketio import SocketIO ## Instanciate Flask (Static files and REST API) app = Flask(__name__) ## Instanciate SocketIO (Websockets, used for events) on top of it socketio = SocketIO(app) @socketio.on('testEvent') def test_event(): print "Got test event" @socketio.on('testEve...
<commit_before>from flask import Flask from flask_socketio import SocketIO ## Instanciate Flask (Static files and REST API) app = Flask(__name__) ## Instanciate SocketIO (Websockets, used for events) on top of it socketio = SocketIO(app) @socketio.on('testEvent') def test_event(): print "Got test event" @socke...
a4825083c9a18fe8665d750bfad00a9d6fa40944
tartpy/eventloop.py
tartpy/eventloop.py
""" Very basic implementation of an event loop ========================================== The eventloop is a singleton to schedule and run events. Exports ------- - ``EventLoop``: the basic eventloop """ import queue import threading import time from .singleton import Singleton class EventLoop(object, metaclas...
""" Very basic implementation of an event loop ========================================== The eventloop is a singleton to schedule and run events. Exports ------- - ``EventLoop``: the basic eventloop """ import queue import sched import threading import time from .singleton import Singleton class EventLoop(obj...
Use Python scheduler rather than the home-made one
Use Python scheduler rather than the home-made one
Python
mit
waltermoreira/tartpy
""" Very basic implementation of an event loop ========================================== The eventloop is a singleton to schedule and run events. Exports ------- - ``EventLoop``: the basic eventloop """ import queue import threading import time from .singleton import Singleton class EventLoop(object, metaclas...
""" Very basic implementation of an event loop ========================================== The eventloop is a singleton to schedule and run events. Exports ------- - ``EventLoop``: the basic eventloop """ import queue import sched import threading import time from .singleton import Singleton class EventLoop(obj...
<commit_before>""" Very basic implementation of an event loop ========================================== The eventloop is a singleton to schedule and run events. Exports ------- - ``EventLoop``: the basic eventloop """ import queue import threading import time from .singleton import Singleton class EventLoop(o...
""" Very basic implementation of an event loop ========================================== The eventloop is a singleton to schedule and run events. Exports ------- - ``EventLoop``: the basic eventloop """ import queue import sched import threading import time from .singleton import Singleton class EventLoop(obj...
""" Very basic implementation of an event loop ========================================== The eventloop is a singleton to schedule and run events. Exports ------- - ``EventLoop``: the basic eventloop """ import queue import threading import time from .singleton import Singleton class EventLoop(object, metaclas...
<commit_before>""" Very basic implementation of an event loop ========================================== The eventloop is a singleton to schedule and run events. Exports ------- - ``EventLoop``: the basic eventloop """ import queue import threading import time from .singleton import Singleton class EventLoop(o...
3d5c68421b889abb4f56319b082aaff554ebaa0e
tests/test_parse.py
tests/test_parse.py
import json import logging import os import unittest import ptn class ParseTest(unittest.TestCase): def test_parser(self): with open('files/input.json') as input_file: torrents = json.load(input_file) with open('files/output.json') as output_file: results = json.load(out...
import json import os import unittest import ptn class ParseTest(unittest.TestCase): def test_parser(self): with open(os.path.join( os.path.dirname(__file__), 'files/input.json' )) as input_file: torrents = json.load(input_file) with o...
Fix minor syntax error in test
Fix minor syntax error in test
Python
mit
divijbindlish/parse-torrent-name,nivertech/parse-torrent-name
import json import logging import os import unittest import ptn class ParseTest(unittest.TestCase): def test_parser(self): with open('files/input.json') as input_file: torrents = json.load(input_file) with open('files/output.json') as output_file: results = json.load(out...
import json import os import unittest import ptn class ParseTest(unittest.TestCase): def test_parser(self): with open(os.path.join( os.path.dirname(__file__), 'files/input.json' )) as input_file: torrents = json.load(input_file) with o...
<commit_before>import json import logging import os import unittest import ptn class ParseTest(unittest.TestCase): def test_parser(self): with open('files/input.json') as input_file: torrents = json.load(input_file) with open('files/output.json') as output_file: results ...
import json import os import unittest import ptn class ParseTest(unittest.TestCase): def test_parser(self): with open(os.path.join( os.path.dirname(__file__), 'files/input.json' )) as input_file: torrents = json.load(input_file) with o...
import json import logging import os import unittest import ptn class ParseTest(unittest.TestCase): def test_parser(self): with open('files/input.json') as input_file: torrents = json.load(input_file) with open('files/output.json') as output_file: results = json.load(out...
<commit_before>import json import logging import os import unittest import ptn class ParseTest(unittest.TestCase): def test_parser(self): with open('files/input.json') as input_file: torrents = json.load(input_file) with open('files/output.json') as output_file: results ...
da51183e64875119377d3dd5ffe85c958c23fc16
moksha/api/widgets/flot/flot.py
moksha/api/widgets/flot/flot.py
# This file is part of Moksha. # # Moksha is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # Moksha is distributed in the hope that it...
# This file is part of Moksha. # # Moksha is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # Moksha is distributed in the hope that it...
Make our LiveFlotWidget not pull in jQuery
Make our LiveFlotWidget not pull in jQuery
Python
apache-2.0
lmacken/moksha,ralphbean/moksha,pombredanne/moksha,ralphbean/moksha,ralphbean/moksha,mokshaproject/moksha,pombredanne/moksha,pombredanne/moksha,lmacken/moksha,lmacken/moksha,mokshaproject/moksha,pombredanne/moksha,mokshaproject/moksha,mokshaproject/moksha
# This file is part of Moksha. # # Moksha is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # Moksha is distributed in the hope that it...
# This file is part of Moksha. # # Moksha is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # Moksha is distributed in the hope that it...
<commit_before># This file is part of Moksha. # # Moksha is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # Moksha is distributed in t...
# This file is part of Moksha. # # Moksha is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # Moksha is distributed in the hope that it...
# This file is part of Moksha. # # Moksha is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # Moksha is distributed in the hope that it...
<commit_before># This file is part of Moksha. # # Moksha is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # Moksha is distributed in t...
99be93029ecec0ed4c1e17e0fc2f199c2ad0f6c6
go/apps/dialogue/dialogue_api.py
go/apps/dialogue/dialogue_api.py
"""Go API action dispatcher for dialogue conversations.""" from go.api.go_api.action_dispatcher import ConversationActionDispatcher class DialogueActionDispatcher(ConversationActionDispatcher): def handle_get_poll(self, conv): pass def handle_save_poll(self, conv, poll): pass
"""Go API action dispatcher for dialogue conversations.""" from go.api.go_api.action_dispatcher import ConversationActionDispatcher class DialogueActionDispatcher(ConversationActionDispatcher): def handle_get_poll(self, conv): return {"poll": conv.config.get("poll")} def handle_save_poll(self, conv,...
Implement poll saving and getting.
Implement poll saving and getting.
Python
bsd-3-clause
praekelt/vumi-go,praekelt/vumi-go,praekelt/vumi-go,praekelt/vumi-go
"""Go API action dispatcher for dialogue conversations.""" from go.api.go_api.action_dispatcher import ConversationActionDispatcher class DialogueActionDispatcher(ConversationActionDispatcher): def handle_get_poll(self, conv): pass def handle_save_poll(self, conv, poll): pass Implement poll ...
"""Go API action dispatcher for dialogue conversations.""" from go.api.go_api.action_dispatcher import ConversationActionDispatcher class DialogueActionDispatcher(ConversationActionDispatcher): def handle_get_poll(self, conv): return {"poll": conv.config.get("poll")} def handle_save_poll(self, conv,...
<commit_before>"""Go API action dispatcher for dialogue conversations.""" from go.api.go_api.action_dispatcher import ConversationActionDispatcher class DialogueActionDispatcher(ConversationActionDispatcher): def handle_get_poll(self, conv): pass def handle_save_poll(self, conv, poll): pass ...
"""Go API action dispatcher for dialogue conversations.""" from go.api.go_api.action_dispatcher import ConversationActionDispatcher class DialogueActionDispatcher(ConversationActionDispatcher): def handle_get_poll(self, conv): return {"poll": conv.config.get("poll")} def handle_save_poll(self, conv,...
"""Go API action dispatcher for dialogue conversations.""" from go.api.go_api.action_dispatcher import ConversationActionDispatcher class DialogueActionDispatcher(ConversationActionDispatcher): def handle_get_poll(self, conv): pass def handle_save_poll(self, conv, poll): pass Implement poll ...
<commit_before>"""Go API action dispatcher for dialogue conversations.""" from go.api.go_api.action_dispatcher import ConversationActionDispatcher class DialogueActionDispatcher(ConversationActionDispatcher): def handle_get_poll(self, conv): pass def handle_save_poll(self, conv, poll): pass ...
d831826ec23114a3f56b5f327205257c7ca4ac58
gym/configuration.py
gym/configuration.py
import logging import sys import gym logger = logging.getLogger(__name__) root_logger = logging.getLogger() requests_logger = logging.getLogger('requests') # Set up the default handler formatter = logging.Formatter('[%(asctime)s] %(message)s') handler = logging.StreamHandler(sys.stderr) handler.setFormatter(formatt...
import logging import sys import gym logger = logging.getLogger(__name__) root_logger = logging.getLogger() requests_logger = logging.getLogger('requests') # Set up the default handler formatter = logging.Formatter('[%(asctime)s] %(message)s') handler = logging.StreamHandler(sys.stderr) handler.setFormatter(formatt...
Downgrade to just setting the gym logger
Downgrade to just setting the gym logger
Python
mit
dianchen96/gym,Farama-Foundation/Gymnasium,Farama-Foundation/Gymnasium,dianchen96/gym
import logging import sys import gym logger = logging.getLogger(__name__) root_logger = logging.getLogger() requests_logger = logging.getLogger('requests') # Set up the default handler formatter = logging.Formatter('[%(asctime)s] %(message)s') handler = logging.StreamHandler(sys.stderr) handler.setFormatter(formatt...
import logging import sys import gym logger = logging.getLogger(__name__) root_logger = logging.getLogger() requests_logger = logging.getLogger('requests') # Set up the default handler formatter = logging.Formatter('[%(asctime)s] %(message)s') handler = logging.StreamHandler(sys.stderr) handler.setFormatter(formatt...
<commit_before>import logging import sys import gym logger = logging.getLogger(__name__) root_logger = logging.getLogger() requests_logger = logging.getLogger('requests') # Set up the default handler formatter = logging.Formatter('[%(asctime)s] %(message)s') handler = logging.StreamHandler(sys.stderr) handler.setFo...
import logging import sys import gym logger = logging.getLogger(__name__) root_logger = logging.getLogger() requests_logger = logging.getLogger('requests') # Set up the default handler formatter = logging.Formatter('[%(asctime)s] %(message)s') handler = logging.StreamHandler(sys.stderr) handler.setFormatter(formatt...
import logging import sys import gym logger = logging.getLogger(__name__) root_logger = logging.getLogger() requests_logger = logging.getLogger('requests') # Set up the default handler formatter = logging.Formatter('[%(asctime)s] %(message)s') handler = logging.StreamHandler(sys.stderr) handler.setFormatter(formatt...
<commit_before>import logging import sys import gym logger = logging.getLogger(__name__) root_logger = logging.getLogger() requests_logger = logging.getLogger('requests') # Set up the default handler formatter = logging.Formatter('[%(asctime)s] %(message)s') handler = logging.StreamHandler(sys.stderr) handler.setFo...
0b80b573049b771f551b2fa47e570d849cd14ea4
packages/syft/src/syft/core/node/common/node_manager/node_route_manager.py
packages/syft/src/syft/core/node/common/node_manager/node_route_manager.py
# third party from sqlalchemy.engine import Engine # relative from ..node_table.node_route import NodeRoute from .database_manager import DatabaseManager class NodeRouteManager(DatabaseManager): schema = NodeRoute def __init__(self, database: Engine) -> None: super().__init__(schema=NodeRouteManager...
# third party from sqlalchemy.engine import Engine # relative from ..node_table.node_route import NodeRoute from .database_manager import DatabaseManager class NodeRouteManager(DatabaseManager): schema = NodeRoute def __init__(self, database: Engine) -> None: super().__init__(schema=NodeRouteManager...
UPDATE update_route_for_node method to accept new parameters (vpn_endpoint/vpn_key)
UPDATE update_route_for_node method to accept new parameters (vpn_endpoint/vpn_key)
Python
apache-2.0
OpenMined/PySyft,OpenMined/PySyft,OpenMined/PySyft,OpenMined/PySyft
# third party from sqlalchemy.engine import Engine # relative from ..node_table.node_route import NodeRoute from .database_manager import DatabaseManager class NodeRouteManager(DatabaseManager): schema = NodeRoute def __init__(self, database: Engine) -> None: super().__init__(schema=NodeRouteManager...
# third party from sqlalchemy.engine import Engine # relative from ..node_table.node_route import NodeRoute from .database_manager import DatabaseManager class NodeRouteManager(DatabaseManager): schema = NodeRoute def __init__(self, database: Engine) -> None: super().__init__(schema=NodeRouteManager...
<commit_before># third party from sqlalchemy.engine import Engine # relative from ..node_table.node_route import NodeRoute from .database_manager import DatabaseManager class NodeRouteManager(DatabaseManager): schema = NodeRoute def __init__(self, database: Engine) -> None: super().__init__(schema=N...
# third party from sqlalchemy.engine import Engine # relative from ..node_table.node_route import NodeRoute from .database_manager import DatabaseManager class NodeRouteManager(DatabaseManager): schema = NodeRoute def __init__(self, database: Engine) -> None: super().__init__(schema=NodeRouteManager...
# third party from sqlalchemy.engine import Engine # relative from ..node_table.node_route import NodeRoute from .database_manager import DatabaseManager class NodeRouteManager(DatabaseManager): schema = NodeRoute def __init__(self, database: Engine) -> None: super().__init__(schema=NodeRouteManager...
<commit_before># third party from sqlalchemy.engine import Engine # relative from ..node_table.node_route import NodeRoute from .database_manager import DatabaseManager class NodeRouteManager(DatabaseManager): schema = NodeRoute def __init__(self, database: Engine) -> None: super().__init__(schema=N...
9bb0e3b082b509b5498d25df248d4c74be53bcc3
oppia/tests/javascript_tests.py
oppia/tests/javascript_tests.py
# Copyright 2012 Google Inc. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or ...
# Copyright 2012 Google Inc. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or ...
Make failing Karma tests actually count as failures.
Make failing Karma tests actually count as failures.
Python
apache-2.0
sunu/oppia,directorlive/oppia,michaelWagner/oppia,jestapinski/oppia,kennho/oppia,mit0110/oppia,himanshu-dixit/oppia,zgchizi/oppia-uc,won0089/oppia,brianrodri/oppia,leandrotoledo/oppia,fernandopinhati/oppia,rackstar17/oppia,aldeka/oppia,Dev4X/oppia,amgowano/oppia,oulan/oppia,raju249/oppia,aldeka/oppia,dippatel1994/oppia...
# Copyright 2012 Google Inc. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or ...
# Copyright 2012 Google Inc. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or ...
<commit_before># Copyright 2012 Google Inc. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by app...
# Copyright 2012 Google Inc. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or ...
# Copyright 2012 Google Inc. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or ...
<commit_before># Copyright 2012 Google Inc. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by app...
824b4c1f979f49bb8debc3891f47c53bf6699227
components/all/platform-config/x86-64-im-n29xx-t40n-r0/src/python/onlpc.py
components/all/platform-config/x86-64-im-n29xx-t40n-r0/src/python/onlpc.py
#!/usr/bin/python ############################################################ # # Copyright 2015 Interface Masters Technologies, Inc. # # Platform Driver for x86-64-im-n29xx-t40n-r0 # ############################################################ import os import struct import time import subprocess from onl.platform.ba...
#!/usr/bin/python ############################################################ # # Copyright 2015 Interface Masters Technologies, Inc. # # Platform Driver for x86-64-im-n29xx-t40n-r0 # ############################################################ import os import struct import time import subprocess from onl.platform.ba...
Add IANA OID to file
Add IANA OID to file
Python
epl-1.0
InterfaceMasters/ONL,InterfaceMasters/ONL
#!/usr/bin/python ############################################################ # # Copyright 2015 Interface Masters Technologies, Inc. # # Platform Driver for x86-64-im-n29xx-t40n-r0 # ############################################################ import os import struct import time import subprocess from onl.platform.ba...
#!/usr/bin/python ############################################################ # # Copyright 2015 Interface Masters Technologies, Inc. # # Platform Driver for x86-64-im-n29xx-t40n-r0 # ############################################################ import os import struct import time import subprocess from onl.platform.ba...
<commit_before>#!/usr/bin/python ############################################################ # # Copyright 2015 Interface Masters Technologies, Inc. # # Platform Driver for x86-64-im-n29xx-t40n-r0 # ############################################################ import os import struct import time import subprocess from ...
#!/usr/bin/python ############################################################ # # Copyright 2015 Interface Masters Technologies, Inc. # # Platform Driver for x86-64-im-n29xx-t40n-r0 # ############################################################ import os import struct import time import subprocess from onl.platform.ba...
#!/usr/bin/python ############################################################ # # Copyright 2015 Interface Masters Technologies, Inc. # # Platform Driver for x86-64-im-n29xx-t40n-r0 # ############################################################ import os import struct import time import subprocess from onl.platform.ba...
<commit_before>#!/usr/bin/python ############################################################ # # Copyright 2015 Interface Masters Technologies, Inc. # # Platform Driver for x86-64-im-n29xx-t40n-r0 # ############################################################ import os import struct import time import subprocess from ...
f9223d3e12881dd638a2815bb1019071d1857541
laalaa/apps/advisers/geocoder.py
laalaa/apps/advisers/geocoder.py
import re import postcodeinfo import pc_fallback class GeocoderError(Exception): pass class PostcodeNotFound(GeocoderError): def __init__(self, postcode, *args, **kwargs): super(PostcodeNotFound, self).__init__(*args, **kwargs) self.postcode = postcode def geocode(postcode): try: ...
import re import postcodeinfo import pc_fallback class GeocoderError(Exception): pass class PostcodeNotFound(GeocoderError): def __init__(self, postcode, *args, **kwargs): super(PostcodeNotFound, self).__init__(*args, **kwargs) self.postcode = postcode def geocode(postcode): try: ...
Increase default timeout for postcodeinfo to 30s
Increase default timeout for postcodeinfo to 30s It seems that the current default of 5 seconds is too low for most of the "legal provider upload" use cases.
Python
mit
ministryofjustice/laa-legal-adviser-api,ministryofjustice/laa-legal-adviser-api,ministryofjustice/laa-legal-adviser-api
import re import postcodeinfo import pc_fallback class GeocoderError(Exception): pass class PostcodeNotFound(GeocoderError): def __init__(self, postcode, *args, **kwargs): super(PostcodeNotFound, self).__init__(*args, **kwargs) self.postcode = postcode def geocode(postcode): try: ...
import re import postcodeinfo import pc_fallback class GeocoderError(Exception): pass class PostcodeNotFound(GeocoderError): def __init__(self, postcode, *args, **kwargs): super(PostcodeNotFound, self).__init__(*args, **kwargs) self.postcode = postcode def geocode(postcode): try: ...
<commit_before>import re import postcodeinfo import pc_fallback class GeocoderError(Exception): pass class PostcodeNotFound(GeocoderError): def __init__(self, postcode, *args, **kwargs): super(PostcodeNotFound, self).__init__(*args, **kwargs) self.postcode = postcode def geocode(postcode):...
import re import postcodeinfo import pc_fallback class GeocoderError(Exception): pass class PostcodeNotFound(GeocoderError): def __init__(self, postcode, *args, **kwargs): super(PostcodeNotFound, self).__init__(*args, **kwargs) self.postcode = postcode def geocode(postcode): try: ...
import re import postcodeinfo import pc_fallback class GeocoderError(Exception): pass class PostcodeNotFound(GeocoderError): def __init__(self, postcode, *args, **kwargs): super(PostcodeNotFound, self).__init__(*args, **kwargs) self.postcode = postcode def geocode(postcode): try: ...
<commit_before>import re import postcodeinfo import pc_fallback class GeocoderError(Exception): pass class PostcodeNotFound(GeocoderError): def __init__(self, postcode, *args, **kwargs): super(PostcodeNotFound, self).__init__(*args, **kwargs) self.postcode = postcode def geocode(postcode):...
57e66ae6cd833b1b0da5b71e1c4b6e223c8ca062
test/test_data.py
test/test_data.py
"""Tests for coverage.data""" import unittest from coverage.data import CoverageData class DataTest(unittest.TestCase): def test_reading(self): covdata = CoverageData() covdata.read() self.assertEqual(covdata.summary(), {})
"""Tests for coverage.data""" from coverage.data import CoverageData from coveragetest import CoverageTest class DataTest(CoverageTest): def test_reading(self): covdata = CoverageData() covdata.read() self.assertEqual(covdata.summary(), {})
Use our CoverageTest base class to get isolation (in a new directory) for the data tests.
Use our CoverageTest base class to get isolation (in a new directory) for the data tests.
Python
apache-2.0
7WebPages/coveragepy,larsbutler/coveragepy,7WebPages/coveragepy,jayhetee/coveragepy,nedbat/coveragepy,7WebPages/coveragepy,blueyed/coveragepy,jayhetee/coveragepy,blueyed/coveragepy,larsbutler/coveragepy,larsbutler/coveragepy,blueyed/coveragepy,larsbutler/coveragepy,7WebPages/coveragepy,hugovk/coveragepy,hugovk/coverage...
"""Tests for coverage.data""" import unittest from coverage.data import CoverageData class DataTest(unittest.TestCase): def test_reading(self): covdata = CoverageData() covdata.read() self.assertEqual(covdata.summary(), {}) Use our CoverageTest base class to get isolation (in a new directo...
"""Tests for coverage.data""" from coverage.data import CoverageData from coveragetest import CoverageTest class DataTest(CoverageTest): def test_reading(self): covdata = CoverageData() covdata.read() self.assertEqual(covdata.summary(), {})
<commit_before>"""Tests for coverage.data""" import unittest from coverage.data import CoverageData class DataTest(unittest.TestCase): def test_reading(self): covdata = CoverageData() covdata.read() self.assertEqual(covdata.summary(), {}) <commit_msg>Use our CoverageTest base class to get ...
"""Tests for coverage.data""" from coverage.data import CoverageData from coveragetest import CoverageTest class DataTest(CoverageTest): def test_reading(self): covdata = CoverageData() covdata.read() self.assertEqual(covdata.summary(), {})
"""Tests for coverage.data""" import unittest from coverage.data import CoverageData class DataTest(unittest.TestCase): def test_reading(self): covdata = CoverageData() covdata.read() self.assertEqual(covdata.summary(), {}) Use our CoverageTest base class to get isolation (in a new directo...
<commit_before>"""Tests for coverage.data""" import unittest from coverage.data import CoverageData class DataTest(unittest.TestCase): def test_reading(self): covdata = CoverageData() covdata.read() self.assertEqual(covdata.summary(), {}) <commit_msg>Use our CoverageTest base class to get ...
dfdcbda02ad2fcc744e90d437051afe911e47c60
gapipy/resources/booking/agent.py
gapipy/resources/booking/agent.py
from __future__ import unicode_literals from ..base import Resource from .agency import Agency class Agent(Resource): _resource_name = 'agents' _is_listable = False _as_is_fields = [ 'id', 'href', 'role', 'first_name', 'last_name', 'email', 'phone_numbers', 'username', 'active', ] ...
from __future__ import unicode_literals from ..base import BaseModel, Resource from .agency import Agency class AgentRole(BaseModel): _as_is_fields = ['id', 'name'] class AgentPhoneNumber(BaseModel): _as_is_fields = ['number', 'type'] class Agent(Resource): _resource_name = 'agents' _is_listable...
Update Agent to use BaseModel classes to...
Update Agent to use BaseModel classes to... represent Agent.role & Agent.phone_numbers fields This will enable attribute access semantics for these fields i.e. > agent = client.agent.get(1234) > agent.role['id'] > agent.phone_numbers[0]['number'] > agent.role.id > agent.phone_numbers[0].number
Python
mit
gadventures/gapipy
from __future__ import unicode_literals from ..base import Resource from .agency import Agency class Agent(Resource): _resource_name = 'agents' _is_listable = False _as_is_fields = [ 'id', 'href', 'role', 'first_name', 'last_name', 'email', 'phone_numbers', 'username', 'active', ] ...
from __future__ import unicode_literals from ..base import BaseModel, Resource from .agency import Agency class AgentRole(BaseModel): _as_is_fields = ['id', 'name'] class AgentPhoneNumber(BaseModel): _as_is_fields = ['number', 'type'] class Agent(Resource): _resource_name = 'agents' _is_listable...
<commit_before>from __future__ import unicode_literals from ..base import Resource from .agency import Agency class Agent(Resource): _resource_name = 'agents' _is_listable = False _as_is_fields = [ 'id', 'href', 'role', 'first_name', 'last_name', 'email', 'phone_numbers', 'username', 'a...
from __future__ import unicode_literals from ..base import BaseModel, Resource from .agency import Agency class AgentRole(BaseModel): _as_is_fields = ['id', 'name'] class AgentPhoneNumber(BaseModel): _as_is_fields = ['number', 'type'] class Agent(Resource): _resource_name = 'agents' _is_listable...
from __future__ import unicode_literals from ..base import Resource from .agency import Agency class Agent(Resource): _resource_name = 'agents' _is_listable = False _as_is_fields = [ 'id', 'href', 'role', 'first_name', 'last_name', 'email', 'phone_numbers', 'username', 'active', ] ...
<commit_before>from __future__ import unicode_literals from ..base import Resource from .agency import Agency class Agent(Resource): _resource_name = 'agents' _is_listable = False _as_is_fields = [ 'id', 'href', 'role', 'first_name', 'last_name', 'email', 'phone_numbers', 'username', 'a...
6b1ebf85ec2b76bee889936726c3caac45203675
pubsubpull/tests/test_config.py
pubsubpull/tests/test_config.py
from slumber.connector.ua import get from django.test import TestCase from pubsubpull.models import * class TestConfiguration(TestCase): def test_slumber(self): response, json = get('/slumber/') self.assertEquals(response.status_code, 200, response)
from slumber.connector.ua import get from django.test import TestCase from pubsubpull.models import * class TestConfiguration(TestCase): def test_slumber(self): response, json = get('/slumber/') self.assertEquals(response.status_code, 200, response) self.assertTrue(json.has_key('apps'),...
Make sure pubsubpull is installed.
Make sure pubsubpull is installed.
Python
mit
KayEss/django-pubsubpull,KayEss/django-pubsubpull,KayEss/django-pubsubpull
from slumber.connector.ua import get from django.test import TestCase from pubsubpull.models import * class TestConfiguration(TestCase): def test_slumber(self): response, json = get('/slumber/') self.assertEquals(response.status_code, 200, response) Make sure pubsubpull is installed.
from slumber.connector.ua import get from django.test import TestCase from pubsubpull.models import * class TestConfiguration(TestCase): def test_slumber(self): response, json = get('/slumber/') self.assertEquals(response.status_code, 200, response) self.assertTrue(json.has_key('apps'),...
<commit_before>from slumber.connector.ua import get from django.test import TestCase from pubsubpull.models import * class TestConfiguration(TestCase): def test_slumber(self): response, json = get('/slumber/') self.assertEquals(response.status_code, 200, response) <commit_msg>Make sure pubsubpu...
from slumber.connector.ua import get from django.test import TestCase from pubsubpull.models import * class TestConfiguration(TestCase): def test_slumber(self): response, json = get('/slumber/') self.assertEquals(response.status_code, 200, response) self.assertTrue(json.has_key('apps'),...
from slumber.connector.ua import get from django.test import TestCase from pubsubpull.models import * class TestConfiguration(TestCase): def test_slumber(self): response, json = get('/slumber/') self.assertEquals(response.status_code, 200, response) Make sure pubsubpull is installed.from slumbe...
<commit_before>from slumber.connector.ua import get from django.test import TestCase from pubsubpull.models import * class TestConfiguration(TestCase): def test_slumber(self): response, json = get('/slumber/') self.assertEquals(response.status_code, 200, response) <commit_msg>Make sure pubsubpu...
9014dfde50d5f54cf79c544ce01e81266effa87d
game_info/tests/test_commands.py
game_info/tests/test_commands.py
from django.core.management import call_command from django.test import TestCase class ServerTest(TestCase): def test_update_game_info(self): call_command('update_game_info')
from django.core.management import call_command from django.test import TestCase from game_info.models import Server class ServerTest(TestCase): def create_server(self, title="Test Server", host="example.org", port=27015): return Server.objects.create(title=title, host=host, port=port) def test_updat...
Fix testing on update_game_info management command
Fix testing on update_game_info management command
Python
bsd-3-clause
Azelphur-Servers/django-game-info
from django.core.management import call_command from django.test import TestCase class ServerTest(TestCase): def test_update_game_info(self): call_command('update_game_info') Fix testing on update_game_info management command
from django.core.management import call_command from django.test import TestCase from game_info.models import Server class ServerTest(TestCase): def create_server(self, title="Test Server", host="example.org", port=27015): return Server.objects.create(title=title, host=host, port=port) def test_updat...
<commit_before>from django.core.management import call_command from django.test import TestCase class ServerTest(TestCase): def test_update_game_info(self): call_command('update_game_info') <commit_msg>Fix testing on update_game_info management command<commit_after>
from django.core.management import call_command from django.test import TestCase from game_info.models import Server class ServerTest(TestCase): def create_server(self, title="Test Server", host="example.org", port=27015): return Server.objects.create(title=title, host=host, port=port) def test_updat...
from django.core.management import call_command from django.test import TestCase class ServerTest(TestCase): def test_update_game_info(self): call_command('update_game_info') Fix testing on update_game_info management commandfrom django.core.management import call_command from django.test import TestCase ...
<commit_before>from django.core.management import call_command from django.test import TestCase class ServerTest(TestCase): def test_update_game_info(self): call_command('update_game_info') <commit_msg>Fix testing on update_game_info management command<commit_after>from django.core.management import call_...
bee8527854577f2c663cd43719bbb2cd05cdbf1a
TwitterStatsLib/Output.py
TwitterStatsLib/Output.py
""" Module providing standard output classes """ from abc import ABCMeta, abstractmethod from mako.template import Template from mako.lookup import TemplateLookup class Output(object): """ Abstract class base for output classes """ __metaclass__ = ABCMeta @abstractmethod def render(self, d...
""" Module providing standard output classes """ import re from abc import ABCMeta, abstractmethod from mako.template import Template from mako.lookup import TemplateLookup class Output(object): """ Abstract class base for output classes """ __metaclass__ = ABCMeta @abstractmethod def ren...
Use regex instead of replace for Mako template preprocess
Use regex instead of replace for Mako template preprocess
Python
mit
pecet/pytosg,pecet/pytosg
""" Module providing standard output classes """ from abc import ABCMeta, abstractmethod from mako.template import Template from mako.lookup import TemplateLookup class Output(object): """ Abstract class base for output classes """ __metaclass__ = ABCMeta @abstractmethod def render(self, d...
""" Module providing standard output classes """ import re from abc import ABCMeta, abstractmethod from mako.template import Template from mako.lookup import TemplateLookup class Output(object): """ Abstract class base for output classes """ __metaclass__ = ABCMeta @abstractmethod def ren...
<commit_before>""" Module providing standard output classes """ from abc import ABCMeta, abstractmethod from mako.template import Template from mako.lookup import TemplateLookup class Output(object): """ Abstract class base for output classes """ __metaclass__ = ABCMeta @abstractmethod def...
""" Module providing standard output classes """ import re from abc import ABCMeta, abstractmethod from mako.template import Template from mako.lookup import TemplateLookup class Output(object): """ Abstract class base for output classes """ __metaclass__ = ABCMeta @abstractmethod def ren...
""" Module providing standard output classes """ from abc import ABCMeta, abstractmethod from mako.template import Template from mako.lookup import TemplateLookup class Output(object): """ Abstract class base for output classes """ __metaclass__ = ABCMeta @abstractmethod def render(self, d...
<commit_before>""" Module providing standard output classes """ from abc import ABCMeta, abstractmethod from mako.template import Template from mako.lookup import TemplateLookup class Output(object): """ Abstract class base for output classes """ __metaclass__ = ABCMeta @abstractmethod def...
28cf62f316e2e726331f9b0773270db64c4869c8
grammpy/IsMethodsRuleExtension.py
grammpy/IsMethodsRuleExtension.py
#!/usr/bin/env python """ :Author Patrik Valkovic :Created 23.06.2017 16:39 :Licence GNUv3 Part of grammpy """ from .Rule import Rule class IsMethodsRuleExtension(Rule): @classmethod def is_regular(cls): raise NotImplementedError() @classmethod def is_contextfree(cls): raise NotImpl...
#!/usr/bin/env python """ :Author Patrik Valkovic :Created 23.06.2017 16:39 :Licence GNUv3 Part of grammpy """ from .Rule import Rule class IsMethodsRuleExtension(Rule): @classmethod def is_regular(cls): raise NotImplementedError() @classmethod def is_contextfree(cls): raise NotImpl...
Add Rule.validate class method that will raise exceptions
Add Rule.validate class method that will raise exceptions
Python
mit
PatrikValkovic/grammpy
#!/usr/bin/env python """ :Author Patrik Valkovic :Created 23.06.2017 16:39 :Licence GNUv3 Part of grammpy """ from .Rule import Rule class IsMethodsRuleExtension(Rule): @classmethod def is_regular(cls): raise NotImplementedError() @classmethod def is_contextfree(cls): raise NotImpl...
#!/usr/bin/env python """ :Author Patrik Valkovic :Created 23.06.2017 16:39 :Licence GNUv3 Part of grammpy """ from .Rule import Rule class IsMethodsRuleExtension(Rule): @classmethod def is_regular(cls): raise NotImplementedError() @classmethod def is_contextfree(cls): raise NotImpl...
<commit_before>#!/usr/bin/env python """ :Author Patrik Valkovic :Created 23.06.2017 16:39 :Licence GNUv3 Part of grammpy """ from .Rule import Rule class IsMethodsRuleExtension(Rule): @classmethod def is_regular(cls): raise NotImplementedError() @classmethod def is_contextfree(cls): ...
#!/usr/bin/env python """ :Author Patrik Valkovic :Created 23.06.2017 16:39 :Licence GNUv3 Part of grammpy """ from .Rule import Rule class IsMethodsRuleExtension(Rule): @classmethod def is_regular(cls): raise NotImplementedError() @classmethod def is_contextfree(cls): raise NotImpl...
#!/usr/bin/env python """ :Author Patrik Valkovic :Created 23.06.2017 16:39 :Licence GNUv3 Part of grammpy """ from .Rule import Rule class IsMethodsRuleExtension(Rule): @classmethod def is_regular(cls): raise NotImplementedError() @classmethod def is_contextfree(cls): raise NotImpl...
<commit_before>#!/usr/bin/env python """ :Author Patrik Valkovic :Created 23.06.2017 16:39 :Licence GNUv3 Part of grammpy """ from .Rule import Rule class IsMethodsRuleExtension(Rule): @classmethod def is_regular(cls): raise NotImplementedError() @classmethod def is_contextfree(cls): ...
7417c91f630528cc23aba77ef06430504f918fc7
campos_sms/models/res_partner.py
campos_sms/models/res_partner.py
# -*- coding: utf-8 -*- from openerp import models, fields, api import string class ResPartner(models.Model): _inherit = ['res.partner'] mobile_clean = fields.Char(compute='_compute_mobile_clean') @api.multi @api.depends('mobile') def _compute_mobile_clean(self): allowed_chars = '+012345...
# -*- coding: utf-8 -*- from openerp import models, fields, api import string class ResPartner(models.Model): _inherit = ['res.partner'] mobile_clean = fields.Char(compute='_compute_mobile_clean', store=True) @api.multi @api.depends('mobile','phone') def _compute_mobile_clean(self): allo...
Store cleanet phone number for use in SQL extracts
Store cleanet phone number for use in SQL extracts
Python
agpl-3.0
sl2017/campos
# -*- coding: utf-8 -*- from openerp import models, fields, api import string class ResPartner(models.Model): _inherit = ['res.partner'] mobile_clean = fields.Char(compute='_compute_mobile_clean') @api.multi @api.depends('mobile') def _compute_mobile_clean(self): allowed_chars = '+012345...
# -*- coding: utf-8 -*- from openerp import models, fields, api import string class ResPartner(models.Model): _inherit = ['res.partner'] mobile_clean = fields.Char(compute='_compute_mobile_clean', store=True) @api.multi @api.depends('mobile','phone') def _compute_mobile_clean(self): allo...
<commit_before># -*- coding: utf-8 -*- from openerp import models, fields, api import string class ResPartner(models.Model): _inherit = ['res.partner'] mobile_clean = fields.Char(compute='_compute_mobile_clean') @api.multi @api.depends('mobile') def _compute_mobile_clean(self): allowed_c...
# -*- coding: utf-8 -*- from openerp import models, fields, api import string class ResPartner(models.Model): _inherit = ['res.partner'] mobile_clean = fields.Char(compute='_compute_mobile_clean', store=True) @api.multi @api.depends('mobile','phone') def _compute_mobile_clean(self): allo...
# -*- coding: utf-8 -*- from openerp import models, fields, api import string class ResPartner(models.Model): _inherit = ['res.partner'] mobile_clean = fields.Char(compute='_compute_mobile_clean') @api.multi @api.depends('mobile') def _compute_mobile_clean(self): allowed_chars = '+012345...
<commit_before># -*- coding: utf-8 -*- from openerp import models, fields, api import string class ResPartner(models.Model): _inherit = ['res.partner'] mobile_clean = fields.Char(compute='_compute_mobile_clean') @api.multi @api.depends('mobile') def _compute_mobile_clean(self): allowed_c...
c1d27fba7097c4b0521512e83c2bef4b3df57735
hoomd/md/pytest/test_thermoHMA.py
hoomd/md/pytest/test_thermoHMA.py
import hoomd def test_before_attaching(): filt = hoomd.filter.All() thermoHMA = hoomd.md.compute.ThermoHMA(filt, 1.0) assert thermoHMA._filter == filt assert thermoHMA.temperature == 1.0 assert thermoHMA.harmonicPressure == 0.0 assert thermoHMA.potential_energyHMA is None assert thermoHMA....
import hoomd def test_before_attaching(): filt = hoomd.filter.All() thermoHMA = hoomd.md.compute.ThermoHMA(filt, 1.0) assert thermoHMA._filter == filt assert thermoHMA.temperature == 1.0 assert thermoHMA.harmonic_pressure == 0.0 assert thermoHMA.potential_energyHMA is None assert thermoHMA...
Fix property name in test
Fix property name in test
Python
bsd-3-clause
joaander/hoomd-blue,joaander/hoomd-blue,joaander/hoomd-blue,joaander/hoomd-blue,joaander/hoomd-blue,joaander/hoomd-blue
import hoomd def test_before_attaching(): filt = hoomd.filter.All() thermoHMA = hoomd.md.compute.ThermoHMA(filt, 1.0) assert thermoHMA._filter == filt assert thermoHMA.temperature == 1.0 assert thermoHMA.harmonicPressure == 0.0 assert thermoHMA.potential_energyHMA is None assert thermoHMA....
import hoomd def test_before_attaching(): filt = hoomd.filter.All() thermoHMA = hoomd.md.compute.ThermoHMA(filt, 1.0) assert thermoHMA._filter == filt assert thermoHMA.temperature == 1.0 assert thermoHMA.harmonic_pressure == 0.0 assert thermoHMA.potential_energyHMA is None assert thermoHMA...
<commit_before>import hoomd def test_before_attaching(): filt = hoomd.filter.All() thermoHMA = hoomd.md.compute.ThermoHMA(filt, 1.0) assert thermoHMA._filter == filt assert thermoHMA.temperature == 1.0 assert thermoHMA.harmonicPressure == 0.0 assert thermoHMA.potential_energyHMA is None as...
import hoomd def test_before_attaching(): filt = hoomd.filter.All() thermoHMA = hoomd.md.compute.ThermoHMA(filt, 1.0) assert thermoHMA._filter == filt assert thermoHMA.temperature == 1.0 assert thermoHMA.harmonic_pressure == 0.0 assert thermoHMA.potential_energyHMA is None assert thermoHMA...
import hoomd def test_before_attaching(): filt = hoomd.filter.All() thermoHMA = hoomd.md.compute.ThermoHMA(filt, 1.0) assert thermoHMA._filter == filt assert thermoHMA.temperature == 1.0 assert thermoHMA.harmonicPressure == 0.0 assert thermoHMA.potential_energyHMA is None assert thermoHMA....
<commit_before>import hoomd def test_before_attaching(): filt = hoomd.filter.All() thermoHMA = hoomd.md.compute.ThermoHMA(filt, 1.0) assert thermoHMA._filter == filt assert thermoHMA.temperature == 1.0 assert thermoHMA.harmonicPressure == 0.0 assert thermoHMA.potential_energyHMA is None as...
e99c63af5c0143c95f9af10e3a79083235bb7da4
lc0340_longest_substring_with_at_most_k_distinct_characters.py
lc0340_longest_substring_with_at_most_k_distinct_characters.py
"""Leetcode 340. Longest Substring with At Most K Distinct Characters Hard URL: https://leetcode.com/problems/longest-substring-with-at-most-k-distinct-characters/ Given a string, find the length of the longest substring T that contains at most k distinct characters. Example 1: Input: s = "eceba", k = 2 Output: 3 Ex...
"""Leetcode 340. Longest Substring with At Most K Distinct Characters Hard URL: https://leetcode.com/problems/longest-substring-with-at-most-k-distinct-characters/ Given a string, find the length of the longest substring T that contains at most k distinct characters. Example 1: Input: s = "eceba", k = 2 Output: 3 Ex...
Complete two pointers char count dict sol w/ time/space complexity
Complete two pointers char count dict sol w/ time/space complexity
Python
bsd-2-clause
bowen0701/algorithms_data_structures
"""Leetcode 340. Longest Substring with At Most K Distinct Characters Hard URL: https://leetcode.com/problems/longest-substring-with-at-most-k-distinct-characters/ Given a string, find the length of the longest substring T that contains at most k distinct characters. Example 1: Input: s = "eceba", k = 2 Output: 3 Ex...
"""Leetcode 340. Longest Substring with At Most K Distinct Characters Hard URL: https://leetcode.com/problems/longest-substring-with-at-most-k-distinct-characters/ Given a string, find the length of the longest substring T that contains at most k distinct characters. Example 1: Input: s = "eceba", k = 2 Output: 3 Ex...
<commit_before>"""Leetcode 340. Longest Substring with At Most K Distinct Characters Hard URL: https://leetcode.com/problems/longest-substring-with-at-most-k-distinct-characters/ Given a string, find the length of the longest substring T that contains at most k distinct characters. Example 1: Input: s = "eceba", k =...
"""Leetcode 340. Longest Substring with At Most K Distinct Characters Hard URL: https://leetcode.com/problems/longest-substring-with-at-most-k-distinct-characters/ Given a string, find the length of the longest substring T that contains at most k distinct characters. Example 1: Input: s = "eceba", k = 2 Output: 3 Ex...
"""Leetcode 340. Longest Substring with At Most K Distinct Characters Hard URL: https://leetcode.com/problems/longest-substring-with-at-most-k-distinct-characters/ Given a string, find the length of the longest substring T that contains at most k distinct characters. Example 1: Input: s = "eceba", k = 2 Output: 3 Ex...
<commit_before>"""Leetcode 340. Longest Substring with At Most K Distinct Characters Hard URL: https://leetcode.com/problems/longest-substring-with-at-most-k-distinct-characters/ Given a string, find the length of the longest substring T that contains at most k distinct characters. Example 1: Input: s = "eceba", k =...
a3425b010cb252db7dcb19ca6023f1e09999912e
leetcode/389-Find-the-Difference/FindtheDifference_Bit_and_Hash.py
leetcode/389-Find-the-Difference/FindtheDifference_Bit_and_Hash.py
class Solution(object): def findTheDifference(self, s, t): """ :type s: str :type t: str :rtype: str """ chrs = {} res = 0 for w in t: if w not in chrs: chrs[w] = 1 << (ord(w) - 97) res += chrs[w] for w i...
class Solution(object): def findTheDifference(self, s, t): """ :type s: str :type t: str :rtype: str """ chrs = {} res = 0 for w in t: if w not in chrs: chrs[w] = 1 << (ord(w) - 97) res += chrs[w] # it can be ove...
Comment overflow problem on FindtheDiff_BitHash
Comment overflow problem on FindtheDiff_BitHash
Python
mit
Chasego/codi,Chasego/cod,cc13ny/algo,Chasego/codi,Chasego/codirit,cc13ny/Allin,Chasego/codi,cc13ny/Allin,Chasego/codi,cc13ny/Allin,Chasego/codi,cc13ny/Allin,Chasego/cod,Chasego/cod,Chasego/codirit,cc13ny/Allin,Chasego/codirit,Chasego/cod,cc13ny/algo,cc13ny/algo,cc13ny/algo,Chasego/cod,Chasego/codirit,Chasego/codirit,cc...
class Solution(object): def findTheDifference(self, s, t): """ :type s: str :type t: str :rtype: str """ chrs = {} res = 0 for w in t: if w not in chrs: chrs[w] = 1 << (ord(w) - 97) res += chrs[w] for w i...
class Solution(object): def findTheDifference(self, s, t): """ :type s: str :type t: str :rtype: str """ chrs = {} res = 0 for w in t: if w not in chrs: chrs[w] = 1 << (ord(w) - 97) res += chrs[w] # it can be ove...
<commit_before>class Solution(object): def findTheDifference(self, s, t): """ :type s: str :type t: str :rtype: str """ chrs = {} res = 0 for w in t: if w not in chrs: chrs[w] = 1 << (ord(w) - 97) res += chrs[w] ...
class Solution(object): def findTheDifference(self, s, t): """ :type s: str :type t: str :rtype: str """ chrs = {} res = 0 for w in t: if w not in chrs: chrs[w] = 1 << (ord(w) - 97) res += chrs[w] # it can be ove...
class Solution(object): def findTheDifference(self, s, t): """ :type s: str :type t: str :rtype: str """ chrs = {} res = 0 for w in t: if w not in chrs: chrs[w] = 1 << (ord(w) - 97) res += chrs[w] for w i...
<commit_before>class Solution(object): def findTheDifference(self, s, t): """ :type s: str :type t: str :rtype: str """ chrs = {} res = 0 for w in t: if w not in chrs: chrs[w] = 1 << (ord(w) - 97) res += chrs[w] ...
b0fd7fc1866cd85e9d68d5716d8f5aeaff1218c1
tests/__init__.py
tests/__init__.py
"""Unit test suite for HXL proxy.""" import os import re import hxl import unittest.mock TEST_DATA_FILE = os.path.join(os.path.dirname(__file__), 'test-data.sql') # # Mock URL access for local testing # def mock_open_url(url, allow_local=False, timeout=None, verify=True): """ Open local files instead of URL...
"""Unit test suite for HXL proxy.""" import os import re import hxl import unittest.mock TEST_DATA_FILE = os.path.join(os.path.dirname(__file__), 'test-data.sql') # # Mock URL access for local testing # def mock_open_url(url, allow_local=False, timeout=None, verify=True): """ Open local files instead of URL...
Update mock method to match changed return value for libhxl
Update mock method to match changed return value for libhxl
Python
unlicense
HXLStandard/hxl-proxy,HXLStandard/hxl-proxy,HXLStandard/hxl-proxy,HXLStandard/hxl-proxy
"""Unit test suite for HXL proxy.""" import os import re import hxl import unittest.mock TEST_DATA_FILE = os.path.join(os.path.dirname(__file__), 'test-data.sql') # # Mock URL access for local testing # def mock_open_url(url, allow_local=False, timeout=None, verify=True): """ Open local files instead of URL...
"""Unit test suite for HXL proxy.""" import os import re import hxl import unittest.mock TEST_DATA_FILE = os.path.join(os.path.dirname(__file__), 'test-data.sql') # # Mock URL access for local testing # def mock_open_url(url, allow_local=False, timeout=None, verify=True): """ Open local files instead of URL...
<commit_before>"""Unit test suite for HXL proxy.""" import os import re import hxl import unittest.mock TEST_DATA_FILE = os.path.join(os.path.dirname(__file__), 'test-data.sql') # # Mock URL access for local testing # def mock_open_url(url, allow_local=False, timeout=None, verify=True): """ Open local files...
"""Unit test suite for HXL proxy.""" import os import re import hxl import unittest.mock TEST_DATA_FILE = os.path.join(os.path.dirname(__file__), 'test-data.sql') # # Mock URL access for local testing # def mock_open_url(url, allow_local=False, timeout=None, verify=True): """ Open local files instead of URL...
"""Unit test suite for HXL proxy.""" import os import re import hxl import unittest.mock TEST_DATA_FILE = os.path.join(os.path.dirname(__file__), 'test-data.sql') # # Mock URL access for local testing # def mock_open_url(url, allow_local=False, timeout=None, verify=True): """ Open local files instead of URL...
<commit_before>"""Unit test suite for HXL proxy.""" import os import re import hxl import unittest.mock TEST_DATA_FILE = os.path.join(os.path.dirname(__file__), 'test-data.sql') # # Mock URL access for local testing # def mock_open_url(url, allow_local=False, timeout=None, verify=True): """ Open local files...
bd8b0c2c47c1a9433c38123f2533c796fd7f8521
tracing/tracing/extras/symbolizer/symbolize_trace_macho_reader_unittest.py
tracing/tracing/extras/symbolizer/symbolize_trace_macho_reader_unittest.py
#!/usr/bin/env python # Copyright 2017 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. import sys import unittest from . import symbolize_trace_macho_reader class AtosRegexTest(unittest.TestCase): def testRegex(self):...
#!/usr/bin/env python # Copyright 2017 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. import os import sys import unittest from . import symbolize_trace_macho_reader class AtosRegexTest(unittest.TestCase): def testRe...
Work around test failure on Catapult CQ
[Catapult] Work around test failure on Catapult CQ Bug: chromium:1275181 Change-Id: I78e2f62371ebc872706366bb897336c8e5c7f02f Reviewed-on: https://chromium-review.googlesource.com/c/catapult/+/3309287 Commit-Queue: John Chen <334fbfbb4df7c78f091ea1b77c69ca6ac731a3f3@chromium.org> Commit-Queue: Ryan Heise <50ee0a56d43e...
Python
bsd-3-clause
catapult-project/catapult,catapult-project/catapult,catapult-project/catapult,catapult-project/catapult,catapult-project/catapult,catapult-project/catapult,catapult-project/catapult
#!/usr/bin/env python # Copyright 2017 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. import sys import unittest from . import symbolize_trace_macho_reader class AtosRegexTest(unittest.TestCase): def testRegex(self):...
#!/usr/bin/env python # Copyright 2017 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. import os import sys import unittest from . import symbolize_trace_macho_reader class AtosRegexTest(unittest.TestCase): def testRe...
<commit_before>#!/usr/bin/env python # Copyright 2017 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. import sys import unittest from . import symbolize_trace_macho_reader class AtosRegexTest(unittest.TestCase): def t...
#!/usr/bin/env python # Copyright 2017 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. import os import sys import unittest from . import symbolize_trace_macho_reader class AtosRegexTest(unittest.TestCase): def testRe...
#!/usr/bin/env python # Copyright 2017 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. import sys import unittest from . import symbolize_trace_macho_reader class AtosRegexTest(unittest.TestCase): def testRegex(self):...
<commit_before>#!/usr/bin/env python # Copyright 2017 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. import sys import unittest from . import symbolize_trace_macho_reader class AtosRegexTest(unittest.TestCase): def t...
0b4562d15c1c8b544847e7988d26120556a3110d
tests/conftest.py
tests/conftest.py
import os TEST_CONFIG = os.path.join(os.path.dirname(os.path.abspath(__file__)), 'cosmoconfig_test.yaml') # Check to make sure that the test config file is being used. If not, don't run the tests if os.environ['COSMO_CONFIG'] != TEST_CONFIG: raise TypeError('Tests should only be executed with the testing configur...
import os import pytest TEST_CONFIG = os.path.join(os.path.dirname(os.path.abspath(__file__)), 'cosmoconfig_test.yaml') # Check to make sure that the test config file is being used. If not, don't run the tests if os.environ['COSMO_CONFIG'] != TEST_CONFIG: raise TypeError('Tests should only be executed with the te...
Add session-scope clean up that removes the test database
Add session-scope clean up that removes the test database
Python
bsd-3-clause
justincely/cos_monitoring
import os TEST_CONFIG = os.path.join(os.path.dirname(os.path.abspath(__file__)), 'cosmoconfig_test.yaml') # Check to make sure that the test config file is being used. If not, don't run the tests if os.environ['COSMO_CONFIG'] != TEST_CONFIG: raise TypeError('Tests should only be executed with the testing configur...
import os import pytest TEST_CONFIG = os.path.join(os.path.dirname(os.path.abspath(__file__)), 'cosmoconfig_test.yaml') # Check to make sure that the test config file is being used. If not, don't run the tests if os.environ['COSMO_CONFIG'] != TEST_CONFIG: raise TypeError('Tests should only be executed with the te...
<commit_before>import os TEST_CONFIG = os.path.join(os.path.dirname(os.path.abspath(__file__)), 'cosmoconfig_test.yaml') # Check to make sure that the test config file is being used. If not, don't run the tests if os.environ['COSMO_CONFIG'] != TEST_CONFIG: raise TypeError('Tests should only be executed with the t...
import os import pytest TEST_CONFIG = os.path.join(os.path.dirname(os.path.abspath(__file__)), 'cosmoconfig_test.yaml') # Check to make sure that the test config file is being used. If not, don't run the tests if os.environ['COSMO_CONFIG'] != TEST_CONFIG: raise TypeError('Tests should only be executed with the te...
import os TEST_CONFIG = os.path.join(os.path.dirname(os.path.abspath(__file__)), 'cosmoconfig_test.yaml') # Check to make sure that the test config file is being used. If not, don't run the tests if os.environ['COSMO_CONFIG'] != TEST_CONFIG: raise TypeError('Tests should only be executed with the testing configur...
<commit_before>import os TEST_CONFIG = os.path.join(os.path.dirname(os.path.abspath(__file__)), 'cosmoconfig_test.yaml') # Check to make sure that the test config file is being used. If not, don't run the tests if os.environ['COSMO_CONFIG'] != TEST_CONFIG: raise TypeError('Tests should only be executed with the t...
056f794012033fdb6c1eeecfd48dbf3aa76f036a
tests/runtests.py
tests/runtests.py
#!/usr/bin/env python import os import sys from unittest import defaultTestLoader, TextTestRunner, TestSuite TESTS = ('form', 'fields', 'validators', 'widgets', 'webob_wrapper', 'translations', 'ext_csrf', 'ext_i18n') def make_suite(prefix='', extra=()): tests = TESTS + extra test_names = list(prefix + x for ...
#!/usr/bin/env python import os import sys from unittest import defaultTestLoader, TextTestRunner, TestSuite TESTS = ('form', 'fields', 'validators', 'widgets', 'webob_wrapper', 'translations', 'ext_csrf', 'ext_i18n') def make_suite(prefix='', extra=()): tests = TESTS + extra test_names = list(prefix + x for ...
Add back in running of extra tests
Add back in running of extra tests
Python
bsd-3-clause
Khan/wtforms
#!/usr/bin/env python import os import sys from unittest import defaultTestLoader, TextTestRunner, TestSuite TESTS = ('form', 'fields', 'validators', 'widgets', 'webob_wrapper', 'translations', 'ext_csrf', 'ext_i18n') def make_suite(prefix='', extra=()): tests = TESTS + extra test_names = list(prefix + x for ...
#!/usr/bin/env python import os import sys from unittest import defaultTestLoader, TextTestRunner, TestSuite TESTS = ('form', 'fields', 'validators', 'widgets', 'webob_wrapper', 'translations', 'ext_csrf', 'ext_i18n') def make_suite(prefix='', extra=()): tests = TESTS + extra test_names = list(prefix + x for ...
<commit_before>#!/usr/bin/env python import os import sys from unittest import defaultTestLoader, TextTestRunner, TestSuite TESTS = ('form', 'fields', 'validators', 'widgets', 'webob_wrapper', 'translations', 'ext_csrf', 'ext_i18n') def make_suite(prefix='', extra=()): tests = TESTS + extra test_names = list(...
#!/usr/bin/env python import os import sys from unittest import defaultTestLoader, TextTestRunner, TestSuite TESTS = ('form', 'fields', 'validators', 'widgets', 'webob_wrapper', 'translations', 'ext_csrf', 'ext_i18n') def make_suite(prefix='', extra=()): tests = TESTS + extra test_names = list(prefix + x for ...
#!/usr/bin/env python import os import sys from unittest import defaultTestLoader, TextTestRunner, TestSuite TESTS = ('form', 'fields', 'validators', 'widgets', 'webob_wrapper', 'translations', 'ext_csrf', 'ext_i18n') def make_suite(prefix='', extra=()): tests = TESTS + extra test_names = list(prefix + x for ...
<commit_before>#!/usr/bin/env python import os import sys from unittest import defaultTestLoader, TextTestRunner, TestSuite TESTS = ('form', 'fields', 'validators', 'widgets', 'webob_wrapper', 'translations', 'ext_csrf', 'ext_i18n') def make_suite(prefix='', extra=()): tests = TESTS + extra test_names = list(...
07c7f18733bad651ef110b529422fd42bdcf27aa
src/encoded/views/__init__.py
src/encoded/views/__init__.py
from pyramid.httpexceptions import HTTPNotFound from pyramid.view import view_config from random import randint from ..contentbase import ( Root, location_root, ) def includeme(config): # Random processid so etags are invalidated after restart. config.registry['encoded.processid'] = randint(0, 2 ** 32...
import os from pyramid.httpexceptions import HTTPNotFound from pyramid.view import view_config from random import randint from ..contentbase import ( Root, location_root, ) def includeme(config): config.registry['encoded.processid'] = os.getppid() config.add_route('schema', '/profiles/{item_type}.json...
Use parent process id, that of the apache process.
Use parent process id, that of the apache process.
Python
mit
T2DREAM/t2dream-portal,kidaa/encoded,T2DREAM/t2dream-portal,ENCODE-DCC/encoded,4dn-dcic/fourfront,ENCODE-DCC/encoded,ClinGen/clincoded,philiptzou/clincoded,hms-dbmi/fourfront,kidaa/encoded,4dn-dcic/fourfront,ClinGen/clincoded,T2DREAM/t2dream-portal,kidaa/encoded,kidaa/encoded,ENCODE-DCC/snovault,T2DREAM/t2dream-portal,...
from pyramid.httpexceptions import HTTPNotFound from pyramid.view import view_config from random import randint from ..contentbase import ( Root, location_root, ) def includeme(config): # Random processid so etags are invalidated after restart. config.registry['encoded.processid'] = randint(0, 2 ** 32...
import os from pyramid.httpexceptions import HTTPNotFound from pyramid.view import view_config from random import randint from ..contentbase import ( Root, location_root, ) def includeme(config): config.registry['encoded.processid'] = os.getppid() config.add_route('schema', '/profiles/{item_type}.json...
<commit_before>from pyramid.httpexceptions import HTTPNotFound from pyramid.view import view_config from random import randint from ..contentbase import ( Root, location_root, ) def includeme(config): # Random processid so etags are invalidated after restart. config.registry['encoded.processid'] = ran...
import os from pyramid.httpexceptions import HTTPNotFound from pyramid.view import view_config from random import randint from ..contentbase import ( Root, location_root, ) def includeme(config): config.registry['encoded.processid'] = os.getppid() config.add_route('schema', '/profiles/{item_type}.json...
from pyramid.httpexceptions import HTTPNotFound from pyramid.view import view_config from random import randint from ..contentbase import ( Root, location_root, ) def includeme(config): # Random processid so etags are invalidated after restart. config.registry['encoded.processid'] = randint(0, 2 ** 32...
<commit_before>from pyramid.httpexceptions import HTTPNotFound from pyramid.view import view_config from random import randint from ..contentbase import ( Root, location_root, ) def includeme(config): # Random processid so etags are invalidated after restart. config.registry['encoded.processid'] = ran...
0bfee1fff698a984130a99c7ccbff4a787a68eca
cla_backend/apps/status/tests/smoketests.py
cla_backend/apps/status/tests/smoketests.py
import unittest from celery import Celery from django.conf import settings from django.db import connection class SmokeTests(unittest.TestCase): def setUp(self): pass def test_can_access_db(self): "access the database" cursor = connection.cursor() cursor.execute('SELECT 1') ...
import unittest from celery import Celery from django.conf import settings from django.db import connection class SmokeTests(unittest.TestCase): def setUp(self): pass def test_can_access_db(self): "access the database" cursor = connection.cursor() cursor.execute('SELECT 1') ...
Use same settings in smoke test as in real use
Use same settings in smoke test as in real use
Python
mit
ministryofjustice/cla_backend,ministryofjustice/cla_backend,ministryofjustice/cla_backend,ministryofjustice/cla_backend
import unittest from celery import Celery from django.conf import settings from django.db import connection class SmokeTests(unittest.TestCase): def setUp(self): pass def test_can_access_db(self): "access the database" cursor = connection.cursor() cursor.execute('SELECT 1') ...
import unittest from celery import Celery from django.conf import settings from django.db import connection class SmokeTests(unittest.TestCase): def setUp(self): pass def test_can_access_db(self): "access the database" cursor = connection.cursor() cursor.execute('SELECT 1') ...
<commit_before>import unittest from celery import Celery from django.conf import settings from django.db import connection class SmokeTests(unittest.TestCase): def setUp(self): pass def test_can_access_db(self): "access the database" cursor = connection.cursor() cursor.execu...
import unittest from celery import Celery from django.conf import settings from django.db import connection class SmokeTests(unittest.TestCase): def setUp(self): pass def test_can_access_db(self): "access the database" cursor = connection.cursor() cursor.execute('SELECT 1') ...
import unittest from celery import Celery from django.conf import settings from django.db import connection class SmokeTests(unittest.TestCase): def setUp(self): pass def test_can_access_db(self): "access the database" cursor = connection.cursor() cursor.execute('SELECT 1') ...
<commit_before>import unittest from celery import Celery from django.conf import settings from django.db import connection class SmokeTests(unittest.TestCase): def setUp(self): pass def test_can_access_db(self): "access the database" cursor = connection.cursor() cursor.execu...
186d3c637760668d960c50c9f94fad7ff4769598
molly/utils/management/commands/generate_cache_manifest.py
molly/utils/management/commands/generate_cache_manifest.py
import os import os.path from django.core.management.base import NoArgsCommand from django.conf import settings class Command(NoArgsCommand): can_import_settings = True def handle_noargs(self, **options): cache_manifest_path = os.path.join(settings.STATIC_ROOT, ...
import os import os.path from django.core.management.base import NoArgsCommand from django.conf import settings class Command(NoArgsCommand): can_import_settings = True def handle_noargs(self, **options): cache_manifest_path = os.path.join(settings.STATIC_ROOT, ...
Revert "Revert "Don't cache markers, admin files or uncompressed JS/CSS""
Revert "Revert "Don't cache markers, admin files or uncompressed JS/CSS"" This reverts commit 6c488d267cd5919eb545855a522d5cd7ec7d0fec.
Python
apache-2.0
mollyproject/mollyproject,mollyproject/mollyproject,mollyproject/mollyproject
import os import os.path from django.core.management.base import NoArgsCommand from django.conf import settings class Command(NoArgsCommand): can_import_settings = True def handle_noargs(self, **options): cache_manifest_path = os.path.join(settings.STATIC_ROOT, ...
import os import os.path from django.core.management.base import NoArgsCommand from django.conf import settings class Command(NoArgsCommand): can_import_settings = True def handle_noargs(self, **options): cache_manifest_path = os.path.join(settings.STATIC_ROOT, ...
<commit_before>import os import os.path from django.core.management.base import NoArgsCommand from django.conf import settings class Command(NoArgsCommand): can_import_settings = True def handle_noargs(self, **options): cache_manifest_path = os.path.join(settings.STATIC_ROOT, ...
import os import os.path from django.core.management.base import NoArgsCommand from django.conf import settings class Command(NoArgsCommand): can_import_settings = True def handle_noargs(self, **options): cache_manifest_path = os.path.join(settings.STATIC_ROOT, ...
import os import os.path from django.core.management.base import NoArgsCommand from django.conf import settings class Command(NoArgsCommand): can_import_settings = True def handle_noargs(self, **options): cache_manifest_path = os.path.join(settings.STATIC_ROOT, ...
<commit_before>import os import os.path from django.core.management.base import NoArgsCommand from django.conf import settings class Command(NoArgsCommand): can_import_settings = True def handle_noargs(self, **options): cache_manifest_path = os.path.join(settings.STATIC_ROOT, ...
223c268d58645fbecdddb24ff84587dc803bfc87
braubuddy/tests/thermometer/test_auto.py
braubuddy/tests/thermometer/test_auto.py
""" Braubuddy Dummy thermometer unit tests. """ import unittest from mock import patch, call, MagicMock from braubuddy.thermometer import auto from braubuddy.thermometer import dummy from braubuddy.thermometer import ds18b20_gpio from braubuddy.thermometer import temper_usb from braubuddy.thermometer import Device...
""" Braubuddy Auto thermometer unit tests. """ import unittest from mock import patch, call, MagicMock from braubuddy.thermometer import auto from braubuddy.thermometer import dummy from braubuddy.thermometer import ds18b20_gpio from braubuddy.thermometer import temper_usb class TestAuto(unittest.TestCase): ...
Fix docstring and remove unnecessary imports.
Fix docstring and remove unnecessary imports.
Python
bsd-3-clause
amorphic/braubuddy,amorphic/braubuddy,amorphic/braubuddy
""" Braubuddy Dummy thermometer unit tests. """ import unittest from mock import patch, call, MagicMock from braubuddy.thermometer import auto from braubuddy.thermometer import dummy from braubuddy.thermometer import ds18b20_gpio from braubuddy.thermometer import temper_usb from braubuddy.thermometer import Device...
""" Braubuddy Auto thermometer unit tests. """ import unittest from mock import patch, call, MagicMock from braubuddy.thermometer import auto from braubuddy.thermometer import dummy from braubuddy.thermometer import ds18b20_gpio from braubuddy.thermometer import temper_usb class TestAuto(unittest.TestCase): ...
<commit_before>""" Braubuddy Dummy thermometer unit tests. """ import unittest from mock import patch, call, MagicMock from braubuddy.thermometer import auto from braubuddy.thermometer import dummy from braubuddy.thermometer import ds18b20_gpio from braubuddy.thermometer import temper_usb from braubuddy.thermomete...
""" Braubuddy Auto thermometer unit tests. """ import unittest from mock import patch, call, MagicMock from braubuddy.thermometer import auto from braubuddy.thermometer import dummy from braubuddy.thermometer import ds18b20_gpio from braubuddy.thermometer import temper_usb class TestAuto(unittest.TestCase): ...
""" Braubuddy Dummy thermometer unit tests. """ import unittest from mock import patch, call, MagicMock from braubuddy.thermometer import auto from braubuddy.thermometer import dummy from braubuddy.thermometer import ds18b20_gpio from braubuddy.thermometer import temper_usb from braubuddy.thermometer import Device...
<commit_before>""" Braubuddy Dummy thermometer unit tests. """ import unittest from mock import patch, call, MagicMock from braubuddy.thermometer import auto from braubuddy.thermometer import dummy from braubuddy.thermometer import ds18b20_gpio from braubuddy.thermometer import temper_usb from braubuddy.thermomete...
53c751e86b6ca2dd5076e0a09e7c0e4663c1fcbc
edx_data_research/cli/commands.py
edx_data_research/cli/commands.py
""" In this module we define the interface between the cli input provided by the user and the analytics required by the user """ from edx_data_research.reporting.basic import (user_info, ip_to_country, course_completers) from edx_data_research.reporting.edx_base import EdX...
""" In this module we define the interface between the cli input provided by the user and the analytics required by the user """ from edx_data_research.reporting.basic import (user_info, ip_to_country, course_completers) from edx_data_research.reporting.edx_base import EdX...
Add function to call problem_ids report generation
Add function to call problem_ids report generation
Python
mit
McGillX/edx_data_research,McGillX/edx_data_research,McGillX/edx_data_research
""" In this module we define the interface between the cli input provided by the user and the analytics required by the user """ from edx_data_research.reporting.basic import (user_info, ip_to_country, course_completers) from edx_data_research.reporting.edx_base import EdX...
""" In this module we define the interface between the cli input provided by the user and the analytics required by the user """ from edx_data_research.reporting.basic import (user_info, ip_to_country, course_completers) from edx_data_research.reporting.edx_base import EdX...
<commit_before>""" In this module we define the interface between the cli input provided by the user and the analytics required by the user """ from edx_data_research.reporting.basic import (user_info, ip_to_country, course_completers) from edx_data_research.reporting.edx_...
""" In this module we define the interface between the cli input provided by the user and the analytics required by the user """ from edx_data_research.reporting.basic import (user_info, ip_to_country, course_completers) from edx_data_research.reporting.edx_base import EdX...
""" In this module we define the interface between the cli input provided by the user and the analytics required by the user """ from edx_data_research.reporting.basic import (user_info, ip_to_country, course_completers) from edx_data_research.reporting.edx_base import EdX...
<commit_before>""" In this module we define the interface between the cli input provided by the user and the analytics required by the user """ from edx_data_research.reporting.basic import (user_info, ip_to_country, course_completers) from edx_data_research.reporting.edx_...
fe715bb784326a661b14d01e02189074228e7c13
securedrop/tests/test_manage.py
securedrop/tests/test_manage.py
# -*- coding: utf-8 -*- import manage import unittest class TestManagePy(unittest.TestCase): def test_parse_args(self): # just test that the arg parser is stable manage.get_args()
# -*- coding: utf-8 -*- import manage import mock from StringIO import StringIO import sys import unittest import __builtin__ import utils class TestManagePy(unittest.TestCase): def test_parse_args(self): # just test that the arg parser is stable manage.get_args() class TestManagementCommand(u...
Add unit test to check duplicate username error is handled in manage.py
Add unit test to check duplicate username error is handled in manage.py
Python
agpl-3.0
heartsucker/securedrop,conorsch/securedrop,ageis/securedrop,garrettr/securedrop,heartsucker/securedrop,conorsch/securedrop,conorsch/securedrop,ehartsuyker/securedrop,micahflee/securedrop,heartsucker/securedrop,micahflee/securedrop,ehartsuyker/securedrop,ehartsuyker/securedrop,ageis/securedrop,ehartsuyker/securedrop,gar...
# -*- coding: utf-8 -*- import manage import unittest class TestManagePy(unittest.TestCase): def test_parse_args(self): # just test that the arg parser is stable manage.get_args() Add unit test to check duplicate username error is handled in manage.py
# -*- coding: utf-8 -*- import manage import mock from StringIO import StringIO import sys import unittest import __builtin__ import utils class TestManagePy(unittest.TestCase): def test_parse_args(self): # just test that the arg parser is stable manage.get_args() class TestManagementCommand(u...
<commit_before># -*- coding: utf-8 -*- import manage import unittest class TestManagePy(unittest.TestCase): def test_parse_args(self): # just test that the arg parser is stable manage.get_args() <commit_msg>Add unit test to check duplicate username error is handled in manage.py<commit_after>
# -*- coding: utf-8 -*- import manage import mock from StringIO import StringIO import sys import unittest import __builtin__ import utils class TestManagePy(unittest.TestCase): def test_parse_args(self): # just test that the arg parser is stable manage.get_args() class TestManagementCommand(u...
# -*- coding: utf-8 -*- import manage import unittest class TestManagePy(unittest.TestCase): def test_parse_args(self): # just test that the arg parser is stable manage.get_args() Add unit test to check duplicate username error is handled in manage.py# -*- coding: utf-8 -*- import manage import ...
<commit_before># -*- coding: utf-8 -*- import manage import unittest class TestManagePy(unittest.TestCase): def test_parse_args(self): # just test that the arg parser is stable manage.get_args() <commit_msg>Add unit test to check duplicate username error is handled in manage.py<commit_after># -*-...
f137f5b6f5453938e0cc858268a79ee5ef8283d0
version.py
version.py
major = 0 minor=0 patch=21 branch="master" timestamp=1376526439.16
major = 0 minor=0 patch=22 branch="master" timestamp=1376526477.22
Tag commit for v0.0.22-master generated by gitmake.py
Tag commit for v0.0.22-master generated by gitmake.py
Python
mit
ryansturmer/gitmake
major = 0 minor=0 patch=21 branch="master" timestamp=1376526439.16Tag commit for v0.0.22-master generated by gitmake.py
major = 0 minor=0 patch=22 branch="master" timestamp=1376526477.22
<commit_before>major = 0 minor=0 patch=21 branch="master" timestamp=1376526439.16<commit_msg>Tag commit for v0.0.22-master generated by gitmake.py<commit_after>
major = 0 minor=0 patch=22 branch="master" timestamp=1376526477.22
major = 0 minor=0 patch=21 branch="master" timestamp=1376526439.16Tag commit for v0.0.22-master generated by gitmake.pymajor = 0 minor=0 patch=22 branch="master" timestamp=1376526477.22
<commit_before>major = 0 minor=0 patch=21 branch="master" timestamp=1376526439.16<commit_msg>Tag commit for v0.0.22-master generated by gitmake.py<commit_after>major = 0 minor=0 patch=22 branch="master" timestamp=1376526477.22
c0cecdc7e754090f25f48637de88d2d07a3ef58f
ctypeslib/test/test_dynmodule.py
ctypeslib/test/test_dynmodule.py
# Basic test of dynamic code generation import unittest import os, glob import stdio from ctypes import POINTER, c_int class DynModTest(unittest.TestCase): def tearDown(self): for fnm in glob.glob(stdio._gen_basename + ".*"): try: os.remove(fnm) except IOError: ...
# Basic test of dynamic code generation import unittest import os, glob import stdio from ctypes import POINTER, c_int class DynModTest(unittest.TestCase): def test_fopen(self): self.failUnlessEqual(stdio.fopen.restype, POINTER(stdio.FILE)) self.failUnlessEqual(stdio.fopen.argtypes, [stdio.STRING...
Remove now useless TearDown method.
Remove now useless TearDown method.
Python
mit
sugarmanz/ctypeslib
# Basic test of dynamic code generation import unittest import os, glob import stdio from ctypes import POINTER, c_int class DynModTest(unittest.TestCase): def tearDown(self): for fnm in glob.glob(stdio._gen_basename + ".*"): try: os.remove(fnm) except IOError: ...
# Basic test of dynamic code generation import unittest import os, glob import stdio from ctypes import POINTER, c_int class DynModTest(unittest.TestCase): def test_fopen(self): self.failUnlessEqual(stdio.fopen.restype, POINTER(stdio.FILE)) self.failUnlessEqual(stdio.fopen.argtypes, [stdio.STRING...
<commit_before># Basic test of dynamic code generation import unittest import os, glob import stdio from ctypes import POINTER, c_int class DynModTest(unittest.TestCase): def tearDown(self): for fnm in glob.glob(stdio._gen_basename + ".*"): try: os.remove(fnm) excep...
# Basic test of dynamic code generation import unittest import os, glob import stdio from ctypes import POINTER, c_int class DynModTest(unittest.TestCase): def test_fopen(self): self.failUnlessEqual(stdio.fopen.restype, POINTER(stdio.FILE)) self.failUnlessEqual(stdio.fopen.argtypes, [stdio.STRING...
# Basic test of dynamic code generation import unittest import os, glob import stdio from ctypes import POINTER, c_int class DynModTest(unittest.TestCase): def tearDown(self): for fnm in glob.glob(stdio._gen_basename + ".*"): try: os.remove(fnm) except IOError: ...
<commit_before># Basic test of dynamic code generation import unittest import os, glob import stdio from ctypes import POINTER, c_int class DynModTest(unittest.TestCase): def tearDown(self): for fnm in glob.glob(stdio._gen_basename + ".*"): try: os.remove(fnm) excep...
dbbbb763db09fdf777558b781a29d4b8a71b3e62
src/DeepLearn/venv/Lab/Array.py
src/DeepLearn/venv/Lab/Array.py
import numpy as np arr1 = np.array([[1,2],[3,4]]) arr2 = np.array([[5,6],[7,8]]) arr3 = np.array([[1,2],[3,4],[5,6]]) arr4 = np.array([7,8]) # 列出矩陣的維度 # print(arr1.shape) # print(arr1.shape[0]) # 矩陣乘積 # print(np.dot(arr1,arr2)) print(np.dot(arr3,arr4)) # print(arr1*arr2)
import numpy as np arr1 = np.array([[1,2],[3,4]]) arr2 = np.array([[5,6],[7,8]]) arr3 = np.array([[1,2],[3,4],[5,6]]) arr4 = np.array([7,8]) # 列出矩陣的維度 # print(arr1.shape) # print(arr1.shape[0]) # 矩陣乘積 # print(np.dot(arr1,arr2)) print(np.dot(arr3,arr4)) print(1*7+2*7) # print(arr1*arr2)
Create 3 layer nt sample
Create 3 layer nt sample
Python
mit
KarateJB/Python.Practice,KarateJB/Python.Practice,KarateJB/Python.Practice,KarateJB/Python.Practice
import numpy as np arr1 = np.array([[1,2],[3,4]]) arr2 = np.array([[5,6],[7,8]]) arr3 = np.array([[1,2],[3,4],[5,6]]) arr4 = np.array([7,8]) # 列出矩陣的維度 # print(arr1.shape) # print(arr1.shape[0]) # 矩陣乘積 # print(np.dot(arr1,arr2)) print(np.dot(arr3,arr4)) # print(arr1*arr2) Create 3 layer nt sample
import numpy as np arr1 = np.array([[1,2],[3,4]]) arr2 = np.array([[5,6],[7,8]]) arr3 = np.array([[1,2],[3,4],[5,6]]) arr4 = np.array([7,8]) # 列出矩陣的維度 # print(arr1.shape) # print(arr1.shape[0]) # 矩陣乘積 # print(np.dot(arr1,arr2)) print(np.dot(arr3,arr4)) print(1*7+2*7) # print(arr1*arr2)
<commit_before>import numpy as np arr1 = np.array([[1,2],[3,4]]) arr2 = np.array([[5,6],[7,8]]) arr3 = np.array([[1,2],[3,4],[5,6]]) arr4 = np.array([7,8]) # 列出矩陣的維度 # print(arr1.shape) # print(arr1.shape[0]) # 矩陣乘積 # print(np.dot(arr1,arr2)) print(np.dot(arr3,arr4)) # print(arr1*arr2) <commit_msg>Create 3 layer...
import numpy as np arr1 = np.array([[1,2],[3,4]]) arr2 = np.array([[5,6],[7,8]]) arr3 = np.array([[1,2],[3,4],[5,6]]) arr4 = np.array([7,8]) # 列出矩陣的維度 # print(arr1.shape) # print(arr1.shape[0]) # 矩陣乘積 # print(np.dot(arr1,arr2)) print(np.dot(arr3,arr4)) print(1*7+2*7) # print(arr1*arr2)
import numpy as np arr1 = np.array([[1,2],[3,4]]) arr2 = np.array([[5,6],[7,8]]) arr3 = np.array([[1,2],[3,4],[5,6]]) arr4 = np.array([7,8]) # 列出矩陣的維度 # print(arr1.shape) # print(arr1.shape[0]) # 矩陣乘積 # print(np.dot(arr1,arr2)) print(np.dot(arr3,arr4)) # print(arr1*arr2) Create 3 layer nt sampleimport numpy as n...
<commit_before>import numpy as np arr1 = np.array([[1,2],[3,4]]) arr2 = np.array([[5,6],[7,8]]) arr3 = np.array([[1,2],[3,4],[5,6]]) arr4 = np.array([7,8]) # 列出矩陣的維度 # print(arr1.shape) # print(arr1.shape[0]) # 矩陣乘積 # print(np.dot(arr1,arr2)) print(np.dot(arr3,arr4)) # print(arr1*arr2) <commit_msg>Create 3 layer...
84aaf1b99c609cffe4f2a9d8825f20fa585fc3d9
calaccess_website/management/commands/updatedownloadswebsite.py
calaccess_website/management/commands/updatedownloadswebsite.py
#!/usr/bin/env python # -*- coding: utf-8 -*- """ Update to the latest CAL-ACCESS snapshot and bake static website pages. """ import logging from django.core.management import call_command from calaccess_raw.management.commands.updatecalaccessrawdata import Command as updatecommand logger = logging.getLogger(__name__) ...
#!/usr/bin/env python # -*- coding: utf-8 -*- """ Update to the latest CAL-ACCESS snapshot and bake static website pages. """ import logging from django.core.management import call_command from calaccess_raw.management.commands.updatecalaccessrawdata import Command as updatecommand logger = logging.getLogger(__name__) ...
Store --keep-publish value in options['publish'] (duh)
Store --keep-publish value in options['publish'] (duh)
Python
mit
california-civic-data-coalition/django-calaccess-downloads-website,california-civic-data-coalition/django-calaccess-downloads-website,california-civic-data-coalition/django-calaccess-downloads-website
#!/usr/bin/env python # -*- coding: utf-8 -*- """ Update to the latest CAL-ACCESS snapshot and bake static website pages. """ import logging from django.core.management import call_command from calaccess_raw.management.commands.updatecalaccessrawdata import Command as updatecommand logger = logging.getLogger(__name__) ...
#!/usr/bin/env python # -*- coding: utf-8 -*- """ Update to the latest CAL-ACCESS snapshot and bake static website pages. """ import logging from django.core.management import call_command from calaccess_raw.management.commands.updatecalaccessrawdata import Command as updatecommand logger = logging.getLogger(__name__) ...
<commit_before>#!/usr/bin/env python # -*- coding: utf-8 -*- """ Update to the latest CAL-ACCESS snapshot and bake static website pages. """ import logging from django.core.management import call_command from calaccess_raw.management.commands.updatecalaccessrawdata import Command as updatecommand logger = logging.getLo...
#!/usr/bin/env python # -*- coding: utf-8 -*- """ Update to the latest CAL-ACCESS snapshot and bake static website pages. """ import logging from django.core.management import call_command from calaccess_raw.management.commands.updatecalaccessrawdata import Command as updatecommand logger = logging.getLogger(__name__) ...
#!/usr/bin/env python # -*- coding: utf-8 -*- """ Update to the latest CAL-ACCESS snapshot and bake static website pages. """ import logging from django.core.management import call_command from calaccess_raw.management.commands.updatecalaccessrawdata import Command as updatecommand logger = logging.getLogger(__name__) ...
<commit_before>#!/usr/bin/env python # -*- coding: utf-8 -*- """ Update to the latest CAL-ACCESS snapshot and bake static website pages. """ import logging from django.core.management import call_command from calaccess_raw.management.commands.updatecalaccessrawdata import Command as updatecommand logger = logging.getLo...
9756366d7bca75c0ea89ce1fface6a7d224f54f7
web/api/__init__.py
web/api/__init__.py
from flask import Blueprint from . import v0 bp = Blueprint('api', __name__) v0.api.init_app(bp) def errorpage(e): code = getattr(e, 'code', 500) if code == 404: return jsonify(msg=str(e)) return jsonify(msg="error", code=code)
from flask import Blueprint from . import v0 bp = Blueprint('api', __name__) v0.api.init_app(bp) def errorpage(e): return v0.api.handle_error(e)
Improve error handling of sipa API
Improve error handling of sipa API
Python
apache-2.0
agdsn/pycroft,lukasjuhrich/pycroft,agdsn/pycroft,agdsn/pycroft,agdsn/pycroft,lukasjuhrich/pycroft,agdsn/pycroft,lukasjuhrich/pycroft,lukasjuhrich/pycroft
from flask import Blueprint from . import v0 bp = Blueprint('api', __name__) v0.api.init_app(bp) def errorpage(e): code = getattr(e, 'code', 500) if code == 404: return jsonify(msg=str(e)) return jsonify(msg="error", code=code) Improve error handling of sipa API
from flask import Blueprint from . import v0 bp = Blueprint('api', __name__) v0.api.init_app(bp) def errorpage(e): return v0.api.handle_error(e)
<commit_before>from flask import Blueprint from . import v0 bp = Blueprint('api', __name__) v0.api.init_app(bp) def errorpage(e): code = getattr(e, 'code', 500) if code == 404: return jsonify(msg=str(e)) return jsonify(msg="error", code=code) <commit_msg>Improve error handling of sipa API<commit_...
from flask import Blueprint from . import v0 bp = Blueprint('api', __name__) v0.api.init_app(bp) def errorpage(e): return v0.api.handle_error(e)
from flask import Blueprint from . import v0 bp = Blueprint('api', __name__) v0.api.init_app(bp) def errorpage(e): code = getattr(e, 'code', 500) if code == 404: return jsonify(msg=str(e)) return jsonify(msg="error", code=code) Improve error handling of sipa APIfrom flask import Blueprint from ....
<commit_before>from flask import Blueprint from . import v0 bp = Blueprint('api', __name__) v0.api.init_app(bp) def errorpage(e): code = getattr(e, 'code', 500) if code == 404: return jsonify(msg=str(e)) return jsonify(msg="error", code=code) <commit_msg>Improve error handling of sipa API<commit_...
439f57419d861b7e180453263e413ed2b3c56826
restclients/catalyst/gradebook.py
restclients/catalyst/gradebook.py
""" This is the interface for interacting w/ Catalyst GradeBook """ from restclients.catalyst import Catalyst from restclients.exceptions import DataFailureException from restclients.dao import Catalyst_DAO class GradeBook(object): def get_grades_for_student_and_term(self, netid, year, quarter): """ ...
""" This is the interface for interacting w/ Catalyst GradeBook """ from restclients.catalyst import Catalyst from restclients.exceptions import DataFailureException from restclients.dao import Catalyst_DAO class GradeBook(object): def get_grades_for_student_and_term(self, netid, year, quarter): """ ...
Make sure quarters are in the format catalyst wants
Make sure quarters are in the format catalyst wants git-svn-id: 24222aecec59d6833d1342da1ba59f27d6df2b08@636 3f86a6b1-f777-4bc2-bf3d-37c8dbe90857
Python
apache-2.0
uw-it-aca/uw-restclients,uw-it-aca/uw-restclients,UWIT-IAM/uw-restclients,UWIT-IAM/uw-restclients,uw-it-cte/uw-restclients,jeffFranklin/uw-restclients,UWIT-IAM/uw-restclients,jeffFranklin/uw-restclients,uw-it-cte/uw-restclients,jeffFranklin/uw-restclients,uw-it-cte/uw-restclients
""" This is the interface for interacting w/ Catalyst GradeBook """ from restclients.catalyst import Catalyst from restclients.exceptions import DataFailureException from restclients.dao import Catalyst_DAO class GradeBook(object): def get_grades_for_student_and_term(self, netid, year, quarter): """ ...
""" This is the interface for interacting w/ Catalyst GradeBook """ from restclients.catalyst import Catalyst from restclients.exceptions import DataFailureException from restclients.dao import Catalyst_DAO class GradeBook(object): def get_grades_for_student_and_term(self, netid, year, quarter): """ ...
<commit_before>""" This is the interface for interacting w/ Catalyst GradeBook """ from restclients.catalyst import Catalyst from restclients.exceptions import DataFailureException from restclients.dao import Catalyst_DAO class GradeBook(object): def get_grades_for_student_and_term(self, netid, year, quarter): ...
""" This is the interface for interacting w/ Catalyst GradeBook """ from restclients.catalyst import Catalyst from restclients.exceptions import DataFailureException from restclients.dao import Catalyst_DAO class GradeBook(object): def get_grades_for_student_and_term(self, netid, year, quarter): """ ...
""" This is the interface for interacting w/ Catalyst GradeBook """ from restclients.catalyst import Catalyst from restclients.exceptions import DataFailureException from restclients.dao import Catalyst_DAO class GradeBook(object): def get_grades_for_student_and_term(self, netid, year, quarter): """ ...
<commit_before>""" This is the interface for interacting w/ Catalyst GradeBook """ from restclients.catalyst import Catalyst from restclients.exceptions import DataFailureException from restclients.dao import Catalyst_DAO class GradeBook(object): def get_grades_for_student_and_term(self, netid, year, quarter): ...
2b933faaf2f9aba9158d56c49367e423ea1a2ea3
pelican/plugins/related_posts.py
pelican/plugins/related_posts.py
from pelican import signals """ Related posts plugin for Pelican ================================ Adds related_posts variable to article's context """ related_posts = [] def add_related_posts(generator, metadata): if 'tags' in metadata: for tag in metadata['tags']: #print tag for r...
from pelican import signals """ Related posts plugin for Pelican ================================ Adds related_posts variable to article's context Settings -------- To enable, add from pelican.plugins import related_posts PLUGINS = [related_posts] to your settings.py. Usage ----- {% if article.re...
Add usage and intallation instructions
Add usage and intallation instructions
Python
agpl-3.0
alexras/pelican,HyperGroups/pelican,jvehent/pelican,11craft/pelican,51itclub/pelican,number5/pelican,avaris/pelican,treyhunner/pelican,number5/pelican,deved69/pelican-1,lazycoder-ru/pelican,Polyconseil/pelican,simonjj/pelican,ehashman/pelican,koobs/pelican,florianjacob/pelican,joetboole/pelican,sunzhongwei/pelican,Giov...
from pelican import signals """ Related posts plugin for Pelican ================================ Adds related_posts variable to article's context """ related_posts = [] def add_related_posts(generator, metadata): if 'tags' in metadata: for tag in metadata['tags']: #print tag for r...
from pelican import signals """ Related posts plugin for Pelican ================================ Adds related_posts variable to article's context Settings -------- To enable, add from pelican.plugins import related_posts PLUGINS = [related_posts] to your settings.py. Usage ----- {% if article.re...
<commit_before>from pelican import signals """ Related posts plugin for Pelican ================================ Adds related_posts variable to article's context """ related_posts = [] def add_related_posts(generator, metadata): if 'tags' in metadata: for tag in metadata['tags']: #print tag ...
from pelican import signals """ Related posts plugin for Pelican ================================ Adds related_posts variable to article's context Settings -------- To enable, add from pelican.plugins import related_posts PLUGINS = [related_posts] to your settings.py. Usage ----- {% if article.re...
from pelican import signals """ Related posts plugin for Pelican ================================ Adds related_posts variable to article's context """ related_posts = [] def add_related_posts(generator, metadata): if 'tags' in metadata: for tag in metadata['tags']: #print tag for r...
<commit_before>from pelican import signals """ Related posts plugin for Pelican ================================ Adds related_posts variable to article's context """ related_posts = [] def add_related_posts(generator, metadata): if 'tags' in metadata: for tag in metadata['tags']: #print tag ...
755e4c5ca84072d9983de0b1a0e76419cde77f66
lib/repo/git_hooks/update.d/02-block_change_top_level_master.py
lib/repo/git_hooks/update.d/02-block_change_top_level_master.py
#!/usr/bin/env python3 import os import subprocess import sys if __name__ == '__main__': ref_name = sys.argv[1] old_commit = sys.argv[2] new_commit = sys.argv[3] # no need to check if old_commit or new_commit are 0, master can't be deleted or created if ref_name == 'refs/heads/master' and os.envi...
#!/usr/bin/env python3 import os import subprocess import sys if __name__ == '__main__': ref_name = sys.argv[1] old_commit = sys.argv[2] new_commit = sys.argv[3] # no need to check if old_commit or new_commit are 0, master can't be deleted or created if ref_name == 'refs/heads/master' and os.envi...
Fix top level hook to not use renames
git: Fix top level hook to not use renames
Python
mit
benjaminvialle/Markus,MarkUsProject/Markus,MarkUsProject/Markus,benjaminvialle/Markus,benjaminvialle/Markus,benjaminvialle/Markus,benjaminvialle/Markus,MarkUsProject/Markus,MarkUsProject/Markus,benjaminvialle/Markus,MarkUsProject/Markus,MarkUsProject/Markus,benjaminvialle/Markus,MarkUsProject/Markus,MarkUsProject/Marku...
#!/usr/bin/env python3 import os import subprocess import sys if __name__ == '__main__': ref_name = sys.argv[1] old_commit = sys.argv[2] new_commit = sys.argv[3] # no need to check if old_commit or new_commit are 0, master can't be deleted or created if ref_name == 'refs/heads/master' and os.envi...
#!/usr/bin/env python3 import os import subprocess import sys if __name__ == '__main__': ref_name = sys.argv[1] old_commit = sys.argv[2] new_commit = sys.argv[3] # no need to check if old_commit or new_commit are 0, master can't be deleted or created if ref_name == 'refs/heads/master' and os.envi...
<commit_before>#!/usr/bin/env python3 import os import subprocess import sys if __name__ == '__main__': ref_name = sys.argv[1] old_commit = sys.argv[2] new_commit = sys.argv[3] # no need to check if old_commit or new_commit are 0, master can't be deleted or created if ref_name == 'refs/heads/mast...
#!/usr/bin/env python3 import os import subprocess import sys if __name__ == '__main__': ref_name = sys.argv[1] old_commit = sys.argv[2] new_commit = sys.argv[3] # no need to check if old_commit or new_commit are 0, master can't be deleted or created if ref_name == 'refs/heads/master' and os.envi...
#!/usr/bin/env python3 import os import subprocess import sys if __name__ == '__main__': ref_name = sys.argv[1] old_commit = sys.argv[2] new_commit = sys.argv[3] # no need to check if old_commit or new_commit are 0, master can't be deleted or created if ref_name == 'refs/heads/master' and os.envi...
<commit_before>#!/usr/bin/env python3 import os import subprocess import sys if __name__ == '__main__': ref_name = sys.argv[1] old_commit = sys.argv[2] new_commit = sys.argv[3] # no need to check if old_commit or new_commit are 0, master can't be deleted or created if ref_name == 'refs/heads/mast...
c43d58ac79d6144eb6252ff611cc9605f290006d
patches/1401/p01_move_related_property_setters_to_custom_field.py
patches/1401/p01_move_related_property_setters_to_custom_field.py
# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt import webnotes from webnotes.model.meta import get_field def execute(): webnotes.reload_doc("core", "doctype", "custom_field") custom_fields = {} for cf in webnotes.conn.sql("""selec...
# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt import webnotes def execute(): webnotes.reload_doc("core", "doctype", "custom_field") cf_doclist = webnotes.get_doctype("Custom Field") delete_list = [] for d in webnotes.conn.sql("...
Delete Property Setters for Custom Fields, and set them inside Custom Field
Delete Property Setters for Custom Fields, and set them inside Custom Field
Python
agpl-3.0
hatwar/buyback-erpnext,indictranstech/osmosis-erpnext,suyashphadtare/vestasi-erp-jan-end,Drooids/erpnext,gangadharkadam/saloon_erp_install,indictranstech/buyback-erp,suyashphadtare/gd-erp,geekroot/erpnext,gangadhar-kadam/verve_erp,anandpdoshi/erpnext,suyashphadtare/vestasi-update-erp,anandpdoshi/erpnext,sagar30051991/o...
# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt import webnotes from webnotes.model.meta import get_field def execute(): webnotes.reload_doc("core", "doctype", "custom_field") custom_fields = {} for cf in webnotes.conn.sql("""selec...
# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt import webnotes def execute(): webnotes.reload_doc("core", "doctype", "custom_field") cf_doclist = webnotes.get_doctype("Custom Field") delete_list = [] for d in webnotes.conn.sql("...
<commit_before># Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt import webnotes from webnotes.model.meta import get_field def execute(): webnotes.reload_doc("core", "doctype", "custom_field") custom_fields = {} for cf in webnotes.co...
# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt import webnotes def execute(): webnotes.reload_doc("core", "doctype", "custom_field") cf_doclist = webnotes.get_doctype("Custom Field") delete_list = [] for d in webnotes.conn.sql("...
# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt import webnotes from webnotes.model.meta import get_field def execute(): webnotes.reload_doc("core", "doctype", "custom_field") custom_fields = {} for cf in webnotes.conn.sql("""selec...
<commit_before># Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt import webnotes from webnotes.model.meta import get_field def execute(): webnotes.reload_doc("core", "doctype", "custom_field") custom_fields = {} for cf in webnotes.co...
6af3c515a98ac1be7f6acf5ddb6a2d114ac1336c
shifter.py
shifter.py
from image import ImageWithWCS import numpy as np from os import path def shift_images(files, source_dir, output_file='_shifted'): """Align images based on astrometry.""" ref = files[0] # TODO: make reference image an input ref_im = ImageWithWCS(path.join(source_dir, ref)) ref_pix = np.int32(np.arra...
from image import ImageWithWCS import numpy as np from os import path def shift_images(files, source_dir, output_file='_shifted'): """Align images based on astrometry.""" ref = files[0] # TODO: make reference image an input ref_im = ImageWithWCS(path.join(source_dir, ref)) ref_pix = np.int32(np.arra...
Fix order of components of shift
Fix order of components of shift FITS and bumpy have opposite conventions as to which axis is the first axis
Python
bsd-3-clause
mwcraig/msumastro
from image import ImageWithWCS import numpy as np from os import path def shift_images(files, source_dir, output_file='_shifted'): """Align images based on astrometry.""" ref = files[0] # TODO: make reference image an input ref_im = ImageWithWCS(path.join(source_dir, ref)) ref_pix = np.int32(np.arra...
from image import ImageWithWCS import numpy as np from os import path def shift_images(files, source_dir, output_file='_shifted'): """Align images based on astrometry.""" ref = files[0] # TODO: make reference image an input ref_im = ImageWithWCS(path.join(source_dir, ref)) ref_pix = np.int32(np.arra...
<commit_before>from image import ImageWithWCS import numpy as np from os import path def shift_images(files, source_dir, output_file='_shifted'): """Align images based on astrometry.""" ref = files[0] # TODO: make reference image an input ref_im = ImageWithWCS(path.join(source_dir, ref)) ref_pix = n...
from image import ImageWithWCS import numpy as np from os import path def shift_images(files, source_dir, output_file='_shifted'): """Align images based on astrometry.""" ref = files[0] # TODO: make reference image an input ref_im = ImageWithWCS(path.join(source_dir, ref)) ref_pix = np.int32(np.arra...
from image import ImageWithWCS import numpy as np from os import path def shift_images(files, source_dir, output_file='_shifted'): """Align images based on astrometry.""" ref = files[0] # TODO: make reference image an input ref_im = ImageWithWCS(path.join(source_dir, ref)) ref_pix = np.int32(np.arra...
<commit_before>from image import ImageWithWCS import numpy as np from os import path def shift_images(files, source_dir, output_file='_shifted'): """Align images based on astrometry.""" ref = files[0] # TODO: make reference image an input ref_im = ImageWithWCS(path.join(source_dir, ref)) ref_pix = n...
8063e3b863ff4944f95ac27ff4329716fa03efc8
paystackapi/tests/test_cpanel.py
paystackapi/tests/test_cpanel.py
import httpretty from paystackapi.tests.base_test_case import BaseTestCase from paystackapi.cpanel import ControlPanel class TestPage(BaseTestCase): @httpretty.activate def test_fetch_payment_session_timeout(self): """Method defined to test fetch payment session timeout.""" httpretty.registe...
import httpretty from paystackapi.tests.base_test_case import BaseTestCase from paystackapi.cpanel import ControlPanel class TestPage(BaseTestCase): @httpretty.activate def test_fetch_payment_session_timeout(self): """Method defined to test fetch payment session timeout.""" httpretty.registe...
Update control panel test for fetch
Update control panel test for fetch
Python
mit
andela-sjames/paystack-python
import httpretty from paystackapi.tests.base_test_case import BaseTestCase from paystackapi.cpanel import ControlPanel class TestPage(BaseTestCase): @httpretty.activate def test_fetch_payment_session_timeout(self): """Method defined to test fetch payment session timeout.""" httpretty.registe...
import httpretty from paystackapi.tests.base_test_case import BaseTestCase from paystackapi.cpanel import ControlPanel class TestPage(BaseTestCase): @httpretty.activate def test_fetch_payment_session_timeout(self): """Method defined to test fetch payment session timeout.""" httpretty.registe...
<commit_before>import httpretty from paystackapi.tests.base_test_case import BaseTestCase from paystackapi.cpanel import ControlPanel class TestPage(BaseTestCase): @httpretty.activate def test_fetch_payment_session_timeout(self): """Method defined to test fetch payment session timeout.""" ht...
import httpretty from paystackapi.tests.base_test_case import BaseTestCase from paystackapi.cpanel import ControlPanel class TestPage(BaseTestCase): @httpretty.activate def test_fetch_payment_session_timeout(self): """Method defined to test fetch payment session timeout.""" httpretty.registe...
import httpretty from paystackapi.tests.base_test_case import BaseTestCase from paystackapi.cpanel import ControlPanel class TestPage(BaseTestCase): @httpretty.activate def test_fetch_payment_session_timeout(self): """Method defined to test fetch payment session timeout.""" httpretty.registe...
<commit_before>import httpretty from paystackapi.tests.base_test_case import BaseTestCase from paystackapi.cpanel import ControlPanel class TestPage(BaseTestCase): @httpretty.activate def test_fetch_payment_session_timeout(self): """Method defined to test fetch payment session timeout.""" ht...
cc7319fa8ac99049b3fcc86c7f2f075ebd2e7124
pylatex/base_classes/section.py
pylatex/base_classes/section.py
# -*- coding: utf-8 -*- """ This module implements the class that deals with sections. .. :copyright: (c) 2014 by Jelte Fennema. :license: MIT, see License for more details. """ from . import Container, Command class SectionBase(Container): """A class that is the base for all section type classes.""" ...
# -*- coding: utf-8 -*- """ This module implements the class that deals with sections. .. :copyright: (c) 2014 by Jelte Fennema. :license: MIT, see License for more details. """ from . import Container, Command class SectionBase(Container): """A class that is the base for all section type classes.""" ...
Set end_paragraph to True by default
Section: Set end_paragraph to True by default
Python
mit
bjodah/PyLaTeX,JelteF/PyLaTeX,bjodah/PyLaTeX,ovaskevich/PyLaTeX,ovaskevich/PyLaTeX,JelteF/PyLaTeX
# -*- coding: utf-8 -*- """ This module implements the class that deals with sections. .. :copyright: (c) 2014 by Jelte Fennema. :license: MIT, see License for more details. """ from . import Container, Command class SectionBase(Container): """A class that is the base for all section type classes.""" ...
# -*- coding: utf-8 -*- """ This module implements the class that deals with sections. .. :copyright: (c) 2014 by Jelte Fennema. :license: MIT, see License for more details. """ from . import Container, Command class SectionBase(Container): """A class that is the base for all section type classes.""" ...
<commit_before># -*- coding: utf-8 -*- """ This module implements the class that deals with sections. .. :copyright: (c) 2014 by Jelte Fennema. :license: MIT, see License for more details. """ from . import Container, Command class SectionBase(Container): """A class that is the base for all section type c...
# -*- coding: utf-8 -*- """ This module implements the class that deals with sections. .. :copyright: (c) 2014 by Jelte Fennema. :license: MIT, see License for more details. """ from . import Container, Command class SectionBase(Container): """A class that is the base for all section type classes.""" ...
# -*- coding: utf-8 -*- """ This module implements the class that deals with sections. .. :copyright: (c) 2014 by Jelte Fennema. :license: MIT, see License for more details. """ from . import Container, Command class SectionBase(Container): """A class that is the base for all section type classes.""" ...
<commit_before># -*- coding: utf-8 -*- """ This module implements the class that deals with sections. .. :copyright: (c) 2014 by Jelte Fennema. :license: MIT, see License for more details. """ from . import Container, Command class SectionBase(Container): """A class that is the base for all section type c...
29aa1a440a9ff225d3f9a4773f9097a5efcbd0de
test/integration/test_output.py
test/integration/test_output.py
from ..helpers import * def test_honcho_start_joins_stderr_into_stdout(): ret, out, err = get_honcho_output(['-f', 'Procfile.output', 'start']) assert_equal(ret, 0) assert_in('some normal output', out) assert_in('and then write to stderr', out) assert_equal(err, '') def test_honcho_run_keeps_s...
from ..helpers import * def test_honcho_start_joins_stderr_into_stdout(): ret, out, err = get_honcho_output(['-f', 'Procfile.output', 'start']) assert_equal(ret, 0) assert_regexp_matches(out, r'some normal output') assert_regexp_matches(out, r'and then write to stderr') assert_equal(err, '') d...
Rewrite assertions for Python 2.6 compatibility
Rewrite assertions for Python 2.6 compatibility
Python
mit
janusnic/honcho,xarisd/honcho,myyk/honcho,gratipay/honcho,nickstenning/honcho,nickstenning/honcho,gratipay/honcho
from ..helpers import * def test_honcho_start_joins_stderr_into_stdout(): ret, out, err = get_honcho_output(['-f', 'Procfile.output', 'start']) assert_equal(ret, 0) assert_in('some normal output', out) assert_in('and then write to stderr', out) assert_equal(err, '') def test_honcho_run_keeps_s...
from ..helpers import * def test_honcho_start_joins_stderr_into_stdout(): ret, out, err = get_honcho_output(['-f', 'Procfile.output', 'start']) assert_equal(ret, 0) assert_regexp_matches(out, r'some normal output') assert_regexp_matches(out, r'and then write to stderr') assert_equal(err, '') d...
<commit_before>from ..helpers import * def test_honcho_start_joins_stderr_into_stdout(): ret, out, err = get_honcho_output(['-f', 'Procfile.output', 'start']) assert_equal(ret, 0) assert_in('some normal output', out) assert_in('and then write to stderr', out) assert_equal(err, '') def test_hon...
from ..helpers import * def test_honcho_start_joins_stderr_into_stdout(): ret, out, err = get_honcho_output(['-f', 'Procfile.output', 'start']) assert_equal(ret, 0) assert_regexp_matches(out, r'some normal output') assert_regexp_matches(out, r'and then write to stderr') assert_equal(err, '') d...
from ..helpers import * def test_honcho_start_joins_stderr_into_stdout(): ret, out, err = get_honcho_output(['-f', 'Procfile.output', 'start']) assert_equal(ret, 0) assert_in('some normal output', out) assert_in('and then write to stderr', out) assert_equal(err, '') def test_honcho_run_keeps_s...
<commit_before>from ..helpers import * def test_honcho_start_joins_stderr_into_stdout(): ret, out, err = get_honcho_output(['-f', 'Procfile.output', 'start']) assert_equal(ret, 0) assert_in('some normal output', out) assert_in('and then write to stderr', out) assert_equal(err, '') def test_hon...
bdb7da410d6085a783fdb3cca55b9353fad9b9ed
knowledge_repo/app/auth_providers/debug.py
knowledge_repo/app/auth_providers/debug.py
import flask from flask import request, render_template, flash, redirect, url_for from flask_login import login_user from ..models import User from ..utils.auth import is_safe_url from ..auth_provider import KnowledgeAuthProvider class DebugAuthProvider(KnowledgeAuthProvider): _registry_keys = ['debug'] de...
from ..auth_provider import KnowledgeAuthProvider from ..models import User from ..utils.auth import is_safe_url import flask from flask import ( flash, redirect, render_template, request, url_for, ) from flask_login import login_user class DebugAuthProvider(KnowledgeAuthProvider): _registry_k...
Adjust import statements to be sorted
Adjust import statements to be sorted
Python
apache-2.0
airbnb/knowledge-repo,airbnb/knowledge-repo,airbnb/knowledge-repo,airbnb/knowledge-repo,airbnb/knowledge-repo
import flask from flask import request, render_template, flash, redirect, url_for from flask_login import login_user from ..models import User from ..utils.auth import is_safe_url from ..auth_provider import KnowledgeAuthProvider class DebugAuthProvider(KnowledgeAuthProvider): _registry_keys = ['debug'] de...
from ..auth_provider import KnowledgeAuthProvider from ..models import User from ..utils.auth import is_safe_url import flask from flask import ( flash, redirect, render_template, request, url_for, ) from flask_login import login_user class DebugAuthProvider(KnowledgeAuthProvider): _registry_k...
<commit_before>import flask from flask import request, render_template, flash, redirect, url_for from flask_login import login_user from ..models import User from ..utils.auth import is_safe_url from ..auth_provider import KnowledgeAuthProvider class DebugAuthProvider(KnowledgeAuthProvider): _registry_keys = ['...
from ..auth_provider import KnowledgeAuthProvider from ..models import User from ..utils.auth import is_safe_url import flask from flask import ( flash, redirect, render_template, request, url_for, ) from flask_login import login_user class DebugAuthProvider(KnowledgeAuthProvider): _registry_k...
import flask from flask import request, render_template, flash, redirect, url_for from flask_login import login_user from ..models import User from ..utils.auth import is_safe_url from ..auth_provider import KnowledgeAuthProvider class DebugAuthProvider(KnowledgeAuthProvider): _registry_keys = ['debug'] de...
<commit_before>import flask from flask import request, render_template, flash, redirect, url_for from flask_login import login_user from ..models import User from ..utils.auth import is_safe_url from ..auth_provider import KnowledgeAuthProvider class DebugAuthProvider(KnowledgeAuthProvider): _registry_keys = ['...
26b2ed8c6f47eb87a2851c746e10f2bbe331dc4c
python/qibuild/actions/config.py
python/qibuild/actions/config.py
## Copyright (C) 2011 Aldebaran Robotics """Display the current config """ import os import qitools def configure_parser(parser): """Configure parser for this action """ qitools.qiworktree.work_tree_parser(parser) parser.add_argument("--edit", action="store_true", help="edit the configuration") ...
## Copyright (C) 2011 Aldebaran Robotics """Display the current config """ import os import qitools def configure_parser(parser): """Configure parser for this action """ qitools.qiworktree.work_tree_parser(parser) parser.add_argument("--edit", action="store_true", help="edit the configuration") ...
Check that editor exists when adding
Check that editor exists when adding
Python
bsd-3-clause
dmerejkowsky/qibuild,dmerejkowsky/qibuild,aldebaran/qibuild,dmerejkowsky/qibuild,aldebaran/qibuild,aldebaran/qibuild,dmerejkowsky/qibuild,aldebaran/qibuild,dmerejkowsky/qibuild
## Copyright (C) 2011 Aldebaran Robotics """Display the current config """ import os import qitools def configure_parser(parser): """Configure parser for this action """ qitools.qiworktree.work_tree_parser(parser) parser.add_argument("--edit", action="store_true", help="edit the configuration") ...
## Copyright (C) 2011 Aldebaran Robotics """Display the current config """ import os import qitools def configure_parser(parser): """Configure parser for this action """ qitools.qiworktree.work_tree_parser(parser) parser.add_argument("--edit", action="store_true", help="edit the configuration") ...
<commit_before>## Copyright (C) 2011 Aldebaran Robotics """Display the current config """ import os import qitools def configure_parser(parser): """Configure parser for this action """ qitools.qiworktree.work_tree_parser(parser) parser.add_argument("--edit", action="store_true", help="edit the co...
## Copyright (C) 2011 Aldebaran Robotics """Display the current config """ import os import qitools def configure_parser(parser): """Configure parser for this action """ qitools.qiworktree.work_tree_parser(parser) parser.add_argument("--edit", action="store_true", help="edit the configuration") ...
## Copyright (C) 2011 Aldebaran Robotics """Display the current config """ import os import qitools def configure_parser(parser): """Configure parser for this action """ qitools.qiworktree.work_tree_parser(parser) parser.add_argument("--edit", action="store_true", help="edit the configuration") ...
<commit_before>## Copyright (C) 2011 Aldebaran Robotics """Display the current config """ import os import qitools def configure_parser(parser): """Configure parser for this action """ qitools.qiworktree.work_tree_parser(parser) parser.add_argument("--edit", action="store_true", help="edit the co...
2794f71e1a4c9ac8aa70f22ce3c9d01bf2d7737a
humanize/__init__.py
humanize/__init__.py
__version__ = VERSION = (0, 5, 1) from humanize.time import * from humanize.number import * from humanize.filesize import * from humanize.i18n import activate, deactivate __all__ = ['__version__', 'VERSION', 'naturalday', 'naturaltime', 'ordinal', 'intword', 'naturaldelta', 'intcomma', 'apnumber', 'fractional', '...
__version__ = VERSION = (0, 5, 1) from humanize.time import * from humanize.number import * from humanize.filesize import * from humanize.i18n import activate, deactivate __all__ = [ "__version__", "activate", "apnumber", "deactivate", "fractional", "intcomma", "intword", "naturaldate"...
Format with Black and sort
Format with Black and sort
Python
mit
jmoiron/humanize,jmoiron/humanize
__version__ = VERSION = (0, 5, 1) from humanize.time import * from humanize.number import * from humanize.filesize import * from humanize.i18n import activate, deactivate __all__ = ['__version__', 'VERSION', 'naturalday', 'naturaltime', 'ordinal', 'intword', 'naturaldelta', 'intcomma', 'apnumber', 'fractional', '...
__version__ = VERSION = (0, 5, 1) from humanize.time import * from humanize.number import * from humanize.filesize import * from humanize.i18n import activate, deactivate __all__ = [ "__version__", "activate", "apnumber", "deactivate", "fractional", "intcomma", "intword", "naturaldate"...
<commit_before>__version__ = VERSION = (0, 5, 1) from humanize.time import * from humanize.number import * from humanize.filesize import * from humanize.i18n import activate, deactivate __all__ = ['__version__', 'VERSION', 'naturalday', 'naturaltime', 'ordinal', 'intword', 'naturaldelta', 'intcomma', 'apnumber', ...
__version__ = VERSION = (0, 5, 1) from humanize.time import * from humanize.number import * from humanize.filesize import * from humanize.i18n import activate, deactivate __all__ = [ "__version__", "activate", "apnumber", "deactivate", "fractional", "intcomma", "intword", "naturaldate"...
__version__ = VERSION = (0, 5, 1) from humanize.time import * from humanize.number import * from humanize.filesize import * from humanize.i18n import activate, deactivate __all__ = ['__version__', 'VERSION', 'naturalday', 'naturaltime', 'ordinal', 'intword', 'naturaldelta', 'intcomma', 'apnumber', 'fractional', '...
<commit_before>__version__ = VERSION = (0, 5, 1) from humanize.time import * from humanize.number import * from humanize.filesize import * from humanize.i18n import activate, deactivate __all__ = ['__version__', 'VERSION', 'naturalday', 'naturaltime', 'ordinal', 'intword', 'naturaldelta', 'intcomma', 'apnumber', ...
88592970d58eeff43837a5e175bba95386a8491b
neutron/db/migration/alembic_migrations/versions/newton/expand/3d0e74aa7d37_add_flavor_id_to_routers.py
neutron/db/migration/alembic_migrations/versions/newton/expand/3d0e74aa7d37_add_flavor_id_to_routers.py
# Copyright 2016 Mirantis # # 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...
# Copyright 2016 Mirantis # # 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...
Remove erroneous newton milestone tag
Remove erroneous newton milestone tag Change https://review.openstack.org/268941 inadvertently tagged alembic migration 3d0e74aa7d37 with the newton milestone. Remove it. Change-Id: I46f98a824d2a190c29fb26b62025772de2e4e33e Partial-Bug: #1623108
Python
apache-2.0
openstack/neutron,huntxu/neutron,cloudbase/neutron,sebrandon1/neutron,mahak/neutron,noironetworks/neutron,openstack/neutron,cloudbase/neutron,openstack/neutron,mahak/neutron,huntxu/neutron,noironetworks/neutron,mahak/neutron,eayunstack/neutron,eayunstack/neutron,sebrandon1/neutron
# Copyright 2016 Mirantis # # 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...
# Copyright 2016 Mirantis # # 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...
<commit_before># Copyright 2016 Mirantis # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable l...
# Copyright 2016 Mirantis # # 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...
# Copyright 2016 Mirantis # # 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...
<commit_before># Copyright 2016 Mirantis # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable l...
e1068913bf56d9a8b3bc763eb15673c81d23c85b
openstack/common/report/utils.py
openstack/common/report/utils.py
# Copyright 2013 Red Hat, Inc. # # 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 agre...
# Copyright 2013 Red Hat, Inc. # # 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 agre...
Fix filter() usage due to python 3 compability
Fix filter() usage due to python 3 compability Built-in method filter() returns a list in Python 2.x [1], but it returns an iterator in Python 3.x [2]. To remove the difference (and make code more readable, also), we use list comprehension instead of filer(). [1] http://docs.python.org/2/library/functions.html#filter...
Python
apache-2.0
openstack/oslo.reports,citrix-openstack-build/oslo.reports,DirectXMan12/oslo.reports
# Copyright 2013 Red Hat, Inc. # # 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 agre...
# Copyright 2013 Red Hat, Inc. # # 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 agre...
<commit_before># Copyright 2013 Red Hat, Inc. # # 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 applica...
# Copyright 2013 Red Hat, Inc. # # 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 agre...
# Copyright 2013 Red Hat, Inc. # # 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 agre...
<commit_before># Copyright 2013 Red Hat, Inc. # # 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 applica...
f1c414d91d9b1d9ed90a6b5c676cdc2fb60c4fe4
mongotools/semaphore/semaphore.py
mongotools/semaphore/semaphore.py
class Semaphore(object): """docstring for Semaphore""" def __init__(self, db, id, counter, value, collection_name='mongotools.semaphore'): self._db = db self._name = collection_name self._id = id self._counter = counter self._max = value doc = self._db[self._nam...
class Semaphore(object): """docstring for Semaphore""" def __init__(self, db, id, counter, value, collection_name='mongotools.semaphore'): self._db = db self._name = collection_name self._id = id self._counter = counter self._max = value doc = self._db[self._na...
Add peek to get counter
Add peek to get counter
Python
mit
rick446/MongoTools
class Semaphore(object): """docstring for Semaphore""" def __init__(self, db, id, counter, value, collection_name='mongotools.semaphore'): self._db = db self._name = collection_name self._id = id self._counter = counter self._max = value doc = self._db[self._nam...
class Semaphore(object): """docstring for Semaphore""" def __init__(self, db, id, counter, value, collection_name='mongotools.semaphore'): self._db = db self._name = collection_name self._id = id self._counter = counter self._max = value doc = self._db[self._na...
<commit_before> class Semaphore(object): """docstring for Semaphore""" def __init__(self, db, id, counter, value, collection_name='mongotools.semaphore'): self._db = db self._name = collection_name self._id = id self._counter = counter self._max = value doc = sel...
class Semaphore(object): """docstring for Semaphore""" def __init__(self, db, id, counter, value, collection_name='mongotools.semaphore'): self._db = db self._name = collection_name self._id = id self._counter = counter self._max = value doc = self._db[self._na...
class Semaphore(object): """docstring for Semaphore""" def __init__(self, db, id, counter, value, collection_name='mongotools.semaphore'): self._db = db self._name = collection_name self._id = id self._counter = counter self._max = value doc = self._db[self._nam...
<commit_before> class Semaphore(object): """docstring for Semaphore""" def __init__(self, db, id, counter, value, collection_name='mongotools.semaphore'): self._db = db self._name = collection_name self._id = id self._counter = counter self._max = value doc = sel...
d827256b7d074f8b5086afd78383408d0d6a2ba4
meinberlin/apps/offlineevents/dashboard.py
meinberlin/apps/offlineevents/dashboard.py
from django.utils.translation import ugettext_lazy as _ from meinberlin.apps.dashboard2 import DashboardComponent from meinberlin.apps.dashboard2 import content from . import views from .apps import Config class OfflineEventsComponent(DashboardComponent): app_label = Config.label label = 'offlineevents' ...
from django.utils.translation import ugettext_lazy as _ from meinberlin.apps.dashboard2 import DashboardComponent from meinberlin.apps.dashboard2 import content from . import views from .apps import Config class OfflineEventsComponent(DashboardComponent): app_label = Config.label label = 'offlineevents' ...
Rename offlineevent to offlineevents route
Rename offlineevent to offlineevents route
Python
agpl-3.0
liqd/a4-meinberlin,liqd/a4-meinberlin,liqd/a4-meinberlin,liqd/a4-meinberlin
from django.utils.translation import ugettext_lazy as _ from meinberlin.apps.dashboard2 import DashboardComponent from meinberlin.apps.dashboard2 import content from . import views from .apps import Config class OfflineEventsComponent(DashboardComponent): app_label = Config.label label = 'offlineevents' ...
from django.utils.translation import ugettext_lazy as _ from meinberlin.apps.dashboard2 import DashboardComponent from meinberlin.apps.dashboard2 import content from . import views from .apps import Config class OfflineEventsComponent(DashboardComponent): app_label = Config.label label = 'offlineevents' ...
<commit_before>from django.utils.translation import ugettext_lazy as _ from meinberlin.apps.dashboard2 import DashboardComponent from meinberlin.apps.dashboard2 import content from . import views from .apps import Config class OfflineEventsComponent(DashboardComponent): app_label = Config.label label = 'off...
from django.utils.translation import ugettext_lazy as _ from meinberlin.apps.dashboard2 import DashboardComponent from meinberlin.apps.dashboard2 import content from . import views from .apps import Config class OfflineEventsComponent(DashboardComponent): app_label = Config.label label = 'offlineevents' ...
from django.utils.translation import ugettext_lazy as _ from meinberlin.apps.dashboard2 import DashboardComponent from meinberlin.apps.dashboard2 import content from . import views from .apps import Config class OfflineEventsComponent(DashboardComponent): app_label = Config.label label = 'offlineevents' ...
<commit_before>from django.utils.translation import ugettext_lazy as _ from meinberlin.apps.dashboard2 import DashboardComponent from meinberlin.apps.dashboard2 import content from . import views from .apps import Config class OfflineEventsComponent(DashboardComponent): app_label = Config.label label = 'off...
e8ff222331d9fe6ea5b91a7c673e631effe3d9ec
traits/tests/test_regression.py
traits/tests/test_regression.py
""" General regression tests for fixed bugs. """ import gc import unittest import sys from traits.has_traits import HasTraits def _create_subclass(): class Subclass(HasTraits): pass return Subclass class TestRegression(unittest.TestCase): def test_subclasses_weakref(self): """ Make su...
""" General regression tests for fixed bugs. """ import gc import unittest import sys from traits.has_traits import HasTraits def _create_subclass(): class Subclass(HasTraits): pass return Subclass class TestRegression(unittest.TestCase): def test_subclasses_weakref(self): """ Make su...
Add a test case for the tuple leak in ctraits property.
Add a test case for the tuple leak in ctraits property. Courtesy Robert Kern.
Python
bsd-3-clause
burnpanck/traits,burnpanck/traits
""" General regression tests for fixed bugs. """ import gc import unittest import sys from traits.has_traits import HasTraits def _create_subclass(): class Subclass(HasTraits): pass return Subclass class TestRegression(unittest.TestCase): def test_subclasses_weakref(self): """ Make su...
""" General regression tests for fixed bugs. """ import gc import unittest import sys from traits.has_traits import HasTraits def _create_subclass(): class Subclass(HasTraits): pass return Subclass class TestRegression(unittest.TestCase): def test_subclasses_weakref(self): """ Make su...
<commit_before>""" General regression tests for fixed bugs. """ import gc import unittest import sys from traits.has_traits import HasTraits def _create_subclass(): class Subclass(HasTraits): pass return Subclass class TestRegression(unittest.TestCase): def test_subclasses_weakref(self): ...
""" General regression tests for fixed bugs. """ import gc import unittest import sys from traits.has_traits import HasTraits def _create_subclass(): class Subclass(HasTraits): pass return Subclass class TestRegression(unittest.TestCase): def test_subclasses_weakref(self): """ Make su...
""" General regression tests for fixed bugs. """ import gc import unittest import sys from traits.has_traits import HasTraits def _create_subclass(): class Subclass(HasTraits): pass return Subclass class TestRegression(unittest.TestCase): def test_subclasses_weakref(self): """ Make su...
<commit_before>""" General regression tests for fixed bugs. """ import gc import unittest import sys from traits.has_traits import HasTraits def _create_subclass(): class Subclass(HasTraits): pass return Subclass class TestRegression(unittest.TestCase): def test_subclasses_weakref(self): ...
3bc8aa5499d111e66a6e71882a95bd6c357ac6f6
src/python/tensorflow_cloud/core/tests/examples/multi_file_example/create_model.py
src/python/tensorflow_cloud/core/tests/examples/multi_file_example/create_model.py
# Copyright 2020 Google LLC. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable ...
# Copyright 2020 Google LLC. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable ...
Format code using black and remove comments
Format code using black and remove comments
Python
apache-2.0
tensorflow/cloud,tensorflow/cloud
# Copyright 2020 Google LLC. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable ...
# Copyright 2020 Google LLC. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable ...
<commit_before># Copyright 2020 Google LLC. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required...
# Copyright 2020 Google LLC. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable ...
# Copyright 2020 Google LLC. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable ...
<commit_before># Copyright 2020 Google LLC. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required...
dd110868f3c4fa373e9aeaced58ebcb626d1187b
server.py
server.py
import web from os import path rootdir = path.abspath('./build') def getFile(filename): filename = path.join(rootdir, filename) print filename if (not filename.startswith(rootdir)): return None if (not path.exists(filename)): return None f = open(filename, 'r') contents = f.read...
import web from os import path rootdir = path.abspath('./build') def getFile(filename): filename = path.join(rootdir, filename) print filename if (not filename.startswith(rootdir)): return None if (not path.exists(filename)): return None f = open(filename, 'r') contents = f.read...
Add a Content-type when it's not clear
Add a Content-type when it's not clear
Python
bsd-2-clause
rictic/reconciliation_ui,rictic/reconciliation_ui,rictic/reconciliation_ui
import web from os import path rootdir = path.abspath('./build') def getFile(filename): filename = path.join(rootdir, filename) print filename if (not filename.startswith(rootdir)): return None if (not path.exists(filename)): return None f = open(filename, 'r') contents = f.read...
import web from os import path rootdir = path.abspath('./build') def getFile(filename): filename = path.join(rootdir, filename) print filename if (not filename.startswith(rootdir)): return None if (not path.exists(filename)): return None f = open(filename, 'r') contents = f.read...
<commit_before>import web from os import path rootdir = path.abspath('./build') def getFile(filename): filename = path.join(rootdir, filename) print filename if (not filename.startswith(rootdir)): return None if (not path.exists(filename)): return None f = open(filename, 'r') co...
import web from os import path rootdir = path.abspath('./build') def getFile(filename): filename = path.join(rootdir, filename) print filename if (not filename.startswith(rootdir)): return None if (not path.exists(filename)): return None f = open(filename, 'r') contents = f.read...
import web from os import path rootdir = path.abspath('./build') def getFile(filename): filename = path.join(rootdir, filename) print filename if (not filename.startswith(rootdir)): return None if (not path.exists(filename)): return None f = open(filename, 'r') contents = f.read...
<commit_before>import web from os import path rootdir = path.abspath('./build') def getFile(filename): filename = path.join(rootdir, filename) print filename if (not filename.startswith(rootdir)): return None if (not path.exists(filename)): return None f = open(filename, 'r') co...
3640a8c6057ffac8f8d0f7cd6af8954b4169543d
commands.py
commands.py
from runcommands import command from runcommands.commands import local as _local @command def format_code(check=False): _local(f"black . {'--check' if check else ''}") @command def lint(): _local("flake8 .") @command def test(with_coverage=True, check=True): if with_coverage: _local( ...
from runcommands import command from runcommands.commands import local as _local @command def format_code(check=False): _local(f"black . {'--check' if check else ''}") @command def lint(): _local("flake8 .") @command def test(with_coverage=True, check=True, fail_fast=False): if with_coverage: ...
Add --fail-fast flag to test command
Add --fail-fast flag to test command
Python
mit
wylee/django-local-settings
from runcommands import command from runcommands.commands import local as _local @command def format_code(check=False): _local(f"black . {'--check' if check else ''}") @command def lint(): _local("flake8 .") @command def test(with_coverage=True, check=True): if with_coverage: _local( ...
from runcommands import command from runcommands.commands import local as _local @command def format_code(check=False): _local(f"black . {'--check' if check else ''}") @command def lint(): _local("flake8 .") @command def test(with_coverage=True, check=True, fail_fast=False): if with_coverage: ...
<commit_before>from runcommands import command from runcommands.commands import local as _local @command def format_code(check=False): _local(f"black . {'--check' if check else ''}") @command def lint(): _local("flake8 .") @command def test(with_coverage=True, check=True): if with_coverage: _l...
from runcommands import command from runcommands.commands import local as _local @command def format_code(check=False): _local(f"black . {'--check' if check else ''}") @command def lint(): _local("flake8 .") @command def test(with_coverage=True, check=True, fail_fast=False): if with_coverage: ...
from runcommands import command from runcommands.commands import local as _local @command def format_code(check=False): _local(f"black . {'--check' if check else ''}") @command def lint(): _local("flake8 .") @command def test(with_coverage=True, check=True): if with_coverage: _local( ...
<commit_before>from runcommands import command from runcommands.commands import local as _local @command def format_code(check=False): _local(f"black . {'--check' if check else ''}") @command def lint(): _local("flake8 .") @command def test(with_coverage=True, check=True): if with_coverage: _l...
53a3c61a9facf246810b8be7638b62eda5214a47
djoauth2/conf.py
djoauth2/conf.py
# coding: utf-8 from django.conf import settings from appconf import AppConf class DJOAuth2Conf(AppConf): class Meta: prefix = 'djoauth2' ACCESS_TOKEN_LENGTH = 30 ACCESS_TOKEN_LIFETIME = 3600 ACCESS_TOKENS_REFRESHABLE = True AUTHORIZATION_CODE_LENGTH = 30 AUTHORIZATION_CODE_LIFETIME = 120 CLIENT_...
# coding: utf-8 from django.conf import settings from appconf import AppConf class DJOAuth2Conf(AppConf): class Meta: prefix = 'djoauth2' ACCESS_TOKEN_LENGTH = 30 ACCESS_TOKEN_LIFETIME = 3600 ACCESS_TOKENS_REFRESHABLE = True AUTHORIZATION_CODE_LENGTH = 30 # The specification ( http://tools.ietf.org/...
Update default authorization code lifetime.
Update default authorization code lifetime.
Python
mit
Locu/djoauth2,vden/djoauth2-ng,Locu/djoauth2,seler/djoauth2,seler/djoauth2,vden/djoauth2-ng
# coding: utf-8 from django.conf import settings from appconf import AppConf class DJOAuth2Conf(AppConf): class Meta: prefix = 'djoauth2' ACCESS_TOKEN_LENGTH = 30 ACCESS_TOKEN_LIFETIME = 3600 ACCESS_TOKENS_REFRESHABLE = True AUTHORIZATION_CODE_LENGTH = 30 AUTHORIZATION_CODE_LIFETIME = 120 CLIENT_...
# coding: utf-8 from django.conf import settings from appconf import AppConf class DJOAuth2Conf(AppConf): class Meta: prefix = 'djoauth2' ACCESS_TOKEN_LENGTH = 30 ACCESS_TOKEN_LIFETIME = 3600 ACCESS_TOKENS_REFRESHABLE = True AUTHORIZATION_CODE_LENGTH = 30 # The specification ( http://tools.ietf.org/...
<commit_before># coding: utf-8 from django.conf import settings from appconf import AppConf class DJOAuth2Conf(AppConf): class Meta: prefix = 'djoauth2' ACCESS_TOKEN_LENGTH = 30 ACCESS_TOKEN_LIFETIME = 3600 ACCESS_TOKENS_REFRESHABLE = True AUTHORIZATION_CODE_LENGTH = 30 AUTHORIZATION_CODE_LIFETIME =...
# coding: utf-8 from django.conf import settings from appconf import AppConf class DJOAuth2Conf(AppConf): class Meta: prefix = 'djoauth2' ACCESS_TOKEN_LENGTH = 30 ACCESS_TOKEN_LIFETIME = 3600 ACCESS_TOKENS_REFRESHABLE = True AUTHORIZATION_CODE_LENGTH = 30 # The specification ( http://tools.ietf.org/...
# coding: utf-8 from django.conf import settings from appconf import AppConf class DJOAuth2Conf(AppConf): class Meta: prefix = 'djoauth2' ACCESS_TOKEN_LENGTH = 30 ACCESS_TOKEN_LIFETIME = 3600 ACCESS_TOKENS_REFRESHABLE = True AUTHORIZATION_CODE_LENGTH = 30 AUTHORIZATION_CODE_LIFETIME = 120 CLIENT_...
<commit_before># coding: utf-8 from django.conf import settings from appconf import AppConf class DJOAuth2Conf(AppConf): class Meta: prefix = 'djoauth2' ACCESS_TOKEN_LENGTH = 30 ACCESS_TOKEN_LIFETIME = 3600 ACCESS_TOKENS_REFRESHABLE = True AUTHORIZATION_CODE_LENGTH = 30 AUTHORIZATION_CODE_LIFETIME =...
18e0a57f133779b2001b93f9d16ef500f449ebd9
responsive/context_processors.py
responsive/context_processors.py
from __future__ import unicode_literals from .conf import BREAKPOINTS def _get_device_type(width): "Returns the type based on set breakpoints." sorted_types = sorted(BREAKPOINTS.items(), key=lambda x: x[1]) default_type = None for name, cutoff in sorted_types: if cutoff is None: d...
from __future__ import unicode_literals from .conf import BREAKPOINTS def _get_device_type(width): "Returns the type based on set breakpoints." sorted_types = sorted(BREAKPOINTS.items(), key=lambda x: x[1] or 0) default_type = None for name, cutoff in sorted_types: if cutoff is None: ...
Fix sorting dictionary key, value pairs in Python 3.
Fix sorting dictionary key, value pairs in Python 3.
Python
bsd-2-clause
mlavin/django-responsive,mlavin/django-responsive,mlavin/django-responsive
from __future__ import unicode_literals from .conf import BREAKPOINTS def _get_device_type(width): "Returns the type based on set breakpoints." sorted_types = sorted(BREAKPOINTS.items(), key=lambda x: x[1]) default_type = None for name, cutoff in sorted_types: if cutoff is None: d...
from __future__ import unicode_literals from .conf import BREAKPOINTS def _get_device_type(width): "Returns the type based on set breakpoints." sorted_types = sorted(BREAKPOINTS.items(), key=lambda x: x[1] or 0) default_type = None for name, cutoff in sorted_types: if cutoff is None: ...
<commit_before>from __future__ import unicode_literals from .conf import BREAKPOINTS def _get_device_type(width): "Returns the type based on set breakpoints." sorted_types = sorted(BREAKPOINTS.items(), key=lambda x: x[1]) default_type = None for name, cutoff in sorted_types: if cutoff is None...
from __future__ import unicode_literals from .conf import BREAKPOINTS def _get_device_type(width): "Returns the type based on set breakpoints." sorted_types = sorted(BREAKPOINTS.items(), key=lambda x: x[1] or 0) default_type = None for name, cutoff in sorted_types: if cutoff is None: ...
from __future__ import unicode_literals from .conf import BREAKPOINTS def _get_device_type(width): "Returns the type based on set breakpoints." sorted_types = sorted(BREAKPOINTS.items(), key=lambda x: x[1]) default_type = None for name, cutoff in sorted_types: if cutoff is None: d...
<commit_before>from __future__ import unicode_literals from .conf import BREAKPOINTS def _get_device_type(width): "Returns the type based on set breakpoints." sorted_types = sorted(BREAKPOINTS.items(), key=lambda x: x[1]) default_type = None for name, cutoff in sorted_types: if cutoff is None...
72ed5473c1b530357bd518149fcfafdea1bc3987
murano_tempest_tests/tests/api/service_broker/test_service_broker_negative.py
murano_tempest_tests/tests/api/service_broker/test_service_broker_negative.py
# Copyright (c) 2015 Mirantis, Inc. # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless requir...
# Copyright (c) 2015 Mirantis, Inc. # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless requir...
Remove xfail in service broker negative tests
Remove xfail in service broker negative tests After tempest-lib 0.14.0 release all fixes in tempest become present. This patch removes xfail for negative test in service broker test suite. Change-Id: Ide900d53fd478885208e53c333d6759e938a960b Closes-Bug: #1527949
Python
apache-2.0
NeCTAR-RC/murano,satish-avninetworks/murano,DavidPurcell/murano_temp,satish-avninetworks/murano,olivierlemasle/murano,olivierlemasle/murano,openstack/murano,DavidPurcell/murano_temp,DavidPurcell/murano_temp,NeCTAR-RC/murano,NeCTAR-RC/murano,openstack/murano,satish-avninetworks/murano,NeCTAR-RC/murano,satish-avninetwork...
# Copyright (c) 2015 Mirantis, Inc. # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless requir...
# Copyright (c) 2015 Mirantis, Inc. # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless requir...
<commit_before># Copyright (c) 2015 Mirantis, Inc. # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # ...
# Copyright (c) 2015 Mirantis, Inc. # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless requir...
# Copyright (c) 2015 Mirantis, Inc. # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless requir...
<commit_before># Copyright (c) 2015 Mirantis, Inc. # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # ...
8fbc125eb242716873d5c8cb0420206077f6acc5
stocks.py
stocks.py
#!/usr/bin/python import sys from pprint import pprint import ystockquote for quote in sys.argv[1:]: print 'Finding quote for %s' % quote # First thing we want is some basic information on the quote. details = ystockquote.get_all(quote)
#!/usr/bin/python import sys from pprint import pprint import ystockquote for quote in sys.argv[1:]: print 'Finding quote for %s' % quote # First thing we want is some basic information on the quote. details = ystockquote.get_all(quote) print 'Last Open: $%s' % details.get('today_open')
Print out the last open price
Print out the last open price
Python
mit
johndavidback/stock-picker
#!/usr/bin/python import sys from pprint import pprint import ystockquote for quote in sys.argv[1:]: print 'Finding quote for %s' % quote # First thing we want is some basic information on the quote. details = ystockquote.get_all(quote) Print out the last open price
#!/usr/bin/python import sys from pprint import pprint import ystockquote for quote in sys.argv[1:]: print 'Finding quote for %s' % quote # First thing we want is some basic information on the quote. details = ystockquote.get_all(quote) print 'Last Open: $%s' % details.get('today_open')
<commit_before>#!/usr/bin/python import sys from pprint import pprint import ystockquote for quote in sys.argv[1:]: print 'Finding quote for %s' % quote # First thing we want is some basic information on the quote. details = ystockquote.get_all(quote) <commit_msg>Print out the last open price<...
#!/usr/bin/python import sys from pprint import pprint import ystockquote for quote in sys.argv[1:]: print 'Finding quote for %s' % quote # First thing we want is some basic information on the quote. details = ystockquote.get_all(quote) print 'Last Open: $%s' % details.get('today_open')
#!/usr/bin/python import sys from pprint import pprint import ystockquote for quote in sys.argv[1:]: print 'Finding quote for %s' % quote # First thing we want is some basic information on the quote. details = ystockquote.get_all(quote) Print out the last open price#!/usr/bin/python import sy...
<commit_before>#!/usr/bin/python import sys from pprint import pprint import ystockquote for quote in sys.argv[1:]: print 'Finding quote for %s' % quote # First thing we want is some basic information on the quote. details = ystockquote.get_all(quote) <commit_msg>Print out the last open price<...
d27f5e92d6a0fef27b903f75de59c1d85ca35430
packages/Python/lldbsuite/test/lang/cpp/modules-import/TestCXXModulesImport.py
packages/Python/lldbsuite/test/lang/cpp/modules-import/TestCXXModulesImport.py
"""Test that importing modules in C++ works as expected.""" from __future__ import print_function from distutils.version import StrictVersion import unittest2 import os import time import lldb import platform from lldbsuite.test.decorators import * from lldbsuite.test.lldbtest import * from lldbsuite.test import ll...
"""Test that importing modules in C++ works as expected.""" from __future__ import print_function from distutils.version import StrictVersion import unittest2 import os import time import lldb import platform from lldbsuite.test.decorators import * from lldbsuite.test.lldbtest import * from lldbsuite.test import ll...
Add explicit language specifier to test.
Add explicit language specifier to test. git-svn-id: 4c4cc70b1ef44ba2b7963015e681894188cea27e@354048 91177308-0d34-0410-b5e6-96231b3b80d8
Python
apache-2.0
apple/swift-lldb,apple/swift-lldb,llvm-mirror/lldb,apple/swift-lldb,apple/swift-lldb,llvm-mirror/lldb,llvm-mirror/lldb,llvm-mirror/lldb,apple/swift-lldb,apple/swift-lldb,llvm-mirror/lldb
"""Test that importing modules in C++ works as expected.""" from __future__ import print_function from distutils.version import StrictVersion import unittest2 import os import time import lldb import platform from lldbsuite.test.decorators import * from lldbsuite.test.lldbtest import * from lldbsuite.test import ll...
"""Test that importing modules in C++ works as expected.""" from __future__ import print_function from distutils.version import StrictVersion import unittest2 import os import time import lldb import platform from lldbsuite.test.decorators import * from lldbsuite.test.lldbtest import * from lldbsuite.test import ll...
<commit_before>"""Test that importing modules in C++ works as expected.""" from __future__ import print_function from distutils.version import StrictVersion import unittest2 import os import time import lldb import platform from lldbsuite.test.decorators import * from lldbsuite.test.lldbtest import * from lldbsuite...
"""Test that importing modules in C++ works as expected.""" from __future__ import print_function from distutils.version import StrictVersion import unittest2 import os import time import lldb import platform from lldbsuite.test.decorators import * from lldbsuite.test.lldbtest import * from lldbsuite.test import ll...
"""Test that importing modules in C++ works as expected.""" from __future__ import print_function from distutils.version import StrictVersion import unittest2 import os import time import lldb import platform from lldbsuite.test.decorators import * from lldbsuite.test.lldbtest import * from lldbsuite.test import ll...
<commit_before>"""Test that importing modules in C++ works as expected.""" from __future__ import print_function from distutils.version import StrictVersion import unittest2 import os import time import lldb import platform from lldbsuite.test.decorators import * from lldbsuite.test.lldbtest import * from lldbsuite...
6ee135dc454b7ae13dbd4603de60b5eba12cc5c9
saleor/graphql/core/decorators.py
saleor/graphql/core/decorators.py
from functools import wraps from django.core.exceptions import PermissionDenied def permission_required(permissions): def decorator(func): @wraps(func) def wrapper(*args, **kwargs): info = args[1] user = info.context.user if not user.has_perm(permissions): ...
from functools import wraps from django.core.exceptions import PermissionDenied from graphql.execution.base import ResolveInfo def permission_required(permissions): def decorator(func): @wraps(func) def wrapper(*args, **kwargs): info = args[1] assert isinstance(info, Resol...
Make sure decorator is being used with proper function signatures
Make sure decorator is being used with proper function signatures
Python
bsd-3-clause
UITools/saleor,UITools/saleor,mociepka/saleor,mociepka/saleor,maferelo/saleor,maferelo/saleor,UITools/saleor,maferelo/saleor,mociepka/saleor,UITools/saleor,UITools/saleor
from functools import wraps from django.core.exceptions import PermissionDenied def permission_required(permissions): def decorator(func): @wraps(func) def wrapper(*args, **kwargs): info = args[1] user = info.context.user if not user.has_perm(permissions): ...
from functools import wraps from django.core.exceptions import PermissionDenied from graphql.execution.base import ResolveInfo def permission_required(permissions): def decorator(func): @wraps(func) def wrapper(*args, **kwargs): info = args[1] assert isinstance(info, Resol...
<commit_before>from functools import wraps from django.core.exceptions import PermissionDenied def permission_required(permissions): def decorator(func): @wraps(func) def wrapper(*args, **kwargs): info = args[1] user = info.context.user if not user.has_perm(per...
from functools import wraps from django.core.exceptions import PermissionDenied from graphql.execution.base import ResolveInfo def permission_required(permissions): def decorator(func): @wraps(func) def wrapper(*args, **kwargs): info = args[1] assert isinstance(info, Resol...
from functools import wraps from django.core.exceptions import PermissionDenied def permission_required(permissions): def decorator(func): @wraps(func) def wrapper(*args, **kwargs): info = args[1] user = info.context.user if not user.has_perm(permissions): ...
<commit_before>from functools import wraps from django.core.exceptions import PermissionDenied def permission_required(permissions): def decorator(func): @wraps(func) def wrapper(*args, **kwargs): info = args[1] user = info.context.user if not user.has_perm(per...
5557fbff1e6843261a902f260ef9415e1e795879
test_elasticsearch/run_tests.py
test_elasticsearch/run_tests.py
#!/usr/bin/env python import sys from os import path import nose def run_all(argv=None): sys.exitfunc = lambda: sys.stderr.write('Shutting down....\n') # always insert coverage when running tests if argv is None: argv = [ 'nosetests', '--with-xunit', '--with-xcoverage', '--...
#!/usr/bin/env python import sys from os import path import nose def run_all(argv=None): sys.exitfunc = lambda: sys.stderr.write('Shutting down....\n') # always insert coverage when running tests if argv is None: argv = [ 'nosetests', '--with-xunit', '--with-xcoverage', '--...
Make sure jenkins output contains logs
Make sure jenkins output contains logs
Python
apache-2.0
prinsherbert/elasticsearch-py,veatch/elasticsearch-py,gardsted/elasticsearch-py,AlexMaskovyak/elasticsearch-py,Garrett-R/elasticsearch-py,elastic/elasticsearch-py,konradkonrad/elasticsearch-py,chrisseto/elasticsearch-py,liuyi1112/elasticsearch-py,kelp404/elasticsearch-py,brunobell/elasticsearch-py,tailhook/elasticsearc...
#!/usr/bin/env python import sys from os import path import nose def run_all(argv=None): sys.exitfunc = lambda: sys.stderr.write('Shutting down....\n') # always insert coverage when running tests if argv is None: argv = [ 'nosetests', '--with-xunit', '--with-xcoverage', '--...
#!/usr/bin/env python import sys from os import path import nose def run_all(argv=None): sys.exitfunc = lambda: sys.stderr.write('Shutting down....\n') # always insert coverage when running tests if argv is None: argv = [ 'nosetests', '--with-xunit', '--with-xcoverage', '--...
<commit_before>#!/usr/bin/env python import sys from os import path import nose def run_all(argv=None): sys.exitfunc = lambda: sys.stderr.write('Shutting down....\n') # always insert coverage when running tests if argv is None: argv = [ 'nosetests', '--with-xunit', '--with-...
#!/usr/bin/env python import sys from os import path import nose def run_all(argv=None): sys.exitfunc = lambda: sys.stderr.write('Shutting down....\n') # always insert coverage when running tests if argv is None: argv = [ 'nosetests', '--with-xunit', '--with-xcoverage', '--...
#!/usr/bin/env python import sys from os import path import nose def run_all(argv=None): sys.exitfunc = lambda: sys.stderr.write('Shutting down....\n') # always insert coverage when running tests if argv is None: argv = [ 'nosetests', '--with-xunit', '--with-xcoverage', '--...
<commit_before>#!/usr/bin/env python import sys from os import path import nose def run_all(argv=None): sys.exitfunc = lambda: sys.stderr.write('Shutting down....\n') # always insert coverage when running tests if argv is None: argv = [ 'nosetests', '--with-xunit', '--with-...
390fc84183c0f680c5fb1a980ee3c1227b187611
HowLong/HowLong.py
HowLong/HowLong.py
#!/usr/bin/env python3 import argparse from datetime import timedelta from subprocess import Popen from time import time, sleep def red(text): RED = '\033[91m' END = '\033[0m' return RED + text + END class HowLong(object): def __init__(self): parser = argparse.ArgumentParser(description='Ti...
from __future__ import print_function import sys import argparse from datetime import timedelta from subprocess import Popen from time import time, sleep def red(text): RED = '\033[91m' END = '\033[0m' return RED + text + END def log(*args): print(*args, file=sys.stderr) sys.stderr.flush() cla...
Print debug info to stderr
MINOR: Print debug info to stderr
Python
apache-2.0
mattjegan/HowLong
#!/usr/bin/env python3 import argparse from datetime import timedelta from subprocess import Popen from time import time, sleep def red(text): RED = '\033[91m' END = '\033[0m' return RED + text + END class HowLong(object): def __init__(self): parser = argparse.ArgumentParser(description='Ti...
from __future__ import print_function import sys import argparse from datetime import timedelta from subprocess import Popen from time import time, sleep def red(text): RED = '\033[91m' END = '\033[0m' return RED + text + END def log(*args): print(*args, file=sys.stderr) sys.stderr.flush() cla...
<commit_before>#!/usr/bin/env python3 import argparse from datetime import timedelta from subprocess import Popen from time import time, sleep def red(text): RED = '\033[91m' END = '\033[0m' return RED + text + END class HowLong(object): def __init__(self): parser = argparse.ArgumentParser(...
from __future__ import print_function import sys import argparse from datetime import timedelta from subprocess import Popen from time import time, sleep def red(text): RED = '\033[91m' END = '\033[0m' return RED + text + END def log(*args): print(*args, file=sys.stderr) sys.stderr.flush() cla...
#!/usr/bin/env python3 import argparse from datetime import timedelta from subprocess import Popen from time import time, sleep def red(text): RED = '\033[91m' END = '\033[0m' return RED + text + END class HowLong(object): def __init__(self): parser = argparse.ArgumentParser(description='Ti...
<commit_before>#!/usr/bin/env python3 import argparse from datetime import timedelta from subprocess import Popen from time import time, sleep def red(text): RED = '\033[91m' END = '\033[0m' return RED + text + END class HowLong(object): def __init__(self): parser = argparse.ArgumentParser(...
5086a41e9aae7da16e4b189285613c2dade2b95a
common_rg_bar.py
common_rg_bar.py
#!/usr/bin/env python3 ''' Given: 1. status code: (0 - OK, other value - BAD) 2. terminal window width shows red/green bar to visualize return code of previous command ''' import sys def main(): if len(sys.argv) >= 2: code = sys.argv[1] if code == 'x': col_char = '3' cols...
#!/usr/bin/env python3 ''' Given: 1. status code: (0 - OK, other value - BAD) 2. terminal window width shows red/green bar to visualize return code of previous command ''' import sys def main(): if len(sys.argv) >= 2: code = sys.argv[1] if code == 'x': col_char = '3' cols...
Stop displaying x as the code
Stop displaying x as the code
Python
mit
kwadrat/rgb_tdd
#!/usr/bin/env python3 ''' Given: 1. status code: (0 - OK, other value - BAD) 2. terminal window width shows red/green bar to visualize return code of previous command ''' import sys def main(): if len(sys.argv) >= 2: code = sys.argv[1] if code == 'x': col_char = '3' cols...
#!/usr/bin/env python3 ''' Given: 1. status code: (0 - OK, other value - BAD) 2. terminal window width shows red/green bar to visualize return code of previous command ''' import sys def main(): if len(sys.argv) >= 2: code = sys.argv[1] if code == 'x': col_char = '3' cols...
<commit_before>#!/usr/bin/env python3 ''' Given: 1. status code: (0 - OK, other value - BAD) 2. terminal window width shows red/green bar to visualize return code of previous command ''' import sys def main(): if len(sys.argv) >= 2: code = sys.argv[1] if code == 'x': col_char = '3' ...
#!/usr/bin/env python3 ''' Given: 1. status code: (0 - OK, other value - BAD) 2. terminal window width shows red/green bar to visualize return code of previous command ''' import sys def main(): if len(sys.argv) >= 2: code = sys.argv[1] if code == 'x': col_char = '3' cols...
#!/usr/bin/env python3 ''' Given: 1. status code: (0 - OK, other value - BAD) 2. terminal window width shows red/green bar to visualize return code of previous command ''' import sys def main(): if len(sys.argv) >= 2: code = sys.argv[1] if code == 'x': col_char = '3' cols...
<commit_before>#!/usr/bin/env python3 ''' Given: 1. status code: (0 - OK, other value - BAD) 2. terminal window width shows red/green bar to visualize return code of previous command ''' import sys def main(): if len(sys.argv) >= 2: code = sys.argv[1] if code == 'x': col_char = '3' ...
093f8971b09dec696da94ccf5f14f191cbf3d672
src/dicomweb_client/__init__.py
src/dicomweb_client/__init__.py
__version__ = '0.3.1rc' from dicomweb_client.api import DICOMWebClient
__version__ = '0.3.1' from dicomweb_client.api import DICOMWebClient
Increase version for 0.3.1 release
Increase version for 0.3.1 release
Python
mit
MGHComputationalPathology/dicomweb-client
__version__ = '0.3.1rc' from dicomweb_client.api import DICOMWebClient Increase version for 0.3.1 release
__version__ = '0.3.1' from dicomweb_client.api import DICOMWebClient
<commit_before>__version__ = '0.3.1rc' from dicomweb_client.api import DICOMWebClient <commit_msg>Increase version for 0.3.1 release<commit_after>
__version__ = '0.3.1' from dicomweb_client.api import DICOMWebClient
__version__ = '0.3.1rc' from dicomweb_client.api import DICOMWebClient Increase version for 0.3.1 release__version__ = '0.3.1' from dicomweb_client.api import DICOMWebClient
<commit_before>__version__ = '0.3.1rc' from dicomweb_client.api import DICOMWebClient <commit_msg>Increase version for 0.3.1 release<commit_after>__version__ = '0.3.1' from dicomweb_client.api import DICOMWebClient
b4aee8dc8e582940fa5a983ea0a90ab9b4e4f9e6
torchtext/legacy/data/__init__.py
torchtext/legacy/data/__init__.py
from .batch import Batch from .example import Example from .field import RawField, Field, ReversibleField, SubwordField, NestedField, LabelField from .iterator import (batch, BucketIterator, Iterator, BPTTIterator, pool) from .pipeline import Pipeline from .dataset import Dataset, TabularDataset # Those are not in the ...
from .batch import Batch from .example import Example from .field import RawField, Field, ReversibleField, SubwordField, NestedField, LabelField from .iterator import (batch, BucketIterator, Iterator, BPTTIterator, pool) from .pipeline import Pipeline from .dataset import Dataset, TabularDataset # Those are not in the ...
Enable importing metrics/utils/functional from torchtext.legacy.data
Enable importing metrics/utils/functional from torchtext.legacy.data
Python
bsd-3-clause
pytorch/text,pytorch/text,pytorch/text,pytorch/text
from .batch import Batch from .example import Example from .field import RawField, Field, ReversibleField, SubwordField, NestedField, LabelField from .iterator import (batch, BucketIterator, Iterator, BPTTIterator, pool) from .pipeline import Pipeline from .dataset import Dataset, TabularDataset # Those are not in the ...
from .batch import Batch from .example import Example from .field import RawField, Field, ReversibleField, SubwordField, NestedField, LabelField from .iterator import (batch, BucketIterator, Iterator, BPTTIterator, pool) from .pipeline import Pipeline from .dataset import Dataset, TabularDataset # Those are not in the ...
<commit_before>from .batch import Batch from .example import Example from .field import RawField, Field, ReversibleField, SubwordField, NestedField, LabelField from .iterator import (batch, BucketIterator, Iterator, BPTTIterator, pool) from .pipeline import Pipeline from .dataset import Dataset, TabularDataset # Those ...
from .batch import Batch from .example import Example from .field import RawField, Field, ReversibleField, SubwordField, NestedField, LabelField from .iterator import (batch, BucketIterator, Iterator, BPTTIterator, pool) from .pipeline import Pipeline from .dataset import Dataset, TabularDataset # Those are not in the ...
from .batch import Batch from .example import Example from .field import RawField, Field, ReversibleField, SubwordField, NestedField, LabelField from .iterator import (batch, BucketIterator, Iterator, BPTTIterator, pool) from .pipeline import Pipeline from .dataset import Dataset, TabularDataset # Those are not in the ...
<commit_before>from .batch import Batch from .example import Example from .field import RawField, Field, ReversibleField, SubwordField, NestedField, LabelField from .iterator import (batch, BucketIterator, Iterator, BPTTIterator, pool) from .pipeline import Pipeline from .dataset import Dataset, TabularDataset # Those ...
5a252090eb8fe75a5faf058151009bccd3645e70
upload.py
upload.py
import os import re import datetime from trovebox import Trovebox def main(): try: client = Trovebox() client.configure(api_version=2) except IOError, e: print print '!! Could not initialize Trovebox connection.' print '!! Check that ~/.config/trovebox/default exists a...
import os import re import datetime from trovebox import Trovebox def main(): try: client = Trovebox() client.configure(api_version=2) except IOError, e: print print '!! Could not initialize Trovebox connection.' print '!! Check that ~/.config/trovebox/default exists a...
Create albums for each folder instead of tags
Create albums for each folder instead of tags
Python
mit
nip3o/trovebox-uploader
import os import re import datetime from trovebox import Trovebox def main(): try: client = Trovebox() client.configure(api_version=2) except IOError, e: print print '!! Could not initialize Trovebox connection.' print '!! Check that ~/.config/trovebox/default exists a...
import os import re import datetime from trovebox import Trovebox def main(): try: client = Trovebox() client.configure(api_version=2) except IOError, e: print print '!! Could not initialize Trovebox connection.' print '!! Check that ~/.config/trovebox/default exists a...
<commit_before>import os import re import datetime from trovebox import Trovebox def main(): try: client = Trovebox() client.configure(api_version=2) except IOError, e: print print '!! Could not initialize Trovebox connection.' print '!! Check that ~/.config/trovebox/d...
import os import re import datetime from trovebox import Trovebox def main(): try: client = Trovebox() client.configure(api_version=2) except IOError, e: print print '!! Could not initialize Trovebox connection.' print '!! Check that ~/.config/trovebox/default exists a...
import os import re import datetime from trovebox import Trovebox def main(): try: client = Trovebox() client.configure(api_version=2) except IOError, e: print print '!! Could not initialize Trovebox connection.' print '!! Check that ~/.config/trovebox/default exists a...
<commit_before>import os import re import datetime from trovebox import Trovebox def main(): try: client = Trovebox() client.configure(api_version=2) except IOError, e: print print '!! Could not initialize Trovebox connection.' print '!! Check that ~/.config/trovebox/d...