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
d0000ab4c650379667ff018290d2d67d026c330c
reaper.py
reaper.py
#!/usr/bin/env python import boto import base64 import json from datetime import datetime def seconds_from_hours(hours): return hours * 60 * 60 def should_kill(instance): attributes = instance.get_attribute("userData") if attributes['userData'] == None: return False user_data = base64.b64d...
#!/usr/bin/env python import boto import base64 import json from datetime import datetime def seconds_from_hours(hours): return hours * 60 * 60 def should_kill(instance): attributes = instance.get_attribute("userData") if attributes['userData'] == None: print "Instance has no userdata" ...
Add debugging to the repear script
Add debugging to the repear script
Python
mit
kyleconroy/popfly
#!/usr/bin/env python import boto import base64 import json from datetime import datetime def seconds_from_hours(hours): return hours * 60 * 60 def should_kill(instance): attributes = instance.get_attribute("userData") if attributes['userData'] == None: return False user_data = base64.b64d...
#!/usr/bin/env python import boto import base64 import json from datetime import datetime def seconds_from_hours(hours): return hours * 60 * 60 def should_kill(instance): attributes = instance.get_attribute("userData") if attributes['userData'] == None: print "Instance has no userdata" ...
<commit_before>#!/usr/bin/env python import boto import base64 import json from datetime import datetime def seconds_from_hours(hours): return hours * 60 * 60 def should_kill(instance): attributes = instance.get_attribute("userData") if attributes['userData'] == None: return False user_dat...
#!/usr/bin/env python import boto import base64 import json from datetime import datetime def seconds_from_hours(hours): return hours * 60 * 60 def should_kill(instance): attributes = instance.get_attribute("userData") if attributes['userData'] == None: print "Instance has no userdata" ...
#!/usr/bin/env python import boto import base64 import json from datetime import datetime def seconds_from_hours(hours): return hours * 60 * 60 def should_kill(instance): attributes = instance.get_attribute("userData") if attributes['userData'] == None: return False user_data = base64.b64d...
<commit_before>#!/usr/bin/env python import boto import base64 import json from datetime import datetime def seconds_from_hours(hours): return hours * 60 * 60 def should_kill(instance): attributes = instance.get_attribute("userData") if attributes['userData'] == None: return False user_dat...
40e2356f907332a4ab04ba3a6511079f5c2cd269
core/storage/config/django_models.py
core/storage/config/django_models.py
# coding: utf-8 # # Copyright 2013 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 ...
# coding: utf-8 # # Copyright 2013 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 ...
Fix a typo in the Django ConfigPropertyModel class.
Fix a typo in the Django ConfigPropertyModel class.
Python
apache-2.0
openhatch/oh-missions-oppia-beta,prasanna08/oppia,directorlive/oppia,Dev4X/oppia,infinyte/oppia,virajprabhu/oppia,BenHenning/oppia,aldeka/oppia,asandyz/oppia,kennho/oppia,directorlive/oppia,Atlas-Sailed-Co/oppia,fernandopinhati/oppia,brianrodri/oppia,miyucy/oppia,anthkris/oppia,terrameijar/oppia,michaelWagner/oppia,bjv...
# coding: utf-8 # # Copyright 2013 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 ...
# coding: utf-8 # # Copyright 2013 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 ...
<commit_before># coding: utf-8 # # Copyright 2013 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 # # Unle...
# coding: utf-8 # # Copyright 2013 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 ...
# coding: utf-8 # # Copyright 2013 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 ...
<commit_before># coding: utf-8 # # Copyright 2013 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 # # Unle...
7673e33186bb5f48d9f1c35deb55fca91553d526
mopidy_soundcloud/actor.py
mopidy_soundcloud/actor.py
from __future__ import unicode_literals import logging import pykka from mopidy import backend from .library import SoundCloudLibraryProvider from .soundcloud import SoundCloudClient logger = logging.getLogger(__name__) class SoundCloudBackend(pykka.ThreadingActor, backend.Backend): def __init__(self, config...
from __future__ import unicode_literals import logging import pykka from mopidy import backend from .library import SoundCloudLibraryProvider from .soundcloud import SoundCloudClient logger = logging.getLogger(__name__) class SoundCloudBackend(pykka.ThreadingActor, backend.Backend): def __init__(self, config...
Handle track that can't be played
Handle track that can't be played
Python
mit
mopidy/mopidy-soundcloud,yakumaa/mopidy-soundcloud
from __future__ import unicode_literals import logging import pykka from mopidy import backend from .library import SoundCloudLibraryProvider from .soundcloud import SoundCloudClient logger = logging.getLogger(__name__) class SoundCloudBackend(pykka.ThreadingActor, backend.Backend): def __init__(self, config...
from __future__ import unicode_literals import logging import pykka from mopidy import backend from .library import SoundCloudLibraryProvider from .soundcloud import SoundCloudClient logger = logging.getLogger(__name__) class SoundCloudBackend(pykka.ThreadingActor, backend.Backend): def __init__(self, config...
<commit_before>from __future__ import unicode_literals import logging import pykka from mopidy import backend from .library import SoundCloudLibraryProvider from .soundcloud import SoundCloudClient logger = logging.getLogger(__name__) class SoundCloudBackend(pykka.ThreadingActor, backend.Backend): def __init...
from __future__ import unicode_literals import logging import pykka from mopidy import backend from .library import SoundCloudLibraryProvider from .soundcloud import SoundCloudClient logger = logging.getLogger(__name__) class SoundCloudBackend(pykka.ThreadingActor, backend.Backend): def __init__(self, config...
from __future__ import unicode_literals import logging import pykka from mopidy import backend from .library import SoundCloudLibraryProvider from .soundcloud import SoundCloudClient logger = logging.getLogger(__name__) class SoundCloudBackend(pykka.ThreadingActor, backend.Backend): def __init__(self, config...
<commit_before>from __future__ import unicode_literals import logging import pykka from mopidy import backend from .library import SoundCloudLibraryProvider from .soundcloud import SoundCloudClient logger = logging.getLogger(__name__) class SoundCloudBackend(pykka.ThreadingActor, backend.Backend): def __init...
e83dcb09125af0949c9001a8889338cfd23d6131
contrib/trigger_rtd_build.py
contrib/trigger_rtd_build.py
#!/usr/bin/env python # Licensed to the Apache Software Foundation (ASF) under one or more # contributor license agreements. See the NOTICE file distributed with # this work for additional information regarding copyright ownership. # The ASF licenses this file to You under the Apache License, Version 2.0 # (the "Licen...
#!/usr/bin/env python # Licensed to the Apache Software Foundation (ASF) under one or more # contributor license agreements. See the NOTICE file distributed with # this work for additional information regarding copyright ownership. # The ASF licenses this file to You under the Apache License, Version 2.0 # (the "Licen...
Update trigger rtd build script - use https instead of http.
Update trigger rtd build script - use https instead of http.
Python
apache-2.0
ZuluPro/libcloud,mgogoulos/libcloud,jimbobhickville/libcloud,wido/libcloud,Verizon/libcloud,watermelo/libcloud,niteoweb/libcloud,smaffulli/libcloud,mistio/libcloud,Kami/libcloud,NexusIS/libcloud,mgogoulos/libcloud,vongazman/libcloud,Scalr/libcloud,mtekel/libcloud,mathspace/libcloud,smaffulli/libcloud,cryptickp/libcloud...
#!/usr/bin/env python # Licensed to the Apache Software Foundation (ASF) under one or more # contributor license agreements. See the NOTICE file distributed with # this work for additional information regarding copyright ownership. # The ASF licenses this file to You under the Apache License, Version 2.0 # (the "Licen...
#!/usr/bin/env python # Licensed to the Apache Software Foundation (ASF) under one or more # contributor license agreements. See the NOTICE file distributed with # this work for additional information regarding copyright ownership. # The ASF licenses this file to You under the Apache License, Version 2.0 # (the "Licen...
<commit_before>#!/usr/bin/env python # Licensed to the Apache Software Foundation (ASF) under one or more # contributor license agreements. See the NOTICE file distributed with # this work for additional information regarding copyright ownership. # The ASF licenses this file to You under the Apache License, Version 2....
#!/usr/bin/env python # Licensed to the Apache Software Foundation (ASF) under one or more # contributor license agreements. See the NOTICE file distributed with # this work for additional information regarding copyright ownership. # The ASF licenses this file to You under the Apache License, Version 2.0 # (the "Licen...
#!/usr/bin/env python # Licensed to the Apache Software Foundation (ASF) under one or more # contributor license agreements. See the NOTICE file distributed with # this work for additional information regarding copyright ownership. # The ASF licenses this file to You under the Apache License, Version 2.0 # (the "Licen...
<commit_before>#!/usr/bin/env python # Licensed to the Apache Software Foundation (ASF) under one or more # contributor license agreements. See the NOTICE file distributed with # this work for additional information regarding copyright ownership. # The ASF licenses this file to You under the Apache License, Version 2....
377ec226eb1cb8f0e5ea4bca06d8a0db0905b87d
comrade/core/decorators.py
comrade/core/decorators.py
def singleton(cls): instances = {} def getinstance(): if cls not in instances: instances[cls] = cls() return instances[cls] return getinstance
def singleton(cls): instances = {} def getinstance(): if cls not in instances: instances[cls] = cls() return instances[cls] return getinstance def authorized(test_func, unauthorized_url=None): """ Decorator for views that checks that the user passes the given test, r...
Add decorator for checking if a user is authorized to access a page.
Add decorator for checking if a user is authorized to access a page.
Python
mit
bueda/django-comrade
def singleton(cls): instances = {} def getinstance(): if cls not in instances: instances[cls] = cls() return instances[cls] return getinstance Add decorator for checking if a user is authorized to access a page.
def singleton(cls): instances = {} def getinstance(): if cls not in instances: instances[cls] = cls() return instances[cls] return getinstance def authorized(test_func, unauthorized_url=None): """ Decorator for views that checks that the user passes the given test, r...
<commit_before>def singleton(cls): instances = {} def getinstance(): if cls not in instances: instances[cls] = cls() return instances[cls] return getinstance <commit_msg>Add decorator for checking if a user is authorized to access a page.<commit_after>
def singleton(cls): instances = {} def getinstance(): if cls not in instances: instances[cls] = cls() return instances[cls] return getinstance def authorized(test_func, unauthorized_url=None): """ Decorator for views that checks that the user passes the given test, r...
def singleton(cls): instances = {} def getinstance(): if cls not in instances: instances[cls] = cls() return instances[cls] return getinstance Add decorator for checking if a user is authorized to access a page.def singleton(cls): instances = {} def getinstance(): ...
<commit_before>def singleton(cls): instances = {} def getinstance(): if cls not in instances: instances[cls] = cls() return instances[cls] return getinstance <commit_msg>Add decorator for checking if a user is authorized to access a page.<commit_after>def singleton(cls): inst...
d146036998d3595730b3de5f03fd7ac6e63ae498
src/sentry/api/serializers/models/organization_member.py
src/sentry/api/serializers/models/organization_member.py
from __future__ import absolute_import from sentry.api.serializers import Serializer, register from sentry.models import OrganizationMember @register(OrganizationMember) class OrganizationMemberSerializer(Serializer): def serialize(self, obj, attrs, user): d = { 'id': str(obj.id), ...
from __future__ import absolute_import from sentry.api.serializers import Serializer, register from sentry.models import OrganizationMember @register(OrganizationMember) class OrganizationMemberSerializer(Serializer): def serialize(self, obj, attrs, user): if obj.user: user_data = {'id': obj....
Add user ID to member
Add user ID to member
Python
bsd-3-clause
BuildingLink/sentry,JamesMura/sentry,looker/sentry,looker/sentry,BuildingLink/sentry,jean/sentry,JackDanger/sentry,mvaled/sentry,zenefits/sentry,JamesMura/sentry,jean/sentry,daevaorn/sentry,BuildingLink/sentry,BuildingLink/sentry,mitsuhiko/sentry,fotinakis/sentry,beeftornado/sentry,ifduyue/sentry,daevaorn/sentry,fotina...
from __future__ import absolute_import from sentry.api.serializers import Serializer, register from sentry.models import OrganizationMember @register(OrganizationMember) class OrganizationMemberSerializer(Serializer): def serialize(self, obj, attrs, user): d = { 'id': str(obj.id), ...
from __future__ import absolute_import from sentry.api.serializers import Serializer, register from sentry.models import OrganizationMember @register(OrganizationMember) class OrganizationMemberSerializer(Serializer): def serialize(self, obj, attrs, user): if obj.user: user_data = {'id': obj....
<commit_before>from __future__ import absolute_import from sentry.api.serializers import Serializer, register from sentry.models import OrganizationMember @register(OrganizationMember) class OrganizationMemberSerializer(Serializer): def serialize(self, obj, attrs, user): d = { 'id': str(obj.i...
from __future__ import absolute_import from sentry.api.serializers import Serializer, register from sentry.models import OrganizationMember @register(OrganizationMember) class OrganizationMemberSerializer(Serializer): def serialize(self, obj, attrs, user): if obj.user: user_data = {'id': obj....
from __future__ import absolute_import from sentry.api.serializers import Serializer, register from sentry.models import OrganizationMember @register(OrganizationMember) class OrganizationMemberSerializer(Serializer): def serialize(self, obj, attrs, user): d = { 'id': str(obj.id), ...
<commit_before>from __future__ import absolute_import from sentry.api.serializers import Serializer, register from sentry.models import OrganizationMember @register(OrganizationMember) class OrganizationMemberSerializer(Serializer): def serialize(self, obj, attrs, user): d = { 'id': str(obj.i...
40fba178d449e0e570da9dc43d6f672cebb01359
astroML/plotting/settings.py
astroML/plotting/settings.py
def setup_text_plots(fontsize=8, usetex=True): """ This function adjusts matplotlib settings so that all figures in the textbook have a uniform format and look. """ import matplotlib from distutils.version import LooseVersion matplotlib.rc('legend', fontsize=fontsize, handlelength=3) mat...
def setup_text_plots(fontsize=8, usetex=True): """ This function adjusts matplotlib settings so that all figures in the textbook have a uniform format and look. """ import matplotlib from distutils.version import LooseVersion matplotlib.rc('legend', fontsize=fontsize, handlelength=3) mat...
Fix rc syntax for mpl 3.1
Fix rc syntax for mpl 3.1
Python
bsd-2-clause
astroML/astroML
def setup_text_plots(fontsize=8, usetex=True): """ This function adjusts matplotlib settings so that all figures in the textbook have a uniform format and look. """ import matplotlib from distutils.version import LooseVersion matplotlib.rc('legend', fontsize=fontsize, handlelength=3) mat...
def setup_text_plots(fontsize=8, usetex=True): """ This function adjusts matplotlib settings so that all figures in the textbook have a uniform format and look. """ import matplotlib from distutils.version import LooseVersion matplotlib.rc('legend', fontsize=fontsize, handlelength=3) mat...
<commit_before>def setup_text_plots(fontsize=8, usetex=True): """ This function adjusts matplotlib settings so that all figures in the textbook have a uniform format and look. """ import matplotlib from distutils.version import LooseVersion matplotlib.rc('legend', fontsize=fontsize, handlele...
def setup_text_plots(fontsize=8, usetex=True): """ This function adjusts matplotlib settings so that all figures in the textbook have a uniform format and look. """ import matplotlib from distutils.version import LooseVersion matplotlib.rc('legend', fontsize=fontsize, handlelength=3) mat...
def setup_text_plots(fontsize=8, usetex=True): """ This function adjusts matplotlib settings so that all figures in the textbook have a uniform format and look. """ import matplotlib from distutils.version import LooseVersion matplotlib.rc('legend', fontsize=fontsize, handlelength=3) mat...
<commit_before>def setup_text_plots(fontsize=8, usetex=True): """ This function adjusts matplotlib settings so that all figures in the textbook have a uniform format and look. """ import matplotlib from distutils.version import LooseVersion matplotlib.rc('legend', fontsize=fontsize, handlele...
15492594186b6a0dcea510e6896310f5e45368fc
instance/serializers.py
instance/serializers.py
""" Instance serializers (API representation) """ #pylint: disable=no-init from rest_framework import serializers from .models import OpenStackServer, OpenEdXInstance class OpenStackServerSerializer(serializers.ModelSerializer): pk = serializers.HyperlinkedIdentityField(view_name='api:openstackserver-detail') ...
""" Instance serializers (API representation) """ #pylint: disable=no-init from rest_framework import serializers from .models import OpenStackServer, OpenEdXInstance class OpenStackServerSerializer(serializers.ModelSerializer): pk_url = serializers.HyperlinkedIdentityField(view_name='api:openstackserver-detail...
Include both the numerical instance.pk & its API URL
API: Include both the numerical instance.pk & its API URL
Python
agpl-3.0
open-craft/opencraft,omarkhan/opencraft,open-craft/opencraft,omarkhan/opencraft,omarkhan/opencraft,open-craft/opencraft,omarkhan/opencraft,brousch/opencraft,brousch/opencraft,brousch/opencraft,open-craft/opencraft,open-craft/opencraft
""" Instance serializers (API representation) """ #pylint: disable=no-init from rest_framework import serializers from .models import OpenStackServer, OpenEdXInstance class OpenStackServerSerializer(serializers.ModelSerializer): pk = serializers.HyperlinkedIdentityField(view_name='api:openstackserver-detail') ...
""" Instance serializers (API representation) """ #pylint: disable=no-init from rest_framework import serializers from .models import OpenStackServer, OpenEdXInstance class OpenStackServerSerializer(serializers.ModelSerializer): pk_url = serializers.HyperlinkedIdentityField(view_name='api:openstackserver-detail...
<commit_before>""" Instance serializers (API representation) """ #pylint: disable=no-init from rest_framework import serializers from .models import OpenStackServer, OpenEdXInstance class OpenStackServerSerializer(serializers.ModelSerializer): pk = serializers.HyperlinkedIdentityField(view_name='api:openstackse...
""" Instance serializers (API representation) """ #pylint: disable=no-init from rest_framework import serializers from .models import OpenStackServer, OpenEdXInstance class OpenStackServerSerializer(serializers.ModelSerializer): pk_url = serializers.HyperlinkedIdentityField(view_name='api:openstackserver-detail...
""" Instance serializers (API representation) """ #pylint: disable=no-init from rest_framework import serializers from .models import OpenStackServer, OpenEdXInstance class OpenStackServerSerializer(serializers.ModelSerializer): pk = serializers.HyperlinkedIdentityField(view_name='api:openstackserver-detail') ...
<commit_before>""" Instance serializers (API representation) """ #pylint: disable=no-init from rest_framework import serializers from .models import OpenStackServer, OpenEdXInstance class OpenStackServerSerializer(serializers.ModelSerializer): pk = serializers.HyperlinkedIdentityField(view_name='api:openstackse...
0a005806afb436a2ad01275a969ae6afc3c5a72c
cloud_browser/__init__.py
cloud_browser/__init__.py
"""Cloud browser application. Provides a simple filesystem-like browser interface for cloud blob datastores. """ VERSION = (0, 4, 0) __version__ = ".".join(str(v) for v in VERSION) __version_full__ = __version__
"""Cloud browser application. Provides a simple filesystem-like browser interface for cloud blob datastores. """ VERSION = (0, 0, 0) # placeholder, real value is set by `fab sdist` __version__ = ".".join(str(v) for v in VERSION) __version_full__ = __version__
Make it explicit that VERSION is a placeholder
Make it explicit that VERSION is a placeholder
Python
mit
ryan-roemer/django-cloud-browser,ryan-roemer/django-cloud-browser,ryan-roemer/django-cloud-browser
"""Cloud browser application. Provides a simple filesystem-like browser interface for cloud blob datastores. """ VERSION = (0, 4, 0) __version__ = ".".join(str(v) for v in VERSION) __version_full__ = __version__ Make it explicit that VERSION is a placeholder
"""Cloud browser application. Provides a simple filesystem-like browser interface for cloud blob datastores. """ VERSION = (0, 0, 0) # placeholder, real value is set by `fab sdist` __version__ = ".".join(str(v) for v in VERSION) __version_full__ = __version__
<commit_before>"""Cloud browser application. Provides a simple filesystem-like browser interface for cloud blob datastores. """ VERSION = (0, 4, 0) __version__ = ".".join(str(v) for v in VERSION) __version_full__ = __version__ <commit_msg>Make it explicit that VERSION is a placeholder<commit_after>
"""Cloud browser application. Provides a simple filesystem-like browser interface for cloud blob datastores. """ VERSION = (0, 0, 0) # placeholder, real value is set by `fab sdist` __version__ = ".".join(str(v) for v in VERSION) __version_full__ = __version__
"""Cloud browser application. Provides a simple filesystem-like browser interface for cloud blob datastores. """ VERSION = (0, 4, 0) __version__ = ".".join(str(v) for v in VERSION) __version_full__ = __version__ Make it explicit that VERSION is a placeholder"""Cloud browser application. Provides a simple filesystem...
<commit_before>"""Cloud browser application. Provides a simple filesystem-like browser interface for cloud blob datastores. """ VERSION = (0, 4, 0) __version__ = ".".join(str(v) for v in VERSION) __version_full__ = __version__ <commit_msg>Make it explicit that VERSION is a placeholder<commit_after>"""Cloud browser a...
7281a7525b20e48147049229a9faa0cb97340427
src/client/packaging/pypi/delphi_epidata/__init__.py
src/client/packaging/pypi/delphi_epidata/__init__.py
from .delphi_epidata import Epidata name = 'delphi_epidata' __version__ = '0.0.5'
from .delphi_epidata import Epidata name = 'delphi_epidata' __version__ = '0.0.6'
Increment client version number (again)
Increment client version number (again)
Python
mit
cmu-delphi/delphi-epidata,cmu-delphi/delphi-epidata,cmu-delphi/delphi-epidata,cmu-delphi/delphi-epidata,cmu-delphi/delphi-epidata,cmu-delphi/delphi-epidata
from .delphi_epidata import Epidata name = 'delphi_epidata' __version__ = '0.0.5' Increment client version number (again)
from .delphi_epidata import Epidata name = 'delphi_epidata' __version__ = '0.0.6'
<commit_before>from .delphi_epidata import Epidata name = 'delphi_epidata' __version__ = '0.0.5' <commit_msg>Increment client version number (again)<commit_after>
from .delphi_epidata import Epidata name = 'delphi_epidata' __version__ = '0.0.6'
from .delphi_epidata import Epidata name = 'delphi_epidata' __version__ = '0.0.5' Increment client version number (again)from .delphi_epidata import Epidata name = 'delphi_epidata' __version__ = '0.0.6'
<commit_before>from .delphi_epidata import Epidata name = 'delphi_epidata' __version__ = '0.0.5' <commit_msg>Increment client version number (again)<commit_after>from .delphi_epidata import Epidata name = 'delphi_epidata' __version__ = '0.0.6'
0997b216ea520aca2d8d62ac31a238c7280302ca
bananas/admin/api/serializers.py
bananas/admin/api/serializers.py
from django.contrib.auth import password_validation from django.utils.translation import ugettext_lazy as _ from rest_framework import serializers class AuthenticationSerializer(serializers.Serializer): username = serializers.CharField(label=_("Username"), write_only=True) password = serializers.CharField(lab...
from django.contrib.auth.password_validation import password_validators_help_texts from django.utils.translation import ugettext_lazy as _ from rest_framework import serializers class AuthenticationSerializer(serializers.Serializer): username = serializers.CharField(label=_("Username"), write_only=True) passw...
Use plain password help text instead of html
Use plain password help text instead of html
Python
mit
5monkeys/django-bananas,5monkeys/django-bananas,5monkeys/django-bananas
from django.contrib.auth import password_validation from django.utils.translation import ugettext_lazy as _ from rest_framework import serializers class AuthenticationSerializer(serializers.Serializer): username = serializers.CharField(label=_("Username"), write_only=True) password = serializers.CharField(lab...
from django.contrib.auth.password_validation import password_validators_help_texts from django.utils.translation import ugettext_lazy as _ from rest_framework import serializers class AuthenticationSerializer(serializers.Serializer): username = serializers.CharField(label=_("Username"), write_only=True) passw...
<commit_before>from django.contrib.auth import password_validation from django.utils.translation import ugettext_lazy as _ from rest_framework import serializers class AuthenticationSerializer(serializers.Serializer): username = serializers.CharField(label=_("Username"), write_only=True) password = serializer...
from django.contrib.auth.password_validation import password_validators_help_texts from django.utils.translation import ugettext_lazy as _ from rest_framework import serializers class AuthenticationSerializer(serializers.Serializer): username = serializers.CharField(label=_("Username"), write_only=True) passw...
from django.contrib.auth import password_validation from django.utils.translation import ugettext_lazy as _ from rest_framework import serializers class AuthenticationSerializer(serializers.Serializer): username = serializers.CharField(label=_("Username"), write_only=True) password = serializers.CharField(lab...
<commit_before>from django.contrib.auth import password_validation from django.utils.translation import ugettext_lazy as _ from rest_framework import serializers class AuthenticationSerializer(serializers.Serializer): username = serializers.CharField(label=_("Username"), write_only=True) password = serializer...
cc7de0147d773722db026d2571cc94c6ee01c9e0
new/energies/zeeman.py
new/energies/zeeman.py
class FixedZeeman(object): def __init__(self, H, multiplier=1, name='fixedzeeman'): if not isinstance(H, (list, tuple)) or len(H) != 3: raise ValueError('H must be a 3-element tuple or list.') else: self.H = H if not isinstance(multiplier, (float, int)): ...
import numpy as np class FixedZeeman(object): def __init__(self, H, multiplier=1, name='fixedzeeman'): if not isinstance(H, (list, tuple, np.ndarray)) or len(H) != 3: raise ValueError('H must be a 3-element tuple or list.') else: self.H = H if not isinstance(multipl...
Add numpy array as a possibility for setting external magnetic field.
Add numpy array as a possibility for setting external magnetic field.
Python
bsd-2-clause
fangohr/oommf-python,fangohr/oommf-python,fangohr/oommf-python
class FixedZeeman(object): def __init__(self, H, multiplier=1, name='fixedzeeman'): if not isinstance(H, (list, tuple)) or len(H) != 3: raise ValueError('H must be a 3-element tuple or list.') else: self.H = H if not isinstance(multiplier, (float, int)): ...
import numpy as np class FixedZeeman(object): def __init__(self, H, multiplier=1, name='fixedzeeman'): if not isinstance(H, (list, tuple, np.ndarray)) or len(H) != 3: raise ValueError('H must be a 3-element tuple or list.') else: self.H = H if not isinstance(multipl...
<commit_before>class FixedZeeman(object): def __init__(self, H, multiplier=1, name='fixedzeeman'): if not isinstance(H, (list, tuple)) or len(H) != 3: raise ValueError('H must be a 3-element tuple or list.') else: self.H = H if not isinstance(multiplier, (float, int)...
import numpy as np class FixedZeeman(object): def __init__(self, H, multiplier=1, name='fixedzeeman'): if not isinstance(H, (list, tuple, np.ndarray)) or len(H) != 3: raise ValueError('H must be a 3-element tuple or list.') else: self.H = H if not isinstance(multipl...
class FixedZeeman(object): def __init__(self, H, multiplier=1, name='fixedzeeman'): if not isinstance(H, (list, tuple)) or len(H) != 3: raise ValueError('H must be a 3-element tuple or list.') else: self.H = H if not isinstance(multiplier, (float, int)): ...
<commit_before>class FixedZeeman(object): def __init__(self, H, multiplier=1, name='fixedzeeman'): if not isinstance(H, (list, tuple)) or len(H) != 3: raise ValueError('H must be a 3-element tuple or list.') else: self.H = H if not isinstance(multiplier, (float, int)...
59536d499999786bae5e6cb0da33e71454e3b539
systematic_review/urls.py
systematic_review/urls.py
from django.conf.urls import patterns, include, url from django.contrib import admin from sysrev.views import * urlpatterns = patterns( '', url(r'^$', ReviewListView.as_view(), name='index'), url(r'^review/(?P<pk>\d+)(-([\w\-]+))?/$', Revi...
from django.conf.urls import patterns, include, url from django.contrib import admin from sysrev.views import * urlpatterns = patterns( '', url(r'^$', ReviewListView.as_view(), name='index'), url(r'^review/(?P<pk>\d+)(-([\w\-]+))?/$', Revi...
Correct error in URL mappings
Correct error in URL mappings
Python
mit
iliawnek/SystematicReview,iliawnek/SystematicReview,iliawnek/SystematicReview,iliawnek/SystematicReview
from django.conf.urls import patterns, include, url from django.contrib import admin from sysrev.views import * urlpatterns = patterns( '', url(r'^$', ReviewListView.as_view(), name='index'), url(r'^review/(?P<pk>\d+)(-([\w\-]+))?/$', Revi...
from django.conf.urls import patterns, include, url from django.contrib import admin from sysrev.views import * urlpatterns = patterns( '', url(r'^$', ReviewListView.as_view(), name='index'), url(r'^review/(?P<pk>\d+)(-([\w\-]+))?/$', Revi...
<commit_before>from django.conf.urls import patterns, include, url from django.contrib import admin from sysrev.views import * urlpatterns = patterns( '', url(r'^$', ReviewListView.as_view(), name='index'), url(r'^review/(?P<pk>\d+)(-([\w\-]+))?/$', ...
from django.conf.urls import patterns, include, url from django.contrib import admin from sysrev.views import * urlpatterns = patterns( '', url(r'^$', ReviewListView.as_view(), name='index'), url(r'^review/(?P<pk>\d+)(-([\w\-]+))?/$', Revi...
from django.conf.urls import patterns, include, url from django.contrib import admin from sysrev.views import * urlpatterns = patterns( '', url(r'^$', ReviewListView.as_view(), name='index'), url(r'^review/(?P<pk>\d+)(-([\w\-]+))?/$', Revi...
<commit_before>from django.conf.urls import patterns, include, url from django.contrib import admin from sysrev.views import * urlpatterns = patterns( '', url(r'^$', ReviewListView.as_view(), name='index'), url(r'^review/(?P<pk>\d+)(-([\w\-]+))?/$', ...
5796a54d10eb3baebda51e3420a818a251406a5c
python/test.py
python/test.py
import sys from PyQt5 import QtWidgets from QHexEdit import QHexEdit, QHexEditData class HexEdit(QHexEdit): def __init__(self, fileName=None): super(HexEdit, self).__init__() file = open(fileName) data = file.read() self.setData(data) self.setReadOnly(False) if __name__ ...
import sys from PyQt5 import QtWidgets, QtGui from QHexEdit import QHexEdit, QHexEditData if __name__ == '__main__': app = QtWidgets.QApplication(sys.argv) # QHexEditData* hexeditdata = QHexEditData::fromFile("test.py"); hexeditdata = QHexEditData.fromFile('test.py') # QHexEdit* hexedit = new QHexEdi...
Test more stuff in python
Test more stuff in python
Python
mit
parallaxinc/QHexEdit,parallaxinc/QHexEdit
import sys from PyQt5 import QtWidgets from QHexEdit import QHexEdit, QHexEditData class HexEdit(QHexEdit): def __init__(self, fileName=None): super(HexEdit, self).__init__() file = open(fileName) data = file.read() self.setData(data) self.setReadOnly(False) if __name__ ...
import sys from PyQt5 import QtWidgets, QtGui from QHexEdit import QHexEdit, QHexEditData if __name__ == '__main__': app = QtWidgets.QApplication(sys.argv) # QHexEditData* hexeditdata = QHexEditData::fromFile("test.py"); hexeditdata = QHexEditData.fromFile('test.py') # QHexEdit* hexedit = new QHexEdi...
<commit_before>import sys from PyQt5 import QtWidgets from QHexEdit import QHexEdit, QHexEditData class HexEdit(QHexEdit): def __init__(self, fileName=None): super(HexEdit, self).__init__() file = open(fileName) data = file.read() self.setData(data) self.setReadOnly(False)...
import sys from PyQt5 import QtWidgets, QtGui from QHexEdit import QHexEdit, QHexEditData if __name__ == '__main__': app = QtWidgets.QApplication(sys.argv) # QHexEditData* hexeditdata = QHexEditData::fromFile("test.py"); hexeditdata = QHexEditData.fromFile('test.py') # QHexEdit* hexedit = new QHexEdi...
import sys from PyQt5 import QtWidgets from QHexEdit import QHexEdit, QHexEditData class HexEdit(QHexEdit): def __init__(self, fileName=None): super(HexEdit, self).__init__() file = open(fileName) data = file.read() self.setData(data) self.setReadOnly(False) if __name__ ...
<commit_before>import sys from PyQt5 import QtWidgets from QHexEdit import QHexEdit, QHexEditData class HexEdit(QHexEdit): def __init__(self, fileName=None): super(HexEdit, self).__init__() file = open(fileName) data = file.read() self.setData(data) self.setReadOnly(False)...
60bfd29c5f21c3daf43a1b150048f57c147dbaf2
inet/sources/twitter.py
inet/sources/twitter.py
# -*- coding: utf-8 -*- import tweepy from .constants import TWITTER_ACCESS, TWITTER_SECRET from .constants import TWITTER_CONSUMER_ACCESS, TWITTER_CONSUMER_SECRET _auth = tweepy.OAuthHandler(TWITTER_CONSUMER_ACCESS, TWITTER_CONSUMER_SECRET) _auth.set_access_token(TWITTER_ACCESS, TWITTER_SECRET) twitter_client = twe...
# -*- coding: utf-8 -*- import tweepy from .constants import TWITTER_ACCESS, TWITTER_SECRET from .constants import TWITTER_CONSUMER_ACCESS, TWITTER_CONSUMER_SECRET _auth = tweepy.OAuthHandler(TWITTER_CONSUMER_ACCESS, TWITTER_CONSUMER_SECRET) _auth.set_access_token(TWITTER_ACCESS, TWITTER_SECRET) twitter_client = twe...
Set wait on rate limit to True
Set wait on rate limit to True
Python
mit
nestauk/inet
# -*- coding: utf-8 -*- import tweepy from .constants import TWITTER_ACCESS, TWITTER_SECRET from .constants import TWITTER_CONSUMER_ACCESS, TWITTER_CONSUMER_SECRET _auth = tweepy.OAuthHandler(TWITTER_CONSUMER_ACCESS, TWITTER_CONSUMER_SECRET) _auth.set_access_token(TWITTER_ACCESS, TWITTER_SECRET) twitter_client = twe...
# -*- coding: utf-8 -*- import tweepy from .constants import TWITTER_ACCESS, TWITTER_SECRET from .constants import TWITTER_CONSUMER_ACCESS, TWITTER_CONSUMER_SECRET _auth = tweepy.OAuthHandler(TWITTER_CONSUMER_ACCESS, TWITTER_CONSUMER_SECRET) _auth.set_access_token(TWITTER_ACCESS, TWITTER_SECRET) twitter_client = twe...
<commit_before># -*- coding: utf-8 -*- import tweepy from .constants import TWITTER_ACCESS, TWITTER_SECRET from .constants import TWITTER_CONSUMER_ACCESS, TWITTER_CONSUMER_SECRET _auth = tweepy.OAuthHandler(TWITTER_CONSUMER_ACCESS, TWITTER_CONSUMER_SECRET) _auth.set_access_token(TWITTER_ACCESS, TWITTER_SECRET) twitt...
# -*- coding: utf-8 -*- import tweepy from .constants import TWITTER_ACCESS, TWITTER_SECRET from .constants import TWITTER_CONSUMER_ACCESS, TWITTER_CONSUMER_SECRET _auth = tweepy.OAuthHandler(TWITTER_CONSUMER_ACCESS, TWITTER_CONSUMER_SECRET) _auth.set_access_token(TWITTER_ACCESS, TWITTER_SECRET) twitter_client = twe...
# -*- coding: utf-8 -*- import tweepy from .constants import TWITTER_ACCESS, TWITTER_SECRET from .constants import TWITTER_CONSUMER_ACCESS, TWITTER_CONSUMER_SECRET _auth = tweepy.OAuthHandler(TWITTER_CONSUMER_ACCESS, TWITTER_CONSUMER_SECRET) _auth.set_access_token(TWITTER_ACCESS, TWITTER_SECRET) twitter_client = twe...
<commit_before># -*- coding: utf-8 -*- import tweepy from .constants import TWITTER_ACCESS, TWITTER_SECRET from .constants import TWITTER_CONSUMER_ACCESS, TWITTER_CONSUMER_SECRET _auth = tweepy.OAuthHandler(TWITTER_CONSUMER_ACCESS, TWITTER_CONSUMER_SECRET) _auth.set_access_token(TWITTER_ACCESS, TWITTER_SECRET) twitt...
822881c51a36af3fe3e746e169743b0c6c29d878
conman/redirects/views.py
conman/redirects/views.py
from django.views.generic import RedirectView class RouteRedirectView(RedirectView): """Redirect to the target Route.""" permanent = True # Set to django 1.9's default to avoid RemovedInDjango19Warning def get_redirect_url(self, *args, **kwargs): """ Return the route's target url. ...
from django.views.generic import RedirectView class RouteRedirectView(RedirectView): """Redirect to the target Route.""" permanent = False # Set to django 1.9's default to avoid RemovedInDjango19Warning def get_redirect_url(self, *args, **kwargs): """ Return the route's target url. ...
Correct silly mistake made in 25f2692
Correct silly mistake made in 25f2692
Python
bsd-2-clause
meshy/django-conman,meshy/django-conman,Ian-Foote/django-conman
from django.views.generic import RedirectView class RouteRedirectView(RedirectView): """Redirect to the target Route.""" permanent = True # Set to django 1.9's default to avoid RemovedInDjango19Warning def get_redirect_url(self, *args, **kwargs): """ Return the route's target url. ...
from django.views.generic import RedirectView class RouteRedirectView(RedirectView): """Redirect to the target Route.""" permanent = False # Set to django 1.9's default to avoid RemovedInDjango19Warning def get_redirect_url(self, *args, **kwargs): """ Return the route's target url. ...
<commit_before>from django.views.generic import RedirectView class RouteRedirectView(RedirectView): """Redirect to the target Route.""" permanent = True # Set to django 1.9's default to avoid RemovedInDjango19Warning def get_redirect_url(self, *args, **kwargs): """ Return the route's tar...
from django.views.generic import RedirectView class RouteRedirectView(RedirectView): """Redirect to the target Route.""" permanent = False # Set to django 1.9's default to avoid RemovedInDjango19Warning def get_redirect_url(self, *args, **kwargs): """ Return the route's target url. ...
from django.views.generic import RedirectView class RouteRedirectView(RedirectView): """Redirect to the target Route.""" permanent = True # Set to django 1.9's default to avoid RemovedInDjango19Warning def get_redirect_url(self, *args, **kwargs): """ Return the route's target url. ...
<commit_before>from django.views.generic import RedirectView class RouteRedirectView(RedirectView): """Redirect to the target Route.""" permanent = True # Set to django 1.9's default to avoid RemovedInDjango19Warning def get_redirect_url(self, *args, **kwargs): """ Return the route's tar...
de75ec4f92c424b22f1d64dc43b3d8259b96fde0
coverart_redirect/loggers.py
coverart_redirect/loggers.py
import raven import raven.transport.threaded_requests from raven.handlers.logging import SentryHandler from raven.conf import setup_logging import logging class MissingRavenClient(raven.Client): """Raven client class that is used as a placeholder. This is done to make sure that calls to functions in the clien...
import raven import raven.transport.threaded_requests from raven.handlers.logging import SentryHandler from raven.conf import setup_logging from werkzeug.exceptions import HTTPException from exceptions import KeyboardInterrupt import logging class MissingRavenClient(raven.Client): """Raven client class that is us...
Exclude HTTP exceptions from logging by Raven
Exclude HTTP exceptions from logging by Raven
Python
mit
metabrainz/coverart_redirect,metabrainz/coverart_redirect,metabrainz/coverart_redirect
import raven import raven.transport.threaded_requests from raven.handlers.logging import SentryHandler from raven.conf import setup_logging import logging class MissingRavenClient(raven.Client): """Raven client class that is used as a placeholder. This is done to make sure that calls to functions in the clien...
import raven import raven.transport.threaded_requests from raven.handlers.logging import SentryHandler from raven.conf import setup_logging from werkzeug.exceptions import HTTPException from exceptions import KeyboardInterrupt import logging class MissingRavenClient(raven.Client): """Raven client class that is us...
<commit_before>import raven import raven.transport.threaded_requests from raven.handlers.logging import SentryHandler from raven.conf import setup_logging import logging class MissingRavenClient(raven.Client): """Raven client class that is used as a placeholder. This is done to make sure that calls to functio...
import raven import raven.transport.threaded_requests from raven.handlers.logging import SentryHandler from raven.conf import setup_logging from werkzeug.exceptions import HTTPException from exceptions import KeyboardInterrupt import logging class MissingRavenClient(raven.Client): """Raven client class that is us...
import raven import raven.transport.threaded_requests from raven.handlers.logging import SentryHandler from raven.conf import setup_logging import logging class MissingRavenClient(raven.Client): """Raven client class that is used as a placeholder. This is done to make sure that calls to functions in the clien...
<commit_before>import raven import raven.transport.threaded_requests from raven.handlers.logging import SentryHandler from raven.conf import setup_logging import logging class MissingRavenClient(raven.Client): """Raven client class that is used as a placeholder. This is done to make sure that calls to functio...
38d5e165363f55dfedea94397ca85634bf800941
libqtile/layout/sublayouts.py
libqtile/layout/sublayouts.py
from base import SubLayout, Rect from Xlib import Xatom class TopLevelSubLayout(SubLayout): ''' This class effectively wraps a sublayout, and automatically adds a floating sublayout, ''' def __init__(self, sublayout_data, clientStack, theme): WrappedSubLayout, args = sublayout_data S...
from base import SubLayout, Rect from Xlib import Xatom class TopLevelSubLayout(SubLayout): ''' This class effectively wraps a sublayout, and automatically adds a floating sublayout, ''' def __init__(self, sublayout_data, clientStack, theme): WrappedSubLayout, args = sublayout_data S...
Update floating sublayout to use floatDimensions
Update floating sublayout to use floatDimensions
Python
mit
himaaaatti/qtile,dequis/qtile,cortesi/qtile,kopchik/qtile,zordsdavini/qtile,frostidaho/qtile,nxnfufunezn/qtile,himaaaatti/qtile,EndPointCorp/qtile,zordsdavini/qtile,encukou/qtile,kynikos/qtile,flacjacket/qtile,bavardage/qtile,kseistrup/qtile,soulchainer/qtile,jdowner/qtile,apinsard/qtile,rxcomm/qtile,ramnes/qtile,EndPo...
from base import SubLayout, Rect from Xlib import Xatom class TopLevelSubLayout(SubLayout): ''' This class effectively wraps a sublayout, and automatically adds a floating sublayout, ''' def __init__(self, sublayout_data, clientStack, theme): WrappedSubLayout, args = sublayout_data S...
from base import SubLayout, Rect from Xlib import Xatom class TopLevelSubLayout(SubLayout): ''' This class effectively wraps a sublayout, and automatically adds a floating sublayout, ''' def __init__(self, sublayout_data, clientStack, theme): WrappedSubLayout, args = sublayout_data S...
<commit_before>from base import SubLayout, Rect from Xlib import Xatom class TopLevelSubLayout(SubLayout): ''' This class effectively wraps a sublayout, and automatically adds a floating sublayout, ''' def __init__(self, sublayout_data, clientStack, theme): WrappedSubLayout, args = sublayout...
from base import SubLayout, Rect from Xlib import Xatom class TopLevelSubLayout(SubLayout): ''' This class effectively wraps a sublayout, and automatically adds a floating sublayout, ''' def __init__(self, sublayout_data, clientStack, theme): WrappedSubLayout, args = sublayout_data S...
from base import SubLayout, Rect from Xlib import Xatom class TopLevelSubLayout(SubLayout): ''' This class effectively wraps a sublayout, and automatically adds a floating sublayout, ''' def __init__(self, sublayout_data, clientStack, theme): WrappedSubLayout, args = sublayout_data S...
<commit_before>from base import SubLayout, Rect from Xlib import Xatom class TopLevelSubLayout(SubLayout): ''' This class effectively wraps a sublayout, and automatically adds a floating sublayout, ''' def __init__(self, sublayout_data, clientStack, theme): WrappedSubLayout, args = sublayout...
f35ed8a6c0dc81b86c69348fff543d52f070ee28
test/units/TestModules.py
test/units/TestModules.py
# -*- coding: utf-8 -*- import os import ast import unittest from ansible import utils class TestModules(unittest.TestCase): def list_all_modules(self): paths = utils.plugins.module_finder._get_paths() paths = [x for x in paths if os.path.isdir(x)] module_list = [] for path in pa...
# -*- coding: utf-8 -*- import os import ast import unittest from ansible import utils class TestModules(unittest.TestCase): def list_all_modules(self): paths = utils.plugins.module_finder._get_paths() paths = [x for x in paths if os.path.isdir(x)] module_list = [] for path in pa...
Update module test code to avoid pycs (that are not used)
Update module test code to avoid pycs (that are not used)
Python
mit
thaim/ansible,thaim/ansible
# -*- coding: utf-8 -*- import os import ast import unittest from ansible import utils class TestModules(unittest.TestCase): def list_all_modules(self): paths = utils.plugins.module_finder._get_paths() paths = [x for x in paths if os.path.isdir(x)] module_list = [] for path in pa...
# -*- coding: utf-8 -*- import os import ast import unittest from ansible import utils class TestModules(unittest.TestCase): def list_all_modules(self): paths = utils.plugins.module_finder._get_paths() paths = [x for x in paths if os.path.isdir(x)] module_list = [] for path in pa...
<commit_before># -*- coding: utf-8 -*- import os import ast import unittest from ansible import utils class TestModules(unittest.TestCase): def list_all_modules(self): paths = utils.plugins.module_finder._get_paths() paths = [x for x in paths if os.path.isdir(x)] module_list = [] ...
# -*- coding: utf-8 -*- import os import ast import unittest from ansible import utils class TestModules(unittest.TestCase): def list_all_modules(self): paths = utils.plugins.module_finder._get_paths() paths = [x for x in paths if os.path.isdir(x)] module_list = [] for path in pa...
# -*- coding: utf-8 -*- import os import ast import unittest from ansible import utils class TestModules(unittest.TestCase): def list_all_modules(self): paths = utils.plugins.module_finder._get_paths() paths = [x for x in paths if os.path.isdir(x)] module_list = [] for path in pa...
<commit_before># -*- coding: utf-8 -*- import os import ast import unittest from ansible import utils class TestModules(unittest.TestCase): def list_all_modules(self): paths = utils.plugins.module_finder._get_paths() paths = [x for x in paths if os.path.isdir(x)] module_list = [] ...
6152709cad4c602dd00184f525e5cdd397074bd5
tests/web/test_request.py
tests/web/test_request.py
import unittest from performance.web import Request, RequestTypeError, RequestTimeError class RequestTestCase(unittest.TestCase): def setUp(self): self.url = 'http://www.google.com' def test_constants(self): self.assertEqual('get', Request.GET) self.assertEqual('post', Request.POST) ...
import unittest from performance.web import Request, RequestTypeError, RequestTimeError class RequestTestCase(unittest.TestCase): def setUp(self): self.url = 'http://www.google.com' def test_constants(self): self.assertEqual('get', Request.GET) self.assertEqual('post', Request.POST) ...
Update test that it runs
Update test that it runs
Python
mit
BakeCode/performance-testing,BakeCode/performance-testing
import unittest from performance.web import Request, RequestTypeError, RequestTimeError class RequestTestCase(unittest.TestCase): def setUp(self): self.url = 'http://www.google.com' def test_constants(self): self.assertEqual('get', Request.GET) self.assertEqual('post', Request.POST) ...
import unittest from performance.web import Request, RequestTypeError, RequestTimeError class RequestTestCase(unittest.TestCase): def setUp(self): self.url = 'http://www.google.com' def test_constants(self): self.assertEqual('get', Request.GET) self.assertEqual('post', Request.POST) ...
<commit_before>import unittest from performance.web import Request, RequestTypeError, RequestTimeError class RequestTestCase(unittest.TestCase): def setUp(self): self.url = 'http://www.google.com' def test_constants(self): self.assertEqual('get', Request.GET) self.assertEqual('post', ...
import unittest from performance.web import Request, RequestTypeError, RequestTimeError class RequestTestCase(unittest.TestCase): def setUp(self): self.url = 'http://www.google.com' def test_constants(self): self.assertEqual('get', Request.GET) self.assertEqual('post', Request.POST) ...
import unittest from performance.web import Request, RequestTypeError, RequestTimeError class RequestTestCase(unittest.TestCase): def setUp(self): self.url = 'http://www.google.com' def test_constants(self): self.assertEqual('get', Request.GET) self.assertEqual('post', Request.POST) ...
<commit_before>import unittest from performance.web import Request, RequestTypeError, RequestTimeError class RequestTestCase(unittest.TestCase): def setUp(self): self.url = 'http://www.google.com' def test_constants(self): self.assertEqual('get', Request.GET) self.assertEqual('post', ...
a0443783c880cf90b11886e3180e842e2c17a77a
tests/gtype.py
tests/gtype.py
import unittest from common import gobject, gtk class GTypeTest(unittest.TestCase): def testBoolType(self): store = gtk.ListStore(gobject.TYPE_BOOLEAN) assert store.get_column_type(0) == gobject.TYPE_BOOLEAN store = gtk.ListStore('gboolean') assert store.get_column_type(0) == gobje...
import unittest from common import gobject, gtk class GTypeTest(unittest.TestCase): def checkType(self, expected, *objects): # Silly method to check pyg_type_from_object store = gtk.ListStore(expected) val = store.get_column_type(0) assert val == expected, \ ...
Test various other types aswell
Test various other types aswell
Python
lgpl-2.1
thiblahute/pygobject,atizo/pygobject,atizo/pygobject,nzjrs/pygobject,choeger/pygobject-cmake,Distrotech/pygobject,pexip/pygobject,davidmalcolm/pygobject,jdahlin/pygobject,MathieuDuponchelle/pygobject,GNOME/pygobject,davidmalcolm/pygobject,thiblahute/pygobject,davibe/pygobject,davibe/pygobject,jdahlin/pygobject,pexip/py...
import unittest from common import gobject, gtk class GTypeTest(unittest.TestCase): def testBoolType(self): store = gtk.ListStore(gobject.TYPE_BOOLEAN) assert store.get_column_type(0) == gobject.TYPE_BOOLEAN store = gtk.ListStore('gboolean') assert store.get_column_type(0) == gobje...
import unittest from common import gobject, gtk class GTypeTest(unittest.TestCase): def checkType(self, expected, *objects): # Silly method to check pyg_type_from_object store = gtk.ListStore(expected) val = store.get_column_type(0) assert val == expected, \ ...
<commit_before>import unittest from common import gobject, gtk class GTypeTest(unittest.TestCase): def testBoolType(self): store = gtk.ListStore(gobject.TYPE_BOOLEAN) assert store.get_column_type(0) == gobject.TYPE_BOOLEAN store = gtk.ListStore('gboolean') assert store.get_column_t...
import unittest from common import gobject, gtk class GTypeTest(unittest.TestCase): def checkType(self, expected, *objects): # Silly method to check pyg_type_from_object store = gtk.ListStore(expected) val = store.get_column_type(0) assert val == expected, \ ...
import unittest from common import gobject, gtk class GTypeTest(unittest.TestCase): def testBoolType(self): store = gtk.ListStore(gobject.TYPE_BOOLEAN) assert store.get_column_type(0) == gobject.TYPE_BOOLEAN store = gtk.ListStore('gboolean') assert store.get_column_type(0) == gobje...
<commit_before>import unittest from common import gobject, gtk class GTypeTest(unittest.TestCase): def testBoolType(self): store = gtk.ListStore(gobject.TYPE_BOOLEAN) assert store.get_column_type(0) == gobject.TYPE_BOOLEAN store = gtk.ListStore('gboolean') assert store.get_column_t...
9bedcfc03e2dcb4261a49f332e82e78379059997
client/setup.py
client/setup.py
from setuptools import setup requirements = [ 'pyserial', ] with open('README') as f: long_description = f.read() setup( name='removinator', version='0.1.0.dev2', description='A library for controlling the Smart Card Removinator', long_description=long_description, url='https://github.com...
from setuptools import setup requirements = [ 'pyserial', ] with open('README') as f: long_description = f.read() setup( name='removinator', version='0.1.0.dev3', description='A library for controlling the Smart Card Removinator', long_description=long_description, url='https://github.com...
Bump client library version to 0.1.0.dev3
Bump client library version to 0.1.0.dev3
Python
apache-2.0
nkinder/smart-card-removinator
from setuptools import setup requirements = [ 'pyserial', ] with open('README') as f: long_description = f.read() setup( name='removinator', version='0.1.0.dev2', description='A library for controlling the Smart Card Removinator', long_description=long_description, url='https://github.com...
from setuptools import setup requirements = [ 'pyserial', ] with open('README') as f: long_description = f.read() setup( name='removinator', version='0.1.0.dev3', description='A library for controlling the Smart Card Removinator', long_description=long_description, url='https://github.com...
<commit_before>from setuptools import setup requirements = [ 'pyserial', ] with open('README') as f: long_description = f.read() setup( name='removinator', version='0.1.0.dev2', description='A library for controlling the Smart Card Removinator', long_description=long_description, url='htt...
from setuptools import setup requirements = [ 'pyserial', ] with open('README') as f: long_description = f.read() setup( name='removinator', version='0.1.0.dev3', description='A library for controlling the Smart Card Removinator', long_description=long_description, url='https://github.com...
from setuptools import setup requirements = [ 'pyserial', ] with open('README') as f: long_description = f.read() setup( name='removinator', version='0.1.0.dev2', description='A library for controlling the Smart Card Removinator', long_description=long_description, url='https://github.com...
<commit_before>from setuptools import setup requirements = [ 'pyserial', ] with open('README') as f: long_description = f.read() setup( name='removinator', version='0.1.0.dev2', description='A library for controlling the Smart Card Removinator', long_description=long_description, url='htt...
fde3cb61225f66414f41eac141fb68651a3fe1c9
tests/stats.py
tests/stats.py
# Copyright (C) 2010 Peter Teichman import unittest from instatrace.stats import Statistic class testStatistic(unittest.TestCase): def testName(self): name = "test_stat" s = Statistic(name, []) self.assertEqual(name, s.name)
# Copyright (C) 2010 Peter Teichman import unittest from instatrace.stats import Statistics class testStatistics(unittest.TestCase): def testStats(self): name = "test_stat" s = Statistics() s.add_sample(name, 1) s.add_sample(name, 2) s.add_sample(name, 3) test_st...
Implement testStatistics with count, total, mean, and stddev checks
Implement testStatistics with count, total, mean, and stddev checks
Python
mit
pteichman/instatrace
# Copyright (C) 2010 Peter Teichman import unittest from instatrace.stats import Statistic class testStatistic(unittest.TestCase): def testName(self): name = "test_stat" s = Statistic(name, []) self.assertEqual(name, s.name) Implement testStatistics with count, total, mean, and stddev ch...
# Copyright (C) 2010 Peter Teichman import unittest from instatrace.stats import Statistics class testStatistics(unittest.TestCase): def testStats(self): name = "test_stat" s = Statistics() s.add_sample(name, 1) s.add_sample(name, 2) s.add_sample(name, 3) test_st...
<commit_before># Copyright (C) 2010 Peter Teichman import unittest from instatrace.stats import Statistic class testStatistic(unittest.TestCase): def testName(self): name = "test_stat" s = Statistic(name, []) self.assertEqual(name, s.name) <commit_msg>Implement testStatistics with count,...
# Copyright (C) 2010 Peter Teichman import unittest from instatrace.stats import Statistics class testStatistics(unittest.TestCase): def testStats(self): name = "test_stat" s = Statistics() s.add_sample(name, 1) s.add_sample(name, 2) s.add_sample(name, 3) test_st...
# Copyright (C) 2010 Peter Teichman import unittest from instatrace.stats import Statistic class testStatistic(unittest.TestCase): def testName(self): name = "test_stat" s = Statistic(name, []) self.assertEqual(name, s.name) Implement testStatistics with count, total, mean, and stddev ch...
<commit_before># Copyright (C) 2010 Peter Teichman import unittest from instatrace.stats import Statistic class testStatistic(unittest.TestCase): def testName(self): name = "test_stat" s = Statistic(name, []) self.assertEqual(name, s.name) <commit_msg>Implement testStatistics with count,...
37900e6c4bd8c16b2fef1be0c978f4f0567b09a3
nn/embedding/embeddings.py
nn/embedding/embeddings.py
import tensorflow as tf from .. import var_init def embeddings(*, id_space_size, embedding_size): return tf.Variable(var_init.normal([id_space_size, embedding_size]))
import tensorflow as tf from ..variable import variable def embeddings(*, id_space_size, embedding_size): return variable([id_space_size, embedding_size])
Use variable module instead of var_init
Use variable module instead of var_init
Python
unlicense
raviqqe/tensorflow-extenteten,raviqqe/tensorflow-extenteten
import tensorflow as tf from .. import var_init def embeddings(*, id_space_size, embedding_size): return tf.Variable(var_init.normal([id_space_size, embedding_size])) Use variable module instead of var_init
import tensorflow as tf from ..variable import variable def embeddings(*, id_space_size, embedding_size): return variable([id_space_size, embedding_size])
<commit_before>import tensorflow as tf from .. import var_init def embeddings(*, id_space_size, embedding_size): return tf.Variable(var_init.normal([id_space_size, embedding_size])) <commit_msg>Use variable module instead of var_init<commit_after>
import tensorflow as tf from ..variable import variable def embeddings(*, id_space_size, embedding_size): return variable([id_space_size, embedding_size])
import tensorflow as tf from .. import var_init def embeddings(*, id_space_size, embedding_size): return tf.Variable(var_init.normal([id_space_size, embedding_size])) Use variable module instead of var_initimport tensorflow as tf from ..variable import variable def embeddings(*, id_space_size, embedding_size)...
<commit_before>import tensorflow as tf from .. import var_init def embeddings(*, id_space_size, embedding_size): return tf.Variable(var_init.normal([id_space_size, embedding_size])) <commit_msg>Use variable module instead of var_init<commit_after>import tensorflow as tf from ..variable import variable def emb...
0bfd715ca0bae0929f2a06bdb42bdb0c95aea6dd
grafeno/_parse_freeling.py
grafeno/_parse_freeling.py
#!/usr/bin/env python3 from subprocess import Popen, PIPE import subprocess as subp import json import re regex = re.compile('}\s*{') def parse (sentence, lang): '''Calls the freeling process to obtain the dependency parse of a text.''' config = "grafeno/freeling_deps_"+lang+".cfg" proc = Popen(["analyze...
#!/usr/bin/env python3 from subprocess import Popen, PIPE import subprocess as subp import os import json import re regex = re.compile('}\s*{') def parse (sentence, lang): '''Calls the freeling process to obtain the dependency parse of a text.''' config = os.path.dirname(__file__)+"/freeling_deps_"+lang+".cf...
Make freeling configuration available independent of execution path
Make freeling configuration available independent of execution path
Python
agpl-3.0
agarsev/grafeno,agarsev/grafeno,agarsev/grafeno
#!/usr/bin/env python3 from subprocess import Popen, PIPE import subprocess as subp import json import re regex = re.compile('}\s*{') def parse (sentence, lang): '''Calls the freeling process to obtain the dependency parse of a text.''' config = "grafeno/freeling_deps_"+lang+".cfg" proc = Popen(["analyze...
#!/usr/bin/env python3 from subprocess import Popen, PIPE import subprocess as subp import os import json import re regex = re.compile('}\s*{') def parse (sentence, lang): '''Calls the freeling process to obtain the dependency parse of a text.''' config = os.path.dirname(__file__)+"/freeling_deps_"+lang+".cf...
<commit_before>#!/usr/bin/env python3 from subprocess import Popen, PIPE import subprocess as subp import json import re regex = re.compile('}\s*{') def parse (sentence, lang): '''Calls the freeling process to obtain the dependency parse of a text.''' config = "grafeno/freeling_deps_"+lang+".cfg" proc = ...
#!/usr/bin/env python3 from subprocess import Popen, PIPE import subprocess as subp import os import json import re regex = re.compile('}\s*{') def parse (sentence, lang): '''Calls the freeling process to obtain the dependency parse of a text.''' config = os.path.dirname(__file__)+"/freeling_deps_"+lang+".cf...
#!/usr/bin/env python3 from subprocess import Popen, PIPE import subprocess as subp import json import re regex = re.compile('}\s*{') def parse (sentence, lang): '''Calls the freeling process to obtain the dependency parse of a text.''' config = "grafeno/freeling_deps_"+lang+".cfg" proc = Popen(["analyze...
<commit_before>#!/usr/bin/env python3 from subprocess import Popen, PIPE import subprocess as subp import json import re regex = re.compile('}\s*{') def parse (sentence, lang): '''Calls the freeling process to obtain the dependency parse of a text.''' config = "grafeno/freeling_deps_"+lang+".cfg" proc = ...
dc59e03337ef26ca7fbc3165c8723a58da796598
cloud_deploy.py
cloud_deploy.py
#!/usr/bin/env python __metaclass__ = type from argparse import ArgumentParser import subprocess import sys from jujupy import ( CannotConnectEnv, Environment, until_timeout, ) def deploy_stack(environment): """"Deploy a test stack in the specified environment. :param environment: The name of ...
#!/usr/bin/env python from __future__ import print_function __metaclass__ = type from argparse import ArgumentParser import os import subprocess import sys from jujupy import ( CannotConnectEnv, Environment, ) def deploy_stack(environment, debug): """"Deploy a test stack in the specified environment. ...
Add support for -debug=true when testing clouds. --debug is still unsafe. We need to redirect sdtout to a log.
Add support for -debug=true when testing clouds. --debug is still unsafe. We need to redirect sdtout to a log.
Python
agpl-3.0
mjs/juju,mjs/juju,mjs/juju,mjs/juju,mjs/juju,mjs/juju,mjs/juju
#!/usr/bin/env python __metaclass__ = type from argparse import ArgumentParser import subprocess import sys from jujupy import ( CannotConnectEnv, Environment, until_timeout, ) def deploy_stack(environment): """"Deploy a test stack in the specified environment. :param environment: The name of ...
#!/usr/bin/env python from __future__ import print_function __metaclass__ = type from argparse import ArgumentParser import os import subprocess import sys from jujupy import ( CannotConnectEnv, Environment, ) def deploy_stack(environment, debug): """"Deploy a test stack in the specified environment. ...
<commit_before>#!/usr/bin/env python __metaclass__ = type from argparse import ArgumentParser import subprocess import sys from jujupy import ( CannotConnectEnv, Environment, until_timeout, ) def deploy_stack(environment): """"Deploy a test stack in the specified environment. :param environmen...
#!/usr/bin/env python from __future__ import print_function __metaclass__ = type from argparse import ArgumentParser import os import subprocess import sys from jujupy import ( CannotConnectEnv, Environment, ) def deploy_stack(environment, debug): """"Deploy a test stack in the specified environment. ...
#!/usr/bin/env python __metaclass__ = type from argparse import ArgumentParser import subprocess import sys from jujupy import ( CannotConnectEnv, Environment, until_timeout, ) def deploy_stack(environment): """"Deploy a test stack in the specified environment. :param environment: The name of ...
<commit_before>#!/usr/bin/env python __metaclass__ = type from argparse import ArgumentParser import subprocess import sys from jujupy import ( CannotConnectEnv, Environment, until_timeout, ) def deploy_stack(environment): """"Deploy a test stack in the specified environment. :param environmen...
7060a7c85cf82fae9e018f1c82a1d8181bd5214d
library/tests/factories.py
library/tests/factories.py
from django.conf import settings import factory from factory.fuzzy import FuzzyText from ..models import Book, BookSpecimen class BookFactory(factory.django.DjangoModelFactory): title = factory.Sequence(lambda n: "Test book %03d" % n) summary = "This is a test summary" section = 1 lang = settings.LA...
from django.conf import settings import factory from factory.fuzzy import FuzzyText from ..models import Book, BookSpecimen class BookFactory(factory.django.DjangoModelFactory): title = factory.Sequence(lambda n: "Test book {0}".format(n)) summary = "This is a test summary" section = 1 lang = settin...
Use format for string formatting
Use format for string formatting
Python
agpl-3.0
Lcaracol/ideasbox.lan,ideascube/ideascube,ideascube/ideascube,ideascube/ideascube,Lcaracol/ideasbox.lan,ideascube/ideascube,Lcaracol/ideasbox.lan
from django.conf import settings import factory from factory.fuzzy import FuzzyText from ..models import Book, BookSpecimen class BookFactory(factory.django.DjangoModelFactory): title = factory.Sequence(lambda n: "Test book %03d" % n) summary = "This is a test summary" section = 1 lang = settings.LA...
from django.conf import settings import factory from factory.fuzzy import FuzzyText from ..models import Book, BookSpecimen class BookFactory(factory.django.DjangoModelFactory): title = factory.Sequence(lambda n: "Test book {0}".format(n)) summary = "This is a test summary" section = 1 lang = settin...
<commit_before>from django.conf import settings import factory from factory.fuzzy import FuzzyText from ..models import Book, BookSpecimen class BookFactory(factory.django.DjangoModelFactory): title = factory.Sequence(lambda n: "Test book %03d" % n) summary = "This is a test summary" section = 1 lan...
from django.conf import settings import factory from factory.fuzzy import FuzzyText from ..models import Book, BookSpecimen class BookFactory(factory.django.DjangoModelFactory): title = factory.Sequence(lambda n: "Test book {0}".format(n)) summary = "This is a test summary" section = 1 lang = settin...
from django.conf import settings import factory from factory.fuzzy import FuzzyText from ..models import Book, BookSpecimen class BookFactory(factory.django.DjangoModelFactory): title = factory.Sequence(lambda n: "Test book %03d" % n) summary = "This is a test summary" section = 1 lang = settings.LA...
<commit_before>from django.conf import settings import factory from factory.fuzzy import FuzzyText from ..models import Book, BookSpecimen class BookFactory(factory.django.DjangoModelFactory): title = factory.Sequence(lambda n: "Test book %03d" % n) summary = "This is a test summary" section = 1 lan...
f2a47110c9416a1efcf2a4346303377afedc2315
builders/horizons_telnet.py
builders/horizons_telnet.py
#!/usr/bin/env python2.7 #import argparse from telnetlib import Telnet def main(in_path, out_path): lines = read_lines(open(in_path)) tn = Telnet('horizons.jpl.nasa.gov', 6775) out = open(out_path, 'w') for line in lines: print(repr(line)) tn.write(line.encode('ascii') + b'\r\n') ...
#!/usr/bin/env python2.7 #import argparse from telnetlib import Telnet def main(in_path, out_path): lines = read_lines(open(in_path)) tn = Telnet('horizons.jpl.nasa.gov', 6775) out = open(out_path, 'w') for line in lines: print(repr(line)) tn.write(line.encode('ascii') + b'\r\n') ...
Speed up the telnet process for HORIZONS
Speed up the telnet process for HORIZONS Be very patient waiting for the other end to start its reply, but then only wait 1s for the rest of the data.
Python
mit
exoanalytic/python-skyfield,ozialien/python-skyfield,exoanalytic/python-skyfield,skyfielders/python-skyfield,ozialien/python-skyfield,GuidoBR/python-skyfield,GuidoBR/python-skyfield,skyfielders/python-skyfield
#!/usr/bin/env python2.7 #import argparse from telnetlib import Telnet def main(in_path, out_path): lines = read_lines(open(in_path)) tn = Telnet('horizons.jpl.nasa.gov', 6775) out = open(out_path, 'w') for line in lines: print(repr(line)) tn.write(line.encode('ascii') + b'\r\n') ...
#!/usr/bin/env python2.7 #import argparse from telnetlib import Telnet def main(in_path, out_path): lines = read_lines(open(in_path)) tn = Telnet('horizons.jpl.nasa.gov', 6775) out = open(out_path, 'w') for line in lines: print(repr(line)) tn.write(line.encode('ascii') + b'\r\n') ...
<commit_before>#!/usr/bin/env python2.7 #import argparse from telnetlib import Telnet def main(in_path, out_path): lines = read_lines(open(in_path)) tn = Telnet('horizons.jpl.nasa.gov', 6775) out = open(out_path, 'w') for line in lines: print(repr(line)) tn.write(line.encode('ascii') +...
#!/usr/bin/env python2.7 #import argparse from telnetlib import Telnet def main(in_path, out_path): lines = read_lines(open(in_path)) tn = Telnet('horizons.jpl.nasa.gov', 6775) out = open(out_path, 'w') for line in lines: print(repr(line)) tn.write(line.encode('ascii') + b'\r\n') ...
#!/usr/bin/env python2.7 #import argparse from telnetlib import Telnet def main(in_path, out_path): lines = read_lines(open(in_path)) tn = Telnet('horizons.jpl.nasa.gov', 6775) out = open(out_path, 'w') for line in lines: print(repr(line)) tn.write(line.encode('ascii') + b'\r\n') ...
<commit_before>#!/usr/bin/env python2.7 #import argparse from telnetlib import Telnet def main(in_path, out_path): lines = read_lines(open(in_path)) tn = Telnet('horizons.jpl.nasa.gov', 6775) out = open(out_path, 'w') for line in lines: print(repr(line)) tn.write(line.encode('ascii') +...
565841a8ccfe9675cfbee89564506bc1967314b7
trunk/scons-tools/gmcs.py
trunk/scons-tools/gmcs.py
import os.path import SCons.Builder import SCons.Node.FS import SCons.Util csccom = "$CSC $CSCFLAGS $_CSCLIBPATH -r:$_CSCLIBS -out:${TARGET.abspath} $SOURCES" csclibcom = "$CSC -t:library $CSCLIBFLAGS $_CSCLIBPATH $_CSCLIBS -out:${TARGET.abspath} $SOURCES" McsBuilder = SCons.Builder.Builder(action = '$CSCCOM', ...
import os.path import SCons.Builder import SCons.Node.FS import SCons.Util csccom = "$CSC $CSCFLAGS $_CSCLIBPATH -r:$_CSCLIBS -out:${TARGET.abspath} $SOURCES" csclibcom = "$CSC -t:library $CSCLIBFLAGS $_CSCLIBPATH $_CSCLIBS -out:${TARGET.abspath} $SOURCES" McsBuilder = SCons.Builder.Builder(action = '$CSCCOM', ...
Use -platform:anycpu while compiling .NET assemblies
Use -platform:anycpu while compiling .NET assemblies git-svn-id: 8d82213adbbc6b1538a984bace977d31fcb31691@349 2f5d681c-ba19-11dd-a503-ed2d4bea8bb5
Python
lgpl-2.1
shutej/tapcfg,shutej/tapcfg,shutej/tapcfg,shutej/tapcfg,shutej/tapcfg,shutej/tapcfg,shutej/tapcfg
import os.path import SCons.Builder import SCons.Node.FS import SCons.Util csccom = "$CSC $CSCFLAGS $_CSCLIBPATH -r:$_CSCLIBS -out:${TARGET.abspath} $SOURCES" csclibcom = "$CSC -t:library $CSCLIBFLAGS $_CSCLIBPATH $_CSCLIBS -out:${TARGET.abspath} $SOURCES" McsBuilder = SCons.Builder.Builder(action = '$CSCCOM', ...
import os.path import SCons.Builder import SCons.Node.FS import SCons.Util csccom = "$CSC $CSCFLAGS $_CSCLIBPATH -r:$_CSCLIBS -out:${TARGET.abspath} $SOURCES" csclibcom = "$CSC -t:library $CSCLIBFLAGS $_CSCLIBPATH $_CSCLIBS -out:${TARGET.abspath} $SOURCES" McsBuilder = SCons.Builder.Builder(action = '$CSCCOM', ...
<commit_before>import os.path import SCons.Builder import SCons.Node.FS import SCons.Util csccom = "$CSC $CSCFLAGS $_CSCLIBPATH -r:$_CSCLIBS -out:${TARGET.abspath} $SOURCES" csclibcom = "$CSC -t:library $CSCLIBFLAGS $_CSCLIBPATH $_CSCLIBS -out:${TARGET.abspath} $SOURCES" McsBuilder = SCons.Builder.Builder(action = '...
import os.path import SCons.Builder import SCons.Node.FS import SCons.Util csccom = "$CSC $CSCFLAGS $_CSCLIBPATH -r:$_CSCLIBS -out:${TARGET.abspath} $SOURCES" csclibcom = "$CSC -t:library $CSCLIBFLAGS $_CSCLIBPATH $_CSCLIBS -out:${TARGET.abspath} $SOURCES" McsBuilder = SCons.Builder.Builder(action = '$CSCCOM', ...
import os.path import SCons.Builder import SCons.Node.FS import SCons.Util csccom = "$CSC $CSCFLAGS $_CSCLIBPATH -r:$_CSCLIBS -out:${TARGET.abspath} $SOURCES" csclibcom = "$CSC -t:library $CSCLIBFLAGS $_CSCLIBPATH $_CSCLIBS -out:${TARGET.abspath} $SOURCES" McsBuilder = SCons.Builder.Builder(action = '$CSCCOM', ...
<commit_before>import os.path import SCons.Builder import SCons.Node.FS import SCons.Util csccom = "$CSC $CSCFLAGS $_CSCLIBPATH -r:$_CSCLIBS -out:${TARGET.abspath} $SOURCES" csclibcom = "$CSC -t:library $CSCLIBFLAGS $_CSCLIBPATH $_CSCLIBS -out:${TARGET.abspath} $SOURCES" McsBuilder = SCons.Builder.Builder(action = '...
63ce9ac2a46f74704810d62e22c0b75ca071442a
minesweeper/minesweeper.py
minesweeper/minesweeper.py
import re class InvalidBoard(ValueError): pass def board(b): if not is_valid_board(b): raise InvalidBoard("Board is malformed and thus invalid") b = [[ch for ch in row] for row in b] for i in range(1, len(b)-1): for j in range(1, len(b[0])-1): if b[i][j] == " ": ...
import re class InvalidBoard(ValueError): pass def board(b): if not is_valid_board(b): raise InvalidBoard("Board is malformed and thus invalid") b = [[ch for ch in row] for row in b] for i in range(1, len(b)-1): for j in range(1, len(b[0])-1): if b[i][j] == " ": ...
Add note regarding use of bool in validation
Add note regarding use of bool in validation
Python
agpl-3.0
CubicComet/exercism-python-solutions
import re class InvalidBoard(ValueError): pass def board(b): if not is_valid_board(b): raise InvalidBoard("Board is malformed and thus invalid") b = [[ch for ch in row] for row in b] for i in range(1, len(b)-1): for j in range(1, len(b[0])-1): if b[i][j] == " ": ...
import re class InvalidBoard(ValueError): pass def board(b): if not is_valid_board(b): raise InvalidBoard("Board is malformed and thus invalid") b = [[ch for ch in row] for row in b] for i in range(1, len(b)-1): for j in range(1, len(b[0])-1): if b[i][j] == " ": ...
<commit_before>import re class InvalidBoard(ValueError): pass def board(b): if not is_valid_board(b): raise InvalidBoard("Board is malformed and thus invalid") b = [[ch for ch in row] for row in b] for i in range(1, len(b)-1): for j in range(1, len(b[0])-1): if b[i][j] ==...
import re class InvalidBoard(ValueError): pass def board(b): if not is_valid_board(b): raise InvalidBoard("Board is malformed and thus invalid") b = [[ch for ch in row] for row in b] for i in range(1, len(b)-1): for j in range(1, len(b[0])-1): if b[i][j] == " ": ...
import re class InvalidBoard(ValueError): pass def board(b): if not is_valid_board(b): raise InvalidBoard("Board is malformed and thus invalid") b = [[ch for ch in row] for row in b] for i in range(1, len(b)-1): for j in range(1, len(b[0])-1): if b[i][j] == " ": ...
<commit_before>import re class InvalidBoard(ValueError): pass def board(b): if not is_valid_board(b): raise InvalidBoard("Board is malformed and thus invalid") b = [[ch for ch in row] for row in b] for i in range(1, len(b)-1): for j in range(1, len(b[0])-1): if b[i][j] ==...
fbe6722fd74b5e260892f5664226bc66d5424d79
kindred/Token.py
kindred/Token.py
class Token: """ Individual word with lemma, part-of-speech and location in text. :ivar word: Unprocessed word :ivar lemma: Lemmatized word :ivar partofspeech: Part-of-speech of word :ivar startPos: Start position of token in sentence :ivar endPos: End position of token in sentence """ def __init__(self,w...
class Token: """ Individual word with lemma, part-of-speech and location in text. :ivar word: Unprocessed word :ivar lemma: Lemmatized word :ivar partofspeech: Part-of-speech of word :ivar startPos: Start position of token in document text (note: not the sentence text) :ivar endPos: End position of token in d...
Fix mistaken document about token pos
Fix mistaken document about token pos
Python
mit
jakelever/kindred,jakelever/kindred
class Token: """ Individual word with lemma, part-of-speech and location in text. :ivar word: Unprocessed word :ivar lemma: Lemmatized word :ivar partofspeech: Part-of-speech of word :ivar startPos: Start position of token in sentence :ivar endPos: End position of token in sentence """ def __init__(self,w...
class Token: """ Individual word with lemma, part-of-speech and location in text. :ivar word: Unprocessed word :ivar lemma: Lemmatized word :ivar partofspeech: Part-of-speech of word :ivar startPos: Start position of token in document text (note: not the sentence text) :ivar endPos: End position of token in d...
<commit_before> class Token: """ Individual word with lemma, part-of-speech and location in text. :ivar word: Unprocessed word :ivar lemma: Lemmatized word :ivar partofspeech: Part-of-speech of word :ivar startPos: Start position of token in sentence :ivar endPos: End position of token in sentence """ def ...
class Token: """ Individual word with lemma, part-of-speech and location in text. :ivar word: Unprocessed word :ivar lemma: Lemmatized word :ivar partofspeech: Part-of-speech of word :ivar startPos: Start position of token in document text (note: not the sentence text) :ivar endPos: End position of token in d...
class Token: """ Individual word with lemma, part-of-speech and location in text. :ivar word: Unprocessed word :ivar lemma: Lemmatized word :ivar partofspeech: Part-of-speech of word :ivar startPos: Start position of token in sentence :ivar endPos: End position of token in sentence """ def __init__(self,w...
<commit_before> class Token: """ Individual word with lemma, part-of-speech and location in text. :ivar word: Unprocessed word :ivar lemma: Lemmatized word :ivar partofspeech: Part-of-speech of word :ivar startPos: Start position of token in sentence :ivar endPos: End position of token in sentence """ def ...
26d2e74c93036962aa266fc1484e77d47d36a446
rnacentral/portal/migrations/0010_add_precomputed_rna_type.py
rnacentral/portal/migrations/0010_add_precomputed_rna_type.py
from __future__ import unicode_literals from django.db import models, migrations class Migration(migrations.Migration): dependencies = [ ('portal', '0009_add_precomputed_rna_table'), ] operations = [ migrations.AddField("RnaPrecomputed", "rna_type", models.CharField(max_length=250)) ...
from __future__ import unicode_literals from django.db import models, migrations class Migration(migrations.Migration): dependencies = [ ('portal', '0009_add_precomputed_rna_table'), ] operations = [ # rna_type is a / seperated field that represents the set of rna_types # for a ...
Add a doc to the migration
Add a doc to the migration This should probably be encoded better somehow.
Python
apache-2.0
RNAcentral/rnacentral-webcode,RNAcentral/rnacentral-webcode,RNAcentral/rnacentral-webcode,RNAcentral/rnacentral-webcode
from __future__ import unicode_literals from django.db import models, migrations class Migration(migrations.Migration): dependencies = [ ('portal', '0009_add_precomputed_rna_table'), ] operations = [ migrations.AddField("RnaPrecomputed", "rna_type", models.CharField(max_length=250)) ...
from __future__ import unicode_literals from django.db import models, migrations class Migration(migrations.Migration): dependencies = [ ('portal', '0009_add_precomputed_rna_table'), ] operations = [ # rna_type is a / seperated field that represents the set of rna_types # for a ...
<commit_before>from __future__ import unicode_literals from django.db import models, migrations class Migration(migrations.Migration): dependencies = [ ('portal', '0009_add_precomputed_rna_table'), ] operations = [ migrations.AddField("RnaPrecomputed", "rna_type", models.CharField(max_l...
from __future__ import unicode_literals from django.db import models, migrations class Migration(migrations.Migration): dependencies = [ ('portal', '0009_add_precomputed_rna_table'), ] operations = [ # rna_type is a / seperated field that represents the set of rna_types # for a ...
from __future__ import unicode_literals from django.db import models, migrations class Migration(migrations.Migration): dependencies = [ ('portal', '0009_add_precomputed_rna_table'), ] operations = [ migrations.AddField("RnaPrecomputed", "rna_type", models.CharField(max_length=250)) ...
<commit_before>from __future__ import unicode_literals from django.db import models, migrations class Migration(migrations.Migration): dependencies = [ ('portal', '0009_add_precomputed_rna_table'), ] operations = [ migrations.AddField("RnaPrecomputed", "rna_type", models.CharField(max_l...
dabc17d149eebd8c6fa61780291fd229bd7bea99
oysterapp/oyster/management/commands/update_recurring_tasks.py
oysterapp/oyster/management/commands/update_recurring_tasks.py
import datetime from django.core.management.base import BaseCommand from oysterapp.oyster.models import TaskRule class Command(BaseCommand): help = "Creates tasks based off task rules" def handle(self, *args, **options): now = datetime.datetime.now() last_run = TaskRule.objects.order_by('-u...
import datetime import pytz from django.core.management.base import BaseCommand from oysterapp.oyster.models import TaskRule class Command(BaseCommand): help = "Creates tasks based off task rules" def handle(self, *args, **options): now = datetime.datetime.now().replace(tzinfo=pytz.UTC) las...
Update datetime with timezone add more print statements for debugging
Update datetime with timezone add more print statements for debugging
Python
unlicense
averymanderson/oysterap,averymanderson/OysterWebApp,averymanderson/oysterap,averymanderson/OysterWebApp,averymanderson/OysterWebApp,averymanderson/oysterap
import datetime from django.core.management.base import BaseCommand from oysterapp.oyster.models import TaskRule class Command(BaseCommand): help = "Creates tasks based off task rules" def handle(self, *args, **options): now = datetime.datetime.now() last_run = TaskRule.objects.order_by('-u...
import datetime import pytz from django.core.management.base import BaseCommand from oysterapp.oyster.models import TaskRule class Command(BaseCommand): help = "Creates tasks based off task rules" def handle(self, *args, **options): now = datetime.datetime.now().replace(tzinfo=pytz.UTC) las...
<commit_before>import datetime from django.core.management.base import BaseCommand from oysterapp.oyster.models import TaskRule class Command(BaseCommand): help = "Creates tasks based off task rules" def handle(self, *args, **options): now = datetime.datetime.now() last_run = TaskRule.objec...
import datetime import pytz from django.core.management.base import BaseCommand from oysterapp.oyster.models import TaskRule class Command(BaseCommand): help = "Creates tasks based off task rules" def handle(self, *args, **options): now = datetime.datetime.now().replace(tzinfo=pytz.UTC) las...
import datetime from django.core.management.base import BaseCommand from oysterapp.oyster.models import TaskRule class Command(BaseCommand): help = "Creates tasks based off task rules" def handle(self, *args, **options): now = datetime.datetime.now() last_run = TaskRule.objects.order_by('-u...
<commit_before>import datetime from django.core.management.base import BaseCommand from oysterapp.oyster.models import TaskRule class Command(BaseCommand): help = "Creates tasks based off task rules" def handle(self, *args, **options): now = datetime.datetime.now() last_run = TaskRule.objec...
da9f9028e3a757e81affb34ad2ff9dc61a1ddd8a
merlin/engine/battle.py
merlin/engine/battle.py
class Prepare(object): """ Prepare the champions for the battle! Usage: hero = Prepare(name="Aragorn", base_attack=100, base_hp=100) or like this: aragorn = {"name": "Aragorn", "base_attack": 100, "base_hp": 100} hero = Prepare(**aragorn) """ def __init__(self, name, b...
class Prepare(object): """ Prepare the champions for the battle! """ def __init__(self, name, base_attack, base_hp): self.name = name self.base_attack = base_attack self.base_hp = base_hp @property def status(self): return self.__dict__ def attack(self, ...
Create a collect method for get droppable items
Create a collect method for get droppable items
Python
mit
lerrua/merlin-engine
class Prepare(object): """ Prepare the champions for the battle! Usage: hero = Prepare(name="Aragorn", base_attack=100, base_hp=100) or like this: aragorn = {"name": "Aragorn", "base_attack": 100, "base_hp": 100} hero = Prepare(**aragorn) """ def __init__(self, name, b...
class Prepare(object): """ Prepare the champions for the battle! """ def __init__(self, name, base_attack, base_hp): self.name = name self.base_attack = base_attack self.base_hp = base_hp @property def status(self): return self.__dict__ def attack(self, ...
<commit_before> class Prepare(object): """ Prepare the champions for the battle! Usage: hero = Prepare(name="Aragorn", base_attack=100, base_hp=100) or like this: aragorn = {"name": "Aragorn", "base_attack": 100, "base_hp": 100} hero = Prepare(**aragorn) """ def __init_...
class Prepare(object): """ Prepare the champions for the battle! """ def __init__(self, name, base_attack, base_hp): self.name = name self.base_attack = base_attack self.base_hp = base_hp @property def status(self): return self.__dict__ def attack(self, ...
class Prepare(object): """ Prepare the champions for the battle! Usage: hero = Prepare(name="Aragorn", base_attack=100, base_hp=100) or like this: aragorn = {"name": "Aragorn", "base_attack": 100, "base_hp": 100} hero = Prepare(**aragorn) """ def __init__(self, name, b...
<commit_before> class Prepare(object): """ Prepare the champions for the battle! Usage: hero = Prepare(name="Aragorn", base_attack=100, base_hp=100) or like this: aragorn = {"name": "Aragorn", "base_attack": 100, "base_hp": 100} hero = Prepare(**aragorn) """ def __init_...
e1edb506113a0fd8104931def710188f5d507f06
crispy/gui/widgets/plotwidget.py
crispy/gui/widgets/plotwidget.py
# coding: utf-8 from silx.gui.plot import PlotWindow class PlotWidget(PlotWindow): def __init__(self, *args): super(PlotWidget, self).__init__() self.setActiveCurveHandling(False) self.setGraphXLabel('Energy (eV)') self.setGraphYLabel('Absorption cross section (a.u.)') def plo...
# coding: utf-8 from silx.gui.plot import PlotWindow class PlotWidget(PlotWindow): def __init__(self, *args): super(PlotWidget, self).__init__(logScale=False, grid=True, aspectRatio=False, yInverted=False, roi=False, mask=False, print_=False) self.setActiveCurveHand...
Remove unused icons of the PlotWindow
Remove unused icons of the PlotWindow
Python
mit
mretegan/crispy,mretegan/crispy
# coding: utf-8 from silx.gui.plot import PlotWindow class PlotWidget(PlotWindow): def __init__(self, *args): super(PlotWidget, self).__init__() self.setActiveCurveHandling(False) self.setGraphXLabel('Energy (eV)') self.setGraphYLabel('Absorption cross section (a.u.)') def plo...
# coding: utf-8 from silx.gui.plot import PlotWindow class PlotWidget(PlotWindow): def __init__(self, *args): super(PlotWidget, self).__init__(logScale=False, grid=True, aspectRatio=False, yInverted=False, roi=False, mask=False, print_=False) self.setActiveCurveHand...
<commit_before># coding: utf-8 from silx.gui.plot import PlotWindow class PlotWidget(PlotWindow): def __init__(self, *args): super(PlotWidget, self).__init__() self.setActiveCurveHandling(False) self.setGraphXLabel('Energy (eV)') self.setGraphYLabel('Absorption cross section (a.u.)...
# coding: utf-8 from silx.gui.plot import PlotWindow class PlotWidget(PlotWindow): def __init__(self, *args): super(PlotWidget, self).__init__(logScale=False, grid=True, aspectRatio=False, yInverted=False, roi=False, mask=False, print_=False) self.setActiveCurveHand...
# coding: utf-8 from silx.gui.plot import PlotWindow class PlotWidget(PlotWindow): def __init__(self, *args): super(PlotWidget, self).__init__() self.setActiveCurveHandling(False) self.setGraphXLabel('Energy (eV)') self.setGraphYLabel('Absorption cross section (a.u.)') def plo...
<commit_before># coding: utf-8 from silx.gui.plot import PlotWindow class PlotWidget(PlotWindow): def __init__(self, *args): super(PlotWidget, self).__init__() self.setActiveCurveHandling(False) self.setGraphXLabel('Energy (eV)') self.setGraphYLabel('Absorption cross section (a.u.)...
4979b1b62be3b6aee300650cee47837a605b6376
jenkins.check_copyright.py
jenkins.check_copyright.py
#------------------------------------------------------------------------------------------------------- # Copyright (C) Microsoft. All rights reserved. # Licensed under the MIT license. See LICENSE.txt file in the project root for full license information. #-------------------------------------------------------------...
#------------------------------------------------------------------------------------------------------- # Copyright (C) Microsoft. All rights reserved. # Licensed under the MIT license. See LICENSE.txt file in the project root for full license information. #-------------------------------------------------------------...
Update copyright check to accept a new, more inclusive, copyright.
Update copyright check to accept a new, more inclusive, copyright. In order to address concerns over community copyright of the source code they modify. All authors are still subject to the terms of the CLA they sign when contributing. This new format was approved by Microsoft legal: ``` //--------------------------...
Python
mit
mrkmarron/ChakraCore,mrkmarron/ChakraCore,mrkmarron/ChakraCore,Microsoft/ChakraCore,Microsoft/ChakraCore,mrkmarron/ChakraCore,Microsoft/ChakraCore,mrkmarron/ChakraCore,Microsoft/ChakraCore,Microsoft/ChakraCore,mrkmarron/ChakraCore,mrkmarron/ChakraCore,Microsoft/ChakraCore
#------------------------------------------------------------------------------------------------------- # Copyright (C) Microsoft. All rights reserved. # Licensed under the MIT license. See LICENSE.txt file in the project root for full license information. #-------------------------------------------------------------...
#------------------------------------------------------------------------------------------------------- # Copyright (C) Microsoft. All rights reserved. # Licensed under the MIT license. See LICENSE.txt file in the project root for full license information. #-------------------------------------------------------------...
<commit_before>#------------------------------------------------------------------------------------------------------- # Copyright (C) Microsoft. All rights reserved. # Licensed under the MIT license. See LICENSE.txt file in the project root for full license information. #----------------------------------------------...
#------------------------------------------------------------------------------------------------------- # Copyright (C) Microsoft. All rights reserved. # Licensed under the MIT license. See LICENSE.txt file in the project root for full license information. #-------------------------------------------------------------...
#------------------------------------------------------------------------------------------------------- # Copyright (C) Microsoft. All rights reserved. # Licensed under the MIT license. See LICENSE.txt file in the project root for full license information. #-------------------------------------------------------------...
<commit_before>#------------------------------------------------------------------------------------------------------- # Copyright (C) Microsoft. All rights reserved. # Licensed under the MIT license. See LICENSE.txt file in the project root for full license information. #----------------------------------------------...
d01a5cdf950b7421703e2a018ee0306935e79555
sugar/activity/__init__.py
sugar/activity/__init__.py
import gtk from sugar.graphics.grid import Grid settings = gtk.settings_get_default() grid = Grid() sizes = 'gtk-large-toolbar=%d, %d' % (grid.dimension(1), grid.dimension(1)) settings.set_string_property('gtk-icon-sizes', sizes, '') settings.set_string_property('gtk-font-name', 'Sans 14', '') def get_default_type...
import gtk from sugar.graphics.grid import Grid settings = gtk.settings_get_default() grid = Grid() sizes = 'gtk-large-toolbar=%d, %d' % (grid.dimension(1), grid.dimension(1)) settings.set_string_property('gtk-icon-sizes', sizes, '') def get_default_type(activity_type): """Get the activity default type. It's ...
Move font size in the theme
Move font size in the theme
Python
lgpl-2.1
Daksh/sugar-toolkit-gtk3,puneetgkaur/backup_sugar_sugartoolkit,ceibal-tatu/sugar-toolkit-gtk3,gusDuarte/sugar-toolkit-gtk3,tchx84/debian-pkg-sugar-toolkit-gtk3,gusDuarte/sugar-toolkit-gtk3,samdroid-apps/sugar-toolkit-gtk3,sugarlabs/sugar-toolkit-gtk3,tchx84/debian-pkg-sugar-toolkit-gtk3,puneetgkaur/sugar-toolkit-gtk3,t...
import gtk from sugar.graphics.grid import Grid settings = gtk.settings_get_default() grid = Grid() sizes = 'gtk-large-toolbar=%d, %d' % (grid.dimension(1), grid.dimension(1)) settings.set_string_property('gtk-icon-sizes', sizes, '') settings.set_string_property('gtk-font-name', 'Sans 14', '') def get_default_type...
import gtk from sugar.graphics.grid import Grid settings = gtk.settings_get_default() grid = Grid() sizes = 'gtk-large-toolbar=%d, %d' % (grid.dimension(1), grid.dimension(1)) settings.set_string_property('gtk-icon-sizes', sizes, '') def get_default_type(activity_type): """Get the activity default type. It's ...
<commit_before>import gtk from sugar.graphics.grid import Grid settings = gtk.settings_get_default() grid = Grid() sizes = 'gtk-large-toolbar=%d, %d' % (grid.dimension(1), grid.dimension(1)) settings.set_string_property('gtk-icon-sizes', sizes, '') settings.set_string_property('gtk-font-name', 'Sans 14', '') def g...
import gtk from sugar.graphics.grid import Grid settings = gtk.settings_get_default() grid = Grid() sizes = 'gtk-large-toolbar=%d, %d' % (grid.dimension(1), grid.dimension(1)) settings.set_string_property('gtk-icon-sizes', sizes, '') def get_default_type(activity_type): """Get the activity default type. It's ...
import gtk from sugar.graphics.grid import Grid settings = gtk.settings_get_default() grid = Grid() sizes = 'gtk-large-toolbar=%d, %d' % (grid.dimension(1), grid.dimension(1)) settings.set_string_property('gtk-icon-sizes', sizes, '') settings.set_string_property('gtk-font-name', 'Sans 14', '') def get_default_type...
<commit_before>import gtk from sugar.graphics.grid import Grid settings = gtk.settings_get_default() grid = Grid() sizes = 'gtk-large-toolbar=%d, %d' % (grid.dimension(1), grid.dimension(1)) settings.set_string_property('gtk-icon-sizes', sizes, '') settings.set_string_property('gtk-font-name', 'Sans 14', '') def g...
2c2deea36a7e040244152a345eb672e62c519c76
pulse_actions/publisher.py
pulse_actions/publisher.py
""" This module is currently an experiment in publishing messages to pulse. It might become a real pulse publisher one day. """ import os import sys from pulse_actions.authentication import (get_user_and_password, AuthenticationError) from mozillapulse.publishers import GenericPublisher from mozillapulse.config ...
""" This module is currently an experiment in publishing messages to pulse. It might become a real pulse publisher one day. """ import os import sys from pulse_actions.authentication import ( get_user_and_password, AuthenticationError ) from mozillapulse.publishers import GenericPublisher from mozillapulse.c...
Handle failing to publish to pulse
Handle failing to publish to pulse
Python
mpl-2.0
armenzg/pulse_actions,mozilla/pulse_actions,adusca/pulse_actions
""" This module is currently an experiment in publishing messages to pulse. It might become a real pulse publisher one day. """ import os import sys from pulse_actions.authentication import (get_user_and_password, AuthenticationError) from mozillapulse.publishers import GenericPublisher from mozillapulse.config ...
""" This module is currently an experiment in publishing messages to pulse. It might become a real pulse publisher one day. """ import os import sys from pulse_actions.authentication import ( get_user_and_password, AuthenticationError ) from mozillapulse.publishers import GenericPublisher from mozillapulse.c...
<commit_before>""" This module is currently an experiment in publishing messages to pulse. It might become a real pulse publisher one day. """ import os import sys from pulse_actions.authentication import (get_user_and_password, AuthenticationError) from mozillapulse.publishers import GenericPublisher from mozil...
""" This module is currently an experiment in publishing messages to pulse. It might become a real pulse publisher one day. """ import os import sys from pulse_actions.authentication import ( get_user_and_password, AuthenticationError ) from mozillapulse.publishers import GenericPublisher from mozillapulse.c...
""" This module is currently an experiment in publishing messages to pulse. It might become a real pulse publisher one day. """ import os import sys from pulse_actions.authentication import (get_user_and_password, AuthenticationError) from mozillapulse.publishers import GenericPublisher from mozillapulse.config ...
<commit_before>""" This module is currently an experiment in publishing messages to pulse. It might become a real pulse publisher one day. """ import os import sys from pulse_actions.authentication import (get_user_and_password, AuthenticationError) from mozillapulse.publishers import GenericPublisher from mozil...
791644f1e59295f07a9444c45c5589fd888effd0
examples/joystick_example.py
examples/joystick_example.py
#!/usr/bin/env python3 """This example shows how to use the Joystick Click wrapper of the LetMeCreate. It continuously reads the position of the joystick, prints it in the terminal and displays a pattern on the LED's based on the x coordinate. The Joystick Click must be inserted in Mikrobus 1 before running this prog...
#!/usr/bin/env python3 """This example shows how to use the Joystick Click wrapper of the LetMeCreate. It continuously reads the position of the joystick, prints it in the terminal and displays a pattern on the LED's based on the x coordinate. The Joystick Click must be inserted in Mikrobus 1 before running this prog...
Add missing '* ' in example
joystick: Add missing '* ' in example Signed-off-by: Francois Berder <59eaf4bb0211c66c3d7532da6d77ecf42a779d82@outlook.fr>
Python
bsd-3-clause
francois-berder/PyLetMeCreate
#!/usr/bin/env python3 """This example shows how to use the Joystick Click wrapper of the LetMeCreate. It continuously reads the position of the joystick, prints it in the terminal and displays a pattern on the LED's based on the x coordinate. The Joystick Click must be inserted in Mikrobus 1 before running this prog...
#!/usr/bin/env python3 """This example shows how to use the Joystick Click wrapper of the LetMeCreate. It continuously reads the position of the joystick, prints it in the terminal and displays a pattern on the LED's based on the x coordinate. The Joystick Click must be inserted in Mikrobus 1 before running this prog...
<commit_before>#!/usr/bin/env python3 """This example shows how to use the Joystick Click wrapper of the LetMeCreate. It continuously reads the position of the joystick, prints it in the terminal and displays a pattern on the LED's based on the x coordinate. The Joystick Click must be inserted in Mikrobus 1 before ru...
#!/usr/bin/env python3 """This example shows how to use the Joystick Click wrapper of the LetMeCreate. It continuously reads the position of the joystick, prints it in the terminal and displays a pattern on the LED's based on the x coordinate. The Joystick Click must be inserted in Mikrobus 1 before running this prog...
#!/usr/bin/env python3 """This example shows how to use the Joystick Click wrapper of the LetMeCreate. It continuously reads the position of the joystick, prints it in the terminal and displays a pattern on the LED's based on the x coordinate. The Joystick Click must be inserted in Mikrobus 1 before running this prog...
<commit_before>#!/usr/bin/env python3 """This example shows how to use the Joystick Click wrapper of the LetMeCreate. It continuously reads the position of the joystick, prints it in the terminal and displays a pattern on the LED's based on the x coordinate. The Joystick Click must be inserted in Mikrobus 1 before ru...
c3671ec17770d431a374b373a4e2b055ee1e3809
2019/aoc2019/day13.py
2019/aoc2019/day13.py
from typing import TextIO from aoc2019.intcode import Computer, read_program def part1(data: TextIO) -> int: computer = Computer(read_program(data)) computer.run() screen = {} while computer.output: x = computer.output.popleft() y = computer.output.popleft() val = computer....
import statistics from typing import TextIO, Tuple, Dict from aoc2019.intcode import Computer, read_program def render_screen(computer: Computer, screen: Dict[Tuple[int, int], int]): while computer.output: x = computer.output.popleft() y = computer.output.popleft() val = computer.output.p...
Implement 2019 day 13 part 2
Implement 2019 day 13 part 2
Python
mit
bertptrs/adventofcode,bertptrs/adventofcode,bertptrs/adventofcode,bertptrs/adventofcode,bertptrs/adventofcode,bertptrs/adventofcode,bertptrs/adventofcode,bertptrs/adventofcode,bertptrs/adventofcode,bertptrs/adventofcode,bertptrs/adventofcode,bertptrs/adventofcode,bertptrs/adventofcode,bertptrs/adventofcode,bertptrs/adv...
from typing import TextIO from aoc2019.intcode import Computer, read_program def part1(data: TextIO) -> int: computer = Computer(read_program(data)) computer.run() screen = {} while computer.output: x = computer.output.popleft() y = computer.output.popleft() val = computer....
import statistics from typing import TextIO, Tuple, Dict from aoc2019.intcode import Computer, read_program def render_screen(computer: Computer, screen: Dict[Tuple[int, int], int]): while computer.output: x = computer.output.popleft() y = computer.output.popleft() val = computer.output.p...
<commit_before>from typing import TextIO from aoc2019.intcode import Computer, read_program def part1(data: TextIO) -> int: computer = Computer(read_program(data)) computer.run() screen = {} while computer.output: x = computer.output.popleft() y = computer.output.popleft() ...
import statistics from typing import TextIO, Tuple, Dict from aoc2019.intcode import Computer, read_program def render_screen(computer: Computer, screen: Dict[Tuple[int, int], int]): while computer.output: x = computer.output.popleft() y = computer.output.popleft() val = computer.output.p...
from typing import TextIO from aoc2019.intcode import Computer, read_program def part1(data: TextIO) -> int: computer = Computer(read_program(data)) computer.run() screen = {} while computer.output: x = computer.output.popleft() y = computer.output.popleft() val = computer....
<commit_before>from typing import TextIO from aoc2019.intcode import Computer, read_program def part1(data: TextIO) -> int: computer = Computer(read_program(data)) computer.run() screen = {} while computer.output: x = computer.output.popleft() y = computer.output.popleft() ...
2e9b11d3dc6dcb8301870f9219878d18e5fafa71
conftest.py
conftest.py
import pytest def pytest_addoption(parser): _add_cuda_option(parser) def pytest_configure(config): _register_cuda_marker(config) def pytest_runtest_setup(item): _setup_cuda_marker(item) def _add_cuda_option(parser): parser.addoption("--cuda", action="store", metavar="LIMIT_NUM", default=-1, ...
import pytest import os def pytest_configure(config): _register_cuda_marker(config) def pytest_runtest_setup(item): _setup_cuda_marker(item) def _register_cuda_marker(config): config.addinivalue_line("markers", "cuda(num=1): mark tests needing the specified number of NVIDIA GPUs.") def _setup_cuda_ma...
Use XCHAINER_TEST_CUDA_LIMIT env int pytest
Use XCHAINER_TEST_CUDA_LIMIT env int pytest
Python
mit
hvy/chainer,hvy/chainer,ktnyt/chainer,niboshi/chainer,okuta/chainer,keisuke-umezawa/chainer,niboshi/chainer,chainer/chainer,chainer/chainer,jnishi/chainer,ktnyt/chainer,chainer/chainer,ktnyt/chainer,jnishi/chainer,keisuke-umezawa/chainer,chainer/chainer,pfnet/chainer,jnishi/chainer,tkerola/chainer,keisuke-umezawa/chain...
import pytest def pytest_addoption(parser): _add_cuda_option(parser) def pytest_configure(config): _register_cuda_marker(config) def pytest_runtest_setup(item): _setup_cuda_marker(item) def _add_cuda_option(parser): parser.addoption("--cuda", action="store", metavar="LIMIT_NUM", default=-1, ...
import pytest import os def pytest_configure(config): _register_cuda_marker(config) def pytest_runtest_setup(item): _setup_cuda_marker(item) def _register_cuda_marker(config): config.addinivalue_line("markers", "cuda(num=1): mark tests needing the specified number of NVIDIA GPUs.") def _setup_cuda_ma...
<commit_before>import pytest def pytest_addoption(parser): _add_cuda_option(parser) def pytest_configure(config): _register_cuda_marker(config) def pytest_runtest_setup(item): _setup_cuda_marker(item) def _add_cuda_option(parser): parser.addoption("--cuda", action="store", metavar="LIMIT_NUM", d...
import pytest import os def pytest_configure(config): _register_cuda_marker(config) def pytest_runtest_setup(item): _setup_cuda_marker(item) def _register_cuda_marker(config): config.addinivalue_line("markers", "cuda(num=1): mark tests needing the specified number of NVIDIA GPUs.") def _setup_cuda_ma...
import pytest def pytest_addoption(parser): _add_cuda_option(parser) def pytest_configure(config): _register_cuda_marker(config) def pytest_runtest_setup(item): _setup_cuda_marker(item) def _add_cuda_option(parser): parser.addoption("--cuda", action="store", metavar="LIMIT_NUM", default=-1, ...
<commit_before>import pytest def pytest_addoption(parser): _add_cuda_option(parser) def pytest_configure(config): _register_cuda_marker(config) def pytest_runtest_setup(item): _setup_cuda_marker(item) def _add_cuda_option(parser): parser.addoption("--cuda", action="store", metavar="LIMIT_NUM", d...
dbb58d2898f9f9a4824ee9596e52da9eaa92cab1
examples/get_secure_user_falco_rules.py
examples/get_secure_user_falco_rules.py
#!/usr/bin/env python # # Get the sysdig secure user rules file. # import os import sys sys.path.insert(0, os.path.join(os.path.dirname(os.path.realpath(sys.argv[0])), '..')) from sdcclient import SdSecureClient # # Parse arguments # if len(sys.argv) != 2: print('usage: %s <sysdig-token>' % sys.argv[0]) print...
#!/usr/bin/env python # # Get the sysdig secure user rules file. # import os import sys sys.path.insert(0, os.path.join(os.path.dirname(os.path.realpath(sys.argv[0])), '..')) from sdcclient import SdSecureClient # # Parse arguments # if len(sys.argv) != 2: print('usage: %s <sysdig-token>' % sys.argv[0]) print...
Fix legacy use of action result
Fix legacy use of action result
Python
mit
draios/python-sdc-client,draios/python-sdc-client
#!/usr/bin/env python # # Get the sysdig secure user rules file. # import os import sys sys.path.insert(0, os.path.join(os.path.dirname(os.path.realpath(sys.argv[0])), '..')) from sdcclient import SdSecureClient # # Parse arguments # if len(sys.argv) != 2: print('usage: %s <sysdig-token>' % sys.argv[0]) print...
#!/usr/bin/env python # # Get the sysdig secure user rules file. # import os import sys sys.path.insert(0, os.path.join(os.path.dirname(os.path.realpath(sys.argv[0])), '..')) from sdcclient import SdSecureClient # # Parse arguments # if len(sys.argv) != 2: print('usage: %s <sysdig-token>' % sys.argv[0]) print...
<commit_before>#!/usr/bin/env python # # Get the sysdig secure user rules file. # import os import sys sys.path.insert(0, os.path.join(os.path.dirname(os.path.realpath(sys.argv[0])), '..')) from sdcclient import SdSecureClient # # Parse arguments # if len(sys.argv) != 2: print('usage: %s <sysdig-token>' % sys.arg...
#!/usr/bin/env python # # Get the sysdig secure user rules file. # import os import sys sys.path.insert(0, os.path.join(os.path.dirname(os.path.realpath(sys.argv[0])), '..')) from sdcclient import SdSecureClient # # Parse arguments # if len(sys.argv) != 2: print('usage: %s <sysdig-token>' % sys.argv[0]) print...
#!/usr/bin/env python # # Get the sysdig secure user rules file. # import os import sys sys.path.insert(0, os.path.join(os.path.dirname(os.path.realpath(sys.argv[0])), '..')) from sdcclient import SdSecureClient # # Parse arguments # if len(sys.argv) != 2: print('usage: %s <sysdig-token>' % sys.argv[0]) print...
<commit_before>#!/usr/bin/env python # # Get the sysdig secure user rules file. # import os import sys sys.path.insert(0, os.path.join(os.path.dirname(os.path.realpath(sys.argv[0])), '..')) from sdcclient import SdSecureClient # # Parse arguments # if len(sys.argv) != 2: print('usage: %s <sysdig-token>' % sys.arg...
82dcd51c59eecccac4e7d9ee1dac754b27ff9ed2
mzalendo/feedback/views.py
mzalendo/feedback/views.py
from django.shortcuts import render_to_response from django.template import RequestContext from django.views.decorators.csrf import csrf_protect from models import Feedback from forms import FeedbackForm @csrf_protect def add(request): """Gather feedback for a page, and if it is ok show a thanks message and link ...
from django.shortcuts import render_to_response from django.template import RequestContext from django.views.decorators.csrf import csrf_protect from models import Feedback from forms import FeedbackForm import re @csrf_protect def add(request): """Gather feedback for a page, and if it is ok show a thanks messa...
Mark feedback comments starting with a html tag as spammy
Mark feedback comments starting with a html tag as spammy
Python
agpl-3.0
ken-muturi/pombola,mysociety/pombola,hzj123/56th,hzj123/56th,mysociety/pombola,ken-muturi/pombola,hzj123/56th,Hutspace/odekro,geoffkilpin/pombola,patricmutwiri/pombola,mysociety/pombola,patricmutwiri/pombola,patricmutwiri/pombola,hzj123/56th,Hutspace/odekro,ken-muturi/pombola,Hutspace/odekro,patricmutwiri/pombola,Hutsp...
from django.shortcuts import render_to_response from django.template import RequestContext from django.views.decorators.csrf import csrf_protect from models import Feedback from forms import FeedbackForm @csrf_protect def add(request): """Gather feedback for a page, and if it is ok show a thanks message and link ...
from django.shortcuts import render_to_response from django.template import RequestContext from django.views.decorators.csrf import csrf_protect from models import Feedback from forms import FeedbackForm import re @csrf_protect def add(request): """Gather feedback for a page, and if it is ok show a thanks messa...
<commit_before>from django.shortcuts import render_to_response from django.template import RequestContext from django.views.decorators.csrf import csrf_protect from models import Feedback from forms import FeedbackForm @csrf_protect def add(request): """Gather feedback for a page, and if it is ok show a thanks me...
from django.shortcuts import render_to_response from django.template import RequestContext from django.views.decorators.csrf import csrf_protect from models import Feedback from forms import FeedbackForm import re @csrf_protect def add(request): """Gather feedback for a page, and if it is ok show a thanks messa...
from django.shortcuts import render_to_response from django.template import RequestContext from django.views.decorators.csrf import csrf_protect from models import Feedback from forms import FeedbackForm @csrf_protect def add(request): """Gather feedback for a page, and if it is ok show a thanks message and link ...
<commit_before>from django.shortcuts import render_to_response from django.template import RequestContext from django.views.decorators.csrf import csrf_protect from models import Feedback from forms import FeedbackForm @csrf_protect def add(request): """Gather feedback for a page, and if it is ok show a thanks me...
23e809db71889cec7b2af03b978ecb339853fe51
satchless/cart/views.py
satchless/cart/views.py
from django.core.urlresolvers import reverse from django.http import HttpResponseRedirect from django.views.generic.simple import direct_to_template from . import models from . import forms def cart(request, typ): cart = models.Cart.objects.get_or_create_from_request(request, typ) if request.method == 'POST': ...
from django.core.urlresolvers import reverse from django.http import HttpResponseRedirect from django.shortcuts import render_to_response from django.template import RequestContext from . import models from . import forms def cart(request, typ): cart = models.Cart.objects.get_or_create_from_request(request, typ) ...
Allow prefixed templates for different cart types
Allow prefixed templates for different cart types
Python
bsd-3-clause
taedori81/satchless,fusionbox/satchless,fusionbox/satchless,fusionbox/satchless
from django.core.urlresolvers import reverse from django.http import HttpResponseRedirect from django.views.generic.simple import direct_to_template from . import models from . import forms def cart(request, typ): cart = models.Cart.objects.get_or_create_from_request(request, typ) if request.method == 'POST': ...
from django.core.urlresolvers import reverse from django.http import HttpResponseRedirect from django.shortcuts import render_to_response from django.template import RequestContext from . import models from . import forms def cart(request, typ): cart = models.Cart.objects.get_or_create_from_request(request, typ) ...
<commit_before>from django.core.urlresolvers import reverse from django.http import HttpResponseRedirect from django.views.generic.simple import direct_to_template from . import models from . import forms def cart(request, typ): cart = models.Cart.objects.get_or_create_from_request(request, typ) if request.met...
from django.core.urlresolvers import reverse from django.http import HttpResponseRedirect from django.shortcuts import render_to_response from django.template import RequestContext from . import models from . import forms def cart(request, typ): cart = models.Cart.objects.get_or_create_from_request(request, typ) ...
from django.core.urlresolvers import reverse from django.http import HttpResponseRedirect from django.views.generic.simple import direct_to_template from . import models from . import forms def cart(request, typ): cart = models.Cart.objects.get_or_create_from_request(request, typ) if request.method == 'POST': ...
<commit_before>from django.core.urlresolvers import reverse from django.http import HttpResponseRedirect from django.views.generic.simple import direct_to_template from . import models from . import forms def cart(request, typ): cart = models.Cart.objects.get_or_create_from_request(request, typ) if request.met...
db6632820215885b8940112335a07a91b5e79fed
dnstwister/worker_atom.py
dnstwister/worker_atom.py
"""Updates atom feeds.""" import datetime import time import db import tools # Time in seconds between re-processing a domain. PERIOD = 60#86400 if __name__ == '__main__': while True: try: start = time.time() # Pick the oldest domain. with db.cur...
"""Updates atom feeds.""" import datetime import time import db import tools # Time in seconds between re-processing a domain. PERIOD = 86400 if __name__ == '__main__': while True: try: start = time.time() # Pick the oldest domain. with db.cursor...
Set period to 24 hours now that it works
Set period to 24 hours now that it works
Python
unlicense
thisismyrobot/dnstwister,thisismyrobot/dnstwister,thisismyrobot/dnstwister
"""Updates atom feeds.""" import datetime import time import db import tools # Time in seconds between re-processing a domain. PERIOD = 60#86400 if __name__ == '__main__': while True: try: start = time.time() # Pick the oldest domain. with db.cur...
"""Updates atom feeds.""" import datetime import time import db import tools # Time in seconds between re-processing a domain. PERIOD = 86400 if __name__ == '__main__': while True: try: start = time.time() # Pick the oldest domain. with db.cursor...
<commit_before>"""Updates atom feeds.""" import datetime import time import db import tools # Time in seconds between re-processing a domain. PERIOD = 60#86400 if __name__ == '__main__': while True: try: start = time.time() # Pick the oldest domain. ...
"""Updates atom feeds.""" import datetime import time import db import tools # Time in seconds between re-processing a domain. PERIOD = 86400 if __name__ == '__main__': while True: try: start = time.time() # Pick the oldest domain. with db.cursor...
"""Updates atom feeds.""" import datetime import time import db import tools # Time in seconds between re-processing a domain. PERIOD = 60#86400 if __name__ == '__main__': while True: try: start = time.time() # Pick the oldest domain. with db.cur...
<commit_before>"""Updates atom feeds.""" import datetime import time import db import tools # Time in seconds between re-processing a domain. PERIOD = 60#86400 if __name__ == '__main__': while True: try: start = time.time() # Pick the oldest domain. ...
3ddcc3ed5b6288ea6b39b7a11c5d85232a2d224f
networkzero/__init__.py
networkzero/__init__.py
# -*- coding: utf-8 -*- """Easy network discovery & messaging Aimed at a classrom or club situation, networkzero makes it simpler to have several machines or several processes on one machine discovering each other and talking across a network. Typical examples would include: * Sending commands to a robot * Sending sc...
# -*- coding: utf-8 -*- """Easy network discovery & messaging Aimed at a classrom or club situation, networkzero makes it simpler to have several machines or several processes on one machine discovering each other and talking across a network. Typical examples would include: * Sending commands to a robot * Sending sc...
Improve the examples in the package root docstring
Improve the examples in the package root docstring
Python
mit
tjguk/networkzero,tjguk/networkzero,tjguk/networkzero
# -*- coding: utf-8 -*- """Easy network discovery & messaging Aimed at a classrom or club situation, networkzero makes it simpler to have several machines or several processes on one machine discovering each other and talking across a network. Typical examples would include: * Sending commands to a robot * Sending sc...
# -*- coding: utf-8 -*- """Easy network discovery & messaging Aimed at a classrom or club situation, networkzero makes it simpler to have several machines or several processes on one machine discovering each other and talking across a network. Typical examples would include: * Sending commands to a robot * Sending sc...
<commit_before># -*- coding: utf-8 -*- """Easy network discovery & messaging Aimed at a classrom or club situation, networkzero makes it simpler to have several machines or several processes on one machine discovering each other and talking across a network. Typical examples would include: * Sending commands to a rob...
# -*- coding: utf-8 -*- """Easy network discovery & messaging Aimed at a classrom or club situation, networkzero makes it simpler to have several machines or several processes on one machine discovering each other and talking across a network. Typical examples would include: * Sending commands to a robot * Sending sc...
# -*- coding: utf-8 -*- """Easy network discovery & messaging Aimed at a classrom or club situation, networkzero makes it simpler to have several machines or several processes on one machine discovering each other and talking across a network. Typical examples would include: * Sending commands to a robot * Sending sc...
<commit_before># -*- coding: utf-8 -*- """Easy network discovery & messaging Aimed at a classrom or club situation, networkzero makes it simpler to have several machines or several processes on one machine discovering each other and talking across a network. Typical examples would include: * Sending commands to a rob...
d7eb2dc9eb5f391a6a6742bea3692c8ab1d8aa69
doc/examples/plot_edge_filter.py
doc/examples/plot_edge_filter.py
import matplotlib.pyplot as plt from skimage.data import camera from skimage.filter import roberts, sobel image = camera() edge_roberts = roberts(image) edge_sobel = sobel(image) fig, (ax0, ax1) = plt.subplots(ncols=2) ax0.imshow(edge_roberts, cmap=plt.cm.gray) ax0.set_title('Roberts Edge Detection') ax0.axis('off'...
""" ============== Edge operators ============== Edge operators are used in image processing within edge detection algorithms. They are discrete differentiation operators, computing an approximation of the gradient of the image intensity function. """ import matplotlib.pyplot as plt from skimage.data import camera f...
Add short description to edge filter example
Add short description to edge filter example
Python
bsd-3-clause
ClinicalGraphics/scikit-image,pratapvardhan/scikit-image,bsipocz/scikit-image,oew1v07/scikit-image,michaelaye/scikit-image,SamHames/scikit-image,paalge/scikit-image,almarklein/scikit-image,Midafi/scikit-image,chintak/scikit-image,vighneshbirodkar/scikit-image,juliusbierk/scikit-image,rjeli/scikit-image,chintak/scikit-i...
import matplotlib.pyplot as plt from skimage.data import camera from skimage.filter import roberts, sobel image = camera() edge_roberts = roberts(image) edge_sobel = sobel(image) fig, (ax0, ax1) = plt.subplots(ncols=2) ax0.imshow(edge_roberts, cmap=plt.cm.gray) ax0.set_title('Roberts Edge Detection') ax0.axis('off'...
""" ============== Edge operators ============== Edge operators are used in image processing within edge detection algorithms. They are discrete differentiation operators, computing an approximation of the gradient of the image intensity function. """ import matplotlib.pyplot as plt from skimage.data import camera f...
<commit_before>import matplotlib.pyplot as plt from skimage.data import camera from skimage.filter import roberts, sobel image = camera() edge_roberts = roberts(image) edge_sobel = sobel(image) fig, (ax0, ax1) = plt.subplots(ncols=2) ax0.imshow(edge_roberts, cmap=plt.cm.gray) ax0.set_title('Roberts Edge Detection')...
""" ============== Edge operators ============== Edge operators are used in image processing within edge detection algorithms. They are discrete differentiation operators, computing an approximation of the gradient of the image intensity function. """ import matplotlib.pyplot as plt from skimage.data import camera f...
import matplotlib.pyplot as plt from skimage.data import camera from skimage.filter import roberts, sobel image = camera() edge_roberts = roberts(image) edge_sobel = sobel(image) fig, (ax0, ax1) = plt.subplots(ncols=2) ax0.imshow(edge_roberts, cmap=plt.cm.gray) ax0.set_title('Roberts Edge Detection') ax0.axis('off'...
<commit_before>import matplotlib.pyplot as plt from skimage.data import camera from skimage.filter import roberts, sobel image = camera() edge_roberts = roberts(image) edge_sobel = sobel(image) fig, (ax0, ax1) = plt.subplots(ncols=2) ax0.imshow(edge_roberts, cmap=plt.cm.gray) ax0.set_title('Roberts Edge Detection')...
a4a1d924686a0d74a080369d81e20a75c4e7d210
gem/templatetags/gem_tags.py
gem/templatetags/gem_tags.py
from django.template import Library from django.conf import settings from gem.models import GemSettings register = Library() @register.simple_tag() def get_site_static_prefix(): return settings.SITE_STATIC_PREFIX @register.filter() def get_bbm_app_id(request): return GemSettings.for_site(request.site).bbm...
from django.template import Library from django.conf import settings register = Library() @register.simple_tag() def get_site_static_prefix(): return settings.SITE_STATIC_PREFIX @register.filter('fieldtype') def fieldtype(field): return field.field.widget.__class__.__name__ @register.filter(name='smarttr...
Revert "Create GEM filter to get BBM App ID"
Revert "Create GEM filter to get BBM App ID" This reverts commit 2805eb26865d7a12cbc0e6f7a71dbd99ba49224e.
Python
bsd-2-clause
praekelt/molo-gem,praekelt/molo-gem,praekelt/molo-gem
from django.template import Library from django.conf import settings from gem.models import GemSettings register = Library() @register.simple_tag() def get_site_static_prefix(): return settings.SITE_STATIC_PREFIX @register.filter() def get_bbm_app_id(request): return GemSettings.for_site(request.site).bbm...
from django.template import Library from django.conf import settings register = Library() @register.simple_tag() def get_site_static_prefix(): return settings.SITE_STATIC_PREFIX @register.filter('fieldtype') def fieldtype(field): return field.field.widget.__class__.__name__ @register.filter(name='smarttr...
<commit_before>from django.template import Library from django.conf import settings from gem.models import GemSettings register = Library() @register.simple_tag() def get_site_static_prefix(): return settings.SITE_STATIC_PREFIX @register.filter() def get_bbm_app_id(request): return GemSettings.for_site(re...
from django.template import Library from django.conf import settings register = Library() @register.simple_tag() def get_site_static_prefix(): return settings.SITE_STATIC_PREFIX @register.filter('fieldtype') def fieldtype(field): return field.field.widget.__class__.__name__ @register.filter(name='smarttr...
from django.template import Library from django.conf import settings from gem.models import GemSettings register = Library() @register.simple_tag() def get_site_static_prefix(): return settings.SITE_STATIC_PREFIX @register.filter() def get_bbm_app_id(request): return GemSettings.for_site(request.site).bbm...
<commit_before>from django.template import Library from django.conf import settings from gem.models import GemSettings register = Library() @register.simple_tag() def get_site_static_prefix(): return settings.SITE_STATIC_PREFIX @register.filter() def get_bbm_app_id(request): return GemSettings.for_site(re...
0e9c2fead2c8ad0194f1174ea7d5ad6acd74a12c
private_storage/storage.py
private_storage/storage.py
""" Django Storage interface """ from django.core.files.storage import FileSystemStorage from django.core.urlresolvers import reverse_lazy from . import appconfig __all__ = ( 'private_storage', 'PrivateStorage', ) class PrivateStorage(FileSystemStorage): """ Interface to the Django storage system, ...
""" Django Storage interface """ from django.core.files.storage import FileSystemStorage from django.core.urlresolvers import reverse_lazy from django.utils.encoding import force_text from . import appconfig __all__ = ( 'private_storage', 'PrivateStorage', ) class PrivateStorage(FileSystemStorage): """ ...
Fix url reversing in Python 3
Fix url reversing in Python 3
Python
apache-2.0
edoburu/django-private-storage
""" Django Storage interface """ from django.core.files.storage import FileSystemStorage from django.core.urlresolvers import reverse_lazy from . import appconfig __all__ = ( 'private_storage', 'PrivateStorage', ) class PrivateStorage(FileSystemStorage): """ Interface to the Django storage system, ...
""" Django Storage interface """ from django.core.files.storage import FileSystemStorage from django.core.urlresolvers import reverse_lazy from django.utils.encoding import force_text from . import appconfig __all__ = ( 'private_storage', 'PrivateStorage', ) class PrivateStorage(FileSystemStorage): """ ...
<commit_before>""" Django Storage interface """ from django.core.files.storage import FileSystemStorage from django.core.urlresolvers import reverse_lazy from . import appconfig __all__ = ( 'private_storage', 'PrivateStorage', ) class PrivateStorage(FileSystemStorage): """ Interface to the Django sto...
""" Django Storage interface """ from django.core.files.storage import FileSystemStorage from django.core.urlresolvers import reverse_lazy from django.utils.encoding import force_text from . import appconfig __all__ = ( 'private_storage', 'PrivateStorage', ) class PrivateStorage(FileSystemStorage): """ ...
""" Django Storage interface """ from django.core.files.storage import FileSystemStorage from django.core.urlresolvers import reverse_lazy from . import appconfig __all__ = ( 'private_storage', 'PrivateStorage', ) class PrivateStorage(FileSystemStorage): """ Interface to the Django storage system, ...
<commit_before>""" Django Storage interface """ from django.core.files.storage import FileSystemStorage from django.core.urlresolvers import reverse_lazy from . import appconfig __all__ = ( 'private_storage', 'PrivateStorage', ) class PrivateStorage(FileSystemStorage): """ Interface to the Django sto...
8b2f393135c89a0a005a34cd57807d37b1b9d64e
docker/gunicorn_config.py
docker/gunicorn_config.py
import multiprocessing from os import getenv bind = '127.0.0.1:8001' workers = multiprocessing.cpu_count() * 3 # graceful_timeout = 600 # timeout = 60 threads = multiprocessing.cpu_count() * 3 # max_requests = 300 pidfile = '/var/run/gunicorn.pid' # max_requests_jitter = 50 errorlog = '/var/log/gunicorn/gunicorn-error...
import multiprocessing from os import getenv bind = '127.0.0.1:8001' workers = multiprocessing.cpu_count() * 3 graceful_timeout = 15 timeout = 30 threads = multiprocessing.cpu_count() * 3 pidfile = '/var/run/gunicorn.pid' errorlog = '/var/log/gunicorn/gunicorn-error.log' loglevel = 'critical' # Read the DEBUG setti...
Configure graceful_timeout to actually do something
Configure graceful_timeout to actually do something
Python
apache-2.0
salopensource/sal,sheagcraig/sal,salopensource/sal,sheagcraig/sal,sheagcraig/sal,sheagcraig/sal,salopensource/sal,salopensource/sal
import multiprocessing from os import getenv bind = '127.0.0.1:8001' workers = multiprocessing.cpu_count() * 3 # graceful_timeout = 600 # timeout = 60 threads = multiprocessing.cpu_count() * 3 # max_requests = 300 pidfile = '/var/run/gunicorn.pid' # max_requests_jitter = 50 errorlog = '/var/log/gunicorn/gunicorn-error...
import multiprocessing from os import getenv bind = '127.0.0.1:8001' workers = multiprocessing.cpu_count() * 3 graceful_timeout = 15 timeout = 30 threads = multiprocessing.cpu_count() * 3 pidfile = '/var/run/gunicorn.pid' errorlog = '/var/log/gunicorn/gunicorn-error.log' loglevel = 'critical' # Read the DEBUG setti...
<commit_before>import multiprocessing from os import getenv bind = '127.0.0.1:8001' workers = multiprocessing.cpu_count() * 3 # graceful_timeout = 600 # timeout = 60 threads = multiprocessing.cpu_count() * 3 # max_requests = 300 pidfile = '/var/run/gunicorn.pid' # max_requests_jitter = 50 errorlog = '/var/log/gunicorn...
import multiprocessing from os import getenv bind = '127.0.0.1:8001' workers = multiprocessing.cpu_count() * 3 graceful_timeout = 15 timeout = 30 threads = multiprocessing.cpu_count() * 3 pidfile = '/var/run/gunicorn.pid' errorlog = '/var/log/gunicorn/gunicorn-error.log' loglevel = 'critical' # Read the DEBUG setti...
import multiprocessing from os import getenv bind = '127.0.0.1:8001' workers = multiprocessing.cpu_count() * 3 # graceful_timeout = 600 # timeout = 60 threads = multiprocessing.cpu_count() * 3 # max_requests = 300 pidfile = '/var/run/gunicorn.pid' # max_requests_jitter = 50 errorlog = '/var/log/gunicorn/gunicorn-error...
<commit_before>import multiprocessing from os import getenv bind = '127.0.0.1:8001' workers = multiprocessing.cpu_count() * 3 # graceful_timeout = 600 # timeout = 60 threads = multiprocessing.cpu_count() * 3 # max_requests = 300 pidfile = '/var/run/gunicorn.pid' # max_requests_jitter = 50 errorlog = '/var/log/gunicorn...
4ec431669134f8ac01fe5ef1d883bc4dc31fd6d7
number_to_words_test.py
number_to_words_test.py
import unittest from number_to_words import NumberToWords class TestNumberToWords(unittest.TestCase): def setUp(self): self.n2w = NumberToWords() def tearDown(self): self.n2w = None def test_zero_and_single_digits(self): NUMBERS = { 0: 'zero', 1: 'one', 2: 'two', 3: '...
import unittest from number_to_words import NumberToWords class TestNumberToWords(unittest.TestCase): def setUp(self): self.n2w = NumberToWords() def tearDown(self): self.n2w = None def test_zero_and_single_digits(self): NUMBERS = { 0: 'zero', 1: 'one', 2: 'two', 3: '...
Add tests for numbers 11 to 19
Add tests for numbers 11 to 19
Python
mit
ianfieldhouse/number_to_words
import unittest from number_to_words import NumberToWords class TestNumberToWords(unittest.TestCase): def setUp(self): self.n2w = NumberToWords() def tearDown(self): self.n2w = None def test_zero_and_single_digits(self): NUMBERS = { 0: 'zero', 1: 'one', 2: 'two', 3: '...
import unittest from number_to_words import NumberToWords class TestNumberToWords(unittest.TestCase): def setUp(self): self.n2w = NumberToWords() def tearDown(self): self.n2w = None def test_zero_and_single_digits(self): NUMBERS = { 0: 'zero', 1: 'one', 2: 'two', 3: '...
<commit_before>import unittest from number_to_words import NumberToWords class TestNumberToWords(unittest.TestCase): def setUp(self): self.n2w = NumberToWords() def tearDown(self): self.n2w = None def test_zero_and_single_digits(self): NUMBERS = { 0: 'zero', 1: 'one',...
import unittest from number_to_words import NumberToWords class TestNumberToWords(unittest.TestCase): def setUp(self): self.n2w = NumberToWords() def tearDown(self): self.n2w = None def test_zero_and_single_digits(self): NUMBERS = { 0: 'zero', 1: 'one', 2: 'two', 3: '...
import unittest from number_to_words import NumberToWords class TestNumberToWords(unittest.TestCase): def setUp(self): self.n2w = NumberToWords() def tearDown(self): self.n2w = None def test_zero_and_single_digits(self): NUMBERS = { 0: 'zero', 1: 'one', 2: 'two', 3: '...
<commit_before>import unittest from number_to_words import NumberToWords class TestNumberToWords(unittest.TestCase): def setUp(self): self.n2w = NumberToWords() def tearDown(self): self.n2w = None def test_zero_and_single_digits(self): NUMBERS = { 0: 'zero', 1: 'one',...
954c38e9242da5bd2f8c036dd7c774c942860978
geotrek/api/mobile/urls.py
geotrek/api/mobile/urls.py
from __future__ import unicode_literals from django.conf import settings from django.conf.urls import url, include from rest_framework import routers from geotrek.api.mobile import views as api_mobile router = routers.DefaultRouter() if 'geotrek.flatpages' in settings.INSTALLED_APPS: router.register(r'flatpages'...
from __future__ import unicode_literals from django.conf import settings from django.conf.urls import url, include from rest_framework import routers if 'geotrek.flatpages' and 'geotrek.trekking' and 'geotrek.tourism': from geotrek.api.mobile import views as api_mobile router = routers.DefaultRouter() ur...
Fix api mobile only with geotrek flatpages trekking tourism
Fix api mobile only with geotrek flatpages trekking tourism
Python
bsd-2-clause
makinacorpus/Geotrek,GeotrekCE/Geotrek-admin,makinacorpus/Geotrek,GeotrekCE/Geotrek-admin,GeotrekCE/Geotrek-admin,makinacorpus/Geotrek,GeotrekCE/Geotrek-admin,makinacorpus/Geotrek
from __future__ import unicode_literals from django.conf import settings from django.conf.urls import url, include from rest_framework import routers from geotrek.api.mobile import views as api_mobile router = routers.DefaultRouter() if 'geotrek.flatpages' in settings.INSTALLED_APPS: router.register(r'flatpages'...
from __future__ import unicode_literals from django.conf import settings from django.conf.urls import url, include from rest_framework import routers if 'geotrek.flatpages' and 'geotrek.trekking' and 'geotrek.tourism': from geotrek.api.mobile import views as api_mobile router = routers.DefaultRouter() ur...
<commit_before>from __future__ import unicode_literals from django.conf import settings from django.conf.urls import url, include from rest_framework import routers from geotrek.api.mobile import views as api_mobile router = routers.DefaultRouter() if 'geotrek.flatpages' in settings.INSTALLED_APPS: router.regist...
from __future__ import unicode_literals from django.conf import settings from django.conf.urls import url, include from rest_framework import routers if 'geotrek.flatpages' and 'geotrek.trekking' and 'geotrek.tourism': from geotrek.api.mobile import views as api_mobile router = routers.DefaultRouter() ur...
from __future__ import unicode_literals from django.conf import settings from django.conf.urls import url, include from rest_framework import routers from geotrek.api.mobile import views as api_mobile router = routers.DefaultRouter() if 'geotrek.flatpages' in settings.INSTALLED_APPS: router.register(r'flatpages'...
<commit_before>from __future__ import unicode_literals from django.conf import settings from django.conf.urls import url, include from rest_framework import routers from geotrek.api.mobile import views as api_mobile router = routers.DefaultRouter() if 'geotrek.flatpages' in settings.INSTALLED_APPS: router.regist...
f5e4c1c0429ca06365778db7668296c266335628
nbs/api/hr.py
nbs/api/hr.py
# -*- coding: utf-8 -*- from flask import jsonify, request, url_for from nbs.models import Employee, AttendanceRecord from nbs.schema import EmployeeSchema, AttendanceRecordSchema from nbs.utils.api import ResourceApi, NestedApi, route, build_result from nbs.utils.args import get_args, build_args employee_s = Employe...
# -*- coding: utf-8 -*- from flask import jsonify, request, url_for from nbs.models import db, Employee, AttendanceRecord from nbs.schema import EmployeeSchema, AttendanceRecordSchema from nbs.utils.api import ResourceApi, NestedApi, route, build_result from nbs.utils.args import get_args, build_args employee_s = Emp...
Add some methods to employee api, delete needs more work
Add some methods to employee api, delete needs more work
Python
mit
coyotevz/nobix-app
# -*- coding: utf-8 -*- from flask import jsonify, request, url_for from nbs.models import Employee, AttendanceRecord from nbs.schema import EmployeeSchema, AttendanceRecordSchema from nbs.utils.api import ResourceApi, NestedApi, route, build_result from nbs.utils.args import get_args, build_args employee_s = Employe...
# -*- coding: utf-8 -*- from flask import jsonify, request, url_for from nbs.models import db, Employee, AttendanceRecord from nbs.schema import EmployeeSchema, AttendanceRecordSchema from nbs.utils.api import ResourceApi, NestedApi, route, build_result from nbs.utils.args import get_args, build_args employee_s = Emp...
<commit_before># -*- coding: utf-8 -*- from flask import jsonify, request, url_for from nbs.models import Employee, AttendanceRecord from nbs.schema import EmployeeSchema, AttendanceRecordSchema from nbs.utils.api import ResourceApi, NestedApi, route, build_result from nbs.utils.args import get_args, build_args emplo...
# -*- coding: utf-8 -*- from flask import jsonify, request, url_for from nbs.models import db, Employee, AttendanceRecord from nbs.schema import EmployeeSchema, AttendanceRecordSchema from nbs.utils.api import ResourceApi, NestedApi, route, build_result from nbs.utils.args import get_args, build_args employee_s = Emp...
# -*- coding: utf-8 -*- from flask import jsonify, request, url_for from nbs.models import Employee, AttendanceRecord from nbs.schema import EmployeeSchema, AttendanceRecordSchema from nbs.utils.api import ResourceApi, NestedApi, route, build_result from nbs.utils.args import get_args, build_args employee_s = Employe...
<commit_before># -*- coding: utf-8 -*- from flask import jsonify, request, url_for from nbs.models import Employee, AttendanceRecord from nbs.schema import EmployeeSchema, AttendanceRecordSchema from nbs.utils.api import ResourceApi, NestedApi, route, build_result from nbs.utils.args import get_args, build_args emplo...
b07c9ae13f80cb0afbe787543b28e15d546763e6
elevator/db.py
elevator/db.py
import os import md5 import leveldb class DatabasesHandler(dict): def __init__(self, dest, *args, **kwargs): self['index'] = {} self.dest = dest self._init_default_db() def _init_default_db(self): self.add('default') def load(self): # Retrieving every databases fr...
import os import md5 import leveldb class DatabasesHandler(dict): def __init__(self, dest, *args, **kwargs): self['index'] = {} self.dest = dest self._init_default_db() def _init_default_db(self): self.add('default') def load(self): # Retrieving every databases fr...
Add : database handler list and del methods
Add : database handler list and del methods
Python
mit
oleiade/Elevator
import os import md5 import leveldb class DatabasesHandler(dict): def __init__(self, dest, *args, **kwargs): self['index'] = {} self.dest = dest self._init_default_db() def _init_default_db(self): self.add('default') def load(self): # Retrieving every databases fr...
import os import md5 import leveldb class DatabasesHandler(dict): def __init__(self, dest, *args, **kwargs): self['index'] = {} self.dest = dest self._init_default_db() def _init_default_db(self): self.add('default') def load(self): # Retrieving every databases fr...
<commit_before>import os import md5 import leveldb class DatabasesHandler(dict): def __init__(self, dest, *args, **kwargs): self['index'] = {} self.dest = dest self._init_default_db() def _init_default_db(self): self.add('default') def load(self): # Retrieving eve...
import os import md5 import leveldb class DatabasesHandler(dict): def __init__(self, dest, *args, **kwargs): self['index'] = {} self.dest = dest self._init_default_db() def _init_default_db(self): self.add('default') def load(self): # Retrieving every databases fr...
import os import md5 import leveldb class DatabasesHandler(dict): def __init__(self, dest, *args, **kwargs): self['index'] = {} self.dest = dest self._init_default_db() def _init_default_db(self): self.add('default') def load(self): # Retrieving every databases fr...
<commit_before>import os import md5 import leveldb class DatabasesHandler(dict): def __init__(self, dest, *args, **kwargs): self['index'] = {} self.dest = dest self._init_default_db() def _init_default_db(self): self.add('default') def load(self): # Retrieving eve...
dffcc683ebd1d228bd56e394ffeae69d8c8529c7
detectem/cli.py
detectem/cli.py
import logging import click from detectem.response import get_har from detectem.plugin import load_plugins from detectem.core import Detector # Set up logging logger = logging.getLogger('detectem') ch = logging.StreamHandler() logger.setLevel(logging.DEBUG) logger.addHandler(ch) @click.command() @click.option( ...
import logging import click from detectem.response import get_har from detectem.plugin import load_plugins from detectem.core import Detector # Set up logging logger = logging.getLogger('detectem') ch = logging.StreamHandler() logger.setLevel(logging.ERROR) logger.addHandler(ch) @click.command() @click.option( ...
Change the default logging level to error
Change the default logging level to error
Python
mit
spectresearch/detectem
import logging import click from detectem.response import get_har from detectem.plugin import load_plugins from detectem.core import Detector # Set up logging logger = logging.getLogger('detectem') ch = logging.StreamHandler() logger.setLevel(logging.DEBUG) logger.addHandler(ch) @click.command() @click.option( ...
import logging import click from detectem.response import get_har from detectem.plugin import load_plugins from detectem.core import Detector # Set up logging logger = logging.getLogger('detectem') ch = logging.StreamHandler() logger.setLevel(logging.ERROR) logger.addHandler(ch) @click.command() @click.option( ...
<commit_before>import logging import click from detectem.response import get_har from detectem.plugin import load_plugins from detectem.core import Detector # Set up logging logger = logging.getLogger('detectem') ch = logging.StreamHandler() logger.setLevel(logging.DEBUG) logger.addHandler(ch) @click.command() @cl...
import logging import click from detectem.response import get_har from detectem.plugin import load_plugins from detectem.core import Detector # Set up logging logger = logging.getLogger('detectem') ch = logging.StreamHandler() logger.setLevel(logging.ERROR) logger.addHandler(ch) @click.command() @click.option( ...
import logging import click from detectem.response import get_har from detectem.plugin import load_plugins from detectem.core import Detector # Set up logging logger = logging.getLogger('detectem') ch = logging.StreamHandler() logger.setLevel(logging.DEBUG) logger.addHandler(ch) @click.command() @click.option( ...
<commit_before>import logging import click from detectem.response import get_har from detectem.plugin import load_plugins from detectem.core import Detector # Set up logging logger = logging.getLogger('detectem') ch = logging.StreamHandler() logger.setLevel(logging.DEBUG) logger.addHandler(ch) @click.command() @cl...
97abbb8b38ff38b7b150bb2c4b5e9243856ede02
dork/dns.py
dork/dns.py
""" Dynamic host file management. """ import docker from subprocess import call import re def refresh(): """ Ensure that all running containers have a valid entry in /etc/hosts. """ containers = docker.containers() hosts = '\n'.join(['%s %s' % (c.address, c.domain) for c in [d for d in containers ...
""" Dynamic host file management. """ import docker from subprocess import call import re def refresh(): """ Ensure that all running containers have a valid entry in /etc/hosts. """ containers = docker.containers() hosts = '\n'.join(['%s %s.%s.dork %s' % (c.address, c.project, c.instance, c.domain...
Add both domains to hostsfile.
Add both domains to hostsfile.
Python
mit
iamdork/dork
""" Dynamic host file management. """ import docker from subprocess import call import re def refresh(): """ Ensure that all running containers have a valid entry in /etc/hosts. """ containers = docker.containers() hosts = '\n'.join(['%s %s' % (c.address, c.domain) for c in [d for d in containers ...
""" Dynamic host file management. """ import docker from subprocess import call import re def refresh(): """ Ensure that all running containers have a valid entry in /etc/hosts. """ containers = docker.containers() hosts = '\n'.join(['%s %s.%s.dork %s' % (c.address, c.project, c.instance, c.domain...
<commit_before>""" Dynamic host file management. """ import docker from subprocess import call import re def refresh(): """ Ensure that all running containers have a valid entry in /etc/hosts. """ containers = docker.containers() hosts = '\n'.join(['%s %s' % (c.address, c.domain) for c in [d for d...
""" Dynamic host file management. """ import docker from subprocess import call import re def refresh(): """ Ensure that all running containers have a valid entry in /etc/hosts. """ containers = docker.containers() hosts = '\n'.join(['%s %s.%s.dork %s' % (c.address, c.project, c.instance, c.domain...
""" Dynamic host file management. """ import docker from subprocess import call import re def refresh(): """ Ensure that all running containers have a valid entry in /etc/hosts. """ containers = docker.containers() hosts = '\n'.join(['%s %s' % (c.address, c.domain) for c in [d for d in containers ...
<commit_before>""" Dynamic host file management. """ import docker from subprocess import call import re def refresh(): """ Ensure that all running containers have a valid entry in /etc/hosts. """ containers = docker.containers() hosts = '\n'.join(['%s %s' % (c.address, c.domain) for c in [d for d...
cbc69077016885ebf2b481eebd2f11511c8184ce
nbgrader/tests/apps/test_nbgrader.py
nbgrader/tests/apps/test_nbgrader.py
import os import sys from .. import run_nbgrader, run_command from .base import BaseTestApp class TestNbGrader(BaseTestApp): def test_help(self): """Does the help display without error?""" run_nbgrader(["--help-all"]) def test_no_subapp(self): """Is the help displayed when no subapp...
import os import sys from .. import run_nbgrader, run_command from .base import BaseTestApp class TestNbGrader(BaseTestApp): def test_help(self): """Does the help display without error?""" run_nbgrader(["--help-all"]) def test_no_subapp(self): """Is the help displayed when no subapp...
Include directory name for python 2 compatibility
Include directory name for python 2 compatibility
Python
bsd-3-clause
jhamrick/nbgrader,jhamrick/nbgrader,jupyter/nbgrader,jupyter/nbgrader,jupyter/nbgrader,jhamrick/nbgrader,jupyter/nbgrader,jhamrick/nbgrader,jupyter/nbgrader
import os import sys from .. import run_nbgrader, run_command from .base import BaseTestApp class TestNbGrader(BaseTestApp): def test_help(self): """Does the help display without error?""" run_nbgrader(["--help-all"]) def test_no_subapp(self): """Is the help displayed when no subapp...
import os import sys from .. import run_nbgrader, run_command from .base import BaseTestApp class TestNbGrader(BaseTestApp): def test_help(self): """Does the help display without error?""" run_nbgrader(["--help-all"]) def test_no_subapp(self): """Is the help displayed when no subapp...
<commit_before>import os import sys from .. import run_nbgrader, run_command from .base import BaseTestApp class TestNbGrader(BaseTestApp): def test_help(self): """Does the help display without error?""" run_nbgrader(["--help-all"]) def test_no_subapp(self): """Is the help displayed...
import os import sys from .. import run_nbgrader, run_command from .base import BaseTestApp class TestNbGrader(BaseTestApp): def test_help(self): """Does the help display without error?""" run_nbgrader(["--help-all"]) def test_no_subapp(self): """Is the help displayed when no subapp...
import os import sys from .. import run_nbgrader, run_command from .base import BaseTestApp class TestNbGrader(BaseTestApp): def test_help(self): """Does the help display without error?""" run_nbgrader(["--help-all"]) def test_no_subapp(self): """Is the help displayed when no subapp...
<commit_before>import os import sys from .. import run_nbgrader, run_command from .base import BaseTestApp class TestNbGrader(BaseTestApp): def test_help(self): """Does the help display without error?""" run_nbgrader(["--help-all"]) def test_no_subapp(self): """Is the help displayed...
3421caaceb54d30ccb070f9959978f196c72bb1b
responsive_wrapper/urls.py
responsive_wrapper/urls.py
from django.conf.urls import patterns, url from views import ajax_render urlpatterns = patterns( '', url(r'^render/(?P<plugin_id>[-\w]+)/$', ajax_render, name='ajax-render') )
from django.conf.urls import patterns, url from .views import ajax_render urlpatterns = patterns( '', url(r'^render/(?P<plugin_id>[-\w]+)/$', ajax_render, name='ajax-render') )
Use .views instead of views
Use .views instead of views
Python
bsd-3-clause
mishbahr/djangocms-responsive-wrapper,mishbahr/djangocms-responsive-wrapper,mishbahr/djangocms-responsive-wrapper
from django.conf.urls import patterns, url from views import ajax_render urlpatterns = patterns( '', url(r'^render/(?P<plugin_id>[-\w]+)/$', ajax_render, name='ajax-render') ) Use .views instead of views
from django.conf.urls import patterns, url from .views import ajax_render urlpatterns = patterns( '', url(r'^render/(?P<plugin_id>[-\w]+)/$', ajax_render, name='ajax-render') )
<commit_before>from django.conf.urls import patterns, url from views import ajax_render urlpatterns = patterns( '', url(r'^render/(?P<plugin_id>[-\w]+)/$', ajax_render, name='ajax-render') ) <commit_msg>Use .views instead of views<commit_after>
from django.conf.urls import patterns, url from .views import ajax_render urlpatterns = patterns( '', url(r'^render/(?P<plugin_id>[-\w]+)/$', ajax_render, name='ajax-render') )
from django.conf.urls import patterns, url from views import ajax_render urlpatterns = patterns( '', url(r'^render/(?P<plugin_id>[-\w]+)/$', ajax_render, name='ajax-render') ) Use .views instead of viewsfrom django.conf.urls import patterns, url from .views import ajax_render urlpatterns = patterns( '',...
<commit_before>from django.conf.urls import patterns, url from views import ajax_render urlpatterns = patterns( '', url(r'^render/(?P<plugin_id>[-\w]+)/$', ajax_render, name='ajax-render') ) <commit_msg>Use .views instead of views<commit_after>from django.conf.urls import patterns, url from .views import aja...
96777198fda175de0f53b8a2a36cc693fe4f50a3
scipy_base/__init__.py
scipy_base/__init__.py
from info_scipy_base import __doc__ from scipy_base_version import scipy_base_version as __version__ from ppimport import ppimport, ppimport_attr # The following statement is equivalent to # # from Matrix import Matrix as mat # # but avoids expensive LinearAlgebra import when # Matrix is not used. mat = ppimport_a...
from info_scipy_base import __doc__ from scipy_base_version import scipy_base_version as __version__ from ppimport import ppimport, ppimport_attr # The following statement is equivalent to # # from Matrix import Matrix as mat # # but avoids expensive LinearAlgebra import when # Matrix is not used. mat = ppimport_a...
Fix for matrixmultiply != dot on Numeric < 23.4
Fix for matrixmultiply != dot on Numeric < 23.4
Python
bsd-3-clause
ddasilva/numpy,behzadnouri/numpy,joferkington/numpy,bertrand-l/numpy,groutr/numpy,Eric89GXL/numpy,jakirkham/numpy,matthew-brett/numpy,cowlicks/numpy,githubmlai/numpy,musically-ut/numpy,dimasad/numpy,jakirkham/numpy,stefanv/numpy,tynn/numpy,ahaldane/numpy,utke1/numpy,pelson/numpy,mingwpy/numpy,skwbc/numpy,Dapid/numpy,ch...
from info_scipy_base import __doc__ from scipy_base_version import scipy_base_version as __version__ from ppimport import ppimport, ppimport_attr # The following statement is equivalent to # # from Matrix import Matrix as mat # # but avoids expensive LinearAlgebra import when # Matrix is not used. mat = ppimport_a...
from info_scipy_base import __doc__ from scipy_base_version import scipy_base_version as __version__ from ppimport import ppimport, ppimport_attr # The following statement is equivalent to # # from Matrix import Matrix as mat # # but avoids expensive LinearAlgebra import when # Matrix is not used. mat = ppimport_a...
<commit_before> from info_scipy_base import __doc__ from scipy_base_version import scipy_base_version as __version__ from ppimport import ppimport, ppimport_attr # The following statement is equivalent to # # from Matrix import Matrix as mat # # but avoids expensive LinearAlgebra import when # Matrix is not used. m...
from info_scipy_base import __doc__ from scipy_base_version import scipy_base_version as __version__ from ppimport import ppimport, ppimport_attr # The following statement is equivalent to # # from Matrix import Matrix as mat # # but avoids expensive LinearAlgebra import when # Matrix is not used. mat = ppimport_a...
from info_scipy_base import __doc__ from scipy_base_version import scipy_base_version as __version__ from ppimport import ppimport, ppimport_attr # The following statement is equivalent to # # from Matrix import Matrix as mat # # but avoids expensive LinearAlgebra import when # Matrix is not used. mat = ppimport_a...
<commit_before> from info_scipy_base import __doc__ from scipy_base_version import scipy_base_version as __version__ from ppimport import ppimport, ppimport_attr # The following statement is equivalent to # # from Matrix import Matrix as mat # # but avoids expensive LinearAlgebra import when # Matrix is not used. m...
30459a1552b5b90ec5469bbae85510ef3224ccac
stored_messages/models.py
stored_messages/models.py
from django.db import models from django.utils.encoding import python_2_unicode_compatible from django.utils import timezone from .compat import AUTH_USER_MODEL from .settings import stored_messages_settings INBOX_EXPIRE_DAYS = 30 # TODO move to settings @python_2_unicode_compatible class Message(models.Model): ...
from django.db import models from django.utils import timezone from django.utils.encoding import python_2_unicode_compatible from django.utils.translation import ugettext_lazy as _ from .compat import AUTH_USER_MODEL from .settings import stored_messages_settings INBOX_EXPIRE_DAYS = 30 # TODO move to settings @pyt...
Add Verbose name plurar for inbox and __str__ method
Add Verbose name plurar for inbox and __str__ method
Python
bsd-3-clause
nthall/django-stored-messages,evonove/django-stored-messages,evonove/django-stored-messages,xrmx/django-stored-messages,b0bbywan/django-stored-messages,nthall/django-stored-messages,b0bbywan/django-stored-messages,xrmx/django-stored-messages
from django.db import models from django.utils.encoding import python_2_unicode_compatible from django.utils import timezone from .compat import AUTH_USER_MODEL from .settings import stored_messages_settings INBOX_EXPIRE_DAYS = 30 # TODO move to settings @python_2_unicode_compatible class Message(models.Model): ...
from django.db import models from django.utils import timezone from django.utils.encoding import python_2_unicode_compatible from django.utils.translation import ugettext_lazy as _ from .compat import AUTH_USER_MODEL from .settings import stored_messages_settings INBOX_EXPIRE_DAYS = 30 # TODO move to settings @pyt...
<commit_before>from django.db import models from django.utils.encoding import python_2_unicode_compatible from django.utils import timezone from .compat import AUTH_USER_MODEL from .settings import stored_messages_settings INBOX_EXPIRE_DAYS = 30 # TODO move to settings @python_2_unicode_compatible class Message(mo...
from django.db import models from django.utils import timezone from django.utils.encoding import python_2_unicode_compatible from django.utils.translation import ugettext_lazy as _ from .compat import AUTH_USER_MODEL from .settings import stored_messages_settings INBOX_EXPIRE_DAYS = 30 # TODO move to settings @pyt...
from django.db import models from django.utils.encoding import python_2_unicode_compatible from django.utils import timezone from .compat import AUTH_USER_MODEL from .settings import stored_messages_settings INBOX_EXPIRE_DAYS = 30 # TODO move to settings @python_2_unicode_compatible class Message(models.Model): ...
<commit_before>from django.db import models from django.utils.encoding import python_2_unicode_compatible from django.utils import timezone from .compat import AUTH_USER_MODEL from .settings import stored_messages_settings INBOX_EXPIRE_DAYS = 30 # TODO move to settings @python_2_unicode_compatible class Message(mo...
a9f51a3e8eacc360d4f353a1fbe649809f88e4ce
astropy/io/misc/asdf/tags/time/tests/test_timedelta.py
astropy/io/misc/asdf/tags/time/tests/test_timedelta.py
# Licensed under a 3-clause BSD style license - see LICENSE.rst # -*- coding: utf-8 -*- import pytest from asdf.tests.helpers import assert_roundtrip_tree from astropy.time import Time @pytest.mark.parametrize('fmt', Time.FORMATS.keys()) def test_timedelta(fmt, tmpdir): t1 = Time(Time.now(), format=fmt) t...
# Licensed under a 3-clause BSD style license - see LICENSE.rst # -*- coding: utf-8 -*- import pytest asdf = pytest.importorskip('asdf') from asdf.tests.helpers import assert_roundtrip_tree from astropy.time import Time @pytest.mark.parametrize('fmt', Time.FORMATS.keys()) def test_timedelta(fmt, tmpdir): t1 =...
Add importorskip('asdf') to test for TimeDelta tag
Add importorskip('asdf') to test for TimeDelta tag
Python
bsd-3-clause
dhomeier/astropy,pllim/astropy,bsipocz/astropy,MSeifert04/astropy,StuartLittlefair/astropy,pllim/astropy,aleksandr-bakanov/astropy,saimn/astropy,bsipocz/astropy,pllim/astropy,saimn/astropy,aleksandr-bakanov/astropy,StuartLittlefair/astropy,astropy/astropy,saimn/astropy,larrybradley/astropy,MSeifert04/astropy,pllim/astr...
# Licensed under a 3-clause BSD style license - see LICENSE.rst # -*- coding: utf-8 -*- import pytest from asdf.tests.helpers import assert_roundtrip_tree from astropy.time import Time @pytest.mark.parametrize('fmt', Time.FORMATS.keys()) def test_timedelta(fmt, tmpdir): t1 = Time(Time.now(), format=fmt) t...
# Licensed under a 3-clause BSD style license - see LICENSE.rst # -*- coding: utf-8 -*- import pytest asdf = pytest.importorskip('asdf') from asdf.tests.helpers import assert_roundtrip_tree from astropy.time import Time @pytest.mark.parametrize('fmt', Time.FORMATS.keys()) def test_timedelta(fmt, tmpdir): t1 =...
<commit_before># Licensed under a 3-clause BSD style license - see LICENSE.rst # -*- coding: utf-8 -*- import pytest from asdf.tests.helpers import assert_roundtrip_tree from astropy.time import Time @pytest.mark.parametrize('fmt', Time.FORMATS.keys()) def test_timedelta(fmt, tmpdir): t1 = Time(Time.now(), fo...
# Licensed under a 3-clause BSD style license - see LICENSE.rst # -*- coding: utf-8 -*- import pytest asdf = pytest.importorskip('asdf') from asdf.tests.helpers import assert_roundtrip_tree from astropy.time import Time @pytest.mark.parametrize('fmt', Time.FORMATS.keys()) def test_timedelta(fmt, tmpdir): t1 =...
# Licensed under a 3-clause BSD style license - see LICENSE.rst # -*- coding: utf-8 -*- import pytest from asdf.tests.helpers import assert_roundtrip_tree from astropy.time import Time @pytest.mark.parametrize('fmt', Time.FORMATS.keys()) def test_timedelta(fmt, tmpdir): t1 = Time(Time.now(), format=fmt) t...
<commit_before># Licensed under a 3-clause BSD style license - see LICENSE.rst # -*- coding: utf-8 -*- import pytest from asdf.tests.helpers import assert_roundtrip_tree from astropy.time import Time @pytest.mark.parametrize('fmt', Time.FORMATS.keys()) def test_timedelta(fmt, tmpdir): t1 = Time(Time.now(), fo...
a938128b1e6b7654f93047883c90bf7b80ee564e
pentai/t_all.py
pentai/t_all.py
#!/usr/bin/python import unittest import pentai.base.t_all as b_t import pentai.ai.t_all as ai_t import pentai.db.t_all as db_t import pentai.db.zodb_dict as z_m import os def suite(): global all_tests all_tests = unittest.TestSuite() all_tests.addTest(b_t.suite()) all_tests.addTest(ai_t.suite()) ...
#!/usr/bin/python import unittest import pentai.base.t_all as b_t import pentai.ai.t_all as ai_t import pentai.db.t_all as db_t import pentai.db.zodb_dict as z_m import pentai.db.test_db as tdb_m def suite(): global all_tests all_tests = unittest.TestSuite() all_tests.addTest(b_t.suite()) all_tests.a...
Delete test db after a run
Delete test db after a run
Python
mit
cropleyb/pentai,cropleyb/pentai,cropleyb/pentai
#!/usr/bin/python import unittest import pentai.base.t_all as b_t import pentai.ai.t_all as ai_t import pentai.db.t_all as db_t import pentai.db.zodb_dict as z_m import os def suite(): global all_tests all_tests = unittest.TestSuite() all_tests.addTest(b_t.suite()) all_tests.addTest(ai_t.suite()) ...
#!/usr/bin/python import unittest import pentai.base.t_all as b_t import pentai.ai.t_all as ai_t import pentai.db.t_all as db_t import pentai.db.zodb_dict as z_m import pentai.db.test_db as tdb_m def suite(): global all_tests all_tests = unittest.TestSuite() all_tests.addTest(b_t.suite()) all_tests.a...
<commit_before>#!/usr/bin/python import unittest import pentai.base.t_all as b_t import pentai.ai.t_all as ai_t import pentai.db.t_all as db_t import pentai.db.zodb_dict as z_m import os def suite(): global all_tests all_tests = unittest.TestSuite() all_tests.addTest(b_t.suite()) all_tests.addTest(a...
#!/usr/bin/python import unittest import pentai.base.t_all as b_t import pentai.ai.t_all as ai_t import pentai.db.t_all as db_t import pentai.db.zodb_dict as z_m import pentai.db.test_db as tdb_m def suite(): global all_tests all_tests = unittest.TestSuite() all_tests.addTest(b_t.suite()) all_tests.a...
#!/usr/bin/python import unittest import pentai.base.t_all as b_t import pentai.ai.t_all as ai_t import pentai.db.t_all as db_t import pentai.db.zodb_dict as z_m import os def suite(): global all_tests all_tests = unittest.TestSuite() all_tests.addTest(b_t.suite()) all_tests.addTest(ai_t.suite()) ...
<commit_before>#!/usr/bin/python import unittest import pentai.base.t_all as b_t import pentai.ai.t_all as ai_t import pentai.db.t_all as db_t import pentai.db.zodb_dict as z_m import os def suite(): global all_tests all_tests = unittest.TestSuite() all_tests.addTest(b_t.suite()) all_tests.addTest(a...
03c479bce1d135e9d1c4acfbb085340b14679feb
fedmsg.d/fmn.py
fedmsg.d/fmn.py
import socket hostname = socket.gethostname().split('.')[-1] config = { # Consumer stuff "fmn.consumer.enabled": True, "fmn.sqlalchemy.uri": "sqlite:////var/tmp/fmn-dev-db.sqlite", ## Backend stuff ## # Email "fmn.email.mailserver": "127.0.0.1:25", "fmn.email.from_address": "fedmsg-notifi...
import socket hostname = socket.gethostname().split('.')[-1] import fmn.lib config = { # General stuff "fmn.valid_code_paths": fmn.lib.load_filters(), # Consumer stuff "fmn.consumer.enabled": True, "fmn.sqlalchemy.uri": "sqlite:////var/tmp/fmn-dev-db.sqlite", ## Backend stuff ## # Email...
Load code paths into the fedmsg dict.
Load code paths into the fedmsg dict.
Python
lgpl-2.1
jeremycline/fmn,jeremycline/fmn,jeremycline/fmn
import socket hostname = socket.gethostname().split('.')[-1] config = { # Consumer stuff "fmn.consumer.enabled": True, "fmn.sqlalchemy.uri": "sqlite:////var/tmp/fmn-dev-db.sqlite", ## Backend stuff ## # Email "fmn.email.mailserver": "127.0.0.1:25", "fmn.email.from_address": "fedmsg-notifi...
import socket hostname = socket.gethostname().split('.')[-1] import fmn.lib config = { # General stuff "fmn.valid_code_paths": fmn.lib.load_filters(), # Consumer stuff "fmn.consumer.enabled": True, "fmn.sqlalchemy.uri": "sqlite:////var/tmp/fmn-dev-db.sqlite", ## Backend stuff ## # Email...
<commit_before>import socket hostname = socket.gethostname().split('.')[-1] config = { # Consumer stuff "fmn.consumer.enabled": True, "fmn.sqlalchemy.uri": "sqlite:////var/tmp/fmn-dev-db.sqlite", ## Backend stuff ## # Email "fmn.email.mailserver": "127.0.0.1:25", "fmn.email.from_address":...
import socket hostname = socket.gethostname().split('.')[-1] import fmn.lib config = { # General stuff "fmn.valid_code_paths": fmn.lib.load_filters(), # Consumer stuff "fmn.consumer.enabled": True, "fmn.sqlalchemy.uri": "sqlite:////var/tmp/fmn-dev-db.sqlite", ## Backend stuff ## # Email...
import socket hostname = socket.gethostname().split('.')[-1] config = { # Consumer stuff "fmn.consumer.enabled": True, "fmn.sqlalchemy.uri": "sqlite:////var/tmp/fmn-dev-db.sqlite", ## Backend stuff ## # Email "fmn.email.mailserver": "127.0.0.1:25", "fmn.email.from_address": "fedmsg-notifi...
<commit_before>import socket hostname = socket.gethostname().split('.')[-1] config = { # Consumer stuff "fmn.consumer.enabled": True, "fmn.sqlalchemy.uri": "sqlite:////var/tmp/fmn-dev-db.sqlite", ## Backend stuff ## # Email "fmn.email.mailserver": "127.0.0.1:25", "fmn.email.from_address":...
827bb2fb8025fcd882c58b7b9136bc68231319dd
src/randbot.py
src/randbot.py
__author__ = 'Antony Cherepanov' import tweepy from src import dbhandler from src import generator class RandBot(object): def __init__(self): self.db = dbhandler.DBHandler() self.auth = tweepy.OAuthHandler(*(self.db.get_consumer_data())) self.auth.set_access_token(*(self.db.get_access_tok...
__author__ = 'Antony Cherepanov' import tweepy from src import dbhandler from src import generator class RandBot(object): def __init__(self): self.tweets = list() self.db = dbhandler.DBHandler() self.auth = tweepy.OAuthHandler(*(self.db.get_consumer_data())) self.auth.set_access_t...
Add functions to process tweets
Add functions to process tweets
Python
mit
iamantony/randbot
__author__ = 'Antony Cherepanov' import tweepy from src import dbhandler from src import generator class RandBot(object): def __init__(self): self.db = dbhandler.DBHandler() self.auth = tweepy.OAuthHandler(*(self.db.get_consumer_data())) self.auth.set_access_token(*(self.db.get_access_tok...
__author__ = 'Antony Cherepanov' import tweepy from src import dbhandler from src import generator class RandBot(object): def __init__(self): self.tweets = list() self.db = dbhandler.DBHandler() self.auth = tweepy.OAuthHandler(*(self.db.get_consumer_data())) self.auth.set_access_t...
<commit_before>__author__ = 'Antony Cherepanov' import tweepy from src import dbhandler from src import generator class RandBot(object): def __init__(self): self.db = dbhandler.DBHandler() self.auth = tweepy.OAuthHandler(*(self.db.get_consumer_data())) self.auth.set_access_token(*(self.db...
__author__ = 'Antony Cherepanov' import tweepy from src import dbhandler from src import generator class RandBot(object): def __init__(self): self.tweets = list() self.db = dbhandler.DBHandler() self.auth = tweepy.OAuthHandler(*(self.db.get_consumer_data())) self.auth.set_access_t...
__author__ = 'Antony Cherepanov' import tweepy from src import dbhandler from src import generator class RandBot(object): def __init__(self): self.db = dbhandler.DBHandler() self.auth = tweepy.OAuthHandler(*(self.db.get_consumer_data())) self.auth.set_access_token(*(self.db.get_access_tok...
<commit_before>__author__ = 'Antony Cherepanov' import tweepy from src import dbhandler from src import generator class RandBot(object): def __init__(self): self.db = dbhandler.DBHandler() self.auth = tweepy.OAuthHandler(*(self.db.get_consumer_data())) self.auth.set_access_token(*(self.db...
28d8e67420b64a126db2c14e5532323b0782575b
linter.py
linter.py
# # linter.py # Linter for SublimeLinter3, a code checking framework for Sublime Text 3 # # Written by Ben Edwards # Copyright (c) 2015 Ben Edwards # # License: MIT # """This module exports the PugLint plugin class.""" from SublimeLinter.lint import NodeLinter, util, highlight class PugLint(NodeLinter): """Prov...
# # linter.py # Linter for SublimeLinter3, a code checking framework for Sublime Text 3 # # Written by Ben Edwards # Copyright (c) 2015 Ben Edwards # # License: MIT # """This module exports the PugLint plugin class.""" from SublimeLinter.lint import NodeLinter, util, highlight class PugLint(NodeLinter): """Prov...
Remove lines that cause error in Sublime Text console
Remove lines that cause error in Sublime Text console Logs: puglint: Defining 'cls.version_args' has no effect. Please cleanup and remove this setting. puglint: Defining 'cls.version_re' has no effect. Please cleanup and remove this setting. puglint: Defining 'cls.version_requirement' has no effect. Please cleanup an...
Python
mit
benedfit/SublimeLinter-contrib-jade-lint,benedfit/SublimeLinter-contrib-pug-lint
# # linter.py # Linter for SublimeLinter3, a code checking framework for Sublime Text 3 # # Written by Ben Edwards # Copyright (c) 2015 Ben Edwards # # License: MIT # """This module exports the PugLint plugin class.""" from SublimeLinter.lint import NodeLinter, util, highlight class PugLint(NodeLinter): """Prov...
# # linter.py # Linter for SublimeLinter3, a code checking framework for Sublime Text 3 # # Written by Ben Edwards # Copyright (c) 2015 Ben Edwards # # License: MIT # """This module exports the PugLint plugin class.""" from SublimeLinter.lint import NodeLinter, util, highlight class PugLint(NodeLinter): """Prov...
<commit_before># # linter.py # Linter for SublimeLinter3, a code checking framework for Sublime Text 3 # # Written by Ben Edwards # Copyright (c) 2015 Ben Edwards # # License: MIT # """This module exports the PugLint plugin class.""" from SublimeLinter.lint import NodeLinter, util, highlight class PugLint(NodeLinte...
# # linter.py # Linter for SublimeLinter3, a code checking framework for Sublime Text 3 # # Written by Ben Edwards # Copyright (c) 2015 Ben Edwards # # License: MIT # """This module exports the PugLint plugin class.""" from SublimeLinter.lint import NodeLinter, util, highlight class PugLint(NodeLinter): """Prov...
# # linter.py # Linter for SublimeLinter3, a code checking framework for Sublime Text 3 # # Written by Ben Edwards # Copyright (c) 2015 Ben Edwards # # License: MIT # """This module exports the PugLint plugin class.""" from SublimeLinter.lint import NodeLinter, util, highlight class PugLint(NodeLinter): """Prov...
<commit_before># # linter.py # Linter for SublimeLinter3, a code checking framework for Sublime Text 3 # # Written by Ben Edwards # Copyright (c) 2015 Ben Edwards # # License: MIT # """This module exports the PugLint plugin class.""" from SublimeLinter.lint import NodeLinter, util, highlight class PugLint(NodeLinte...
805c6097b3dc7e7e2468235a9c28d159cb99f187
satchless/cart/__init__.py
satchless/cart/__init__.py
from django.conf import settings from django.core.exceptions import ImproperlyConfigured from .handler import AddToCartHandler add_to_cart_handler = AddToCartHandler('cart') if not getattr(settings, 'SATCHLESS_DEFAULT_CURRENCY', None): raise ImproperlyConfigured('You need to configure ' ...
class InvalidQuantityException(Exception): def __init__(self, reason, quantity_delta): self.reason = reason self.quantity_delta = quantity_delta def __str__(self): return self.reason
Add cart quantity exception, remove old handler
Add cart quantity exception, remove old handler
Python
bsd-3-clause
taedori81/satchless
from django.conf import settings from django.core.exceptions import ImproperlyConfigured from .handler import AddToCartHandler add_to_cart_handler = AddToCartHandler('cart') if not getattr(settings, 'SATCHLESS_DEFAULT_CURRENCY', None): raise ImproperlyConfigured('You need to configure ' ...
class InvalidQuantityException(Exception): def __init__(self, reason, quantity_delta): self.reason = reason self.quantity_delta = quantity_delta def __str__(self): return self.reason
<commit_before>from django.conf import settings from django.core.exceptions import ImproperlyConfigured from .handler import AddToCartHandler add_to_cart_handler = AddToCartHandler('cart') if not getattr(settings, 'SATCHLESS_DEFAULT_CURRENCY', None): raise ImproperlyConfigured('You need to configure ' ...
class InvalidQuantityException(Exception): def __init__(self, reason, quantity_delta): self.reason = reason self.quantity_delta = quantity_delta def __str__(self): return self.reason
from django.conf import settings from django.core.exceptions import ImproperlyConfigured from .handler import AddToCartHandler add_to_cart_handler = AddToCartHandler('cart') if not getattr(settings, 'SATCHLESS_DEFAULT_CURRENCY', None): raise ImproperlyConfigured('You need to configure ' ...
<commit_before>from django.conf import settings from django.core.exceptions import ImproperlyConfigured from .handler import AddToCartHandler add_to_cart_handler = AddToCartHandler('cart') if not getattr(settings, 'SATCHLESS_DEFAULT_CURRENCY', None): raise ImproperlyConfigured('You need to configure ' ...
0829ca1bb133841efd9ff1753384b0895c1be924
nightbus/utils.py
nightbus/utils.py
# Copyright 2017 Codethink Ltd. # # 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 writin...
# Copyright 2017 Codethink Ltd. # # 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 writin...
Fix crash when no commandline args are passed
Fix crash when no commandline args are passed Regression from 3513da19363b8b4564f199b469d13486996ede57
Python
apache-2.0
ssssam/nightbus,ssssam/nightbus
# Copyright 2017 Codethink Ltd. # # 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 writin...
# Copyright 2017 Codethink Ltd. # # 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 writin...
<commit_before># Copyright 2017 Codethink Ltd. # # 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 2017 Codethink Ltd. # # 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 writin...
# Copyright 2017 Codethink Ltd. # # 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 writin...
<commit_before># Copyright 2017 Codethink Ltd. # # 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...
06ab217f49e00bd52c9f8b632db904e1ebe7256d
pycroft/helpers/date.py
pycroft/helpers/date.py
from datetime import timedelta from datetime import date def diff_month(d1: date, d2: date) -> int: """Calculate the difference in months ignoring the days If d1 > d2, the result is positive. """ return (d1.year - d2.year) * 12 + d1.month - d2.month def last_day_of_month(d): next_month = d.repl...
from calendar import monthrange from datetime import date def diff_month(d1: date, d2: date) -> int: """Calculate the difference in months ignoring the days If d1 > d2, the result is positive. """ return (d1.year - d2.year) * 12 + d1.month - d2.month def last_day_of_month(d: date) -> date: _, n...
Use builtin function to find last month
Use builtin function to find last month
Python
apache-2.0
agdsn/pycroft,lukasjuhrich/pycroft,agdsn/pycroft,agdsn/pycroft,lukasjuhrich/pycroft,lukasjuhrich/pycroft,lukasjuhrich/pycroft,agdsn/pycroft,agdsn/pycroft
from datetime import timedelta from datetime import date def diff_month(d1: date, d2: date) -> int: """Calculate the difference in months ignoring the days If d1 > d2, the result is positive. """ return (d1.year - d2.year) * 12 + d1.month - d2.month def last_day_of_month(d): next_month = d.repl...
from calendar import monthrange from datetime import date def diff_month(d1: date, d2: date) -> int: """Calculate the difference in months ignoring the days If d1 > d2, the result is positive. """ return (d1.year - d2.year) * 12 + d1.month - d2.month def last_day_of_month(d: date) -> date: _, n...
<commit_before>from datetime import timedelta from datetime import date def diff_month(d1: date, d2: date) -> int: """Calculate the difference in months ignoring the days If d1 > d2, the result is positive. """ return (d1.year - d2.year) * 12 + d1.month - d2.month def last_day_of_month(d): next...
from calendar import monthrange from datetime import date def diff_month(d1: date, d2: date) -> int: """Calculate the difference in months ignoring the days If d1 > d2, the result is positive. """ return (d1.year - d2.year) * 12 + d1.month - d2.month def last_day_of_month(d: date) -> date: _, n...
from datetime import timedelta from datetime import date def diff_month(d1: date, d2: date) -> int: """Calculate the difference in months ignoring the days If d1 > d2, the result is positive. """ return (d1.year - d2.year) * 12 + d1.month - d2.month def last_day_of_month(d): next_month = d.repl...
<commit_before>from datetime import timedelta from datetime import date def diff_month(d1: date, d2: date) -> int: """Calculate the difference in months ignoring the days If d1 > d2, the result is positive. """ return (d1.year - d2.year) * 12 + d1.month - d2.month def last_day_of_month(d): next...
b47b7bfe3a193c57b69ff4d85069c08d00c0dd35
models.py
models.py
from django import dispatch from django.db import transaction from django.db.models import signals as model_signals from . import client from .pool import pool from resolwe.flow import models as flow_models, serializers as flow_serializers, views as flow_views # Register all viewsets with the query observer pool. # T...
from django import dispatch from django.db import transaction from django.db.models import signals as model_signals from . import client from .pool import pool from resolwe.flow import models as flow_models, serializers as flow_serializers, views as flow_views # Register all viewsets with the query observer pool. # T...
Use collection instead of project
Use collection instead of project
Python
apache-2.0
genialis/django-rest-framework-reactive,genialis/django-rest-framework-reactive
from django import dispatch from django.db import transaction from django.db.models import signals as model_signals from . import client from .pool import pool from resolwe.flow import models as flow_models, serializers as flow_serializers, views as flow_views # Register all viewsets with the query observer pool. # T...
from django import dispatch from django.db import transaction from django.db.models import signals as model_signals from . import client from .pool import pool from resolwe.flow import models as flow_models, serializers as flow_serializers, views as flow_views # Register all viewsets with the query observer pool. # T...
<commit_before>from django import dispatch from django.db import transaction from django.db.models import signals as model_signals from . import client from .pool import pool from resolwe.flow import models as flow_models, serializers as flow_serializers, views as flow_views # Register all viewsets with the query obs...
from django import dispatch from django.db import transaction from django.db.models import signals as model_signals from . import client from .pool import pool from resolwe.flow import models as flow_models, serializers as flow_serializers, views as flow_views # Register all viewsets with the query observer pool. # T...
from django import dispatch from django.db import transaction from django.db.models import signals as model_signals from . import client from .pool import pool from resolwe.flow import models as flow_models, serializers as flow_serializers, views as flow_views # Register all viewsets with the query observer pool. # T...
<commit_before>from django import dispatch from django.db import transaction from django.db.models import signals as model_signals from . import client from .pool import pool from resolwe.flow import models as flow_models, serializers as flow_serializers, views as flow_views # Register all viewsets with the query obs...
c9efa5897426b6c1f8f0e99185e8b15878a9abd2
gallery/urls.py
gallery/urls.py
from django.conf.urls import url from . import views app_name = 'gallery' urlpatterns = [ url(r'^$', views.IndexView.as_view(), name='index'), url(r'^(?P<slug>[-\w]+)/$', views.GalleryView.as_view(), name='gallery'), url(r'^(?P<gallery_slug>[-\w]+)/(?P<slug>[-\w]+)/$', views.GalleryImageView.as_view(), na...
from django.urls import include, path from . import views app_name = 'gallery' urlpatterns = [ path('', views.IndexView.as_view(), name='index'), path('<slug:slug>/', views.GalleryView.as_view(), name='gallery'), path('<slug:gallery_slug>/<slug:slug>/', views.GalleryImageView.as_view(), name='gallery_imag...
Move gallery urlpatterns to Django 2.0 preferred method
Move gallery urlpatterns to Django 2.0 preferred method
Python
mit
evanepio/dotmanca,evanepio/dotmanca,evanepio/dotmanca
from django.conf.urls import url from . import views app_name = 'gallery' urlpatterns = [ url(r'^$', views.IndexView.as_view(), name='index'), url(r'^(?P<slug>[-\w]+)/$', views.GalleryView.as_view(), name='gallery'), url(r'^(?P<gallery_slug>[-\w]+)/(?P<slug>[-\w]+)/$', views.GalleryImageView.as_view(), na...
from django.urls import include, path from . import views app_name = 'gallery' urlpatterns = [ path('', views.IndexView.as_view(), name='index'), path('<slug:slug>/', views.GalleryView.as_view(), name='gallery'), path('<slug:gallery_slug>/<slug:slug>/', views.GalleryImageView.as_view(), name='gallery_imag...
<commit_before>from django.conf.urls import url from . import views app_name = 'gallery' urlpatterns = [ url(r'^$', views.IndexView.as_view(), name='index'), url(r'^(?P<slug>[-\w]+)/$', views.GalleryView.as_view(), name='gallery'), url(r'^(?P<gallery_slug>[-\w]+)/(?P<slug>[-\w]+)/$', views.GalleryImageVie...
from django.urls import include, path from . import views app_name = 'gallery' urlpatterns = [ path('', views.IndexView.as_view(), name='index'), path('<slug:slug>/', views.GalleryView.as_view(), name='gallery'), path('<slug:gallery_slug>/<slug:slug>/', views.GalleryImageView.as_view(), name='gallery_imag...
from django.conf.urls import url from . import views app_name = 'gallery' urlpatterns = [ url(r'^$', views.IndexView.as_view(), name='index'), url(r'^(?P<slug>[-\w]+)/$', views.GalleryView.as_view(), name='gallery'), url(r'^(?P<gallery_slug>[-\w]+)/(?P<slug>[-\w]+)/$', views.GalleryImageView.as_view(), na...
<commit_before>from django.conf.urls import url from . import views app_name = 'gallery' urlpatterns = [ url(r'^$', views.IndexView.as_view(), name='index'), url(r'^(?P<slug>[-\w]+)/$', views.GalleryView.as_view(), name='gallery'), url(r'^(?P<gallery_slug>[-\w]+)/(?P<slug>[-\w]+)/$', views.GalleryImageVie...
7f78484fbefc0c193668fffd03b38bf8523e89f6
pyecore/notification.py
pyecore/notification.py
class ENotifer(object): def notify(self, notification): notification.notifier = notification.notifier or self for listener in self._eternal_listener + self.listeners: listener.notifyChanged(notification) def enum(enumName, *listValueNames): """Clever implementation of an enum lik...
from enum import Enum, unique class ENotifer(object): def notify(self, notification): notification.notifier = notification.notifier or self for listener in self._eternal_listener + self.listeners: listener.notifyChanged(notification) @unique class Kind(Enum): ADD = 0 ADD_MANY...
Add better enumeration for Notification
Add better enumeration for Notification The previous 'Kind' enumeration for Notification were using a home-made-cooked way of dealing with enumeration. The code were got from an article from the http://sametmax.com/ website (great website by the way). This new version uses the python 3.4 enumeration module, but as thi...
Python
bsd-3-clause
aranega/pyecore,pyecore/pyecore
class ENotifer(object): def notify(self, notification): notification.notifier = notification.notifier or self for listener in self._eternal_listener + self.listeners: listener.notifyChanged(notification) def enum(enumName, *listValueNames): """Clever implementation of an enum lik...
from enum import Enum, unique class ENotifer(object): def notify(self, notification): notification.notifier = notification.notifier or self for listener in self._eternal_listener + self.listeners: listener.notifyChanged(notification) @unique class Kind(Enum): ADD = 0 ADD_MANY...
<commit_before> class ENotifer(object): def notify(self, notification): notification.notifier = notification.notifier or self for listener in self._eternal_listener + self.listeners: listener.notifyChanged(notification) def enum(enumName, *listValueNames): """Clever implementation...
from enum import Enum, unique class ENotifer(object): def notify(self, notification): notification.notifier = notification.notifier or self for listener in self._eternal_listener + self.listeners: listener.notifyChanged(notification) @unique class Kind(Enum): ADD = 0 ADD_MANY...
class ENotifer(object): def notify(self, notification): notification.notifier = notification.notifier or self for listener in self._eternal_listener + self.listeners: listener.notifyChanged(notification) def enum(enumName, *listValueNames): """Clever implementation of an enum lik...
<commit_before> class ENotifer(object): def notify(self, notification): notification.notifier = notification.notifier or self for listener in self._eternal_listener + self.listeners: listener.notifyChanged(notification) def enum(enumName, *listValueNames): """Clever implementation...
006423b8975fa9e9bc3758e5c2e82002f0838ca7
scripts/link-python-apt.py
scripts/link-python-apt.py
""" Make python-apt available in the Python virtual environment without using the system site-packages support built into Travis CI because this doesn't work for Python 3.4, 3.7 and PyPy. See the following failed build: https://travis-ci.org/xolox/python-deb-pkg-tools/builds/581437417 """ import os import sys from di...
""" Workaround to enable python-apt on Travis CI. Make python-apt available in the Python virtual environment without using the system site-packages support built into Travis CI because this doesn't work for Python 3.4, 3.7 and PyPy. See the following failed build: https://travis-ci.org/xolox/python-deb-pkg-tools/buil...
Change s/apt/apt_pkg/g (follow up to previous commit)
Change s/apt/apt_pkg/g (follow up to previous commit)
Python
mit
xolox/python-deb-pkg-tools,xolox/python-deb-pkg-tools
""" Make python-apt available in the Python virtual environment without using the system site-packages support built into Travis CI because this doesn't work for Python 3.4, 3.7 and PyPy. See the following failed build: https://travis-ci.org/xolox/python-deb-pkg-tools/builds/581437417 """ import os import sys from di...
""" Workaround to enable python-apt on Travis CI. Make python-apt available in the Python virtual environment without using the system site-packages support built into Travis CI because this doesn't work for Python 3.4, 3.7 and PyPy. See the following failed build: https://travis-ci.org/xolox/python-deb-pkg-tools/buil...
<commit_before>""" Make python-apt available in the Python virtual environment without using the system site-packages support built into Travis CI because this doesn't work for Python 3.4, 3.7 and PyPy. See the following failed build: https://travis-ci.org/xolox/python-deb-pkg-tools/builds/581437417 """ import os impo...
""" Workaround to enable python-apt on Travis CI. Make python-apt available in the Python virtual environment without using the system site-packages support built into Travis CI because this doesn't work for Python 3.4, 3.7 and PyPy. See the following failed build: https://travis-ci.org/xolox/python-deb-pkg-tools/buil...
""" Make python-apt available in the Python virtual environment without using the system site-packages support built into Travis CI because this doesn't work for Python 3.4, 3.7 and PyPy. See the following failed build: https://travis-ci.org/xolox/python-deb-pkg-tools/builds/581437417 """ import os import sys from di...
<commit_before>""" Make python-apt available in the Python virtual environment without using the system site-packages support built into Travis CI because this doesn't work for Python 3.4, 3.7 and PyPy. See the following failed build: https://travis-ci.org/xolox/python-deb-pkg-tools/builds/581437417 """ import os impo...
353728aba17695396c6167543e74181f9f853fdc
examples/template_render.py
examples/template_render.py
import django.template.loader import django.conf import sys sys.path.append('django_test') django.conf.settings.configure(INSTALLED_APPS=(), TEMPLATE_DIRS=('.', 'examples',)) for x in range(0,100): django.template.loader.render_to_string('template.html')
import django.template.loader import django.conf import sys, os os.chdir(os.path.dirname(__file__)) django.conf.settings.configure( INSTALLED_APPS=(), TEMPLATES=[{ "BACKEND": "django.template.backends.django.DjangoTemplates", "DIRS": ['.'] }], ) django.setup() for x in range(0,100): ...
Update template render example for Django 1.8+
Update template render example for Django 1.8+
Python
bsd-3-clause
joerick/pyinstrument,joerick/pyinstrument,joerick/pyinstrument,joerick/pyinstrument,joerick/pyinstrument,joerick/pyinstrument
import django.template.loader import django.conf import sys sys.path.append('django_test') django.conf.settings.configure(INSTALLED_APPS=(), TEMPLATE_DIRS=('.', 'examples',)) for x in range(0,100): django.template.loader.render_to_string('template.html') Update template render example for Django 1.8+
import django.template.loader import django.conf import sys, os os.chdir(os.path.dirname(__file__)) django.conf.settings.configure( INSTALLED_APPS=(), TEMPLATES=[{ "BACKEND": "django.template.backends.django.DjangoTemplates", "DIRS": ['.'] }], ) django.setup() for x in range(0,100): ...
<commit_before>import django.template.loader import django.conf import sys sys.path.append('django_test') django.conf.settings.configure(INSTALLED_APPS=(), TEMPLATE_DIRS=('.', 'examples',)) for x in range(0,100): django.template.loader.render_to_string('template.html') <commit_msg>Update template render example f...
import django.template.loader import django.conf import sys, os os.chdir(os.path.dirname(__file__)) django.conf.settings.configure( INSTALLED_APPS=(), TEMPLATES=[{ "BACKEND": "django.template.backends.django.DjangoTemplates", "DIRS": ['.'] }], ) django.setup() for x in range(0,100): ...
import django.template.loader import django.conf import sys sys.path.append('django_test') django.conf.settings.configure(INSTALLED_APPS=(), TEMPLATE_DIRS=('.', 'examples',)) for x in range(0,100): django.template.loader.render_to_string('template.html') Update template render example for Django 1.8+import django...
<commit_before>import django.template.loader import django.conf import sys sys.path.append('django_test') django.conf.settings.configure(INSTALLED_APPS=(), TEMPLATE_DIRS=('.', 'examples',)) for x in range(0,100): django.template.loader.render_to_string('template.html') <commit_msg>Update template render example f...
5ef233bf3bb3bd1346bb64a9da2ed5542c0e40df
regparser/layer/meta.py
regparser/layer/meta.py
import re from regparser.layer.layer import Layer import settings class Meta(Layer): shorthand = 'meta' def __init__(self, tree, cfr_title, version, **context): super(Meta, self).__init__(tree, **context) self.cfr_title = cfr_title self.version = version def process(self, node):...
import re from regparser.layer.layer import Layer import settings class Meta(Layer): shorthand = 'meta' def __init__(self, tree, cfr_title, version, **context): super(Meta, self).__init__(tree, **context) self.cfr_title = cfr_title self.version = version def process(self, node):...
Use dictionary update instead of addition
Use dictionary update instead of addition
Python
cc0-1.0
eregs/regulations-parser,tadhg-ohiggins/regulations-parser,tadhg-ohiggins/regulations-parser,eregs/regulations-parser
import re from regparser.layer.layer import Layer import settings class Meta(Layer): shorthand = 'meta' def __init__(self, tree, cfr_title, version, **context): super(Meta, self).__init__(tree, **context) self.cfr_title = cfr_title self.version = version def process(self, node):...
import re from regparser.layer.layer import Layer import settings class Meta(Layer): shorthand = 'meta' def __init__(self, tree, cfr_title, version, **context): super(Meta, self).__init__(tree, **context) self.cfr_title = cfr_title self.version = version def process(self, node):...
<commit_before>import re from regparser.layer.layer import Layer import settings class Meta(Layer): shorthand = 'meta' def __init__(self, tree, cfr_title, version, **context): super(Meta, self).__init__(tree, **context) self.cfr_title = cfr_title self.version = version def proce...
import re from regparser.layer.layer import Layer import settings class Meta(Layer): shorthand = 'meta' def __init__(self, tree, cfr_title, version, **context): super(Meta, self).__init__(tree, **context) self.cfr_title = cfr_title self.version = version def process(self, node):...
import re from regparser.layer.layer import Layer import settings class Meta(Layer): shorthand = 'meta' def __init__(self, tree, cfr_title, version, **context): super(Meta, self).__init__(tree, **context) self.cfr_title = cfr_title self.version = version def process(self, node):...
<commit_before>import re from regparser.layer.layer import Layer import settings class Meta(Layer): shorthand = 'meta' def __init__(self, tree, cfr_title, version, **context): super(Meta, self).__init__(tree, **context) self.cfr_title = cfr_title self.version = version def proce...
e980aaf833b6f289069ee9ae9c2d3571ae297246
tools/publish_all_pkgs.py
tools/publish_all_pkgs.py
#!/usr/bin/env python # # Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file # for details. All rights reserved. Use of this source code is governed by a # BSD-style license that can be found in the LICENSE file. # # Upload all packages in pkg/ (other than a few that should be explicitly # exclu...
#!/usr/bin/env python # # Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file # for details. All rights reserved. Use of this source code is governed by a # BSD-style license that can be found in the LICENSE file. # # Upload all packages in pkg/ (other than a few that should be explicitly # exclu...
Stop publishing compiler_unsupported. Start publishing fixnum.
Stop publishing compiler_unsupported. Start publishing fixnum. R=sigmund@google.com Review URL: https://codereview.chromium.org//19757010 git-svn-id: c93d8a2297af3b929165606efe145742a534bc71@25217 260f80e4-7a28-3924-810f-c04153c831b5
Python
bsd-3-clause
dartino/dart-sdk,dart-archive/dart-sdk,dart-lang/sdk,dart-lang/sdk,dartino/dart-sdk,dartino/dart-sdk,dart-lang/sdk,dart-lang/sdk,dart-archive/dart-sdk,dart-lang/sdk,dart-lang/sdk,dart-archive/dart-sdk,dart-archive/dart-sdk,dart-archive/dart-sdk,dart-lang/sdk,dartino/dart-sdk,dart-archive/dart-sdk,dart-archive/dart-sdk,...
#!/usr/bin/env python # # Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file # for details. All rights reserved. Use of this source code is governed by a # BSD-style license that can be found in the LICENSE file. # # Upload all packages in pkg/ (other than a few that should be explicitly # exclu...
#!/usr/bin/env python # # Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file # for details. All rights reserved. Use of this source code is governed by a # BSD-style license that can be found in the LICENSE file. # # Upload all packages in pkg/ (other than a few that should be explicitly # exclu...
<commit_before>#!/usr/bin/env python # # Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file # for details. All rights reserved. Use of this source code is governed by a # BSD-style license that can be found in the LICENSE file. # # Upload all packages in pkg/ (other than a few that should be exp...
#!/usr/bin/env python # # Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file # for details. All rights reserved. Use of this source code is governed by a # BSD-style license that can be found in the LICENSE file. # # Upload all packages in pkg/ (other than a few that should be explicitly # exclu...
#!/usr/bin/env python # # Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file # for details. All rights reserved. Use of this source code is governed by a # BSD-style license that can be found in the LICENSE file. # # Upload all packages in pkg/ (other than a few that should be explicitly # exclu...
<commit_before>#!/usr/bin/env python # # Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file # for details. All rights reserved. Use of this source code is governed by a # BSD-style license that can be found in the LICENSE file. # # Upload all packages in pkg/ (other than a few that should be exp...
9ff75ff858681665141650d4e1ef310265956f35
tools/workplace_status.py
tools/workplace_status.py
#! /usr/bin/env python3 # Note that this file should work in both Python 2 and 3. from __future__ import print_function from subprocess import Popen, PIPE dirty = Popen(["git", "diff-index", "--quiet", "HEAD"], stdout=PIPE).wait() != 0 commit_process = Popen(["git", "describe", "--tags", "--abbrev=0"], stdout=PIPE)...
#! /usr/bin/env python3 # Note that this file should work in both Python 2 and 3. from __future__ import print_function from subprocess import Popen, PIPE dirty = Popen(["git", "diff-index", "--quiet", "HEAD"], stdout=PIPE).wait() != 0 commit_process = Popen(["git", "describe", "--always", "--tags", "--abbrev=0"], ...
Make git describe --always return a value
Make git describe --always return a value This means that the latest commit will be stamped if there are no tags.
Python
apache-2.0
bazelbuild/bazel-watcher,bazelbuild/bazel-watcher,bazelbuild/bazel-watcher,bazelbuild/bazel-watcher
#! /usr/bin/env python3 # Note that this file should work in both Python 2 and 3. from __future__ import print_function from subprocess import Popen, PIPE dirty = Popen(["git", "diff-index", "--quiet", "HEAD"], stdout=PIPE).wait() != 0 commit_process = Popen(["git", "describe", "--tags", "--abbrev=0"], stdout=PIPE)...
#! /usr/bin/env python3 # Note that this file should work in both Python 2 and 3. from __future__ import print_function from subprocess import Popen, PIPE dirty = Popen(["git", "diff-index", "--quiet", "HEAD"], stdout=PIPE).wait() != 0 commit_process = Popen(["git", "describe", "--always", "--tags", "--abbrev=0"], ...
<commit_before>#! /usr/bin/env python3 # Note that this file should work in both Python 2 and 3. from __future__ import print_function from subprocess import Popen, PIPE dirty = Popen(["git", "diff-index", "--quiet", "HEAD"], stdout=PIPE).wait() != 0 commit_process = Popen(["git", "describe", "--tags", "--abbrev=0"...
#! /usr/bin/env python3 # Note that this file should work in both Python 2 and 3. from __future__ import print_function from subprocess import Popen, PIPE dirty = Popen(["git", "diff-index", "--quiet", "HEAD"], stdout=PIPE).wait() != 0 commit_process = Popen(["git", "describe", "--always", "--tags", "--abbrev=0"], ...
#! /usr/bin/env python3 # Note that this file should work in both Python 2 and 3. from __future__ import print_function from subprocess import Popen, PIPE dirty = Popen(["git", "diff-index", "--quiet", "HEAD"], stdout=PIPE).wait() != 0 commit_process = Popen(["git", "describe", "--tags", "--abbrev=0"], stdout=PIPE)...
<commit_before>#! /usr/bin/env python3 # Note that this file should work in both Python 2 and 3. from __future__ import print_function from subprocess import Popen, PIPE dirty = Popen(["git", "diff-index", "--quiet", "HEAD"], stdout=PIPE).wait() != 0 commit_process = Popen(["git", "describe", "--tags", "--abbrev=0"...
3681b5a485662656d6419d95ad89f1fbdb7a2a50
myuw/context_processors.py
myuw/context_processors.py
# Determins if the requesting device is a native hybrid app (android/ios) def is_hybrid(request): return { 'is_hybrid': 'HTTP_MYUW_HYBRID' in request.META }
# Determins if the requesting device is a native hybrid app (android/ios) def is_hybrid(request): return { 'is_hybrid': 'MyUW_Hybrid/1.0' in request.META['HTTP_USER_AGENT'] }
Update context processer to check for custom hybrid user agent.
Update context processer to check for custom hybrid user agent.
Python
apache-2.0
uw-it-aca/myuw,uw-it-aca/myuw,uw-it-aca/myuw,uw-it-aca/myuw
# Determins if the requesting device is a native hybrid app (android/ios) def is_hybrid(request): return { 'is_hybrid': 'HTTP_MYUW_HYBRID' in request.META } Update context processer to check for custom hybrid user agent.
# Determins if the requesting device is a native hybrid app (android/ios) def is_hybrid(request): return { 'is_hybrid': 'MyUW_Hybrid/1.0' in request.META['HTTP_USER_AGENT'] }
<commit_before># Determins if the requesting device is a native hybrid app (android/ios) def is_hybrid(request): return { 'is_hybrid': 'HTTP_MYUW_HYBRID' in request.META } <commit_msg>Update context processer to check for custom hybrid user agent.<commit_after>
# Determins if the requesting device is a native hybrid app (android/ios) def is_hybrid(request): return { 'is_hybrid': 'MyUW_Hybrid/1.0' in request.META['HTTP_USER_AGENT'] }
# Determins if the requesting device is a native hybrid app (android/ios) def is_hybrid(request): return { 'is_hybrid': 'HTTP_MYUW_HYBRID' in request.META } Update context processer to check for custom hybrid user agent.# Determins if the requesting device is a native hybrid app (android/ios) def i...
<commit_before># Determins if the requesting device is a native hybrid app (android/ios) def is_hybrid(request): return { 'is_hybrid': 'HTTP_MYUW_HYBRID' in request.META } <commit_msg>Update context processer to check for custom hybrid user agent.<commit_after># Determins if the requesting device is ...
1fd43c6b87db9599c73b7cb26856e99404b2e0f7
corehq/apps/data_interfaces/tests/test_xform_management.py
corehq/apps/data_interfaces/tests/test_xform_management.py
from django.contrib.sessions.middleware import SessionMiddleware from django.http import HttpRequest, QueryDict from django.test import TestCase, Client from corehq.apps.data_interfaces.views import XFormManagementView from corehq.apps.domain.shortcuts import create_domain from corehq.apps.users.models import WebUser ...
from django.contrib.sessions.middleware import SessionMiddleware from django.http import HttpRequest, QueryDict from django.test import TestCase, Client from corehq.apps.data_interfaces.views import XFormManagementView from corehq.apps.domain.shortcuts import create_domain from corehq.apps.users.models import WebUser ...
Fix ES index setup in XFormManagementTest
Fix ES index setup in XFormManagementTest
Python
bsd-3-clause
dimagi/commcare-hq,dimagi/commcare-hq,dimagi/commcare-hq,dimagi/commcare-hq,dimagi/commcare-hq
from django.contrib.sessions.middleware import SessionMiddleware from django.http import HttpRequest, QueryDict from django.test import TestCase, Client from corehq.apps.data_interfaces.views import XFormManagementView from corehq.apps.domain.shortcuts import create_domain from corehq.apps.users.models import WebUser ...
from django.contrib.sessions.middleware import SessionMiddleware from django.http import HttpRequest, QueryDict from django.test import TestCase, Client from corehq.apps.data_interfaces.views import XFormManagementView from corehq.apps.domain.shortcuts import create_domain from corehq.apps.users.models import WebUser ...
<commit_before>from django.contrib.sessions.middleware import SessionMiddleware from django.http import HttpRequest, QueryDict from django.test import TestCase, Client from corehq.apps.data_interfaces.views import XFormManagementView from corehq.apps.domain.shortcuts import create_domain from corehq.apps.users.models ...
from django.contrib.sessions.middleware import SessionMiddleware from django.http import HttpRequest, QueryDict from django.test import TestCase, Client from corehq.apps.data_interfaces.views import XFormManagementView from corehq.apps.domain.shortcuts import create_domain from corehq.apps.users.models import WebUser ...
from django.contrib.sessions.middleware import SessionMiddleware from django.http import HttpRequest, QueryDict from django.test import TestCase, Client from corehq.apps.data_interfaces.views import XFormManagementView from corehq.apps.domain.shortcuts import create_domain from corehq.apps.users.models import WebUser ...
<commit_before>from django.contrib.sessions.middleware import SessionMiddleware from django.http import HttpRequest, QueryDict from django.test import TestCase, Client from corehq.apps.data_interfaces.views import XFormManagementView from corehq.apps.domain.shortcuts import create_domain from corehq.apps.users.models ...
ebce20c36007f5665d927b860a64f45de5f128c4
uptests/web/responding.py
uptests/web/responding.py
#!/usr/bin/env python import urllib2 import argparse import portend parser = argparse.ArgumentParser() parser.add_argument('host') parser.add_argument('port', type=int) args = parser.parse_args() portend.occupied(args.host, args.port, timeout=3) root = 'http://{host}:{port}/'.format(**vars(args)) urllib2.urlopen(ro...
#!/usr/bin/env python3 import urllib.request import argparse import portend parser = argparse.ArgumentParser() parser.add_argument('host') parser.add_argument('port', type=int) args = parser.parse_args() portend.occupied(args.host, args.port, timeout=3) root = 'http://{host}:{port}/'.format(**vars(args)) urllib.req...
Update uptest for Python 3
Update uptest for Python 3
Python
mit
yougov/librarypaste,yougov/librarypaste
#!/usr/bin/env python import urllib2 import argparse import portend parser = argparse.ArgumentParser() parser.add_argument('host') parser.add_argument('port', type=int) args = parser.parse_args() portend.occupied(args.host, args.port, timeout=3) root = 'http://{host}:{port}/'.format(**vars(args)) urllib2.urlopen(ro...
#!/usr/bin/env python3 import urllib.request import argparse import portend parser = argparse.ArgumentParser() parser.add_argument('host') parser.add_argument('port', type=int) args = parser.parse_args() portend.occupied(args.host, args.port, timeout=3) root = 'http://{host}:{port}/'.format(**vars(args)) urllib.req...
<commit_before>#!/usr/bin/env python import urllib2 import argparse import portend parser = argparse.ArgumentParser() parser.add_argument('host') parser.add_argument('port', type=int) args = parser.parse_args() portend.occupied(args.host, args.port, timeout=3) root = 'http://{host}:{port}/'.format(**vars(args)) url...
#!/usr/bin/env python3 import urllib.request import argparse import portend parser = argparse.ArgumentParser() parser.add_argument('host') parser.add_argument('port', type=int) args = parser.parse_args() portend.occupied(args.host, args.port, timeout=3) root = 'http://{host}:{port}/'.format(**vars(args)) urllib.req...
#!/usr/bin/env python import urllib2 import argparse import portend parser = argparse.ArgumentParser() parser.add_argument('host') parser.add_argument('port', type=int) args = parser.parse_args() portend.occupied(args.host, args.port, timeout=3) root = 'http://{host}:{port}/'.format(**vars(args)) urllib2.urlopen(ro...
<commit_before>#!/usr/bin/env python import urllib2 import argparse import portend parser = argparse.ArgumentParser() parser.add_argument('host') parser.add_argument('port', type=int) args = parser.parse_args() portend.occupied(args.host, args.port, timeout=3) root = 'http://{host}:{port}/'.format(**vars(args)) url...
56e3f571196bdc0ab8882f56ed66192d54ff8cad
gmt/clib/tests/test_functions.py
gmt/clib/tests/test_functions.py
""" Test the wrappers for the API functions """ import os from .. import create_session, call_module def test_create_session(): "Test that create_session is called without errors" session = create_session() assert session is not None def test_call_module(): "Run a psbasemap call to see if the modul...
""" Test the wrappers for the API functions """ import os from .. import create_session, call_module def test_create_session(): "Test that create_session is called without errors" session = create_session() assert session is not None def test_call_module(): "Run a psbasemap call to see if the modul...
Remove tmp file created by test
Remove tmp file created by test
Python
bsd-3-clause
GenericMappingTools/gmt-python,GenericMappingTools/gmt-python
""" Test the wrappers for the API functions """ import os from .. import create_session, call_module def test_create_session(): "Test that create_session is called without errors" session = create_session() assert session is not None def test_call_module(): "Run a psbasemap call to see if the modul...
""" Test the wrappers for the API functions """ import os from .. import create_session, call_module def test_create_session(): "Test that create_session is called without errors" session = create_session() assert session is not None def test_call_module(): "Run a psbasemap call to see if the modul...
<commit_before>""" Test the wrappers for the API functions """ import os from .. import create_session, call_module def test_create_session(): "Test that create_session is called without errors" session = create_session() assert session is not None def test_call_module(): "Run a psbasemap call to s...
""" Test the wrappers for the API functions """ import os from .. import create_session, call_module def test_create_session(): "Test that create_session is called without errors" session = create_session() assert session is not None def test_call_module(): "Run a psbasemap call to see if the modul...
""" Test the wrappers for the API functions """ import os from .. import create_session, call_module def test_create_session(): "Test that create_session is called without errors" session = create_session() assert session is not None def test_call_module(): "Run a psbasemap call to see if the modul...
<commit_before>""" Test the wrappers for the API functions """ import os from .. import create_session, call_module def test_create_session(): "Test that create_session is called without errors" session = create_session() assert session is not None def test_call_module(): "Run a psbasemap call to s...
f0709f9e90e929daf4a918cc0376f0ba2af0e8f1
sandbox/sandbox/urls.py
sandbox/sandbox/urls.py
from django.conf import settings from django.contrib import admin from django.conf.urls.static import static from django.conf.urls import patterns, include, url from django.contrib.staticfiles.urls import staticfiles_urlpatterns from oscar.app import shop from stores.app import application as stores_app from stores.da...
from django.conf import settings from django.conf.urls.static import static from django.conf.urls import include, url from django.contrib import admin from django.contrib.staticfiles.urls import staticfiles_urlpatterns from oscar.app import application from stores.app import application as stores_app from stores.dashb...
Fix import error (oscar.app.shop doesn't exist anymore)
Fix import error (oscar.app.shop doesn't exist anymore)
Python
bsd-3-clause
django-oscar/django-oscar-stores,django-oscar/django-oscar-stores,django-oscar/django-oscar-stores
from django.conf import settings from django.contrib import admin from django.conf.urls.static import static from django.conf.urls import patterns, include, url from django.contrib.staticfiles.urls import staticfiles_urlpatterns from oscar.app import shop from stores.app import application as stores_app from stores.da...
from django.conf import settings from django.conf.urls.static import static from django.conf.urls import include, url from django.contrib import admin from django.contrib.staticfiles.urls import staticfiles_urlpatterns from oscar.app import application from stores.app import application as stores_app from stores.dashb...
<commit_before>from django.conf import settings from django.contrib import admin from django.conf.urls.static import static from django.conf.urls import patterns, include, url from django.contrib.staticfiles.urls import staticfiles_urlpatterns from oscar.app import shop from stores.app import application as stores_app...
from django.conf import settings from django.conf.urls.static import static from django.conf.urls import include, url from django.contrib import admin from django.contrib.staticfiles.urls import staticfiles_urlpatterns from oscar.app import application from stores.app import application as stores_app from stores.dashb...
from django.conf import settings from django.contrib import admin from django.conf.urls.static import static from django.conf.urls import patterns, include, url from django.contrib.staticfiles.urls import staticfiles_urlpatterns from oscar.app import shop from stores.app import application as stores_app from stores.da...
<commit_before>from django.conf import settings from django.contrib import admin from django.conf.urls.static import static from django.conf.urls import patterns, include, url from django.contrib.staticfiles.urls import staticfiles_urlpatterns from oscar.app import shop from stores.app import application as stores_app...
c4d58ef971b850d3f201903bb6091d159241112f
histomicstk/features/__init__.py
histomicstk/features/__init__.py
from .ReinhardNorm import ReinhardNorm from .ReinhardSample import ReinhardSample __all__ = ( 'FeatureExtraction' )
__all__ = ( 'FeatureExtraction' )
Resolve import issue in color_normalization_test
Resolve import issue in color_normalization_test
Python
apache-2.0
DigitalSlideArchive/HistomicsTK,DigitalSlideArchive/HistomicsTK
from .ReinhardNorm import ReinhardNorm from .ReinhardSample import ReinhardSample __all__ = ( 'FeatureExtraction' ) Resolve import issue in color_normalization_test
__all__ = ( 'FeatureExtraction' )
<commit_before>from .ReinhardNorm import ReinhardNorm from .ReinhardSample import ReinhardSample __all__ = ( 'FeatureExtraction' ) <commit_msg>Resolve import issue in color_normalization_test<commit_after>
__all__ = ( 'FeatureExtraction' )
from .ReinhardNorm import ReinhardNorm from .ReinhardSample import ReinhardSample __all__ = ( 'FeatureExtraction' ) Resolve import issue in color_normalization_test__all__ = ( 'FeatureExtraction' )
<commit_before>from .ReinhardNorm import ReinhardNorm from .ReinhardSample import ReinhardSample __all__ = ( 'FeatureExtraction' ) <commit_msg>Resolve import issue in color_normalization_test<commit_after>__all__ = ( 'FeatureExtraction' )
2156f7c0b045c5c4c3fb035485dd44854776c464
app.py
app.py
from flask import Flask, jsonify, render_template, url_for app = Flask(__name__) @app.route("/") def index(): return render_template('index.html') if __name__ == '__main__': app.run(debug=True, threaded=True, host='0.0.0.0')
from flask import Flask, jsonify, render_template, url_for, request app = Flask(__name__) @app.route("/") def index(): return render_template('index.html') @app.route("/login", methods=['POST']) def login(): params = request.get_json() print params return jsonify({'status':True}) @app.route("/signup", methods...
Add routes for login,signup and logout in backend
Add routes for login,signup and logout in backend
Python
mit
sreecodeslayer/todo-flask,sreecodeslayer/todo-flask,sreecodeslayer/todo-flask
from flask import Flask, jsonify, render_template, url_for app = Flask(__name__) @app.route("/") def index(): return render_template('index.html') if __name__ == '__main__': app.run(debug=True, threaded=True, host='0.0.0.0')Add routes for login,signup and logout in backend
from flask import Flask, jsonify, render_template, url_for, request app = Flask(__name__) @app.route("/") def index(): return render_template('index.html') @app.route("/login", methods=['POST']) def login(): params = request.get_json() print params return jsonify({'status':True}) @app.route("/signup", methods...
<commit_before>from flask import Flask, jsonify, render_template, url_for app = Flask(__name__) @app.route("/") def index(): return render_template('index.html') if __name__ == '__main__': app.run(debug=True, threaded=True, host='0.0.0.0')<commit_msg>Add routes for login,signup and logout in backend<commit_af...
from flask import Flask, jsonify, render_template, url_for, request app = Flask(__name__) @app.route("/") def index(): return render_template('index.html') @app.route("/login", methods=['POST']) def login(): params = request.get_json() print params return jsonify({'status':True}) @app.route("/signup", methods...
from flask import Flask, jsonify, render_template, url_for app = Flask(__name__) @app.route("/") def index(): return render_template('index.html') if __name__ == '__main__': app.run(debug=True, threaded=True, host='0.0.0.0')Add routes for login,signup and logout in backendfrom flask import Flask, jsonify, ren...
<commit_before>from flask import Flask, jsonify, render_template, url_for app = Flask(__name__) @app.route("/") def index(): return render_template('index.html') if __name__ == '__main__': app.run(debug=True, threaded=True, host='0.0.0.0')<commit_msg>Add routes for login,signup and logout in backend<commit_af...
c4278b404b313c4fa5fad67a5703b7368d1c4428
fileapi/tests/test_qunit.py
fileapi/tests/test_qunit.py
import os from django.conf import settings from django.contrib.staticfiles.testing import StaticLiveServerTestCase from django.test.utils import override_settings from selenium import webdriver from selenium.webdriver.common.by import By from selenium.webdriver.support import expected_conditions from selenium.webdriv...
import os from django.conf import settings from django.contrib.staticfiles import finders, storage from django.contrib.staticfiles.testing import StaticLiveServerTestCase from django.test.utils import override_settings from django.utils.functional import empty from selenium import webdriver from selenium.webdriver.co...
Clear global state/caching handled by Django so the test passes when run in the full suite.
Clear global state/caching handled by Django so the test passes when run in the full suite.
Python
bsd-2-clause
mlavin/fileapi,mlavin/fileapi,mlavin/fileapi
import os from django.conf import settings from django.contrib.staticfiles.testing import StaticLiveServerTestCase from django.test.utils import override_settings from selenium import webdriver from selenium.webdriver.common.by import By from selenium.webdriver.support import expected_conditions from selenium.webdriv...
import os from django.conf import settings from django.contrib.staticfiles import finders, storage from django.contrib.staticfiles.testing import StaticLiveServerTestCase from django.test.utils import override_settings from django.utils.functional import empty from selenium import webdriver from selenium.webdriver.co...
<commit_before>import os from django.conf import settings from django.contrib.staticfiles.testing import StaticLiveServerTestCase from django.test.utils import override_settings from selenium import webdriver from selenium.webdriver.common.by import By from selenium.webdriver.support import expected_conditions from s...
import os from django.conf import settings from django.contrib.staticfiles import finders, storage from django.contrib.staticfiles.testing import StaticLiveServerTestCase from django.test.utils import override_settings from django.utils.functional import empty from selenium import webdriver from selenium.webdriver.co...
import os from django.conf import settings from django.contrib.staticfiles.testing import StaticLiveServerTestCase from django.test.utils import override_settings from selenium import webdriver from selenium.webdriver.common.by import By from selenium.webdriver.support import expected_conditions from selenium.webdriv...
<commit_before>import os from django.conf import settings from django.contrib.staticfiles.testing import StaticLiveServerTestCase from django.test.utils import override_settings from selenium import webdriver from selenium.webdriver.common.by import By from selenium.webdriver.support import expected_conditions from s...
4bf0c58f8c8349239352d6153899fd7858df3436
faker/compat.py
faker/compat.py
# Python 2/3 compat import sys if sys.version < '3': import codecs def u(x): return codecs.unicode_escape_decode(x)[0] else: def u(x): return x
# Python 2/3 compat import sys if sys.version_info < (3, 0): import codecs def u(x): return codecs.unicode_escape_decode(x)[0] else: def u(x): return x
Change Python version check to use sys.version_info
Change Python version check to use sys.version_info
Python
mit
deepthawtz/faker
# Python 2/3 compat import sys if sys.version < '3': import codecs def u(x): return codecs.unicode_escape_decode(x)[0] else: def u(x): return x Change Python version check to use sys.version_info
# Python 2/3 compat import sys if sys.version_info < (3, 0): import codecs def u(x): return codecs.unicode_escape_decode(x)[0] else: def u(x): return x
<commit_before># Python 2/3 compat import sys if sys.version < '3': import codecs def u(x): return codecs.unicode_escape_decode(x)[0] else: def u(x): return x <commit_msg>Change Python version check to use sys.version_info<commit_after>
# Python 2/3 compat import sys if sys.version_info < (3, 0): import codecs def u(x): return codecs.unicode_escape_decode(x)[0] else: def u(x): return x
# Python 2/3 compat import sys if sys.version < '3': import codecs def u(x): return codecs.unicode_escape_decode(x)[0] else: def u(x): return x Change Python version check to use sys.version_info# Python 2/3 compat import sys if sys.version_info < (3, 0): import codecs def u(x): ...
<commit_before># Python 2/3 compat import sys if sys.version < '3': import codecs def u(x): return codecs.unicode_escape_decode(x)[0] else: def u(x): return x <commit_msg>Change Python version check to use sys.version_info<commit_after># Python 2/3 compat import sys if sys.version_info < (3,...
26b978206d37c69b053fd2f66fdfd1a3face2c31
indico/modules/networks/views.py
indico/modules/networks/views.py
# This file is part of Indico. # Copyright (C) 2002 - 2016 European Organization for Nuclear Research (CERN). # # Indico 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 (a...
# This file is part of Indico. # Copyright (C) 2002 - 2016 European Organization for Nuclear Research (CERN). # # Indico 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 (a...
Fix highlighting of "IP Networks" menu entry
Fix highlighting of "IP Networks" menu entry
Python
mit
OmeGak/indico,mic4ael/indico,pferreir/indico,pferreir/indico,mic4ael/indico,DirkHoffmann/indico,mvidalgarcia/indico,indico/indico,mvidalgarcia/indico,ThiefMaster/indico,mic4ael/indico,mvidalgarcia/indico,indico/indico,mic4ael/indico,indico/indico,ThiefMaster/indico,DirkHoffmann/indico,OmeGak/indico,OmeGak/indico,DirkHo...
# This file is part of Indico. # Copyright (C) 2002 - 2016 European Organization for Nuclear Research (CERN). # # Indico 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 (a...
# This file is part of Indico. # Copyright (C) 2002 - 2016 European Organization for Nuclear Research (CERN). # # Indico 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 (a...
<commit_before># This file is part of Indico. # Copyright (C) 2002 - 2016 European Organization for Nuclear Research (CERN). # # Indico 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 #...
# This file is part of Indico. # Copyright (C) 2002 - 2016 European Organization for Nuclear Research (CERN). # # Indico 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 (a...
# This file is part of Indico. # Copyright (C) 2002 - 2016 European Organization for Nuclear Research (CERN). # # Indico 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 (a...
<commit_before># This file is part of Indico. # Copyright (C) 2002 - 2016 European Organization for Nuclear Research (CERN). # # Indico 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 #...
4720809f31c559e14ca69f6205766265d1095f44
vk/__init__.py
vk/__init__.py
# coding=utf-8 from .auth import * from .groups import * from .messages import * from .users import *
# coding=utf-8 from .auth import * from .error import VKError from .groups import * from .messages import * from .users import *
Use `vk.VKError` instead of `vk.error.VKError`
Use `vk.VKError` instead of `vk.error.VKError`
Python
mit
sgaynetdinov/py-vkontakte
# coding=utf-8 from .auth import * from .groups import * from .messages import * from .users import * Use `vk.VKError` instead of `vk.error.VKError`
# coding=utf-8 from .auth import * from .error import VKError from .groups import * from .messages import * from .users import *
<commit_before># coding=utf-8 from .auth import * from .groups import * from .messages import * from .users import * <commit_msg>Use `vk.VKError` instead of `vk.error.VKError`<commit_after>
# coding=utf-8 from .auth import * from .error import VKError from .groups import * from .messages import * from .users import *
# coding=utf-8 from .auth import * from .groups import * from .messages import * from .users import * Use `vk.VKError` instead of `vk.error.VKError`# coding=utf-8 from .auth import * from .error import VKError from .groups import * from .messages import * from .users import *
<commit_before># coding=utf-8 from .auth import * from .groups import * from .messages import * from .users import * <commit_msg>Use `vk.VKError` instead of `vk.error.VKError`<commit_after># coding=utf-8 from .auth import * from .error import VKError from .groups import * from .messages import * from .users import *
e57bd1eeb551cf05a220b18ec1e3fafa311d9d78
MetaTools/buildChangeLog.py
MetaTools/buildChangeLog.py
#! /usr/bin/env python import os, sys fontToolsDir = os.path.dirname(os.path.dirname(os.path.normpath( os.path.join(os.getcwd(), sys.argv[0])))) os.chdir(fontToolsDir) os.system("svn2cl -o Doc/ChangeLog https://fonttools.svn.sourceforge.net/svnroot/fonttools/trunk") print "done."
#! /usr/bin/env python import os, sys fontToolsDir = os.path.dirname(os.path.dirname(os.path.normpath( os.path.join(os.getcwd(), sys.argv[0])))) os.chdir(fontToolsDir) os.system("svn2cl -o Doc/ChangeLog https://svn.code.sf.net/p/fonttools/code/trunk") print "done."
Fix the location of the SVN repository
Fix the location of the SVN repository git-svn-id: 05b73559aeb8bace4cf49b5ea964569f1305eff8@618 4cde692c-a291-49d1-8350-778aa11640f8
Python
mit
fonttools/fonttools,googlefonts/fonttools
#! /usr/bin/env python import os, sys fontToolsDir = os.path.dirname(os.path.dirname(os.path.normpath( os.path.join(os.getcwd(), sys.argv[0])))) os.chdir(fontToolsDir) os.system("svn2cl -o Doc/ChangeLog https://fonttools.svn.sourceforge.net/svnroot/fonttools/trunk") print "done." Fix the location of the SVN reposi...
#! /usr/bin/env python import os, sys fontToolsDir = os.path.dirname(os.path.dirname(os.path.normpath( os.path.join(os.getcwd(), sys.argv[0])))) os.chdir(fontToolsDir) os.system("svn2cl -o Doc/ChangeLog https://svn.code.sf.net/p/fonttools/code/trunk") print "done."
<commit_before>#! /usr/bin/env python import os, sys fontToolsDir = os.path.dirname(os.path.dirname(os.path.normpath( os.path.join(os.getcwd(), sys.argv[0])))) os.chdir(fontToolsDir) os.system("svn2cl -o Doc/ChangeLog https://fonttools.svn.sourceforge.net/svnroot/fonttools/trunk") print "done." <commit_msg>Fix the...
#! /usr/bin/env python import os, sys fontToolsDir = os.path.dirname(os.path.dirname(os.path.normpath( os.path.join(os.getcwd(), sys.argv[0])))) os.chdir(fontToolsDir) os.system("svn2cl -o Doc/ChangeLog https://svn.code.sf.net/p/fonttools/code/trunk") print "done."
#! /usr/bin/env python import os, sys fontToolsDir = os.path.dirname(os.path.dirname(os.path.normpath( os.path.join(os.getcwd(), sys.argv[0])))) os.chdir(fontToolsDir) os.system("svn2cl -o Doc/ChangeLog https://fonttools.svn.sourceforge.net/svnroot/fonttools/trunk") print "done." Fix the location of the SVN reposi...
<commit_before>#! /usr/bin/env python import os, sys fontToolsDir = os.path.dirname(os.path.dirname(os.path.normpath( os.path.join(os.getcwd(), sys.argv[0])))) os.chdir(fontToolsDir) os.system("svn2cl -o Doc/ChangeLog https://fonttools.svn.sourceforge.net/svnroot/fonttools/trunk") print "done." <commit_msg>Fix the...
1e8b0c6d2255c38497db94a8f6e11ee7cfd2a3ec
tests/speed.py
tests/speed.py
#!/usr/bin/env python from fastcomp import compare import random import string def randomstr(minlen=5, maxlen=7): charset = '01' length = random.randint(minlen, maxlen) return ''.join(random.choice(charset) for i in range(length)) if __name__ == "__main__": import timeit # Set up conditions ...
#!/usr/bin/env python from fastcomp import compare import random import string def randomstr(minlen=5, maxlen=8): charset = '01' length = random.randint(minlen, maxlen) return ''.join(random.choice(charset) for i in range(length)) if __name__ == "__main__": import timeit # Set up conditions ...
Increment the max length of random strings.
Increment the max length of random strings.
Python
mit
fujimotos/fastcomp
#!/usr/bin/env python from fastcomp import compare import random import string def randomstr(minlen=5, maxlen=7): charset = '01' length = random.randint(minlen, maxlen) return ''.join(random.choice(charset) for i in range(length)) if __name__ == "__main__": import timeit # Set up conditions ...
#!/usr/bin/env python from fastcomp import compare import random import string def randomstr(minlen=5, maxlen=8): charset = '01' length = random.randint(minlen, maxlen) return ''.join(random.choice(charset) for i in range(length)) if __name__ == "__main__": import timeit # Set up conditions ...
<commit_before>#!/usr/bin/env python from fastcomp import compare import random import string def randomstr(minlen=5, maxlen=7): charset = '01' length = random.randint(minlen, maxlen) return ''.join(random.choice(charset) for i in range(length)) if __name__ == "__main__": import timeit # Set up ...
#!/usr/bin/env python from fastcomp import compare import random import string def randomstr(minlen=5, maxlen=8): charset = '01' length = random.randint(minlen, maxlen) return ''.join(random.choice(charset) for i in range(length)) if __name__ == "__main__": import timeit # Set up conditions ...
#!/usr/bin/env python from fastcomp import compare import random import string def randomstr(minlen=5, maxlen=7): charset = '01' length = random.randint(minlen, maxlen) return ''.join(random.choice(charset) for i in range(length)) if __name__ == "__main__": import timeit # Set up conditions ...
<commit_before>#!/usr/bin/env python from fastcomp import compare import random import string def randomstr(minlen=5, maxlen=7): charset = '01' length = random.randint(minlen, maxlen) return ''.join(random.choice(charset) for i in range(length)) if __name__ == "__main__": import timeit # Set up ...
4c52e331052a2b5f11ce56b0a6c1b6e3d2f18cdf
partner_communication_switzerland/controllers/b2s_image.py
partner_communication_switzerland/controllers/b2s_image.py
# -*- coding: utf-8 -*- ############################################################################## # # Copyright (C) 2018 Compassion CH (http://www.compassion.ch) # Releasing children from poverty in Jesus' name # @author: Emanuel Cino <ecino@compassion.ch> # # The licence is in the file __manifest__.py...
# -*- coding: utf-8 -*- ############################################################################## # # Copyright (C) 2018 Compassion CH (http://www.compassion.ch) # Releasing children from poverty in Jesus' name # @author: Emanuel Cino <ecino@compassion.ch> # # The licence is in the file __manifest__.py...
Revert bad renaming of route url parameter
Revert bad renaming of route url parameter
Python
agpl-3.0
CompassionCH/compassion-switzerland,eicher31/compassion-switzerland,ecino/compassion-switzerland,eicher31/compassion-switzerland,ecino/compassion-switzerland,CompassionCH/compassion-switzerland,CompassionCH/compassion-switzerland,ecino/compassion-switzerland,eicher31/compassion-switzerland
# -*- coding: utf-8 -*- ############################################################################## # # Copyright (C) 2018 Compassion CH (http://www.compassion.ch) # Releasing children from poverty in Jesus' name # @author: Emanuel Cino <ecino@compassion.ch> # # The licence is in the file __manifest__.py...
# -*- coding: utf-8 -*- ############################################################################## # # Copyright (C) 2018 Compassion CH (http://www.compassion.ch) # Releasing children from poverty in Jesus' name # @author: Emanuel Cino <ecino@compassion.ch> # # The licence is in the file __manifest__.py...
<commit_before># -*- coding: utf-8 -*- ############################################################################## # # Copyright (C) 2018 Compassion CH (http://www.compassion.ch) # Releasing children from poverty in Jesus' name # @author: Emanuel Cino <ecino@compassion.ch> # # The licence is in the file ...
# -*- coding: utf-8 -*- ############################################################################## # # Copyright (C) 2018 Compassion CH (http://www.compassion.ch) # Releasing children from poverty in Jesus' name # @author: Emanuel Cino <ecino@compassion.ch> # # The licence is in the file __manifest__.py...
# -*- coding: utf-8 -*- ############################################################################## # # Copyright (C) 2018 Compassion CH (http://www.compassion.ch) # Releasing children from poverty in Jesus' name # @author: Emanuel Cino <ecino@compassion.ch> # # The licence is in the file __manifest__.py...
<commit_before># -*- coding: utf-8 -*- ############################################################################## # # Copyright (C) 2018 Compassion CH (http://www.compassion.ch) # Releasing children from poverty in Jesus' name # @author: Emanuel Cino <ecino@compassion.ch> # # The licence is in the file ...
445b9637300dc8dc25c2335c6f650de6c07bfb41
account_payment_partner/wizard/payment_order_create.py
account_payment_partner/wizard/payment_order_create.py
# -*- encoding: utf-8 -*- ############################################################################## # # Account Payment Partner module for OpenERP # Copyright (C) 2014 Akretion (http://www.akretion.com) # @author Alexis de Lattre <alexis.delattre@akretion.com> # # This program is free software: you can...
# -*- encoding: utf-8 -*- ############################################################################## # # Account Payment Partner module for OpenERP # Copyright (C) 2014 Akretion (http://www.akretion.com) # @author Alexis de Lattre <alexis.delattre@akretion.com> # # This program is free software: you can...
Return res in inherit (even if res is empty in this case)
Return res in inherit (even if res is empty in this case)
Python
agpl-3.0
rlizana/bank-payment,damdam-s/bank-payment,CompassionCH/bank-payment,acsone/bank-payment,sergio-teruel/bank-payment,David-Amaro/bank-payment,sergiocorato/bank-payment,hbrunn/bank-payment,incaser/bank-payment,rlizana/bank-payment,CompassionCH/bank-payment,ndtran/bank-payment,ndtran/bank-payment,damdam-s/bank-payment,ser...
# -*- encoding: utf-8 -*- ############################################################################## # # Account Payment Partner module for OpenERP # Copyright (C) 2014 Akretion (http://www.akretion.com) # @author Alexis de Lattre <alexis.delattre@akretion.com> # # This program is free software: you can...
# -*- encoding: utf-8 -*- ############################################################################## # # Account Payment Partner module for OpenERP # Copyright (C) 2014 Akretion (http://www.akretion.com) # @author Alexis de Lattre <alexis.delattre@akretion.com> # # This program is free software: you can...
<commit_before># -*- encoding: utf-8 -*- ############################################################################## # # Account Payment Partner module for OpenERP # Copyright (C) 2014 Akretion (http://www.akretion.com) # @author Alexis de Lattre <alexis.delattre@akretion.com> # # This program is free so...
# -*- encoding: utf-8 -*- ############################################################################## # # Account Payment Partner module for OpenERP # Copyright (C) 2014 Akretion (http://www.akretion.com) # @author Alexis de Lattre <alexis.delattre@akretion.com> # # This program is free software: you can...
# -*- encoding: utf-8 -*- ############################################################################## # # Account Payment Partner module for OpenERP # Copyright (C) 2014 Akretion (http://www.akretion.com) # @author Alexis de Lattre <alexis.delattre@akretion.com> # # This program is free software: you can...
<commit_before># -*- encoding: utf-8 -*- ############################################################################## # # Account Payment Partner module for OpenERP # Copyright (C) 2014 Akretion (http://www.akretion.com) # @author Alexis de Lattre <alexis.delattre@akretion.com> # # This program is free so...
5a680d25a5e5a697440f17639d1a0617b903aa06
opps/__init__.py
opps/__init__.py
#!/usr/bin/env python # -*- coding: utf-8 -*- VERSION = (0, 0, 1) __version__ = ".".join(map(str, VERSION)) __status__ = "Development" __description__ = u"Opps CMS websites magazines and high-traffic" __author__ = u"Thiago Avelino" __credits__ = [] __email__ = u"opps-developers@googlegroups.com" __license__ = u"BSD"...
#!/usr/bin/env python # -*- coding: utf-8 -*- from django.conf import settings VERSION = (0, 0, 1) __version__ = ".".join(map(str, VERSION)) __status__ = "Development" __description__ = u"Opps CMS websites magazines and high-traffic" __author__ = u"Thiago Avelino" __credits__ = [] __email__ = u"opps-developers@googl...
Add installed app on opps init
Add installed app on opps init
Python
mit
jeanmask/opps,jeanmask/opps,opps/opps,opps/opps,jeanmask/opps,williamroot/opps,YACOWS/opps,opps/opps,YACOWS/opps,williamroot/opps,YACOWS/opps,williamroot/opps,YACOWS/opps,williamroot/opps,opps/opps,jeanmask/opps
#!/usr/bin/env python # -*- coding: utf-8 -*- VERSION = (0, 0, 1) __version__ = ".".join(map(str, VERSION)) __status__ = "Development" __description__ = u"Opps CMS websites magazines and high-traffic" __author__ = u"Thiago Avelino" __credits__ = [] __email__ = u"opps-developers@googlegroups.com" __license__ = u"BSD"...
#!/usr/bin/env python # -*- coding: utf-8 -*- from django.conf import settings VERSION = (0, 0, 1) __version__ = ".".join(map(str, VERSION)) __status__ = "Development" __description__ = u"Opps CMS websites magazines and high-traffic" __author__ = u"Thiago Avelino" __credits__ = [] __email__ = u"opps-developers@googl...
<commit_before>#!/usr/bin/env python # -*- coding: utf-8 -*- VERSION = (0, 0, 1) __version__ = ".".join(map(str, VERSION)) __status__ = "Development" __description__ = u"Opps CMS websites magazines and high-traffic" __author__ = u"Thiago Avelino" __credits__ = [] __email__ = u"opps-developers@googlegroups.com" __lic...
#!/usr/bin/env python # -*- coding: utf-8 -*- from django.conf import settings VERSION = (0, 0, 1) __version__ = ".".join(map(str, VERSION)) __status__ = "Development" __description__ = u"Opps CMS websites magazines and high-traffic" __author__ = u"Thiago Avelino" __credits__ = [] __email__ = u"opps-developers@googl...
#!/usr/bin/env python # -*- coding: utf-8 -*- VERSION = (0, 0, 1) __version__ = ".".join(map(str, VERSION)) __status__ = "Development" __description__ = u"Opps CMS websites magazines and high-traffic" __author__ = u"Thiago Avelino" __credits__ = [] __email__ = u"opps-developers@googlegroups.com" __license__ = u"BSD"...
<commit_before>#!/usr/bin/env python # -*- coding: utf-8 -*- VERSION = (0, 0, 1) __version__ = ".".join(map(str, VERSION)) __status__ = "Development" __description__ = u"Opps CMS websites magazines and high-traffic" __author__ = u"Thiago Avelino" __credits__ = [] __email__ = u"opps-developers@googlegroups.com" __lic...
02f35718c6f6c3b18851b94e232031738629684e
promgen/sender/__init__.py
promgen/sender/__init__.py
import logging from promgen.models import Project, Service logger = logging.getLogger(__name__) class SenderBase(object): def send(self, data): for alert in data['alerts']: if 'project' in alert['labels']: sent = 0 for project in Project.objects.filter(name=al...
import logging from promgen.models import Project, Service logger = logging.getLogger(__name__) class SenderBase(object): def send(self, data): sent = 0 for alert in data['alerts']: if 'project' in alert['labels']: logger.debug('Checking for projects') ...
Fix send count and add debug logging
Fix send count and add debug logging
Python
mit
kfdm/promgen,kfdm/promgen,kfdm/promgen,kfdm/promgen
import logging from promgen.models import Project, Service logger = logging.getLogger(__name__) class SenderBase(object): def send(self, data): for alert in data['alerts']: if 'project' in alert['labels']: sent = 0 for project in Project.objects.filter(name=al...
import logging from promgen.models import Project, Service logger = logging.getLogger(__name__) class SenderBase(object): def send(self, data): sent = 0 for alert in data['alerts']: if 'project' in alert['labels']: logger.debug('Checking for projects') ...
<commit_before>import logging from promgen.models import Project, Service logger = logging.getLogger(__name__) class SenderBase(object): def send(self, data): for alert in data['alerts']: if 'project' in alert['labels']: sent = 0 for project in Project.objects...
import logging from promgen.models import Project, Service logger = logging.getLogger(__name__) class SenderBase(object): def send(self, data): sent = 0 for alert in data['alerts']: if 'project' in alert['labels']: logger.debug('Checking for projects') ...
import logging from promgen.models import Project, Service logger = logging.getLogger(__name__) class SenderBase(object): def send(self, data): for alert in data['alerts']: if 'project' in alert['labels']: sent = 0 for project in Project.objects.filter(name=al...
<commit_before>import logging from promgen.models import Project, Service logger = logging.getLogger(__name__) class SenderBase(object): def send(self, data): for alert in data['alerts']: if 'project' in alert['labels']: sent = 0 for project in Project.objects...
991f37a5946f2fdf821ab7de367f3ced7b68a635
segmentation/segment_pool/signals.py
segmentation/segment_pool/signals.py
# -*- coding: utf-8 -*- from django.db.models.signals import post_save, pre_delete from django.dispatch import receiver from django.core.exceptions import ImproperlyConfigured from cms.exceptions import PluginAlreadyRegistered, PluginNotRegistered from .segment_pool import segment_pool @receiver(post_save) def regi...
# -*- coding: utf-8 -*- from django.db.models.signals import post_save, pre_delete from django.dispatch import receiver from django.core.exceptions import ImproperlyConfigured from cms.exceptions import PluginAlreadyRegistered, PluginNotRegistered from .segment_pool import segment_pool from ..models import SegmentBas...
Use a broad-brush filter for the signal handlers
Use a broad-brush filter for the signal handlers
Python
bsd-3-clause
aldryn/aldryn-segmentation,aldryn/aldryn-segmentation
# -*- coding: utf-8 -*- from django.db.models.signals import post_save, pre_delete from django.dispatch import receiver from django.core.exceptions import ImproperlyConfigured from cms.exceptions import PluginAlreadyRegistered, PluginNotRegistered from .segment_pool import segment_pool @receiver(post_save) def regi...
# -*- coding: utf-8 -*- from django.db.models.signals import post_save, pre_delete from django.dispatch import receiver from django.core.exceptions import ImproperlyConfigured from cms.exceptions import PluginAlreadyRegistered, PluginNotRegistered from .segment_pool import segment_pool from ..models import SegmentBas...
<commit_before># -*- coding: utf-8 -*- from django.db.models.signals import post_save, pre_delete from django.dispatch import receiver from django.core.exceptions import ImproperlyConfigured from cms.exceptions import PluginAlreadyRegistered, PluginNotRegistered from .segment_pool import segment_pool @receiver(post...
# -*- coding: utf-8 -*- from django.db.models.signals import post_save, pre_delete from django.dispatch import receiver from django.core.exceptions import ImproperlyConfigured from cms.exceptions import PluginAlreadyRegistered, PluginNotRegistered from .segment_pool import segment_pool from ..models import SegmentBas...
# -*- coding: utf-8 -*- from django.db.models.signals import post_save, pre_delete from django.dispatch import receiver from django.core.exceptions import ImproperlyConfigured from cms.exceptions import PluginAlreadyRegistered, PluginNotRegistered from .segment_pool import segment_pool @receiver(post_save) def regi...
<commit_before># -*- coding: utf-8 -*- from django.db.models.signals import post_save, pre_delete from django.dispatch import receiver from django.core.exceptions import ImproperlyConfigured from cms.exceptions import PluginAlreadyRegistered, PluginNotRegistered from .segment_pool import segment_pool @receiver(post...
5ad09d329b331c4c50a192a76b1c450e6340f508
distarray/core/tests/test_distributed_array_protocol.py
distarray/core/tests/test_distributed_array_protocol.py
import unittest import distarray as da from distarray.mpi.mpibase import create_comm_of_size, InvalidCommSizeError class TestDistributedArrayProtocol(unittest.TestCase): def setUp(self): try: comm = create_comm_of_size(4) except InvalidCommSizeError: raise unittest.SkipTes...
import unittest import distarray as da from distarray.mpi.mpibase import create_comm_of_size, InvalidCommSizeError class TestDistributedArrayProtocol(unittest.TestCase): def setUp(self): try: comm = create_comm_of_size(4) except InvalidCommSizeError: raise unittest.SkipTes...
Test keys and values separately.
Test keys and values separately.
Python
bsd-3-clause
RaoUmer/distarray,enthought/distarray,RaoUmer/distarray,enthought/distarray
import unittest import distarray as da from distarray.mpi.mpibase import create_comm_of_size, InvalidCommSizeError class TestDistributedArrayProtocol(unittest.TestCase): def setUp(self): try: comm = create_comm_of_size(4) except InvalidCommSizeError: raise unittest.SkipTes...
import unittest import distarray as da from distarray.mpi.mpibase import create_comm_of_size, InvalidCommSizeError class TestDistributedArrayProtocol(unittest.TestCase): def setUp(self): try: comm = create_comm_of_size(4) except InvalidCommSizeError: raise unittest.SkipTes...
<commit_before>import unittest import distarray as da from distarray.mpi.mpibase import create_comm_of_size, InvalidCommSizeError class TestDistributedArrayProtocol(unittest.TestCase): def setUp(self): try: comm = create_comm_of_size(4) except InvalidCommSizeError: raise u...
import unittest import distarray as da from distarray.mpi.mpibase import create_comm_of_size, InvalidCommSizeError class TestDistributedArrayProtocol(unittest.TestCase): def setUp(self): try: comm = create_comm_of_size(4) except InvalidCommSizeError: raise unittest.SkipTes...
import unittest import distarray as da from distarray.mpi.mpibase import create_comm_of_size, InvalidCommSizeError class TestDistributedArrayProtocol(unittest.TestCase): def setUp(self): try: comm = create_comm_of_size(4) except InvalidCommSizeError: raise unittest.SkipTes...
<commit_before>import unittest import distarray as da from distarray.mpi.mpibase import create_comm_of_size, InvalidCommSizeError class TestDistributedArrayProtocol(unittest.TestCase): def setUp(self): try: comm = create_comm_of_size(4) except InvalidCommSizeError: raise u...
44ef488bbe25576ba25ca5855b726fa16fffa8bc
fireplace/cards/blackrock/collectible.py
fireplace/cards/blackrock/collectible.py
from ..utils import * ## # Spells # Dragon's Breath class DragonsBreath: action = [Hit(TARGET, 4)] def cost(self, value): return value - self.game.minionsKilledThisTurn
from ..utils import * ## # Minions # Flamewaker class BRM_002: events = [ OWN_SPELL_PLAY.after(Hit(RANDOM_ENEMY_MINION, 1) * 2) ] ## # Spells # Dragon's Breath class BRM_003: action = [Hit(TARGET, 4)] def cost(self, value): return value - self.game.minionsKilledThisTurn
Implement Flamewaker and correct Dragon's Breath id
Implement Flamewaker and correct Dragon's Breath id
Python
agpl-3.0
jleclanche/fireplace,Ragowit/fireplace,butozerca/fireplace,amw2104/fireplace,Ragowit/fireplace,oftc-ftw/fireplace,Meerkov/fireplace,smallnamespace/fireplace,amw2104/fireplace,liujimj/fireplace,oftc-ftw/fireplace,beheh/fireplace,smallnamespace/fireplace,liujimj/fireplace,butozerca/fireplace,NightKev/fireplace,Meerkov/fi...
from ..utils import * ## # Spells # Dragon's Breath class DragonsBreath: action = [Hit(TARGET, 4)] def cost(self, value): return value - self.game.minionsKilledThisTurn Implement Flamewaker and correct Dragon's Breath id
from ..utils import * ## # Minions # Flamewaker class BRM_002: events = [ OWN_SPELL_PLAY.after(Hit(RANDOM_ENEMY_MINION, 1) * 2) ] ## # Spells # Dragon's Breath class BRM_003: action = [Hit(TARGET, 4)] def cost(self, value): return value - self.game.minionsKilledThisTurn
<commit_before>from ..utils import * ## # Spells # Dragon's Breath class DragonsBreath: action = [Hit(TARGET, 4)] def cost(self, value): return value - self.game.minionsKilledThisTurn <commit_msg>Implement Flamewaker and correct Dragon's Breath id<commit_after>
from ..utils import * ## # Minions # Flamewaker class BRM_002: events = [ OWN_SPELL_PLAY.after(Hit(RANDOM_ENEMY_MINION, 1) * 2) ] ## # Spells # Dragon's Breath class BRM_003: action = [Hit(TARGET, 4)] def cost(self, value): return value - self.game.minionsKilledThisTurn
from ..utils import * ## # Spells # Dragon's Breath class DragonsBreath: action = [Hit(TARGET, 4)] def cost(self, value): return value - self.game.minionsKilledThisTurn Implement Flamewaker and correct Dragon's Breath idfrom ..utils import * ## # Minions # Flamewaker class BRM_002: events = [ OWN_SPELL_PL...
<commit_before>from ..utils import * ## # Spells # Dragon's Breath class DragonsBreath: action = [Hit(TARGET, 4)] def cost(self, value): return value - self.game.minionsKilledThisTurn <commit_msg>Implement Flamewaker and correct Dragon's Breath id<commit_after>from ..utils import * ## # Minions # Flamewaker ...
f9ffd5021f8af96df503c8a2743e97c8f1a17be0
infupy/backends/common.py
infupy/backends/common.py
def printerr(msg, e=''): print(msg.format(e), file=sys.stderr) class CommunicationError(Exception): def __str__(self): return "Communication error: {}".format(self.args) class CommandError(Exception): def __str__(self): return "Command error: {}".format(self.args) class Syringe(): _ev...
def printerr(msg, e=''): msg = "Backend: " + str(msg) print(msg.format(e), file=sys.stderr) class CommunicationError(Exception): def __str__(self): return "Communication error: {}".format(self.args) class CommandError(Exception): def __str__(self): return "Command error: {}".format(sel...
Add marker to indicate backend error
Add marker to indicate backend error
Python
isc
jaj42/infupy
def printerr(msg, e=''): print(msg.format(e), file=sys.stderr) class CommunicationError(Exception): def __str__(self): return "Communication error: {}".format(self.args) class CommandError(Exception): def __str__(self): return "Command error: {}".format(self.args) class Syringe(): _ev...
def printerr(msg, e=''): msg = "Backend: " + str(msg) print(msg.format(e), file=sys.stderr) class CommunicationError(Exception): def __str__(self): return "Communication error: {}".format(self.args) class CommandError(Exception): def __str__(self): return "Command error: {}".format(sel...
<commit_before>def printerr(msg, e=''): print(msg.format(e), file=sys.stderr) class CommunicationError(Exception): def __str__(self): return "Communication error: {}".format(self.args) class CommandError(Exception): def __str__(self): return "Command error: {}".format(self.args) class Syr...
def printerr(msg, e=''): msg = "Backend: " + str(msg) print(msg.format(e), file=sys.stderr) class CommunicationError(Exception): def __str__(self): return "Communication error: {}".format(self.args) class CommandError(Exception): def __str__(self): return "Command error: {}".format(sel...
def printerr(msg, e=''): print(msg.format(e), file=sys.stderr) class CommunicationError(Exception): def __str__(self): return "Communication error: {}".format(self.args) class CommandError(Exception): def __str__(self): return "Command error: {}".format(self.args) class Syringe(): _ev...
<commit_before>def printerr(msg, e=''): print(msg.format(e), file=sys.stderr) class CommunicationError(Exception): def __str__(self): return "Communication error: {}".format(self.args) class CommandError(Exception): def __str__(self): return "Command error: {}".format(self.args) class Syr...
55c24a4e47dfd6eab1dcceef8989a2a326322a14
osmABTS/trips.py
osmABTS/trips.py
""" Trip generation =============== """
""" Trip generation =============== This module can be roughtly devided into two parts, the trip description and trip generation. The trip description part contains mostly class definitions that can be used to describe kinds of trips, while the trip generation contains the main driver function to generate a large list...
Implement the trip description classes
Implement the trip description classes And a default list for trips has also been written.
Python
mit
tschijnmo/osmABTS
""" Trip generation =============== """ Implement the trip description classes And a default list for trips has also been written.
""" Trip generation =============== This module can be roughtly devided into two parts, the trip description and trip generation. The trip description part contains mostly class definitions that can be used to describe kinds of trips, while the trip generation contains the main driver function to generate a large list...
<commit_before>""" Trip generation =============== """ <commit_msg>Implement the trip description classes And a default list for trips has also been written.<commit_after>
""" Trip generation =============== This module can be roughtly devided into two parts, the trip description and trip generation. The trip description part contains mostly class definitions that can be used to describe kinds of trips, while the trip generation contains the main driver function to generate a large list...
""" Trip generation =============== """ Implement the trip description classes And a default list for trips has also been written.""" Trip generation =============== This module can be roughtly devided into two parts, the trip description and trip generation. The trip description part contains mostly class definiti...
<commit_before>""" Trip generation =============== """ <commit_msg>Implement the trip description classes And a default list for trips has also been written.<commit_after>""" Trip generation =============== This module can be roughtly devided into two parts, the trip description and trip generation. The trip descri...
dc8099d10028266411c928befe9c690fe75ff391
tools/bundle.py
tools/bundle.py
#!/usr/bin/env python import os import sys import glob import getopt def file_list(path): files = [] if os.path.isfile(path): return [path] for f in os.listdir(path): new_dir = os.path.join(path, f) if os.path.isdir(new_dir) and not os.path.islink(new_dir): files.extend(file_list(new_dir)) ...
#!/usr/bin/env python import os import sys import glob import getopt def file_list(path): files = [] if os.path.isfile(path): return [path] for f in os.listdir(path): new_dir = path + '/' + f if os.path.isdir(new_dir) and not os.path.islink(new_dir): files.extend(file_list(new_dir)) else...
Stop using os.path.join, because Visual Studio can actually handle forward slash style paths, and the os.path method was creating mixed \\ and / style paths, b0rking everything.
Stop using os.path.join, because Visual Studio can actually handle forward slash style paths, and the os.path method was creating mixed \\ and / style paths, b0rking everything.
Python
apache-2.0
cp16net/virgo-base,AlphaStaxLLC/rackspace-monitoring-agent,cp16net/virgo-base,christopherjwang/rackspace-monitoring-agent,kaustavha/rackspace-monitoring-agent,christopherjwang/rackspace-monitoring-agent,cp16net/virgo-base,virgo-agent-toolkit/rackspace-monitoring-agent,kaustavha/rackspace-monitoring-agent,AlphaStaxLLC/r...
#!/usr/bin/env python import os import sys import glob import getopt def file_list(path): files = [] if os.path.isfile(path): return [path] for f in os.listdir(path): new_dir = os.path.join(path, f) if os.path.isdir(new_dir) and not os.path.islink(new_dir): files.extend(file_list(new_dir)) ...
#!/usr/bin/env python import os import sys import glob import getopt def file_list(path): files = [] if os.path.isfile(path): return [path] for f in os.listdir(path): new_dir = path + '/' + f if os.path.isdir(new_dir) and not os.path.islink(new_dir): files.extend(file_list(new_dir)) else...
<commit_before>#!/usr/bin/env python import os import sys import glob import getopt def file_list(path): files = [] if os.path.isfile(path): return [path] for f in os.listdir(path): new_dir = os.path.join(path, f) if os.path.isdir(new_dir) and not os.path.islink(new_dir): files.extend(file_l...
#!/usr/bin/env python import os import sys import glob import getopt def file_list(path): files = [] if os.path.isfile(path): return [path] for f in os.listdir(path): new_dir = path + '/' + f if os.path.isdir(new_dir) and not os.path.islink(new_dir): files.extend(file_list(new_dir)) else...
#!/usr/bin/env python import os import sys import glob import getopt def file_list(path): files = [] if os.path.isfile(path): return [path] for f in os.listdir(path): new_dir = os.path.join(path, f) if os.path.isdir(new_dir) and not os.path.islink(new_dir): files.extend(file_list(new_dir)) ...
<commit_before>#!/usr/bin/env python import os import sys import glob import getopt def file_list(path): files = [] if os.path.isfile(path): return [path] for f in os.listdir(path): new_dir = os.path.join(path, f) if os.path.isdir(new_dir) and not os.path.islink(new_dir): files.extend(file_l...
cb2a9032e1ffef5020b24a28079ecc127cc178b7
comparch/__init__.py
comparch/__init__.py
from .implicit import implicit from .registry import ClassRegistry, Registry from .lookup import Lookup, CachedLookup
from .implicit import implicit from .registry import ClassRegistry, Registry from .lookup import Lookup, CachedLookup from .interface import Interface
Include Interface in public API.
Include Interface in public API.
Python
bsd-3-clause
taschini/reg,morepath/reg
from .implicit import implicit from .registry import ClassRegistry, Registry from .lookup import Lookup, CachedLookup Include Interface in public API.
from .implicit import implicit from .registry import ClassRegistry, Registry from .lookup import Lookup, CachedLookup from .interface import Interface
<commit_before>from .implicit import implicit from .registry import ClassRegistry, Registry from .lookup import Lookup, CachedLookup <commit_msg>Include Interface in public API.<commit_after>
from .implicit import implicit from .registry import ClassRegistry, Registry from .lookup import Lookup, CachedLookup from .interface import Interface
from .implicit import implicit from .registry import ClassRegistry, Registry from .lookup import Lookup, CachedLookup Include Interface in public API.from .implicit import implicit from .registry import ClassRegistry, Registry from .lookup import Lookup, CachedLookup from .interface import Interface
<commit_before>from .implicit import implicit from .registry import ClassRegistry, Registry from .lookup import Lookup, CachedLookup <commit_msg>Include Interface in public API.<commit_after>from .implicit import implicit from .registry import ClassRegistry, Registry from .lookup import Lookup, CachedLookup from .inter...