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
2adbbe6c7291dd79784bd3a1e5702945435fa436
phasortoolbox/__init__.py
phasortoolbox/__init__.py
#!/usr/bin/env python3 import asyncio from .parser import Parser, PcapParser from .client import Client from .pdc import PDC import logging logging.getLogger(__name__).addHandler(logging.NullHandler())
#!/usr/bin/env python3 import asyncio from .synchrophasor import Synchrophasor from .parser import Parser, PcapParser from .client import Client from .pdc import PDC import logging logging.getLogger(__name__).addHandler(logging.NullHandler())
Put Synchrophasor in a seperate file
Put Synchrophasor in a seperate file
Python
mit
sonusz/PhasorToolBox
#!/usr/bin/env python3 import asyncio from .parser import Parser, PcapParser from .client import Client from .pdc import PDC import logging logging.getLogger(__name__).addHandler(logging.NullHandler()) Put Synchrophasor in a seperate file
#!/usr/bin/env python3 import asyncio from .synchrophasor import Synchrophasor from .parser import Parser, PcapParser from .client import Client from .pdc import PDC import logging logging.getLogger(__name__).addHandler(logging.NullHandler())
<commit_before>#!/usr/bin/env python3 import asyncio from .parser import Parser, PcapParser from .client import Client from .pdc import PDC import logging logging.getLogger(__name__).addHandler(logging.NullHandler()) <commit_msg>Put Synchrophasor in a seperate file<commit_after>
#!/usr/bin/env python3 import asyncio from .synchrophasor import Synchrophasor from .parser import Parser, PcapParser from .client import Client from .pdc import PDC import logging logging.getLogger(__name__).addHandler(logging.NullHandler())
#!/usr/bin/env python3 import asyncio from .parser import Parser, PcapParser from .client import Client from .pdc import PDC import logging logging.getLogger(__name__).addHandler(logging.NullHandler()) Put Synchrophasor in a seperate file#!/usr/bin/env python3 import asyncio from .synchrophasor import Synchrophasor fr...
<commit_before>#!/usr/bin/env python3 import asyncio from .parser import Parser, PcapParser from .client import Client from .pdc import PDC import logging logging.getLogger(__name__).addHandler(logging.NullHandler()) <commit_msg>Put Synchrophasor in a seperate file<commit_after>#!/usr/bin/env python3 import asyncio fr...
1bbc1fab976dd63e6a2f05aa35117dc74db40652
private_messages/forms.py
private_messages/forms.py
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django import forms from django.utils.translation import ugettext_lazy as _ from django_select2.fields import HeavySelect2MultipleChoiceField from pybb import util from private_messages.models import PrivateMessage class MessageForm(forms.ModelFo...
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django import forms from django.contrib.auth import get_user_model from django.utils.translation import ugettext_lazy as _ from django_select2.fields import HeavyModelSelect2MultipleChoiceField from pybb import util from private_messages.models imp...
Use ModelSelectField. Javascript still broken for some reason.
Use ModelSelectField. Javascript still broken for some reason.
Python
mit
skolsuper/pybbm_private_messages,skolsuper/pybbm_private_messages,skolsuper/pybbm_private_messages
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django import forms from django.utils.translation import ugettext_lazy as _ from django_select2.fields import HeavySelect2MultipleChoiceField from pybb import util from private_messages.models import PrivateMessage class MessageForm(forms.ModelFo...
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django import forms from django.contrib.auth import get_user_model from django.utils.translation import ugettext_lazy as _ from django_select2.fields import HeavyModelSelect2MultipleChoiceField from pybb import util from private_messages.models imp...
<commit_before># -*- coding: utf-8 -*- from __future__ import unicode_literals from django import forms from django.utils.translation import ugettext_lazy as _ from django_select2.fields import HeavySelect2MultipleChoiceField from pybb import util from private_messages.models import PrivateMessage class MessageFor...
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django import forms from django.contrib.auth import get_user_model from django.utils.translation import ugettext_lazy as _ from django_select2.fields import HeavyModelSelect2MultipleChoiceField from pybb import util from private_messages.models imp...
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django import forms from django.utils.translation import ugettext_lazy as _ from django_select2.fields import HeavySelect2MultipleChoiceField from pybb import util from private_messages.models import PrivateMessage class MessageForm(forms.ModelFo...
<commit_before># -*- coding: utf-8 -*- from __future__ import unicode_literals from django import forms from django.utils.translation import ugettext_lazy as _ from django_select2.fields import HeavySelect2MultipleChoiceField from pybb import util from private_messages.models import PrivateMessage class MessageFor...
f1d3d2f5543c0e847c4b2051c04837cb3586846e
emission/analysis/plotting/leaflet_osm/our_plotter.py
emission/analysis/plotting/leaflet_osm/our_plotter.py
import pandas as pd import folium def get_map_list(df, potential_splits): mapList = [] potential_splits_list = list(potential_splits) for start, end in zip(potential_splits_list, potential_splits_list[1:]): trip = df[start:end] currMap = folium.Map([trip.mLatitude.mean(), trip.mLongitude.me...
import pandas as pd import folium def df_to_string_list(df): """ Convert the input df into a list of strings, suitable for using as popups in a map. This is a utility function. """ print "Converting df with size %s to string list" % df.shape[0] array_list = df.as_matrix().tolist() return [s...
Enhance our plotter to use the new div_markers code
Enhance our plotter to use the new div_markers code And to generate popups correctly
Python
bsd-3-clause
yw374cornell/e-mission-server,joshzarrabi/e-mission-server,sunil07t/e-mission-server,sunil07t/e-mission-server,shankari/e-mission-server,e-mission/e-mission-server,e-mission/e-mission-server,joshzarrabi/e-mission-server,sunil07t/e-mission-server,e-mission/e-mission-server,yw374cornell/e-mission-server,joshzarrabi/e-mis...
import pandas as pd import folium def get_map_list(df, potential_splits): mapList = [] potential_splits_list = list(potential_splits) for start, end in zip(potential_splits_list, potential_splits_list[1:]): trip = df[start:end] currMap = folium.Map([trip.mLatitude.mean(), trip.mLongitude.me...
import pandas as pd import folium def df_to_string_list(df): """ Convert the input df into a list of strings, suitable for using as popups in a map. This is a utility function. """ print "Converting df with size %s to string list" % df.shape[0] array_list = df.as_matrix().tolist() return [s...
<commit_before>import pandas as pd import folium def get_map_list(df, potential_splits): mapList = [] potential_splits_list = list(potential_splits) for start, end in zip(potential_splits_list, potential_splits_list[1:]): trip = df[start:end] currMap = folium.Map([trip.mLatitude.mean(), tri...
import pandas as pd import folium def df_to_string_list(df): """ Convert the input df into a list of strings, suitable for using as popups in a map. This is a utility function. """ print "Converting df with size %s to string list" % df.shape[0] array_list = df.as_matrix().tolist() return [s...
import pandas as pd import folium def get_map_list(df, potential_splits): mapList = [] potential_splits_list = list(potential_splits) for start, end in zip(potential_splits_list, potential_splits_list[1:]): trip = df[start:end] currMap = folium.Map([trip.mLatitude.mean(), trip.mLongitude.me...
<commit_before>import pandas as pd import folium def get_map_list(df, potential_splits): mapList = [] potential_splits_list = list(potential_splits) for start, end in zip(potential_splits_list, potential_splits_list[1:]): trip = df[start:end] currMap = folium.Map([trip.mLatitude.mean(), tri...
93700dba921c6bffe77f2eaadc2d7ece5dde03e5
tests/__init__.py
tests/__init__.py
from bsAbstimmungen import setup_logging setup_logging('tests/test-logging.json')
from bsAbstimmungen.utils import setup_logging setup_logging('tests/test-logging.json')
Fix error caused by moving function setup_logging
Fix error caused by moving function setup_logging
Python
mit
raphiz/bsAbstimmungen,raphiz/bsAbstimmungen
from bsAbstimmungen import setup_logging setup_logging('tests/test-logging.json') Fix error caused by moving function setup_logging
from bsAbstimmungen.utils import setup_logging setup_logging('tests/test-logging.json')
<commit_before>from bsAbstimmungen import setup_logging setup_logging('tests/test-logging.json') <commit_msg>Fix error caused by moving function setup_logging<commit_after>
from bsAbstimmungen.utils import setup_logging setup_logging('tests/test-logging.json')
from bsAbstimmungen import setup_logging setup_logging('tests/test-logging.json') Fix error caused by moving function setup_loggingfrom bsAbstimmungen.utils import setup_logging setup_logging('tests/test-logging.json')
<commit_before>from bsAbstimmungen import setup_logging setup_logging('tests/test-logging.json') <commit_msg>Fix error caused by moving function setup_logging<commit_after>from bsAbstimmungen.utils import setup_logging setup_logging('tests/test-logging.json')
19dd810c5acb35ce5d7565ee57a55ae725194bd1
mvp/integration.py
mvp/integration.py
# -*- coding: utf-8 -*- class Integration(object): name = None description = None icon = None banner = None requires_confirmation = False enabled_by_default = False columns = 1 def __init__(self): self.set_enabled(self.enabled_by_default) def fields(self): '''Ret...
# -*- coding: utf-8 -*- class Integration(object): name = None description = None icon = None banner = None requires_confirmation = False enabled_by_default = False columns = 1 def __init__(self): self.set_enabled(self.enabled_by_default) def fields(self): '''Ret...
Add finalize method to Integration.
Add finalize method to Integration.
Python
mit
danbradham/mvp
# -*- coding: utf-8 -*- class Integration(object): name = None description = None icon = None banner = None requires_confirmation = False enabled_by_default = False columns = 1 def __init__(self): self.set_enabled(self.enabled_by_default) def fields(self): '''Ret...
# -*- coding: utf-8 -*- class Integration(object): name = None description = None icon = None banner = None requires_confirmation = False enabled_by_default = False columns = 1 def __init__(self): self.set_enabled(self.enabled_by_default) def fields(self): '''Ret...
<commit_before># -*- coding: utf-8 -*- class Integration(object): name = None description = None icon = None banner = None requires_confirmation = False enabled_by_default = False columns = 1 def __init__(self): self.set_enabled(self.enabled_by_default) def fields(self):...
# -*- coding: utf-8 -*- class Integration(object): name = None description = None icon = None banner = None requires_confirmation = False enabled_by_default = False columns = 1 def __init__(self): self.set_enabled(self.enabled_by_default) def fields(self): '''Ret...
# -*- coding: utf-8 -*- class Integration(object): name = None description = None icon = None banner = None requires_confirmation = False enabled_by_default = False columns = 1 def __init__(self): self.set_enabled(self.enabled_by_default) def fields(self): '''Ret...
<commit_before># -*- coding: utf-8 -*- class Integration(object): name = None description = None icon = None banner = None requires_confirmation = False enabled_by_default = False columns = 1 def __init__(self): self.set_enabled(self.enabled_by_default) def fields(self):...
c970cab38d846c4774aee52e52c23ed2452af96a
openfisca_france_data/tests/base.py
openfisca_france_data/tests/base.py
# -*- coding: utf-8 -*- from openfisca_core.tools import assert_near from openfisca_france.tests.base import get_cached_composed_reform, get_cached_reform from .. import france_data_tax_benefit_system, FranceDataTaxBenefitSystem __all__ = [ 'assert_near', 'france_data_tax_benefit_system', 'FranceDataT...
# -*- coding: utf-8 -*- from openfisca_core.tools import assert_near from openfisca_france.tests.base import get_cached_composed_reform, get_cached_reform from .. import france_data_tax_benefit_system __all__ = [ 'assert_near', 'france_data_tax_benefit_system', 'get_cached_composed_reform', 'get_c...
Remove unused and buggy import
Remove unused and buggy import
Python
agpl-3.0
openfisca/openfisca-france-data,openfisca/openfisca-france-data,openfisca/openfisca-france-data
# -*- coding: utf-8 -*- from openfisca_core.tools import assert_near from openfisca_france.tests.base import get_cached_composed_reform, get_cached_reform from .. import france_data_tax_benefit_system, FranceDataTaxBenefitSystem __all__ = [ 'assert_near', 'france_data_tax_benefit_system', 'FranceDataT...
# -*- coding: utf-8 -*- from openfisca_core.tools import assert_near from openfisca_france.tests.base import get_cached_composed_reform, get_cached_reform from .. import france_data_tax_benefit_system __all__ = [ 'assert_near', 'france_data_tax_benefit_system', 'get_cached_composed_reform', 'get_c...
<commit_before># -*- coding: utf-8 -*- from openfisca_core.tools import assert_near from openfisca_france.tests.base import get_cached_composed_reform, get_cached_reform from .. import france_data_tax_benefit_system, FranceDataTaxBenefitSystem __all__ = [ 'assert_near', 'france_data_tax_benefit_system', ...
# -*- coding: utf-8 -*- from openfisca_core.tools import assert_near from openfisca_france.tests.base import get_cached_composed_reform, get_cached_reform from .. import france_data_tax_benefit_system __all__ = [ 'assert_near', 'france_data_tax_benefit_system', 'get_cached_composed_reform', 'get_c...
# -*- coding: utf-8 -*- from openfisca_core.tools import assert_near from openfisca_france.tests.base import get_cached_composed_reform, get_cached_reform from .. import france_data_tax_benefit_system, FranceDataTaxBenefitSystem __all__ = [ 'assert_near', 'france_data_tax_benefit_system', 'FranceDataT...
<commit_before># -*- coding: utf-8 -*- from openfisca_core.tools import assert_near from openfisca_france.tests.base import get_cached_composed_reform, get_cached_reform from .. import france_data_tax_benefit_system, FranceDataTaxBenefitSystem __all__ = [ 'assert_near', 'france_data_tax_benefit_system', ...
151599602b9d626ebcfe5ae6960ea216b767fec2
setuptools/distutils_patch.py
setuptools/distutils_patch.py
""" Ensure that the local copy of distutils is preferred over stdlib. See https://github.com/pypa/setuptools/issues/417#issuecomment-392298401 for more motivation. """ import sys import importlib from os.path import dirname sys.path.insert(0, dirname(dirname(__file__))) importlib.import_module('distutils') sys.path...
""" Ensure that the local copy of distutils is preferred over stdlib. See https://github.com/pypa/setuptools/issues/417#issuecomment-392298401 for more motivation. """ import sys import importlib import contextlib from os.path import dirname @contextlib.contextmanager def patch_sys_path(): orig = sys.path[:] ...
Update distutils patch to monkeypatch all paths from sys.path to ensure that distutils is never imported except from the same path as setuptools. Assert that 'distutils' is not already in sys.modules.
Update distutils patch to monkeypatch all paths from sys.path to ensure that distutils is never imported except from the same path as setuptools. Assert that 'distutils' is not already in sys.modules.
Python
mit
pypa/setuptools,pypa/setuptools,pypa/setuptools
""" Ensure that the local copy of distutils is preferred over stdlib. See https://github.com/pypa/setuptools/issues/417#issuecomment-392298401 for more motivation. """ import sys import importlib from os.path import dirname sys.path.insert(0, dirname(dirname(__file__))) importlib.import_module('distutils') sys.path...
""" Ensure that the local copy of distutils is preferred over stdlib. See https://github.com/pypa/setuptools/issues/417#issuecomment-392298401 for more motivation. """ import sys import importlib import contextlib from os.path import dirname @contextlib.contextmanager def patch_sys_path(): orig = sys.path[:] ...
<commit_before>""" Ensure that the local copy of distutils is preferred over stdlib. See https://github.com/pypa/setuptools/issues/417#issuecomment-392298401 for more motivation. """ import sys import importlib from os.path import dirname sys.path.insert(0, dirname(dirname(__file__))) importlib.import_module('distu...
""" Ensure that the local copy of distutils is preferred over stdlib. See https://github.com/pypa/setuptools/issues/417#issuecomment-392298401 for more motivation. """ import sys import importlib import contextlib from os.path import dirname @contextlib.contextmanager def patch_sys_path(): orig = sys.path[:] ...
""" Ensure that the local copy of distutils is preferred over stdlib. See https://github.com/pypa/setuptools/issues/417#issuecomment-392298401 for more motivation. """ import sys import importlib from os.path import dirname sys.path.insert(0, dirname(dirname(__file__))) importlib.import_module('distutils') sys.path...
<commit_before>""" Ensure that the local copy of distutils is preferred over stdlib. See https://github.com/pypa/setuptools/issues/417#issuecomment-392298401 for more motivation. """ import sys import importlib from os.path import dirname sys.path.insert(0, dirname(dirname(__file__))) importlib.import_module('distu...
de23099e04d0a5823d6917f6f991d66e25b9002b
django_medusa/management/commands/staticsitegen.py
django_medusa/management/commands/staticsitegen.py
from django.core.management.base import BaseCommand from django_medusa.renderers import StaticSiteRenderer from django_medusa.utils import get_static_renderers class Command(BaseCommand): can_import_settings = True help = 'Looks for \'renderers.py\' in each INSTALLED_APP, which defines '\ 'a class...
from django.conf import settings from django.core.management.base import BaseCommand from django.core.urlresolvers import set_script_prefix from django_medusa.renderers import StaticSiteRenderer from django_medusa.utils import get_static_renderers class Command(BaseCommand): can_import_settings = True help =...
Add support for rendering with a URL prefix
Add support for rendering with a URL prefix This adds an optional MEDUSA_URL_PREFIX setting option that causes Django's URL reversing to render URLS prefixed with this string. This is necessary when hosting Django projects on a URI path other than /, as a proper WSGI environment is not present to tell Django what URL ...
Python
mit
hyperair/django-medusa
from django.core.management.base import BaseCommand from django_medusa.renderers import StaticSiteRenderer from django_medusa.utils import get_static_renderers class Command(BaseCommand): can_import_settings = True help = 'Looks for \'renderers.py\' in each INSTALLED_APP, which defines '\ 'a class...
from django.conf import settings from django.core.management.base import BaseCommand from django.core.urlresolvers import set_script_prefix from django_medusa.renderers import StaticSiteRenderer from django_medusa.utils import get_static_renderers class Command(BaseCommand): can_import_settings = True help =...
<commit_before>from django.core.management.base import BaseCommand from django_medusa.renderers import StaticSiteRenderer from django_medusa.utils import get_static_renderers class Command(BaseCommand): can_import_settings = True help = 'Looks for \'renderers.py\' in each INSTALLED_APP, which defines '\ ...
from django.conf import settings from django.core.management.base import BaseCommand from django.core.urlresolvers import set_script_prefix from django_medusa.renderers import StaticSiteRenderer from django_medusa.utils import get_static_renderers class Command(BaseCommand): can_import_settings = True help =...
from django.core.management.base import BaseCommand from django_medusa.renderers import StaticSiteRenderer from django_medusa.utils import get_static_renderers class Command(BaseCommand): can_import_settings = True help = 'Looks for \'renderers.py\' in each INSTALLED_APP, which defines '\ 'a class...
<commit_before>from django.core.management.base import BaseCommand from django_medusa.renderers import StaticSiteRenderer from django_medusa.utils import get_static_renderers class Command(BaseCommand): can_import_settings = True help = 'Looks for \'renderers.py\' in each INSTALLED_APP, which defines '\ ...
dc67190ae855de30f0ee33f4d8b34462d44667e9
nightreads/urls.py
nightreads/urls.py
"""nightreads URL Configuration The `urlpatterns` list routes URLs to views. For more information please see: https://docs.djangoproject.com/en/1.9/topics/http/urls/ Examples: Function views 1. Add an import: from my_app import views 2. Add a URL to urlpatterns: url(r'^$', views.home, name='home') Class-...
"""nightreads URL Configuration The `urlpatterns` list routes URLs to views. For more information please see: https://docs.djangoproject.com/en/1.9/topics/http/urls/ Examples: Function views 1. Add an import: from my_app import views 2. Add a URL to urlpatterns: url(r'^$', views.home, name='home') Class-...
Change URL scheme `user` to `users`
Change URL scheme `user` to `users`
Python
mit
avinassh/nightreads,avinassh/nightreads
"""nightreads URL Configuration The `urlpatterns` list routes URLs to views. For more information please see: https://docs.djangoproject.com/en/1.9/topics/http/urls/ Examples: Function views 1. Add an import: from my_app import views 2. Add a URL to urlpatterns: url(r'^$', views.home, name='home') Class-...
"""nightreads URL Configuration The `urlpatterns` list routes URLs to views. For more information please see: https://docs.djangoproject.com/en/1.9/topics/http/urls/ Examples: Function views 1. Add an import: from my_app import views 2. Add a URL to urlpatterns: url(r'^$', views.home, name='home') Class-...
<commit_before>"""nightreads URL Configuration The `urlpatterns` list routes URLs to views. For more information please see: https://docs.djangoproject.com/en/1.9/topics/http/urls/ Examples: Function views 1. Add an import: from my_app import views 2. Add a URL to urlpatterns: url(r'^$', views.home, name...
"""nightreads URL Configuration The `urlpatterns` list routes URLs to views. For more information please see: https://docs.djangoproject.com/en/1.9/topics/http/urls/ Examples: Function views 1. Add an import: from my_app import views 2. Add a URL to urlpatterns: url(r'^$', views.home, name='home') Class-...
"""nightreads URL Configuration The `urlpatterns` list routes URLs to views. For more information please see: https://docs.djangoproject.com/en/1.9/topics/http/urls/ Examples: Function views 1. Add an import: from my_app import views 2. Add a URL to urlpatterns: url(r'^$', views.home, name='home') Class-...
<commit_before>"""nightreads URL Configuration The `urlpatterns` list routes URLs to views. For more information please see: https://docs.djangoproject.com/en/1.9/topics/http/urls/ Examples: Function views 1. Add an import: from my_app import views 2. Add a URL to urlpatterns: url(r'^$', views.home, name...
28770cf4d0995697f7b2c8edad7a56fb8aeabea5
Sendy.py
Sendy.py
# coding: utf-8 # ! /usr/bin/python __author__ = 'Shahariar Rabby' # # Sendy # ### Importing Send mail file # In[6]: from Sendmail import * # ** Take user email, text plan massage, HTML file ** # In[7]: TO_EMAIL = raw_input("Enter reciver email : ") #Taking Reciver email as input subject = raw_input("Enter Mail...
# coding: utf-8 # ! /usr/bin/python __author__ = 'Shahariar Rabby' # This will read details and send email to clint # # Sendy # ### Importing Send mail file # In[6]: from Sendmail import * # ** Take user email, text plan massage, HTML file ** # In[7]: TO_EMAIL = raw_input("Enter reciver email : ") #Taking Reciv...
Send email to client working
Send email to client working
Python
mit
shahariarrabby/Mail_Server
# coding: utf-8 # ! /usr/bin/python __author__ = 'Shahariar Rabby' # # Sendy # ### Importing Send mail file # In[6]: from Sendmail import * # ** Take user email, text plan massage, HTML file ** # In[7]: TO_EMAIL = raw_input("Enter reciver email : ") #Taking Reciver email as input subject = raw_input("Enter Mail...
# coding: utf-8 # ! /usr/bin/python __author__ = 'Shahariar Rabby' # This will read details and send email to clint # # Sendy # ### Importing Send mail file # In[6]: from Sendmail import * # ** Take user email, text plan massage, HTML file ** # In[7]: TO_EMAIL = raw_input("Enter reciver email : ") #Taking Reciv...
<commit_before># coding: utf-8 # ! /usr/bin/python __author__ = 'Shahariar Rabby' # # Sendy # ### Importing Send mail file # In[6]: from Sendmail import * # ** Take user email, text plan massage, HTML file ** # In[7]: TO_EMAIL = raw_input("Enter reciver email : ") #Taking Reciver email as input subject = raw_in...
# coding: utf-8 # ! /usr/bin/python __author__ = 'Shahariar Rabby' # This will read details and send email to clint # # Sendy # ### Importing Send mail file # In[6]: from Sendmail import * # ** Take user email, text plan massage, HTML file ** # In[7]: TO_EMAIL = raw_input("Enter reciver email : ") #Taking Reciv...
# coding: utf-8 # ! /usr/bin/python __author__ = 'Shahariar Rabby' # # Sendy # ### Importing Send mail file # In[6]: from Sendmail import * # ** Take user email, text plan massage, HTML file ** # In[7]: TO_EMAIL = raw_input("Enter reciver email : ") #Taking Reciver email as input subject = raw_input("Enter Mail...
<commit_before># coding: utf-8 # ! /usr/bin/python __author__ = 'Shahariar Rabby' # # Sendy # ### Importing Send mail file # In[6]: from Sendmail import * # ** Take user email, text plan massage, HTML file ** # In[7]: TO_EMAIL = raw_input("Enter reciver email : ") #Taking Reciver email as input subject = raw_in...
0cb45bbc1c7b6b5f1a2722e85159b97c8a555e0c
examples/providers/factory_deep_init_injections.py
examples/providers/factory_deep_init_injections.py
"""`Factory` providers deep init injections example.""" from dependency_injector import providers class Regularizer: def __init__(self, alpha): self.alpha = alpha class Loss: def __init__(self, regularizer): self.regularizer = regularizer class ClassificationTask: def __init__(self, l...
"""`Factory` providers - building a complex object graph with deep init injections example.""" from dependency_injector import providers class Regularizer: def __init__(self, alpha): self.alpha = alpha class Loss: def __init__(self, regularizer): self.regularizer = regularizer class Class...
Update the docblock of the example
Update the docblock of the example
Python
bsd-3-clause
ets-labs/dependency_injector,rmk135/dependency_injector,ets-labs/python-dependency-injector,rmk135/objects
"""`Factory` providers deep init injections example.""" from dependency_injector import providers class Regularizer: def __init__(self, alpha): self.alpha = alpha class Loss: def __init__(self, regularizer): self.regularizer = regularizer class ClassificationTask: def __init__(self, l...
"""`Factory` providers - building a complex object graph with deep init injections example.""" from dependency_injector import providers class Regularizer: def __init__(self, alpha): self.alpha = alpha class Loss: def __init__(self, regularizer): self.regularizer = regularizer class Class...
<commit_before>"""`Factory` providers deep init injections example.""" from dependency_injector import providers class Regularizer: def __init__(self, alpha): self.alpha = alpha class Loss: def __init__(self, regularizer): self.regularizer = regularizer class ClassificationTask: def _...
"""`Factory` providers - building a complex object graph with deep init injections example.""" from dependency_injector import providers class Regularizer: def __init__(self, alpha): self.alpha = alpha class Loss: def __init__(self, regularizer): self.regularizer = regularizer class Class...
"""`Factory` providers deep init injections example.""" from dependency_injector import providers class Regularizer: def __init__(self, alpha): self.alpha = alpha class Loss: def __init__(self, regularizer): self.regularizer = regularizer class ClassificationTask: def __init__(self, l...
<commit_before>"""`Factory` providers deep init injections example.""" from dependency_injector import providers class Regularizer: def __init__(self, alpha): self.alpha = alpha class Loss: def __init__(self, regularizer): self.regularizer = regularizer class ClassificationTask: def _...
e908a2c62be1d937a68b5c602b8cae02633685f7
csunplugged/general/management/commands/updatedata.py
csunplugged/general/management/commands/updatedata.py
"""Module for the custom Django updatedata command.""" from django.core import management class Command(management.base.BaseCommand): """Required command class for the custom Django updatedata command.""" help = "Update all data from content folders for all applications" def add_arguments(self, parser)...
"""Module for the custom Django updatedata command.""" from django.core import management class Command(management.base.BaseCommand): """Required command class for the custom Django updatedata command.""" help = "Update all data from content folders for all applications" def add_arguments(self, parser)...
Load at a distance content in updatadata command
Load at a distance content in updatadata command
Python
mit
uccser/cs-unplugged,uccser/cs-unplugged,uccser/cs-unplugged,uccser/cs-unplugged
"""Module for the custom Django updatedata command.""" from django.core import management class Command(management.base.BaseCommand): """Required command class for the custom Django updatedata command.""" help = "Update all data from content folders for all applications" def add_arguments(self, parser)...
"""Module for the custom Django updatedata command.""" from django.core import management class Command(management.base.BaseCommand): """Required command class for the custom Django updatedata command.""" help = "Update all data from content folders for all applications" def add_arguments(self, parser)...
<commit_before>"""Module for the custom Django updatedata command.""" from django.core import management class Command(management.base.BaseCommand): """Required command class for the custom Django updatedata command.""" help = "Update all data from content folders for all applications" def add_argument...
"""Module for the custom Django updatedata command.""" from django.core import management class Command(management.base.BaseCommand): """Required command class for the custom Django updatedata command.""" help = "Update all data from content folders for all applications" def add_arguments(self, parser)...
"""Module for the custom Django updatedata command.""" from django.core import management class Command(management.base.BaseCommand): """Required command class for the custom Django updatedata command.""" help = "Update all data from content folders for all applications" def add_arguments(self, parser)...
<commit_before>"""Module for the custom Django updatedata command.""" from django.core import management class Command(management.base.BaseCommand): """Required command class for the custom Django updatedata command.""" help = "Update all data from content folders for all applications" def add_argument...
047c95e255d6aac31651e3a95e2045de0b4888e2
flask_app.py
flask_app.py
import json from flask import abort from flask import Flask from flask_caching import Cache from flask_cors import CORS import main app = Flask(__name__) cache = Cache(app, config={'CACHE_TYPE': 'simple'}) cors = CORS(app, resources={r"/api/*": {"origins": "*"}}) @app.route('/') def display_available(): conten...
from flask import Flask, abort, jsonify from flask_caching import Cache from flask_cors import CORS import main app = Flask(__name__) cache = Cache(app, config={'CACHE_TYPE': 'simple'}) cors = CORS(app, resources={r"/api/*": {"origins": "*"}}) @app.route('/') def display_available(): content = ('<html>' + ...
Make a real json response.
Make a real json response.
Python
bsd-3-clause
talavis/kimenu
import json from flask import abort from flask import Flask from flask_caching import Cache from flask_cors import CORS import main app = Flask(__name__) cache = Cache(app, config={'CACHE_TYPE': 'simple'}) cors = CORS(app, resources={r"/api/*": {"origins": "*"}}) @app.route('/') def display_available(): conten...
from flask import Flask, abort, jsonify from flask_caching import Cache from flask_cors import CORS import main app = Flask(__name__) cache = Cache(app, config={'CACHE_TYPE': 'simple'}) cors = CORS(app, resources={r"/api/*": {"origins": "*"}}) @app.route('/') def display_available(): content = ('<html>' + ...
<commit_before>import json from flask import abort from flask import Flask from flask_caching import Cache from flask_cors import CORS import main app = Flask(__name__) cache = Cache(app, config={'CACHE_TYPE': 'simple'}) cors = CORS(app, resources={r"/api/*": {"origins": "*"}}) @app.route('/') def display_availabl...
from flask import Flask, abort, jsonify from flask_caching import Cache from flask_cors import CORS import main app = Flask(__name__) cache = Cache(app, config={'CACHE_TYPE': 'simple'}) cors = CORS(app, resources={r"/api/*": {"origins": "*"}}) @app.route('/') def display_available(): content = ('<html>' + ...
import json from flask import abort from flask import Flask from flask_caching import Cache from flask_cors import CORS import main app = Flask(__name__) cache = Cache(app, config={'CACHE_TYPE': 'simple'}) cors = CORS(app, resources={r"/api/*": {"origins": "*"}}) @app.route('/') def display_available(): conten...
<commit_before>import json from flask import abort from flask import Flask from flask_caching import Cache from flask_cors import CORS import main app = Flask(__name__) cache = Cache(app, config={'CACHE_TYPE': 'simple'}) cors = CORS(app, resources={r"/api/*": {"origins": "*"}}) @app.route('/') def display_availabl...
df2bf7cc95f38d9e6605dcc91e56b28502063b6a
apps/faqs/admin.py
apps/faqs/admin.py
from cms.admin import PageBaseAdmin, SearchMetaBaseAdmin from django.contrib import admin from .models import Category, Faq @admin.register(Faq) class FaqAdmin(SearchMetaBaseAdmin): """ Admin settings for the Faq model """ prepopulated_fields = {"url_title": ("question",)} filter_horizontal = ("categorie...
from cms.admin import PageBaseAdmin, SearchMetaBaseAdmin from django.contrib import admin from .models import Category, Faq @admin.register(Faq) class FaqAdmin(SearchMetaBaseAdmin): """ Admin settings for the Faq model """ prepopulated_fields = {"url_title": ("question",)} filter_horizontal = ("categorie...
Fix usage of `url_title` in CategoryAdmin.
Fix usage of `url_title` in CategoryAdmin.
Python
mit
onespacemedia/cms-faqs,onespacemedia/cms-faqs
from cms.admin import PageBaseAdmin, SearchMetaBaseAdmin from django.contrib import admin from .models import Category, Faq @admin.register(Faq) class FaqAdmin(SearchMetaBaseAdmin): """ Admin settings for the Faq model """ prepopulated_fields = {"url_title": ("question",)} filter_horizontal = ("categorie...
from cms.admin import PageBaseAdmin, SearchMetaBaseAdmin from django.contrib import admin from .models import Category, Faq @admin.register(Faq) class FaqAdmin(SearchMetaBaseAdmin): """ Admin settings for the Faq model """ prepopulated_fields = {"url_title": ("question",)} filter_horizontal = ("categorie...
<commit_before>from cms.admin import PageBaseAdmin, SearchMetaBaseAdmin from django.contrib import admin from .models import Category, Faq @admin.register(Faq) class FaqAdmin(SearchMetaBaseAdmin): """ Admin settings for the Faq model """ prepopulated_fields = {"url_title": ("question",)} filter_horizonta...
from cms.admin import PageBaseAdmin, SearchMetaBaseAdmin from django.contrib import admin from .models import Category, Faq @admin.register(Faq) class FaqAdmin(SearchMetaBaseAdmin): """ Admin settings for the Faq model """ prepopulated_fields = {"url_title": ("question",)} filter_horizontal = ("categorie...
from cms.admin import PageBaseAdmin, SearchMetaBaseAdmin from django.contrib import admin from .models import Category, Faq @admin.register(Faq) class FaqAdmin(SearchMetaBaseAdmin): """ Admin settings for the Faq model """ prepopulated_fields = {"url_title": ("question",)} filter_horizontal = ("categorie...
<commit_before>from cms.admin import PageBaseAdmin, SearchMetaBaseAdmin from django.contrib import admin from .models import Category, Faq @admin.register(Faq) class FaqAdmin(SearchMetaBaseAdmin): """ Admin settings for the Faq model """ prepopulated_fields = {"url_title": ("question",)} filter_horizonta...
6050b32ddb812e32da08fd15f210d9d9ee794a42
first-program.py
first-program.py
# Python program for Programming for Everybody (Getting Started with Python) by University of Michigan - Charles Severance # Task 1 Python code with single print statement but not print hello world print "It is a great feeling to code in Python"
# Python program for Programming for Everybody (Getting Started with Python) by University of Michigan - Charles Severance # Task 1 Python code with single print statement but not print hello world print "It is a great feeling to code in Python" print "Hello World!"
Print Hello World in Python
Print Hello World in Python
Python
mit
rahulbohra/Python-Basic
# Python program for Programming for Everybody (Getting Started with Python) by University of Michigan - Charles Severance # Task 1 Python code with single print statement but not print hello world print "It is a great feeling to code in Python" Print Hello World in Python
# Python program for Programming for Everybody (Getting Started with Python) by University of Michigan - Charles Severance # Task 1 Python code with single print statement but not print hello world print "It is a great feeling to code in Python" print "Hello World!"
<commit_before># Python program for Programming for Everybody (Getting Started with Python) by University of Michigan - Charles Severance # Task 1 Python code with single print statement but not print hello world print "It is a great feeling to code in Python" <commit_msg>Print Hello World in Python<commit_after>
# Python program for Programming for Everybody (Getting Started with Python) by University of Michigan - Charles Severance # Task 1 Python code with single print statement but not print hello world print "It is a great feeling to code in Python" print "Hello World!"
# Python program for Programming for Everybody (Getting Started with Python) by University of Michigan - Charles Severance # Task 1 Python code with single print statement but not print hello world print "It is a great feeling to code in Python" Print Hello World in Python# Python program for Programming for Everybody ...
<commit_before># Python program for Programming for Everybody (Getting Started with Python) by University of Michigan - Charles Severance # Task 1 Python code with single print statement but not print hello world print "It is a great feeling to code in Python" <commit_msg>Print Hello World in Python<commit_after># Pyth...
88abdf5365977a47abaa0d0a8f3275e4635c8378
singleuser/user-config.py
singleuser/user-config.py
import os mylang = 'test' family = 'wikipedia' custom_path = os.path.expanduser('~/user-config.py') if os.path.exists(custom_path): with open(custom_path, 'rb') as f: exec(compile(f.read(), custom_path, 'exec'), globals()) del f # Clean up temp variables, since pwb issues a warning otherwise # to he...
import os mylang = 'test' family = 'wikipedia' custom_path = os.path.expanduser('~/user-config.py') if os.path.exists(custom_path): with open(custom_path, 'rb') as f: exec(compile(f.read(), custom_path, 'exec'), globals()) del f # Clean up temp variables, since pwb issues a warning otherwise # to he...
Fix OAuth integration for all wiki families
Fix OAuth integration for all wiki families Earlier you needed to edit config file to set family to whatever you were working on, even if you constructed a Site object referring to other website. This would cause funky errors about 'Logged in as X, expected None' errors. Fix by listing almost all the families people ...
Python
mit
yuvipanda/paws,yuvipanda/paws
import os mylang = 'test' family = 'wikipedia' custom_path = os.path.expanduser('~/user-config.py') if os.path.exists(custom_path): with open(custom_path, 'rb') as f: exec(compile(f.read(), custom_path, 'exec'), globals()) del f # Clean up temp variables, since pwb issues a warning otherwise # to he...
import os mylang = 'test' family = 'wikipedia' custom_path = os.path.expanduser('~/user-config.py') if os.path.exists(custom_path): with open(custom_path, 'rb') as f: exec(compile(f.read(), custom_path, 'exec'), globals()) del f # Clean up temp variables, since pwb issues a warning otherwise # to he...
<commit_before>import os mylang = 'test' family = 'wikipedia' custom_path = os.path.expanduser('~/user-config.py') if os.path.exists(custom_path): with open(custom_path, 'rb') as f: exec(compile(f.read(), custom_path, 'exec'), globals()) del f # Clean up temp variables, since pwb issues a warning ot...
import os mylang = 'test' family = 'wikipedia' custom_path = os.path.expanduser('~/user-config.py') if os.path.exists(custom_path): with open(custom_path, 'rb') as f: exec(compile(f.read(), custom_path, 'exec'), globals()) del f # Clean up temp variables, since pwb issues a warning otherwise # to he...
import os mylang = 'test' family = 'wikipedia' custom_path = os.path.expanduser('~/user-config.py') if os.path.exists(custom_path): with open(custom_path, 'rb') as f: exec(compile(f.read(), custom_path, 'exec'), globals()) del f # Clean up temp variables, since pwb issues a warning otherwise # to he...
<commit_before>import os mylang = 'test' family = 'wikipedia' custom_path = os.path.expanduser('~/user-config.py') if os.path.exists(custom_path): with open(custom_path, 'rb') as f: exec(compile(f.read(), custom_path, 'exec'), globals()) del f # Clean up temp variables, since pwb issues a warning ot...
294dabd8cc6bfc7e004a1a0dde9b40e9535d4b19
organizer/views.py
organizer/views.py
from django.http.response import HttpResponse from django.template import Context, loader from .models import Tag def homepage(request): tag_list = Tag.objects.all() template = loader.get_template( 'organizer/tag_list.html') context = Context({'tag_list': tag_list}) output = template.render(c...
from django.http.response import ( Http404, HttpResponse) from django.template import Context, loader from .models import Tag def homepage(request): tag_list = Tag.objects.all() template = loader.get_template( 'organizer/tag_list.html') context = Context({'tag_list': tag_list}) output = t...
Raise 404 Error if no Tag exists.
Ch05: Raise 404 Error if no Tag exists.
Python
bsd-2-clause
jambonrose/DjangoUnleashed-1.8,jambonrose/DjangoUnleashed-1.8
from django.http.response import HttpResponse from django.template import Context, loader from .models import Tag def homepage(request): tag_list = Tag.objects.all() template = loader.get_template( 'organizer/tag_list.html') context = Context({'tag_list': tag_list}) output = template.render(c...
from django.http.response import ( Http404, HttpResponse) from django.template import Context, loader from .models import Tag def homepage(request): tag_list = Tag.objects.all() template = loader.get_template( 'organizer/tag_list.html') context = Context({'tag_list': tag_list}) output = t...
<commit_before>from django.http.response import HttpResponse from django.template import Context, loader from .models import Tag def homepage(request): tag_list = Tag.objects.all() template = loader.get_template( 'organizer/tag_list.html') context = Context({'tag_list': tag_list}) output = te...
from django.http.response import ( Http404, HttpResponse) from django.template import Context, loader from .models import Tag def homepage(request): tag_list = Tag.objects.all() template = loader.get_template( 'organizer/tag_list.html') context = Context({'tag_list': tag_list}) output = t...
from django.http.response import HttpResponse from django.template import Context, loader from .models import Tag def homepage(request): tag_list = Tag.objects.all() template = loader.get_template( 'organizer/tag_list.html') context = Context({'tag_list': tag_list}) output = template.render(c...
<commit_before>from django.http.response import HttpResponse from django.template import Context, loader from .models import Tag def homepage(request): tag_list = Tag.objects.all() template = loader.get_template( 'organizer/tag_list.html') context = Context({'tag_list': tag_list}) output = te...
a95c3bff0065ed5612a0786e7d8fd3e43fe71ff7
src/som/interpreter/ast/nodes/message/super_node.py
src/som/interpreter/ast/nodes/message/super_node.py
from .abstract_node import AbstractMessageNode class SuperMessageNode(AbstractMessageNode): def __init__(self, selector, receiver, args, super_class, source_section = None): AbstractMessageNode.__init__(self, selector, None, receiver, args, source_section) self._method = None self._super_c...
from .abstract_node import AbstractMessageNode class SuperMessageNode(AbstractMessageNode): _immutable_fields_ = ['_method?', '_super_class', '_selector'] def __init__(self, selector, receiver, args, super_class, source_section = None): AbstractMessageNode.__init__(self, selector, None, receiver, ar...
Declare immutable fields in SuperMessageNode
Declare immutable fields in SuperMessageNode Signed-off-by: Stefan Marr <46f1a0bd5592a2f9244ca321b129902a06b53e03@stefan-marr.de>
Python
mit
SOM-st/PySOM,SOM-st/PySOM,smarr/PySOM,smarr/PySOM
from .abstract_node import AbstractMessageNode class SuperMessageNode(AbstractMessageNode): def __init__(self, selector, receiver, args, super_class, source_section = None): AbstractMessageNode.__init__(self, selector, None, receiver, args, source_section) self._method = None self._super_c...
from .abstract_node import AbstractMessageNode class SuperMessageNode(AbstractMessageNode): _immutable_fields_ = ['_method?', '_super_class', '_selector'] def __init__(self, selector, receiver, args, super_class, source_section = None): AbstractMessageNode.__init__(self, selector, None, receiver, ar...
<commit_before>from .abstract_node import AbstractMessageNode class SuperMessageNode(AbstractMessageNode): def __init__(self, selector, receiver, args, super_class, source_section = None): AbstractMessageNode.__init__(self, selector, None, receiver, args, source_section) self._method = None ...
from .abstract_node import AbstractMessageNode class SuperMessageNode(AbstractMessageNode): _immutable_fields_ = ['_method?', '_super_class', '_selector'] def __init__(self, selector, receiver, args, super_class, source_section = None): AbstractMessageNode.__init__(self, selector, None, receiver, ar...
from .abstract_node import AbstractMessageNode class SuperMessageNode(AbstractMessageNode): def __init__(self, selector, receiver, args, super_class, source_section = None): AbstractMessageNode.__init__(self, selector, None, receiver, args, source_section) self._method = None self._super_c...
<commit_before>from .abstract_node import AbstractMessageNode class SuperMessageNode(AbstractMessageNode): def __init__(self, selector, receiver, args, super_class, source_section = None): AbstractMessageNode.__init__(self, selector, None, receiver, args, source_section) self._method = None ...
5bcc4ae60f89fbcadad234e0d6b9a755d28aab5d
pavement.py
pavement.py
import subprocess from paver.easy import * def call(*args, **kwargs): return subprocess.call(args, **kwargs) @task def build(): """Package up the app.""" call('palm-package', '.') @task def halt(): call('palm-launch', '--device=emulator', '-c', 'org.markpasc.paperplain') @task @needs('halt') def ...
import subprocess from paver.easy import * def call(*args, **kwargs): return subprocess.call(args, **kwargs) @task def build(): """Package up the app.""" call('palm-package', '.') @task def halt(): call('palm-launch', '--device=emulator', '-c', 'org.markpasc.paperplain') @task @needs('halt') def ...
Handle ctrl-C-ing out of palm-log
Handle ctrl-C-ing out of palm-log
Python
mit
markpasc/paperplain,markpasc/paperplain
import subprocess from paver.easy import * def call(*args, **kwargs): return subprocess.call(args, **kwargs) @task def build(): """Package up the app.""" call('palm-package', '.') @task def halt(): call('palm-launch', '--device=emulator', '-c', 'org.markpasc.paperplain') @task @needs('halt') def ...
import subprocess from paver.easy import * def call(*args, **kwargs): return subprocess.call(args, **kwargs) @task def build(): """Package up the app.""" call('palm-package', '.') @task def halt(): call('palm-launch', '--device=emulator', '-c', 'org.markpasc.paperplain') @task @needs('halt') def ...
<commit_before>import subprocess from paver.easy import * def call(*args, **kwargs): return subprocess.call(args, **kwargs) @task def build(): """Package up the app.""" call('palm-package', '.') @task def halt(): call('palm-launch', '--device=emulator', '-c', 'org.markpasc.paperplain') @task @nee...
import subprocess from paver.easy import * def call(*args, **kwargs): return subprocess.call(args, **kwargs) @task def build(): """Package up the app.""" call('palm-package', '.') @task def halt(): call('palm-launch', '--device=emulator', '-c', 'org.markpasc.paperplain') @task @needs('halt') def ...
import subprocess from paver.easy import * def call(*args, **kwargs): return subprocess.call(args, **kwargs) @task def build(): """Package up the app.""" call('palm-package', '.') @task def halt(): call('palm-launch', '--device=emulator', '-c', 'org.markpasc.paperplain') @task @needs('halt') def ...
<commit_before>import subprocess from paver.easy import * def call(*args, **kwargs): return subprocess.call(args, **kwargs) @task def build(): """Package up the app.""" call('palm-package', '.') @task def halt(): call('palm-launch', '--device=emulator', '-c', 'org.markpasc.paperplain') @task @nee...
14b1648b96064363a833c496da38e62ffc9dbbcb
external_tools/src/main/python/images/common.py
external_tools/src/main/python/images/common.py
#!/usr/bin/python #splitString='images/clean/impc/' splitString='images/holding_area/impc/'
#!/usr/bin/python splitString='images/clean/impc/'
Revert splitString to former value
Revert splitString to former value
Python
apache-2.0
mpi2/PhenotypeData,mpi2/PhenotypeData,mpi2/PhenotypeData,mpi2/PhenotypeData,mpi2/PhenotypeData,mpi2/PhenotypeData
#!/usr/bin/python #splitString='images/clean/impc/' splitString='images/holding_area/impc/' Revert splitString to former value
#!/usr/bin/python splitString='images/clean/impc/'
<commit_before>#!/usr/bin/python #splitString='images/clean/impc/' splitString='images/holding_area/impc/' <commit_msg>Revert splitString to former value<commit_after>
#!/usr/bin/python splitString='images/clean/impc/'
#!/usr/bin/python #splitString='images/clean/impc/' splitString='images/holding_area/impc/' Revert splitString to former value#!/usr/bin/python splitString='images/clean/impc/'
<commit_before>#!/usr/bin/python #splitString='images/clean/impc/' splitString='images/holding_area/impc/' <commit_msg>Revert splitString to former value<commit_after>#!/usr/bin/python splitString='images/clean/impc/'
bb104ac04e27e3354c4aebee7a0ca7e539232490
regparser/commands/outline_depths.py
regparser/commands/outline_depths.py
import logging from regparser.tree.depth import optional_rules from regparser.tree.depth.derive import derive_depths import click logger = logging.getLogger(__name__) @click.command() @click.argument('markers', type=click.STRING, required=True) def outline_depths(markers) -> None: """ Infer an outline's st...
import logging from regparser.tree.depth import optional_rules from regparser.tree.depth.derive import derive_depths import click logger = logging.getLogger(__name__) @click.command() @click.argument('markers', type=click.STRING, required=True) def outline_depths(markers) -> None: """ Infer an outline's st...
Use click.echo() for python 2.7 compatibility
Use click.echo() for python 2.7 compatibility
Python
cc0-1.0
eregs/regulations-parser,tadhg-ohiggins/regulations-parser,eregs/regulations-parser,tadhg-ohiggins/regulations-parser
import logging from regparser.tree.depth import optional_rules from regparser.tree.depth.derive import derive_depths import click logger = logging.getLogger(__name__) @click.command() @click.argument('markers', type=click.STRING, required=True) def outline_depths(markers) -> None: """ Infer an outline's st...
import logging from regparser.tree.depth import optional_rules from regparser.tree.depth.derive import derive_depths import click logger = logging.getLogger(__name__) @click.command() @click.argument('markers', type=click.STRING, required=True) def outline_depths(markers) -> None: """ Infer an outline's st...
<commit_before>import logging from regparser.tree.depth import optional_rules from regparser.tree.depth.derive import derive_depths import click logger = logging.getLogger(__name__) @click.command() @click.argument('markers', type=click.STRING, required=True) def outline_depths(markers) -> None: """ Infer ...
import logging from regparser.tree.depth import optional_rules from regparser.tree.depth.derive import derive_depths import click logger = logging.getLogger(__name__) @click.command() @click.argument('markers', type=click.STRING, required=True) def outline_depths(markers) -> None: """ Infer an outline's st...
import logging from regparser.tree.depth import optional_rules from regparser.tree.depth.derive import derive_depths import click logger = logging.getLogger(__name__) @click.command() @click.argument('markers', type=click.STRING, required=True) def outline_depths(markers) -> None: """ Infer an outline's st...
<commit_before>import logging from regparser.tree.depth import optional_rules from regparser.tree.depth.derive import derive_depths import click logger = logging.getLogger(__name__) @click.command() @click.argument('markers', type=click.STRING, required=True) def outline_depths(markers) -> None: """ Infer ...
9da303e48820e95e1bfd206f1c0372f896dac6ec
draftjs_exporter/constants.py
draftjs_exporter/constants.py
from __future__ import absolute_import, unicode_literals # http://stackoverflow.com/a/22723724/1798491 class Enum(object): def __init__(self, tuple_list): self.tuple_list = tuple_list def __getattr__(self, name): if name not in self.tuple_list: raise AttributeError("'Enum' has no ...
from __future__ import absolute_import, unicode_literals # http://stackoverflow.com/a/22723724/1798491 class Enum(object): def __init__(self, *elements): self.elements = tuple(elements) def __getattr__(self, name): if name not in self.elements: raise AttributeError("'Enum' has no ...
Allow enum to be created more easily
Allow enum to be created more easily
Python
mit
springload/draftjs_exporter,springload/draftjs_exporter,springload/draftjs_exporter
from __future__ import absolute_import, unicode_literals # http://stackoverflow.com/a/22723724/1798491 class Enum(object): def __init__(self, tuple_list): self.tuple_list = tuple_list def __getattr__(self, name): if name not in self.tuple_list: raise AttributeError("'Enum' has no ...
from __future__ import absolute_import, unicode_literals # http://stackoverflow.com/a/22723724/1798491 class Enum(object): def __init__(self, *elements): self.elements = tuple(elements) def __getattr__(self, name): if name not in self.elements: raise AttributeError("'Enum' has no ...
<commit_before>from __future__ import absolute_import, unicode_literals # http://stackoverflow.com/a/22723724/1798491 class Enum(object): def __init__(self, tuple_list): self.tuple_list = tuple_list def __getattr__(self, name): if name not in self.tuple_list: raise AttributeError(...
from __future__ import absolute_import, unicode_literals # http://stackoverflow.com/a/22723724/1798491 class Enum(object): def __init__(self, *elements): self.elements = tuple(elements) def __getattr__(self, name): if name not in self.elements: raise AttributeError("'Enum' has no ...
from __future__ import absolute_import, unicode_literals # http://stackoverflow.com/a/22723724/1798491 class Enum(object): def __init__(self, tuple_list): self.tuple_list = tuple_list def __getattr__(self, name): if name not in self.tuple_list: raise AttributeError("'Enum' has no ...
<commit_before>from __future__ import absolute_import, unicode_literals # http://stackoverflow.com/a/22723724/1798491 class Enum(object): def __init__(self, tuple_list): self.tuple_list = tuple_list def __getattr__(self, name): if name not in self.tuple_list: raise AttributeError(...
70a251ba27641e3c0425c659bb900e17f0f423dd
scripts/create_initial_admin_user.py
scripts/create_initial_admin_user.py
#!/usr/bin/env python """Create an initial user with admin privileges to begin BYCEPS setup. :Copyright: 2006-2019 Jochen Kupperschmidt :License: Modified BSD, see LICENSE for details. """ import click from byceps.database import db from byceps.services.user import creation_service as user_creation_service from byc...
#!/usr/bin/env python """Create an initial user with admin privileges to begin BYCEPS setup. :Copyright: 2006-2019 Jochen Kupperschmidt :License: Modified BSD, see LICENSE for details. """ import click from byceps.services.user import creation_service as user_creation_service from byceps.services.user import servic...
Enable initial user via service so that an event gets written
Enable initial user via service so that an event gets written
Python
bsd-3-clause
homeworkprod/byceps,m-ober/byceps,m-ober/byceps,homeworkprod/byceps,homeworkprod/byceps,m-ober/byceps
#!/usr/bin/env python """Create an initial user with admin privileges to begin BYCEPS setup. :Copyright: 2006-2019 Jochen Kupperschmidt :License: Modified BSD, see LICENSE for details. """ import click from byceps.database import db from byceps.services.user import creation_service as user_creation_service from byc...
#!/usr/bin/env python """Create an initial user with admin privileges to begin BYCEPS setup. :Copyright: 2006-2019 Jochen Kupperschmidt :License: Modified BSD, see LICENSE for details. """ import click from byceps.services.user import creation_service as user_creation_service from byceps.services.user import servic...
<commit_before>#!/usr/bin/env python """Create an initial user with admin privileges to begin BYCEPS setup. :Copyright: 2006-2019 Jochen Kupperschmidt :License: Modified BSD, see LICENSE for details. """ import click from byceps.database import db from byceps.services.user import creation_service as user_creation_s...
#!/usr/bin/env python """Create an initial user with admin privileges to begin BYCEPS setup. :Copyright: 2006-2019 Jochen Kupperschmidt :License: Modified BSD, see LICENSE for details. """ import click from byceps.services.user import creation_service as user_creation_service from byceps.services.user import servic...
#!/usr/bin/env python """Create an initial user with admin privileges to begin BYCEPS setup. :Copyright: 2006-2019 Jochen Kupperschmidt :License: Modified BSD, see LICENSE for details. """ import click from byceps.database import db from byceps.services.user import creation_service as user_creation_service from byc...
<commit_before>#!/usr/bin/env python """Create an initial user with admin privileges to begin BYCEPS setup. :Copyright: 2006-2019 Jochen Kupperschmidt :License: Modified BSD, see LICENSE for details. """ import click from byceps.database import db from byceps.services.user import creation_service as user_creation_s...
65ae8fc33a1fa7297d3e68f7c67ca5c2678e81b7
app/__init__.py
app/__init__.py
from flask import Flask from flask_sqlalchemy import SQLAlchemy from flask_migrate import Migrate from flask_mail import Mail app = Flask(__name__) app.config.from_object('config') db = SQLAlchemy(app) migrate = Migrate(app, db) # Load Flask-Mail mail = Mail(app) from app import views, models
from flask import Flask from flask_sqlalchemy import SQLAlchemy from flask_migrate import Migrate from flask_mail import Mail from flask_user import UserManager, SQLAlchemyAdapter app = Flask(__name__) app.config.from_object('config') db = SQLAlchemy(app) migrate = Migrate(app, db) # Load Flask-Mail mail = Mail(app)...
Set up Flask-User to provide user auth
Set up Flask-User to provide user auth
Python
agpl-3.0
interactomix/iis,interactomix/iis
from flask import Flask from flask_sqlalchemy import SQLAlchemy from flask_migrate import Migrate from flask_mail import Mail app = Flask(__name__) app.config.from_object('config') db = SQLAlchemy(app) migrate = Migrate(app, db) # Load Flask-Mail mail = Mail(app) from app import views, models Set up Flask-User to...
from flask import Flask from flask_sqlalchemy import SQLAlchemy from flask_migrate import Migrate from flask_mail import Mail from flask_user import UserManager, SQLAlchemyAdapter app = Flask(__name__) app.config.from_object('config') db = SQLAlchemy(app) migrate = Migrate(app, db) # Load Flask-Mail mail = Mail(app)...
<commit_before>from flask import Flask from flask_sqlalchemy import SQLAlchemy from flask_migrate import Migrate from flask_mail import Mail app = Flask(__name__) app.config.from_object('config') db = SQLAlchemy(app) migrate = Migrate(app, db) # Load Flask-Mail mail = Mail(app) from app import views, models <comm...
from flask import Flask from flask_sqlalchemy import SQLAlchemy from flask_migrate import Migrate from flask_mail import Mail from flask_user import UserManager, SQLAlchemyAdapter app = Flask(__name__) app.config.from_object('config') db = SQLAlchemy(app) migrate = Migrate(app, db) # Load Flask-Mail mail = Mail(app)...
from flask import Flask from flask_sqlalchemy import SQLAlchemy from flask_migrate import Migrate from flask_mail import Mail app = Flask(__name__) app.config.from_object('config') db = SQLAlchemy(app) migrate = Migrate(app, db) # Load Flask-Mail mail = Mail(app) from app import views, models Set up Flask-User to...
<commit_before>from flask import Flask from flask_sqlalchemy import SQLAlchemy from flask_migrate import Migrate from flask_mail import Mail app = Flask(__name__) app.config.from_object('config') db = SQLAlchemy(app) migrate = Migrate(app, db) # Load Flask-Mail mail = Mail(app) from app import views, models <comm...
d2e82419a8f1b7ead32a43e6a03ebe8093374840
opps/channels/forms.py
opps/channels/forms.py
#!/usr/bin/env python # -*- coding: utf-8 -*- from django import forms from django.utils.translation import ugettext_lazy as _ from .models import Channel class ChannelAdminForm(forms.ModelForm): layout = forms.ChoiceField(choices=(('default', _('Default')),)) class Meta: model = Channel
#!/usr/bin/env python # -*- coding: utf-8 -*- from django import forms from django.utils.translation import ugettext_lazy as _ from .models import Channel class ChannelAdminForm(forms.ModelForm): layout = forms.ChoiceField(choices=(('default', _('Default')),)) def __init__(self, *args, **kwargs): su...
Set slug field readonly after channel create
Set slug field readonly after channel create
Python
mit
williamroot/opps,jeanmask/opps,YACOWS/opps,williamroot/opps,williamroot/opps,YACOWS/opps,jeanmask/opps,jeanmask/opps,jeanmask/opps,opps/opps,williamroot/opps,opps/opps,YACOWS/opps,opps/opps,opps/opps,YACOWS/opps
#!/usr/bin/env python # -*- coding: utf-8 -*- from django import forms from django.utils.translation import ugettext_lazy as _ from .models import Channel class ChannelAdminForm(forms.ModelForm): layout = forms.ChoiceField(choices=(('default', _('Default')),)) class Meta: model = Channel Set slug fi...
#!/usr/bin/env python # -*- coding: utf-8 -*- from django import forms from django.utils.translation import ugettext_lazy as _ from .models import Channel class ChannelAdminForm(forms.ModelForm): layout = forms.ChoiceField(choices=(('default', _('Default')),)) def __init__(self, *args, **kwargs): su...
<commit_before>#!/usr/bin/env python # -*- coding: utf-8 -*- from django import forms from django.utils.translation import ugettext_lazy as _ from .models import Channel class ChannelAdminForm(forms.ModelForm): layout = forms.ChoiceField(choices=(('default', _('Default')),)) class Meta: model = Chan...
#!/usr/bin/env python # -*- coding: utf-8 -*- from django import forms from django.utils.translation import ugettext_lazy as _ from .models import Channel class ChannelAdminForm(forms.ModelForm): layout = forms.ChoiceField(choices=(('default', _('Default')),)) def __init__(self, *args, **kwargs): su...
#!/usr/bin/env python # -*- coding: utf-8 -*- from django import forms from django.utils.translation import ugettext_lazy as _ from .models import Channel class ChannelAdminForm(forms.ModelForm): layout = forms.ChoiceField(choices=(('default', _('Default')),)) class Meta: model = Channel Set slug fi...
<commit_before>#!/usr/bin/env python # -*- coding: utf-8 -*- from django import forms from django.utils.translation import ugettext_lazy as _ from .models import Channel class ChannelAdminForm(forms.ModelForm): layout = forms.ChoiceField(choices=(('default', _('Default')),)) class Meta: model = Chan...
c9284827eeec90a253157286214bc1d17771db24
neutron/tests/api/test_service_type_management.py
neutron/tests/api/test_service_type_management.py
# Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # d...
# Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # d...
Remove skip of service-type management API test
Remove skip of service-type management API test Advanced services split is complete so remove the skip for the service-type management API test. (Yes, there is only one placeholder test. More tests need to be developed.) Also remove the obsolete 'JSON' suffix from the test class. Closes-bug: 1400370 Change-Id: I5b...
Python
apache-2.0
NeCTAR-RC/neutron,apporc/neutron,takeshineshiro/neutron,mmnelemane/neutron,barnsnake351/neutron,glove747/liberty-neutron,sasukeh/neutron,SamYaple/neutron,dhanunjaya/neutron,swdream/neutron,noironetworks/neutron,bgxavier/neutron,chitr/neutron,eonpatapon/neutron,glove747/liberty-neutron,paninetworks/neutron,antonioUnina/...
# Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # d...
# Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # d...
<commit_before># Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, ...
# Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # d...
# Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # d...
<commit_before># Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, ...
c75a244247988dbce68aa7985241712d8c94a24a
Lib/distutils/command/install_ext.py
Lib/distutils/command/install_ext.py
"""install_ext Implement the Distutils "install_ext" command to install extension modules.""" # created 1999/09/12, Greg Ward __revision__ = "$Id$" from distutils.core import Command from distutils.util import copy_tree class install_ext (Command): description = "install C/C++ extension modules" user...
"""install_ext Implement the Distutils "install_ext" command to install extension modules.""" # created 1999/09/12, Greg Ward __revision__ = "$Id$" from distutils.core import Command from distutils.util import copy_tree class install_ext (Command): description = "install C/C++ extension modules" user...
Fix how we set 'build_dir' and 'install_dir' options from 'install' options -- irrelevant because this file is about to go away, but oh well.
Fix how we set 'build_dir' and 'install_dir' options from 'install' options -- irrelevant because this file is about to go away, but oh well.
Python
mit
sk-/python2.7-type-annotator,sk-/python2.7-type-annotator,sk-/python2.7-type-annotator
"""install_ext Implement the Distutils "install_ext" command to install extension modules.""" # created 1999/09/12, Greg Ward __revision__ = "$Id$" from distutils.core import Command from distutils.util import copy_tree class install_ext (Command): description = "install C/C++ extension modules" user...
"""install_ext Implement the Distutils "install_ext" command to install extension modules.""" # created 1999/09/12, Greg Ward __revision__ = "$Id$" from distutils.core import Command from distutils.util import copy_tree class install_ext (Command): description = "install C/C++ extension modules" user...
<commit_before>"""install_ext Implement the Distutils "install_ext" command to install extension modules.""" # created 1999/09/12, Greg Ward __revision__ = "$Id$" from distutils.core import Command from distutils.util import copy_tree class install_ext (Command): description = "install C/C++ extension modules...
"""install_ext Implement the Distutils "install_ext" command to install extension modules.""" # created 1999/09/12, Greg Ward __revision__ = "$Id$" from distutils.core import Command from distutils.util import copy_tree class install_ext (Command): description = "install C/C++ extension modules" user...
"""install_ext Implement the Distutils "install_ext" command to install extension modules.""" # created 1999/09/12, Greg Ward __revision__ = "$Id$" from distutils.core import Command from distutils.util import copy_tree class install_ext (Command): description = "install C/C++ extension modules" user...
<commit_before>"""install_ext Implement the Distutils "install_ext" command to install extension modules.""" # created 1999/09/12, Greg Ward __revision__ = "$Id$" from distutils.core import Command from distutils.util import copy_tree class install_ext (Command): description = "install C/C++ extension modules...
a619d5b35eb88ab71126e53f195190536d71fdb4
orionsdk/swisclient.py
orionsdk/swisclient.py
import requests import json from datetime import datetime def _json_serial(obj): """JSON serializer for objects not serializable by default json code""" if isinstance(obj, datetime): serial = obj.isoformat() return serial class SwisClient: def __init__(self, hostname, username, password,...
import requests import json from datetime import datetime def _json_serial(obj): """JSON serializer for objects not serializable by default json code""" if isinstance(obj, datetime): serial = obj.isoformat() return serial class SwisClient: def __init__(self, hostname, username, password,...
Throw exceptions error responses from server
Throw exceptions error responses from server
Python
apache-2.0
solarwinds/orionsdk-python
import requests import json from datetime import datetime def _json_serial(obj): """JSON serializer for objects not serializable by default json code""" if isinstance(obj, datetime): serial = obj.isoformat() return serial class SwisClient: def __init__(self, hostname, username, password,...
import requests import json from datetime import datetime def _json_serial(obj): """JSON serializer for objects not serializable by default json code""" if isinstance(obj, datetime): serial = obj.isoformat() return serial class SwisClient: def __init__(self, hostname, username, password,...
<commit_before>import requests import json from datetime import datetime def _json_serial(obj): """JSON serializer for objects not serializable by default json code""" if isinstance(obj, datetime): serial = obj.isoformat() return serial class SwisClient: def __init__(self, hostname, user...
import requests import json from datetime import datetime def _json_serial(obj): """JSON serializer for objects not serializable by default json code""" if isinstance(obj, datetime): serial = obj.isoformat() return serial class SwisClient: def __init__(self, hostname, username, password,...
import requests import json from datetime import datetime def _json_serial(obj): """JSON serializer for objects not serializable by default json code""" if isinstance(obj, datetime): serial = obj.isoformat() return serial class SwisClient: def __init__(self, hostname, username, password,...
<commit_before>import requests import json from datetime import datetime def _json_serial(obj): """JSON serializer for objects not serializable by default json code""" if isinstance(obj, datetime): serial = obj.isoformat() return serial class SwisClient: def __init__(self, hostname, user...
8e6237288dae3964cdd0a36e747f53f11b285073
callee/__init__.py
callee/__init__.py
""" callee """ __version__ = "0.0.1" __description__ = "Argument matcher for unittest.mock" __author__ = "Karol Kuczmarski" __license__ = "Simplified BSD" from callee.base import And, Or, Not from callee.general import \ Any, ArgThat, IsA, Inherits, InstanceOf, Matching, SubclassOf from callee.strings import Byte...
""" callee """ __version__ = "0.0.1" __description__ = "Argument matcher for unittest.mock" __author__ = "Karol Kuczmarski" __license__ = "Simplified BSD" from callee.base import And, Or, Not from callee.collections import Dict, List, Mapping, Iterable, Sequence, Set from callee.general import \ Any, ArgThat, IsA...
Include recently added matchers in callee.__all__
Include recently added matchers in callee.__all__
Python
bsd-3-clause
Xion/callee
""" callee """ __version__ = "0.0.1" __description__ = "Argument matcher for unittest.mock" __author__ = "Karol Kuczmarski" __license__ = "Simplified BSD" from callee.base import And, Or, Not from callee.general import \ Any, ArgThat, IsA, Inherits, InstanceOf, Matching, SubclassOf from callee.strings import Byte...
""" callee """ __version__ = "0.0.1" __description__ = "Argument matcher for unittest.mock" __author__ = "Karol Kuczmarski" __license__ = "Simplified BSD" from callee.base import And, Or, Not from callee.collections import Dict, List, Mapping, Iterable, Sequence, Set from callee.general import \ Any, ArgThat, IsA...
<commit_before>""" callee """ __version__ = "0.0.1" __description__ = "Argument matcher for unittest.mock" __author__ = "Karol Kuczmarski" __license__ = "Simplified BSD" from callee.base import And, Or, Not from callee.general import \ Any, ArgThat, IsA, Inherits, InstanceOf, Matching, SubclassOf from callee.stri...
""" callee """ __version__ = "0.0.1" __description__ = "Argument matcher for unittest.mock" __author__ = "Karol Kuczmarski" __license__ = "Simplified BSD" from callee.base import And, Or, Not from callee.collections import Dict, List, Mapping, Iterable, Sequence, Set from callee.general import \ Any, ArgThat, IsA...
""" callee """ __version__ = "0.0.1" __description__ = "Argument matcher for unittest.mock" __author__ = "Karol Kuczmarski" __license__ = "Simplified BSD" from callee.base import And, Or, Not from callee.general import \ Any, ArgThat, IsA, Inherits, InstanceOf, Matching, SubclassOf from callee.strings import Byte...
<commit_before>""" callee """ __version__ = "0.0.1" __description__ = "Argument matcher for unittest.mock" __author__ = "Karol Kuczmarski" __license__ = "Simplified BSD" from callee.base import And, Or, Not from callee.general import \ Any, ArgThat, IsA, Inherits, InstanceOf, Matching, SubclassOf from callee.stri...
2a2a1c9ad37932bf300caf02419dd55a463d46d1
src/tmod_tools/__main__.py
src/tmod_tools/__main__.py
""" Entrypoint module, in case you use `python -mtmod_tools`. Why does this file exist, and why __main__? For more info, read: - https://www.python.org/dev/peps/pep-0338/ - https://docs.python.org/2/using/cmdline.html#cmdoption-m - https://docs.python.org/3/using/cmdline.html#cmdoption-m """ from tmod_tools.cli impo...
""" Entrypoint module, in case you use `python -mtmod_tools`. Why does this file exist, and why __main__? For more info, read: - https://www.python.org/dev/peps/pep-0338/ - https://docs.python.org/2/using/cmdline.html#cmdoption-m - https://docs.python.org/3/using/cmdline.html#cmdoption-m """ from tmod_tools.cli impo...
Add nocov for lines that will never normally run
Add nocov for lines that will never normally run
Python
isc
mystfox/python-tmod-tools
""" Entrypoint module, in case you use `python -mtmod_tools`. Why does this file exist, and why __main__? For more info, read: - https://www.python.org/dev/peps/pep-0338/ - https://docs.python.org/2/using/cmdline.html#cmdoption-m - https://docs.python.org/3/using/cmdline.html#cmdoption-m """ from tmod_tools.cli impo...
""" Entrypoint module, in case you use `python -mtmod_tools`. Why does this file exist, and why __main__? For more info, read: - https://www.python.org/dev/peps/pep-0338/ - https://docs.python.org/2/using/cmdline.html#cmdoption-m - https://docs.python.org/3/using/cmdline.html#cmdoption-m """ from tmod_tools.cli impo...
<commit_before>""" Entrypoint module, in case you use `python -mtmod_tools`. Why does this file exist, and why __main__? For more info, read: - https://www.python.org/dev/peps/pep-0338/ - https://docs.python.org/2/using/cmdline.html#cmdoption-m - https://docs.python.org/3/using/cmdline.html#cmdoption-m """ from tmod...
""" Entrypoint module, in case you use `python -mtmod_tools`. Why does this file exist, and why __main__? For more info, read: - https://www.python.org/dev/peps/pep-0338/ - https://docs.python.org/2/using/cmdline.html#cmdoption-m - https://docs.python.org/3/using/cmdline.html#cmdoption-m """ from tmod_tools.cli impo...
""" Entrypoint module, in case you use `python -mtmod_tools`. Why does this file exist, and why __main__? For more info, read: - https://www.python.org/dev/peps/pep-0338/ - https://docs.python.org/2/using/cmdline.html#cmdoption-m - https://docs.python.org/3/using/cmdline.html#cmdoption-m """ from tmod_tools.cli impo...
<commit_before>""" Entrypoint module, in case you use `python -mtmod_tools`. Why does this file exist, and why __main__? For more info, read: - https://www.python.org/dev/peps/pep-0338/ - https://docs.python.org/2/using/cmdline.html#cmdoption-m - https://docs.python.org/3/using/cmdline.html#cmdoption-m """ from tmod...
f1372842fa1c3eef11f4e9dbe2b35af02c1c5bf5
mdot_rest/migrations/0003_auto_20150723_1759.py
mdot_rest/migrations/0003_auto_20150723_1759.py
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations class Migration(migrations.Migration): dependencies = [ ('mdot_rest', '0002_auto_20150722_2054'), ] operations = [ migrations.RemoveField( model_name='resourcelink', ...
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations class Migration(migrations.Migration): dependencies = [ ('mdot_rest', '0002_auto_20150722_2054'), ] operations = [ migrations.RemoveField( model_name='resourcelink', ...
Fix the migration so it takes care of bad default for resource links.
Fix the migration so it takes care of bad default for resource links.
Python
apache-2.0
uw-it-aca/mdot-rest,uw-it-aca/mdot-rest
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations class Migration(migrations.Migration): dependencies = [ ('mdot_rest', '0002_auto_20150722_2054'), ] operations = [ migrations.RemoveField( model_name='resourcelink', ...
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations class Migration(migrations.Migration): dependencies = [ ('mdot_rest', '0002_auto_20150722_2054'), ] operations = [ migrations.RemoveField( model_name='resourcelink', ...
<commit_before># -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations class Migration(migrations.Migration): dependencies = [ ('mdot_rest', '0002_auto_20150722_2054'), ] operations = [ migrations.RemoveField( model_name='reso...
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations class Migration(migrations.Migration): dependencies = [ ('mdot_rest', '0002_auto_20150722_2054'), ] operations = [ migrations.RemoveField( model_name='resourcelink', ...
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations class Migration(migrations.Migration): dependencies = [ ('mdot_rest', '0002_auto_20150722_2054'), ] operations = [ migrations.RemoveField( model_name='resourcelink', ...
<commit_before># -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations class Migration(migrations.Migration): dependencies = [ ('mdot_rest', '0002_auto_20150722_2054'), ] operations = [ migrations.RemoveField( model_name='reso...
3fd2d1cade716f264b2febc3627b1443a1d3e604
taiga/projects/migrations/0043_auto_20160530_1004.py
taiga/projects/migrations/0043_auto_20160530_1004.py
# -*- coding: utf-8 -*- # Generated by Django 1.9.2 on 2016-05-30 10:04 from __future__ import unicode_literals from django.conf import settings from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ('projects', '0042_auto_20160...
# -*- coding: utf-8 -*- # Generated by Django 1.9.2 on 2016-05-30 10:04 from __future__ import unicode_literals from django.conf import settings from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ('projects', '0040_remove_mem...
Fix a problem with a migration between master and stable branch
Fix a problem with a migration between master and stable branch
Python
agpl-3.0
taigaio/taiga-back,dayatz/taiga-back,xdevelsistemas/taiga-back-community,taigaio/taiga-back,taigaio/taiga-back,dayatz/taiga-back,dayatz/taiga-back,xdevelsistemas/taiga-back-community,xdevelsistemas/taiga-back-community
# -*- coding: utf-8 -*- # Generated by Django 1.9.2 on 2016-05-30 10:04 from __future__ import unicode_literals from django.conf import settings from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ('projects', '0042_auto_20160...
# -*- coding: utf-8 -*- # Generated by Django 1.9.2 on 2016-05-30 10:04 from __future__ import unicode_literals from django.conf import settings from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ('projects', '0040_remove_mem...
<commit_before># -*- coding: utf-8 -*- # Generated by Django 1.9.2 on 2016-05-30 10:04 from __future__ import unicode_literals from django.conf import settings from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ('projects', '...
# -*- coding: utf-8 -*- # Generated by Django 1.9.2 on 2016-05-30 10:04 from __future__ import unicode_literals from django.conf import settings from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ('projects', '0040_remove_mem...
# -*- coding: utf-8 -*- # Generated by Django 1.9.2 on 2016-05-30 10:04 from __future__ import unicode_literals from django.conf import settings from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ('projects', '0042_auto_20160...
<commit_before># -*- coding: utf-8 -*- # Generated by Django 1.9.2 on 2016-05-30 10:04 from __future__ import unicode_literals from django.conf import settings from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ('projects', '...
6916a3fb24a12ce3c0261034c1dcaae57a8cd0ee
docs/examples/kernel/task2.py
docs/examples/kernel/task2.py
#!/usr/bin/env python # encoding: utf-8 from IPython.kernel import client import time tc = client.TaskClient() mec = client.MultiEngineClient() mec.execute('import time') for i in range(24): tc.run(client.StringTask('time.sleep(1)')) for i in range(6): time.sleep(1.0) print "Queue status (vebose=False)...
#!/usr/bin/env python # encoding: utf-8 from IPython.kernel import client import time import sys flush = sys.stdout.flush tc = client.TaskClient() mec = client.MultiEngineClient() mec.execute('import time') for i in range(24): tc.run(client.StringTask('time.sleep(1)')) for i in range(6): time.sleep(1.0) ...
Add stdout flushing statements to example.
Add stdout flushing statements to example. This forces the prints to happen right away, so the example behaves a little more like you'd expect.
Python
bsd-3-clause
ipython/ipython,ipython/ipython
#!/usr/bin/env python # encoding: utf-8 from IPython.kernel import client import time tc = client.TaskClient() mec = client.MultiEngineClient() mec.execute('import time') for i in range(24): tc.run(client.StringTask('time.sleep(1)')) for i in range(6): time.sleep(1.0) print "Queue status (vebose=False)...
#!/usr/bin/env python # encoding: utf-8 from IPython.kernel import client import time import sys flush = sys.stdout.flush tc = client.TaskClient() mec = client.MultiEngineClient() mec.execute('import time') for i in range(24): tc.run(client.StringTask('time.sleep(1)')) for i in range(6): time.sleep(1.0) ...
<commit_before>#!/usr/bin/env python # encoding: utf-8 from IPython.kernel import client import time tc = client.TaskClient() mec = client.MultiEngineClient() mec.execute('import time') for i in range(24): tc.run(client.StringTask('time.sleep(1)')) for i in range(6): time.sleep(1.0) print "Queue status...
#!/usr/bin/env python # encoding: utf-8 from IPython.kernel import client import time import sys flush = sys.stdout.flush tc = client.TaskClient() mec = client.MultiEngineClient() mec.execute('import time') for i in range(24): tc.run(client.StringTask('time.sleep(1)')) for i in range(6): time.sleep(1.0) ...
#!/usr/bin/env python # encoding: utf-8 from IPython.kernel import client import time tc = client.TaskClient() mec = client.MultiEngineClient() mec.execute('import time') for i in range(24): tc.run(client.StringTask('time.sleep(1)')) for i in range(6): time.sleep(1.0) print "Queue status (vebose=False)...
<commit_before>#!/usr/bin/env python # encoding: utf-8 from IPython.kernel import client import time tc = client.TaskClient() mec = client.MultiEngineClient() mec.execute('import time') for i in range(24): tc.run(client.StringTask('time.sleep(1)')) for i in range(6): time.sleep(1.0) print "Queue status...
f7e85968a3256485276858ebfa9ef9cc538e2ee2
blimp/urls.py
blimp/urls.py
from django.conf.urls import patterns, include from django.views.generic import TemplateView from django.contrib import admin admin.autodiscover() urlpatterns = patterns( # Prefix '', (r'^admin/', include(admin.site.urls)), (r'^api/', include('blimp.router')), (r'', include('blimp.users.urls'))...
from django.conf.urls import patterns, include from django.views.generic import TemplateView from django.contrib import admin admin.autodiscover() urlpatterns = patterns( # Prefix '', (r'^admin/', include(admin.site.urls)), (r'^api/', include('blimp.router')), (r'', include('blimp.users.urls'))...
Fix catch all URL to allow APPEND_SLASH to work
Fix catch all URL to allow APPEND_SLASH to work
Python
agpl-3.0
jessamynsmith/boards-backend,jessamynsmith/boards-backend,GetBlimp/boards-backend
from django.conf.urls import patterns, include from django.views.generic import TemplateView from django.contrib import admin admin.autodiscover() urlpatterns = patterns( # Prefix '', (r'^admin/', include(admin.site.urls)), (r'^api/', include('blimp.router')), (r'', include('blimp.users.urls'))...
from django.conf.urls import patterns, include from django.views.generic import TemplateView from django.contrib import admin admin.autodiscover() urlpatterns = patterns( # Prefix '', (r'^admin/', include(admin.site.urls)), (r'^api/', include('blimp.router')), (r'', include('blimp.users.urls'))...
<commit_before>from django.conf.urls import patterns, include from django.views.generic import TemplateView from django.contrib import admin admin.autodiscover() urlpatterns = patterns( # Prefix '', (r'^admin/', include(admin.site.urls)), (r'^api/', include('blimp.router')), (r'', include('blim...
from django.conf.urls import patterns, include from django.views.generic import TemplateView from django.contrib import admin admin.autodiscover() urlpatterns = patterns( # Prefix '', (r'^admin/', include(admin.site.urls)), (r'^api/', include('blimp.router')), (r'', include('blimp.users.urls'))...
from django.conf.urls import patterns, include from django.views.generic import TemplateView from django.contrib import admin admin.autodiscover() urlpatterns = patterns( # Prefix '', (r'^admin/', include(admin.site.urls)), (r'^api/', include('blimp.router')), (r'', include('blimp.users.urls'))...
<commit_before>from django.conf.urls import patterns, include from django.views.generic import TemplateView from django.contrib import admin admin.autodiscover() urlpatterns = patterns( # Prefix '', (r'^admin/', include(admin.site.urls)), (r'^api/', include('blimp.router')), (r'', include('blim...
306c56883939be640512f3d835b8d3f6b93b4ad7
judge/signals.py
judge/signals.py
from django.core.cache.utils import make_template_fragment_key from django.db.models.signals import post_save from django.dispatch import receiver from django.core.cache import cache from .models import Problem, Contest, Submission, Organization from .caching import update_submission @receiver(post_save, sender=Probl...
from django.core.cache.utils import make_template_fragment_key from django.db.models.signals import post_save from django.dispatch import receiver from django.core.cache import cache from .models import Problem, Contest, Submission, Organization, Profile from .caching import update_submission @receiver(post_save, sen...
Clear cache when user changes info.
Clear cache when user changes info.
Python
agpl-3.0
Minkov/site,monouno/site,DMOJ/site,DMOJ/site,Phoenix1369/site,DMOJ/site,Phoenix1369/site,monouno/site,monouno/site,Phoenix1369/site,Minkov/site,Minkov/site,Phoenix1369/site,Minkov/site,monouno/site,monouno/site,DMOJ/site
from django.core.cache.utils import make_template_fragment_key from django.db.models.signals import post_save from django.dispatch import receiver from django.core.cache import cache from .models import Problem, Contest, Submission, Organization from .caching import update_submission @receiver(post_save, sender=Probl...
from django.core.cache.utils import make_template_fragment_key from django.db.models.signals import post_save from django.dispatch import receiver from django.core.cache import cache from .models import Problem, Contest, Submission, Organization, Profile from .caching import update_submission @receiver(post_save, sen...
<commit_before>from django.core.cache.utils import make_template_fragment_key from django.db.models.signals import post_save from django.dispatch import receiver from django.core.cache import cache from .models import Problem, Contest, Submission, Organization from .caching import update_submission @receiver(post_sav...
from django.core.cache.utils import make_template_fragment_key from django.db.models.signals import post_save from django.dispatch import receiver from django.core.cache import cache from .models import Problem, Contest, Submission, Organization, Profile from .caching import update_submission @receiver(post_save, sen...
from django.core.cache.utils import make_template_fragment_key from django.db.models.signals import post_save from django.dispatch import receiver from django.core.cache import cache from .models import Problem, Contest, Submission, Organization from .caching import update_submission @receiver(post_save, sender=Probl...
<commit_before>from django.core.cache.utils import make_template_fragment_key from django.db.models.signals import post_save from django.dispatch import receiver from django.core.cache import cache from .models import Problem, Contest, Submission, Organization from .caching import update_submission @receiver(post_sav...
23f734419ac3814e09ef3763fb666a3620ac1c01
scripts/osfstorage/correct_moved_node_settings.py
scripts/osfstorage/correct_moved_node_settings.py
import sys import logging from scripts import utils as script_utils from framework.transactions.context import TokuTransaction from website.app import init_app from website.addons.osfstorage import model logger = logging.getLogger(__name__) def do_migration(): for node_settings in model.OsfStorageNodeSettings.f...
import sys import logging from scripts import utils as script_utils from framework.transactions.context import TokuTransaction from website.app import init_app from website.addons.osfstorage import model logger = logging.getLogger(__name__) def do_migration(): count = 0 errored = 0 for node_settings in ...
Add count and allow errors to pass for now
Add count and allow errors to pass for now [skip ci]
Python
apache-2.0
pattisdr/osf.io,abought/osf.io,DanielSBrown/osf.io,samanehsan/osf.io,billyhunt/osf.io,brandonPurvis/osf.io,samchrisinger/osf.io,brandonPurvis/osf.io,mattclark/osf.io,emetsger/osf.io,brianjgeiger/osf.io,mfraezz/osf.io,jmcarp/osf.io,acshi/osf.io,crcresearch/osf.io,sbt9uc/osf.io,mluke93/osf.io,haoyuchen1992/osf.io,acshi/o...
import sys import logging from scripts import utils as script_utils from framework.transactions.context import TokuTransaction from website.app import init_app from website.addons.osfstorage import model logger = logging.getLogger(__name__) def do_migration(): for node_settings in model.OsfStorageNodeSettings.f...
import sys import logging from scripts import utils as script_utils from framework.transactions.context import TokuTransaction from website.app import init_app from website.addons.osfstorage import model logger = logging.getLogger(__name__) def do_migration(): count = 0 errored = 0 for node_settings in ...
<commit_before>import sys import logging from scripts import utils as script_utils from framework.transactions.context import TokuTransaction from website.app import init_app from website.addons.osfstorage import model logger = logging.getLogger(__name__) def do_migration(): for node_settings in model.OsfStorag...
import sys import logging from scripts import utils as script_utils from framework.transactions.context import TokuTransaction from website.app import init_app from website.addons.osfstorage import model logger = logging.getLogger(__name__) def do_migration(): count = 0 errored = 0 for node_settings in ...
import sys import logging from scripts import utils as script_utils from framework.transactions.context import TokuTransaction from website.app import init_app from website.addons.osfstorage import model logger = logging.getLogger(__name__) def do_migration(): for node_settings in model.OsfStorageNodeSettings.f...
<commit_before>import sys import logging from scripts import utils as script_utils from framework.transactions.context import TokuTransaction from website.app import init_app from website.addons.osfstorage import model logger = logging.getLogger(__name__) def do_migration(): for node_settings in model.OsfStorag...
fab10307cac59f758a5b36cf3fe5b80874f026b2
script/dependencies.py
script/dependencies.py
#!/usr/bin/env python import os dependencies = ( ('bins/el-rando', 'https://github.com/EvanHahn/el-rando.git'), ('bins/is_github_up', 'https://github.com/EvanHahn/is-GitHub-up.git'), ('bins/iscp', 'https://github.com/EvanHahn/iscp.git'), ('bins/journ', 'https://github.com/EvanHahn/journ.git'), ('b...
#!/usr/bin/env python import os dependencies = ( ('resources/vim/bundle/neobundle.vim', 'https://github.com/Shougo/neobundle.vim'), ('resources/zsh/zsh-syntax-highlighting', 'git://github.com/zsh-users/zsh-syntax-highlighting.git'), ('bins/el-rando', 'https://github.com/EvanHahn/el-rando....
Switch to automated git clone and pull
Switch to automated git clone and pull
Python
unlicense
EvanHahn/dotfiles,EvanHahn/dotfiles,EvanHahn/dotfiles,EvanHahn/dotfiles
#!/usr/bin/env python import os dependencies = ( ('bins/el-rando', 'https://github.com/EvanHahn/el-rando.git'), ('bins/is_github_up', 'https://github.com/EvanHahn/is-GitHub-up.git'), ('bins/iscp', 'https://github.com/EvanHahn/iscp.git'), ('bins/journ', 'https://github.com/EvanHahn/journ.git'), ('b...
#!/usr/bin/env python import os dependencies = ( ('resources/vim/bundle/neobundle.vim', 'https://github.com/Shougo/neobundle.vim'), ('resources/zsh/zsh-syntax-highlighting', 'git://github.com/zsh-users/zsh-syntax-highlighting.git'), ('bins/el-rando', 'https://github.com/EvanHahn/el-rando....
<commit_before>#!/usr/bin/env python import os dependencies = ( ('bins/el-rando', 'https://github.com/EvanHahn/el-rando.git'), ('bins/is_github_up', 'https://github.com/EvanHahn/is-GitHub-up.git'), ('bins/iscp', 'https://github.com/EvanHahn/iscp.git'), ('bins/journ', 'https://github.com/EvanHahn/journ...
#!/usr/bin/env python import os dependencies = ( ('resources/vim/bundle/neobundle.vim', 'https://github.com/Shougo/neobundle.vim'), ('resources/zsh/zsh-syntax-highlighting', 'git://github.com/zsh-users/zsh-syntax-highlighting.git'), ('bins/el-rando', 'https://github.com/EvanHahn/el-rando....
#!/usr/bin/env python import os dependencies = ( ('bins/el-rando', 'https://github.com/EvanHahn/el-rando.git'), ('bins/is_github_up', 'https://github.com/EvanHahn/is-GitHub-up.git'), ('bins/iscp', 'https://github.com/EvanHahn/iscp.git'), ('bins/journ', 'https://github.com/EvanHahn/journ.git'), ('b...
<commit_before>#!/usr/bin/env python import os dependencies = ( ('bins/el-rando', 'https://github.com/EvanHahn/el-rando.git'), ('bins/is_github_up', 'https://github.com/EvanHahn/is-GitHub-up.git'), ('bins/iscp', 'https://github.com/EvanHahn/iscp.git'), ('bins/journ', 'https://github.com/EvanHahn/journ...
776150670026aae3fd53b75df6024bee32a677b5
examples/image_test.py
examples/image_test.py
import sys import os import pyglet.window from pyglet.gl import * from pyglet import clock from pyglet.ext.scene2d import Image2d from ctypes import * if len(sys.argv) != 2: print 'Usage: %s <PNG/JPEG filename>'%sys.argv[0] sys.exit() window = pyglet.window.Window(width=400, height=400) image = Image2d.loa...
import sys import os import ctypes import pyglet.window from pyglet.gl import * from pyglet import clock from pyglet import image if len(sys.argv) != 2: print 'Usage: %s <PNG/JPEG filename>'%sys.argv[0] sys.exit() window = pyglet.window.Window(width=400, height=400) image = image.load(sys.argv[1]) imx = imy ...
Use the core, make example more useful.
Use the core, make example more useful.
Python
bsd-3-clause
theblacklion/pyglet,mammadori/pyglet,mammadori/pyglet,oktayacikalin/pyglet,theblacklion/pyglet,oktayacikalin/pyglet,theblacklion/pyglet,theblacklion/pyglet,mammadori/pyglet,theblacklion/pyglet,oktayacikalin/pyglet,mammadori/pyglet,oktayacikalin/pyglet,oktayacikalin/pyglet
import sys import os import pyglet.window from pyglet.gl import * from pyglet import clock from pyglet.ext.scene2d import Image2d from ctypes import * if len(sys.argv) != 2: print 'Usage: %s <PNG/JPEG filename>'%sys.argv[0] sys.exit() window = pyglet.window.Window(width=400, height=400) image = Image2d.loa...
import sys import os import ctypes import pyglet.window from pyglet.gl import * from pyglet import clock from pyglet import image if len(sys.argv) != 2: print 'Usage: %s <PNG/JPEG filename>'%sys.argv[0] sys.exit() window = pyglet.window.Window(width=400, height=400) image = image.load(sys.argv[1]) imx = imy ...
<commit_before>import sys import os import pyglet.window from pyglet.gl import * from pyglet import clock from pyglet.ext.scene2d import Image2d from ctypes import * if len(sys.argv) != 2: print 'Usage: %s <PNG/JPEG filename>'%sys.argv[0] sys.exit() window = pyglet.window.Window(width=400, height=400) imag...
import sys import os import ctypes import pyglet.window from pyglet.gl import * from pyglet import clock from pyglet import image if len(sys.argv) != 2: print 'Usage: %s <PNG/JPEG filename>'%sys.argv[0] sys.exit() window = pyglet.window.Window(width=400, height=400) image = image.load(sys.argv[1]) imx = imy ...
import sys import os import pyglet.window from pyglet.gl import * from pyglet import clock from pyglet.ext.scene2d import Image2d from ctypes import * if len(sys.argv) != 2: print 'Usage: %s <PNG/JPEG filename>'%sys.argv[0] sys.exit() window = pyglet.window.Window(width=400, height=400) image = Image2d.loa...
<commit_before>import sys import os import pyglet.window from pyglet.gl import * from pyglet import clock from pyglet.ext.scene2d import Image2d from ctypes import * if len(sys.argv) != 2: print 'Usage: %s <PNG/JPEG filename>'%sys.argv[0] sys.exit() window = pyglet.window.Window(width=400, height=400) imag...
051aa6ca11bda22f4ea04775826f0f64152fef24
scripts/has_open_pr.py
scripts/has_open_pr.py
import argparse import os import sys from github3 import login class HasOpenPull(object): def __init__(self): self._init_github() def _init_github(self): username = os.environ.get('GITHUB_USERNAME') password = os.environ.get('GITHUB_PASSWORD') if not username or not password: ...
import argparse import os import sys from github3 import login class HasOpenPull(object): def __init__(self): self._init_github() def _init_github(self): username = os.environ.get('GITHUB_USERNAME') password = os.environ.get('GITHUB_PASSWORD') if not username or not password: ...
Add comment about new script logic [skip CumulusCI-Test]
Add comment about new script logic [skip CumulusCI-Test]
Python
bsd-3-clause
e02d96ec16/CumulusCI,e02d96ec16/CumulusCI,SalesforceFoundation/CumulusCI,SalesforceFoundation/CumulusCI
import argparse import os import sys from github3 import login class HasOpenPull(object): def __init__(self): self._init_github() def _init_github(self): username = os.environ.get('GITHUB_USERNAME') password = os.environ.get('GITHUB_PASSWORD') if not username or not password: ...
import argparse import os import sys from github3 import login class HasOpenPull(object): def __init__(self): self._init_github() def _init_github(self): username = os.environ.get('GITHUB_USERNAME') password = os.environ.get('GITHUB_PASSWORD') if not username or not password: ...
<commit_before>import argparse import os import sys from github3 import login class HasOpenPull(object): def __init__(self): self._init_github() def _init_github(self): username = os.environ.get('GITHUB_USERNAME') password = os.environ.get('GITHUB_PASSWORD') if not username or...
import argparse import os import sys from github3 import login class HasOpenPull(object): def __init__(self): self._init_github() def _init_github(self): username = os.environ.get('GITHUB_USERNAME') password = os.environ.get('GITHUB_PASSWORD') if not username or not password: ...
import argparse import os import sys from github3 import login class HasOpenPull(object): def __init__(self): self._init_github() def _init_github(self): username = os.environ.get('GITHUB_USERNAME') password = os.environ.get('GITHUB_PASSWORD') if not username or not password: ...
<commit_before>import argparse import os import sys from github3 import login class HasOpenPull(object): def __init__(self): self._init_github() def _init_github(self): username = os.environ.get('GITHUB_USERNAME') password = os.environ.get('GITHUB_PASSWORD') if not username or...
7862dbc54ecbe274f36b5142defd0547537bd7cd
tests/test_01_create_index.py
tests/test_01_create_index.py
"""Create an image index. """ import os.path import shutil import filecmp import pytest import photo.index from conftest import tmpdir, gettestdata testimgs = [ "dsc_4623.jpg", "dsc_4664.jpg", "dsc_4831.jpg", "dsc_5126.jpg", "dsc_5167.jpg" ] testimgfiles = [ gettestdata(i) for i in testimgs ] refindex = g...
"""Create an image index. """ import os.path import shutil import filecmp import pytest import photo.index from conftest import tmpdir, gettestdata testimgs = [ "dsc_4623.jpg", "dsc_4664.jpg", "dsc_4831.jpg", "dsc_5126.jpg", "dsc_5167.jpg" ] testimgfiles = [ gettestdata(i) for i in testimgs ] refindex = g...
Add another test creating the index in the current working directory.
Add another test creating the index in the current working directory.
Python
apache-2.0
RKrahl/photo-tools
"""Create an image index. """ import os.path import shutil import filecmp import pytest import photo.index from conftest import tmpdir, gettestdata testimgs = [ "dsc_4623.jpg", "dsc_4664.jpg", "dsc_4831.jpg", "dsc_5126.jpg", "dsc_5167.jpg" ] testimgfiles = [ gettestdata(i) for i in testimgs ] refindex = g...
"""Create an image index. """ import os.path import shutil import filecmp import pytest import photo.index from conftest import tmpdir, gettestdata testimgs = [ "dsc_4623.jpg", "dsc_4664.jpg", "dsc_4831.jpg", "dsc_5126.jpg", "dsc_5167.jpg" ] testimgfiles = [ gettestdata(i) for i in testimgs ] refindex = g...
<commit_before>"""Create an image index. """ import os.path import shutil import filecmp import pytest import photo.index from conftest import tmpdir, gettestdata testimgs = [ "dsc_4623.jpg", "dsc_4664.jpg", "dsc_4831.jpg", "dsc_5126.jpg", "dsc_5167.jpg" ] testimgfiles = [ gettestdata(i) for i in testimgs ...
"""Create an image index. """ import os.path import shutil import filecmp import pytest import photo.index from conftest import tmpdir, gettestdata testimgs = [ "dsc_4623.jpg", "dsc_4664.jpg", "dsc_4831.jpg", "dsc_5126.jpg", "dsc_5167.jpg" ] testimgfiles = [ gettestdata(i) for i in testimgs ] refindex = g...
"""Create an image index. """ import os.path import shutil import filecmp import pytest import photo.index from conftest import tmpdir, gettestdata testimgs = [ "dsc_4623.jpg", "dsc_4664.jpg", "dsc_4831.jpg", "dsc_5126.jpg", "dsc_5167.jpg" ] testimgfiles = [ gettestdata(i) for i in testimgs ] refindex = g...
<commit_before>"""Create an image index. """ import os.path import shutil import filecmp import pytest import photo.index from conftest import tmpdir, gettestdata testimgs = [ "dsc_4623.jpg", "dsc_4664.jpg", "dsc_4831.jpg", "dsc_5126.jpg", "dsc_5167.jpg" ] testimgfiles = [ gettestdata(i) for i in testimgs ...
cc841cc1020ca4df6f303fbb05e497a7c69c92f0
akvo/rsr/migrations/0087_auto_20161110_0920.py
akvo/rsr/migrations/0087_auto_20161110_0920.py
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations def fix_employment_groups(apps, schema_editor): # We can't import the Employment or Group model directly as it may be a # newer version than this migration expects. We use the historical version. Group = apps...
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations def fix_employment_groups(apps, schema_editor): # We can't import the Employment or Group model directly as it may be a # newer version than this migration expects. We use the historical version. Group = apps...
Fix broken migration with try-except blocks
Fix broken migration with try-except blocks Duplicate key errors were being caused if an employment similar to the one being created by the migration already existed.
Python
agpl-3.0
akvo/akvo-rsr,akvo/akvo-rsr,akvo/akvo-rsr,akvo/akvo-rsr
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations def fix_employment_groups(apps, schema_editor): # We can't import the Employment or Group model directly as it may be a # newer version than this migration expects. We use the historical version. Group = apps...
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations def fix_employment_groups(apps, schema_editor): # We can't import the Employment or Group model directly as it may be a # newer version than this migration expects. We use the historical version. Group = apps...
<commit_before># -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations def fix_employment_groups(apps, schema_editor): # We can't import the Employment or Group model directly as it may be a # newer version than this migration expects. We use the historical version. ...
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations def fix_employment_groups(apps, schema_editor): # We can't import the Employment or Group model directly as it may be a # newer version than this migration expects. We use the historical version. Group = apps...
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations def fix_employment_groups(apps, schema_editor): # We can't import the Employment or Group model directly as it may be a # newer version than this migration expects. We use the historical version. Group = apps...
<commit_before># -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations def fix_employment_groups(apps, schema_editor): # We can't import the Employment or Group model directly as it may be a # newer version than this migration expects. We use the historical version. ...
9715c55bdc5827ee399f02559c30bd053368dc8a
billjobs/tests/tests_user_admin_api.py
billjobs/tests/tests_user_admin_api.py
from django.test import TestCase from django.contrib.auth.models import User from rest_framework import status from rest_framework.test import APIClient, APIRequestFactory, \ force_authenticate from billjobs.views import UserAdmin, UserAdminDetail class UserAdminAPI(TestCase): """ Test User Admin API REST ...
from django.test import TestCase from django.contrib.auth.models import User from rest_framework import status from rest_framework.test import APIClient, APIRequestFactory, \ force_authenticate from billjobs.views import UserAdmin, UserAdminDetail class UserAdminAPI(TestCase): """ Test User Admin API REST ...
Test anonymous user do not access user list endpoint
Test anonymous user do not access user list endpoint
Python
mit
ioO/billjobs
from django.test import TestCase from django.contrib.auth.models import User from rest_framework import status from rest_framework.test import APIClient, APIRequestFactory, \ force_authenticate from billjobs.views import UserAdmin, UserAdminDetail class UserAdminAPI(TestCase): """ Test User Admin API REST ...
from django.test import TestCase from django.contrib.auth.models import User from rest_framework import status from rest_framework.test import APIClient, APIRequestFactory, \ force_authenticate from billjobs.views import UserAdmin, UserAdminDetail class UserAdminAPI(TestCase): """ Test User Admin API REST ...
<commit_before>from django.test import TestCase from django.contrib.auth.models import User from rest_framework import status from rest_framework.test import APIClient, APIRequestFactory, \ force_authenticate from billjobs.views import UserAdmin, UserAdminDetail class UserAdminAPI(TestCase): """ Test User ...
from django.test import TestCase from django.contrib.auth.models import User from rest_framework import status from rest_framework.test import APIClient, APIRequestFactory, \ force_authenticate from billjobs.views import UserAdmin, UserAdminDetail class UserAdminAPI(TestCase): """ Test User Admin API REST ...
from django.test import TestCase from django.contrib.auth.models import User from rest_framework import status from rest_framework.test import APIClient, APIRequestFactory, \ force_authenticate from billjobs.views import UserAdmin, UserAdminDetail class UserAdminAPI(TestCase): """ Test User Admin API REST ...
<commit_before>from django.test import TestCase from django.contrib.auth.models import User from rest_framework import status from rest_framework.test import APIClient, APIRequestFactory, \ force_authenticate from billjobs.views import UserAdmin, UserAdminDetail class UserAdminAPI(TestCase): """ Test User ...
25ba377b7254ed770360bb1ee5a6ef6cb631f564
openedx/stanford/djangoapps/register_cme/admin.py
openedx/stanford/djangoapps/register_cme/admin.py
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.contrib import admin from .models import ExtraInfo class ExtraInfoAdmin(admin.ModelAdmin): """ Admin interface for ExtraInfo model. """ readonly_fields = ( 'user', ) class Meta(object): model = Extr...
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.contrib import admin from .models import ExtraInfo class ExtraInfoAdmin(admin.ModelAdmin): """ Admin interface for ExtraInfo model. """ list_display = ( 'user', 'get_email', 'last_name', 'fir...
Make ExtraInfo list user-friendly in Django Admin
Make ExtraInfo list user-friendly in Django Admin `Register_cme/extrainfo` in Django Admin was previously displaying users as `ExtraInfo` objects which admins had to click on individually to see each user's information. Each user is now displayed with fields: username, email, last and first name. Username is clickable...
Python
agpl-3.0
Stanford-Online/edx-platform,caesar2164/edx-platform,caesar2164/edx-platform,Stanford-Online/edx-platform,Stanford-Online/edx-platform,caesar2164/edx-platform,Stanford-Online/edx-platform,caesar2164/edx-platform
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.contrib import admin from .models import ExtraInfo class ExtraInfoAdmin(admin.ModelAdmin): """ Admin interface for ExtraInfo model. """ readonly_fields = ( 'user', ) class Meta(object): model = Extr...
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.contrib import admin from .models import ExtraInfo class ExtraInfoAdmin(admin.ModelAdmin): """ Admin interface for ExtraInfo model. """ list_display = ( 'user', 'get_email', 'last_name', 'fir...
<commit_before># -*- coding: utf-8 -*- from __future__ import unicode_literals from django.contrib import admin from .models import ExtraInfo class ExtraInfoAdmin(admin.ModelAdmin): """ Admin interface for ExtraInfo model. """ readonly_fields = ( 'user', ) class Meta(object): ...
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.contrib import admin from .models import ExtraInfo class ExtraInfoAdmin(admin.ModelAdmin): """ Admin interface for ExtraInfo model. """ list_display = ( 'user', 'get_email', 'last_name', 'fir...
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.contrib import admin from .models import ExtraInfo class ExtraInfoAdmin(admin.ModelAdmin): """ Admin interface for ExtraInfo model. """ readonly_fields = ( 'user', ) class Meta(object): model = Extr...
<commit_before># -*- coding: utf-8 -*- from __future__ import unicode_literals from django.contrib import admin from .models import ExtraInfo class ExtraInfoAdmin(admin.ModelAdmin): """ Admin interface for ExtraInfo model. """ readonly_fields = ( 'user', ) class Meta(object): ...
627a0dddbfe4982c4079b8ba49a55d7de53eeb11
runtests.py
runtests.py
#!/usr/bin/env python import os import sys from django.conf import settings import django DEFAULT_SETTINGS = { 'INSTALLED_APPS': ( 'django.contrib.gis', 'spillway', 'tests', ), 'DATABASES': { 'default': { 'ENGINE': 'django.contrib.gis.db.backends.spatialite', ...
#!/usr/bin/env python import os import sys import shutil import tempfile from django.conf import settings import django TMPDIR = tempfile.mkdtemp(prefix='spillway_') DEFAULT_SETTINGS = { 'INSTALLED_APPS': ( 'django.contrib.gis', 'spillway', 'tests', ), 'DATABASES': { 'defa...
Use media root temp dir for tests
Use media root temp dir for tests
Python
bsd-3-clause
barseghyanartur/django-spillway,kuzmich/django-spillway,bkg/django-spillway
#!/usr/bin/env python import os import sys from django.conf import settings import django DEFAULT_SETTINGS = { 'INSTALLED_APPS': ( 'django.contrib.gis', 'spillway', 'tests', ), 'DATABASES': { 'default': { 'ENGINE': 'django.contrib.gis.db.backends.spatialite', ...
#!/usr/bin/env python import os import sys import shutil import tempfile from django.conf import settings import django TMPDIR = tempfile.mkdtemp(prefix='spillway_') DEFAULT_SETTINGS = { 'INSTALLED_APPS': ( 'django.contrib.gis', 'spillway', 'tests', ), 'DATABASES': { 'defa...
<commit_before>#!/usr/bin/env python import os import sys from django.conf import settings import django DEFAULT_SETTINGS = { 'INSTALLED_APPS': ( 'django.contrib.gis', 'spillway', 'tests', ), 'DATABASES': { 'default': { 'ENGINE': 'django.contrib.gis.db.backends....
#!/usr/bin/env python import os import sys import shutil import tempfile from django.conf import settings import django TMPDIR = tempfile.mkdtemp(prefix='spillway_') DEFAULT_SETTINGS = { 'INSTALLED_APPS': ( 'django.contrib.gis', 'spillway', 'tests', ), 'DATABASES': { 'defa...
#!/usr/bin/env python import os import sys from django.conf import settings import django DEFAULT_SETTINGS = { 'INSTALLED_APPS': ( 'django.contrib.gis', 'spillway', 'tests', ), 'DATABASES': { 'default': { 'ENGINE': 'django.contrib.gis.db.backends.spatialite', ...
<commit_before>#!/usr/bin/env python import os import sys from django.conf import settings import django DEFAULT_SETTINGS = { 'INSTALLED_APPS': ( 'django.contrib.gis', 'spillway', 'tests', ), 'DATABASES': { 'default': { 'ENGINE': 'django.contrib.gis.db.backends....
171d088c070742cfac3127f479eb2ad89a8b6b9c
test/win/gyptest-link-pdb.py
test/win/gyptest-link-pdb.py
#!/usr/bin/env python # Copyright (c) 2012 Google Inc. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """ Verifies that the 'Profile' attribute in VCLinker is extracted properly. """ import TestGyp import os import sys if sys.platform == ...
#!/usr/bin/env python # Copyright (c) 2012 Google Inc. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """ Verifies that the 'Profile' attribute in VCLinker is extracted properly. """ import TestGyp import os import sys if sys.platform == ...
Insert empty line at to fix patch.
Insert empty line at to fix patch. gyptest-link-pdb.py was checked in without a blank line. This appears to cause a patch issue with the try bots. This CL is only a whitespace change to attempt to fix that problem. SEE: patching file test/win/gyptest-link-pdb.py Hunk #1 FAILED at 26. 1 out of 1 hunk FAILED -- savin...
Python
bsd-3-clause
omasanori/gyp,svn2github/gyp,sanyaade-teachings/gyp,android-ia/platform_external_chromium_org_tools_gyp,bnq4ever/gypgoogle,MIPS/external-chromium_org-tools-gyp,lukeweber/gyp-override,chromium/gyp,sloanyang/gyp,svn2github/kgyp,ttyangf/pdfium_gyp,cysp/gyp,dougbeal/gyp,mapbox/gyp,cchamberlain/gyp,erikge/watch_gyp,clar/gyp...
#!/usr/bin/env python # Copyright (c) 2012 Google Inc. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """ Verifies that the 'Profile' attribute in VCLinker is extracted properly. """ import TestGyp import os import sys if sys.platform == ...
#!/usr/bin/env python # Copyright (c) 2012 Google Inc. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """ Verifies that the 'Profile' attribute in VCLinker is extracted properly. """ import TestGyp import os import sys if sys.platform == ...
<commit_before>#!/usr/bin/env python # Copyright (c) 2012 Google Inc. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """ Verifies that the 'Profile' attribute in VCLinker is extracted properly. """ import TestGyp import os import sys if s...
#!/usr/bin/env python # Copyright (c) 2012 Google Inc. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """ Verifies that the 'Profile' attribute in VCLinker is extracted properly. """ import TestGyp import os import sys if sys.platform == ...
#!/usr/bin/env python # Copyright (c) 2012 Google Inc. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """ Verifies that the 'Profile' attribute in VCLinker is extracted properly. """ import TestGyp import os import sys if sys.platform == ...
<commit_before>#!/usr/bin/env python # Copyright (c) 2012 Google Inc. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """ Verifies that the 'Profile' attribute in VCLinker is extracted properly. """ import TestGyp import os import sys if s...
98c0ccec77cc6f1657c21acb3cdc07b483a9a178
proselint/checks/writegood/lexical_illusions.py
proselint/checks/writegood/lexical_illusions.py
"""WGD200: Lexical illusions. --- layout: post error_code: WGD200 source: write-good source_url: https://github.com/btford/write-good title: Lexical illusion present date: 2014-06-10 12:31:19 categories: writing --- A lexical illusion happens when a word word is unintentiall repeated twice, and and...
"""WGD200: Lexical illusions. --- layout: post error_code: WGD200 source: write-good source_url: https://github.com/btford/write-good title: Lexical illusion present date: 2014-06-10 12:31:19 categories: writing --- A lexical illusion happens when a word word is unintentiall repeated twice, and and...
Remove "is is" from lexical illusions
Remove "is is" from lexical illusions
Python
bsd-3-clause
jstewmon/proselint,jstewmon/proselint,amperser/proselint,jstewmon/proselint,amperser/proselint,amperser/proselint,amperser/proselint,amperser/proselint
"""WGD200: Lexical illusions. --- layout: post error_code: WGD200 source: write-good source_url: https://github.com/btford/write-good title: Lexical illusion present date: 2014-06-10 12:31:19 categories: writing --- A lexical illusion happens when a word word is unintentiall repeated twice, and and...
"""WGD200: Lexical illusions. --- layout: post error_code: WGD200 source: write-good source_url: https://github.com/btford/write-good title: Lexical illusion present date: 2014-06-10 12:31:19 categories: writing --- A lexical illusion happens when a word word is unintentiall repeated twice, and and...
<commit_before>"""WGD200: Lexical illusions. --- layout: post error_code: WGD200 source: write-good source_url: https://github.com/btford/write-good title: Lexical illusion present date: 2014-06-10 12:31:19 categories: writing --- A lexical illusion happens when a word word is unintentiall repeated...
"""WGD200: Lexical illusions. --- layout: post error_code: WGD200 source: write-good source_url: https://github.com/btford/write-good title: Lexical illusion present date: 2014-06-10 12:31:19 categories: writing --- A lexical illusion happens when a word word is unintentiall repeated twice, and and...
"""WGD200: Lexical illusions. --- layout: post error_code: WGD200 source: write-good source_url: https://github.com/btford/write-good title: Lexical illusion present date: 2014-06-10 12:31:19 categories: writing --- A lexical illusion happens when a word word is unintentiall repeated twice, and and...
<commit_before>"""WGD200: Lexical illusions. --- layout: post error_code: WGD200 source: write-good source_url: https://github.com/btford/write-good title: Lexical illusion present date: 2014-06-10 12:31:19 categories: writing --- A lexical illusion happens when a word word is unintentiall repeated...
9cdf31681eff6509e9191a244bf9398e32996fdf
byceps/services/news/models/channel.py
byceps/services/news/models/channel.py
""" byceps.services.news.models.channel ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :Copyright: 2006-2019 Jochen Kupperschmidt :License: Modified BSD, see LICENSE for details. """ from ....database import db from ....typing import BrandID from ....util.instances import ReprBuilder from ..transfer.models import ChannelID c...
""" byceps.services.news.models.channel ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :Copyright: 2006-2019 Jochen Kupperschmidt :License: Modified BSD, see LICENSE for details. """ from ....database import db from ....typing import BrandID from ....util.instances import ReprBuilder from ..transfer.models import ChannelID c...
Use `UnicodeText` instead of `Text` to ensure a unicode-capable column type is used in the backend
Use `UnicodeText` instead of `Text` to ensure a unicode-capable column type is used in the backend
Python
bsd-3-clause
homeworkprod/byceps,homeworkprod/byceps,m-ober/byceps,m-ober/byceps,homeworkprod/byceps,m-ober/byceps
""" byceps.services.news.models.channel ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :Copyright: 2006-2019 Jochen Kupperschmidt :License: Modified BSD, see LICENSE for details. """ from ....database import db from ....typing import BrandID from ....util.instances import ReprBuilder from ..transfer.models import ChannelID c...
""" byceps.services.news.models.channel ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :Copyright: 2006-2019 Jochen Kupperschmidt :License: Modified BSD, see LICENSE for details. """ from ....database import db from ....typing import BrandID from ....util.instances import ReprBuilder from ..transfer.models import ChannelID c...
<commit_before>""" byceps.services.news.models.channel ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :Copyright: 2006-2019 Jochen Kupperschmidt :License: Modified BSD, see LICENSE for details. """ from ....database import db from ....typing import BrandID from ....util.instances import ReprBuilder from ..transfer.models impor...
""" byceps.services.news.models.channel ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :Copyright: 2006-2019 Jochen Kupperschmidt :License: Modified BSD, see LICENSE for details. """ from ....database import db from ....typing import BrandID from ....util.instances import ReprBuilder from ..transfer.models import ChannelID c...
""" byceps.services.news.models.channel ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :Copyright: 2006-2019 Jochen Kupperschmidt :License: Modified BSD, see LICENSE for details. """ from ....database import db from ....typing import BrandID from ....util.instances import ReprBuilder from ..transfer.models import ChannelID c...
<commit_before>""" byceps.services.news.models.channel ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :Copyright: 2006-2019 Jochen Kupperschmidt :License: Modified BSD, see LICENSE for details. """ from ....database import db from ....typing import BrandID from ....util.instances import ReprBuilder from ..transfer.models impor...
4710db78a5904ed381755cdf55a48ef4b3541619
python/python2/simplerandom/iterators/__init__.py
python/python2/simplerandom/iterators/__init__.py
""" Simple Pseudo-random number generators. This module provides iterators that generate unsigned 32-bit PRNs. """ __all__ = [ "RandomCongIterator", "RandomSHR3Iterator", "RandomMWCIterator", "RandomMWC64Iterator", "RandomKISSIterator", "RandomKISS2Iterator", "RandomLFIB4Iterator", "Ra...
""" Simple Pseudo-random number generators. This module provides iterators that generate unsigned 32-bit PRNs. """ __all__ = [ "RandomCongIterator", "RandomSHR3Iterator", "RandomMWCIterator", "RandomMWC64Iterator", "RandomKISSIterator", "RandomKISS2Iterator", "RandomLFIB4Iterator", "Ra...
Add LFSR113 to init file.
Add LFSR113 to init file.
Python
mit
cmcqueen/simplerandom,cmcqueen/simplerandom,cmcqueen/simplerandom,cmcqueen/simplerandom,cmcqueen/simplerandom
""" Simple Pseudo-random number generators. This module provides iterators that generate unsigned 32-bit PRNs. """ __all__ = [ "RandomCongIterator", "RandomSHR3Iterator", "RandomMWCIterator", "RandomMWC64Iterator", "RandomKISSIterator", "RandomKISS2Iterator", "RandomLFIB4Iterator", "Ra...
""" Simple Pseudo-random number generators. This module provides iterators that generate unsigned 32-bit PRNs. """ __all__ = [ "RandomCongIterator", "RandomSHR3Iterator", "RandomMWCIterator", "RandomMWC64Iterator", "RandomKISSIterator", "RandomKISS2Iterator", "RandomLFIB4Iterator", "Ra...
<commit_before>""" Simple Pseudo-random number generators. This module provides iterators that generate unsigned 32-bit PRNs. """ __all__ = [ "RandomCongIterator", "RandomSHR3Iterator", "RandomMWCIterator", "RandomMWC64Iterator", "RandomKISSIterator", "RandomKISS2Iterator", "RandomLFIB4Ite...
""" Simple Pseudo-random number generators. This module provides iterators that generate unsigned 32-bit PRNs. """ __all__ = [ "RandomCongIterator", "RandomSHR3Iterator", "RandomMWCIterator", "RandomMWC64Iterator", "RandomKISSIterator", "RandomKISS2Iterator", "RandomLFIB4Iterator", "Ra...
""" Simple Pseudo-random number generators. This module provides iterators that generate unsigned 32-bit PRNs. """ __all__ = [ "RandomCongIterator", "RandomSHR3Iterator", "RandomMWCIterator", "RandomMWC64Iterator", "RandomKISSIterator", "RandomKISS2Iterator", "RandomLFIB4Iterator", "Ra...
<commit_before>""" Simple Pseudo-random number generators. This module provides iterators that generate unsigned 32-bit PRNs. """ __all__ = [ "RandomCongIterator", "RandomSHR3Iterator", "RandomMWCIterator", "RandomMWC64Iterator", "RandomKISSIterator", "RandomKISS2Iterator", "RandomLFIB4Ite...
84a2f2f019216ec96121159365ef4ca66f5d4e25
corehq/util/couch.py
corehq/util/couch.py
from couchdbkit import ResourceNotFound from django.http import Http404 from jsonobject.exceptions import WrappingAttributeError def get_document_or_404(cls, domain, doc_id, additional_doc_types=None): """ Gets a document and enforces its domain and doc type. Raises Http404 if the doc isn't found or domai...
from couchdbkit import ResourceNotFound from django.http import Http404 from jsonobject.exceptions import WrappingAttributeError def get_document_or_404(cls, domain, doc_id, additional_doc_types=None): """ Gets a document and enforces its domain and doc type. Raises Http404 if the doc isn't found or domai...
Handle doc without domain or domains
Handle doc without domain or domains
Python
bsd-3-clause
qedsoftware/commcare-hq,puttarajubr/commcare-hq,qedsoftware/commcare-hq,dimagi/commcare-hq,puttarajubr/commcare-hq,puttarajubr/commcare-hq,dimagi/commcare-hq,qedsoftware/commcare-hq,qedsoftware/commcare-hq,qedsoftware/commcare-hq,dimagi/commcare-hq,puttarajubr/commcare-hq,dimagi/commcare-hq,dimagi/commcare-hq
from couchdbkit import ResourceNotFound from django.http import Http404 from jsonobject.exceptions import WrappingAttributeError def get_document_or_404(cls, domain, doc_id, additional_doc_types=None): """ Gets a document and enforces its domain and doc type. Raises Http404 if the doc isn't found or domai...
from couchdbkit import ResourceNotFound from django.http import Http404 from jsonobject.exceptions import WrappingAttributeError def get_document_or_404(cls, domain, doc_id, additional_doc_types=None): """ Gets a document and enforces its domain and doc type. Raises Http404 if the doc isn't found or domai...
<commit_before>from couchdbkit import ResourceNotFound from django.http import Http404 from jsonobject.exceptions import WrappingAttributeError def get_document_or_404(cls, domain, doc_id, additional_doc_types=None): """ Gets a document and enforces its domain and doc type. Raises Http404 if the doc isn't...
from couchdbkit import ResourceNotFound from django.http import Http404 from jsonobject.exceptions import WrappingAttributeError def get_document_or_404(cls, domain, doc_id, additional_doc_types=None): """ Gets a document and enforces its domain and doc type. Raises Http404 if the doc isn't found or domai...
from couchdbkit import ResourceNotFound from django.http import Http404 from jsonobject.exceptions import WrappingAttributeError def get_document_or_404(cls, domain, doc_id, additional_doc_types=None): """ Gets a document and enforces its domain and doc type. Raises Http404 if the doc isn't found or domai...
<commit_before>from couchdbkit import ResourceNotFound from django.http import Http404 from jsonobject.exceptions import WrappingAttributeError def get_document_or_404(cls, domain, doc_id, additional_doc_types=None): """ Gets a document and enforces its domain and doc type. Raises Http404 if the doc isn't...
5188561f7de7f6762e1820a6b447f144f963b1d0
common/spaces.py
common/spaces.py
"""Digital Ocean Spaces interaction""" import boto3 from django.conf import settings class SpacesBucket(): """Interact with Spaces buckets""" def __init__(self): session = boto3.session.Session() self._client = session.client('s3', region_name='nyc3', ...
"""Digital Ocean Spaces interaction""" import boto3 from django.conf import settings class SpacesBucket(): """Interact with Spaces buckets""" def __init__(self, space_name="lutris"): session = boto3.session.Session() self._client = session.client('s3', reg...
Add upload to Spaces API client
Add upload to Spaces API client
Python
agpl-3.0
lutris/website,lutris/website,lutris/website,lutris/website
"""Digital Ocean Spaces interaction""" import boto3 from django.conf import settings class SpacesBucket(): """Interact with Spaces buckets""" def __init__(self): session = boto3.session.Session() self._client = session.client('s3', region_name='nyc3', ...
"""Digital Ocean Spaces interaction""" import boto3 from django.conf import settings class SpacesBucket(): """Interact with Spaces buckets""" def __init__(self, space_name="lutris"): session = boto3.session.Session() self._client = session.client('s3', reg...
<commit_before>"""Digital Ocean Spaces interaction""" import boto3 from django.conf import settings class SpacesBucket(): """Interact with Spaces buckets""" def __init__(self): session = boto3.session.Session() self._client = session.client('s3', region_na...
"""Digital Ocean Spaces interaction""" import boto3 from django.conf import settings class SpacesBucket(): """Interact with Spaces buckets""" def __init__(self, space_name="lutris"): session = boto3.session.Session() self._client = session.client('s3', reg...
"""Digital Ocean Spaces interaction""" import boto3 from django.conf import settings class SpacesBucket(): """Interact with Spaces buckets""" def __init__(self): session = boto3.session.Session() self._client = session.client('s3', region_name='nyc3', ...
<commit_before>"""Digital Ocean Spaces interaction""" import boto3 from django.conf import settings class SpacesBucket(): """Interact with Spaces buckets""" def __init__(self): session = boto3.session.Session() self._client = session.client('s3', region_na...
ccf24a73870f62b25becd1e244616c758ffe2748
jacquard/service/commands.py
jacquard/service/commands.py
import werkzeug.debug import werkzeug.serving from jacquard.commands import BaseCommand from jacquard.service import get_wsgi_app class RunServer(BaseCommand): help = "run a (local, debug) server" def add_arguments(self, parser): parser.add_argument( '-p', '--port', ...
import werkzeug.debug import werkzeug.serving from jacquard.commands import BaseCommand from jacquard.service import get_wsgi_app class RunServer(BaseCommand): help = "run a (local, debug) server" def add_arguments(self, parser): parser.add_argument( '-p', '--port', ...
Use 1212 as the default port
Use 1212 as the default port
Python
mit
prophile/jacquard,prophile/jacquard
import werkzeug.debug import werkzeug.serving from jacquard.commands import BaseCommand from jacquard.service import get_wsgi_app class RunServer(BaseCommand): help = "run a (local, debug) server" def add_arguments(self, parser): parser.add_argument( '-p', '--port', ...
import werkzeug.debug import werkzeug.serving from jacquard.commands import BaseCommand from jacquard.service import get_wsgi_app class RunServer(BaseCommand): help = "run a (local, debug) server" def add_arguments(self, parser): parser.add_argument( '-p', '--port', ...
<commit_before>import werkzeug.debug import werkzeug.serving from jacquard.commands import BaseCommand from jacquard.service import get_wsgi_app class RunServer(BaseCommand): help = "run a (local, debug) server" def add_arguments(self, parser): parser.add_argument( '-p', '--p...
import werkzeug.debug import werkzeug.serving from jacquard.commands import BaseCommand from jacquard.service import get_wsgi_app class RunServer(BaseCommand): help = "run a (local, debug) server" def add_arguments(self, parser): parser.add_argument( '-p', '--port', ...
import werkzeug.debug import werkzeug.serving from jacquard.commands import BaseCommand from jacquard.service import get_wsgi_app class RunServer(BaseCommand): help = "run a (local, debug) server" def add_arguments(self, parser): parser.add_argument( '-p', '--port', ...
<commit_before>import werkzeug.debug import werkzeug.serving from jacquard.commands import BaseCommand from jacquard.service import get_wsgi_app class RunServer(BaseCommand): help = "run a (local, debug) server" def add_arguments(self, parser): parser.add_argument( '-p', '--p...
48ae2127fcd2e6b1ba1b0d2649d936991a30881b
juliet.py
juliet.py
#!/usr/bin/python3 import argparse, sys from src import Configurator, Builder, Loader def main(): """ Parse command line arguments and execute passed subcommands. """ # Parse subcommand parser = argparse.ArgumentParser(description='Pythonic static sites generator') subparsers = parser.add_subparsers...
#!/usr/bin/python3 import argparse, sys from src import Configurator, Builder, Loader def main(): """ Parse command line arguments and execute passed subcommands. """ # Parse subcommand parser = argparse.ArgumentParser(description='Pythonic static sites generator') subparsers = parser.add_subparsers...
Load statics like posts and pages. Documentation.
Load statics like posts and pages. Documentation.
Python
mit
hlef/juliet,hlef/juliet,hlef/juliet
#!/usr/bin/python3 import argparse, sys from src import Configurator, Builder, Loader def main(): """ Parse command line arguments and execute passed subcommands. """ # Parse subcommand parser = argparse.ArgumentParser(description='Pythonic static sites generator') subparsers = parser.add_subparsers...
#!/usr/bin/python3 import argparse, sys from src import Configurator, Builder, Loader def main(): """ Parse command line arguments and execute passed subcommands. """ # Parse subcommand parser = argparse.ArgumentParser(description='Pythonic static sites generator') subparsers = parser.add_subparsers...
<commit_before>#!/usr/bin/python3 import argparse, sys from src import Configurator, Builder, Loader def main(): """ Parse command line arguments and execute passed subcommands. """ # Parse subcommand parser = argparse.ArgumentParser(description='Pythonic static sites generator') subparsers = parser...
#!/usr/bin/python3 import argparse, sys from src import Configurator, Builder, Loader def main(): """ Parse command line arguments and execute passed subcommands. """ # Parse subcommand parser = argparse.ArgumentParser(description='Pythonic static sites generator') subparsers = parser.add_subparsers...
#!/usr/bin/python3 import argparse, sys from src import Configurator, Builder, Loader def main(): """ Parse command line arguments and execute passed subcommands. """ # Parse subcommand parser = argparse.ArgumentParser(description='Pythonic static sites generator') subparsers = parser.add_subparsers...
<commit_before>#!/usr/bin/python3 import argparse, sys from src import Configurator, Builder, Loader def main(): """ Parse command line arguments and execute passed subcommands. """ # Parse subcommand parser = argparse.ArgumentParser(description='Pythonic static sites generator') subparsers = parser...
ff80cfab47b03de5d86d82907de0f28caa7829e9
test_project/dashboards.py
test_project/dashboards.py
from controlcenter import Dashboard, widgets class EmptyDashboard(Dashboard): pass class MyWidget0(widgets.Widget): pass class MyWidget1(widgets.Widget): pass class NonEmptyDashboard(Dashboard): widgets = [ MyWidget0, widgets.Group([MyWidget1]) ]
from controlcenter import Dashboard, widgets class EmptyDashboard(Dashboard): pass class MyWidget0(widgets.Widget): template_name = 'chart.html' class MyWidget1(widgets.Widget): template_name = 'chart.html' class NonEmptyDashboard(Dashboard): widgets = [ MyWidget0, widgets.Group(...
Define template_name for test widgets
Tests: Define template_name for test widgets This avoids an "AssertionError: MyWidget0.template_name is not defined." on Django 2.1, which no longer silences {% include %} exceptions. Django deprecation notes: https://docs.djangoproject.com/en/2.1/internals/deprecation/#deprecation-removed-in-2-1
Python
bsd-3-clause
byashimov/django-controlcenter,byashimov/django-controlcenter,byashimov/django-controlcenter
from controlcenter import Dashboard, widgets class EmptyDashboard(Dashboard): pass class MyWidget0(widgets.Widget): pass class MyWidget1(widgets.Widget): pass class NonEmptyDashboard(Dashboard): widgets = [ MyWidget0, widgets.Group([MyWidget1]) ] Tests: Define template_name f...
from controlcenter import Dashboard, widgets class EmptyDashboard(Dashboard): pass class MyWidget0(widgets.Widget): template_name = 'chart.html' class MyWidget1(widgets.Widget): template_name = 'chart.html' class NonEmptyDashboard(Dashboard): widgets = [ MyWidget0, widgets.Group(...
<commit_before>from controlcenter import Dashboard, widgets class EmptyDashboard(Dashboard): pass class MyWidget0(widgets.Widget): pass class MyWidget1(widgets.Widget): pass class NonEmptyDashboard(Dashboard): widgets = [ MyWidget0, widgets.Group([MyWidget1]) ] <commit_msg>Te...
from controlcenter import Dashboard, widgets class EmptyDashboard(Dashboard): pass class MyWidget0(widgets.Widget): template_name = 'chart.html' class MyWidget1(widgets.Widget): template_name = 'chart.html' class NonEmptyDashboard(Dashboard): widgets = [ MyWidget0, widgets.Group(...
from controlcenter import Dashboard, widgets class EmptyDashboard(Dashboard): pass class MyWidget0(widgets.Widget): pass class MyWidget1(widgets.Widget): pass class NonEmptyDashboard(Dashboard): widgets = [ MyWidget0, widgets.Group([MyWidget1]) ] Tests: Define template_name f...
<commit_before>from controlcenter import Dashboard, widgets class EmptyDashboard(Dashboard): pass class MyWidget0(widgets.Widget): pass class MyWidget1(widgets.Widget): pass class NonEmptyDashboard(Dashboard): widgets = [ MyWidget0, widgets.Group([MyWidget1]) ] <commit_msg>Te...
9d9704f631156e01d55d1d1217a41ab3704bdc03
tests/unit/test_context.py
tests/unit/test_context.py
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2011 OpenStack LLC. # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/...
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2011 OpenStack LLC. # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/...
Replace direct use of testtools BaseTestCase.
Replace direct use of testtools BaseTestCase. Using the BaseTestCase across the tests in the tree lets us put in log fixtures and consistently handle mox and stubout. Part of blueprint grizzly-testtools. Change-Id: Iba7eb2c63b0c514009b2c28e5930b27726a147b0
Python
apache-2.0
dims/oslo.context,JioCloud/oslo.context,citrix-openstack-build/oslo.context,varunarya10/oslo.context,openstack/oslo.context,yanheven/oslo.middleware
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2011 OpenStack LLC. # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/...
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2011 OpenStack LLC. # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/...
<commit_before># vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2011 OpenStack LLC. # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://...
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2011 OpenStack LLC. # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/...
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2011 OpenStack LLC. # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/...
<commit_before># vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2011 OpenStack LLC. # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://...
f23cfabee531a6aaa050b647b9ae54ad047335ea
ixdjango/logging_.py
ixdjango/logging_.py
""" Logging Handler """ import logging import logging.handlers import os import re import socket class IXAFormatter(logging.Formatter): """ A formatter for IXA logging environment. """ HOSTNAME = re.sub( r':\d+$', '', os.environ.get('SITE_DOMAIN', socket.gethostname())) FORMAT = '%(ascti...
""" Logging Handler """ import logging import logging.handlers import os import re import socket import time class IXAFormatter(logging.Formatter): """ A formatter for IXA logging environment. """ HOSTNAME = re.sub( r':\d+$', '', os.environ.get('SITE_DOMAIN', socket.gethostname())) FORMA...
Change time format to properly formatted UTC
Change time format to properly formatted UTC [#46004]
Python
mit
infoxchange/ixdjango
""" Logging Handler """ import logging import logging.handlers import os import re import socket class IXAFormatter(logging.Formatter): """ A formatter for IXA logging environment. """ HOSTNAME = re.sub( r':\d+$', '', os.environ.get('SITE_DOMAIN', socket.gethostname())) FORMAT = '%(ascti...
""" Logging Handler """ import logging import logging.handlers import os import re import socket import time class IXAFormatter(logging.Formatter): """ A formatter for IXA logging environment. """ HOSTNAME = re.sub( r':\d+$', '', os.environ.get('SITE_DOMAIN', socket.gethostname())) FORMA...
<commit_before>""" Logging Handler """ import logging import logging.handlers import os import re import socket class IXAFormatter(logging.Formatter): """ A formatter for IXA logging environment. """ HOSTNAME = re.sub( r':\d+$', '', os.environ.get('SITE_DOMAIN', socket.gethostname())) FO...
""" Logging Handler """ import logging import logging.handlers import os import re import socket import time class IXAFormatter(logging.Formatter): """ A formatter for IXA logging environment. """ HOSTNAME = re.sub( r':\d+$', '', os.environ.get('SITE_DOMAIN', socket.gethostname())) FORMA...
""" Logging Handler """ import logging import logging.handlers import os import re import socket class IXAFormatter(logging.Formatter): """ A formatter for IXA logging environment. """ HOSTNAME = re.sub( r':\d+$', '', os.environ.get('SITE_DOMAIN', socket.gethostname())) FORMAT = '%(ascti...
<commit_before>""" Logging Handler """ import logging import logging.handlers import os import re import socket class IXAFormatter(logging.Formatter): """ A formatter for IXA logging environment. """ HOSTNAME = re.sub( r':\d+$', '', os.environ.get('SITE_DOMAIN', socket.gethostname())) FO...
334c16a70e7e60520f98c0fc989f03437a585a81
krisk/connections.py
krisk/connections.py
from collections import OrderedDict from IPython.display import Javascript import json from krisk.util import join_current_dir ECHARTS_URL = 'https://cdnjs.cloudflare.com/ajax/libs/echarts/3.2.0/' ECHARTS_FILE = 'echarts.min' d_paths = OrderedDict({}) THEMES = ['dark','vintage','roma','shine','infographic','macarons'...
from collections import OrderedDict from IPython.display import Javascript import json from krisk.util import join_current_dir ECHARTS_URL = 'https://cdnjs.cloudflare.com/ajax/libs/echarts/3.2.0/' ECHARTS_FILE = 'echarts.min' d_paths = OrderedDict({}) THEMES = ['dark','vintage','roma','shine','infographic','macarons'...
Update connection to script to waitSeconds to load js
Update connection to script to waitSeconds to load js
Python
bsd-3-clause
napjon/krisk,napjon/krisk,napjon/krisk
from collections import OrderedDict from IPython.display import Javascript import json from krisk.util import join_current_dir ECHARTS_URL = 'https://cdnjs.cloudflare.com/ajax/libs/echarts/3.2.0/' ECHARTS_FILE = 'echarts.min' d_paths = OrderedDict({}) THEMES = ['dark','vintage','roma','shine','infographic','macarons'...
from collections import OrderedDict from IPython.display import Javascript import json from krisk.util import join_current_dir ECHARTS_URL = 'https://cdnjs.cloudflare.com/ajax/libs/echarts/3.2.0/' ECHARTS_FILE = 'echarts.min' d_paths = OrderedDict({}) THEMES = ['dark','vintage','roma','shine','infographic','macarons'...
<commit_before> from collections import OrderedDict from IPython.display import Javascript import json from krisk.util import join_current_dir ECHARTS_URL = 'https://cdnjs.cloudflare.com/ajax/libs/echarts/3.2.0/' ECHARTS_FILE = 'echarts.min' d_paths = OrderedDict({}) THEMES = ['dark','vintage','roma','shine','infograp...
from collections import OrderedDict from IPython.display import Javascript import json from krisk.util import join_current_dir ECHARTS_URL = 'https://cdnjs.cloudflare.com/ajax/libs/echarts/3.2.0/' ECHARTS_FILE = 'echarts.min' d_paths = OrderedDict({}) THEMES = ['dark','vintage','roma','shine','infographic','macarons'...
from collections import OrderedDict from IPython.display import Javascript import json from krisk.util import join_current_dir ECHARTS_URL = 'https://cdnjs.cloudflare.com/ajax/libs/echarts/3.2.0/' ECHARTS_FILE = 'echarts.min' d_paths = OrderedDict({}) THEMES = ['dark','vintage','roma','shine','infographic','macarons'...
<commit_before> from collections import OrderedDict from IPython.display import Javascript import json from krisk.util import join_current_dir ECHARTS_URL = 'https://cdnjs.cloudflare.com/ajax/libs/echarts/3.2.0/' ECHARTS_FILE = 'echarts.min' d_paths = OrderedDict({}) THEMES = ['dark','vintage','roma','shine','infograp...
640ce1a3b4f9cca4ebcc10f3d62b1d4d995dd0c5
src/foremast/pipeline/create_pipeline_manual.py
src/foremast/pipeline/create_pipeline_manual.py
# Foremast - Pipeline Tooling # # Copyright 2016 Gogo, LLC # # 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...
# Foremast - Pipeline Tooling # # Copyright 2016 Gogo, LLC # # 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...
Delete manual Pipeline before creating
fix: Delete manual Pipeline before creating See also: #72
Python
apache-2.0
gogoair/foremast,gogoair/foremast
# Foremast - Pipeline Tooling # # Copyright 2016 Gogo, LLC # # 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...
# Foremast - Pipeline Tooling # # Copyright 2016 Gogo, LLC # # 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...
<commit_before># Foremast - Pipeline Tooling # # Copyright 2016 Gogo, LLC # # 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 # # ...
# Foremast - Pipeline Tooling # # Copyright 2016 Gogo, LLC # # 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...
# Foremast - Pipeline Tooling # # Copyright 2016 Gogo, LLC # # 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...
<commit_before># Foremast - Pipeline Tooling # # Copyright 2016 Gogo, LLC # # 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 # # ...
8fb2eb1c51daa5614b1b4ab15428350d2b28c093
accounts/models.py
accounts/models.py
# coding: utf-8 from django.conf import settings from django.db import models from django.utils.translation import ugettext_lazy as _ from registration.signals import user_activated from django.dispatch import receiver class UserAccount(models.Model): user = models.OneToOneField(settings.AUTH_USER_MODEL, ...
# coding: utf-8 from django.conf import settings from django.db import models from django.utils.translation import ugettext_lazy as _ from registration.signals import user_activated from django.dispatch import receiver class UserAccount(models.Model): """ A user account. Used to store any information related...
Add docstring to UserAccount model
Add docstring to UserAccount model
Python
agpl-3.0
pitpalme/volunteer_planner,pitpalme/volunteer_planner,flindenberg/volunteer_planner,klinger/volunteer_planner,flindenberg/volunteer_planner,alper/volunteer_planner,volunteer-planner/volunteer_planner,coders4help/volunteer_planner,coders4help/volunteer_planner,klinger/volunteer_planner,volunteer-planner/volunteer_planne...
# coding: utf-8 from django.conf import settings from django.db import models from django.utils.translation import ugettext_lazy as _ from registration.signals import user_activated from django.dispatch import receiver class UserAccount(models.Model): user = models.OneToOneField(settings.AUTH_USER_MODEL, ...
# coding: utf-8 from django.conf import settings from django.db import models from django.utils.translation import ugettext_lazy as _ from registration.signals import user_activated from django.dispatch import receiver class UserAccount(models.Model): """ A user account. Used to store any information related...
<commit_before># coding: utf-8 from django.conf import settings from django.db import models from django.utils.translation import ugettext_lazy as _ from registration.signals import user_activated from django.dispatch import receiver class UserAccount(models.Model): user = models.OneToOneField(settings.AUTH_USER...
# coding: utf-8 from django.conf import settings from django.db import models from django.utils.translation import ugettext_lazy as _ from registration.signals import user_activated from django.dispatch import receiver class UserAccount(models.Model): """ A user account. Used to store any information related...
# coding: utf-8 from django.conf import settings from django.db import models from django.utils.translation import ugettext_lazy as _ from registration.signals import user_activated from django.dispatch import receiver class UserAccount(models.Model): user = models.OneToOneField(settings.AUTH_USER_MODEL, ...
<commit_before># coding: utf-8 from django.conf import settings from django.db import models from django.utils.translation import ugettext_lazy as _ from registration.signals import user_activated from django.dispatch import receiver class UserAccount(models.Model): user = models.OneToOneField(settings.AUTH_USER...
ad622ab0a4a70187ffb023687a64497657d79442
members/views.py
members/views.py
# -*- coding: utf-8 -*- from django.shortcuts import render, redirect from django.http import HttpResponse from hackfmi.utils import json_view from .models import User def homepage(request): return render(request, "index.html", {}) @json_view def search(request, name): members = User.objects.filter(first...
# -*- coding: utf-8 -*- from django.shortcuts import render, redirect from django.http import HttpResponse from django.contrib.auth import views from hackfmi.utils import json_view from .models import User def homepage(request): return render(request, "index.html", {}) @json_view def search(request, name): ...
Use default auth django app
Use default auth django app
Python
mit
Hackfmi/Diaphanum,Hackfmi/Diaphanum
# -*- coding: utf-8 -*- from django.shortcuts import render, redirect from django.http import HttpResponse from hackfmi.utils import json_view from .models import User def homepage(request): return render(request, "index.html", {}) @json_view def search(request, name): members = User.objects.filter(first...
# -*- coding: utf-8 -*- from django.shortcuts import render, redirect from django.http import HttpResponse from django.contrib.auth import views from hackfmi.utils import json_view from .models import User def homepage(request): return render(request, "index.html", {}) @json_view def search(request, name): ...
<commit_before># -*- coding: utf-8 -*- from django.shortcuts import render, redirect from django.http import HttpResponse from hackfmi.utils import json_view from .models import User def homepage(request): return render(request, "index.html", {}) @json_view def search(request, name): members = User.objec...
# -*- coding: utf-8 -*- from django.shortcuts import render, redirect from django.http import HttpResponse from django.contrib.auth import views from hackfmi.utils import json_view from .models import User def homepage(request): return render(request, "index.html", {}) @json_view def search(request, name): ...
# -*- coding: utf-8 -*- from django.shortcuts import render, redirect from django.http import HttpResponse from hackfmi.utils import json_view from .models import User def homepage(request): return render(request, "index.html", {}) @json_view def search(request, name): members = User.objects.filter(first...
<commit_before># -*- coding: utf-8 -*- from django.shortcuts import render, redirect from django.http import HttpResponse from hackfmi.utils import json_view from .models import User def homepage(request): return render(request, "index.html", {}) @json_view def search(request, name): members = User.objec...
03d9c825bb7e86550b3d6fa9afd39c126cb9034d
basis_set_exchange/__init__.py
basis_set_exchange/__init__.py
''' Basis Set Exchange Contains utilities for reading, writing, and converting basis set information ''' # Just import the basic user API from .api import (get_basis, lookup_basis_by_role, get_metadata, get_reference_data, get_all_basis_names, get_references, get_basis_family, get_basis_names_by_fam...
''' Basis Set Exchange Contains utilities for reading, writing, and converting basis set information ''' # Just import the basic user API from .api import (get_basis, lookup_basis_by_role, get_metadata, get_reference_data, get_all_basis_names, get_references, get_basis_family, get_basis_names_by_fam...
Add simple function to get the version of the bse
Add simple function to get the version of the bse
Python
bsd-3-clause
MOLSSI-BSE/basis_set_exchange
''' Basis Set Exchange Contains utilities for reading, writing, and converting basis set information ''' # Just import the basic user API from .api import (get_basis, lookup_basis_by_role, get_metadata, get_reference_data, get_all_basis_names, get_references, get_basis_family, get_basis_names_by_fam...
''' Basis Set Exchange Contains utilities for reading, writing, and converting basis set information ''' # Just import the basic user API from .api import (get_basis, lookup_basis_by_role, get_metadata, get_reference_data, get_all_basis_names, get_references, get_basis_family, get_basis_names_by_fam...
<commit_before>''' Basis Set Exchange Contains utilities for reading, writing, and converting basis set information ''' # Just import the basic user API from .api import (get_basis, lookup_basis_by_role, get_metadata, get_reference_data, get_all_basis_names, get_references, get_basis_family, get_bas...
''' Basis Set Exchange Contains utilities for reading, writing, and converting basis set information ''' # Just import the basic user API from .api import (get_basis, lookup_basis_by_role, get_metadata, get_reference_data, get_all_basis_names, get_references, get_basis_family, get_basis_names_by_fam...
''' Basis Set Exchange Contains utilities for reading, writing, and converting basis set information ''' # Just import the basic user API from .api import (get_basis, lookup_basis_by_role, get_metadata, get_reference_data, get_all_basis_names, get_references, get_basis_family, get_basis_names_by_fam...
<commit_before>''' Basis Set Exchange Contains utilities for reading, writing, and converting basis set information ''' # Just import the basic user API from .api import (get_basis, lookup_basis_by_role, get_metadata, get_reference_data, get_all_basis_names, get_references, get_basis_family, get_bas...
bcb24ef03a65d80c09ef47f19a64fd854a70c082
tests/chainer_tests/training_tests/extensions_tests/test_print_report.py
tests/chainer_tests/training_tests/extensions_tests/test_print_report.py
import sys import unittest from mock import MagicMock from chainer import testing from chainer.training import extensions class TestPrintReport(unittest.TestCase): def _setup(self, delete_flush=False): self.logreport = MagicMock(spec=extensions.LogReport( ['epoch'], trigger=(1, 'iteration'), ...
import sys import unittest from mock import MagicMock from chainer import testing from chainer.training import extensions class TestPrintReport(unittest.TestCase): def _setup(self, stream=None, delete_flush=False): self.logreport = MagicMock(spec=extensions.LogReport( ['epoch'], trigger=(1, ...
Test PrintReport with a real stream
Test PrintReport with a real stream
Python
mit
ktnyt/chainer,pfnet/chainer,rezoo/chainer,hvy/chainer,keisuke-umezawa/chainer,keisuke-umezawa/chainer,okuta/chainer,hvy/chainer,niboshi/chainer,keisuke-umezawa/chainer,wkentaro/chainer,okuta/chainer,jnishi/chainer,niboshi/chainer,hvy/chainer,jnishi/chainer,hvy/chainer,chainer/chainer,chainer/chainer,keisuke-umezawa/cha...
import sys import unittest from mock import MagicMock from chainer import testing from chainer.training import extensions class TestPrintReport(unittest.TestCase): def _setup(self, delete_flush=False): self.logreport = MagicMock(spec=extensions.LogReport( ['epoch'], trigger=(1, 'iteration'), ...
import sys import unittest from mock import MagicMock from chainer import testing from chainer.training import extensions class TestPrintReport(unittest.TestCase): def _setup(self, stream=None, delete_flush=False): self.logreport = MagicMock(spec=extensions.LogReport( ['epoch'], trigger=(1, ...
<commit_before>import sys import unittest from mock import MagicMock from chainer import testing from chainer.training import extensions class TestPrintReport(unittest.TestCase): def _setup(self, delete_flush=False): self.logreport = MagicMock(spec=extensions.LogReport( ['epoch'], trigger=(1,...
import sys import unittest from mock import MagicMock from chainer import testing from chainer.training import extensions class TestPrintReport(unittest.TestCase): def _setup(self, stream=None, delete_flush=False): self.logreport = MagicMock(spec=extensions.LogReport( ['epoch'], trigger=(1, ...
import sys import unittest from mock import MagicMock from chainer import testing from chainer.training import extensions class TestPrintReport(unittest.TestCase): def _setup(self, delete_flush=False): self.logreport = MagicMock(spec=extensions.LogReport( ['epoch'], trigger=(1, 'iteration'), ...
<commit_before>import sys import unittest from mock import MagicMock from chainer import testing from chainer.training import extensions class TestPrintReport(unittest.TestCase): def _setup(self, delete_flush=False): self.logreport = MagicMock(spec=extensions.LogReport( ['epoch'], trigger=(1,...
798e547eba14721009854796e4306dc7d739bc03
manage.py
manage.py
#!/usr/bin/env python import os import sys if __name__ == "__main__": from django.core.management import execute_from_command_line execute_from_command_line(sys.argv)
#!/usr/bin/env python import os import sys if __name__ == "__main__": os.environ.setdefault("DJANGO_SETTINGS_MODULE", os.environ['DJANGO_SETTINGS_MODULE']) from django.core.management import execute_from_command_line execute_from_command_line(sys.argv)
UPDATE - change env variable
UPDATE - change env variable
Python
mit
mingkim/QuesCheetah,mingkim/QuesCheetah,mingkim/QuesCheetah,mingkim/QuesCheetah
#!/usr/bin/env python import os import sys if __name__ == "__main__": from django.core.management import execute_from_command_line execute_from_command_line(sys.argv) UPDATE - change env variable
#!/usr/bin/env python import os import sys if __name__ == "__main__": os.environ.setdefault("DJANGO_SETTINGS_MODULE", os.environ['DJANGO_SETTINGS_MODULE']) from django.core.management import execute_from_command_line execute_from_command_line(sys.argv)
<commit_before>#!/usr/bin/env python import os import sys if __name__ == "__main__": from django.core.management import execute_from_command_line execute_from_command_line(sys.argv) <commit_msg>UPDATE - change env variable<commit_after>
#!/usr/bin/env python import os import sys if __name__ == "__main__": os.environ.setdefault("DJANGO_SETTINGS_MODULE", os.environ['DJANGO_SETTINGS_MODULE']) from django.core.management import execute_from_command_line execute_from_command_line(sys.argv)
#!/usr/bin/env python import os import sys if __name__ == "__main__": from django.core.management import execute_from_command_line execute_from_command_line(sys.argv) UPDATE - change env variable#!/usr/bin/env python import os import sys if __name__ == "__main__": os.environ.setdefault("DJANGO_SETTINGS_M...
<commit_before>#!/usr/bin/env python import os import sys if __name__ == "__main__": from django.core.management import execute_from_command_line execute_from_command_line(sys.argv) <commit_msg>UPDATE - change env variable<commit_after>#!/usr/bin/env python import os import sys if __name__ == "__main__": ...
36708e49f29ccbac33827ea8331760e27aa7320f
manage.py
manage.py
#!/usr/bin/python from django.core.management import execute_manager try: import settings # Assumed to be in the same directory. except ImportError: import sys sys.stderr.write("Error: Can't find the file 'settings.py' in the directory containing %r. It appears you've customized things.\nYou'll have to run ...
#!/usr/bin/env python from django.core.management import execute_manager try: import settings # Assumed to be in the same directory. except ImportError: import sys sys.stderr.write("Error: Can't find the file 'settings.py' in the directory containing %r. It appears you've customized things.\nYou'll have to ...
Use env python instance, not a static location, fixes virtualenv oddities
Use env python instance, not a static location, fixes virtualenv oddities
Python
bsd-3-clause
nikdoof/test-auth
#!/usr/bin/python from django.core.management import execute_manager try: import settings # Assumed to be in the same directory. except ImportError: import sys sys.stderr.write("Error: Can't find the file 'settings.py' in the directory containing %r. It appears you've customized things.\nYou'll have to run ...
#!/usr/bin/env python from django.core.management import execute_manager try: import settings # Assumed to be in the same directory. except ImportError: import sys sys.stderr.write("Error: Can't find the file 'settings.py' in the directory containing %r. It appears you've customized things.\nYou'll have to ...
<commit_before>#!/usr/bin/python from django.core.management import execute_manager try: import settings # Assumed to be in the same directory. except ImportError: import sys sys.stderr.write("Error: Can't find the file 'settings.py' in the directory containing %r. It appears you've customized things.\nYou'...
#!/usr/bin/env python from django.core.management import execute_manager try: import settings # Assumed to be in the same directory. except ImportError: import sys sys.stderr.write("Error: Can't find the file 'settings.py' in the directory containing %r. It appears you've customized things.\nYou'll have to ...
#!/usr/bin/python from django.core.management import execute_manager try: import settings # Assumed to be in the same directory. except ImportError: import sys sys.stderr.write("Error: Can't find the file 'settings.py' in the directory containing %r. It appears you've customized things.\nYou'll have to run ...
<commit_before>#!/usr/bin/python from django.core.management import execute_manager try: import settings # Assumed to be in the same directory. except ImportError: import sys sys.stderr.write("Error: Can't find the file 'settings.py' in the directory containing %r. It appears you've customized things.\nYou'...
95eb73ce7645ae6275fbb958ec803ce521b16198
helusers/urls.py
helusers/urls.py
"""URLs module""" from django.urls import path from django.conf import settings from django.core.exceptions import ImproperlyConfigured from . import views app_name = "helusers" urlpatterns = [ path("logout/", views.LogoutView.as_view(), name="auth_logout"), path( "logout/complete/", views.Lo...
"""URLs module""" from django.urls import path from django.conf import settings from django.core.exceptions import ImproperlyConfigured from . import views app_name = "helusers" urlpatterns = [] if not settings.LOGOUT_REDIRECT_URL: raise ImproperlyConfigured( "You must configure LOGOUT_REDIRECT_URL to u...
Check configuration before specifying urlpatterns
Check configuration before specifying urlpatterns If the configuration is incorrect, it doesn't make sense to specify the URL patterns in that case.
Python
bsd-2-clause
City-of-Helsinki/django-helusers,City-of-Helsinki/django-helusers
"""URLs module""" from django.urls import path from django.conf import settings from django.core.exceptions import ImproperlyConfigured from . import views app_name = "helusers" urlpatterns = [ path("logout/", views.LogoutView.as_view(), name="auth_logout"), path( "logout/complete/", views.Lo...
"""URLs module""" from django.urls import path from django.conf import settings from django.core.exceptions import ImproperlyConfigured from . import views app_name = "helusers" urlpatterns = [] if not settings.LOGOUT_REDIRECT_URL: raise ImproperlyConfigured( "You must configure LOGOUT_REDIRECT_URL to u...
<commit_before>"""URLs module""" from django.urls import path from django.conf import settings from django.core.exceptions import ImproperlyConfigured from . import views app_name = "helusers" urlpatterns = [ path("logout/", views.LogoutView.as_view(), name="auth_logout"), path( "logout/complete/", ...
"""URLs module""" from django.urls import path from django.conf import settings from django.core.exceptions import ImproperlyConfigured from . import views app_name = "helusers" urlpatterns = [] if not settings.LOGOUT_REDIRECT_URL: raise ImproperlyConfigured( "You must configure LOGOUT_REDIRECT_URL to u...
"""URLs module""" from django.urls import path from django.conf import settings from django.core.exceptions import ImproperlyConfigured from . import views app_name = "helusers" urlpatterns = [ path("logout/", views.LogoutView.as_view(), name="auth_logout"), path( "logout/complete/", views.Lo...
<commit_before>"""URLs module""" from django.urls import path from django.conf import settings from django.core.exceptions import ImproperlyConfigured from . import views app_name = "helusers" urlpatterns = [ path("logout/", views.LogoutView.as_view(), name="auth_logout"), path( "logout/complete/", ...
0778a0a47967f0283a22908bcf89c0d98ce1647f
tests/test_redefine_colors.py
tests/test_redefine_colors.py
#!/usr/bin/env python # -*- coding: utf-8 -*- """Test redefinition of colors.""" import colorise import pytest @pytest.mark.skip_on_windows def test_redefine_colors_error(): with pytest.raises(colorise.error.NotSupportedError): colorise.redefine_colors({})
#!/usr/bin/env python # -*- coding: utf-8 -*- """Test redefinition of colors.""" import colorise import pytest @pytest.mark.skip_on_windows def test_redefine_colors_error(): assert not colorise.can_redefine_colors() with pytest.raises(colorise.error.NotSupportedError): colorise.redefine_colors({})
Test color redefinition on nix
Test color redefinition on nix
Python
bsd-3-clause
MisanthropicBit/colorise
#!/usr/bin/env python # -*- coding: utf-8 -*- """Test redefinition of colors.""" import colorise import pytest @pytest.mark.skip_on_windows def test_redefine_colors_error(): with pytest.raises(colorise.error.NotSupportedError): colorise.redefine_colors({}) Test color redefinition on nix
#!/usr/bin/env python # -*- coding: utf-8 -*- """Test redefinition of colors.""" import colorise import pytest @pytest.mark.skip_on_windows def test_redefine_colors_error(): assert not colorise.can_redefine_colors() with pytest.raises(colorise.error.NotSupportedError): colorise.redefine_colors({})
<commit_before>#!/usr/bin/env python # -*- coding: utf-8 -*- """Test redefinition of colors.""" import colorise import pytest @pytest.mark.skip_on_windows def test_redefine_colors_error(): with pytest.raises(colorise.error.NotSupportedError): colorise.redefine_colors({}) <commit_msg>Test color redefinit...
#!/usr/bin/env python # -*- coding: utf-8 -*- """Test redefinition of colors.""" import colorise import pytest @pytest.mark.skip_on_windows def test_redefine_colors_error(): assert not colorise.can_redefine_colors() with pytest.raises(colorise.error.NotSupportedError): colorise.redefine_colors({})
#!/usr/bin/env python # -*- coding: utf-8 -*- """Test redefinition of colors.""" import colorise import pytest @pytest.mark.skip_on_windows def test_redefine_colors_error(): with pytest.raises(colorise.error.NotSupportedError): colorise.redefine_colors({}) Test color redefinition on nix#!/usr/bin/env py...
<commit_before>#!/usr/bin/env python # -*- coding: utf-8 -*- """Test redefinition of colors.""" import colorise import pytest @pytest.mark.skip_on_windows def test_redefine_colors_error(): with pytest.raises(colorise.error.NotSupportedError): colorise.redefine_colors({}) <commit_msg>Test color redefinit...
963ad8662b44d223bd5003c848dccc65802016e3
src/tests/utils.py
src/tests/utils.py
# -*- coding: utf-8 -*- """ Created on Sat Aug 24 14:44:07 2013 @author: steve """ import numpy as np import scipy as sp import mdptoolbox.example STATES = 10 ACTIONS = 3 SMALLNUM = 10e-12 # np.arrays P_small = np.array([[[0.5, 0.5],[0.8, 0.2]],[[0, 1],[0.1, 0.9]]]) R_small = np.array([[5, 10], [-1, 2]]) P_sparse...
# -*- coding: utf-8 -*- """ Created on Sat Aug 24 14:44:07 2013 @author: steve """ import numpy as np import scipy as sp import mdptoolbox.example STATES = 10 ACTIONS = 3 SMALLNUM = 10e-12 # np.arrays P_small, R_small = mdptoolbox.example.small() P_sparse = np.empty(2, dtype=object) P_sparse[0] = sp.sparse.csr_ma...
Use mdptoolbox.example.small in the tests
[tests] Use mdptoolbox.example.small in the tests
Python
bsd-3-clause
yasserglez/pymdptoolbox,silgon/pymdptoolbox,sawcordwell/pymdptoolbox,yasserglez/pymdptoolbox,sawcordwell/pymdptoolbox,silgon/pymdptoolbox,McCabeJM/pymdptoolbox,McCabeJM/pymdptoolbox
# -*- coding: utf-8 -*- """ Created on Sat Aug 24 14:44:07 2013 @author: steve """ import numpy as np import scipy as sp import mdptoolbox.example STATES = 10 ACTIONS = 3 SMALLNUM = 10e-12 # np.arrays P_small = np.array([[[0.5, 0.5],[0.8, 0.2]],[[0, 1],[0.1, 0.9]]]) R_small = np.array([[5, 10], [-1, 2]]) P_sparse...
# -*- coding: utf-8 -*- """ Created on Sat Aug 24 14:44:07 2013 @author: steve """ import numpy as np import scipy as sp import mdptoolbox.example STATES = 10 ACTIONS = 3 SMALLNUM = 10e-12 # np.arrays P_small, R_small = mdptoolbox.example.small() P_sparse = np.empty(2, dtype=object) P_sparse[0] = sp.sparse.csr_ma...
<commit_before># -*- coding: utf-8 -*- """ Created on Sat Aug 24 14:44:07 2013 @author: steve """ import numpy as np import scipy as sp import mdptoolbox.example STATES = 10 ACTIONS = 3 SMALLNUM = 10e-12 # np.arrays P_small = np.array([[[0.5, 0.5],[0.8, 0.2]],[[0, 1],[0.1, 0.9]]]) R_small = np.array([[5, 10], [-1,...
# -*- coding: utf-8 -*- """ Created on Sat Aug 24 14:44:07 2013 @author: steve """ import numpy as np import scipy as sp import mdptoolbox.example STATES = 10 ACTIONS = 3 SMALLNUM = 10e-12 # np.arrays P_small, R_small = mdptoolbox.example.small() P_sparse = np.empty(2, dtype=object) P_sparse[0] = sp.sparse.csr_ma...
# -*- coding: utf-8 -*- """ Created on Sat Aug 24 14:44:07 2013 @author: steve """ import numpy as np import scipy as sp import mdptoolbox.example STATES = 10 ACTIONS = 3 SMALLNUM = 10e-12 # np.arrays P_small = np.array([[[0.5, 0.5],[0.8, 0.2]],[[0, 1],[0.1, 0.9]]]) R_small = np.array([[5, 10], [-1, 2]]) P_sparse...
<commit_before># -*- coding: utf-8 -*- """ Created on Sat Aug 24 14:44:07 2013 @author: steve """ import numpy as np import scipy as sp import mdptoolbox.example STATES = 10 ACTIONS = 3 SMALLNUM = 10e-12 # np.arrays P_small = np.array([[[0.5, 0.5],[0.8, 0.2]],[[0, 1],[0.1, 0.9]]]) R_small = np.array([[5, 10], [-1,...
810c4061a4ba34eef862a5c8e0d6fafbdb9ec566
allauth/socialaccount/providers/stripe/provider.py
allauth/socialaccount/providers/stripe/provider.py
from allauth.socialaccount.providers.base import ProviderAccount from allauth.socialaccount.providers.oauth2.provider import OAuth2Provider class StripeAccount(ProviderAccount): pass class StripeProvider(OAuth2Provider): id = 'stripe' name = 'Stripe' account_class = StripeAccount def extract_ui...
from allauth.socialaccount.providers.base import ProviderAccount from allauth.socialaccount.providers.oauth2.provider import OAuth2Provider class StripeAccount(ProviderAccount): def to_str(self): default = super(StripeAccount, self).to_str() return self.account.extra_data.get('business_name', defa...
Add proper stringification via StripeAccount.to_str
feat(stripe): Add proper stringification via StripeAccount.to_str Better stringification for Stripe accounts, using the 'business_name' key in extra_data. Addresses #1871.
Python
mit
pztrick/django-allauth,rsalmaso/django-allauth,pztrick/django-allauth,lukeburden/django-allauth,bittner/django-allauth,pennersr/django-allauth,pennersr/django-allauth,bittner/django-allauth,AltSchool/django-allauth,lukeburden/django-allauth,lukeburden/django-allauth,rsalmaso/django-allauth,bittner/django-allauth,rsalma...
from allauth.socialaccount.providers.base import ProviderAccount from allauth.socialaccount.providers.oauth2.provider import OAuth2Provider class StripeAccount(ProviderAccount): pass class StripeProvider(OAuth2Provider): id = 'stripe' name = 'Stripe' account_class = StripeAccount def extract_ui...
from allauth.socialaccount.providers.base import ProviderAccount from allauth.socialaccount.providers.oauth2.provider import OAuth2Provider class StripeAccount(ProviderAccount): def to_str(self): default = super(StripeAccount, self).to_str() return self.account.extra_data.get('business_name', defa...
<commit_before>from allauth.socialaccount.providers.base import ProviderAccount from allauth.socialaccount.providers.oauth2.provider import OAuth2Provider class StripeAccount(ProviderAccount): pass class StripeProvider(OAuth2Provider): id = 'stripe' name = 'Stripe' account_class = StripeAccount ...
from allauth.socialaccount.providers.base import ProviderAccount from allauth.socialaccount.providers.oauth2.provider import OAuth2Provider class StripeAccount(ProviderAccount): def to_str(self): default = super(StripeAccount, self).to_str() return self.account.extra_data.get('business_name', defa...
from allauth.socialaccount.providers.base import ProviderAccount from allauth.socialaccount.providers.oauth2.provider import OAuth2Provider class StripeAccount(ProviderAccount): pass class StripeProvider(OAuth2Provider): id = 'stripe' name = 'Stripe' account_class = StripeAccount def extract_ui...
<commit_before>from allauth.socialaccount.providers.base import ProviderAccount from allauth.socialaccount.providers.oauth2.provider import OAuth2Provider class StripeAccount(ProviderAccount): pass class StripeProvider(OAuth2Provider): id = 'stripe' name = 'Stripe' account_class = StripeAccount ...
6fb5110d4fb1c3de7d065267f9d8f7302c303ec1
allauth/socialaccount/providers/twitch/provider.py
allauth/socialaccount/providers/twitch/provider.py
from allauth.socialaccount.providers.base import ProviderAccount from allauth.socialaccount.providers.oauth2.provider import OAuth2Provider class TwitchAccount(ProviderAccount): def get_profile_url(self): return 'http://twitch.tv/' + self.account.extra_data.get('name') def get_avatar_url(self): ...
from allauth.socialaccount.providers.base import ProviderAccount from allauth.socialaccount.providers.oauth2.provider import OAuth2Provider class TwitchAccount(ProviderAccount): def get_profile_url(self): return 'http://twitch.tv/' + self.account.extra_data.get('name') def get_avatar_url(self): ...
Add user_read as default scope
twitch: Add user_read as default scope
Python
mit
bittner/django-allauth,pennersr/django-allauth,pztrick/django-allauth,rsalmaso/django-allauth,rsalmaso/django-allauth,bittner/django-allauth,pztrick/django-allauth,lukeburden/django-allauth,AltSchool/django-allauth,pennersr/django-allauth,AltSchool/django-allauth,pennersr/django-allauth,AltSchool/django-allauth,rsalmas...
from allauth.socialaccount.providers.base import ProviderAccount from allauth.socialaccount.providers.oauth2.provider import OAuth2Provider class TwitchAccount(ProviderAccount): def get_profile_url(self): return 'http://twitch.tv/' + self.account.extra_data.get('name') def get_avatar_url(self): ...
from allauth.socialaccount.providers.base import ProviderAccount from allauth.socialaccount.providers.oauth2.provider import OAuth2Provider class TwitchAccount(ProviderAccount): def get_profile_url(self): return 'http://twitch.tv/' + self.account.extra_data.get('name') def get_avatar_url(self): ...
<commit_before>from allauth.socialaccount.providers.base import ProviderAccount from allauth.socialaccount.providers.oauth2.provider import OAuth2Provider class TwitchAccount(ProviderAccount): def get_profile_url(self): return 'http://twitch.tv/' + self.account.extra_data.get('name') def get_avatar_u...
from allauth.socialaccount.providers.base import ProviderAccount from allauth.socialaccount.providers.oauth2.provider import OAuth2Provider class TwitchAccount(ProviderAccount): def get_profile_url(self): return 'http://twitch.tv/' + self.account.extra_data.get('name') def get_avatar_url(self): ...
from allauth.socialaccount.providers.base import ProviderAccount from allauth.socialaccount.providers.oauth2.provider import OAuth2Provider class TwitchAccount(ProviderAccount): def get_profile_url(self): return 'http://twitch.tv/' + self.account.extra_data.get('name') def get_avatar_url(self): ...
<commit_before>from allauth.socialaccount.providers.base import ProviderAccount from allauth.socialaccount.providers.oauth2.provider import OAuth2Provider class TwitchAccount(ProviderAccount): def get_profile_url(self): return 'http://twitch.tv/' + self.account.extra_data.get('name') def get_avatar_u...
00497693001193789c26823fe96044259380b493
inthe_am/taskmanager/models/bugwarriorconfigrunlog.py
inthe_am/taskmanager/models/bugwarriorconfigrunlog.py
from django.db import models from .bugwarriorconfig import BugwarriorConfig class BugwarriorConfigRunLog(models.Model): config = models.ForeignKey( BugwarriorConfig, related_name='run_logs', ) success = models.BooleanField(default=False) output = models.TextField() stack_trace = m...
from django.db import models from .bugwarriorconfig import BugwarriorConfig class BugwarriorConfigRunLog(models.Model): config = models.ForeignKey( BugwarriorConfig, related_name='run_logs', ) success = models.BooleanField(default=False) output = models.TextField() stack_trace = m...
Save runlog as output is added.
Save runlog as output is added.
Python
agpl-3.0
coddingtonbear/inthe.am,coddingtonbear/inthe.am,coddingtonbear/inthe.am,coddingtonbear/inthe.am,coddingtonbear/inthe.am
from django.db import models from .bugwarriorconfig import BugwarriorConfig class BugwarriorConfigRunLog(models.Model): config = models.ForeignKey( BugwarriorConfig, related_name='run_logs', ) success = models.BooleanField(default=False) output = models.TextField() stack_trace = m...
from django.db import models from .bugwarriorconfig import BugwarriorConfig class BugwarriorConfigRunLog(models.Model): config = models.ForeignKey( BugwarriorConfig, related_name='run_logs', ) success = models.BooleanField(default=False) output = models.TextField() stack_trace = m...
<commit_before>from django.db import models from .bugwarriorconfig import BugwarriorConfig class BugwarriorConfigRunLog(models.Model): config = models.ForeignKey( BugwarriorConfig, related_name='run_logs', ) success = models.BooleanField(default=False) output = models.TextField() ...
from django.db import models from .bugwarriorconfig import BugwarriorConfig class BugwarriorConfigRunLog(models.Model): config = models.ForeignKey( BugwarriorConfig, related_name='run_logs', ) success = models.BooleanField(default=False) output = models.TextField() stack_trace = m...
from django.db import models from .bugwarriorconfig import BugwarriorConfig class BugwarriorConfigRunLog(models.Model): config = models.ForeignKey( BugwarriorConfig, related_name='run_logs', ) success = models.BooleanField(default=False) output = models.TextField() stack_trace = m...
<commit_before>from django.db import models from .bugwarriorconfig import BugwarriorConfig class BugwarriorConfigRunLog(models.Model): config = models.ForeignKey( BugwarriorConfig, related_name='run_logs', ) success = models.BooleanField(default=False) output = models.TextField() ...
9ac9efbea5ad9e51d564ec563fe25349726ec1f7
inpassing/view_util.py
inpassing/view_util.py
# Copyright (c) 2016 Luke San Antonio Bialecki # All rights reserved. from . import exceptions as ex from . import models from .models import db, User, Org def user_is_participant(user_id, org_id): q = db.session.query(models.org_participants).filter_by( participant=user_id, org=org_id ) (ret,) =...
# Copyright (c) 2016 Luke San Antonio Bialecki # All rights reserved. from . import exceptions as ex from . import models from .models import db, User, Org, Daystate def user_is_participant(user_id, org_id): q = db.session.query(models.org_participants).filter_by( participant=user_id, org=org_id ) ...
Add function to figure out if a given daystate ID is valid for an org
Add function to figure out if a given daystate ID is valid for an org
Python
mit
lukesanantonio/inpassing-backend,lukesanantonio/inpassing-backend
# Copyright (c) 2016 Luke San Antonio Bialecki # All rights reserved. from . import exceptions as ex from . import models from .models import db, User, Org def user_is_participant(user_id, org_id): q = db.session.query(models.org_participants).filter_by( participant=user_id, org=org_id ) (ret,) =...
# Copyright (c) 2016 Luke San Antonio Bialecki # All rights reserved. from . import exceptions as ex from . import models from .models import db, User, Org, Daystate def user_is_participant(user_id, org_id): q = db.session.query(models.org_participants).filter_by( participant=user_id, org=org_id ) ...
<commit_before># Copyright (c) 2016 Luke San Antonio Bialecki # All rights reserved. from . import exceptions as ex from . import models from .models import db, User, Org def user_is_participant(user_id, org_id): q = db.session.query(models.org_participants).filter_by( participant=user_id, org=org_id ...
# Copyright (c) 2016 Luke San Antonio Bialecki # All rights reserved. from . import exceptions as ex from . import models from .models import db, User, Org, Daystate def user_is_participant(user_id, org_id): q = db.session.query(models.org_participants).filter_by( participant=user_id, org=org_id ) ...
# Copyright (c) 2016 Luke San Antonio Bialecki # All rights reserved. from . import exceptions as ex from . import models from .models import db, User, Org def user_is_participant(user_id, org_id): q = db.session.query(models.org_participants).filter_by( participant=user_id, org=org_id ) (ret,) =...
<commit_before># Copyright (c) 2016 Luke San Antonio Bialecki # All rights reserved. from . import exceptions as ex from . import models from .models import db, User, Org def user_is_participant(user_id, org_id): q = db.session.query(models.org_participants).filter_by( participant=user_id, org=org_id ...
fa404452f77b3756e2a54df75c6503cae697e118
mentor/forms.py
mentor/forms.py
from django import forms from django.contrib.auth.models import User from django.contrib.auth.forms import UserCreationForm from mentor.models import UserProfile class RegistrationForm(UserCreationForm): email = forms.EmailField(required=False) class Meta: model = User fields = ("username", "e...
from django import forms from django.contrib.auth.models import User from django.contrib.auth.forms import UserCreationForm from mentor.models import UserProfile class RegistrationForm(UserCreationForm): email = forms.EmailField(required=True) class Meta: model = User fields = ("email", "passw...
Copy email address to username
Copy email address to username
Python
mit
amaunder21/c4tkmentors,amaunder21/c4tkmentors
from django import forms from django.contrib.auth.models import User from django.contrib.auth.forms import UserCreationForm from mentor.models import UserProfile class RegistrationForm(UserCreationForm): email = forms.EmailField(required=False) class Meta: model = User fields = ("username", "e...
from django import forms from django.contrib.auth.models import User from django.contrib.auth.forms import UserCreationForm from mentor.models import UserProfile class RegistrationForm(UserCreationForm): email = forms.EmailField(required=True) class Meta: model = User fields = ("email", "passw...
<commit_before>from django import forms from django.contrib.auth.models import User from django.contrib.auth.forms import UserCreationForm from mentor.models import UserProfile class RegistrationForm(UserCreationForm): email = forms.EmailField(required=False) class Meta: model = User fields = ...
from django import forms from django.contrib.auth.models import User from django.contrib.auth.forms import UserCreationForm from mentor.models import UserProfile class RegistrationForm(UserCreationForm): email = forms.EmailField(required=True) class Meta: model = User fields = ("email", "passw...
from django import forms from django.contrib.auth.models import User from django.contrib.auth.forms import UserCreationForm from mentor.models import UserProfile class RegistrationForm(UserCreationForm): email = forms.EmailField(required=False) class Meta: model = User fields = ("username", "e...
<commit_before>from django import forms from django.contrib.auth.models import User from django.contrib.auth.forms import UserCreationForm from mentor.models import UserProfile class RegistrationForm(UserCreationForm): email = forms.EmailField(required=False) class Meta: model = User fields = ...
808cd0f8ac27a9f113efddba50a37837f364723e
idios/models.py
idios/models.py
from django.conf import settings from django.core.urlresolvers import reverse from django.db import models from django.db.models.signals import post_save from django.utils.translation import ugettext_lazy as _ from django.contrib.auth.models import User from django.contrib.contenttypes.models import ContentType from d...
from django.conf import settings from django.core.urlresolvers import reverse from django.db import models from django.db.models.signals import post_save from django.utils.translation import ugettext_lazy as _ from django.contrib.auth.models import User class ProfileBase(models.Model): user = models.Foreig...
Revert "added GFK for group"
Revert "added GFK for group" This reverts commit 957e11ef62823a29472eeec4dade65ae01bbea70.
Python
bsd-3-clause
eldarion/idios,eldarion/idios,paltman/idios,rbrady/idios,rbrady/idios,paltman/idios
from django.conf import settings from django.core.urlresolvers import reverse from django.db import models from django.db.models.signals import post_save from django.utils.translation import ugettext_lazy as _ from django.contrib.auth.models import User from django.contrib.contenttypes.models import ContentType from d...
from django.conf import settings from django.core.urlresolvers import reverse from django.db import models from django.db.models.signals import post_save from django.utils.translation import ugettext_lazy as _ from django.contrib.auth.models import User class ProfileBase(models.Model): user = models.Foreig...
<commit_before>from django.conf import settings from django.core.urlresolvers import reverse from django.db import models from django.db.models.signals import post_save from django.utils.translation import ugettext_lazy as _ from django.contrib.auth.models import User from django.contrib.contenttypes.models import Con...
from django.conf import settings from django.core.urlresolvers import reverse from django.db import models from django.db.models.signals import post_save from django.utils.translation import ugettext_lazy as _ from django.contrib.auth.models import User class ProfileBase(models.Model): user = models.Foreig...
from django.conf import settings from django.core.urlresolvers import reverse from django.db import models from django.db.models.signals import post_save from django.utils.translation import ugettext_lazy as _ from django.contrib.auth.models import User from django.contrib.contenttypes.models import ContentType from d...
<commit_before>from django.conf import settings from django.core.urlresolvers import reverse from django.db import models from django.db.models.signals import post_save from django.utils.translation import ugettext_lazy as _ from django.contrib.auth.models import User from django.contrib.contenttypes.models import Con...
0300bb45fb52dfaa801bb83b10f3e8316642026d
clintools/deployed_settings.py
clintools/deployed_settings.py
from settings import * DEBUG = TEMPLATE_DEBUG = False ALLOWED_HOSTS = ['pttrack.snhc.wustl.edu'] with open(os.path.join(BASE_DIR, 'secrets/secret_key.txt')) as f: SECRET_KEY = f.read().strip() # TODO: change for deployment? # https://docs.djangoproject.com/en/1.8/ref/settings/#databases DATABASES = { 'defau...
from settings import * DEBUG = TEMPLATE_DEBUG = False ALLOWED_HOSTS = ['pttrack.snhc.wustl.edu'] with open(os.path.join(BASE_DIR, 'secrets/secret_key.txt')) as f: SECRET_KEY = f.read().strip() SECURE_CONTENT_TYPE_NOSNIFF = True SECURE_BROWSER_XSS_FILTER = True SECURE_SSL_REDIRECT = True SESSION_COOKIE_SECURE = T...
Update deployed settings with results from deploy check.
Update deployed settings with results from deploy check.
Python
mit
SaturdayNeighborhoodHealthClinic/clintools,SaturdayNeighborhoodHealthClinic/clintools,SaturdayNeighborhoodHealthClinic/clintools
from settings import * DEBUG = TEMPLATE_DEBUG = False ALLOWED_HOSTS = ['pttrack.snhc.wustl.edu'] with open(os.path.join(BASE_DIR, 'secrets/secret_key.txt')) as f: SECRET_KEY = f.read().strip() # TODO: change for deployment? # https://docs.djangoproject.com/en/1.8/ref/settings/#databases DATABASES = { 'defau...
from settings import * DEBUG = TEMPLATE_DEBUG = False ALLOWED_HOSTS = ['pttrack.snhc.wustl.edu'] with open(os.path.join(BASE_DIR, 'secrets/secret_key.txt')) as f: SECRET_KEY = f.read().strip() SECURE_CONTENT_TYPE_NOSNIFF = True SECURE_BROWSER_XSS_FILTER = True SECURE_SSL_REDIRECT = True SESSION_COOKIE_SECURE = T...
<commit_before>from settings import * DEBUG = TEMPLATE_DEBUG = False ALLOWED_HOSTS = ['pttrack.snhc.wustl.edu'] with open(os.path.join(BASE_DIR, 'secrets/secret_key.txt')) as f: SECRET_KEY = f.read().strip() # TODO: change for deployment? # https://docs.djangoproject.com/en/1.8/ref/settings/#databases DATABASES...
from settings import * DEBUG = TEMPLATE_DEBUG = False ALLOWED_HOSTS = ['pttrack.snhc.wustl.edu'] with open(os.path.join(BASE_DIR, 'secrets/secret_key.txt')) as f: SECRET_KEY = f.read().strip() SECURE_CONTENT_TYPE_NOSNIFF = True SECURE_BROWSER_XSS_FILTER = True SECURE_SSL_REDIRECT = True SESSION_COOKIE_SECURE = T...
from settings import * DEBUG = TEMPLATE_DEBUG = False ALLOWED_HOSTS = ['pttrack.snhc.wustl.edu'] with open(os.path.join(BASE_DIR, 'secrets/secret_key.txt')) as f: SECRET_KEY = f.read().strip() # TODO: change for deployment? # https://docs.djangoproject.com/en/1.8/ref/settings/#databases DATABASES = { 'defau...
<commit_before>from settings import * DEBUG = TEMPLATE_DEBUG = False ALLOWED_HOSTS = ['pttrack.snhc.wustl.edu'] with open(os.path.join(BASE_DIR, 'secrets/secret_key.txt')) as f: SECRET_KEY = f.read().strip() # TODO: change for deployment? # https://docs.djangoproject.com/en/1.8/ref/settings/#databases DATABASES...
5c7f881cd2122be826c2c7351c1c221479ebec39
lib/challenge.py
lib/challenge.py
# python # vim: set fileencoding=UTF-8 : class Challenge: sample = 'sample' def __init__(self): self.lines = [] self.model = [] self.result = [] self.output = '' def main(self): self.read() self.build() self.calc() self.format() #-----...
# python # vim: set fileencoding=UTF-8 : import re import types class Challenge: sample = 'sample' splitter = '\s+|\s?,\s?' def __init__(self): self.lines = [] self.model = types.SimpleNamespace() self.result = types.SimpleNamespace() self.output = '' def main(self):...
Add SimpleNamespace objects for model and result of challange parent class.
Add SimpleNamespace objects for model and result of challange parent class.
Python
mit
elmar-hinz/Python.Challenges
# python # vim: set fileencoding=UTF-8 : class Challenge: sample = 'sample' def __init__(self): self.lines = [] self.model = [] self.result = [] self.output = '' def main(self): self.read() self.build() self.calc() self.format() #-----...
# python # vim: set fileencoding=UTF-8 : import re import types class Challenge: sample = 'sample' splitter = '\s+|\s?,\s?' def __init__(self): self.lines = [] self.model = types.SimpleNamespace() self.result = types.SimpleNamespace() self.output = '' def main(self):...
<commit_before># python # vim: set fileencoding=UTF-8 : class Challenge: sample = 'sample' def __init__(self): self.lines = [] self.model = [] self.result = [] self.output = '' def main(self): self.read() self.build() self.calc() self.forma...
# python # vim: set fileencoding=UTF-8 : import re import types class Challenge: sample = 'sample' splitter = '\s+|\s?,\s?' def __init__(self): self.lines = [] self.model = types.SimpleNamespace() self.result = types.SimpleNamespace() self.output = '' def main(self):...
# python # vim: set fileencoding=UTF-8 : class Challenge: sample = 'sample' def __init__(self): self.lines = [] self.model = [] self.result = [] self.output = '' def main(self): self.read() self.build() self.calc() self.format() #-----...
<commit_before># python # vim: set fileencoding=UTF-8 : class Challenge: sample = 'sample' def __init__(self): self.lines = [] self.model = [] self.result = [] self.output = '' def main(self): self.read() self.build() self.calc() self.forma...
d62cbb79992c7a178c97a36c86b05bc590d2cc61
tcconfig/_split_line_list.py
tcconfig/_split_line_list.py
# encoding: utf-8 """ .. codeauthor:: Tsuyoshi Hombashi <tsuyoshi.hombashi@gmail.com> """ from __future__ import absolute_import, unicode_literals import re def __null_line_strip(line): return line def __line_strip(line): return line.strip() def split_line_list( line_list, re_line_separator=re....
# encoding: utf-8 """ .. codeauthor:: Tsuyoshi Hombashi <tsuyoshi.hombashi@gmail.com> """ from __future__ import absolute_import, unicode_literals import re def __null_line_strip(line): return line def __line_strip(line): return line.strip() def split_line_list( line_list, re_block_separator=re...
Rename an argument to be more precisely represent the use purpose
Rename an argument to be more precisely represent the use purpose
Python
mit
thombashi/tcconfig,thombashi/tcconfig
# encoding: utf-8 """ .. codeauthor:: Tsuyoshi Hombashi <tsuyoshi.hombashi@gmail.com> """ from __future__ import absolute_import, unicode_literals import re def __null_line_strip(line): return line def __line_strip(line): return line.strip() def split_line_list( line_list, re_line_separator=re....
# encoding: utf-8 """ .. codeauthor:: Tsuyoshi Hombashi <tsuyoshi.hombashi@gmail.com> """ from __future__ import absolute_import, unicode_literals import re def __null_line_strip(line): return line def __line_strip(line): return line.strip() def split_line_list( line_list, re_block_separator=re...
<commit_before># encoding: utf-8 """ .. codeauthor:: Tsuyoshi Hombashi <tsuyoshi.hombashi@gmail.com> """ from __future__ import absolute_import, unicode_literals import re def __null_line_strip(line): return line def __line_strip(line): return line.strip() def split_line_list( line_list, re_lin...
# encoding: utf-8 """ .. codeauthor:: Tsuyoshi Hombashi <tsuyoshi.hombashi@gmail.com> """ from __future__ import absolute_import, unicode_literals import re def __null_line_strip(line): return line def __line_strip(line): return line.strip() def split_line_list( line_list, re_block_separator=re...
# encoding: utf-8 """ .. codeauthor:: Tsuyoshi Hombashi <tsuyoshi.hombashi@gmail.com> """ from __future__ import absolute_import, unicode_literals import re def __null_line_strip(line): return line def __line_strip(line): return line.strip() def split_line_list( line_list, re_line_separator=re....
<commit_before># encoding: utf-8 """ .. codeauthor:: Tsuyoshi Hombashi <tsuyoshi.hombashi@gmail.com> """ from __future__ import absolute_import, unicode_literals import re def __null_line_strip(line): return line def __line_strip(line): return line.strip() def split_line_list( line_list, re_lin...
f053615c51a7b937e4dedc561757f675e95380a7
poradnia/cases/migrations/0002_auto_20150102_1532.py
poradnia/cases/migrations/0002_auto_20150102_1532.py
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.conf import settings from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('cases', '0001_initial'), migrations.swappable_dependency(settings.AUTH_USER_MODEL), ('tags',...
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.conf import settings from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('cases', '0001_initial'), migrations.swappable_dependency(settings.AUTH_USER_MODEL), ] opera...
Fix cases migrations after drop tags
Fix cases migrations after drop tags
Python
mit
rwakulszowa/poradnia,watchdogpolska/poradnia,watchdogpolska/poradnia,watchdogpolska/poradnia.siecobywatelska.pl,watchdogpolska/poradnia,rwakulszowa/poradnia,watchdogpolska/poradnia.siecobywatelska.pl,rwakulszowa/poradnia,rwakulszowa/poradnia,watchdogpolska/poradnia.siecobywatelska.pl,watchdogpolska/poradnia
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.conf import settings from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('cases', '0001_initial'), migrations.swappable_dependency(settings.AUTH_USER_MODEL), ('tags',...
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.conf import settings from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('cases', '0001_initial'), migrations.swappable_dependency(settings.AUTH_USER_MODEL), ] opera...
<commit_before># -*- coding: utf-8 -*- from __future__ import unicode_literals from django.conf import settings from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('cases', '0001_initial'), migrations.swappable_dependency(settings.AUTH_USER_MODEL), ...
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.conf import settings from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('cases', '0001_initial'), migrations.swappable_dependency(settings.AUTH_USER_MODEL), ] opera...
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.conf import settings from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('cases', '0001_initial'), migrations.swappable_dependency(settings.AUTH_USER_MODEL), ('tags',...
<commit_before># -*- coding: utf-8 -*- from __future__ import unicode_literals from django.conf import settings from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('cases', '0001_initial'), migrations.swappable_dependency(settings.AUTH_USER_MODEL), ...
43e4e154df6274ea80b5d495a682c2d17cdb178d
cla_backend/apps/knowledgebase/tests/test_events.py
cla_backend/apps/knowledgebase/tests/test_events.py
from django.test import TestCase from cla_eventlog.tests.base import EventTestCaseMixin class AlternativeHelpEventTestCase(EventTestCaseMixin, TestCase): EVENT_KEY = 'alternative_help' def test_assign_alternative_help(self): self._test_process_with_expicit_code( ['COSPF', 'IRKB'] ...
from django.test import TestCase from cla_eventlog.tests.base import EventTestCaseMixin class AlternativeHelpEventTestCase(EventTestCaseMixin, TestCase): EVENT_KEY = 'alternative_help' def test_assign_alternative_help(self): self._test_process_with_expicit_code( ['COSPF', 'IRKB', 'SPFN',...
Add new outcome codes to tests
Add new outcome codes to tests
Python
mit
ministryofjustice/cla_backend,ministryofjustice/cla_backend,ministryofjustice/cla_backend,ministryofjustice/cla_backend
from django.test import TestCase from cla_eventlog.tests.base import EventTestCaseMixin class AlternativeHelpEventTestCase(EventTestCaseMixin, TestCase): EVENT_KEY = 'alternative_help' def test_assign_alternative_help(self): self._test_process_with_expicit_code( ['COSPF', 'IRKB'] ...
from django.test import TestCase from cla_eventlog.tests.base import EventTestCaseMixin class AlternativeHelpEventTestCase(EventTestCaseMixin, TestCase): EVENT_KEY = 'alternative_help' def test_assign_alternative_help(self): self._test_process_with_expicit_code( ['COSPF', 'IRKB', 'SPFN',...
<commit_before>from django.test import TestCase from cla_eventlog.tests.base import EventTestCaseMixin class AlternativeHelpEventTestCase(EventTestCaseMixin, TestCase): EVENT_KEY = 'alternative_help' def test_assign_alternative_help(self): self._test_process_with_expicit_code( ['COSPF', ...
from django.test import TestCase from cla_eventlog.tests.base import EventTestCaseMixin class AlternativeHelpEventTestCase(EventTestCaseMixin, TestCase): EVENT_KEY = 'alternative_help' def test_assign_alternative_help(self): self._test_process_with_expicit_code( ['COSPF', 'IRKB', 'SPFN',...
from django.test import TestCase from cla_eventlog.tests.base import EventTestCaseMixin class AlternativeHelpEventTestCase(EventTestCaseMixin, TestCase): EVENT_KEY = 'alternative_help' def test_assign_alternative_help(self): self._test_process_with_expicit_code( ['COSPF', 'IRKB'] ...
<commit_before>from django.test import TestCase from cla_eventlog.tests.base import EventTestCaseMixin class AlternativeHelpEventTestCase(EventTestCaseMixin, TestCase): EVENT_KEY = 'alternative_help' def test_assign_alternative_help(self): self._test_process_with_expicit_code( ['COSPF', ...
bf0b00d8103dd87b4a99aeccd7501f055e747e7a
ctlibre/urls.py
ctlibre/urls.py
from django.conf import settings from django.conf.urls import patterns, include, url, static from django.contrib import admin admin.autodiscover() urlpatterns = patterns('', url(r'^$', 'ctlibre.views.home', name='home'), url(r'^article/(?P<slug>[^/]+)', 'news.views.article_detail', name='article-det...
from django.conf import settings from django.conf.urls import patterns, include, url, static from django.contrib import admin admin.autodiscover() urlpatterns = patterns('', url(r'^$', 'ctlibre.views.home', name='home'), url(r'^article/(?P<slug>[^/]+)/$', 'news.views.article_detail', name='article-d...
Add ending slash to regex for article-detail view
Add ending slash to regex for article-detail view
Python
agpl-3.0
dellsystem/ctlibre.com
from django.conf import settings from django.conf.urls import patterns, include, url, static from django.contrib import admin admin.autodiscover() urlpatterns = patterns('', url(r'^$', 'ctlibre.views.home', name='home'), url(r'^article/(?P<slug>[^/]+)', 'news.views.article_detail', name='article-det...
from django.conf import settings from django.conf.urls import patterns, include, url, static from django.contrib import admin admin.autodiscover() urlpatterns = patterns('', url(r'^$', 'ctlibre.views.home', name='home'), url(r'^article/(?P<slug>[^/]+)/$', 'news.views.article_detail', name='article-d...
<commit_before>from django.conf import settings from django.conf.urls import patterns, include, url, static from django.contrib import admin admin.autodiscover() urlpatterns = patterns('', url(r'^$', 'ctlibre.views.home', name='home'), url(r'^article/(?P<slug>[^/]+)', 'news.views.article_detail', na...
from django.conf import settings from django.conf.urls import patterns, include, url, static from django.contrib import admin admin.autodiscover() urlpatterns = patterns('', url(r'^$', 'ctlibre.views.home', name='home'), url(r'^article/(?P<slug>[^/]+)/$', 'news.views.article_detail', name='article-d...
from django.conf import settings from django.conf.urls import patterns, include, url, static from django.contrib import admin admin.autodiscover() urlpatterns = patterns('', url(r'^$', 'ctlibre.views.home', name='home'), url(r'^article/(?P<slug>[^/]+)', 'news.views.article_detail', name='article-det...
<commit_before>from django.conf import settings from django.conf.urls import patterns, include, url, static from django.contrib import admin admin.autodiscover() urlpatterns = patterns('', url(r'^$', 'ctlibre.views.home', name='home'), url(r'^article/(?P<slug>[^/]+)', 'news.views.article_detail', na...
1de4a0edd0f3c43b53e3a91c10d23155889791c6
tca/chat/tests.py
tca/chat/tests.py
from django.test import TestCase # Create your tests here.
from django.test import TestCase from django.core.urlresolvers import reverse from urllib import urlencode import json class ViewTestCaseMixin(object): """A mixin providing some convenience methods for testing views. Expects that a ``view_name`` property exists on the class which mixes it in. """ ...
Add a helper mixin for view test cases
Add a helper mixin for view test cases The mixin defines some helper methods which are useful when testing views (REST endpoints).
Python
bsd-3-clause
mlalic/TumCampusAppBackend,mlalic/TumCampusAppBackend
from django.test import TestCase # Create your tests here. Add a helper mixin for view test cases The mixin defines some helper methods which are useful when testing views (REST endpoints).
from django.test import TestCase from django.core.urlresolvers import reverse from urllib import urlencode import json class ViewTestCaseMixin(object): """A mixin providing some convenience methods for testing views. Expects that a ``view_name`` property exists on the class which mixes it in. """ ...
<commit_before>from django.test import TestCase # Create your tests here. <commit_msg>Add a helper mixin for view test cases The mixin defines some helper methods which are useful when testing views (REST endpoints).<commit_after>
from django.test import TestCase from django.core.urlresolvers import reverse from urllib import urlencode import json class ViewTestCaseMixin(object): """A mixin providing some convenience methods for testing views. Expects that a ``view_name`` property exists on the class which mixes it in. """ ...
from django.test import TestCase # Create your tests here. Add a helper mixin for view test cases The mixin defines some helper methods which are useful when testing views (REST endpoints).from django.test import TestCase from django.core.urlresolvers import reverse from urllib import urlencode import json class ...
<commit_before>from django.test import TestCase # Create your tests here. <commit_msg>Add a helper mixin for view test cases The mixin defines some helper methods which are useful when testing views (REST endpoints).<commit_after>from django.test import TestCase from django.core.urlresolvers import reverse from urll...
a688c8287c7f4c52d856f5bef363a73526a7b1d8
orders/views.py
orders/views.py
from django.db.models import Sum from django.db.models.query import QuerySet from django.shortcuts import render, get_object_or_404 from django.utils import timezone from orders.models import Order def order_details(request, order_pk): order = get_object_or_404(Order.objects.prefetch_related('books'), pk=order_p...
from django.db.models import Sum from django.db.models.query import QuerySet from django.shortcuts import render, get_object_or_404 from django.utils import timezone from orders.models import Order def order_details(request, order_pk): order = get_object_or_404(Order.objects.prefetch_related('books', 'books__boo...
Optimize number of SQL queries in Order details view
Optimize number of SQL queries in Order details view
Python
agpl-3.0
m4tx/egielda,m4tx/egielda,m4tx/egielda
from django.db.models import Sum from django.db.models.query import QuerySet from django.shortcuts import render, get_object_or_404 from django.utils import timezone from orders.models import Order def order_details(request, order_pk): order = get_object_or_404(Order.objects.prefetch_related('books'), pk=order_p...
from django.db.models import Sum from django.db.models.query import QuerySet from django.shortcuts import render, get_object_or_404 from django.utils import timezone from orders.models import Order def order_details(request, order_pk): order = get_object_or_404(Order.objects.prefetch_related('books', 'books__boo...
<commit_before>from django.db.models import Sum from django.db.models.query import QuerySet from django.shortcuts import render, get_object_or_404 from django.utils import timezone from orders.models import Order def order_details(request, order_pk): order = get_object_or_404(Order.objects.prefetch_related('book...
from django.db.models import Sum from django.db.models.query import QuerySet from django.shortcuts import render, get_object_or_404 from django.utils import timezone from orders.models import Order def order_details(request, order_pk): order = get_object_or_404(Order.objects.prefetch_related('books', 'books__boo...
from django.db.models import Sum from django.db.models.query import QuerySet from django.shortcuts import render, get_object_or_404 from django.utils import timezone from orders.models import Order def order_details(request, order_pk): order = get_object_or_404(Order.objects.prefetch_related('books'), pk=order_p...
<commit_before>from django.db.models import Sum from django.db.models.query import QuerySet from django.shortcuts import render, get_object_or_404 from django.utils import timezone from orders.models import Order def order_details(request, order_pk): order = get_object_or_404(Order.objects.prefetch_related('book...
c15bbff2fbe9f4063ca0776262526e5270eefc1e
config/__init__.py
config/__init__.py
""" This module is responsible for handling configuration and files related to it, including calibration parameters. """ import configparser import os """ Default options """ #TODO: format this to match the dicts generated by configparser from files. #TODO: more default options... _CONFIG_DEFAULTS = { # defaul...
""" This module is responsible for handling configuration and files related to it, including calibration parameters. """ import configparser import os """ Default options """ #TODO: more default options... _CONFIG_DEFAULTS = { "paths": { # default database path is ../db/test.db relative to this file ...
Add proper default values to config (although hardcoded).
Add proper default values to config (although hardcoded).
Python
mit
mgunyho/kiltiskahvi
""" This module is responsible for handling configuration and files related to it, including calibration parameters. """ import configparser import os """ Default options """ #TODO: format this to match the dicts generated by configparser from files. #TODO: more default options... _CONFIG_DEFAULTS = { # defaul...
""" This module is responsible for handling configuration and files related to it, including calibration parameters. """ import configparser import os """ Default options """ #TODO: more default options... _CONFIG_DEFAULTS = { "paths": { # default database path is ../db/test.db relative to this file ...
<commit_before>""" This module is responsible for handling configuration and files related to it, including calibration parameters. """ import configparser import os """ Default options """ #TODO: format this to match the dicts generated by configparser from files. #TODO: more default options... _CONFIG_DEFAULTS = {...
""" This module is responsible for handling configuration and files related to it, including calibration parameters. """ import configparser import os """ Default options """ #TODO: more default options... _CONFIG_DEFAULTS = { "paths": { # default database path is ../db/test.db relative to this file ...
""" This module is responsible for handling configuration and files related to it, including calibration parameters. """ import configparser import os """ Default options """ #TODO: format this to match the dicts generated by configparser from files. #TODO: more default options... _CONFIG_DEFAULTS = { # defaul...
<commit_before>""" This module is responsible for handling configuration and files related to it, including calibration parameters. """ import configparser import os """ Default options """ #TODO: format this to match the dicts generated by configparser from files. #TODO: more default options... _CONFIG_DEFAULTS = {...
b90433326e2d99b34acceb8552b038501a7d238d
examples/regression_offset_autograd.py
examples/regression_offset_autograd.py
import autograd.numpy as np from pymanopt import Problem from pymanopt.solvers import TrustRegions from pymanopt.manifolds import Euclidean, Product if __name__ == "__main__": # Generate random data X = np.random.randn(3, 100) Y = X[0:1, :] - 2*X[1:2, :] + np.random.randn(1, 100) + 5 # Cost function ...
import autograd.numpy as np from pymanopt import Problem from pymanopt.solvers import TrustRegions from pymanopt.manifolds import Euclidean, Product if __name__ == "__main__": # Generate random data X = np.random.randn(3, 100) Y = X[0:1, :] - 2*X[1:2, :] + np.random.randn(1, 100) + 5 # Cost function ...
Fix regression autograd example for python3
Fix regression autograd example for python3
Python
bsd-3-clause
nkoep/pymanopt,nkoep/pymanopt,nkoep/pymanopt,tingelst/pymanopt,pymanopt/pymanopt,pymanopt/pymanopt,j-towns/pymanopt
import autograd.numpy as np from pymanopt import Problem from pymanopt.solvers import TrustRegions from pymanopt.manifolds import Euclidean, Product if __name__ == "__main__": # Generate random data X = np.random.randn(3, 100) Y = X[0:1, :] - 2*X[1:2, :] + np.random.randn(1, 100) + 5 # Cost function ...
import autograd.numpy as np from pymanopt import Problem from pymanopt.solvers import TrustRegions from pymanopt.manifolds import Euclidean, Product if __name__ == "__main__": # Generate random data X = np.random.randn(3, 100) Y = X[0:1, :] - 2*X[1:2, :] + np.random.randn(1, 100) + 5 # Cost function ...
<commit_before>import autograd.numpy as np from pymanopt import Problem from pymanopt.solvers import TrustRegions from pymanopt.manifolds import Euclidean, Product if __name__ == "__main__": # Generate random data X = np.random.randn(3, 100) Y = X[0:1, :] - 2*X[1:2, :] + np.random.randn(1, 100) + 5 #...
import autograd.numpy as np from pymanopt import Problem from pymanopt.solvers import TrustRegions from pymanopt.manifolds import Euclidean, Product if __name__ == "__main__": # Generate random data X = np.random.randn(3, 100) Y = X[0:1, :] - 2*X[1:2, :] + np.random.randn(1, 100) + 5 # Cost function ...
import autograd.numpy as np from pymanopt import Problem from pymanopt.solvers import TrustRegions from pymanopt.manifolds import Euclidean, Product if __name__ == "__main__": # Generate random data X = np.random.randn(3, 100) Y = X[0:1, :] - 2*X[1:2, :] + np.random.randn(1, 100) + 5 # Cost function ...
<commit_before>import autograd.numpy as np from pymanopt import Problem from pymanopt.solvers import TrustRegions from pymanopt.manifolds import Euclidean, Product if __name__ == "__main__": # Generate random data X = np.random.randn(3, 100) Y = X[0:1, :] - 2*X[1:2, :] + np.random.randn(1, 100) + 5 #...
92631d96a9acac10e8af98bbaa5ec2afee1ae12f
openrcv/main.py
openrcv/main.py
#!/usr/bin/env python """ This module houses the "highest-level" programmatic API. """ import sys from openrcv import models from openrcv.models import BallotList from openrcv.parsing import BLTParser from openrcv.utils import FILE_ENCODING def do_parse(ballots_path, encoding=None): if encoding is None: ...
#!/usr/bin/env python """ This module houses the "highest-level" programmatic API. """ import sys from openrcv import models from openrcv.models import BallotList from openrcv.parsing import BLTParser from openrcv.utils import FILE_ENCODING def make_json_tests(): contests = [] for count in range(3, 6): ...
Add code for generating test files.
Add code for generating test files.
Python
mit
cjerdonek/open-rcv,cjerdonek/open-rcv
#!/usr/bin/env python """ This module houses the "highest-level" programmatic API. """ import sys from openrcv import models from openrcv.models import BallotList from openrcv.parsing import BLTParser from openrcv.utils import FILE_ENCODING def do_parse(ballots_path, encoding=None): if encoding is None: ...
#!/usr/bin/env python """ This module houses the "highest-level" programmatic API. """ import sys from openrcv import models from openrcv.models import BallotList from openrcv.parsing import BLTParser from openrcv.utils import FILE_ENCODING def make_json_tests(): contests = [] for count in range(3, 6): ...
<commit_before>#!/usr/bin/env python """ This module houses the "highest-level" programmatic API. """ import sys from openrcv import models from openrcv.models import BallotList from openrcv.parsing import BLTParser from openrcv.utils import FILE_ENCODING def do_parse(ballots_path, encoding=None): if encoding...
#!/usr/bin/env python """ This module houses the "highest-level" programmatic API. """ import sys from openrcv import models from openrcv.models import BallotList from openrcv.parsing import BLTParser from openrcv.utils import FILE_ENCODING def make_json_tests(): contests = [] for count in range(3, 6): ...
#!/usr/bin/env python """ This module houses the "highest-level" programmatic API. """ import sys from openrcv import models from openrcv.models import BallotList from openrcv.parsing import BLTParser from openrcv.utils import FILE_ENCODING def do_parse(ballots_path, encoding=None): if encoding is None: ...
<commit_before>#!/usr/bin/env python """ This module houses the "highest-level" programmatic API. """ import sys from openrcv import models from openrcv.models import BallotList from openrcv.parsing import BLTParser from openrcv.utils import FILE_ENCODING def do_parse(ballots_path, encoding=None): if encoding...
5cd87adf93502a4de5b413c2f537af57ffe4c418
paley.py
paley.py
import turtle import math import sys class Paley: def __init__(self, p, radius = 290): self.p = p self.radius = radius """Return coordinates of ith vertex""" def getVertex(self, i): angle = i * 2 * math.pi / self.p return (self.radius * math.cos(angle), self.radius * math....
import turtle import math import sys class Paley: def __init__(self, p, radius = 290): self.p = p self.radius = radius """Return coordinates of ith vertex""" def getVertex(self, i): angle = i * 2 * math.pi / self.p return (self.radius * math.cos(angle), self.radius * math....
Use 2D array instead of 1D to keep track of which edges have been drawn
Use 2D array instead of 1D to keep track of which edges have been drawn TODO: this probably isn't necessary
Python
mit
smpcole/paley-graph-drawer,smpcole/paley-graph-drawer
import turtle import math import sys class Paley: def __init__(self, p, radius = 290): self.p = p self.radius = radius """Return coordinates of ith vertex""" def getVertex(self, i): angle = i * 2 * math.pi / self.p return (self.radius * math.cos(angle), self.radius * math....
import turtle import math import sys class Paley: def __init__(self, p, radius = 290): self.p = p self.radius = radius """Return coordinates of ith vertex""" def getVertex(self, i): angle = i * 2 * math.pi / self.p return (self.radius * math.cos(angle), self.radius * math....
<commit_before>import turtle import math import sys class Paley: def __init__(self, p, radius = 290): self.p = p self.radius = radius """Return coordinates of ith vertex""" def getVertex(self, i): angle = i * 2 * math.pi / self.p return (self.radius * math.cos(angle), self...
import turtle import math import sys class Paley: def __init__(self, p, radius = 290): self.p = p self.radius = radius """Return coordinates of ith vertex""" def getVertex(self, i): angle = i * 2 * math.pi / self.p return (self.radius * math.cos(angle), self.radius * math....
import turtle import math import sys class Paley: def __init__(self, p, radius = 290): self.p = p self.radius = radius """Return coordinates of ith vertex""" def getVertex(self, i): angle = i * 2 * math.pi / self.p return (self.radius * math.cos(angle), self.radius * math....
<commit_before>import turtle import math import sys class Paley: def __init__(self, p, radius = 290): self.p = p self.radius = radius """Return coordinates of ith vertex""" def getVertex(self, i): angle = i * 2 * math.pi / self.p return (self.radius * math.cos(angle), self...
a378702e0f384237aa1bc1a6ef85c6e9ace398dc
tests/eldag_canon_test.py
tests/eldag_canon_test.py
"""Tests for the canonicalization facility for Eldags.""" from drudge import Perm, Group, canon_eldag def test_eldag_can_be_canonicalized(): """Tests the Eldag canonicalization facility. Note that this test more focuses on better coverage in the canonpy interface to libcanon, rather than on the correctn...
Add test for eldag canonicalization
Add test for eldag canonicalization The test covers many cases for eldag canonicalization. Note that this test does not covers a lot of error reporting, since the eldag canonicalization is less likely to be called by users of drudge.
Python
mit
tschijnmo/drudge,tschijnmo/drudge,tschijnmo/drudge
Add test for eldag canonicalization The test covers many cases for eldag canonicalization. Note that this test does not covers a lot of error reporting, since the eldag canonicalization is less likely to be called by users of drudge.
"""Tests for the canonicalization facility for Eldags.""" from drudge import Perm, Group, canon_eldag def test_eldag_can_be_canonicalized(): """Tests the Eldag canonicalization facility. Note that this test more focuses on better coverage in the canonpy interface to libcanon, rather than on the correctn...
<commit_before><commit_msg>Add test for eldag canonicalization The test covers many cases for eldag canonicalization. Note that this test does not covers a lot of error reporting, since the eldag canonicalization is less likely to be called by users of drudge.<commit_after>
"""Tests for the canonicalization facility for Eldags.""" from drudge import Perm, Group, canon_eldag def test_eldag_can_be_canonicalized(): """Tests the Eldag canonicalization facility. Note that this test more focuses on better coverage in the canonpy interface to libcanon, rather than on the correctn...
Add test for eldag canonicalization The test covers many cases for eldag canonicalization. Note that this test does not covers a lot of error reporting, since the eldag canonicalization is less likely to be called by users of drudge."""Tests for the canonicalization facility for Eldags.""" from drudge import Perm, G...
<commit_before><commit_msg>Add test for eldag canonicalization The test covers many cases for eldag canonicalization. Note that this test does not covers a lot of error reporting, since the eldag canonicalization is less likely to be called by users of drudge.<commit_after>"""Tests for the canonicalization facility f...
78ef59e29e2bed99d07261ff947f16be69e0e6b5
tests/fake_dbus_tools/swm.py
tests/fake_dbus_tools/swm.py
import gtk import dbus.service import sys from dbus.mainloop.glib import DBusGMainLoop class SLMService(dbus.service.Object): def __init__(self): bus_name = dbus.service.BusName('org.genivi.SoftwareLoadingManager', bus=dbus.SessionBus()) dbus.service.Object.__init__(self, bus_name, "/org/...
import dbus.service import sys from dbus.mainloop.glib import DBusGMainLoop import gobject class SLMService(dbus.service.Object): def __init__(self): bus_name = dbus.service.BusName('org.genivi.SoftwareLoadingManager', bus=dbus.SessionBus()) dbus.service.Object.__init__(self, bus_name, "/...
Replace gtk mainloop with glib mainloop
Replace gtk mainloop with glib mainloop This is because Travis CI runs headless and importing gtk fails
Python
mpl-2.0
advancedtelematic/aktualizr,advancedtelematic/aktualizr,advancedtelematic/sota_client_cpp,advancedtelematic/aktualizr,advancedtelematic/aktualizr,advancedtelematic/sota_client_cpp
import gtk import dbus.service import sys from dbus.mainloop.glib import DBusGMainLoop class SLMService(dbus.service.Object): def __init__(self): bus_name = dbus.service.BusName('org.genivi.SoftwareLoadingManager', bus=dbus.SessionBus()) dbus.service.Object.__init__(self, bus_name, "/org/...
import dbus.service import sys from dbus.mainloop.glib import DBusGMainLoop import gobject class SLMService(dbus.service.Object): def __init__(self): bus_name = dbus.service.BusName('org.genivi.SoftwareLoadingManager', bus=dbus.SessionBus()) dbus.service.Object.__init__(self, bus_name, "/...
<commit_before> import gtk import dbus.service import sys from dbus.mainloop.glib import DBusGMainLoop class SLMService(dbus.service.Object): def __init__(self): bus_name = dbus.service.BusName('org.genivi.SoftwareLoadingManager', bus=dbus.SessionBus()) dbus.service.Object.__init__(self, b...
import dbus.service import sys from dbus.mainloop.glib import DBusGMainLoop import gobject class SLMService(dbus.service.Object): def __init__(self): bus_name = dbus.service.BusName('org.genivi.SoftwareLoadingManager', bus=dbus.SessionBus()) dbus.service.Object.__init__(self, bus_name, "/...
import gtk import dbus.service import sys from dbus.mainloop.glib import DBusGMainLoop class SLMService(dbus.service.Object): def __init__(self): bus_name = dbus.service.BusName('org.genivi.SoftwareLoadingManager', bus=dbus.SessionBus()) dbus.service.Object.__init__(self, bus_name, "/org/...
<commit_before> import gtk import dbus.service import sys from dbus.mainloop.glib import DBusGMainLoop class SLMService(dbus.service.Object): def __init__(self): bus_name = dbus.service.BusName('org.genivi.SoftwareLoadingManager', bus=dbus.SessionBus()) dbus.service.Object.__init__(self, b...
13c1410de300a7f414b51cb001534f021441a00f
tests/test_authentication.py
tests/test_authentication.py
import unittest import tempfile from authentication import authentication class SignupTests(unittest.TestCase): """ Signup tests. """ def test_signup(self): """ Test that a valid signup request returns an OK status. """ test_app = authentication.app.test_client() ...
import unittest import tempfile from authentication import authentication class SignupTests(unittest.TestCase): """ Signup tests. """ def test_signup(self): """ Test that a valid signup request returns an OK status. """ test_app = authentication.app.test_client() ...
Test that there is a json content type
Test that there is a json content type
Python
mit
jenca-cloud/jenca-authentication
import unittest import tempfile from authentication import authentication class SignupTests(unittest.TestCase): """ Signup tests. """ def test_signup(self): """ Test that a valid signup request returns an OK status. """ test_app = authentication.app.test_client() ...
import unittest import tempfile from authentication import authentication class SignupTests(unittest.TestCase): """ Signup tests. """ def test_signup(self): """ Test that a valid signup request returns an OK status. """ test_app = authentication.app.test_client() ...
<commit_before>import unittest import tempfile from authentication import authentication class SignupTests(unittest.TestCase): """ Signup tests. """ def test_signup(self): """ Test that a valid signup request returns an OK status. """ test_app = authentication.app.test...
import unittest import tempfile from authentication import authentication class SignupTests(unittest.TestCase): """ Signup tests. """ def test_signup(self): """ Test that a valid signup request returns an OK status. """ test_app = authentication.app.test_client() ...
import unittest import tempfile from authentication import authentication class SignupTests(unittest.TestCase): """ Signup tests. """ def test_signup(self): """ Test that a valid signup request returns an OK status. """ test_app = authentication.app.test_client() ...
<commit_before>import unittest import tempfile from authentication import authentication class SignupTests(unittest.TestCase): """ Signup tests. """ def test_signup(self): """ Test that a valid signup request returns an OK status. """ test_app = authentication.app.test...
b82d67fa5f4b0ccb9b31a640e65226fea5887c67
typhon/__init__.py
typhon/__init__.py
# -*- coding: utf-8 -*- from .version import __version__ try: __TYPHON_SETUP__ except: __TYPHON_SETUP__ = False if not __TYPHON_SETUP__: from . import arts from . import cloudmask from . import config from . import constants from . import files from . import geodesy from . import ...
import functools import logging from .version import __version__ try: __TYPHON_SETUP__ except: __TYPHON_SETUP__ = False if not __TYPHON_SETUP__: from . import arts from . import cloudmask from . import config from . import constants from . import files from . import geodesy from ....
Add top-level function to control the loglevel
Add top-level function to control the loglevel
Python
mit
atmtools/typhon,atmtools/typhon
# -*- coding: utf-8 -*- from .version import __version__ try: __TYPHON_SETUP__ except: __TYPHON_SETUP__ = False if not __TYPHON_SETUP__: from . import arts from . import cloudmask from . import config from . import constants from . import files from . import geodesy from . import ...
import functools import logging from .version import __version__ try: __TYPHON_SETUP__ except: __TYPHON_SETUP__ = False if not __TYPHON_SETUP__: from . import arts from . import cloudmask from . import config from . import constants from . import files from . import geodesy from ....
<commit_before># -*- coding: utf-8 -*- from .version import __version__ try: __TYPHON_SETUP__ except: __TYPHON_SETUP__ = False if not __TYPHON_SETUP__: from . import arts from . import cloudmask from . import config from . import constants from . import files from . import geodesy ...
import functools import logging from .version import __version__ try: __TYPHON_SETUP__ except: __TYPHON_SETUP__ = False if not __TYPHON_SETUP__: from . import arts from . import cloudmask from . import config from . import constants from . import files from . import geodesy from ....
# -*- coding: utf-8 -*- from .version import __version__ try: __TYPHON_SETUP__ except: __TYPHON_SETUP__ = False if not __TYPHON_SETUP__: from . import arts from . import cloudmask from . import config from . import constants from . import files from . import geodesy from . import ...
<commit_before># -*- coding: utf-8 -*- from .version import __version__ try: __TYPHON_SETUP__ except: __TYPHON_SETUP__ = False if not __TYPHON_SETUP__: from . import arts from . import cloudmask from . import config from . import constants from . import files from . import geodesy ...
4a1bf1bfce80a7ee25e6a60ebf350f86d89a0b58
report.py
report.py
import os from libraries.models import Tweet, User from config import app_config as cfg from libraries.graphs.graph import Graph # Twitter API configuration consumer_key = cfg.twitter["consumer_key"] consumer_secret = cfg.twitter["consumer_secret"] access_token = cfg.twitter["access_token"] access_token_secret = cfg....
import os from libraries.models import Tweet, User from config import app_config as cfg from libraries.graphs.graph import Graph # Twitter API configuration consumer_key = cfg.twitter["consumer_key"] consumer_secret = cfg.twitter["consumer_secret"] access_token = cfg.twitter["access_token"] access_token_secret = cfg....
Fix ratio followers/following only displayed for "humans"
Fix ratio followers/following only displayed for "humans"
Python
mit
franckbrignoli/twitter-bot-detection
import os from libraries.models import Tweet, User from config import app_config as cfg from libraries.graphs.graph import Graph # Twitter API configuration consumer_key = cfg.twitter["consumer_key"] consumer_secret = cfg.twitter["consumer_secret"] access_token = cfg.twitter["access_token"] access_token_secret = cfg....
import os from libraries.models import Tweet, User from config import app_config as cfg from libraries.graphs.graph import Graph # Twitter API configuration consumer_key = cfg.twitter["consumer_key"] consumer_secret = cfg.twitter["consumer_secret"] access_token = cfg.twitter["access_token"] access_token_secret = cfg....
<commit_before>import os from libraries.models import Tweet, User from config import app_config as cfg from libraries.graphs.graph import Graph # Twitter API configuration consumer_key = cfg.twitter["consumer_key"] consumer_secret = cfg.twitter["consumer_secret"] access_token = cfg.twitter["access_token"] access_toke...
import os from libraries.models import Tweet, User from config import app_config as cfg from libraries.graphs.graph import Graph # Twitter API configuration consumer_key = cfg.twitter["consumer_key"] consumer_secret = cfg.twitter["consumer_secret"] access_token = cfg.twitter["access_token"] access_token_secret = cfg....
import os from libraries.models import Tweet, User from config import app_config as cfg from libraries.graphs.graph import Graph # Twitter API configuration consumer_key = cfg.twitter["consumer_key"] consumer_secret = cfg.twitter["consumer_secret"] access_token = cfg.twitter["access_token"] access_token_secret = cfg....
<commit_before>import os from libraries.models import Tweet, User from config import app_config as cfg from libraries.graphs.graph import Graph # Twitter API configuration consumer_key = cfg.twitter["consumer_key"] consumer_secret = cfg.twitter["consumer_secret"] access_token = cfg.twitter["access_token"] access_toke...
d2793192f88cfc7f5054048583fb514ac1904ffd
posts.py
posts.py
import json import pprint import requests def sample_valid_reddit_response(): r = requests.get('http://www.reddit.com/r/cscareerquestions/top.json') response_json = r.json() if 'data' not in response_json: print("Trying again") response_json = sample_valid_reddit_response() return response_json response_js...
import json import pprint import requests def sample_valid_reddit_response(): r = requests.get('http://www.reddit.com/r/cscareerquestions/top.json') response_json = r.json() if 'data' not in response_json: print("Trying again") response_json = sample_valid_reddit_response() return response_json def save_sam...
Move stuff to function for ross
Move stuff to function for ross
Python
mit
RossCarriga/repost-data
import json import pprint import requests def sample_valid_reddit_response(): r = requests.get('http://www.reddit.com/r/cscareerquestions/top.json') response_json = r.json() if 'data' not in response_json: print("Trying again") response_json = sample_valid_reddit_response() return response_json response_js...
import json import pprint import requests def sample_valid_reddit_response(): r = requests.get('http://www.reddit.com/r/cscareerquestions/top.json') response_json = r.json() if 'data' not in response_json: print("Trying again") response_json = sample_valid_reddit_response() return response_json def save_sam...
<commit_before>import json import pprint import requests def sample_valid_reddit_response(): r = requests.get('http://www.reddit.com/r/cscareerquestions/top.json') response_json = r.json() if 'data' not in response_json: print("Trying again") response_json = sample_valid_reddit_response() return response_jso...
import json import pprint import requests def sample_valid_reddit_response(): r = requests.get('http://www.reddit.com/r/cscareerquestions/top.json') response_json = r.json() if 'data' not in response_json: print("Trying again") response_json = sample_valid_reddit_response() return response_json def save_sam...
import json import pprint import requests def sample_valid_reddit_response(): r = requests.get('http://www.reddit.com/r/cscareerquestions/top.json') response_json = r.json() if 'data' not in response_json: print("Trying again") response_json = sample_valid_reddit_response() return response_json response_js...
<commit_before>import json import pprint import requests def sample_valid_reddit_response(): r = requests.get('http://www.reddit.com/r/cscareerquestions/top.json') response_json = r.json() if 'data' not in response_json: print("Trying again") response_json = sample_valid_reddit_response() return response_jso...
81e236f81343f7e4f21cf6b01329d3d1ac738f9f
tests/test_pulse_types.py
tests/test_pulse_types.py
import unittest from QGL import * from QGL.PulseSequencer import * from .helpers import setup_test_lib class PulseTypes(unittest.TestCase): def setUp(self): setup_test_lib() self.q1 = QubitFactory('q1') self.q2 = QubitFactory('q2') self.q3 = QubitFactory('q3') self.q4 = Qub...
import unittest from QGL import * from QGL.PulseSequencer import * import QGL.config from .helpers import setup_test_lib class PulseTypes(unittest.TestCase): def setUp(self): setup_test_lib() QGL.config.cnot_implementation = 'CNOT_CR' self.q1 = QubitFactory('q1') self.q2 = QubitFac...
Make test environment use CNOT_CR implementation of CNOT.
Make test environment use CNOT_CR implementation of CNOT. At least for the test_pulse_types tests.
Python
apache-2.0
BBN-Q/QGL,BBN-Q/QGL
import unittest from QGL import * from QGL.PulseSequencer import * from .helpers import setup_test_lib class PulseTypes(unittest.TestCase): def setUp(self): setup_test_lib() self.q1 = QubitFactory('q1') self.q2 = QubitFactory('q2') self.q3 = QubitFactory('q3') self.q4 = Qub...
import unittest from QGL import * from QGL.PulseSequencer import * import QGL.config from .helpers import setup_test_lib class PulseTypes(unittest.TestCase): def setUp(self): setup_test_lib() QGL.config.cnot_implementation = 'CNOT_CR' self.q1 = QubitFactory('q1') self.q2 = QubitFac...
<commit_before>import unittest from QGL import * from QGL.PulseSequencer import * from .helpers import setup_test_lib class PulseTypes(unittest.TestCase): def setUp(self): setup_test_lib() self.q1 = QubitFactory('q1') self.q2 = QubitFactory('q2') self.q3 = QubitFactory('q3') ...
import unittest from QGL import * from QGL.PulseSequencer import * import QGL.config from .helpers import setup_test_lib class PulseTypes(unittest.TestCase): def setUp(self): setup_test_lib() QGL.config.cnot_implementation = 'CNOT_CR' self.q1 = QubitFactory('q1') self.q2 = QubitFac...
import unittest from QGL import * from QGL.PulseSequencer import * from .helpers import setup_test_lib class PulseTypes(unittest.TestCase): def setUp(self): setup_test_lib() self.q1 = QubitFactory('q1') self.q2 = QubitFactory('q2') self.q3 = QubitFactory('q3') self.q4 = Qub...
<commit_before>import unittest from QGL import * from QGL.PulseSequencer import * from .helpers import setup_test_lib class PulseTypes(unittest.TestCase): def setUp(self): setup_test_lib() self.q1 = QubitFactory('q1') self.q2 = QubitFactory('q2') self.q3 = QubitFactory('q3') ...
cab417f187b66b5ec2f98fc69dcb8f8e98c43b86
tests/tests/middleware.py
tests/tests/middleware.py
from oauth2_consumer.middleware import AuthenticationMiddleware from .test_cases import MiddlewareTestCase class TestMiddleware(MiddlewareTestCase): def test_no_token(self): request = self.factory.get("/") AuthenticationMiddleware().process_request(request) self.asse...
from oauth2_consumer.middleware import AuthenticationMiddleware from .test_cases import MiddlewareTestCase class TestMiddleware(MiddlewareTestCase): def test_no_token(self): request = self.factory.get("/") AuthenticationMiddleware().process_request(request) self.asse...
Add test for invalid bearer token
Add test for invalid bearer token
Python
mit
Rediker-Software/doac
from oauth2_consumer.middleware import AuthenticationMiddleware from .test_cases import MiddlewareTestCase class TestMiddleware(MiddlewareTestCase): def test_no_token(self): request = self.factory.get("/") AuthenticationMiddleware().process_request(request) self.asse...
from oauth2_consumer.middleware import AuthenticationMiddleware from .test_cases import MiddlewareTestCase class TestMiddleware(MiddlewareTestCase): def test_no_token(self): request = self.factory.get("/") AuthenticationMiddleware().process_request(request) self.asse...
<commit_before>from oauth2_consumer.middleware import AuthenticationMiddleware from .test_cases import MiddlewareTestCase class TestMiddleware(MiddlewareTestCase): def test_no_token(self): request = self.factory.get("/") AuthenticationMiddleware().process_request(request) ...
from oauth2_consumer.middleware import AuthenticationMiddleware from .test_cases import MiddlewareTestCase class TestMiddleware(MiddlewareTestCase): def test_no_token(self): request = self.factory.get("/") AuthenticationMiddleware().process_request(request) self.asse...
from oauth2_consumer.middleware import AuthenticationMiddleware from .test_cases import MiddlewareTestCase class TestMiddleware(MiddlewareTestCase): def test_no_token(self): request = self.factory.get("/") AuthenticationMiddleware().process_request(request) self.asse...
<commit_before>from oauth2_consumer.middleware import AuthenticationMiddleware from .test_cases import MiddlewareTestCase class TestMiddleware(MiddlewareTestCase): def test_no_token(self): request = self.factory.get("/") AuthenticationMiddleware().process_request(request) ...
f31f17da75557ce45977589d7da0e1b1fd6612dd
niftianon/cli.py
niftianon/cli.py
from __future__ import absolute_import import click import niftianon.anonymiser @click.command() @click.argument('identifiable_image', type=click.Path(exists=True)) @click.argument('anonymised_image', type=click.Path(exists=False)) def anonymise(identifiable_image, anonymised_image): niftianon.anonymiser.anonymis...
from __future__ import absolute_import import click import niftianon.anonymiser @click.command() @click.argument('identifiable_image', type=click.Path(exists=True)) @click.argument('anonymised_image', type=click.Path(exists=False)) def anonymise(identifiable_image, anonymised_image): """Anonymise IDENTIFIABLE_IMA...
Add docstring to command line entrypoint function
Add docstring to command line entrypoint function
Python
mit
jstutters/niftianon
from __future__ import absolute_import import click import niftianon.anonymiser @click.command() @click.argument('identifiable_image', type=click.Path(exists=True)) @click.argument('anonymised_image', type=click.Path(exists=False)) def anonymise(identifiable_image, anonymised_image): niftianon.anonymiser.anonymis...
from __future__ import absolute_import import click import niftianon.anonymiser @click.command() @click.argument('identifiable_image', type=click.Path(exists=True)) @click.argument('anonymised_image', type=click.Path(exists=False)) def anonymise(identifiable_image, anonymised_image): """Anonymise IDENTIFIABLE_IMA...
<commit_before>from __future__ import absolute_import import click import niftianon.anonymiser @click.command() @click.argument('identifiable_image', type=click.Path(exists=True)) @click.argument('anonymised_image', type=click.Path(exists=False)) def anonymise(identifiable_image, anonymised_image): niftianon.anon...
from __future__ import absolute_import import click import niftianon.anonymiser @click.command() @click.argument('identifiable_image', type=click.Path(exists=True)) @click.argument('anonymised_image', type=click.Path(exists=False)) def anonymise(identifiable_image, anonymised_image): """Anonymise IDENTIFIABLE_IMA...
from __future__ import absolute_import import click import niftianon.anonymiser @click.command() @click.argument('identifiable_image', type=click.Path(exists=True)) @click.argument('anonymised_image', type=click.Path(exists=False)) def anonymise(identifiable_image, anonymised_image): niftianon.anonymiser.anonymis...
<commit_before>from __future__ import absolute_import import click import niftianon.anonymiser @click.command() @click.argument('identifiable_image', type=click.Path(exists=True)) @click.argument('anonymised_image', type=click.Path(exists=False)) def anonymise(identifiable_image, anonymised_image): niftianon.anon...
ca19a982f5302fa0aefbaad2b97fa338b01103b3
queue.py
queue.py
from __future__ import unicode_literals from linked_list import LinkedList class Queue(): def __init__(self, iterable=()): self.other = LinkedList() self.other_init__(iterable) self.tail = None def __repr__(self): pass def __len__(self): pass def enqueue(se...
from __future__ import unicode_literals from linked_list import LinkedList, Node class Queue(): def __init__(self, iterable=()): self.other = LinkedList() self.header = None self.tail = None self.length = None for val in (iterable): self.enqueue(val) def ...
Complete first pass of functions
Complete first pass of functions
Python
mit
jay-tyler/data-structures,jonathanstallings/data-structures
from __future__ import unicode_literals from linked_list import LinkedList class Queue(): def __init__(self, iterable=()): self.other = LinkedList() self.other_init__(iterable) self.tail = None def __repr__(self): pass def __len__(self): pass def enqueue(se...
from __future__ import unicode_literals from linked_list import LinkedList, Node class Queue(): def __init__(self, iterable=()): self.other = LinkedList() self.header = None self.tail = None self.length = None for val in (iterable): self.enqueue(val) def ...
<commit_before>from __future__ import unicode_literals from linked_list import LinkedList class Queue(): def __init__(self, iterable=()): self.other = LinkedList() self.other_init__(iterable) self.tail = None def __repr__(self): pass def __len__(self): pass ...
from __future__ import unicode_literals from linked_list import LinkedList, Node class Queue(): def __init__(self, iterable=()): self.other = LinkedList() self.header = None self.tail = None self.length = None for val in (iterable): self.enqueue(val) def ...
from __future__ import unicode_literals from linked_list import LinkedList class Queue(): def __init__(self, iterable=()): self.other = LinkedList() self.other_init__(iterable) self.tail = None def __repr__(self): pass def __len__(self): pass def enqueue(se...
<commit_before>from __future__ import unicode_literals from linked_list import LinkedList class Queue(): def __init__(self, iterable=()): self.other = LinkedList() self.other_init__(iterable) self.tail = None def __repr__(self): pass def __len__(self): pass ...
0a4057a1c220076a34182327de9b01e8412ad68e
neutron_fwaas/tests/functional/test_fwaas_driver.py
neutron_fwaas/tests/functional/test_fwaas_driver.py
# Copyright (c) 2015 Cisco Systems, 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 r...
# Copyright (c) 2015 Cisco Systems, 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 r...
Use BaseSudoTestCase instead of BaseLinuxTestCase
Use BaseSudoTestCase instead of BaseLinuxTestCase BaseLinuxTestCase will be removed from neutron code[1]. This change uses BaseSudoTestCase instead of BaseLinuxTestCase as helper methods have been transformed into fixtures. [1] https://review.openstack.org/161913 Change-Id: I23398c56c9cd71f617bde9167b9d32d126f16628
Python
apache-2.0
openstack/neutron-fwaas,gaolichuang/neutron-fwaas,gaolichuang/neutron-fwaas,openstack/neutron-fwaas
# Copyright (c) 2015 Cisco Systems, 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 r...
# Copyright (c) 2015 Cisco Systems, 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 r...
<commit_before># Copyright (c) 2015 Cisco Systems, Inc. # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 ...
# Copyright (c) 2015 Cisco Systems, 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 r...
# Copyright (c) 2015 Cisco Systems, 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 r...
<commit_before># Copyright (c) 2015 Cisco Systems, 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 ...
624c52c63084f91429400fcc590e70b9c122ba7c
oslo/__init__.py
oslo/__init__.py
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # 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...
# Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # d...
Remove extraneous vim editor configuration comments
Remove extraneous vim editor configuration comments Change-Id: Id34b3ed02b6ef34b92d0cae9791f6e1b2d6cd4d8 Partial-Bug: #1229324
Python
apache-2.0
varunarya10/oslo.i18n,openstack/oslo.i18n
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # 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...
# Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # d...
<commit_before># vim: tabstop=4 shiftwidth=4 softtabstop=4 # 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 require...
# Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # d...
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable...
<commit_before># vim: tabstop=4 shiftwidth=4 softtabstop=4 # 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 require...
e334f80c5252aabacff5b14df368f4326056c81c
lib/weblogic/wlst/create_oia_domain.py
lib/weblogic/wlst/create_oia_domain.py
import os createDomain=os.path.dirname(sys.argv[0]) +'/heinz/createDomain.py' if os.path.exists(createDomain): execfile(createDomain) def updateNmProperties(): print "Updating NodeManager username and password for " + DomainLocation edit() startEdit() cd("SecurityConfiguration/oia_iamv2") cmo.s...
import os createDomain=os.path.dirname(sys.argv[0]) +'/heinz/createDomain.py' if os.path.exists(createDomain): execfile(createDomain) # ================================================================ # Main Code Execution # ================================================================ if __name__== "...
Revert "added function to change OIA AdminServer nodemanager credentials"
Revert "added function to change OIA AdminServer nodemanager credentials" This reverts commit 134562138847b55853d22e4fa86c8a17e83d4b1d.
Python
bsd-2-clause
kapfenho/iam-deployer,kapfenho/iam-deployer,kapfenho/iam-deployer,kapfenho/iam-deployer
import os createDomain=os.path.dirname(sys.argv[0]) +'/heinz/createDomain.py' if os.path.exists(createDomain): execfile(createDomain) def updateNmProperties(): print "Updating NodeManager username and password for " + DomainLocation edit() startEdit() cd("SecurityConfiguration/oia_iamv2") cmo.s...
import os createDomain=os.path.dirname(sys.argv[0]) +'/heinz/createDomain.py' if os.path.exists(createDomain): execfile(createDomain) # ================================================================ # Main Code Execution # ================================================================ if __name__== "...
<commit_before>import os createDomain=os.path.dirname(sys.argv[0]) +'/heinz/createDomain.py' if os.path.exists(createDomain): execfile(createDomain) def updateNmProperties(): print "Updating NodeManager username and password for " + DomainLocation edit() startEdit() cd("SecurityConfiguration/oia_ia...
import os createDomain=os.path.dirname(sys.argv[0]) +'/heinz/createDomain.py' if os.path.exists(createDomain): execfile(createDomain) # ================================================================ # Main Code Execution # ================================================================ if __name__== "...
import os createDomain=os.path.dirname(sys.argv[0]) +'/heinz/createDomain.py' if os.path.exists(createDomain): execfile(createDomain) def updateNmProperties(): print "Updating NodeManager username and password for " + DomainLocation edit() startEdit() cd("SecurityConfiguration/oia_iamv2") cmo.s...
<commit_before>import os createDomain=os.path.dirname(sys.argv[0]) +'/heinz/createDomain.py' if os.path.exists(createDomain): execfile(createDomain) def updateNmProperties(): print "Updating NodeManager username and password for " + DomainLocation edit() startEdit() cd("SecurityConfiguration/oia_ia...
96f229ce62ea16588621bdbf760558af56595cef
packetmorpher.py
packetmorpher.py
""" Provides code to morph a chunk of data to a given probability distribution. The class provides an interface to morph network packet lengths to a previously generated probability distribution. The packet lengths of the morphed network data should then match the probability distribution. """ import random import ...
""" Provides code to morph a chunk of data to a given probability distribution. The class provides an interface to morph network packet lengths to a previously generated probability distribution. The packet lengths of the morphed network data should then match the probability distribution. """ import random import ...
Delete `randomSample()' because it is no longer used.
Delete `randomSample()' because it is no longer used.
Python
bsd-3-clause
isislovecruft/scramblesuit,isislovecruft/scramblesuit
""" Provides code to morph a chunk of data to a given probability distribution. The class provides an interface to morph network packet lengths to a previously generated probability distribution. The packet lengths of the morphed network data should then match the probability distribution. """ import random import ...
""" Provides code to morph a chunk of data to a given probability distribution. The class provides an interface to morph network packet lengths to a previously generated probability distribution. The packet lengths of the morphed network data should then match the probability distribution. """ import random import ...
<commit_before>""" Provides code to morph a chunk of data to a given probability distribution. The class provides an interface to morph network packet lengths to a previously generated probability distribution. The packet lengths of the morphed network data should then match the probability distribution. """ import ...
""" Provides code to morph a chunk of data to a given probability distribution. The class provides an interface to morph network packet lengths to a previously generated probability distribution. The packet lengths of the morphed network data should then match the probability distribution. """ import random import ...
""" Provides code to morph a chunk of data to a given probability distribution. The class provides an interface to morph network packet lengths to a previously generated probability distribution. The packet lengths of the morphed network data should then match the probability distribution. """ import random import ...
<commit_before>""" Provides code to morph a chunk of data to a given probability distribution. The class provides an interface to morph network packet lengths to a previously generated probability distribution. The packet lengths of the morphed network data should then match the probability distribution. """ import ...
e6e121e1756d215bcf452522e268899d8669614c
dev_settings.py
dev_settings.py
""" This is a home for shared dev settings. Feel free to add anything that all devs should have set. Add `from dev_settings import *` to the top of your localsettings file to use. You can then override or append to any of these settings there. """ LOCAL_APPS = ( 'django_extensions', ) ####### Django Extensions ...
""" This is a home for shared dev settings. Feel free to add anything that all devs should have set. Add `from dev_settings import *` to the top of your localsettings file to use. You can then override or append to any of these settings there. """ import os LOCAL_APPS = ( 'django_extensions', ) ####### Django E...
Use `$ which bower` by default
Use `$ which bower` by default @benrudolph What do you think of this approach?
Python
bsd-3-clause
qedsoftware/commcare-hq,qedsoftware/commcare-hq,dimagi/commcare-hq,qedsoftware/commcare-hq,dimagi/commcare-hq,qedsoftware/commcare-hq,dimagi/commcare-hq,dimagi/commcare-hq,qedsoftware/commcare-hq,dimagi/commcare-hq
""" This is a home for shared dev settings. Feel free to add anything that all devs should have set. Add `from dev_settings import *` to the top of your localsettings file to use. You can then override or append to any of these settings there. """ LOCAL_APPS = ( 'django_extensions', ) ####### Django Extensions ...
""" This is a home for shared dev settings. Feel free to add anything that all devs should have set. Add `from dev_settings import *` to the top of your localsettings file to use. You can then override or append to any of these settings there. """ import os LOCAL_APPS = ( 'django_extensions', ) ####### Django E...
<commit_before>""" This is a home for shared dev settings. Feel free to add anything that all devs should have set. Add `from dev_settings import *` to the top of your localsettings file to use. You can then override or append to any of these settings there. """ LOCAL_APPS = ( 'django_extensions', ) ####### Dja...
""" This is a home for shared dev settings. Feel free to add anything that all devs should have set. Add `from dev_settings import *` to the top of your localsettings file to use. You can then override or append to any of these settings there. """ import os LOCAL_APPS = ( 'django_extensions', ) ####### Django E...
""" This is a home for shared dev settings. Feel free to add anything that all devs should have set. Add `from dev_settings import *` to the top of your localsettings file to use. You can then override or append to any of these settings there. """ LOCAL_APPS = ( 'django_extensions', ) ####### Django Extensions ...
<commit_before>""" This is a home for shared dev settings. Feel free to add anything that all devs should have set. Add `from dev_settings import *` to the top of your localsettings file to use. You can then override or append to any of these settings there. """ LOCAL_APPS = ( 'django_extensions', ) ####### Dja...
97f84c2e7643e295623ccd09d1b447d405fd5bfa
wal_e/blobstore/s3/s3_credentials.py
wal_e/blobstore/s3/s3_credentials.py
from boto import provider from functools import partial from wal_e.exception import UserException class InstanceProfileProvider(provider.Provider): """Override boto Provider to control use of the AWS metadata store In particular, prevent boto from looking in a series of places for keys outside off WAL-E'...
from boto import provider from functools import partial from wal_e.exception import UserException class InstanceProfileProvider(provider.Provider): """Override boto Provider to control use of the AWS metadata store In particular, prevent boto from looking in a series of places for keys outside off WAL-E'...
Fix InstanceProfileProvider class for boto 2.24
Fix InstanceProfileProvider class for boto 2.24 "profile_name" is now a parameter that must be supported in "get_credentials". Yes, this is exactly the "fragile base class" problem, but let's hope that the mechanisms there become dormant again for a long stretch again. Or, switch to botocore or something like that t...
Python
bsd-3-clause
heroku/wal-e,ajmarks/wal-e,DataDog/wal-e,x86Labs/wal-e,modulexcite/wal-e,ArtemZ/wal-e,fdr/wal-e,tenstartups/wal-e,intoximeters/wal-e,equa/wal-e,wal-e/wal-e,RichardKnop/wal-e,nagual13/wal-e
from boto import provider from functools import partial from wal_e.exception import UserException class InstanceProfileProvider(provider.Provider): """Override boto Provider to control use of the AWS metadata store In particular, prevent boto from looking in a series of places for keys outside off WAL-E'...
from boto import provider from functools import partial from wal_e.exception import UserException class InstanceProfileProvider(provider.Provider): """Override boto Provider to control use of the AWS metadata store In particular, prevent boto from looking in a series of places for keys outside off WAL-E'...
<commit_before>from boto import provider from functools import partial from wal_e.exception import UserException class InstanceProfileProvider(provider.Provider): """Override boto Provider to control use of the AWS metadata store In particular, prevent boto from looking in a series of places for keys out...
from boto import provider from functools import partial from wal_e.exception import UserException class InstanceProfileProvider(provider.Provider): """Override boto Provider to control use of the AWS metadata store In particular, prevent boto from looking in a series of places for keys outside off WAL-E'...
from boto import provider from functools import partial from wal_e.exception import UserException class InstanceProfileProvider(provider.Provider): """Override boto Provider to control use of the AWS metadata store In particular, prevent boto from looking in a series of places for keys outside off WAL-E'...
<commit_before>from boto import provider from functools import partial from wal_e.exception import UserException class InstanceProfileProvider(provider.Provider): """Override boto Provider to control use of the AWS metadata store In particular, prevent boto from looking in a series of places for keys out...