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
bfcce626990c53aef7fbe534f1f6ff1092945597
docs/settings.py
docs/settings.py
DEBUG = True TEMPLATE_DEBUG = DEBUG DATABASES = { 'default': { 'ENGINE': 'django.db.backends.sqlite3', 'NAME': 'test.db', } } USE_TZ = False SITE_ID = 1 STATIC_URL = '/static/' SECRET_KEY = 'NOT_SO_SECRET' INSTALLED_APPS = ( 'django.contrib.admin', 'django.contrib.auth', 'django.c...
DEBUG = True TEMPLATE_DEBUG = DEBUG DATABASES = { 'default': { 'ENGINE': 'django.db.backends.sqlite3', 'NAME': 'test.db', } } USE_TZ = False SITE_ID = 1 STATIC_URL = '/static/' SECRET_KEY = 'NOT_SO_SECRET' INSTALLED_APPS = ( 'django.contrib.admin', 'django.contrib.auth', 'django.c...
Fix read the docs failure
Fix read the docs failure
Python
bsd-3-clause
consbio/tablo
DEBUG = True TEMPLATE_DEBUG = DEBUG DATABASES = { 'default': { 'ENGINE': 'django.db.backends.sqlite3', 'NAME': 'test.db', } } USE_TZ = False SITE_ID = 1 STATIC_URL = '/static/' SECRET_KEY = 'NOT_SO_SECRET' INSTALLED_APPS = ( 'django.contrib.admin', 'django.contrib.auth', 'django.c...
DEBUG = True TEMPLATE_DEBUG = DEBUG DATABASES = { 'default': { 'ENGINE': 'django.db.backends.sqlite3', 'NAME': 'test.db', } } USE_TZ = False SITE_ID = 1 STATIC_URL = '/static/' SECRET_KEY = 'NOT_SO_SECRET' INSTALLED_APPS = ( 'django.contrib.admin', 'django.contrib.auth', 'django.c...
<commit_before>DEBUG = True TEMPLATE_DEBUG = DEBUG DATABASES = { 'default': { 'ENGINE': 'django.db.backends.sqlite3', 'NAME': 'test.db', } } USE_TZ = False SITE_ID = 1 STATIC_URL = '/static/' SECRET_KEY = 'NOT_SO_SECRET' INSTALLED_APPS = ( 'django.contrib.admin', 'django.contrib.auth'...
DEBUG = True TEMPLATE_DEBUG = DEBUG DATABASES = { 'default': { 'ENGINE': 'django.db.backends.sqlite3', 'NAME': 'test.db', } } USE_TZ = False SITE_ID = 1 STATIC_URL = '/static/' SECRET_KEY = 'NOT_SO_SECRET' INSTALLED_APPS = ( 'django.contrib.admin', 'django.contrib.auth', 'django.c...
DEBUG = True TEMPLATE_DEBUG = DEBUG DATABASES = { 'default': { 'ENGINE': 'django.db.backends.sqlite3', 'NAME': 'test.db', } } USE_TZ = False SITE_ID = 1 STATIC_URL = '/static/' SECRET_KEY = 'NOT_SO_SECRET' INSTALLED_APPS = ( 'django.contrib.admin', 'django.contrib.auth', 'django.c...
<commit_before>DEBUG = True TEMPLATE_DEBUG = DEBUG DATABASES = { 'default': { 'ENGINE': 'django.db.backends.sqlite3', 'NAME': 'test.db', } } USE_TZ = False SITE_ID = 1 STATIC_URL = '/static/' SECRET_KEY = 'NOT_SO_SECRET' INSTALLED_APPS = ( 'django.contrib.admin', 'django.contrib.auth'...
7f0ab829f677a5d91d5b24dc6181a2519e25a934
notes/managers.py
notes/managers.py
# # Copyright (c) 2009 Brad Taylor <brad@getcoded.net> # # This program is free software: you can redistribute it and/or modify it under # the terms of the GNU Affero General Public License as published by the Free # Software Foundation, either version 3 of the License, or (at your option) any # later version. # # This...
# # Copyright (c) 2009 Brad Taylor <brad@getcoded.net> # # This program is free software: you can redistribute it and/or modify it under # the terms of the GNU Affero General Public License as published by the Free # Software Foundation, either version 3 of the License, or (at your option) any # later version. # # This...
Support hiding note and notebook template notes
Support hiding note and notebook template notes
Python
agpl-3.0
syskill/snowy,NoUsername/PrivateNotesExperimental,GNOME/snowy,jaredjennings/snowy,jaredjennings/snowy,sandyarmstrong/snowy,jaredjennings/snowy,NoUsername/PrivateNotesExperimental,widox/snowy,syskill/snowy,leonhandreke/snowy,leonhandreke/snowy,jaredjennings/snowy,widox/snowy,GNOME/snowy,sandyarmstrong/snowy
# # Copyright (c) 2009 Brad Taylor <brad@getcoded.net> # # This program is free software: you can redistribute it and/or modify it under # the terms of the GNU Affero General Public License as published by the Free # Software Foundation, either version 3 of the License, or (at your option) any # later version. # # This...
# # Copyright (c) 2009 Brad Taylor <brad@getcoded.net> # # This program is free software: you can redistribute it and/or modify it under # the terms of the GNU Affero General Public License as published by the Free # Software Foundation, either version 3 of the License, or (at your option) any # later version. # # This...
<commit_before># # Copyright (c) 2009 Brad Taylor <brad@getcoded.net> # # This program is free software: you can redistribute it and/or modify it under # the terms of the GNU Affero General Public License as published by the Free # Software Foundation, either version 3 of the License, or (at your option) any # later ve...
# # Copyright (c) 2009 Brad Taylor <brad@getcoded.net> # # This program is free software: you can redistribute it and/or modify it under # the terms of the GNU Affero General Public License as published by the Free # Software Foundation, either version 3 of the License, or (at your option) any # later version. # # This...
# # Copyright (c) 2009 Brad Taylor <brad@getcoded.net> # # This program is free software: you can redistribute it and/or modify it under # the terms of the GNU Affero General Public License as published by the Free # Software Foundation, either version 3 of the License, or (at your option) any # later version. # # This...
<commit_before># # Copyright (c) 2009 Brad Taylor <brad@getcoded.net> # # This program is free software: you can redistribute it and/or modify it under # the terms of the GNU Affero General Public License as published by the Free # Software Foundation, either version 3 of the License, or (at your option) any # later ve...
cd5c56583c84b2b0fd05d743578193b7b681151c
nn/embedding/embeddings.py
nn/embedding/embeddings.py
import tensorflow as tf from ..flags import FLAGS from ..variable import variable def embeddings(*, id_space_size, embedding_size, name=None): return variable([id_space_size, embedding_size], name=name) def word_embeddings(name="word_embeddings"): if FLAGS.word_embeddings is None: return embeddings(id_spa...
import tensorflow as tf from ..flags import FLAGS from ..variable import variable from ..util import func_scope @func_scope() def embeddings(*, id_space_size, embedding_size, name=None): return variable([id_space_size, embedding_size], name=name) @func_scope() def word_embeddings(name="word_embeddings"): if F...
Add func_scope to embedding functions
Add func_scope to embedding functions
Python
unlicense
raviqqe/tensorflow-extenteten,raviqqe/tensorflow-extenteten
import tensorflow as tf from ..flags import FLAGS from ..variable import variable def embeddings(*, id_space_size, embedding_size, name=None): return variable([id_space_size, embedding_size], name=name) def word_embeddings(name="word_embeddings"): if FLAGS.word_embeddings is None: return embeddings(id_spa...
import tensorflow as tf from ..flags import FLAGS from ..variable import variable from ..util import func_scope @func_scope() def embeddings(*, id_space_size, embedding_size, name=None): return variable([id_space_size, embedding_size], name=name) @func_scope() def word_embeddings(name="word_embeddings"): if F...
<commit_before>import tensorflow as tf from ..flags import FLAGS from ..variable import variable def embeddings(*, id_space_size, embedding_size, name=None): return variable([id_space_size, embedding_size], name=name) def word_embeddings(name="word_embeddings"): if FLAGS.word_embeddings is None: return em...
import tensorflow as tf from ..flags import FLAGS from ..variable import variable from ..util import func_scope @func_scope() def embeddings(*, id_space_size, embedding_size, name=None): return variable([id_space_size, embedding_size], name=name) @func_scope() def word_embeddings(name="word_embeddings"): if F...
import tensorflow as tf from ..flags import FLAGS from ..variable import variable def embeddings(*, id_space_size, embedding_size, name=None): return variable([id_space_size, embedding_size], name=name) def word_embeddings(name="word_embeddings"): if FLAGS.word_embeddings is None: return embeddings(id_spa...
<commit_before>import tensorflow as tf from ..flags import FLAGS from ..variable import variable def embeddings(*, id_space_size, embedding_size, name=None): return variable([id_space_size, embedding_size], name=name) def word_embeddings(name="word_embeddings"): if FLAGS.word_embeddings is None: return em...
fa418ed5a6769a369d4b5cddfc6e215f551c57cf
events/cms_app.py
events/cms_app.py
from cms.app_base import CMSApp from cms.apphook_pool import apphook_pool from django.utils.translation import ugettext_lazy as _ class EventsApphook(CMSApp): name = _("Events Apphook") urls = ["events.urls"] app_name = "events" apphook_pool.register(EventsApphook)
from cms.app_base import CMSApp from cms.apphook_pool import apphook_pool from django.utils.translation import ugettext_lazy as _ class EventsApphook(CMSApp): name = _("Events Apphook") urls = ["events.urls"] app_name = "events" namespace = "events" apphook_pool.register(EventsApphook)
Add namespace to support djangoCMS v3
Add namespace to support djangoCMS v3
Python
bsd-3-clause
theherk/django-theherk-events
from cms.app_base import CMSApp from cms.apphook_pool import apphook_pool from django.utils.translation import ugettext_lazy as _ class EventsApphook(CMSApp): name = _("Events Apphook") urls = ["events.urls"] app_name = "events" apphook_pool.register(EventsApphook) Add namespace to support djangoCMS v3
from cms.app_base import CMSApp from cms.apphook_pool import apphook_pool from django.utils.translation import ugettext_lazy as _ class EventsApphook(CMSApp): name = _("Events Apphook") urls = ["events.urls"] app_name = "events" namespace = "events" apphook_pool.register(EventsApphook)
<commit_before>from cms.app_base import CMSApp from cms.apphook_pool import apphook_pool from django.utils.translation import ugettext_lazy as _ class EventsApphook(CMSApp): name = _("Events Apphook") urls = ["events.urls"] app_name = "events" apphook_pool.register(EventsApphook) <commit_msg>Add namespac...
from cms.app_base import CMSApp from cms.apphook_pool import apphook_pool from django.utils.translation import ugettext_lazy as _ class EventsApphook(CMSApp): name = _("Events Apphook") urls = ["events.urls"] app_name = "events" namespace = "events" apphook_pool.register(EventsApphook)
from cms.app_base import CMSApp from cms.apphook_pool import apphook_pool from django.utils.translation import ugettext_lazy as _ class EventsApphook(CMSApp): name = _("Events Apphook") urls = ["events.urls"] app_name = "events" apphook_pool.register(EventsApphook) Add namespace to support djangoCMS v3fr...
<commit_before>from cms.app_base import CMSApp from cms.apphook_pool import apphook_pool from django.utils.translation import ugettext_lazy as _ class EventsApphook(CMSApp): name = _("Events Apphook") urls = ["events.urls"] app_name = "events" apphook_pool.register(EventsApphook) <commit_msg>Add namespac...
2c742cd00e21412d034bb0cffed0bafca2e6c1ae
inspector/inspector/urls.py
inspector/inspector/urls.py
from django.conf import settings from django.conf.urls import patterns, include, url from django.conf.urls.static import static from django.contrib.staticfiles.urls import staticfiles_urlpatterns from django.views.generic import TemplateView from cbv.views import KlassDetailView # Uncomment the next two lines to enab...
from django.conf import settings from django.conf.urls import patterns, include, url from django.conf.urls.static import static from django.contrib.staticfiles.urls import staticfiles_urlpatterns from django.views.generic import TemplateView from cbv.views import KlassDetailView # Uncomment the next two lines to enab...
Allow dots in module names.
Allow dots in module names.
Python
bsd-2-clause
refreshoxford/django-cbv-inspector,refreshoxford/django-cbv-inspector,refreshoxford/django-cbv-inspector,abhijo89/django-cbv-inspector,refreshoxford/django-cbv-inspector,abhijo89/django-cbv-inspector,abhijo89/django-cbv-inspector,abhijo89/django-cbv-inspector
from django.conf import settings from django.conf.urls import patterns, include, url from django.conf.urls.static import static from django.contrib.staticfiles.urls import staticfiles_urlpatterns from django.views.generic import TemplateView from cbv.views import KlassDetailView # Uncomment the next two lines to enab...
from django.conf import settings from django.conf.urls import patterns, include, url from django.conf.urls.static import static from django.contrib.staticfiles.urls import staticfiles_urlpatterns from django.views.generic import TemplateView from cbv.views import KlassDetailView # Uncomment the next two lines to enab...
<commit_before>from django.conf import settings from django.conf.urls import patterns, include, url from django.conf.urls.static import static from django.contrib.staticfiles.urls import staticfiles_urlpatterns from django.views.generic import TemplateView from cbv.views import KlassDetailView # Uncomment the next tw...
from django.conf import settings from django.conf.urls import patterns, include, url from django.conf.urls.static import static from django.contrib.staticfiles.urls import staticfiles_urlpatterns from django.views.generic import TemplateView from cbv.views import KlassDetailView # Uncomment the next two lines to enab...
from django.conf import settings from django.conf.urls import patterns, include, url from django.conf.urls.static import static from django.contrib.staticfiles.urls import staticfiles_urlpatterns from django.views.generic import TemplateView from cbv.views import KlassDetailView # Uncomment the next two lines to enab...
<commit_before>from django.conf import settings from django.conf.urls import patterns, include, url from django.conf.urls.static import static from django.contrib.staticfiles.urls import staticfiles_urlpatterns from django.views.generic import TemplateView from cbv.views import KlassDetailView # Uncomment the next tw...
c0b3a482b8ef5284070da1398350acf936e50121
rplugin/python3/deoplete/sources/LanguageClientSource.py
rplugin/python3/deoplete/sources/LanguageClientSource.py
import re from .base import Base CompleteResults = "g:LanguageClient_completeResults" def simplify_snippet(snip: str) -> str: return re.sub(r'(?<!\\)\$\d+', '', snip) class Source(Base): def __init__(self, vim): super().__init__(vim) self.name = "LanguageClient" self.mark = "[LC]"...
import re from .base import Base CompleteResults = "g:LanguageClient_completeResults" def simplify_snippet(snip: str) -> str: snip = re.sub(r'(?<!\\)\$(?P<num>\d+)', '<`\g<num>`>', snip) return re.sub(r'(?<!\\)\${(?P<num>\d+):(?P<desc>.+?)}', '<`\g<num>:\g<desc>`>', snip) class Source(Ba...
Replace placeholders in completion text
Replace placeholders in completion text In deoplete source, replace the placeholders with the neosnippet format.
Python
mit
autozimu/LanguageClient-neovim,autozimu/LanguageClient-neovim,autozimu/LanguageClient-neovim,autozimu/LanguageClient-neovim,autozimu/LanguageClient-neovim,autozimu/LanguageClient-neovim,autozimu/LanguageClient-neovim,autozimu/LanguageClient-neovim,autozimu/LanguageClient-neovim,autozimu/LanguageClient-neovim,autozimu/L...
import re from .base import Base CompleteResults = "g:LanguageClient_completeResults" def simplify_snippet(snip: str) -> str: return re.sub(r'(?<!\\)\$\d+', '', snip) class Source(Base): def __init__(self, vim): super().__init__(vim) self.name = "LanguageClient" self.mark = "[LC]"...
import re from .base import Base CompleteResults = "g:LanguageClient_completeResults" def simplify_snippet(snip: str) -> str: snip = re.sub(r'(?<!\\)\$(?P<num>\d+)', '<`\g<num>`>', snip) return re.sub(r'(?<!\\)\${(?P<num>\d+):(?P<desc>.+?)}', '<`\g<num>:\g<desc>`>', snip) class Source(Ba...
<commit_before>import re from .base import Base CompleteResults = "g:LanguageClient_completeResults" def simplify_snippet(snip: str) -> str: return re.sub(r'(?<!\\)\$\d+', '', snip) class Source(Base): def __init__(self, vim): super().__init__(vim) self.name = "LanguageClient" sel...
import re from .base import Base CompleteResults = "g:LanguageClient_completeResults" def simplify_snippet(snip: str) -> str: snip = re.sub(r'(?<!\\)\$(?P<num>\d+)', '<`\g<num>`>', snip) return re.sub(r'(?<!\\)\${(?P<num>\d+):(?P<desc>.+?)}', '<`\g<num>:\g<desc>`>', snip) class Source(Ba...
import re from .base import Base CompleteResults = "g:LanguageClient_completeResults" def simplify_snippet(snip: str) -> str: return re.sub(r'(?<!\\)\$\d+', '', snip) class Source(Base): def __init__(self, vim): super().__init__(vim) self.name = "LanguageClient" self.mark = "[LC]"...
<commit_before>import re from .base import Base CompleteResults = "g:LanguageClient_completeResults" def simplify_snippet(snip: str) -> str: return re.sub(r'(?<!\\)\$\d+', '', snip) class Source(Base): def __init__(self, vim): super().__init__(vim) self.name = "LanguageClient" sel...
5b3d38821517f10f9b9da31f28af19e7302de954
dimod/reference/composites/structure.py
dimod/reference/composites/structure.py
from dimod.core.sampler import Sampler from dimod.core.composite import Composite from dimod.core.structured import Structured from dimod.decorators import bqm_structured class StructureComposite(Sampler, Composite, Structured): """Creates a structured composed sampler from an unstructured sampler. todo ...
from dimod.core.sampler import Sampler from dimod.core.composite import Composite from dimod.core.structured import Structured from dimod.decorators import bqm_structured class StructureComposite(Sampler, Composite, Structured): """Creates a structured composed sampler from an unstructured sampler. """ # ...
Update Structure composite to use the new abc
Update Structure composite to use the new abc
Python
apache-2.0
oneklc/dimod,oneklc/dimod
from dimod.core.sampler import Sampler from dimod.core.composite import Composite from dimod.core.structured import Structured from dimod.decorators import bqm_structured class StructureComposite(Sampler, Composite, Structured): """Creates a structured composed sampler from an unstructured sampler. todo ...
from dimod.core.sampler import Sampler from dimod.core.composite import Composite from dimod.core.structured import Structured from dimod.decorators import bqm_structured class StructureComposite(Sampler, Composite, Structured): """Creates a structured composed sampler from an unstructured sampler. """ # ...
<commit_before>from dimod.core.sampler import Sampler from dimod.core.composite import Composite from dimod.core.structured import Structured from dimod.decorators import bqm_structured class StructureComposite(Sampler, Composite, Structured): """Creates a structured composed sampler from an unstructured sampler....
from dimod.core.sampler import Sampler from dimod.core.composite import Composite from dimod.core.structured import Structured from dimod.decorators import bqm_structured class StructureComposite(Sampler, Composite, Structured): """Creates a structured composed sampler from an unstructured sampler. """ # ...
from dimod.core.sampler import Sampler from dimod.core.composite import Composite from dimod.core.structured import Structured from dimod.decorators import bqm_structured class StructureComposite(Sampler, Composite, Structured): """Creates a structured composed sampler from an unstructured sampler. todo ...
<commit_before>from dimod.core.sampler import Sampler from dimod.core.composite import Composite from dimod.core.structured import Structured from dimod.decorators import bqm_structured class StructureComposite(Sampler, Composite, Structured): """Creates a structured composed sampler from an unstructured sampler....
1a00b905b02d47ef8778a4744d9ef67de5149017
web/premises/constants.py
web/premises/constants.py
FEATURED_CONTENT_COUNT = 30 NEWS_CONTENT_COUNT = 30 UPDATED_CONTENT_COUNT = 30 MAX_PREMISE_CONTENT_LENGTH = 300
FEATURED_CONTENT_COUNT = 50 NEWS_CONTENT_COUNT = 50 UPDATED_CONTENT_COUNT = 50 MAX_PREMISE_CONTENT_LENGTH = 300
Change contention counts on front-page
Change contention counts on front-page
Python
mit
taiansu/arguman.org,beratdogan/arguman.org,bahattincinic/arguman.org,arguman/arguman.org,Arthur2e5/arguman.org,taiansu/arguman.org,donkawechico/arguman.org,bahattincinic/arguman.org,Arthur2e5/arguman.org,arguman/arguman.org,Arthur2e5/arguman.org,Arthur2e5/arguman.org,donkawechico/arguman.org,bahattincinic/arguman.org,a...
FEATURED_CONTENT_COUNT = 30 NEWS_CONTENT_COUNT = 30 UPDATED_CONTENT_COUNT = 30 MAX_PREMISE_CONTENT_LENGTH = 300Change contention counts on front-page
FEATURED_CONTENT_COUNT = 50 NEWS_CONTENT_COUNT = 50 UPDATED_CONTENT_COUNT = 50 MAX_PREMISE_CONTENT_LENGTH = 300
<commit_before>FEATURED_CONTENT_COUNT = 30 NEWS_CONTENT_COUNT = 30 UPDATED_CONTENT_COUNT = 30 MAX_PREMISE_CONTENT_LENGTH = 300<commit_msg>Change contention counts on front-page<commit_after>
FEATURED_CONTENT_COUNT = 50 NEWS_CONTENT_COUNT = 50 UPDATED_CONTENT_COUNT = 50 MAX_PREMISE_CONTENT_LENGTH = 300
FEATURED_CONTENT_COUNT = 30 NEWS_CONTENT_COUNT = 30 UPDATED_CONTENT_COUNT = 30 MAX_PREMISE_CONTENT_LENGTH = 300Change contention counts on front-pageFEATURED_CONTENT_COUNT = 50 NEWS_CONTENT_COUNT = 50 UPDATED_CONTENT_COUNT = 50 MAX_PREMISE_CONTENT_LENGTH = 300
<commit_before>FEATURED_CONTENT_COUNT = 30 NEWS_CONTENT_COUNT = 30 UPDATED_CONTENT_COUNT = 30 MAX_PREMISE_CONTENT_LENGTH = 300<commit_msg>Change contention counts on front-page<commit_after>FEATURED_CONTENT_COUNT = 50 NEWS_CONTENT_COUNT = 50 UPDATED_CONTENT_COUNT = 50 MAX_PREMISE_CONTENT_LENGTH = 300
9d7beff62a3555aa4be51cefb2f54681070d1305
ircstat/plugins/__init__.py
ircstat/plugins/__init__.py
# Copyright 2013 John Reese # Licensed under the MIT license import importlib import os from functools import lru_cache from os import path from .base import Plugin @lru_cache() def load_plugins(config): """Import all the plugins, and return a set of plugin instances, filtering out any plugin whose name app...
# Copyright 2013 John Reese # Licensed under the MIT license import importlib import os from functools import lru_cache from os import path from .base import Plugin @lru_cache() def load_plugins(config): """Import all the plugins, and return a set of plugin instances, filtering out any plugin whose name app...
Make sure plugins' .name property gets set
Make sure plugins' .name property gets set
Python
mit
jreese/ircstat,jreese/ircstat
# Copyright 2013 John Reese # Licensed under the MIT license import importlib import os from functools import lru_cache from os import path from .base import Plugin @lru_cache() def load_plugins(config): """Import all the plugins, and return a set of plugin instances, filtering out any plugin whose name app...
# Copyright 2013 John Reese # Licensed under the MIT license import importlib import os from functools import lru_cache from os import path from .base import Plugin @lru_cache() def load_plugins(config): """Import all the plugins, and return a set of plugin instances, filtering out any plugin whose name app...
<commit_before># Copyright 2013 John Reese # Licensed under the MIT license import importlib import os from functools import lru_cache from os import path from .base import Plugin @lru_cache() def load_plugins(config): """Import all the plugins, and return a set of plugin instances, filtering out any plugin...
# Copyright 2013 John Reese # Licensed under the MIT license import importlib import os from functools import lru_cache from os import path from .base import Plugin @lru_cache() def load_plugins(config): """Import all the plugins, and return a set of plugin instances, filtering out any plugin whose name app...
# Copyright 2013 John Reese # Licensed under the MIT license import importlib import os from functools import lru_cache from os import path from .base import Plugin @lru_cache() def load_plugins(config): """Import all the plugins, and return a set of plugin instances, filtering out any plugin whose name app...
<commit_before># Copyright 2013 John Reese # Licensed under the MIT license import importlib import os from functools import lru_cache from os import path from .base import Plugin @lru_cache() def load_plugins(config): """Import all the plugins, and return a set of plugin instances, filtering out any plugin...
ad8f54f7a2532b0ad643790d061b4e488ac7849d
patchboard/tests/functional/trivial_example_test.py
patchboard/tests/functional/trivial_example_test.py
# trivial_example.py # # Copyright 2014 BitVault. # # Reproduces the tests in trivial_example.rb from __future__ import print_function import pytest from random import randint from patchboard.tests.fixtures import (trivial_net_pb, trivial_net_resources, ...
# trivial_example.py # # Copyright 2014 BitVault. # # Reproduces the tests in trivial_example.rb from __future__ import print_function import pytest from random import randint from patchboard.tests.fixtures import (trivial_net_pb, trivial_net_resources, ...
Remove xfail from working test
Remove xfail from working test
Python
mit
patchboard/patchboard-py
# trivial_example.py # # Copyright 2014 BitVault. # # Reproduces the tests in trivial_example.rb from __future__ import print_function import pytest from random import randint from patchboard.tests.fixtures import (trivial_net_pb, trivial_net_resources, ...
# trivial_example.py # # Copyright 2014 BitVault. # # Reproduces the tests in trivial_example.rb from __future__ import print_function import pytest from random import randint from patchboard.tests.fixtures import (trivial_net_pb, trivial_net_resources, ...
<commit_before># trivial_example.py # # Copyright 2014 BitVault. # # Reproduces the tests in trivial_example.rb from __future__ import print_function import pytest from random import randint from patchboard.tests.fixtures import (trivial_net_pb, trivial_net_resources, ...
# trivial_example.py # # Copyright 2014 BitVault. # # Reproduces the tests in trivial_example.rb from __future__ import print_function import pytest from random import randint from patchboard.tests.fixtures import (trivial_net_pb, trivial_net_resources, ...
# trivial_example.py # # Copyright 2014 BitVault. # # Reproduces the tests in trivial_example.rb from __future__ import print_function import pytest from random import randint from patchboard.tests.fixtures import (trivial_net_pb, trivial_net_resources, ...
<commit_before># trivial_example.py # # Copyright 2014 BitVault. # # Reproduces the tests in trivial_example.rb from __future__ import print_function import pytest from random import randint from patchboard.tests.fixtures import (trivial_net_pb, trivial_net_resources, ...
1e79cc27ae0025d9ba51eff2828cc25247c08d3c
ssbench/worker.py
ssbench/worker.py
import yaml from ssbench.constants import * class Worker: def __init__(self, queue): queue.use(STATS_TUBE) self.queue = queue def go(self): job = self.queue.reserve() while job: job.delete() # avoid any job-timeout nonsense self.handle_job(job) ...
import yaml from ssbench.constants import * class Worker: def __init__(self, queue): queue.use(STATS_TUBE) self.queue = queue def go(self): job = self.queue.reserve() while job: job.delete() # avoid any job-timeout nonsense self.handle_job(job) ...
Raise error on unknown job type
Raise error on unknown job type
Python
apache-2.0
charz/ssbench,swiftstack/ssbench,charz/ssbench,swiftstack/ssbench
import yaml from ssbench.constants import * class Worker: def __init__(self, queue): queue.use(STATS_TUBE) self.queue = queue def go(self): job = self.queue.reserve() while job: job.delete() # avoid any job-timeout nonsense self.handle_job(job) ...
import yaml from ssbench.constants import * class Worker: def __init__(self, queue): queue.use(STATS_TUBE) self.queue = queue def go(self): job = self.queue.reserve() while job: job.delete() # avoid any job-timeout nonsense self.handle_job(job) ...
<commit_before>import yaml from ssbench.constants import * class Worker: def __init__(self, queue): queue.use(STATS_TUBE) self.queue = queue def go(self): job = self.queue.reserve() while job: job.delete() # avoid any job-timeout nonsense self.handle_j...
import yaml from ssbench.constants import * class Worker: def __init__(self, queue): queue.use(STATS_TUBE) self.queue = queue def go(self): job = self.queue.reserve() while job: job.delete() # avoid any job-timeout nonsense self.handle_job(job) ...
import yaml from ssbench.constants import * class Worker: def __init__(self, queue): queue.use(STATS_TUBE) self.queue = queue def go(self): job = self.queue.reserve() while job: job.delete() # avoid any job-timeout nonsense self.handle_job(job) ...
<commit_before>import yaml from ssbench.constants import * class Worker: def __init__(self, queue): queue.use(STATS_TUBE) self.queue = queue def go(self): job = self.queue.reserve() while job: job.delete() # avoid any job-timeout nonsense self.handle_j...
168dab45955499aac320c859ff63a43cb20d9145
fitz/__init__.py
fitz/__init__.py
from frontend import * import tools version = "0.0.1.dev" __version__ = version
from frontend import * import tools version = "0.0.1-dev" __version__ = version
Switch version label to comply with semver
Switch version label to comply with semver
Python
bsd-3-clause
kastman/fitz
from frontend import * import tools version = "0.0.1.dev" __version__ = version Switch version label to comply with semver
from frontend import * import tools version = "0.0.1-dev" __version__ = version
<commit_before>from frontend import * import tools version = "0.0.1.dev" __version__ = version <commit_msg>Switch version label to comply with semver<commit_after>
from frontend import * import tools version = "0.0.1-dev" __version__ = version
from frontend import * import tools version = "0.0.1.dev" __version__ = version Switch version label to comply with semverfrom frontend import * import tools version = "0.0.1-dev" __version__ = version
<commit_before>from frontend import * import tools version = "0.0.1.dev" __version__ = version <commit_msg>Switch version label to comply with semver<commit_after>from frontend import * import tools version = "0.0.1-dev" __version__ = version
0be21659f1190e41db9b9818dd694015d94f78cc
zerodb/models/__init__.py
zerodb/models/__init__.py
import persistent import indexable import exceptions class Model(persistent.Persistent): """ Data model to easily create indexable persistent objects. If an object declares a property from indexable, this property is indexed. *All* other properties are stored but unindexed Example: >>> cl...
import persistent import indexable import exceptions class Model(persistent.Persistent): """ Data model to easily create indexable persistent objects. If an object declares a property from indexable, this property is indexed. *All* other properties are stored but unindexed Example: >>> cl...
Set model instance attributes based on fields
Set model instance attributes based on fields
Python
agpl-3.0
zerodb/zerodb,zero-db/zerodb,zero-db/zerodb,zerodb/zerodb
import persistent import indexable import exceptions class Model(persistent.Persistent): """ Data model to easily create indexable persistent objects. If an object declares a property from indexable, this property is indexed. *All* other properties are stored but unindexed Example: >>> cl...
import persistent import indexable import exceptions class Model(persistent.Persistent): """ Data model to easily create indexable persistent objects. If an object declares a property from indexable, this property is indexed. *All* other properties are stored but unindexed Example: >>> cl...
<commit_before>import persistent import indexable import exceptions class Model(persistent.Persistent): """ Data model to easily create indexable persistent objects. If an object declares a property from indexable, this property is indexed. *All* other properties are stored but unindexed Example:...
import persistent import indexable import exceptions class Model(persistent.Persistent): """ Data model to easily create indexable persistent objects. If an object declares a property from indexable, this property is indexed. *All* other properties are stored but unindexed Example: >>> cl...
import persistent import indexable import exceptions class Model(persistent.Persistent): """ Data model to easily create indexable persistent objects. If an object declares a property from indexable, this property is indexed. *All* other properties are stored but unindexed Example: >>> cl...
<commit_before>import persistent import indexable import exceptions class Model(persistent.Persistent): """ Data model to easily create indexable persistent objects. If an object declares a property from indexable, this property is indexed. *All* other properties are stored but unindexed Example:...
b378102284bbbcc9ad909a7393dfffa24377ce27
ginga/__init__.py
ginga/__init__.py
# Licensed under a 3-clause BSD style license - see LICENSE.rst """See LONG_DESC.txt""" # Set up the version from pkg_resources import get_distribution, DistributionNotFound try: __version__ = get_distribution(__name__).version except DistributionNotFound: # package is not installed __version__ = 'unknown...
# Licensed under a 3-clause BSD style license - see LICENSE.rst """See LONG_DESC.txt""" # Packages may add whatever they like to this file, but # should keep this content at the top. # ---------------------------------------------------------------------------- from ._astropy_init import * # noqa # ------------------...
Fix version import and test runner
BUG: Fix version import and test runner
Python
bsd-3-clause
pllim/ginga,pllim/ginga,ejeschke/ginga,naojsoft/ginga,ejeschke/ginga,ejeschke/ginga,pllim/ginga,naojsoft/ginga,naojsoft/ginga
# Licensed under a 3-clause BSD style license - see LICENSE.rst """See LONG_DESC.txt""" # Set up the version from pkg_resources import get_distribution, DistributionNotFound try: __version__ = get_distribution(__name__).version except DistributionNotFound: # package is not installed __version__ = 'unknown...
# Licensed under a 3-clause BSD style license - see LICENSE.rst """See LONG_DESC.txt""" # Packages may add whatever they like to this file, but # should keep this content at the top. # ---------------------------------------------------------------------------- from ._astropy_init import * # noqa # ------------------...
<commit_before># Licensed under a 3-clause BSD style license - see LICENSE.rst """See LONG_DESC.txt""" # Set up the version from pkg_resources import get_distribution, DistributionNotFound try: __version__ = get_distribution(__name__).version except DistributionNotFound: # package is not installed __versi...
# Licensed under a 3-clause BSD style license - see LICENSE.rst """See LONG_DESC.txt""" # Packages may add whatever they like to this file, but # should keep this content at the top. # ---------------------------------------------------------------------------- from ._astropy_init import * # noqa # ------------------...
# Licensed under a 3-clause BSD style license - see LICENSE.rst """See LONG_DESC.txt""" # Set up the version from pkg_resources import get_distribution, DistributionNotFound try: __version__ = get_distribution(__name__).version except DistributionNotFound: # package is not installed __version__ = 'unknown...
<commit_before># Licensed under a 3-clause BSD style license - see LICENSE.rst """See LONG_DESC.txt""" # Set up the version from pkg_resources import get_distribution, DistributionNotFound try: __version__ = get_distribution(__name__).version except DistributionNotFound: # package is not installed __versi...
5bc8ad66b59312d7459ec9c4d58d89bee0038a48
conference_scheduler/scheduler.py
conference_scheduler/scheduler.py
import pulp from typing import Sequence import conference_scheduler.parameters as params def is_valid_schedule(schedule): """Validate an existing schedule against a problem Parameters --------- schedule : iterable of resources.ScheduledItem Returns ------- bool True if sc...
import pulp from typing import Sequence import conference_scheduler.parameters as params def is_valid_schedule(schedule): """Validate an existing schedule against a problem Parameters --------- schedule : iterable of resources.ScheduledItem Returns ------- bool True if sc...
Correct order of constraint assignment and problem solution
Correct order of constraint assignment and problem solution
Python
mit
PyconUK/ConferenceScheduler
import pulp from typing import Sequence import conference_scheduler.parameters as params def is_valid_schedule(schedule): """Validate an existing schedule against a problem Parameters --------- schedule : iterable of resources.ScheduledItem Returns ------- bool True if sc...
import pulp from typing import Sequence import conference_scheduler.parameters as params def is_valid_schedule(schedule): """Validate an existing schedule against a problem Parameters --------- schedule : iterable of resources.ScheduledItem Returns ------- bool True if sc...
<commit_before>import pulp from typing import Sequence import conference_scheduler.parameters as params def is_valid_schedule(schedule): """Validate an existing schedule against a problem Parameters --------- schedule : iterable of resources.ScheduledItem Returns ------- bool ...
import pulp from typing import Sequence import conference_scheduler.parameters as params def is_valid_schedule(schedule): """Validate an existing schedule against a problem Parameters --------- schedule : iterable of resources.ScheduledItem Returns ------- bool True if sc...
import pulp from typing import Sequence import conference_scheduler.parameters as params def is_valid_schedule(schedule): """Validate an existing schedule against a problem Parameters --------- schedule : iterable of resources.ScheduledItem Returns ------- bool True if sc...
<commit_before>import pulp from typing import Sequence import conference_scheduler.parameters as params def is_valid_schedule(schedule): """Validate an existing schedule against a problem Parameters --------- schedule : iterable of resources.ScheduledItem Returns ------- bool ...
6d7e6d649302523ccbe0373b172b4a4fa8990a45
dimod/__init__.py
dimod/__init__.py
from __future__ import absolute_import import sys __version__ = '0.3.1' __author__ = 'D-Wave Systems Inc.' __authoremail__ = 'acondello@dwavesys.com' __description__ = 'A shared API for binary quadratic model samplers.' _PY2 = sys.version_info[0] == 2 from dimod.template_sampler import * from dimod.samplers import ...
from __future__ import absolute_import import sys __version__ = '0.4.0' __author__ = 'D-Wave Systems Inc.' __authoremail__ = 'acondello@dwavesys.com' __description__ = 'A shared API for binary quadratic model samplers.' _PY2 = sys.version_info[0] == 2 from dimod.template_sampler import * from dimod.samplers import ...
Increment version 0.3.1 -> 0.4.0
Increment version 0.3.1 -> 0.4.0
Python
apache-2.0
oneklc/dimod,oneklc/dimod
from __future__ import absolute_import import sys __version__ = '0.3.1' __author__ = 'D-Wave Systems Inc.' __authoremail__ = 'acondello@dwavesys.com' __description__ = 'A shared API for binary quadratic model samplers.' _PY2 = sys.version_info[0] == 2 from dimod.template_sampler import * from dimod.samplers import ...
from __future__ import absolute_import import sys __version__ = '0.4.0' __author__ = 'D-Wave Systems Inc.' __authoremail__ = 'acondello@dwavesys.com' __description__ = 'A shared API for binary quadratic model samplers.' _PY2 = sys.version_info[0] == 2 from dimod.template_sampler import * from dimod.samplers import ...
<commit_before>from __future__ import absolute_import import sys __version__ = '0.3.1' __author__ = 'D-Wave Systems Inc.' __authoremail__ = 'acondello@dwavesys.com' __description__ = 'A shared API for binary quadratic model samplers.' _PY2 = sys.version_info[0] == 2 from dimod.template_sampler import * from dimod.s...
from __future__ import absolute_import import sys __version__ = '0.4.0' __author__ = 'D-Wave Systems Inc.' __authoremail__ = 'acondello@dwavesys.com' __description__ = 'A shared API for binary quadratic model samplers.' _PY2 = sys.version_info[0] == 2 from dimod.template_sampler import * from dimod.samplers import ...
from __future__ import absolute_import import sys __version__ = '0.3.1' __author__ = 'D-Wave Systems Inc.' __authoremail__ = 'acondello@dwavesys.com' __description__ = 'A shared API for binary quadratic model samplers.' _PY2 = sys.version_info[0] == 2 from dimod.template_sampler import * from dimod.samplers import ...
<commit_before>from __future__ import absolute_import import sys __version__ = '0.3.1' __author__ = 'D-Wave Systems Inc.' __authoremail__ = 'acondello@dwavesys.com' __description__ = 'A shared API for binary quadratic model samplers.' _PY2 = sys.version_info[0] == 2 from dimod.template_sampler import * from dimod.s...
58b46dbc62c98372ed300eeb20b5ecb80a11ddb3
test/test-mime.py
test/test-mime.py
from xdg import Mime import unittest import os.path import tempfile, shutil import resources class MimeTest(unittest.TestCase): def test_get_type_by_name(self): appzip = Mime.get_type_by_name("foo.zip") self.assertEqual(appzip.media, "application") self.assertEqual(appzip.subtype, "zip") ...
from xdg import Mime import unittest import os.path import tempfile, shutil import resources class MimeTest(unittest.TestCase): def test_get_type_by_name(self): appzip = Mime.get_type_by_name("foo.zip") self.assertEqual(appzip.media, "application") self.assertEqual(appzip.subtype, "zip") ...
Test getting comment for Mime type
Test getting comment for Mime type
Python
lgpl-2.1
0312birdzhang/pyxdg
from xdg import Mime import unittest import os.path import tempfile, shutil import resources class MimeTest(unittest.TestCase): def test_get_type_by_name(self): appzip = Mime.get_type_by_name("foo.zip") self.assertEqual(appzip.media, "application") self.assertEqual(appzip.subtype, "zip") ...
from xdg import Mime import unittest import os.path import tempfile, shutil import resources class MimeTest(unittest.TestCase): def test_get_type_by_name(self): appzip = Mime.get_type_by_name("foo.zip") self.assertEqual(appzip.media, "application") self.assertEqual(appzip.subtype, "zip") ...
<commit_before>from xdg import Mime import unittest import os.path import tempfile, shutil import resources class MimeTest(unittest.TestCase): def test_get_type_by_name(self): appzip = Mime.get_type_by_name("foo.zip") self.assertEqual(appzip.media, "application") self.assertEqual(appzip.su...
from xdg import Mime import unittest import os.path import tempfile, shutil import resources class MimeTest(unittest.TestCase): def test_get_type_by_name(self): appzip = Mime.get_type_by_name("foo.zip") self.assertEqual(appzip.media, "application") self.assertEqual(appzip.subtype, "zip") ...
from xdg import Mime import unittest import os.path import tempfile, shutil import resources class MimeTest(unittest.TestCase): def test_get_type_by_name(self): appzip = Mime.get_type_by_name("foo.zip") self.assertEqual(appzip.media, "application") self.assertEqual(appzip.subtype, "zip") ...
<commit_before>from xdg import Mime import unittest import os.path import tempfile, shutil import resources class MimeTest(unittest.TestCase): def test_get_type_by_name(self): appzip = Mime.get_type_by_name("foo.zip") self.assertEqual(appzip.media, "application") self.assertEqual(appzip.su...
f61c0a33a79fa4670874f4469e7ceb76c644bf4b
lambda_local/environment_variables.py
lambda_local/environment_variables.py
import json import os def set_environment_variables(json_file_path): """ Read and set environment variables from a flat json file. Bear in mind that env vars set this way and later on read using `os.getenv` function will be strings since after all env vars are just that - plain strings. Json...
import json import os def export_variables(environment_variables): for env_name, env_value in environment_variables.items(): os.environ[str(env_name)] = str(env_value) def set_environment_variables(json_file_path): """ Read and set environment variables from a flat json file. Bear in mind t...
Split the parsing of input and the exporting of the variables for reuse
Split the parsing of input and the exporting of the variables for reuse
Python
mit
HDE/python-lambda-local,HDE/python-lambda-local
import json import os def set_environment_variables(json_file_path): """ Read and set environment variables from a flat json file. Bear in mind that env vars set this way and later on read using `os.getenv` function will be strings since after all env vars are just that - plain strings. Json...
import json import os def export_variables(environment_variables): for env_name, env_value in environment_variables.items(): os.environ[str(env_name)] = str(env_value) def set_environment_variables(json_file_path): """ Read and set environment variables from a flat json file. Bear in mind t...
<commit_before>import json import os def set_environment_variables(json_file_path): """ Read and set environment variables from a flat json file. Bear in mind that env vars set this way and later on read using `os.getenv` function will be strings since after all env vars are just that - plain str...
import json import os def export_variables(environment_variables): for env_name, env_value in environment_variables.items(): os.environ[str(env_name)] = str(env_value) def set_environment_variables(json_file_path): """ Read and set environment variables from a flat json file. Bear in mind t...
import json import os def set_environment_variables(json_file_path): """ Read and set environment variables from a flat json file. Bear in mind that env vars set this way and later on read using `os.getenv` function will be strings since after all env vars are just that - plain strings. Json...
<commit_before>import json import os def set_environment_variables(json_file_path): """ Read and set environment variables from a flat json file. Bear in mind that env vars set this way and later on read using `os.getenv` function will be strings since after all env vars are just that - plain str...
3598b974ecc078f34e54a32b06e16af8ccaf839b
opps/core/admin/__init__.py
opps/core/admin/__init__.py
# -*- coding: utf-8 -*- from opps.core.admin.channel import * from opps.core.admin.profile import *
# -*- coding: utf-8 -*- from opps.core.admin.channel import * from opps.core.admin.profile import * from opps.core.admin.source import *
Add source admin in Admin Opps Core
Add source admin in Admin Opps Core
Python
mit
opps/opps,jeanmask/opps,YACOWS/opps,YACOWS/opps,williamroot/opps,jeanmask/opps,williamroot/opps,jeanmask/opps,opps/opps,YACOWS/opps,williamroot/opps,opps/opps,YACOWS/opps,jeanmask/opps,williamroot/opps,opps/opps
# -*- coding: utf-8 -*- from opps.core.admin.channel import * from opps.core.admin.profile import * Add source admin in Admin Opps Core
# -*- coding: utf-8 -*- from opps.core.admin.channel import * from opps.core.admin.profile import * from opps.core.admin.source import *
<commit_before># -*- coding: utf-8 -*- from opps.core.admin.channel import * from opps.core.admin.profile import * <commit_msg>Add source admin in Admin Opps Core<commit_after>
# -*- coding: utf-8 -*- from opps.core.admin.channel import * from opps.core.admin.profile import * from opps.core.admin.source import *
# -*- coding: utf-8 -*- from opps.core.admin.channel import * from opps.core.admin.profile import * Add source admin in Admin Opps Core# -*- coding: utf-8 -*- from opps.core.admin.channel import * from opps.core.admin.profile import * from opps.core.admin.source import *
<commit_before># -*- coding: utf-8 -*- from opps.core.admin.channel import * from opps.core.admin.profile import * <commit_msg>Add source admin in Admin Opps Core<commit_after># -*- coding: utf-8 -*- from opps.core.admin.channel import * from opps.core.admin.profile import * from opps.core.admin.source import *
83406db629abd389da85666dc79925f8e03a22f4
lms/djangoapps/courseware/__init__.py
lms/djangoapps/courseware/__init__.py
#pylint: disable=missing-docstring from __future__ import absolute_import import warnings if __name__ == 'courseware': warnings.warn("Importing 'lms.djangoapps.courseware' as 'courseware' is no longer supported", DeprecationWarning)
#pylint: disable=missing-docstring from __future__ import absolute_import import inspect import warnings if __name__ == 'courseware': # pylint: disable=unicode-format-string # Show the call stack that imported us wrong. stack = "\n".join("%30s : %s:%d" % (t[3], t[1], t[2]) for t in inspect.stack()[:0:-1])...
Add more diagnostics to the courseware import warning
Add more diagnostics to the courseware import warning
Python
agpl-3.0
angelapper/edx-platform,angelapper/edx-platform,cpennington/edx-platform,edx-solutions/edx-platform,mitocw/edx-platform,edx/edx-platform,cpennington/edx-platform,angelapper/edx-platform,arbrandes/edx-platform,edx/edx-platform,EDUlib/edx-platform,arbrandes/edx-platform,edx-solutions/edx-platform,stvstnfrd/edx-platform,a...
#pylint: disable=missing-docstring from __future__ import absolute_import import warnings if __name__ == 'courseware': warnings.warn("Importing 'lms.djangoapps.courseware' as 'courseware' is no longer supported", DeprecationWarning) Add more diagnostics to the courseware import warning
#pylint: disable=missing-docstring from __future__ import absolute_import import inspect import warnings if __name__ == 'courseware': # pylint: disable=unicode-format-string # Show the call stack that imported us wrong. stack = "\n".join("%30s : %s:%d" % (t[3], t[1], t[2]) for t in inspect.stack()[:0:-1])...
<commit_before>#pylint: disable=missing-docstring from __future__ import absolute_import import warnings if __name__ == 'courseware': warnings.warn("Importing 'lms.djangoapps.courseware' as 'courseware' is no longer supported", DeprecationWarning) <commit_msg>Add more diagnostics to the courseware import warning<...
#pylint: disable=missing-docstring from __future__ import absolute_import import inspect import warnings if __name__ == 'courseware': # pylint: disable=unicode-format-string # Show the call stack that imported us wrong. stack = "\n".join("%30s : %s:%d" % (t[3], t[1], t[2]) for t in inspect.stack()[:0:-1])...
#pylint: disable=missing-docstring from __future__ import absolute_import import warnings if __name__ == 'courseware': warnings.warn("Importing 'lms.djangoapps.courseware' as 'courseware' is no longer supported", DeprecationWarning) Add more diagnostics to the courseware import warning#pylint: disable=missing-doc...
<commit_before>#pylint: disable=missing-docstring from __future__ import absolute_import import warnings if __name__ == 'courseware': warnings.warn("Importing 'lms.djangoapps.courseware' as 'courseware' is no longer supported", DeprecationWarning) <commit_msg>Add more diagnostics to the courseware import warning<...
3beea9e3800f5c1e68f869d46d137162016a5276
zc-list.py
zc-list.py
#!/usr/bin/env python import sys import client_wrap def get_keys(client): key_str = client.GetKeys() keys = key_str.split (';') del keys[-1] if len(keys) == 0: sys.exit() return keys def print_keys(client, keys): for key in keys: value = client.ReadLong(key) print "%...
#!/usr/bin/env python import sys import argparse import client_wrap def parse_args(): parser = argparse.ArgumentParser() parser.add_argument("-t", "--type", help="type of the cached data", default="double") parser.add_argument("-c", "--connection", help="connection string", default="ipc:///var/run/zero-ca...
Add the parsing arguments function
Add the parsing arguments function
Python
agpl-3.0
ellysh/zero-cache-utils,ellysh/zero-cache-utils
#!/usr/bin/env python import sys import client_wrap def get_keys(client): key_str = client.GetKeys() keys = key_str.split (';') del keys[-1] if len(keys) == 0: sys.exit() return keys def print_keys(client, keys): for key in keys: value = client.ReadLong(key) print "%...
#!/usr/bin/env python import sys import argparse import client_wrap def parse_args(): parser = argparse.ArgumentParser() parser.add_argument("-t", "--type", help="type of the cached data", default="double") parser.add_argument("-c", "--connection", help="connection string", default="ipc:///var/run/zero-ca...
<commit_before>#!/usr/bin/env python import sys import client_wrap def get_keys(client): key_str = client.GetKeys() keys = key_str.split (';') del keys[-1] if len(keys) == 0: sys.exit() return keys def print_keys(client, keys): for key in keys: value = client.ReadLong(key) ...
#!/usr/bin/env python import sys import argparse import client_wrap def parse_args(): parser = argparse.ArgumentParser() parser.add_argument("-t", "--type", help="type of the cached data", default="double") parser.add_argument("-c", "--connection", help="connection string", default="ipc:///var/run/zero-ca...
#!/usr/bin/env python import sys import client_wrap def get_keys(client): key_str = client.GetKeys() keys = key_str.split (';') del keys[-1] if len(keys) == 0: sys.exit() return keys def print_keys(client, keys): for key in keys: value = client.ReadLong(key) print "%...
<commit_before>#!/usr/bin/env python import sys import client_wrap def get_keys(client): key_str = client.GetKeys() keys = key_str.split (';') del keys[-1] if len(keys) == 0: sys.exit() return keys def print_keys(client, keys): for key in keys: value = client.ReadLong(key) ...
cdb7e9fd80b6b5dc31b0096beb7283b373709b8a
tekka/lib/spell_entry.py
tekka/lib/spell_entry.py
try: from sexy import SpellEntry as _SpellEntry except ImportError: from gtk import Entry as _SpellEntry class SpellEntry(_SpellEntry): __gtype_name__ = "SpellEntry" pass
import gtk from ..helper import color from gettext import gettext as _ try: from sexy import SpellEntry as _SpellEntry except ImportError: from gtk import Entry as _SpellEntry class SpellEntry(_SpellEntry): __gtype_name__ = "SpellEntry" def __init__(self, *args, **kwargs): super(SpellEntry, self).__init__(*a...
Add dummy foreground/background color menu
Add dummy foreground/background color menu
Python
bsd-2-clause
sushi-irc/tekka
try: from sexy import SpellEntry as _SpellEntry except ImportError: from gtk import Entry as _SpellEntry class SpellEntry(_SpellEntry): __gtype_name__ = "SpellEntry" pass Add dummy foreground/background color menu
import gtk from ..helper import color from gettext import gettext as _ try: from sexy import SpellEntry as _SpellEntry except ImportError: from gtk import Entry as _SpellEntry class SpellEntry(_SpellEntry): __gtype_name__ = "SpellEntry" def __init__(self, *args, **kwargs): super(SpellEntry, self).__init__(*a...
<commit_before> try: from sexy import SpellEntry as _SpellEntry except ImportError: from gtk import Entry as _SpellEntry class SpellEntry(_SpellEntry): __gtype_name__ = "SpellEntry" pass <commit_msg>Add dummy foreground/background color menu<commit_after>
import gtk from ..helper import color from gettext import gettext as _ try: from sexy import SpellEntry as _SpellEntry except ImportError: from gtk import Entry as _SpellEntry class SpellEntry(_SpellEntry): __gtype_name__ = "SpellEntry" def __init__(self, *args, **kwargs): super(SpellEntry, self).__init__(*a...
try: from sexy import SpellEntry as _SpellEntry except ImportError: from gtk import Entry as _SpellEntry class SpellEntry(_SpellEntry): __gtype_name__ = "SpellEntry" pass Add dummy foreground/background color menuimport gtk from ..helper import color from gettext import gettext as _ try: from sexy import Spel...
<commit_before> try: from sexy import SpellEntry as _SpellEntry except ImportError: from gtk import Entry as _SpellEntry class SpellEntry(_SpellEntry): __gtype_name__ = "SpellEntry" pass <commit_msg>Add dummy foreground/background color menu<commit_after>import gtk from ..helper import color from gettext import ...
cab4ec885d3101775ac16532d46f6f47700d1134
IATISimpleTester/views/uploader.py
IATISimpleTester/views/uploader.py
import os.path from flask import request, jsonify, redirect, url_for from IATISimpleTester import app, db from IATISimpleTester.models import SuppliedData @app.route('/upload', methods=['GET', 'POST']) def upload(): resp = {} source_url = request.args.get('source_url') file = request.files.get('file') ...
import os.path from flask import abort, request, jsonify, redirect, url_for from IATISimpleTester import app, db from IATISimpleTester.models import SuppliedData @app.route('/upload', methods=['GET', 'POST']) def upload(): source_url = request.args.get('source_url') file = request.files.get('file') raw_...
Tidy up upload response a bit
Tidy up upload response a bit
Python
mit
pwyf/data-quality-tester,pwyf/data-quality-tester,pwyf/data-quality-tester,pwyf/data-quality-tester
import os.path from flask import request, jsonify, redirect, url_for from IATISimpleTester import app, db from IATISimpleTester.models import SuppliedData @app.route('/upload', methods=['GET', 'POST']) def upload(): resp = {} source_url = request.args.get('source_url') file = request.files.get('file') ...
import os.path from flask import abort, request, jsonify, redirect, url_for from IATISimpleTester import app, db from IATISimpleTester.models import SuppliedData @app.route('/upload', methods=['GET', 'POST']) def upload(): source_url = request.args.get('source_url') file = request.files.get('file') raw_...
<commit_before>import os.path from flask import request, jsonify, redirect, url_for from IATISimpleTester import app, db from IATISimpleTester.models import SuppliedData @app.route('/upload', methods=['GET', 'POST']) def upload(): resp = {} source_url = request.args.get('source_url') file = request.file...
import os.path from flask import abort, request, jsonify, redirect, url_for from IATISimpleTester import app, db from IATISimpleTester.models import SuppliedData @app.route('/upload', methods=['GET', 'POST']) def upload(): source_url = request.args.get('source_url') file = request.files.get('file') raw_...
import os.path from flask import request, jsonify, redirect, url_for from IATISimpleTester import app, db from IATISimpleTester.models import SuppliedData @app.route('/upload', methods=['GET', 'POST']) def upload(): resp = {} source_url = request.args.get('source_url') file = request.files.get('file') ...
<commit_before>import os.path from flask import request, jsonify, redirect, url_for from IATISimpleTester import app, db from IATISimpleTester.models import SuppliedData @app.route('/upload', methods=['GET', 'POST']) def upload(): resp = {} source_url = request.args.get('source_url') file = request.file...
b5fecb2dd0d85d97716b21aa34a8c41d06bc476f
{{cookiecutter.repo_name}}/tests/test_extension.py
{{cookiecutter.repo_name}}/tests/test_extension.py
import unittest from mopidy_scrobbler import Extension, frontend as frontend_lib class ExtensionTest(unittest.TestCase): def test_get_default_config(self): ext = Extension() config = ext.get_default_config() self.assertIn('[{{ cookiecutter.ext_name }}]', config) self.assertIn('...
import unittest from mopidy_{{ cookiecutter.ext_name }} import Extension, frontend as frontend_lib class ExtensionTest(unittest.TestCase): def test_get_default_config(self): ext = Extension() config = ext.get_default_config() self.assertIn('[{{ cookiecutter.ext_name }}]', config) ...
Remove reference to scrobbler extension
Remove reference to scrobbler extension
Python
apache-2.0
mopidy/cookiecutter-mopidy-ext
import unittest from mopidy_scrobbler import Extension, frontend as frontend_lib class ExtensionTest(unittest.TestCase): def test_get_default_config(self): ext = Extension() config = ext.get_default_config() self.assertIn('[{{ cookiecutter.ext_name }}]', config) self.assertIn('...
import unittest from mopidy_{{ cookiecutter.ext_name }} import Extension, frontend as frontend_lib class ExtensionTest(unittest.TestCase): def test_get_default_config(self): ext = Extension() config = ext.get_default_config() self.assertIn('[{{ cookiecutter.ext_name }}]', config) ...
<commit_before>import unittest from mopidy_scrobbler import Extension, frontend as frontend_lib class ExtensionTest(unittest.TestCase): def test_get_default_config(self): ext = Extension() config = ext.get_default_config() self.assertIn('[{{ cookiecutter.ext_name }}]', config) ...
import unittest from mopidy_{{ cookiecutter.ext_name }} import Extension, frontend as frontend_lib class ExtensionTest(unittest.TestCase): def test_get_default_config(self): ext = Extension() config = ext.get_default_config() self.assertIn('[{{ cookiecutter.ext_name }}]', config) ...
import unittest from mopidy_scrobbler import Extension, frontend as frontend_lib class ExtensionTest(unittest.TestCase): def test_get_default_config(self): ext = Extension() config = ext.get_default_config() self.assertIn('[{{ cookiecutter.ext_name }}]', config) self.assertIn('...
<commit_before>import unittest from mopidy_scrobbler import Extension, frontend as frontend_lib class ExtensionTest(unittest.TestCase): def test_get_default_config(self): ext = Extension() config = ext.get_default_config() self.assertIn('[{{ cookiecutter.ext_name }}]', config) ...
2aab542cc74fdc0cf060518241f01fd74d91ecb5
byceps/services/user/transfer/models.py
byceps/services/user/transfer/models.py
""" byceps.services.user.transfer.models ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :Copyright: 2006-2019 Jochen Kupperschmidt :License: Modified BSD, see LICENSE for details. """ from attr import attrs from ....typing import UserID @attrs(auto_attribs=True, frozen=True, slots=True) class User: id: UserID screen...
""" byceps.services.user.transfer.models ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :Copyright: 2006-2019 Jochen Kupperschmidt :License: Modified BSD, see LICENSE for details. """ from typing import Optional from attr import attrs from ....typing import UserID @attrs(auto_attribs=True, frozen=True, slots=True) class Us...
Fix type hint for avatar URL in user DTO
Fix type hint for avatar URL in user DTO
Python
bsd-3-clause
m-ober/byceps,homeworkprod/byceps,m-ober/byceps,homeworkprod/byceps,m-ober/byceps,homeworkprod/byceps
""" byceps.services.user.transfer.models ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :Copyright: 2006-2019 Jochen Kupperschmidt :License: Modified BSD, see LICENSE for details. """ from attr import attrs from ....typing import UserID @attrs(auto_attribs=True, frozen=True, slots=True) class User: id: UserID screen...
""" byceps.services.user.transfer.models ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :Copyright: 2006-2019 Jochen Kupperschmidt :License: Modified BSD, see LICENSE for details. """ from typing import Optional from attr import attrs from ....typing import UserID @attrs(auto_attribs=True, frozen=True, slots=True) class Us...
<commit_before>""" byceps.services.user.transfer.models ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :Copyright: 2006-2019 Jochen Kupperschmidt :License: Modified BSD, see LICENSE for details. """ from attr import attrs from ....typing import UserID @attrs(auto_attribs=True, frozen=True, slots=True) class User: id: Us...
""" byceps.services.user.transfer.models ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :Copyright: 2006-2019 Jochen Kupperschmidt :License: Modified BSD, see LICENSE for details. """ from typing import Optional from attr import attrs from ....typing import UserID @attrs(auto_attribs=True, frozen=True, slots=True) class Us...
""" byceps.services.user.transfer.models ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :Copyright: 2006-2019 Jochen Kupperschmidt :License: Modified BSD, see LICENSE for details. """ from attr import attrs from ....typing import UserID @attrs(auto_attribs=True, frozen=True, slots=True) class User: id: UserID screen...
<commit_before>""" byceps.services.user.transfer.models ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :Copyright: 2006-2019 Jochen Kupperschmidt :License: Modified BSD, see LICENSE for details. """ from attr import attrs from ....typing import UserID @attrs(auto_attribs=True, frozen=True, slots=True) class User: id: Us...
1c4e75c243205ad47cd2e47a3d836c6c9e516db4
pika/amqp_object.py
pika/amqp_object.py
"""Base classes that are extended by low level AMQP frames and higher level AMQP classes and methods. """ class AMQPObject(object): """Base object that is extended by AMQP low level frames and AMQP classes and methods. """ NAME = 'AMQPObject' def __repr__(self): items = list() fo...
"""Base classes that are extended by low level AMQP frames and higher level AMQP classes and methods. """ class AMQPObject(object): """Base object that is extended by AMQP low level frames and AMQP classes and methods. """ NAME = 'AMQPObject' INDEX = None def __repr__(self): items = ...
Add a few base attributes
Add a few base attributes
Python
bsd-3-clause
reddec/pika,shinji-s/pika,fkarb/pika-python3,renshawbay/pika-python3,zixiliuyue/pika,skftn/pika,vitaly-krugl/pika,vrtsystems/pika,hugoxia/pika,knowsis/pika,Tarsbot/pika,Zephor5/pika,jstnlef/pika,benjamin9999/pika,pika/pika
"""Base classes that are extended by low level AMQP frames and higher level AMQP classes and methods. """ class AMQPObject(object): """Base object that is extended by AMQP low level frames and AMQP classes and methods. """ NAME = 'AMQPObject' def __repr__(self): items = list() fo...
"""Base classes that are extended by low level AMQP frames and higher level AMQP classes and methods. """ class AMQPObject(object): """Base object that is extended by AMQP low level frames and AMQP classes and methods. """ NAME = 'AMQPObject' INDEX = None def __repr__(self): items = ...
<commit_before>"""Base classes that are extended by low level AMQP frames and higher level AMQP classes and methods. """ class AMQPObject(object): """Base object that is extended by AMQP low level frames and AMQP classes and methods. """ NAME = 'AMQPObject' def __repr__(self): items = li...
"""Base classes that are extended by low level AMQP frames and higher level AMQP classes and methods. """ class AMQPObject(object): """Base object that is extended by AMQP low level frames and AMQP classes and methods. """ NAME = 'AMQPObject' INDEX = None def __repr__(self): items = ...
"""Base classes that are extended by low level AMQP frames and higher level AMQP classes and methods. """ class AMQPObject(object): """Base object that is extended by AMQP low level frames and AMQP classes and methods. """ NAME = 'AMQPObject' def __repr__(self): items = list() fo...
<commit_before>"""Base classes that are extended by low level AMQP frames and higher level AMQP classes and methods. """ class AMQPObject(object): """Base object that is extended by AMQP low level frames and AMQP classes and methods. """ NAME = 'AMQPObject' def __repr__(self): items = li...
5830f5590ed185116dd4807f6351ad3afeb0dd5d
plugins/postgres/dbt/adapters/postgres/relation.py
plugins/postgres/dbt/adapters/postgres/relation.py
from dbt.adapters.base import Column from dataclasses import dataclass from dbt.adapters.base.relation import BaseRelation from dbt.exceptions import RuntimeException @dataclass(frozen=True, eq=False, repr=False) class PostgresRelation(BaseRelation): def __post_init__(self): # Check for length of Postgres...
from dbt.adapters.base import Column from dataclasses import dataclass from dbt.adapters.base.relation import BaseRelation from dbt.exceptions import RuntimeException @dataclass(frozen=True, eq=False, repr=False) class PostgresRelation(BaseRelation): def __post_init__(self): # Check for length of Postgres...
Tweak error message, reformat for flake8
Tweak error message, reformat for flake8
Python
apache-2.0
analyst-collective/dbt,analyst-collective/dbt
from dbt.adapters.base import Column from dataclasses import dataclass from dbt.adapters.base.relation import BaseRelation from dbt.exceptions import RuntimeException @dataclass(frozen=True, eq=False, repr=False) class PostgresRelation(BaseRelation): def __post_init__(self): # Check for length of Postgres...
from dbt.adapters.base import Column from dataclasses import dataclass from dbt.adapters.base.relation import BaseRelation from dbt.exceptions import RuntimeException @dataclass(frozen=True, eq=False, repr=False) class PostgresRelation(BaseRelation): def __post_init__(self): # Check for length of Postgres...
<commit_before>from dbt.adapters.base import Column from dataclasses import dataclass from dbt.adapters.base.relation import BaseRelation from dbt.exceptions import RuntimeException @dataclass(frozen=True, eq=False, repr=False) class PostgresRelation(BaseRelation): def __post_init__(self): # Check for len...
from dbt.adapters.base import Column from dataclasses import dataclass from dbt.adapters.base.relation import BaseRelation from dbt.exceptions import RuntimeException @dataclass(frozen=True, eq=False, repr=False) class PostgresRelation(BaseRelation): def __post_init__(self): # Check for length of Postgres...
from dbt.adapters.base import Column from dataclasses import dataclass from dbt.adapters.base.relation import BaseRelation from dbt.exceptions import RuntimeException @dataclass(frozen=True, eq=False, repr=False) class PostgresRelation(BaseRelation): def __post_init__(self): # Check for length of Postgres...
<commit_before>from dbt.adapters.base import Column from dataclasses import dataclass from dbt.adapters.base.relation import BaseRelation from dbt.exceptions import RuntimeException @dataclass(frozen=True, eq=False, repr=False) class PostgresRelation(BaseRelation): def __post_init__(self): # Check for len...
d0861d4c072e81c94c06b093469224c076c6c362
armstrong/core/arm_sections/tests/_utils.py
armstrong/core/arm_sections/tests/_utils.py
from datetime import datetime from django.core.files import File from django.conf import settings from armstrong.dev.tests.utils import ArmstrongTestCase from armstrong.dev.tests.utils.backports import * from armstrong.dev.tests.utils.concrete import * from armstrong.dev.tests.utils.users import * from ..models impor...
from datetime import datetime from django.core.files import File from django.conf import settings from armstrong.dev.tests.utils import ArmstrongTestCase from armstrong.dev.tests.utils.backports import * from armstrong.dev.tests.utils.concrete import * from armstrong.dev.tests.utils.users import * from ..models impor...
Adjust in a BC way to introduce TestCase
Adjust in a BC way to introduce TestCase
Python
apache-2.0
texastribune/armstrong.core.tt_sections,texastribune/armstrong.core.tt_sections,armstrong/armstrong.core.arm_sections,texastribune/armstrong.core.tt_sections,armstrong/armstrong.core.arm_sections
from datetime import datetime from django.core.files import File from django.conf import settings from armstrong.dev.tests.utils import ArmstrongTestCase from armstrong.dev.tests.utils.backports import * from armstrong.dev.tests.utils.concrete import * from armstrong.dev.tests.utils.users import * from ..models impor...
from datetime import datetime from django.core.files import File from django.conf import settings from armstrong.dev.tests.utils import ArmstrongTestCase from armstrong.dev.tests.utils.backports import * from armstrong.dev.tests.utils.concrete import * from armstrong.dev.tests.utils.users import * from ..models impor...
<commit_before>from datetime import datetime from django.core.files import File from django.conf import settings from armstrong.dev.tests.utils import ArmstrongTestCase from armstrong.dev.tests.utils.backports import * from armstrong.dev.tests.utils.concrete import * from armstrong.dev.tests.utils.users import * from...
from datetime import datetime from django.core.files import File from django.conf import settings from armstrong.dev.tests.utils import ArmstrongTestCase from armstrong.dev.tests.utils.backports import * from armstrong.dev.tests.utils.concrete import * from armstrong.dev.tests.utils.users import * from ..models impor...
from datetime import datetime from django.core.files import File from django.conf import settings from armstrong.dev.tests.utils import ArmstrongTestCase from armstrong.dev.tests.utils.backports import * from armstrong.dev.tests.utils.concrete import * from armstrong.dev.tests.utils.users import * from ..models impor...
<commit_before>from datetime import datetime from django.core.files import File from django.conf import settings from armstrong.dev.tests.utils import ArmstrongTestCase from armstrong.dev.tests.utils.backports import * from armstrong.dev.tests.utils.concrete import * from armstrong.dev.tests.utils.users import * from...
1007ee608ac448941e9bb8958c6b2308abeb63ef
github-listener/listener.py
github-listener/listener.py
import flask import registry app = flask.Flask(__name__) def get_registry(): r = getattr(flask.g, '_registry', None) if r is None: r = flask.g._registry = registry.Registry("hooks.json") return r @app.route("/hook/<repo>", methods=['POST']) def hook(repo): branch = flask.request.json["ref"]...
import flask import registry app = flask.Flask(__name__) def get_registry(): r = getattr(flask.g, '_registry', None) if r is None: r = flask.g._registry = registry.Registry("hooks.json") return r @app.route("/hook/<repo>", methods=['POST']) def hook(repo): if flask.request.headers['X-GitHub...
Add support for github ping event
Add support for github ping event
Python
mit
Storj/lunchbox,Storj/lunchbox
import flask import registry app = flask.Flask(__name__) def get_registry(): r = getattr(flask.g, '_registry', None) if r is None: r = flask.g._registry = registry.Registry("hooks.json") return r @app.route("/hook/<repo>", methods=['POST']) def hook(repo): branch = flask.request.json["ref"]...
import flask import registry app = flask.Flask(__name__) def get_registry(): r = getattr(flask.g, '_registry', None) if r is None: r = flask.g._registry = registry.Registry("hooks.json") return r @app.route("/hook/<repo>", methods=['POST']) def hook(repo): if flask.request.headers['X-GitHub...
<commit_before>import flask import registry app = flask.Flask(__name__) def get_registry(): r = getattr(flask.g, '_registry', None) if r is None: r = flask.g._registry = registry.Registry("hooks.json") return r @app.route("/hook/<repo>", methods=['POST']) def hook(repo): branch = flask.requ...
import flask import registry app = flask.Flask(__name__) def get_registry(): r = getattr(flask.g, '_registry', None) if r is None: r = flask.g._registry = registry.Registry("hooks.json") return r @app.route("/hook/<repo>", methods=['POST']) def hook(repo): if flask.request.headers['X-GitHub...
import flask import registry app = flask.Flask(__name__) def get_registry(): r = getattr(flask.g, '_registry', None) if r is None: r = flask.g._registry = registry.Registry("hooks.json") return r @app.route("/hook/<repo>", methods=['POST']) def hook(repo): branch = flask.request.json["ref"]...
<commit_before>import flask import registry app = flask.Flask(__name__) def get_registry(): r = getattr(flask.g, '_registry', None) if r is None: r = flask.g._registry = registry.Registry("hooks.json") return r @app.route("/hook/<repo>", methods=['POST']) def hook(repo): branch = flask.requ...
82155f3caad1220eeb2ee718142c5aace8600f87
django-jquery-file-upload/urls.py
django-jquery-file-upload/urls.py
from django.conf.urls import patterns, include, url from django.http import HttpResponseRedirect # Uncomment the next two lines to enable the admin: from django.contrib import admin admin.autodiscover() urlpatterns = patterns('', # Examples: # url(r'^$', 'upload.views.home', name='home'), url(r'^$', lamb...
from django.conf.urls import patterns, include, url from django.http import HttpResponseRedirect # Uncomment the next two lines to enable the admin: from django.contrib import admin admin.autodiscover() urlpatterns = patterns('', # Examples: # url(r'^$', 'upload.views.home', name='home'), url(r'^$', lamb...
Fix serve media files path
Fix serve media files path
Python
mit
minhlongdo/django-jquery-file-upload,Imaginashion/cloud-vision,vaniakov/django-jquery-file-upload,indrajithi/mgc-django,sigurdga/django-jquery-file-upload,Imaginashion/cloud-vision,minhlongdo/django-jquery-file-upload,Imaginashion/cloud-vision,vaniakov/django-jquery-file-upload,Imaginashion/cloud-vision,sigurdga/django...
from django.conf.urls import patterns, include, url from django.http import HttpResponseRedirect # Uncomment the next two lines to enable the admin: from django.contrib import admin admin.autodiscover() urlpatterns = patterns('', # Examples: # url(r'^$', 'upload.views.home', name='home'), url(r'^$', lamb...
from django.conf.urls import patterns, include, url from django.http import HttpResponseRedirect # Uncomment the next two lines to enable the admin: from django.contrib import admin admin.autodiscover() urlpatterns = patterns('', # Examples: # url(r'^$', 'upload.views.home', name='home'), url(r'^$', lamb...
<commit_before>from django.conf.urls import patterns, include, url from django.http import HttpResponseRedirect # Uncomment the next two lines to enable the admin: from django.contrib import admin admin.autodiscover() urlpatterns = patterns('', # Examples: # url(r'^$', 'upload.views.home', name='home'), ...
from django.conf.urls import patterns, include, url from django.http import HttpResponseRedirect # Uncomment the next two lines to enable the admin: from django.contrib import admin admin.autodiscover() urlpatterns = patterns('', # Examples: # url(r'^$', 'upload.views.home', name='home'), url(r'^$', lamb...
from django.conf.urls import patterns, include, url from django.http import HttpResponseRedirect # Uncomment the next two lines to enable the admin: from django.contrib import admin admin.autodiscover() urlpatterns = patterns('', # Examples: # url(r'^$', 'upload.views.home', name='home'), url(r'^$', lamb...
<commit_before>from django.conf.urls import patterns, include, url from django.http import HttpResponseRedirect # Uncomment the next two lines to enable the admin: from django.contrib import admin admin.autodiscover() urlpatterns = patterns('', # Examples: # url(r'^$', 'upload.views.home', name='home'), ...
67ab4b7374d739719700f84f0f5726f1b0c476d8
cybox/test/objects/mutex_test.py
cybox/test/objects/mutex_test.py
import unittest import cybox.bindings.cybox_common_types_1_0 as common_types_binding import cybox.bindings.mutex_object_1_3 as mutex_binding from cybox.objects.mutex_object import Mutex class MutexTest(unittest.TestCase): def setUp(self): self.test_dict = {'named': True, 'name': {'value': 'test_name'}} ...
import unittest import cybox.bindings.cybox_common_types_1_0 as common_types_binding import cybox.bindings.mutex_object_1_3 as mutex_binding from cybox.objects.mutex_object import Mutex class MutexTest(unittest.TestCase): def setUp(self): self.test_dict = {'named': True, 'name': {'value': 'test_name'}} ...
Fix some more unittest assert methods for Python 2.6
Fix some more unittest assert methods for Python 2.6
Python
bsd-3-clause
CybOXProject/python-cybox
import unittest import cybox.bindings.cybox_common_types_1_0 as common_types_binding import cybox.bindings.mutex_object_1_3 as mutex_binding from cybox.objects.mutex_object import Mutex class MutexTest(unittest.TestCase): def setUp(self): self.test_dict = {'named': True, 'name': {'value': 'test_name'}} ...
import unittest import cybox.bindings.cybox_common_types_1_0 as common_types_binding import cybox.bindings.mutex_object_1_3 as mutex_binding from cybox.objects.mutex_object import Mutex class MutexTest(unittest.TestCase): def setUp(self): self.test_dict = {'named': True, 'name': {'value': 'test_name'}} ...
<commit_before>import unittest import cybox.bindings.cybox_common_types_1_0 as common_types_binding import cybox.bindings.mutex_object_1_3 as mutex_binding from cybox.objects.mutex_object import Mutex class MutexTest(unittest.TestCase): def setUp(self): self.test_dict = {'named': True, 'name': {'value': '...
import unittest import cybox.bindings.cybox_common_types_1_0 as common_types_binding import cybox.bindings.mutex_object_1_3 as mutex_binding from cybox.objects.mutex_object import Mutex class MutexTest(unittest.TestCase): def setUp(self): self.test_dict = {'named': True, 'name': {'value': 'test_name'}} ...
import unittest import cybox.bindings.cybox_common_types_1_0 as common_types_binding import cybox.bindings.mutex_object_1_3 as mutex_binding from cybox.objects.mutex_object import Mutex class MutexTest(unittest.TestCase): def setUp(self): self.test_dict = {'named': True, 'name': {'value': 'test_name'}} ...
<commit_before>import unittest import cybox.bindings.cybox_common_types_1_0 as common_types_binding import cybox.bindings.mutex_object_1_3 as mutex_binding from cybox.objects.mutex_object import Mutex class MutexTest(unittest.TestCase): def setUp(self): self.test_dict = {'named': True, 'name': {'value': '...
02937272206a526ff62b164fc54a14c385eb6970
common/lib/xmodule/xmodule/hidden_module.py
common/lib/xmodule/xmodule/hidden_module.py
from xmodule.x_module import XModule from xmodule.raw_module import RawDescriptor class HiddenModule(XModule): def get_html(self): if self.system.user_is_staff: return "ERROR: This module is unknown--students will not see it at all" else: return "" class HiddenDescriptor(...
from xmodule.x_module import XModule from xmodule.raw_module import RawDescriptor class HiddenModule(XModule): def get_html(self): if self.system.user_is_staff: return u"ERROR: This module is unknown--students will not see it at all" else: return u"" class HiddenDescripto...
Return unicode string to pass assertion
hidden-module-unicode: Return unicode string to pass assertion XBlock Fragments expect unicode strings, and fail on an assertion when it isn't: ``` 2013-11-14 07:55:50,774 ERROR 3788 [django.request] base.py:215 - Internal Server Error: /courses/TestU/TST101/now/courseware/41d55c576a574fde99319420228f7f88/5fef5794e34...
Python
agpl-3.0
louyihua/edx-platform,Endika/edx-platform,mushtaqak/edx-platform,shubhdev/openedx,valtech-mooc/edx-platform,a-parhom/edx-platform,Livit/Livit.Learn.EdX,longmen21/edx-platform,knehez/edx-platform,shurihell/testasia,mbareta/edx-platform-ft,hkawasaki/kawasaki-aio8-1,Softmotions/edx-platform,kursitet/edx-platform,dsajkl/re...
from xmodule.x_module import XModule from xmodule.raw_module import RawDescriptor class HiddenModule(XModule): def get_html(self): if self.system.user_is_staff: return "ERROR: This module is unknown--students will not see it at all" else: return "" class HiddenDescriptor(...
from xmodule.x_module import XModule from xmodule.raw_module import RawDescriptor class HiddenModule(XModule): def get_html(self): if self.system.user_is_staff: return u"ERROR: This module is unknown--students will not see it at all" else: return u"" class HiddenDescripto...
<commit_before>from xmodule.x_module import XModule from xmodule.raw_module import RawDescriptor class HiddenModule(XModule): def get_html(self): if self.system.user_is_staff: return "ERROR: This module is unknown--students will not see it at all" else: return "" class Hi...
from xmodule.x_module import XModule from xmodule.raw_module import RawDescriptor class HiddenModule(XModule): def get_html(self): if self.system.user_is_staff: return u"ERROR: This module is unknown--students will not see it at all" else: return u"" class HiddenDescripto...
from xmodule.x_module import XModule from xmodule.raw_module import RawDescriptor class HiddenModule(XModule): def get_html(self): if self.system.user_is_staff: return "ERROR: This module is unknown--students will not see it at all" else: return "" class HiddenDescriptor(...
<commit_before>from xmodule.x_module import XModule from xmodule.raw_module import RawDescriptor class HiddenModule(XModule): def get_html(self): if self.system.user_is_staff: return "ERROR: This module is unknown--students will not see it at all" else: return "" class Hi...
578fe6f7403de0f93b3ca2776092e5dfe8dbfa73
twisted/plugins/docker_xylem_plugin.py
twisted/plugins/docker_xylem_plugin.py
import yaml from zope.interface import implements from twisted.python import usage from twisted.plugin import IPlugin from twisted.application.service import IServiceMaker from twisted.application import internet from twisted.web import server from docker_xylem import service class Options(usage.Options): optP...
import yaml from zope.interface import implements from twisted.python import filepath, usage from twisted.plugin import IPlugin from twisted.application.service import IServiceMaker from twisted.application import internet from twisted.web import server from docker_xylem import service class Options(usage.Options)...
Create /run/docker/plugins before using it. (@bearnard)
Create /run/docker/plugins before using it. (@bearnard)
Python
mit
praekeltfoundation/docker-xylem,praekeltfoundation/docker-xylem
import yaml from zope.interface import implements from twisted.python import usage from twisted.plugin import IPlugin from twisted.application.service import IServiceMaker from twisted.application import internet from twisted.web import server from docker_xylem import service class Options(usage.Options): optP...
import yaml from zope.interface import implements from twisted.python import filepath, usage from twisted.plugin import IPlugin from twisted.application.service import IServiceMaker from twisted.application import internet from twisted.web import server from docker_xylem import service class Options(usage.Options)...
<commit_before>import yaml from zope.interface import implements from twisted.python import usage from twisted.plugin import IPlugin from twisted.application.service import IServiceMaker from twisted.application import internet from twisted.web import server from docker_xylem import service class Options(usage.Opt...
import yaml from zope.interface import implements from twisted.python import filepath, usage from twisted.plugin import IPlugin from twisted.application.service import IServiceMaker from twisted.application import internet from twisted.web import server from docker_xylem import service class Options(usage.Options)...
import yaml from zope.interface import implements from twisted.python import usage from twisted.plugin import IPlugin from twisted.application.service import IServiceMaker from twisted.application import internet from twisted.web import server from docker_xylem import service class Options(usage.Options): optP...
<commit_before>import yaml from zope.interface import implements from twisted.python import usage from twisted.plugin import IPlugin from twisted.application.service import IServiceMaker from twisted.application import internet from twisted.web import server from docker_xylem import service class Options(usage.Opt...
45ead09898275154919ab9589abb610d42049782
website/apps/ts_om/views/ScenarioValidationView.py
website/apps/ts_om/views/ScenarioValidationView.py
import requests from django.conf import settings from django.http import HttpResponse from django.views.generic.base import View from website.apps.ts_om.check import check_url def rest_validate(f): validate_url = check_url(getattr(settings, "TS_OM_VALIDATE_URL", None), "validate") response = requests.post(...
import requests from django.conf import settings from django.http import HttpResponse from django.views.generic.base import View from website.apps.ts_om.check import check_url def rest_validate(f): validate_url = check_url(getattr(settings, "TS_OM_VALIDATE_URL", None), "validate") response = requests.post(...
Remove invalid staticmethod decorator from post method.
Fix: Remove invalid staticmethod decorator from post method.
Python
mpl-2.0
vecnet/om,vecnet/om,vecnet/om,vecnet/om,vecnet/om
import requests from django.conf import settings from django.http import HttpResponse from django.views.generic.base import View from website.apps.ts_om.check import check_url def rest_validate(f): validate_url = check_url(getattr(settings, "TS_OM_VALIDATE_URL", None), "validate") response = requests.post(...
import requests from django.conf import settings from django.http import HttpResponse from django.views.generic.base import View from website.apps.ts_om.check import check_url def rest_validate(f): validate_url = check_url(getattr(settings, "TS_OM_VALIDATE_URL", None), "validate") response = requests.post(...
<commit_before>import requests from django.conf import settings from django.http import HttpResponse from django.views.generic.base import View from website.apps.ts_om.check import check_url def rest_validate(f): validate_url = check_url(getattr(settings, "TS_OM_VALIDATE_URL", None), "validate") response =...
import requests from django.conf import settings from django.http import HttpResponse from django.views.generic.base import View from website.apps.ts_om.check import check_url def rest_validate(f): validate_url = check_url(getattr(settings, "TS_OM_VALIDATE_URL", None), "validate") response = requests.post(...
import requests from django.conf import settings from django.http import HttpResponse from django.views.generic.base import View from website.apps.ts_om.check import check_url def rest_validate(f): validate_url = check_url(getattr(settings, "TS_OM_VALIDATE_URL", None), "validate") response = requests.post(...
<commit_before>import requests from django.conf import settings from django.http import HttpResponse from django.views.generic.base import View from website.apps.ts_om.check import check_url def rest_validate(f): validate_url = check_url(getattr(settings, "TS_OM_VALIDATE_URL", None), "validate") response =...
861f2ea86e26fe27ba3f2f283c32ed0a9931c5fb
ce/analysis/core.py
ce/analysis/core.py
#!/usr/bin/env python # vim: set fileencoding=UTF-8 : from ..common import DynamicMethods from ..expr import Expr, ExprTreeTransformer from ..semantics import cast_error class Analysis(DynamicMethods): def __init__(self, e, **kwargs): super(Analysis, self).__init__() self.e = e self.s =...
#!/usr/bin/env python # vim: set fileencoding=UTF-8 : from ..common import DynamicMethods from ..expr import Expr, ExprTreeTransformer from ..semantics import cast_error class Analysis(DynamicMethods): def __init__(self, e, **kwargs): super(Analysis, self).__init__() self.e = e self.s =...
Add preliminary ErrorAnalysis test case
Add preliminary ErrorAnalysis test case
Python
mit
admk/soap
#!/usr/bin/env python # vim: set fileencoding=UTF-8 : from ..common import DynamicMethods from ..expr import Expr, ExprTreeTransformer from ..semantics import cast_error class Analysis(DynamicMethods): def __init__(self, e, **kwargs): super(Analysis, self).__init__() self.e = e self.s =...
#!/usr/bin/env python # vim: set fileencoding=UTF-8 : from ..common import DynamicMethods from ..expr import Expr, ExprTreeTransformer from ..semantics import cast_error class Analysis(DynamicMethods): def __init__(self, e, **kwargs): super(Analysis, self).__init__() self.e = e self.s =...
<commit_before>#!/usr/bin/env python # vim: set fileencoding=UTF-8 : from ..common import DynamicMethods from ..expr import Expr, ExprTreeTransformer from ..semantics import cast_error class Analysis(DynamicMethods): def __init__(self, e, **kwargs): super(Analysis, self).__init__() self.e = e ...
#!/usr/bin/env python # vim: set fileencoding=UTF-8 : from ..common import DynamicMethods from ..expr import Expr, ExprTreeTransformer from ..semantics import cast_error class Analysis(DynamicMethods): def __init__(self, e, **kwargs): super(Analysis, self).__init__() self.e = e self.s =...
#!/usr/bin/env python # vim: set fileencoding=UTF-8 : from ..common import DynamicMethods from ..expr import Expr, ExprTreeTransformer from ..semantics import cast_error class Analysis(DynamicMethods): def __init__(self, e, **kwargs): super(Analysis, self).__init__() self.e = e self.s =...
<commit_before>#!/usr/bin/env python # vim: set fileencoding=UTF-8 : from ..common import DynamicMethods from ..expr import Expr, ExprTreeTransformer from ..semantics import cast_error class Analysis(DynamicMethods): def __init__(self, e, **kwargs): super(Analysis, self).__init__() self.e = e ...
80d02cffe20cfa6d370bd33856db480bf0ce5fea
backend/unichat/helpers.py
backend/unichat/helpers.py
from .models import School, User import re def get_school_list(): schools = School.objects.all() school_list = [] for s in schools: school = {} school['id'] = s.id school['name'] = s.name school['site'] = s.site school['university'] = s.university.name schoo...
from .models import School, User import re import string import random def get_school_list(): schools = School.objects.all() school_list = [] for s in schools: school = {} school['id'] = s.id school['name'] = s.name school['site'] = s.site school['university'] = s.u...
Create random auth token on user signup
Create random auth token on user signup
Python
mit
dimkarakostas/unimeet,dimkarakostas/unimeet,dimkarakostas/unimeet,dimkarakostas/unimeet
from .models import School, User import re def get_school_list(): schools = School.objects.all() school_list = [] for s in schools: school = {} school['id'] = s.id school['name'] = s.name school['site'] = s.site school['university'] = s.university.name schoo...
from .models import School, User import re import string import random def get_school_list(): schools = School.objects.all() school_list = [] for s in schools: school = {} school['id'] = s.id school['name'] = s.name school['site'] = s.site school['university'] = s.u...
<commit_before>from .models import School, User import re def get_school_list(): schools = School.objects.all() school_list = [] for s in schools: school = {} school['id'] = s.id school['name'] = s.name school['site'] = s.site school['university'] = s.university.nam...
from .models import School, User import re import string import random def get_school_list(): schools = School.objects.all() school_list = [] for s in schools: school = {} school['id'] = s.id school['name'] = s.name school['site'] = s.site school['university'] = s.u...
from .models import School, User import re def get_school_list(): schools = School.objects.all() school_list = [] for s in schools: school = {} school['id'] = s.id school['name'] = s.name school['site'] = s.site school['university'] = s.university.name schoo...
<commit_before>from .models import School, User import re def get_school_list(): schools = School.objects.all() school_list = [] for s in schools: school = {} school['id'] = s.id school['name'] = s.name school['site'] = s.site school['university'] = s.university.nam...
c4ea358c7cdcd76dc9bf35b54e22cc9be05dc62a
setuptools/command/sdist3.py
setuptools/command/sdist3.py
from distutils import log from sdist import sdist from lib2to3.refactor import RefactoringTool, get_fixers_from_package class _RefactoringTool(RefactoringTool): def log_error(self, msg, *args, **kw): log.error(msg, *args) def log_message(self, msg, *args): log.info(msg, *args) de...
import os from distutils import log from sdist import sdist from lib2to3.refactor import RefactoringTool, get_fixers_from_package class _RefactoringTool(RefactoringTool): def log_error(self, msg, *args, **kw): log.error(msg, *args) def log_message(self, msg, *args): log.info(msg, *arg...
Correct path names for fixed files.
Correct path names for fixed files. --HG-- branch : distribute extra : rebase_source : d5bd9c6fdb8cf2208eca9e0e5f37cb7fea1d14a5
Python
mit
pypa/setuptools,pypa/setuptools,pypa/setuptools
from distutils import log from sdist import sdist from lib2to3.refactor import RefactoringTool, get_fixers_from_package class _RefactoringTool(RefactoringTool): def log_error(self, msg, *args, **kw): log.error(msg, *args) def log_message(self, msg, *args): log.info(msg, *args) de...
import os from distutils import log from sdist import sdist from lib2to3.refactor import RefactoringTool, get_fixers_from_package class _RefactoringTool(RefactoringTool): def log_error(self, msg, *args, **kw): log.error(msg, *args) def log_message(self, msg, *args): log.info(msg, *arg...
<commit_before>from distutils import log from sdist import sdist from lib2to3.refactor import RefactoringTool, get_fixers_from_package class _RefactoringTool(RefactoringTool): def log_error(self, msg, *args, **kw): log.error(msg, *args) def log_message(self, msg, *args): log.info(msg,...
import os from distutils import log from sdist import sdist from lib2to3.refactor import RefactoringTool, get_fixers_from_package class _RefactoringTool(RefactoringTool): def log_error(self, msg, *args, **kw): log.error(msg, *args) def log_message(self, msg, *args): log.info(msg, *arg...
from distutils import log from sdist import sdist from lib2to3.refactor import RefactoringTool, get_fixers_from_package class _RefactoringTool(RefactoringTool): def log_error(self, msg, *args, **kw): log.error(msg, *args) def log_message(self, msg, *args): log.info(msg, *args) de...
<commit_before>from distutils import log from sdist import sdist from lib2to3.refactor import RefactoringTool, get_fixers_from_package class _RefactoringTool(RefactoringTool): def log_error(self, msg, *args, **kw): log.error(msg, *args) def log_message(self, msg, *args): log.info(msg,...
e4345634ea6a4c43db20ea1d3d33134b6ee6204d
alembic/versions/151b2f642877_text_to_json.py
alembic/versions/151b2f642877_text_to_json.py
"""text to JSON Revision ID: 151b2f642877 Revises: aee7291c81 Create Date: 2015-06-12 14:40:56.956657 """ # revision identifiers, used by Alembic. revision = '151b2f642877' down_revision = 'aee7291c81' from alembic import op import sqlalchemy as sa def upgrade(): query = 'ALTER TABLE project ALTER COLUMN info...
"""text to JSON Revision ID: 151b2f642877 Revises: ac115763654 Create Date: 2015-06-12 14:40:56.956657 """ # revision identifiers, used by Alembic. revision = '151b2f642877' down_revision = 'ac115763654' from alembic import op import sqlalchemy as sa def upgrade(): query = 'ALTER TABLE project ALTER COLUMN in...
Fix alembic revision after merge master
Fix alembic revision after merge master
Python
agpl-3.0
OpenNewsLabs/pybossa,PyBossa/pybossa,PyBossa/pybossa,Scifabric/pybossa,jean/pybossa,geotagx/pybossa,OpenNewsLabs/pybossa,jean/pybossa,Scifabric/pybossa,geotagx/pybossa
"""text to JSON Revision ID: 151b2f642877 Revises: aee7291c81 Create Date: 2015-06-12 14:40:56.956657 """ # revision identifiers, used by Alembic. revision = '151b2f642877' down_revision = 'aee7291c81' from alembic import op import sqlalchemy as sa def upgrade(): query = 'ALTER TABLE project ALTER COLUMN info...
"""text to JSON Revision ID: 151b2f642877 Revises: ac115763654 Create Date: 2015-06-12 14:40:56.956657 """ # revision identifiers, used by Alembic. revision = '151b2f642877' down_revision = 'ac115763654' from alembic import op import sqlalchemy as sa def upgrade(): query = 'ALTER TABLE project ALTER COLUMN in...
<commit_before>"""text to JSON Revision ID: 151b2f642877 Revises: aee7291c81 Create Date: 2015-06-12 14:40:56.956657 """ # revision identifiers, used by Alembic. revision = '151b2f642877' down_revision = 'aee7291c81' from alembic import op import sqlalchemy as sa def upgrade(): query = 'ALTER TABLE project AL...
"""text to JSON Revision ID: 151b2f642877 Revises: ac115763654 Create Date: 2015-06-12 14:40:56.956657 """ # revision identifiers, used by Alembic. revision = '151b2f642877' down_revision = 'ac115763654' from alembic import op import sqlalchemy as sa def upgrade(): query = 'ALTER TABLE project ALTER COLUMN in...
"""text to JSON Revision ID: 151b2f642877 Revises: aee7291c81 Create Date: 2015-06-12 14:40:56.956657 """ # revision identifiers, used by Alembic. revision = '151b2f642877' down_revision = 'aee7291c81' from alembic import op import sqlalchemy as sa def upgrade(): query = 'ALTER TABLE project ALTER COLUMN info...
<commit_before>"""text to JSON Revision ID: 151b2f642877 Revises: aee7291c81 Create Date: 2015-06-12 14:40:56.956657 """ # revision identifiers, used by Alembic. revision = '151b2f642877' down_revision = 'aee7291c81' from alembic import op import sqlalchemy as sa def upgrade(): query = 'ALTER TABLE project AL...
780ba3b8f1271dd0a4b78c7a3bb00f5f4fabf2eb
external_ip.py
external_ip.py
# -*- coding: utf-8 -*- ''' :codeauthor: David Boucha :copyright: © 2013 by the SaltStack Team, see AUTHORS for more details. :license: Apache 2.0, see LICENSE for more details. salt.grains.external_ip ~~~~~~~~~~~~~~~~~~~~~~~ Return the external IP address reported by boucha.saltstack.com '''...
# -*- coding: utf-8 -*- ''' :codeauthor: David Boucha :copyright: © 2013 by the SaltStack Team, see AUTHORS for more details. :license: Apache 2.0, see LICENSE for more details. salt.grains.external_ip ~~~~~~~~~~~~~~~~~~~~~~~ Return the external IP address reported by an IP reporting service....
Add requirement for opt in
Add requirement for opt in
Python
apache-2.0
UtahDave/external_ip
# -*- coding: utf-8 -*- ''' :codeauthor: David Boucha :copyright: © 2013 by the SaltStack Team, see AUTHORS for more details. :license: Apache 2.0, see LICENSE for more details. salt.grains.external_ip ~~~~~~~~~~~~~~~~~~~~~~~ Return the external IP address reported by boucha.saltstack.com '''...
# -*- coding: utf-8 -*- ''' :codeauthor: David Boucha :copyright: © 2013 by the SaltStack Team, see AUTHORS for more details. :license: Apache 2.0, see LICENSE for more details. salt.grains.external_ip ~~~~~~~~~~~~~~~~~~~~~~~ Return the external IP address reported by an IP reporting service....
<commit_before># -*- coding: utf-8 -*- ''' :codeauthor: David Boucha :copyright: © 2013 by the SaltStack Team, see AUTHORS for more details. :license: Apache 2.0, see LICENSE for more details. salt.grains.external_ip ~~~~~~~~~~~~~~~~~~~~~~~ Return the external IP address reported by boucha.sa...
# -*- coding: utf-8 -*- ''' :codeauthor: David Boucha :copyright: © 2013 by the SaltStack Team, see AUTHORS for more details. :license: Apache 2.0, see LICENSE for more details. salt.grains.external_ip ~~~~~~~~~~~~~~~~~~~~~~~ Return the external IP address reported by an IP reporting service....
# -*- coding: utf-8 -*- ''' :codeauthor: David Boucha :copyright: © 2013 by the SaltStack Team, see AUTHORS for more details. :license: Apache 2.0, see LICENSE for more details. salt.grains.external_ip ~~~~~~~~~~~~~~~~~~~~~~~ Return the external IP address reported by boucha.saltstack.com '''...
<commit_before># -*- coding: utf-8 -*- ''' :codeauthor: David Boucha :copyright: © 2013 by the SaltStack Team, see AUTHORS for more details. :license: Apache 2.0, see LICENSE for more details. salt.grains.external_ip ~~~~~~~~~~~~~~~~~~~~~~~ Return the external IP address reported by boucha.sa...
7e47ce789c9eb363f941ead2b3b199152dffff1c
pushmanager/tests/test_bookmarklet.py
pushmanager/tests/test_bookmarklet.py
import contextlib import mock import testify as T from pushmanager.handlers import CheckSitesBookmarkletHandler from pushmanager.handlers import CreateRequestBookmarkletHandler from pushmanager.testing.testservlet import AsyncTestCase class BookmarkletTest(T.TestCase, AsyncTestCase): def get_handlers(self): ...
import contextlib import mock import testify as T from pushmanager.handlers import CheckSitesBookmarkletHandler from pushmanager.handlers import CreateRequestBookmarkletHandler from pushmanager.testing.testservlet import AsyncTestCase class BookmarkletTest(T.TestCase, AsyncTestCase): def get_handlers(self): ...
Test added for the ticket tracker url.
Test added for the ticket tracker url. The automatic test now checks also the ticket tracker url (just tests that the javascript contains the word %TICKET%).
Python
apache-2.0
Yelp/pushmanager,YelpArchive/pushmanager,Yelp/pushmanager,Yelp/pushmanager,YelpArchive/pushmanager,YelpArchive/pushmanager,YelpArchive/pushmanager,Yelp/pushmanager
import contextlib import mock import testify as T from pushmanager.handlers import CheckSitesBookmarkletHandler from pushmanager.handlers import CreateRequestBookmarkletHandler from pushmanager.testing.testservlet import AsyncTestCase class BookmarkletTest(T.TestCase, AsyncTestCase): def get_handlers(self): ...
import contextlib import mock import testify as T from pushmanager.handlers import CheckSitesBookmarkletHandler from pushmanager.handlers import CreateRequestBookmarkletHandler from pushmanager.testing.testservlet import AsyncTestCase class BookmarkletTest(T.TestCase, AsyncTestCase): def get_handlers(self): ...
<commit_before>import contextlib import mock import testify as T from pushmanager.handlers import CheckSitesBookmarkletHandler from pushmanager.handlers import CreateRequestBookmarkletHandler from pushmanager.testing.testservlet import AsyncTestCase class BookmarkletTest(T.TestCase, AsyncTestCase): def get_hand...
import contextlib import mock import testify as T from pushmanager.handlers import CheckSitesBookmarkletHandler from pushmanager.handlers import CreateRequestBookmarkletHandler from pushmanager.testing.testservlet import AsyncTestCase class BookmarkletTest(T.TestCase, AsyncTestCase): def get_handlers(self): ...
import contextlib import mock import testify as T from pushmanager.handlers import CheckSitesBookmarkletHandler from pushmanager.handlers import CreateRequestBookmarkletHandler from pushmanager.testing.testservlet import AsyncTestCase class BookmarkletTest(T.TestCase, AsyncTestCase): def get_handlers(self): ...
<commit_before>import contextlib import mock import testify as T from pushmanager.handlers import CheckSitesBookmarkletHandler from pushmanager.handlers import CreateRequestBookmarkletHandler from pushmanager.testing.testservlet import AsyncTestCase class BookmarkletTest(T.TestCase, AsyncTestCase): def get_hand...
e5bec10f3788e435af63970158e35cb3f2ad4f2a
simple_faq/views.py
simple_faq/views.py
from django.views.generic import TemplateView from simple_faq.models import Topic class Topics(TemplateView): template_name = "topics.html" context_object_name = "topics" model = Topic
from django.views.generic import ListView from simple_faq.models import Topic class Topics(ListView): template_name = "topics.html" context_object_name = "topics" model = Topic
Fix father class of topics view
Fix father class of topics view @15m
Python
mit
devartis/django-simple-faq,devartis/django-simple-faq
from django.views.generic import TemplateView from simple_faq.models import Topic class Topics(TemplateView): template_name = "topics.html" context_object_name = "topics" model = TopicFix father class of topics view @15m
from django.views.generic import ListView from simple_faq.models import Topic class Topics(ListView): template_name = "topics.html" context_object_name = "topics" model = Topic
<commit_before>from django.views.generic import TemplateView from simple_faq.models import Topic class Topics(TemplateView): template_name = "topics.html" context_object_name = "topics" model = Topic<commit_msg>Fix father class of topics view @15m<commit_after>
from django.views.generic import ListView from simple_faq.models import Topic class Topics(ListView): template_name = "topics.html" context_object_name = "topics" model = Topic
from django.views.generic import TemplateView from simple_faq.models import Topic class Topics(TemplateView): template_name = "topics.html" context_object_name = "topics" model = TopicFix father class of topics view @15mfrom django.views.generic import ListView from simple_faq.models import Topic class...
<commit_before>from django.views.generic import TemplateView from simple_faq.models import Topic class Topics(TemplateView): template_name = "topics.html" context_object_name = "topics" model = Topic<commit_msg>Fix father class of topics view @15m<commit_after>from django.views.generic import ListView fr...
3fcdb9e64ef955fd0a7e5b2fda481d351dfb4d18
spotify/__init__.py
spotify/__init__.py
from __future__ import unicode_literals import os import weakref import cffi __version__ = '2.0.0a1' _header_file = os.path.join(os.path.dirname(__file__), 'api.processed.h') _header = open(_header_file).read() _header += '#define SPOTIFY_API_VERSION ...\n' ffi = cffi.FFI() ffi.cdef(_header) lib = ffi.verify('#in...
from __future__ import unicode_literals import logging import os import weakref import cffi __version__ = '2.0.0a1' # Log to nowhere by default. For details, see: # http://docs.python.org/2/howto/logging.html#library-config logging.getLogger('spotify').addHandler(logging.NullHandler()) _header_file = os.path.jo...
Add NullHandler to the 'spotify' logger
Add NullHandler to the 'spotify' logger
Python
apache-2.0
jodal/pyspotify,mopidy/pyspotify,kotamat/pyspotify,jodal/pyspotify,kotamat/pyspotify,felix1m/pyspotify,mopidy/pyspotify,kotamat/pyspotify,felix1m/pyspotify,felix1m/pyspotify,jodal/pyspotify
from __future__ import unicode_literals import os import weakref import cffi __version__ = '2.0.0a1' _header_file = os.path.join(os.path.dirname(__file__), 'api.processed.h') _header = open(_header_file).read() _header += '#define SPOTIFY_API_VERSION ...\n' ffi = cffi.FFI() ffi.cdef(_header) lib = ffi.verify('#in...
from __future__ import unicode_literals import logging import os import weakref import cffi __version__ = '2.0.0a1' # Log to nowhere by default. For details, see: # http://docs.python.org/2/howto/logging.html#library-config logging.getLogger('spotify').addHandler(logging.NullHandler()) _header_file = os.path.jo...
<commit_before>from __future__ import unicode_literals import os import weakref import cffi __version__ = '2.0.0a1' _header_file = os.path.join(os.path.dirname(__file__), 'api.processed.h') _header = open(_header_file).read() _header += '#define SPOTIFY_API_VERSION ...\n' ffi = cffi.FFI() ffi.cdef(_header) lib = ...
from __future__ import unicode_literals import logging import os import weakref import cffi __version__ = '2.0.0a1' # Log to nowhere by default. For details, see: # http://docs.python.org/2/howto/logging.html#library-config logging.getLogger('spotify').addHandler(logging.NullHandler()) _header_file = os.path.jo...
from __future__ import unicode_literals import os import weakref import cffi __version__ = '2.0.0a1' _header_file = os.path.join(os.path.dirname(__file__), 'api.processed.h') _header = open(_header_file).read() _header += '#define SPOTIFY_API_VERSION ...\n' ffi = cffi.FFI() ffi.cdef(_header) lib = ffi.verify('#in...
<commit_before>from __future__ import unicode_literals import os import weakref import cffi __version__ = '2.0.0a1' _header_file = os.path.join(os.path.dirname(__file__), 'api.processed.h') _header = open(_header_file).read() _header += '#define SPOTIFY_API_VERSION ...\n' ffi = cffi.FFI() ffi.cdef(_header) lib = ...
65655186f22f1cdc4699cfbddb8b11ccf3ad292a
apps/challenge/forms.py
apps/challenge/forms.py
from django import forms from django.contrib.admin import widgets # Smrtr from network.models import Network from challenge.models import Challenge # External from haystack.forms import SearchForm class ChallengeForm(forms.ModelForm): class Meta: model = Challenge ...
from django import forms from django.contrib.admin import widgets # Smrtr from network.models import Network from challenge.models import Challenge # External from haystack.forms import SearchForm class ChallengeForm(forms.ModelForm): class Meta: model = Challenge ...
Improve search ordering in challenges (+packages)
Improve search ordering in challenges (+packages)
Python
bsd-3-clause
mfitzp/smrtr,mfitzp/smrtr
from django import forms from django.contrib.admin import widgets # Smrtr from network.models import Network from challenge.models import Challenge # External from haystack.forms import SearchForm class ChallengeForm(forms.ModelForm): class Meta: model = Challenge ...
from django import forms from django.contrib.admin import widgets # Smrtr from network.models import Network from challenge.models import Challenge # External from haystack.forms import SearchForm class ChallengeForm(forms.ModelForm): class Meta: model = Challenge ...
<commit_before>from django import forms from django.contrib.admin import widgets # Smrtr from network.models import Network from challenge.models import Challenge # External from haystack.forms import SearchForm class ChallengeForm(forms.ModelForm): class Meta: mode...
from django import forms from django.contrib.admin import widgets # Smrtr from network.models import Network from challenge.models import Challenge # External from haystack.forms import SearchForm class ChallengeForm(forms.ModelForm): class Meta: model = Challenge ...
from django import forms from django.contrib.admin import widgets # Smrtr from network.models import Network from challenge.models import Challenge # External from haystack.forms import SearchForm class ChallengeForm(forms.ModelForm): class Meta: model = Challenge ...
<commit_before>from django import forms from django.contrib.admin import widgets # Smrtr from network.models import Network from challenge.models import Challenge # External from haystack.forms import SearchForm class ChallengeForm(forms.ModelForm): class Meta: mode...
95bd5b96fcbc62133aac4045a77ed7b7e7d342a5
pyhprof/__init__.py
pyhprof/__init__.py
from pyhprof import * from pyhprof import __doc__ from pyhprof import __all__
'''Library for parsing and analyzing Java hprof files ''' from .parsers import HProfParser, HeapDumpParser
Include parsers in top level module
Include parsers in top level module
Python
apache-2.0
matthagy/pyhprof
from pyhprof import * from pyhprof import __doc__ from pyhprof import __all__ Include parsers in top level module
'''Library for parsing and analyzing Java hprof files ''' from .parsers import HProfParser, HeapDumpParser
<commit_before>from pyhprof import * from pyhprof import __doc__ from pyhprof import __all__ <commit_msg>Include parsers in top level module<commit_after>
'''Library for parsing and analyzing Java hprof files ''' from .parsers import HProfParser, HeapDumpParser
from pyhprof import * from pyhprof import __doc__ from pyhprof import __all__ Include parsers in top level module'''Library for parsing and analyzing Java hprof files ''' from .parsers import HProfParser, HeapDumpParser
<commit_before>from pyhprof import * from pyhprof import __doc__ from pyhprof import __all__ <commit_msg>Include parsers in top level module<commit_after>'''Library for parsing and analyzing Java hprof files ''' from .parsers import HProfParser, HeapDumpParser
761ba162338b86bc16aa4b642cc51a297d5491d6
games/notifier.py
games/notifier.py
from games import models def get_unpublished_installers(count=10): return models.Installer.objects.filter(published=False).order_by('?')[:count] def get_unpublished_screenshots(count=10): return models.Screenshot.objects.filter(published=False).order_by('?')[:count] def get_unreviewed_game_submissions(cou...
from games import models DEFAULT_COUNT = 12 def get_unpublished_installers(count=DEFAULT_COUNT): return models.Installer.objects.filter(published=False).order_by('?')[:count] def get_unpublished_screenshots(count=DEFAULT_COUNT): return models.Screenshot.objects.filter(published=False).order_by('?')[:count]...
Set the default number of items to 12 because it fits more nicely on the email
Set the default number of items to 12 because it fits more nicely on the email
Python
agpl-3.0
lutris/website,Turupawn/website,lutris/website,lutris/website,Turupawn/website,Turupawn/website,Turupawn/website,lutris/website
from games import models def get_unpublished_installers(count=10): return models.Installer.objects.filter(published=False).order_by('?')[:count] def get_unpublished_screenshots(count=10): return models.Screenshot.objects.filter(published=False).order_by('?')[:count] def get_unreviewed_game_submissions(cou...
from games import models DEFAULT_COUNT = 12 def get_unpublished_installers(count=DEFAULT_COUNT): return models.Installer.objects.filter(published=False).order_by('?')[:count] def get_unpublished_screenshots(count=DEFAULT_COUNT): return models.Screenshot.objects.filter(published=False).order_by('?')[:count]...
<commit_before>from games import models def get_unpublished_installers(count=10): return models.Installer.objects.filter(published=False).order_by('?')[:count] def get_unpublished_screenshots(count=10): return models.Screenshot.objects.filter(published=False).order_by('?')[:count] def get_unreviewed_game_...
from games import models DEFAULT_COUNT = 12 def get_unpublished_installers(count=DEFAULT_COUNT): return models.Installer.objects.filter(published=False).order_by('?')[:count] def get_unpublished_screenshots(count=DEFAULT_COUNT): return models.Screenshot.objects.filter(published=False).order_by('?')[:count]...
from games import models def get_unpublished_installers(count=10): return models.Installer.objects.filter(published=False).order_by('?')[:count] def get_unpublished_screenshots(count=10): return models.Screenshot.objects.filter(published=False).order_by('?')[:count] def get_unreviewed_game_submissions(cou...
<commit_before>from games import models def get_unpublished_installers(count=10): return models.Installer.objects.filter(published=False).order_by('?')[:count] def get_unpublished_screenshots(count=10): return models.Screenshot.objects.filter(published=False).order_by('?')[:count] def get_unreviewed_game_...
1fc452c7b0a8c55eee40e496de4750045ef725a4
overspill/settings/local.py
overspill/settings/local.py
from __future__ import absolute_import from djcelery import setup_loader from .base import * DEBUG = True ALLOWED_HOSTS = ['*'] STATIC_URL = '/static/' CELERY_REDIRECT_STDOUTS = False CELERY_ALWAYS_EAGER = True CELERY_EAGER_PROPAGATES_EXCEPTIONS = True setup_loader()
from __future__ import absolute_import import os from djcelery import setup_loader from .base import * DEBUG = True ALLOWED_HOSTS = ['*'] STATIC_ROOT = os.getenv('STATIC_ROOT') MEDIA_ROOT = os.getenv('STATIC_ROOT') STATIC_URL = '/static/' CELERY_REDIRECT_STDOUTS = False CELERY_ALWAYS_EAGER = True CELERY_EAGER_PROPAGA...
Set MEDIA_ROOT and STATIC_ROOT settings
Set MEDIA_ROOT and STATIC_ROOT settings
Python
apache-2.0
iamsteadman/overspill,iamsteadman/overspill
from __future__ import absolute_import from djcelery import setup_loader from .base import * DEBUG = True ALLOWED_HOSTS = ['*'] STATIC_URL = '/static/' CELERY_REDIRECT_STDOUTS = False CELERY_ALWAYS_EAGER = True CELERY_EAGER_PROPAGATES_EXCEPTIONS = True setup_loader() Set MEDIA_ROOT and STATIC_ROOT settings
from __future__ import absolute_import import os from djcelery import setup_loader from .base import * DEBUG = True ALLOWED_HOSTS = ['*'] STATIC_ROOT = os.getenv('STATIC_ROOT') MEDIA_ROOT = os.getenv('STATIC_ROOT') STATIC_URL = '/static/' CELERY_REDIRECT_STDOUTS = False CELERY_ALWAYS_EAGER = True CELERY_EAGER_PROPAGA...
<commit_before>from __future__ import absolute_import from djcelery import setup_loader from .base import * DEBUG = True ALLOWED_HOSTS = ['*'] STATIC_URL = '/static/' CELERY_REDIRECT_STDOUTS = False CELERY_ALWAYS_EAGER = True CELERY_EAGER_PROPAGATES_EXCEPTIONS = True setup_loader() <commit_msg>Set MEDIA_ROOT and STA...
from __future__ import absolute_import import os from djcelery import setup_loader from .base import * DEBUG = True ALLOWED_HOSTS = ['*'] STATIC_ROOT = os.getenv('STATIC_ROOT') MEDIA_ROOT = os.getenv('STATIC_ROOT') STATIC_URL = '/static/' CELERY_REDIRECT_STDOUTS = False CELERY_ALWAYS_EAGER = True CELERY_EAGER_PROPAGA...
from __future__ import absolute_import from djcelery import setup_loader from .base import * DEBUG = True ALLOWED_HOSTS = ['*'] STATIC_URL = '/static/' CELERY_REDIRECT_STDOUTS = False CELERY_ALWAYS_EAGER = True CELERY_EAGER_PROPAGATES_EXCEPTIONS = True setup_loader() Set MEDIA_ROOT and STATIC_ROOT settingsfrom __fut...
<commit_before>from __future__ import absolute_import from djcelery import setup_loader from .base import * DEBUG = True ALLOWED_HOSTS = ['*'] STATIC_URL = '/static/' CELERY_REDIRECT_STDOUTS = False CELERY_ALWAYS_EAGER = True CELERY_EAGER_PROPAGATES_EXCEPTIONS = True setup_loader() <commit_msg>Set MEDIA_ROOT and STA...
1d6ddc15fd6b195f3331e8c4022f0760da0fe9ef
cibopath/cli.py
cibopath/cli.py
# -*- coding: utf-8 -*- import click from cibopath import __version__ @click.group() @click.version_option(__version__, u'-V', u'--version', prog_name='Cibopath') def cli(): """Cibopath - Search Cookiecutters on GitHub.""" @cli.command('update') def update_cmd(): print('update') main = cli
# -*- coding: utf-8 -*- import click from cibopath import __version__ @click.group() @click.version_option(__version__, u'-V', u'--version', prog_name='Cibopath') def cli(): """Cibopath - Search Cookiecutters on GitHub.""" @cli.command('update') def update_cmd(): print('update') main = cli
Remove unwanted whitespace from doc str
Remove unwanted whitespace from doc str
Python
bsd-3-clause
hackebrot/cibopath
# -*- coding: utf-8 -*- import click from cibopath import __version__ @click.group() @click.version_option(__version__, u'-V', u'--version', prog_name='Cibopath') def cli(): """Cibopath - Search Cookiecutters on GitHub.""" @cli.command('update') def update_cmd(): print('update') main = cli Remove unwant...
# -*- coding: utf-8 -*- import click from cibopath import __version__ @click.group() @click.version_option(__version__, u'-V', u'--version', prog_name='Cibopath') def cli(): """Cibopath - Search Cookiecutters on GitHub.""" @cli.command('update') def update_cmd(): print('update') main = cli
<commit_before># -*- coding: utf-8 -*- import click from cibopath import __version__ @click.group() @click.version_option(__version__, u'-V', u'--version', prog_name='Cibopath') def cli(): """Cibopath - Search Cookiecutters on GitHub.""" @cli.command('update') def update_cmd(): print('update') main = cl...
# -*- coding: utf-8 -*- import click from cibopath import __version__ @click.group() @click.version_option(__version__, u'-V', u'--version', prog_name='Cibopath') def cli(): """Cibopath - Search Cookiecutters on GitHub.""" @cli.command('update') def update_cmd(): print('update') main = cli
# -*- coding: utf-8 -*- import click from cibopath import __version__ @click.group() @click.version_option(__version__, u'-V', u'--version', prog_name='Cibopath') def cli(): """Cibopath - Search Cookiecutters on GitHub.""" @cli.command('update') def update_cmd(): print('update') main = cli Remove unwant...
<commit_before># -*- coding: utf-8 -*- import click from cibopath import __version__ @click.group() @click.version_option(__version__, u'-V', u'--version', prog_name='Cibopath') def cli(): """Cibopath - Search Cookiecutters on GitHub.""" @cli.command('update') def update_cmd(): print('update') main = cl...
0825919e14ae34abbafaf982533c6936a9958bc4
shopify_python/__init__.py
shopify_python/__init__.py
# Copyright (c) 2017 "Shopify inc." All rights reserved. # Use of this source code is governed by a MIT-style license that can be found in the LICENSE file. from __future__ import unicode_literals from pylint import lint from shopify_python import google_styleguide from shopify_python import shopify_styleguide __ver...
# Copyright (c) 2017 "Shopify inc." All rights reserved. # Use of this source code is governed by a MIT-style license that can be found in the LICENSE file. from __future__ import unicode_literals from pylint import lint from shopify_python import google_styleguide from shopify_python import shopify_styleguide __ver...
Increase version number to 0.4.1
Increase version number to 0.4.1
Python
mit
Shopify/shopify_python
# Copyright (c) 2017 "Shopify inc." All rights reserved. # Use of this source code is governed by a MIT-style license that can be found in the LICENSE file. from __future__ import unicode_literals from pylint import lint from shopify_python import google_styleguide from shopify_python import shopify_styleguide __ver...
# Copyright (c) 2017 "Shopify inc." All rights reserved. # Use of this source code is governed by a MIT-style license that can be found in the LICENSE file. from __future__ import unicode_literals from pylint import lint from shopify_python import google_styleguide from shopify_python import shopify_styleguide __ver...
<commit_before># Copyright (c) 2017 "Shopify inc." All rights reserved. # Use of this source code is governed by a MIT-style license that can be found in the LICENSE file. from __future__ import unicode_literals from pylint import lint from shopify_python import google_styleguide from shopify_python import shopify_sty...
# Copyright (c) 2017 "Shopify inc." All rights reserved. # Use of this source code is governed by a MIT-style license that can be found in the LICENSE file. from __future__ import unicode_literals from pylint import lint from shopify_python import google_styleguide from shopify_python import shopify_styleguide __ver...
# Copyright (c) 2017 "Shopify inc." All rights reserved. # Use of this source code is governed by a MIT-style license that can be found in the LICENSE file. from __future__ import unicode_literals from pylint import lint from shopify_python import google_styleguide from shopify_python import shopify_styleguide __ver...
<commit_before># Copyright (c) 2017 "Shopify inc." All rights reserved. # Use of this source code is governed by a MIT-style license that can be found in the LICENSE file. from __future__ import unicode_literals from pylint import lint from shopify_python import google_styleguide from shopify_python import shopify_sty...
efb14d75d04d0200b37af1c4c3bb50b61f0b2a7e
km3pipe/__init__.py
km3pipe/__init__.py
# coding=utf-8 # Filename: __init__.py """ The extemporary KM3NeT analysis framework. """ from __future__ import division, absolute_import, print_function try: __KM3PIPE_SETUP__ except NameError: __KM3PIPE_SETUP__ = False from .__version__ import version, version_info # noqa if not __KM3PIPE_SETUP__: ...
# coding=utf-8 # Filename: __init__.py """ The extemporary KM3NeT analysis framework. """ from __future__ import division, absolute_import, print_function try: __KM3PIPE_SETUP__ except NameError: __KM3PIPE_SETUP__ = False from .__version__ import version, version_info # noqa if not __KM3PIPE_SETUP__: ...
FIX also drop genericpump/h5pump from init
FIX also drop genericpump/h5pump from init
Python
mit
tamasgal/km3pipe,tamasgal/km3pipe
# coding=utf-8 # Filename: __init__.py """ The extemporary KM3NeT analysis framework. """ from __future__ import division, absolute_import, print_function try: __KM3PIPE_SETUP__ except NameError: __KM3PIPE_SETUP__ = False from .__version__ import version, version_info # noqa if not __KM3PIPE_SETUP__: ...
# coding=utf-8 # Filename: __init__.py """ The extemporary KM3NeT analysis framework. """ from __future__ import division, absolute_import, print_function try: __KM3PIPE_SETUP__ except NameError: __KM3PIPE_SETUP__ = False from .__version__ import version, version_info # noqa if not __KM3PIPE_SETUP__: ...
<commit_before># coding=utf-8 # Filename: __init__.py """ The extemporary KM3NeT analysis framework. """ from __future__ import division, absolute_import, print_function try: __KM3PIPE_SETUP__ except NameError: __KM3PIPE_SETUP__ = False from .__version__ import version, version_info # noqa if not __KM3PIP...
# coding=utf-8 # Filename: __init__.py """ The extemporary KM3NeT analysis framework. """ from __future__ import division, absolute_import, print_function try: __KM3PIPE_SETUP__ except NameError: __KM3PIPE_SETUP__ = False from .__version__ import version, version_info # noqa if not __KM3PIPE_SETUP__: ...
# coding=utf-8 # Filename: __init__.py """ The extemporary KM3NeT analysis framework. """ from __future__ import division, absolute_import, print_function try: __KM3PIPE_SETUP__ except NameError: __KM3PIPE_SETUP__ = False from .__version__ import version, version_info # noqa if not __KM3PIPE_SETUP__: ...
<commit_before># coding=utf-8 # Filename: __init__.py """ The extemporary KM3NeT analysis framework. """ from __future__ import division, absolute_import, print_function try: __KM3PIPE_SETUP__ except NameError: __KM3PIPE_SETUP__ = False from .__version__ import version, version_info # noqa if not __KM3PIP...
46bcad1e20e57f66498e7a70b8f3be929115bde6
incunafein/module/page/extensions/prepared_date.py
incunafein/module/page/extensions/prepared_date.py
from django.db import models def get_prepared_date(cls): return cls.prepared_date or cls.parent.prepared_date def register(cls, admin_cls): cls.add_to_class('prepared_date', models.TextField('Date of Preparation', blank=True, null=True)) cls.add_to_class('get_prepared_date', get_prepared_date)
from django.db import models def register(cls, admin_cls): cls.add_to_class('_prepared_date', models.TextField('Date of Preparation', blank=True, null=True)) def getter(): if not cls._prepared_date: try: return cls.get_ancestors(ascending=True).filter(_prepared_date__isnull...
Return parent date if there isn't one on the current object
Return parent date if there isn't one on the current object Look for a prepared date in the ancestors of the current object and use that if it exists
Python
bsd-2-clause
incuna/incuna-feincms,incuna/incuna-feincms,incuna/incuna-feincms
from django.db import models def get_prepared_date(cls): return cls.prepared_date or cls.parent.prepared_date def register(cls, admin_cls): cls.add_to_class('prepared_date', models.TextField('Date of Preparation', blank=True, null=True)) cls.add_to_class('get_prepared_date', get_prepared_date) Return par...
from django.db import models def register(cls, admin_cls): cls.add_to_class('_prepared_date', models.TextField('Date of Preparation', blank=True, null=True)) def getter(): if not cls._prepared_date: try: return cls.get_ancestors(ascending=True).filter(_prepared_date__isnull...
<commit_before>from django.db import models def get_prepared_date(cls): return cls.prepared_date or cls.parent.prepared_date def register(cls, admin_cls): cls.add_to_class('prepared_date', models.TextField('Date of Preparation', blank=True, null=True)) cls.add_to_class('get_prepared_date', get_prepared_da...
from django.db import models def register(cls, admin_cls): cls.add_to_class('_prepared_date', models.TextField('Date of Preparation', blank=True, null=True)) def getter(): if not cls._prepared_date: try: return cls.get_ancestors(ascending=True).filter(_prepared_date__isnull...
from django.db import models def get_prepared_date(cls): return cls.prepared_date or cls.parent.prepared_date def register(cls, admin_cls): cls.add_to_class('prepared_date', models.TextField('Date of Preparation', blank=True, null=True)) cls.add_to_class('get_prepared_date', get_prepared_date) Return par...
<commit_before>from django.db import models def get_prepared_date(cls): return cls.prepared_date or cls.parent.prepared_date def register(cls, admin_cls): cls.add_to_class('prepared_date', models.TextField('Date of Preparation', blank=True, null=True)) cls.add_to_class('get_prepared_date', get_prepared_da...
83bf2da38eb67abab9005495289eb97b58c3856a
ec2_instance_change_type.py
ec2_instance_change_type.py
#!/usr/bin/env python import sys import click from aws_util import Ec2Util @click.command() @click.option('-p', '--profile', default='default', help='Profile name to use.') @click.argument('id_or_tag', required=True) @click.argument('new_instance_type', required=True) def cli(profile, id_or_tag, new_instance_type): ...
#!/usr/bin/env python import sys import click from aws_util import Ec2Util @click.command() @click.option('-p', '--profile', default='default', help='Profile name to use.') @click.argument('id_or_tag', required=True) @click.argument('new_instance_type', required=True) def cli(profile, id_or_tag, new_instance_type): ...
Change message that detects instance type
Change message that detects instance type
Python
mit
thinhpham/aws-tools
#!/usr/bin/env python import sys import click from aws_util import Ec2Util @click.command() @click.option('-p', '--profile', default='default', help='Profile name to use.') @click.argument('id_or_tag', required=True) @click.argument('new_instance_type', required=True) def cli(profile, id_or_tag, new_instance_type): ...
#!/usr/bin/env python import sys import click from aws_util import Ec2Util @click.command() @click.option('-p', '--profile', default='default', help='Profile name to use.') @click.argument('id_or_tag', required=True) @click.argument('new_instance_type', required=True) def cli(profile, id_or_tag, new_instance_type): ...
<commit_before>#!/usr/bin/env python import sys import click from aws_util import Ec2Util @click.command() @click.option('-p', '--profile', default='default', help='Profile name to use.') @click.argument('id_or_tag', required=True) @click.argument('new_instance_type', required=True) def cli(profile, id_or_tag, new_ins...
#!/usr/bin/env python import sys import click from aws_util import Ec2Util @click.command() @click.option('-p', '--profile', default='default', help='Profile name to use.') @click.argument('id_or_tag', required=True) @click.argument('new_instance_type', required=True) def cli(profile, id_or_tag, new_instance_type): ...
#!/usr/bin/env python import sys import click from aws_util import Ec2Util @click.command() @click.option('-p', '--profile', default='default', help='Profile name to use.') @click.argument('id_or_tag', required=True) @click.argument('new_instance_type', required=True) def cli(profile, id_or_tag, new_instance_type): ...
<commit_before>#!/usr/bin/env python import sys import click from aws_util import Ec2Util @click.command() @click.option('-p', '--profile', default='default', help='Profile name to use.') @click.argument('id_or_tag', required=True) @click.argument('new_instance_type', required=True) def cli(profile, id_or_tag, new_ins...
e867722e4369fca2df9a4e07218815c7611f35be
examples/timeflies/timeflies_tkinter.py
examples/timeflies/timeflies_tkinter.py
from tkinter import Tk, Label, Frame from rx import from_ from rx import operators as _ from rx.subjects import Subject from rx.concurrency import TkinterScheduler def main(): root = Tk() root.title("Rx for Python rocks") scheduler = TkinterScheduler(root) mousemove = Subject() frame = Frame(ro...
from tkinter import Tk, Label, Frame import rx from rx import operators as ops from rx.subjects import Subject from rx.concurrency import TkinterScheduler def main(): root = Tk() root.title("Rx for Python rocks") scheduler = TkinterScheduler(root) mousemove = Subject() frame = Frame(root, width...
Use ops instead of _
Use ops instead of _
Python
mit
ReactiveX/RxPY,ReactiveX/RxPY
from tkinter import Tk, Label, Frame from rx import from_ from rx import operators as _ from rx.subjects import Subject from rx.concurrency import TkinterScheduler def main(): root = Tk() root.title("Rx for Python rocks") scheduler = TkinterScheduler(root) mousemove = Subject() frame = Frame(ro...
from tkinter import Tk, Label, Frame import rx from rx import operators as ops from rx.subjects import Subject from rx.concurrency import TkinterScheduler def main(): root = Tk() root.title("Rx for Python rocks") scheduler = TkinterScheduler(root) mousemove = Subject() frame = Frame(root, width...
<commit_before>from tkinter import Tk, Label, Frame from rx import from_ from rx import operators as _ from rx.subjects import Subject from rx.concurrency import TkinterScheduler def main(): root = Tk() root.title("Rx for Python rocks") scheduler = TkinterScheduler(root) mousemove = Subject() f...
from tkinter import Tk, Label, Frame import rx from rx import operators as ops from rx.subjects import Subject from rx.concurrency import TkinterScheduler def main(): root = Tk() root.title("Rx for Python rocks") scheduler = TkinterScheduler(root) mousemove = Subject() frame = Frame(root, width...
from tkinter import Tk, Label, Frame from rx import from_ from rx import operators as _ from rx.subjects import Subject from rx.concurrency import TkinterScheduler def main(): root = Tk() root.title("Rx for Python rocks") scheduler = TkinterScheduler(root) mousemove = Subject() frame = Frame(ro...
<commit_before>from tkinter import Tk, Label, Frame from rx import from_ from rx import operators as _ from rx.subjects import Subject from rx.concurrency import TkinterScheduler def main(): root = Tk() root.title("Rx for Python rocks") scheduler = TkinterScheduler(root) mousemove = Subject() f...
2181d63c279965e4e694cae508a236f51d66d49b
data_structures/bitorrent/server/announce/torrent.py
data_structures/bitorrent/server/announce/torrent.py
import struct import socket import time from trackpy.vendors.redis import redis class Torrent(object): def __init__(self, info_hash): self.info = redis.hgetall(info_hash) self.info_hash = info_hash def can_announce(self, peer_id): timestamp = int(redis.get("%s_%s" % (self.info_hash, peer_id)) or 0) ...
import struct import socket import time from trackpy.vendors.redis import redis class Torrent(object): def __init__(self, info_hash): self.info = redis.hgetall(info_hash) self.info_hash = info_hash def can_announce(self, peer_id): timestamp = int(redis.get("%s_%s" % (self.info_hash, peer_id)) or 0) ...
Implement binary representation of peers
Implement binary representation of peers
Python
apache-2.0
vtemian/university_projects,vtemian/university_projects,vtemian/university_projects
import struct import socket import time from trackpy.vendors.redis import redis class Torrent(object): def __init__(self, info_hash): self.info = redis.hgetall(info_hash) self.info_hash = info_hash def can_announce(self, peer_id): timestamp = int(redis.get("%s_%s" % (self.info_hash, peer_id)) or 0) ...
import struct import socket import time from trackpy.vendors.redis import redis class Torrent(object): def __init__(self, info_hash): self.info = redis.hgetall(info_hash) self.info_hash = info_hash def can_announce(self, peer_id): timestamp = int(redis.get("%s_%s" % (self.info_hash, peer_id)) or 0) ...
<commit_before>import struct import socket import time from trackpy.vendors.redis import redis class Torrent(object): def __init__(self, info_hash): self.info = redis.hgetall(info_hash) self.info_hash = info_hash def can_announce(self, peer_id): timestamp = int(redis.get("%s_%s" % (self.info_hash, p...
import struct import socket import time from trackpy.vendors.redis import redis class Torrent(object): def __init__(self, info_hash): self.info = redis.hgetall(info_hash) self.info_hash = info_hash def can_announce(self, peer_id): timestamp = int(redis.get("%s_%s" % (self.info_hash, peer_id)) or 0) ...
import struct import socket import time from trackpy.vendors.redis import redis class Torrent(object): def __init__(self, info_hash): self.info = redis.hgetall(info_hash) self.info_hash = info_hash def can_announce(self, peer_id): timestamp = int(redis.get("%s_%s" % (self.info_hash, peer_id)) or 0) ...
<commit_before>import struct import socket import time from trackpy.vendors.redis import redis class Torrent(object): def __init__(self, info_hash): self.info = redis.hgetall(info_hash) self.info_hash = info_hash def can_announce(self, peer_id): timestamp = int(redis.get("%s_%s" % (self.info_hash, p...
f52c1f6b91bf9d1748d4254b33634394ec07df3f
markups/common.py
markups/common.py
# This file is part of python-markups module # License: BSD # Copyright: (C) Dmitry Shachnev, 2012-2017 import os.path # Some common constants and functions (LANGUAGE_HOME_PAGE, MODULE_HOME_PAGE, SYNTAX_DOCUMENTATION) = range(3) CONFIGURATION_DIR = (os.getenv('XDG_CONFIG_HOME') or os.getenv('APPDATA') or os.path.exp...
# This file is part of python-markups module # License: BSD # Copyright: (C) Dmitry Shachnev, 2012-2017 import os.path # Some common constants and functions (LANGUAGE_HOME_PAGE, MODULE_HOME_PAGE, SYNTAX_DOCUMENTATION) = range(3) CONFIGURATION_DIR = (os.getenv('XDG_CONFIG_HOME') or os.getenv('APPDATA') or os.path.exp...
Update MathJax URL to 2.7.4
Update MathJax URL to 2.7.4
Python
bsd-3-clause
mitya57/pymarkups,retext-project/pymarkups
# This file is part of python-markups module # License: BSD # Copyright: (C) Dmitry Shachnev, 2012-2017 import os.path # Some common constants and functions (LANGUAGE_HOME_PAGE, MODULE_HOME_PAGE, SYNTAX_DOCUMENTATION) = range(3) CONFIGURATION_DIR = (os.getenv('XDG_CONFIG_HOME') or os.getenv('APPDATA') or os.path.exp...
# This file is part of python-markups module # License: BSD # Copyright: (C) Dmitry Shachnev, 2012-2017 import os.path # Some common constants and functions (LANGUAGE_HOME_PAGE, MODULE_HOME_PAGE, SYNTAX_DOCUMENTATION) = range(3) CONFIGURATION_DIR = (os.getenv('XDG_CONFIG_HOME') or os.getenv('APPDATA') or os.path.exp...
<commit_before># This file is part of python-markups module # License: BSD # Copyright: (C) Dmitry Shachnev, 2012-2017 import os.path # Some common constants and functions (LANGUAGE_HOME_PAGE, MODULE_HOME_PAGE, SYNTAX_DOCUMENTATION) = range(3) CONFIGURATION_DIR = (os.getenv('XDG_CONFIG_HOME') or os.getenv('APPDATA') ...
# This file is part of python-markups module # License: BSD # Copyright: (C) Dmitry Shachnev, 2012-2017 import os.path # Some common constants and functions (LANGUAGE_HOME_PAGE, MODULE_HOME_PAGE, SYNTAX_DOCUMENTATION) = range(3) CONFIGURATION_DIR = (os.getenv('XDG_CONFIG_HOME') or os.getenv('APPDATA') or os.path.exp...
# This file is part of python-markups module # License: BSD # Copyright: (C) Dmitry Shachnev, 2012-2017 import os.path # Some common constants and functions (LANGUAGE_HOME_PAGE, MODULE_HOME_PAGE, SYNTAX_DOCUMENTATION) = range(3) CONFIGURATION_DIR = (os.getenv('XDG_CONFIG_HOME') or os.getenv('APPDATA') or os.path.exp...
<commit_before># This file is part of python-markups module # License: BSD # Copyright: (C) Dmitry Shachnev, 2012-2017 import os.path # Some common constants and functions (LANGUAGE_HOME_PAGE, MODULE_HOME_PAGE, SYNTAX_DOCUMENTATION) = range(3) CONFIGURATION_DIR = (os.getenv('XDG_CONFIG_HOME') or os.getenv('APPDATA') ...
be958ec64ec82b2687376058c90ce2465bfbc84a
twitter_explorer/__init__.py
twitter_explorer/__init__.py
from application import app, db, bcrypt, login_manager from utils import render_template, user_loader from twitter_explorer.handlers import login, index, config login_manager.login_view = 'login' login_manager.user_loader(user_loader) # Routes. app.add_url_rule('/login', 'login', login.login, methods=['GET', 'POST...
from application import app, db, bcrypt, login_manager from utils import render_template, user_loader from twitter_explorer.handlers import login, index, config login_manager.login_view = 'login' login_manager.user_loader(user_loader) # Routes. app.add_url_rule('/login', 'login', login.login, methods=['GET', 'POST...
Index endpoint now accepts POST
Index endpoint now accepts POST
Python
mit
ysenko/python-from-zero-to-hero,ysenko/python-from-zero-to-hero
from application import app, db, bcrypt, login_manager from utils import render_template, user_loader from twitter_explorer.handlers import login, index, config login_manager.login_view = 'login' login_manager.user_loader(user_loader) # Routes. app.add_url_rule('/login', 'login', login.login, methods=['GET', 'POST...
from application import app, db, bcrypt, login_manager from utils import render_template, user_loader from twitter_explorer.handlers import login, index, config login_manager.login_view = 'login' login_manager.user_loader(user_loader) # Routes. app.add_url_rule('/login', 'login', login.login, methods=['GET', 'POST...
<commit_before>from application import app, db, bcrypt, login_manager from utils import render_template, user_loader from twitter_explorer.handlers import login, index, config login_manager.login_view = 'login' login_manager.user_loader(user_loader) # Routes. app.add_url_rule('/login', 'login', login.login, method...
from application import app, db, bcrypt, login_manager from utils import render_template, user_loader from twitter_explorer.handlers import login, index, config login_manager.login_view = 'login' login_manager.user_loader(user_loader) # Routes. app.add_url_rule('/login', 'login', login.login, methods=['GET', 'POST...
from application import app, db, bcrypt, login_manager from utils import render_template, user_loader from twitter_explorer.handlers import login, index, config login_manager.login_view = 'login' login_manager.user_loader(user_loader) # Routes. app.add_url_rule('/login', 'login', login.login, methods=['GET', 'POST...
<commit_before>from application import app, db, bcrypt, login_manager from utils import render_template, user_loader from twitter_explorer.handlers import login, index, config login_manager.login_view = 'login' login_manager.user_loader(user_loader) # Routes. app.add_url_rule('/login', 'login', login.login, method...
8b3ad1ea09c1fd8f2d433e79497eb51d9f32f4c7
osversion.py
osversion.py
#!/usr/bin/env python3 # file: osversion.py # vim:fileencoding=utf-8:fdm=marker:ft=python # # Author: R.F. Smith <rsmith@xs4all.nl> # Created: 2018-04-06 22:34:00 +0200 # Last modified: 2018-07-06T22:54:44+0200 from ctypes import CDLL with open('/usr/include/osreldate.h') as h: lines = h.readlines() line = [ln fo...
#!/usr/bin/env python3 # file: osversion.py # vim:fileencoding=utf-8:fdm=marker:ft=python # # Author: R.F. Smith <rsmith@xs4all.nl> # Created: 2018-04-06 22:34:00 +0200 # Last modified: 2018-08-19T14:18:16+0200 """Print the __FreeBSD_version. This is also called OSVERSION in scripts.""" from ctypes import CDLL import ...
Print a warning and exit when not run on FreeBSD.
Print a warning and exit when not run on FreeBSD.
Python
mit
rsmith-nl/scripts,rsmith-nl/scripts
#!/usr/bin/env python3 # file: osversion.py # vim:fileencoding=utf-8:fdm=marker:ft=python # # Author: R.F. Smith <rsmith@xs4all.nl> # Created: 2018-04-06 22:34:00 +0200 # Last modified: 2018-07-06T22:54:44+0200 from ctypes import CDLL with open('/usr/include/osreldate.h') as h: lines = h.readlines() line = [ln fo...
#!/usr/bin/env python3 # file: osversion.py # vim:fileencoding=utf-8:fdm=marker:ft=python # # Author: R.F. Smith <rsmith@xs4all.nl> # Created: 2018-04-06 22:34:00 +0200 # Last modified: 2018-08-19T14:18:16+0200 """Print the __FreeBSD_version. This is also called OSVERSION in scripts.""" from ctypes import CDLL import ...
<commit_before>#!/usr/bin/env python3 # file: osversion.py # vim:fileencoding=utf-8:fdm=marker:ft=python # # Author: R.F. Smith <rsmith@xs4all.nl> # Created: 2018-04-06 22:34:00 +0200 # Last modified: 2018-07-06T22:54:44+0200 from ctypes import CDLL with open('/usr/include/osreldate.h') as h: lines = h.readlines(...
#!/usr/bin/env python3 # file: osversion.py # vim:fileencoding=utf-8:fdm=marker:ft=python # # Author: R.F. Smith <rsmith@xs4all.nl> # Created: 2018-04-06 22:34:00 +0200 # Last modified: 2018-08-19T14:18:16+0200 """Print the __FreeBSD_version. This is also called OSVERSION in scripts.""" from ctypes import CDLL import ...
#!/usr/bin/env python3 # file: osversion.py # vim:fileencoding=utf-8:fdm=marker:ft=python # # Author: R.F. Smith <rsmith@xs4all.nl> # Created: 2018-04-06 22:34:00 +0200 # Last modified: 2018-07-06T22:54:44+0200 from ctypes import CDLL with open('/usr/include/osreldate.h') as h: lines = h.readlines() line = [ln fo...
<commit_before>#!/usr/bin/env python3 # file: osversion.py # vim:fileencoding=utf-8:fdm=marker:ft=python # # Author: R.F. Smith <rsmith@xs4all.nl> # Created: 2018-04-06 22:34:00 +0200 # Last modified: 2018-07-06T22:54:44+0200 from ctypes import CDLL with open('/usr/include/osreldate.h') as h: lines = h.readlines(...
d17f14b693d770618de559bd71a277c3771ccc8e
src/events/views.py
src/events/views.py
from django.http import Http404 from django.views.generic import DetailView, ListView, RedirectView from proposals.models import TalkProposal from .models import SponsoredEvent class AcceptedTalkMixin: queryset = ( TalkProposal.objects .filter(accepted=True) .select_related('submitter') ...
from django.http import Http404 from django.views.generic import DetailView, ListView, RedirectView from proposals.models import TalkProposal from .models import SponsoredEvent class AcceptedTalkMixin: queryset = ( TalkProposal.objects .filter(accepted=True) .select_related('submitter') ...
Make sponsored event redirect permanent (HTTP 301)
Make sponsored event redirect permanent (HTTP 301)
Python
mit
pycontw/pycontw2016,pycontw/pycontw2016,pycontw/pycontw2016,pycontw/pycontw2016
from django.http import Http404 from django.views.generic import DetailView, ListView, RedirectView from proposals.models import TalkProposal from .models import SponsoredEvent class AcceptedTalkMixin: queryset = ( TalkProposal.objects .filter(accepted=True) .select_related('submitter') ...
from django.http import Http404 from django.views.generic import DetailView, ListView, RedirectView from proposals.models import TalkProposal from .models import SponsoredEvent class AcceptedTalkMixin: queryset = ( TalkProposal.objects .filter(accepted=True) .select_related('submitter') ...
<commit_before>from django.http import Http404 from django.views.generic import DetailView, ListView, RedirectView from proposals.models import TalkProposal from .models import SponsoredEvent class AcceptedTalkMixin: queryset = ( TalkProposal.objects .filter(accepted=True) .select_relate...
from django.http import Http404 from django.views.generic import DetailView, ListView, RedirectView from proposals.models import TalkProposal from .models import SponsoredEvent class AcceptedTalkMixin: queryset = ( TalkProposal.objects .filter(accepted=True) .select_related('submitter') ...
from django.http import Http404 from django.views.generic import DetailView, ListView, RedirectView from proposals.models import TalkProposal from .models import SponsoredEvent class AcceptedTalkMixin: queryset = ( TalkProposal.objects .filter(accepted=True) .select_related('submitter') ...
<commit_before>from django.http import Http404 from django.views.generic import DetailView, ListView, RedirectView from proposals.models import TalkProposal from .models import SponsoredEvent class AcceptedTalkMixin: queryset = ( TalkProposal.objects .filter(accepted=True) .select_relate...
8cbac87d73f361bd6d623cbe58d188dd9cc518ce
ext_pylib/input/__init__.py
ext_pylib/input/__init__.py
#!/usr/bin/env python # -*- coding: utf-8 -*- """ ext_pylib.input ~~~~~~~~~~~~~~~~ Functions for displaying and handling input on the terminal. """ from __future__ import absolute_import # Use Python 3 input if possible try: INPUT = input except NameError: INPUT = raw_input # pylint: disable=wrong-import-p...
#!/usr/bin/env python # -*- coding: utf-8 -*- """ ext_pylib.input ~~~~~~~~~~~~~~~~ Functions for displaying and handling input on the terminal. """ from __future__ import absolute_import # Use Python 2 input unless raw_input doesn't exist try: INPUT = raw_input except NameError: INPUT = input # pylint: dis...
Use raw_input [py2] first, then resort to input [py3].
BUGFIX: Use raw_input [py2] first, then resort to input [py3].
Python
mit
hbradleyiii/ext_pylib
#!/usr/bin/env python # -*- coding: utf-8 -*- """ ext_pylib.input ~~~~~~~~~~~~~~~~ Functions for displaying and handling input on the terminal. """ from __future__ import absolute_import # Use Python 3 input if possible try: INPUT = input except NameError: INPUT = raw_input # pylint: disable=wrong-import-p...
#!/usr/bin/env python # -*- coding: utf-8 -*- """ ext_pylib.input ~~~~~~~~~~~~~~~~ Functions for displaying and handling input on the terminal. """ from __future__ import absolute_import # Use Python 2 input unless raw_input doesn't exist try: INPUT = raw_input except NameError: INPUT = input # pylint: dis...
<commit_before>#!/usr/bin/env python # -*- coding: utf-8 -*- """ ext_pylib.input ~~~~~~~~~~~~~~~~ Functions for displaying and handling input on the terminal. """ from __future__ import absolute_import # Use Python 3 input if possible try: INPUT = input except NameError: INPUT = raw_input # pylint: disable...
#!/usr/bin/env python # -*- coding: utf-8 -*- """ ext_pylib.input ~~~~~~~~~~~~~~~~ Functions for displaying and handling input on the terminal. """ from __future__ import absolute_import # Use Python 2 input unless raw_input doesn't exist try: INPUT = raw_input except NameError: INPUT = input # pylint: dis...
#!/usr/bin/env python # -*- coding: utf-8 -*- """ ext_pylib.input ~~~~~~~~~~~~~~~~ Functions for displaying and handling input on the terminal. """ from __future__ import absolute_import # Use Python 3 input if possible try: INPUT = input except NameError: INPUT = raw_input # pylint: disable=wrong-import-p...
<commit_before>#!/usr/bin/env python # -*- coding: utf-8 -*- """ ext_pylib.input ~~~~~~~~~~~~~~~~ Functions for displaying and handling input on the terminal. """ from __future__ import absolute_import # Use Python 3 input if possible try: INPUT = input except NameError: INPUT = raw_input # pylint: disable...
99354752661828451732fdf317c5f2742a86733e
api/base/exceptions.py
api/base/exceptions.py
from rest_framework import status from rest_framework.exceptions import APIException def json_api_exception_handler(exc, context): """ Custom exception handler that returns errors object as an array """ # Import inside method to avoid errors when the OSF is loaded without Django from rest_framework.view...
from rest_framework import status from rest_framework.exceptions import APIException def json_api_exception_handler(exc, context): """ Custom exception handler that returns errors object as an array """ # Import inside method to avoid errors when the OSF is loaded without Django from rest_framework.view...
Change source to point to which part of the request caused the error, and add the specific reason to detail
Change source to point to which part of the request caused the error, and add the specific reason to detail
Python
apache-2.0
aaxelb/osf.io,brianjgeiger/osf.io,felliott/osf.io,chennan47/osf.io,mluo613/osf.io,crcresearch/osf.io,billyhunt/osf.io,asanfilippo7/osf.io,ticklemepierce/osf.io,kwierman/osf.io,samchrisinger/osf.io,brianjgeiger/osf.io,icereval/osf.io,RomanZWang/osf.io,Johnetordoff/osf.io,erinspace/osf.io,arpitar/osf.io,arpitar/osf.io,ab...
from rest_framework import status from rest_framework.exceptions import APIException def json_api_exception_handler(exc, context): """ Custom exception handler that returns errors object as an array """ # Import inside method to avoid errors when the OSF is loaded without Django from rest_framework.view...
from rest_framework import status from rest_framework.exceptions import APIException def json_api_exception_handler(exc, context): """ Custom exception handler that returns errors object as an array """ # Import inside method to avoid errors when the OSF is loaded without Django from rest_framework.view...
<commit_before> from rest_framework import status from rest_framework.exceptions import APIException def json_api_exception_handler(exc, context): """ Custom exception handler that returns errors object as an array """ # Import inside method to avoid errors when the OSF is loaded without Django from rest...
from rest_framework import status from rest_framework.exceptions import APIException def json_api_exception_handler(exc, context): """ Custom exception handler that returns errors object as an array """ # Import inside method to avoid errors when the OSF is loaded without Django from rest_framework.view...
from rest_framework import status from rest_framework.exceptions import APIException def json_api_exception_handler(exc, context): """ Custom exception handler that returns errors object as an array """ # Import inside method to avoid errors when the OSF is loaded without Django from rest_framework.view...
<commit_before> from rest_framework import status from rest_framework.exceptions import APIException def json_api_exception_handler(exc, context): """ Custom exception handler that returns errors object as an array """ # Import inside method to avoid errors when the OSF is loaded without Django from rest...
0667b4b1c8660feb2c1bdf09562fe51700db620b
app/models/__init__.py
app/models/__init__.py
# Copyright (C) 2014 Linaro Ltd. # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the Free Software Foundation, either version 3 of the # License, or (at your option) any later version. # # This program is distribute...
# Copyright (C) 2014 Linaro Ltd. # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the Free Software Foundation, either version 3 of the # License, or (at your option) any later version. # # This program is distribute...
Add new status (unknown), and necessary build files.
Add new status (unknown), and necessary build files.
Python
lgpl-2.1
kernelci/kernelci-backend,joyxu/kernelci-backend,joyxu/kernelci-backend,kernelci/kernelci-backend,joyxu/kernelci-backend
# Copyright (C) 2014 Linaro Ltd. # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the Free Software Foundation, either version 3 of the # License, or (at your option) any later version. # # This program is distribute...
# Copyright (C) 2014 Linaro Ltd. # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the Free Software Foundation, either version 3 of the # License, or (at your option) any later version. # # This program is distribute...
<commit_before># Copyright (C) 2014 Linaro Ltd. # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the Free Software Foundation, either version 3 of the # License, or (at your option) any later version. # # This progra...
# Copyright (C) 2014 Linaro Ltd. # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the Free Software Foundation, either version 3 of the # License, or (at your option) any later version. # # This program is distribute...
# Copyright (C) 2014 Linaro Ltd. # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the Free Software Foundation, either version 3 of the # License, or (at your option) any later version. # # This program is distribute...
<commit_before># Copyright (C) 2014 Linaro Ltd. # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the Free Software Foundation, either version 3 of the # License, or (at your option) any later version. # # This progra...
624ded5833e25d6a51671255fd32208ff947b22f
sconsole/manager.py
sconsole/manager.py
# Import third party libs import urwid # Import sconsole libs import sconsole.cmdbar import sconsole.static FOOTER = [ ('title', 'Salt Console'), ' ', ('key', 'UP'), ' ', ('key', 'DOWN'), ' '] class Manager(object): def __init__(self, opts): self.opts = opts self.cmdba...
# Import third party libs import urwid # Import sconsole libs import sconsole.cmdbar import sconsole.static FOOTER = [ ('title', 'Salt Console'), ' ', ('key', 'UP'), ' ', ('key', 'DOWN'), ' '] class Manager(object): def __init__(self, opts): self.opts = opts self.cmdba...
Fix refs to body of sconsole
Fix refs to body of sconsole
Python
apache-2.0
saltstack/salt-console
# Import third party libs import urwid # Import sconsole libs import sconsole.cmdbar import sconsole.static FOOTER = [ ('title', 'Salt Console'), ' ', ('key', 'UP'), ' ', ('key', 'DOWN'), ' '] class Manager(object): def __init__(self, opts): self.opts = opts self.cmdba...
# Import third party libs import urwid # Import sconsole libs import sconsole.cmdbar import sconsole.static FOOTER = [ ('title', 'Salt Console'), ' ', ('key', 'UP'), ' ', ('key', 'DOWN'), ' '] class Manager(object): def __init__(self, opts): self.opts = opts self.cmdba...
<commit_before># Import third party libs import urwid # Import sconsole libs import sconsole.cmdbar import sconsole.static FOOTER = [ ('title', 'Salt Console'), ' ', ('key', 'UP'), ' ', ('key', 'DOWN'), ' '] class Manager(object): def __init__(self, opts): self.opts = opts ...
# Import third party libs import urwid # Import sconsole libs import sconsole.cmdbar import sconsole.static FOOTER = [ ('title', 'Salt Console'), ' ', ('key', 'UP'), ' ', ('key', 'DOWN'), ' '] class Manager(object): def __init__(self, opts): self.opts = opts self.cmdba...
# Import third party libs import urwid # Import sconsole libs import sconsole.cmdbar import sconsole.static FOOTER = [ ('title', 'Salt Console'), ' ', ('key', 'UP'), ' ', ('key', 'DOWN'), ' '] class Manager(object): def __init__(self, opts): self.opts = opts self.cmdba...
<commit_before># Import third party libs import urwid # Import sconsole libs import sconsole.cmdbar import sconsole.static FOOTER = [ ('title', 'Salt Console'), ' ', ('key', 'UP'), ' ', ('key', 'DOWN'), ' '] class Manager(object): def __init__(self, opts): self.opts = opts ...
5b0e750c70759f79e6ea5dce051f1c29726ac71c
scoreboard/tests.py
scoreboard/tests.py
from django.test import TestCase from django.utils import timezone as tz from scoreboard.models import * class GameUnitTests(TestCase): @classmethod def setUpClass(cls): super(GameUnitTests, cls).setUpClass() cls.home_team = Team.objects.create(name='Home') cls.visiting_team = Team.ob...
from django.test import TestCase from django.utils import timezone as tz from scoreboard.models import * class GameUnitTests(TestCase): @classmethod def setUpClass(cls): super(GameUnitTests, cls).setUpClass() cls.home_team = Team.objects.create(name='Home') cls.visiting_team = Team.ob...
Fix failing test and add 2 more
Fix failing test and add 2 more
Python
mit
jspitzen/lacrosse_scoreboard,jspitzen/lacrosse_scoreboard
from django.test import TestCase from django.utils import timezone as tz from scoreboard.models import * class GameUnitTests(TestCase): @classmethod def setUpClass(cls): super(GameUnitTests, cls).setUpClass() cls.home_team = Team.objects.create(name='Home') cls.visiting_team = Team.ob...
from django.test import TestCase from django.utils import timezone as tz from scoreboard.models import * class GameUnitTests(TestCase): @classmethod def setUpClass(cls): super(GameUnitTests, cls).setUpClass() cls.home_team = Team.objects.create(name='Home') cls.visiting_team = Team.ob...
<commit_before>from django.test import TestCase from django.utils import timezone as tz from scoreboard.models import * class GameUnitTests(TestCase): @classmethod def setUpClass(cls): super(GameUnitTests, cls).setUpClass() cls.home_team = Team.objects.create(name='Home') cls.visiting...
from django.test import TestCase from django.utils import timezone as tz from scoreboard.models import * class GameUnitTests(TestCase): @classmethod def setUpClass(cls): super(GameUnitTests, cls).setUpClass() cls.home_team = Team.objects.create(name='Home') cls.visiting_team = Team.ob...
from django.test import TestCase from django.utils import timezone as tz from scoreboard.models import * class GameUnitTests(TestCase): @classmethod def setUpClass(cls): super(GameUnitTests, cls).setUpClass() cls.home_team = Team.objects.create(name='Home') cls.visiting_team = Team.ob...
<commit_before>from django.test import TestCase from django.utils import timezone as tz from scoreboard.models import * class GameUnitTests(TestCase): @classmethod def setUpClass(cls): super(GameUnitTests, cls).setUpClass() cls.home_team = Team.objects.create(name='Home') cls.visiting...
a72b75f67753985a4559d4675393042d9d363a02
media/sites/lapinkansa.py
media/sites/lapinkansa.py
import requests from bs4 import BeautifulSoup def nouda( url , out ): r = requests.get( url ) r.encoding = 'UTF-8' soup = BeautifulSoup( r.text ) teksti = soup.find_all( class_ ='Teksti' ) for string in teksti[0].stripped_strings: out.write( string.encode('utf8') + ' ' ) if __name__ == '__main__': ...
import requests from bs4 import BeautifulSoup def nouda( url , out ): r = requests.get( url ) r.encoding = 'UTF-8' soup = BeautifulSoup( r.text ) teksti = soup.find_all( class_ ='post-meta' ) for string in teksti[0].stripped_strings: out.write( string.encode('utf8') + ' ' ) if __name__ == '__main__'...
Fix to new page layout
Fix to new page layout
Python
mit
HIIT/digivaalit-2015,HIIT/digivaalit-2015,HIIT/digivaalit-2015
import requests from bs4 import BeautifulSoup def nouda( url , out ): r = requests.get( url ) r.encoding = 'UTF-8' soup = BeautifulSoup( r.text ) teksti = soup.find_all( class_ ='Teksti' ) for string in teksti[0].stripped_strings: out.write( string.encode('utf8') + ' ' ) if __name__ == '__main__': ...
import requests from bs4 import BeautifulSoup def nouda( url , out ): r = requests.get( url ) r.encoding = 'UTF-8' soup = BeautifulSoup( r.text ) teksti = soup.find_all( class_ ='post-meta' ) for string in teksti[0].stripped_strings: out.write( string.encode('utf8') + ' ' ) if __name__ == '__main__'...
<commit_before>import requests from bs4 import BeautifulSoup def nouda( url , out ): r = requests.get( url ) r.encoding = 'UTF-8' soup = BeautifulSoup( r.text ) teksti = soup.find_all( class_ ='Teksti' ) for string in teksti[0].stripped_strings: out.write( string.encode('utf8') + ' ' ) if __name__ =...
import requests from bs4 import BeautifulSoup def nouda( url , out ): r = requests.get( url ) r.encoding = 'UTF-8' soup = BeautifulSoup( r.text ) teksti = soup.find_all( class_ ='post-meta' ) for string in teksti[0].stripped_strings: out.write( string.encode('utf8') + ' ' ) if __name__ == '__main__'...
import requests from bs4 import BeautifulSoup def nouda( url , out ): r = requests.get( url ) r.encoding = 'UTF-8' soup = BeautifulSoup( r.text ) teksti = soup.find_all( class_ ='Teksti' ) for string in teksti[0].stripped_strings: out.write( string.encode('utf8') + ' ' ) if __name__ == '__main__': ...
<commit_before>import requests from bs4 import BeautifulSoup def nouda( url , out ): r = requests.get( url ) r.encoding = 'UTF-8' soup = BeautifulSoup( r.text ) teksti = soup.find_all( class_ ='Teksti' ) for string in teksti[0].stripped_strings: out.write( string.encode('utf8') + ' ' ) if __name__ =...
9387dfd4cc39fa6fbbf66147ced880dffa6408bd
keystone/server/flask/__init__.py
keystone/server/flask/__init__.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...
Make keystone.server.flask more interesting for importing
Make keystone.server.flask more interesting for importing Importing keystone.server.flask now exposes all the relevant bits from the sub modules to develop APIs without needing to understand all the underlying modules. __all__ has also be setup in a meaningful way to allow for `from keystone.server.flask import *` and...
Python
apache-2.0
openstack/keystone,openstack/keystone,mahak/keystone,openstack/keystone,mahak/keystone,mahak/keystone
# 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, ...
db374d1cc7188b4102ff727d5edfe458b6533584
markdown_for_squirrel/__init__.py
markdown_for_squirrel/__init__.py
import markdown def markdownify_content(context): for article in context["articles"]: article["content"] = markdown.markdown(article["content"]) return context def inject_middlewares(middlewares): middlewares.add("markdownify_content", markdownify_content) return middlewares
import markdown import helpers logger = helpers.get_logger(__name__) def markdownify_content(context): if context["is_called_from_cli"]: arg_parser = context["arg_parser"] args = arg_parser.parse_args() if args.action == "generate": for article in context["articles"]: ...
Fix markdown plugin so it's run only when needed
Fix markdown plugin so it's run only when needed
Python
mit
daGrevis/squirrel
import markdown def markdownify_content(context): for article in context["articles"]: article["content"] = markdown.markdown(article["content"]) return context def inject_middlewares(middlewares): middlewares.add("markdownify_content", markdownify_content) return middlewares Fix markdown pl...
import markdown import helpers logger = helpers.get_logger(__name__) def markdownify_content(context): if context["is_called_from_cli"]: arg_parser = context["arg_parser"] args = arg_parser.parse_args() if args.action == "generate": for article in context["articles"]: ...
<commit_before>import markdown def markdownify_content(context): for article in context["articles"]: article["content"] = markdown.markdown(article["content"]) return context def inject_middlewares(middlewares): middlewares.add("markdownify_content", markdownify_content) return middlewares ...
import markdown import helpers logger = helpers.get_logger(__name__) def markdownify_content(context): if context["is_called_from_cli"]: arg_parser = context["arg_parser"] args = arg_parser.parse_args() if args.action == "generate": for article in context["articles"]: ...
import markdown def markdownify_content(context): for article in context["articles"]: article["content"] = markdown.markdown(article["content"]) return context def inject_middlewares(middlewares): middlewares.add("markdownify_content", markdownify_content) return middlewares Fix markdown pl...
<commit_before>import markdown def markdownify_content(context): for article in context["articles"]: article["content"] = markdown.markdown(article["content"]) return context def inject_middlewares(middlewares): middlewares.add("markdownify_content", markdownify_content) return middlewares ...
0245952bacb6a2c7cd20fb7758d90301776c4ab4
armstrong/apps/embedded_video/models.py
armstrong/apps/embedded_video/models.py
from armstrong.apps.content.models import Content from armstrong.core.arm_content.mixins import AuthorsMixin from armstrong.core.arm_content.mixins import EmbeddedVideoMixin from armstrong.core.arm_content.fields import EmbeddedVideoField from django.contrib.sites.models import Site from django.db import models from ...
from armstrong.apps.content.models import Content from armstrong.core.arm_content.mixins import AuthorsMixin from armstrong.core.arm_content.mixins import EmbeddedVideoMixin from armstrong.core.arm_content.fields import EmbeddedVideoField from django.db import models from . import settings class EmbeddedVideoBase(C...
Remove sites from explicitly being defined (thanks @niran for pointing it out)
Remove sites from explicitly being defined (thanks @niran for pointing it out)
Python
apache-2.0
armstrong/armstrong.apps.embedded_video
from armstrong.apps.content.models import Content from armstrong.core.arm_content.mixins import AuthorsMixin from armstrong.core.arm_content.mixins import EmbeddedVideoMixin from armstrong.core.arm_content.fields import EmbeddedVideoField from django.contrib.sites.models import Site from django.db import models from ...
from armstrong.apps.content.models import Content from armstrong.core.arm_content.mixins import AuthorsMixin from armstrong.core.arm_content.mixins import EmbeddedVideoMixin from armstrong.core.arm_content.fields import EmbeddedVideoField from django.db import models from . import settings class EmbeddedVideoBase(C...
<commit_before>from armstrong.apps.content.models import Content from armstrong.core.arm_content.mixins import AuthorsMixin from armstrong.core.arm_content.mixins import EmbeddedVideoMixin from armstrong.core.arm_content.fields import EmbeddedVideoField from django.contrib.sites.models import Site from django.db impor...
from armstrong.apps.content.models import Content from armstrong.core.arm_content.mixins import AuthorsMixin from armstrong.core.arm_content.mixins import EmbeddedVideoMixin from armstrong.core.arm_content.fields import EmbeddedVideoField from django.db import models from . import settings class EmbeddedVideoBase(C...
from armstrong.apps.content.models import Content from armstrong.core.arm_content.mixins import AuthorsMixin from armstrong.core.arm_content.mixins import EmbeddedVideoMixin from armstrong.core.arm_content.fields import EmbeddedVideoField from django.contrib.sites.models import Site from django.db import models from ...
<commit_before>from armstrong.apps.content.models import Content from armstrong.core.arm_content.mixins import AuthorsMixin from armstrong.core.arm_content.mixins import EmbeddedVideoMixin from armstrong.core.arm_content.fields import EmbeddedVideoField from django.contrib.sites.models import Site from django.db impor...
31ea614e783273ef14919d1628a7ada11e8850fd
apps/users/adapters.py
apps/users/adapters.py
import re from allauth.account.adapter import DefaultAccountAdapter from django.conf import settings from apps.contrib.emails import Email from apps.users import USERNAME_INVALID_MESSAGE from apps.users import USERNAME_REGEX class UserAccountEmail(Email): def get_receivers(self): return [self.object] ...
import re from allauth.account.adapter import DefaultAccountAdapter from django.conf import settings from adhocracy4.emails.mixins import SyncEmailMixin from apps.contrib.emails import Email from apps.users import USERNAME_INVALID_MESSAGE from apps.users import USERNAME_REGEX class UserAccountEmail(Email, SyncEmail...
Use SyncEmailMixin for account mails
Use SyncEmailMixin for account mails
Python
agpl-3.0
liqd/a4-meinberlin,liqd/a4-meinberlin,liqd/a4-meinberlin,liqd/a4-meinberlin
import re from allauth.account.adapter import DefaultAccountAdapter from django.conf import settings from apps.contrib.emails import Email from apps.users import USERNAME_INVALID_MESSAGE from apps.users import USERNAME_REGEX class UserAccountEmail(Email): def get_receivers(self): return [self.object] ...
import re from allauth.account.adapter import DefaultAccountAdapter from django.conf import settings from adhocracy4.emails.mixins import SyncEmailMixin from apps.contrib.emails import Email from apps.users import USERNAME_INVALID_MESSAGE from apps.users import USERNAME_REGEX class UserAccountEmail(Email, SyncEmail...
<commit_before>import re from allauth.account.adapter import DefaultAccountAdapter from django.conf import settings from apps.contrib.emails import Email from apps.users import USERNAME_INVALID_MESSAGE from apps.users import USERNAME_REGEX class UserAccountEmail(Email): def get_receivers(self): return [...
import re from allauth.account.adapter import DefaultAccountAdapter from django.conf import settings from adhocracy4.emails.mixins import SyncEmailMixin from apps.contrib.emails import Email from apps.users import USERNAME_INVALID_MESSAGE from apps.users import USERNAME_REGEX class UserAccountEmail(Email, SyncEmail...
import re from allauth.account.adapter import DefaultAccountAdapter from django.conf import settings from apps.contrib.emails import Email from apps.users import USERNAME_INVALID_MESSAGE from apps.users import USERNAME_REGEX class UserAccountEmail(Email): def get_receivers(self): return [self.object] ...
<commit_before>import re from allauth.account.adapter import DefaultAccountAdapter from django.conf import settings from apps.contrib.emails import Email from apps.users import USERNAME_INVALID_MESSAGE from apps.users import USERNAME_REGEX class UserAccountEmail(Email): def get_receivers(self): return [...
f22476a36f2096628dc336f9adf0caa9a827dc11
jfr_playoff/db.py
jfr_playoff/db.py
import sys class PlayoffDB(object): db_cursor = None DATABASE_NOT_CONFIGURED_WARNING = 'WARNING: database not configured' def __init__(self, settings): reload(sys) sys.setdefaultencoding("latin1") import mysql.connector self.database = mysql.connector.connect( ...
import sys class PlayoffDB(object): db_cursor = None DATABASE_NOT_CONFIGURED_WARNING = 'WARNING: database not configured' def __init__(self, settings): reload(sys) sys.setdefaultencoding("latin1") import mysql.connector self.database = mysql.connector.connect( ...
Fix for rethrowing mysql.connector.Error as IOError
Fix for rethrowing mysql.connector.Error as IOError
Python
bsd-2-clause
emkael/jfrteamy-playoff,emkael/jfrteamy-playoff
import sys class PlayoffDB(object): db_cursor = None DATABASE_NOT_CONFIGURED_WARNING = 'WARNING: database not configured' def __init__(self, settings): reload(sys) sys.setdefaultencoding("latin1") import mysql.connector self.database = mysql.connector.connect( ...
import sys class PlayoffDB(object): db_cursor = None DATABASE_NOT_CONFIGURED_WARNING = 'WARNING: database not configured' def __init__(self, settings): reload(sys) sys.setdefaultencoding("latin1") import mysql.connector self.database = mysql.connector.connect( ...
<commit_before>import sys class PlayoffDB(object): db_cursor = None DATABASE_NOT_CONFIGURED_WARNING = 'WARNING: database not configured' def __init__(self, settings): reload(sys) sys.setdefaultencoding("latin1") import mysql.connector self.database = mysql.connector.connec...
import sys class PlayoffDB(object): db_cursor = None DATABASE_NOT_CONFIGURED_WARNING = 'WARNING: database not configured' def __init__(self, settings): reload(sys) sys.setdefaultencoding("latin1") import mysql.connector self.database = mysql.connector.connect( ...
import sys class PlayoffDB(object): db_cursor = None DATABASE_NOT_CONFIGURED_WARNING = 'WARNING: database not configured' def __init__(self, settings): reload(sys) sys.setdefaultencoding("latin1") import mysql.connector self.database = mysql.connector.connect( ...
<commit_before>import sys class PlayoffDB(object): db_cursor = None DATABASE_NOT_CONFIGURED_WARNING = 'WARNING: database not configured' def __init__(self, settings): reload(sys) sys.setdefaultencoding("latin1") import mysql.connector self.database = mysql.connector.connec...
4b719f5c1f5e2e8923ce9d0fca4ffe849bf9ea79
opps/article/urls.py
opps/article/urls.py
#!/usr/bin/env python # -*- coding: utf-8 -*- # from django.conf.urls.defaults import patterns, url from django.conf.urls import include from opps.article.views import OppsDetail urlpatterns = patterns('', url(r'^redactor/', include('redactor.urls')), url(r'^(?P<channel__slug_name>[0-9A-Za-z-_.//]+)...
#!/usr/bin/env python # -*- coding: utf-8 -*- # from django.conf.urls.defaults import patterns, url from django.conf.urls import include from opps.article.views import OppsDetail urlpatterns = patterns('', url(r'^redactor/', include('redactor.urls')), url(r'(?P<channel__slug_name>[0-9A-Za-z-_.//]+)/...
Fix article url open new
Fix article url open new
Python
mit
opps/opps,YACOWS/opps,opps/opps,williamroot/opps,opps/opps,YACOWS/opps,opps/opps,williamroot/opps,jeanmask/opps,YACOWS/opps,YACOWS/opps,williamroot/opps,jeanmask/opps,williamroot/opps,jeanmask/opps,jeanmask/opps
#!/usr/bin/env python # -*- coding: utf-8 -*- # from django.conf.urls.defaults import patterns, url from django.conf.urls import include from opps.article.views import OppsDetail urlpatterns = patterns('', url(r'^redactor/', include('redactor.urls')), url(r'^(?P<channel__slug_name>[0-9A-Za-z-_.//]+)...
#!/usr/bin/env python # -*- coding: utf-8 -*- # from django.conf.urls.defaults import patterns, url from django.conf.urls import include from opps.article.views import OppsDetail urlpatterns = patterns('', url(r'^redactor/', include('redactor.urls')), url(r'(?P<channel__slug_name>[0-9A-Za-z-_.//]+)/...
<commit_before>#!/usr/bin/env python # -*- coding: utf-8 -*- # from django.conf.urls.defaults import patterns, url from django.conf.urls import include from opps.article.views import OppsDetail urlpatterns = patterns('', url(r'^redactor/', include('redactor.urls')), url(r'^(?P<channel__slug_name>[0-...
#!/usr/bin/env python # -*- coding: utf-8 -*- # from django.conf.urls.defaults import patterns, url from django.conf.urls import include from opps.article.views import OppsDetail urlpatterns = patterns('', url(r'^redactor/', include('redactor.urls')), url(r'(?P<channel__slug_name>[0-9A-Za-z-_.//]+)/...
#!/usr/bin/env python # -*- coding: utf-8 -*- # from django.conf.urls.defaults import patterns, url from django.conf.urls import include from opps.article.views import OppsDetail urlpatterns = patterns('', url(r'^redactor/', include('redactor.urls')), url(r'^(?P<channel__slug_name>[0-9A-Za-z-_.//]+)...
<commit_before>#!/usr/bin/env python # -*- coding: utf-8 -*- # from django.conf.urls.defaults import patterns, url from django.conf.urls import include from opps.article.views import OppsDetail urlpatterns = patterns('', url(r'^redactor/', include('redactor.urls')), url(r'^(?P<channel__slug_name>[0-...
e3b0ccb529dca19bb3882f9caad82dbd965c9ae0
onnx/__init__.py
onnx/__init__.py
from __future__ import absolute_import from __future__ import division from __future__ import print_function from __future__ import unicode_literals from .onnx_pb2 import * import sys def load(obj): ''' Loads a binary protobuf that stores onnx graph @params Takes a file-like object (has to implement...
from __future__ import absolute_import from __future__ import division from __future__ import print_function from __future__ import unicode_literals from .onnx_pb2 import * import sys def load(obj): ''' Loads a binary protobuf that stores onnx graph @params Takes a file-like object (has "read" funct...
Fix string/file-like object detection in onnx.load
Fix string/file-like object detection in onnx.load
Python
apache-2.0
onnx/onnx,onnx/onnx,onnx/onnx,onnx/onnx
from __future__ import absolute_import from __future__ import division from __future__ import print_function from __future__ import unicode_literals from .onnx_pb2 import * import sys def load(obj): ''' Loads a binary protobuf that stores onnx graph @params Takes a file-like object (has to implement...
from __future__ import absolute_import from __future__ import division from __future__ import print_function from __future__ import unicode_literals from .onnx_pb2 import * import sys def load(obj): ''' Loads a binary protobuf that stores onnx graph @params Takes a file-like object (has "read" funct...
<commit_before>from __future__ import absolute_import from __future__ import division from __future__ import print_function from __future__ import unicode_literals from .onnx_pb2 import * import sys def load(obj): ''' Loads a binary protobuf that stores onnx graph @params Takes a file-like object (h...
from __future__ import absolute_import from __future__ import division from __future__ import print_function from __future__ import unicode_literals from .onnx_pb2 import * import sys def load(obj): ''' Loads a binary protobuf that stores onnx graph @params Takes a file-like object (has "read" funct...
from __future__ import absolute_import from __future__ import division from __future__ import print_function from __future__ import unicode_literals from .onnx_pb2 import * import sys def load(obj): ''' Loads a binary protobuf that stores onnx graph @params Takes a file-like object (has to implement...
<commit_before>from __future__ import absolute_import from __future__ import division from __future__ import print_function from __future__ import unicode_literals from .onnx_pb2 import * import sys def load(obj): ''' Loads a binary protobuf that stores onnx graph @params Takes a file-like object (h...
c22528df06e821936590431db5ba1a424e16f6a0
debug_toolbar/management/commands/debugsqlshell.py
debug_toolbar/management/commands/debugsqlshell.py
from datetime import datetime from django.db.backends import util import sqlparse from debug_toolbar.utils import ms_from_timedelta class PrintQueryWrapper(util.CursorDebugWrapper): def execute(self, sql, params=()): starttime = datetime.now() try: return self.cursor.execute(sql, pa...
from __future__ import print_function from datetime import datetime from django.db.backends import util import sqlparse from debug_toolbar.utils import ms_from_timedelta class PrintQueryWrapper(util.CursorDebugWrapper): def execute(self, sql, params=()): starttime = datetime.now() try: ...
Replace print statement by print function.
Replace print statement by print function.
Python
bsd-3-clause
seperman/django-debug-toolbar,guilhermetavares/django-debug-toolbar,stored/django-debug-toolbar,sidja/django-debug-toolbar,Endika/django-debug-toolbar,guilhermetavares/django-debug-toolbar,megcunningham/django-debug-toolbar,pevzi/django-debug-toolbar,peap/django-debug-toolbar,django-debug-toolbar/django-debug-toolbar,C...
from datetime import datetime from django.db.backends import util import sqlparse from debug_toolbar.utils import ms_from_timedelta class PrintQueryWrapper(util.CursorDebugWrapper): def execute(self, sql, params=()): starttime = datetime.now() try: return self.cursor.execute(sql, pa...
from __future__ import print_function from datetime import datetime from django.db.backends import util import sqlparse from debug_toolbar.utils import ms_from_timedelta class PrintQueryWrapper(util.CursorDebugWrapper): def execute(self, sql, params=()): starttime = datetime.now() try: ...
<commit_before>from datetime import datetime from django.db.backends import util import sqlparse from debug_toolbar.utils import ms_from_timedelta class PrintQueryWrapper(util.CursorDebugWrapper): def execute(self, sql, params=()): starttime = datetime.now() try: return self.cursor....
from __future__ import print_function from datetime import datetime from django.db.backends import util import sqlparse from debug_toolbar.utils import ms_from_timedelta class PrintQueryWrapper(util.CursorDebugWrapper): def execute(self, sql, params=()): starttime = datetime.now() try: ...
from datetime import datetime from django.db.backends import util import sqlparse from debug_toolbar.utils import ms_from_timedelta class PrintQueryWrapper(util.CursorDebugWrapper): def execute(self, sql, params=()): starttime = datetime.now() try: return self.cursor.execute(sql, pa...
<commit_before>from datetime import datetime from django.db.backends import util import sqlparse from debug_toolbar.utils import ms_from_timedelta class PrintQueryWrapper(util.CursorDebugWrapper): def execute(self, sql, params=()): starttime = datetime.now() try: return self.cursor....
371be140dfbecff72d72cda580cd299badc6bc15
aws_list_all/client.py
aws_list_all/client.py
import boto3 _CLIENTS = {} def get_regions_for_service(service, regions=()): """Given a service name, return a list of region names where this service can have resources, restricted by a possible set of regions.""" if service == "s3": return ['us-east-1'] # s3 ListBuckets is a global request, so...
import boto3 _CLIENTS = {} def get_regions_for_service(service, regions=()): """Given a service name, return a list of region names where this service can have resources, restricted by a possible set of regions.""" if service == "s3": return ['us-east-1'] # s3 ListBuckets is a global request, so...
Use us-east-1 to query route53
Use us-east-1 to query route53 Route53 is a global service so doesn't belong to a region, but the API endpoint is in us-east-1. This makes various listings now work, but not record sets. Updates #4.
Python
mit
JohannesEbke/aws_list_all
import boto3 _CLIENTS = {} def get_regions_for_service(service, regions=()): """Given a service name, return a list of region names where this service can have resources, restricted by a possible set of regions.""" if service == "s3": return ['us-east-1'] # s3 ListBuckets is a global request, so...
import boto3 _CLIENTS = {} def get_regions_for_service(service, regions=()): """Given a service name, return a list of region names where this service can have resources, restricted by a possible set of regions.""" if service == "s3": return ['us-east-1'] # s3 ListBuckets is a global request, so...
<commit_before>import boto3 _CLIENTS = {} def get_regions_for_service(service, regions=()): """Given a service name, return a list of region names where this service can have resources, restricted by a possible set of regions.""" if service == "s3": return ['us-east-1'] # s3 ListBuckets is a glo...
import boto3 _CLIENTS = {} def get_regions_for_service(service, regions=()): """Given a service name, return a list of region names where this service can have resources, restricted by a possible set of regions.""" if service == "s3": return ['us-east-1'] # s3 ListBuckets is a global request, so...
import boto3 _CLIENTS = {} def get_regions_for_service(service, regions=()): """Given a service name, return a list of region names where this service can have resources, restricted by a possible set of regions.""" if service == "s3": return ['us-east-1'] # s3 ListBuckets is a global request, so...
<commit_before>import boto3 _CLIENTS = {} def get_regions_for_service(service, regions=()): """Given a service name, return a list of region names where this service can have resources, restricted by a possible set of regions.""" if service == "s3": return ['us-east-1'] # s3 ListBuckets is a glo...
945aba9548b92f57fc25f9996bfa9c3811e64deb
server/resources.py
server/resources.py
from flask import request from flask_restful import Resource, Api, abort, reqparse from .models import db, Comment, Lecture api = Api() class CommentListResource(Resource): def get(self, lecture_id): db_lecture = Lecture.query.filter(Lecture.id == lecture_id).first() if not db_lecture: ...
from flask import request from flask_restful import Resource, Api, abort, reqparse from .models import db, Comment, Lecture api = Api() class CommentListResource(Resource): def get(self, lecture_id): db_lecture = Lecture.query.filter(Lecture.id == lecture_id).first() if not db_lecture: ...
Change single Lecture query to use first() in stead of all()
Change single Lecture query to use first() in stead of all()
Python
mit
MACSIFS/IFS,MACSIFS/IFS,MACSIFS/IFS,MACSIFS/IFS
from flask import request from flask_restful import Resource, Api, abort, reqparse from .models import db, Comment, Lecture api = Api() class CommentListResource(Resource): def get(self, lecture_id): db_lecture = Lecture.query.filter(Lecture.id == lecture_id).first() if not db_lecture: ...
from flask import request from flask_restful import Resource, Api, abort, reqparse from .models import db, Comment, Lecture api = Api() class CommentListResource(Resource): def get(self, lecture_id): db_lecture = Lecture.query.filter(Lecture.id == lecture_id).first() if not db_lecture: ...
<commit_before>from flask import request from flask_restful import Resource, Api, abort, reqparse from .models import db, Comment, Lecture api = Api() class CommentListResource(Resource): def get(self, lecture_id): db_lecture = Lecture.query.filter(Lecture.id == lecture_id).first() if not db_lec...
from flask import request from flask_restful import Resource, Api, abort, reqparse from .models import db, Comment, Lecture api = Api() class CommentListResource(Resource): def get(self, lecture_id): db_lecture = Lecture.query.filter(Lecture.id == lecture_id).first() if not db_lecture: ...
from flask import request from flask_restful import Resource, Api, abort, reqparse from .models import db, Comment, Lecture api = Api() class CommentListResource(Resource): def get(self, lecture_id): db_lecture = Lecture.query.filter(Lecture.id == lecture_id).first() if not db_lecture: ...
<commit_before>from flask import request from flask_restful import Resource, Api, abort, reqparse from .models import db, Comment, Lecture api = Api() class CommentListResource(Resource): def get(self, lecture_id): db_lecture = Lecture.query.filter(Lecture.id == lecture_id).first() if not db_lec...
8fb6f506bae11377ca3e3d040ce31d81eaa81d3e
localore/people/wagtail_hooks.py
localore/people/wagtail_hooks.py
from wagtailmodeladmin.options import ModelAdmin, wagtailmodeladmin_register from .models import Person class PeopleAdmin(ModelAdmin): model = Person menu_icon = 'group' menu_label = 'Team' menu_order = 300 list_display = ('full_name', 'production', 'role') list_filter = ('role', 'production')...
from django.utils.html import format_html from wagtailmodeladmin.options import ModelAdmin, wagtailmodeladmin_register from .models import Person class PeopleAdmin(ModelAdmin): model = Person menu_icon = 'group' menu_label = 'Team' menu_order = 300 list_display = ('profile_photo', 'full_name', '...
Add profile photos to list of people.
Add profile photos to list of people.
Python
mpl-2.0
ghostwords/localore,ghostwords/localore,ghostwords/localore
from wagtailmodeladmin.options import ModelAdmin, wagtailmodeladmin_register from .models import Person class PeopleAdmin(ModelAdmin): model = Person menu_icon = 'group' menu_label = 'Team' menu_order = 300 list_display = ('full_name', 'production', 'role') list_filter = ('role', 'production')...
from django.utils.html import format_html from wagtailmodeladmin.options import ModelAdmin, wagtailmodeladmin_register from .models import Person class PeopleAdmin(ModelAdmin): model = Person menu_icon = 'group' menu_label = 'Team' menu_order = 300 list_display = ('profile_photo', 'full_name', '...
<commit_before>from wagtailmodeladmin.options import ModelAdmin, wagtailmodeladmin_register from .models import Person class PeopleAdmin(ModelAdmin): model = Person menu_icon = 'group' menu_label = 'Team' menu_order = 300 list_display = ('full_name', 'production', 'role') list_filter = ('role'...
from django.utils.html import format_html from wagtailmodeladmin.options import ModelAdmin, wagtailmodeladmin_register from .models import Person class PeopleAdmin(ModelAdmin): model = Person menu_icon = 'group' menu_label = 'Team' menu_order = 300 list_display = ('profile_photo', 'full_name', '...
from wagtailmodeladmin.options import ModelAdmin, wagtailmodeladmin_register from .models import Person class PeopleAdmin(ModelAdmin): model = Person menu_icon = 'group' menu_label = 'Team' menu_order = 300 list_display = ('full_name', 'production', 'role') list_filter = ('role', 'production')...
<commit_before>from wagtailmodeladmin.options import ModelAdmin, wagtailmodeladmin_register from .models import Person class PeopleAdmin(ModelAdmin): model = Person menu_icon = 'group' menu_label = 'Team' menu_order = 300 list_display = ('full_name', 'production', 'role') list_filter = ('role'...
1492d79dc422cb37ddf2dd66558bd954a0e08bfb
download-records-s3.py
download-records-s3.py
#!/usr/bin/python import sys import gzip import datetime import tempfile import boto3 import logging logger = logging.getLogger() logger.setLevel(logging.INFO) ch = logging.StreamHandler(sys.stdout) formatter = logging.Formatter('[%(levelname)s] %(asctime)s - %(message)s') ch.setFormatter(formatter) logger.addHandler...
#!/usr/bin/python import sys import gzip import datetime import tempfile import boto3 import logging logger = logging.getLogger() logger.setLevel(logging.INFO) ch = logging.StreamHandler(sys.stdout) formatter = logging.Formatter('[%(levelname)s] %(asctime)s - %(message)s') ch.setFormatter(formatter) logger.addHandler...
Fix string format for week numbers < 10
Fix string format for week numbers < 10
Python
mit
gertvv/ictrp-retrieval,gertvv/ictrp-retrieval
#!/usr/bin/python import sys import gzip import datetime import tempfile import boto3 import logging logger = logging.getLogger() logger.setLevel(logging.INFO) ch = logging.StreamHandler(sys.stdout) formatter = logging.Formatter('[%(levelname)s] %(asctime)s - %(message)s') ch.setFormatter(formatter) logger.addHandler...
#!/usr/bin/python import sys import gzip import datetime import tempfile import boto3 import logging logger = logging.getLogger() logger.setLevel(logging.INFO) ch = logging.StreamHandler(sys.stdout) formatter = logging.Formatter('[%(levelname)s] %(asctime)s - %(message)s') ch.setFormatter(formatter) logger.addHandler...
<commit_before>#!/usr/bin/python import sys import gzip import datetime import tempfile import boto3 import logging logger = logging.getLogger() logger.setLevel(logging.INFO) ch = logging.StreamHandler(sys.stdout) formatter = logging.Formatter('[%(levelname)s] %(asctime)s - %(message)s') ch.setFormatter(formatter) lo...
#!/usr/bin/python import sys import gzip import datetime import tempfile import boto3 import logging logger = logging.getLogger() logger.setLevel(logging.INFO) ch = logging.StreamHandler(sys.stdout) formatter = logging.Formatter('[%(levelname)s] %(asctime)s - %(message)s') ch.setFormatter(formatter) logger.addHandler...
#!/usr/bin/python import sys import gzip import datetime import tempfile import boto3 import logging logger = logging.getLogger() logger.setLevel(logging.INFO) ch = logging.StreamHandler(sys.stdout) formatter = logging.Formatter('[%(levelname)s] %(asctime)s - %(message)s') ch.setFormatter(formatter) logger.addHandler...
<commit_before>#!/usr/bin/python import sys import gzip import datetime import tempfile import boto3 import logging logger = logging.getLogger() logger.setLevel(logging.INFO) ch = logging.StreamHandler(sys.stdout) formatter = logging.Formatter('[%(levelname)s] %(asctime)s - %(message)s') ch.setFormatter(formatter) lo...
116735d900b9ad92ae8ad265e5478f232e1474be
cartesius/colors.py
cartesius/colors.py
# -*- coding: utf-8 -*- """ Utility functions folr colors """ def get_color(color): """ Can convert from integer to (r, g, b) """ if not color: return None if isinstance(color, int): temp = color blue = temp % 256 temp = temp / 256 green = temp % 256 temp...
# -*- coding: utf-8 -*- """ Utility functions folr colors """ def get_color(color): """ Can convert from integer to (r, g, b) """ if not color: return None if isinstance(color, int): temp = color blue = temp % 256 temp = int(temp / 256) green = temp % 256 ...
Fix for integer division error:
Fix for integer division error: $ python3 create_images_and_readme.py Processing <function test_circles at 0x10cda6400> written: graph-0-0.png written: graph-0-1.png Processing <function test_piechart_1 at 0x10d1d4a60> written: graph-1-0.png written: graph-1-1.png Processing <function test_piechart_2 at 0x10d1ed1e0> w...
Python
apache-2.0
tkrajina/cartesius,tkrajina/cartesius
# -*- coding: utf-8 -*- """ Utility functions folr colors """ def get_color(color): """ Can convert from integer to (r, g, b) """ if not color: return None if isinstance(color, int): temp = color blue = temp % 256 temp = temp / 256 green = temp % 256 temp...
# -*- coding: utf-8 -*- """ Utility functions folr colors """ def get_color(color): """ Can convert from integer to (r, g, b) """ if not color: return None if isinstance(color, int): temp = color blue = temp % 256 temp = int(temp / 256) green = temp % 256 ...
<commit_before># -*- coding: utf-8 -*- """ Utility functions folr colors """ def get_color(color): """ Can convert from integer to (r, g, b) """ if not color: return None if isinstance(color, int): temp = color blue = temp % 256 temp = temp / 256 green = temp % 25...
# -*- coding: utf-8 -*- """ Utility functions folr colors """ def get_color(color): """ Can convert from integer to (r, g, b) """ if not color: return None if isinstance(color, int): temp = color blue = temp % 256 temp = int(temp / 256) green = temp % 256 ...
# -*- coding: utf-8 -*- """ Utility functions folr colors """ def get_color(color): """ Can convert from integer to (r, g, b) """ if not color: return None if isinstance(color, int): temp = color blue = temp % 256 temp = temp / 256 green = temp % 256 temp...
<commit_before># -*- coding: utf-8 -*- """ Utility functions folr colors """ def get_color(color): """ Can convert from integer to (r, g, b) """ if not color: return None if isinstance(color, int): temp = color blue = temp % 256 temp = temp / 256 green = temp % 25...
06d6f8d70d09214dbdcff2af2637deeb025cd22e
radar/radar/validation/family_histories.py
radar/radar/validation/family_histories.py
from radar.validation.groups import CohortGroupValidationMixin from radar.validation.core import Field, Validation from radar.validation.meta import MetaValidationMixin from radar.validation.patients import PatientValidationMixin from radar.validation.validators import required, none_if_blank, optional, max_length, in_...
from radar.validation.groups import CohortGroupValidationMixin from radar.validation.core import Field, Validation from radar.validation.meta import MetaValidationMixin from radar.validation.patients import PatientValidationMixin from radar.validation.validators import required, none_if_blank, optional, max_length, in_...
Clear relatives if no family history
Clear relatives if no family history
Python
agpl-3.0
renalreg/radar,renalreg/radar,renalreg/radar,renalreg/radar
from radar.validation.groups import CohortGroupValidationMixin from radar.validation.core import Field, Validation from radar.validation.meta import MetaValidationMixin from radar.validation.patients import PatientValidationMixin from radar.validation.validators import required, none_if_blank, optional, max_length, in_...
from radar.validation.groups import CohortGroupValidationMixin from radar.validation.core import Field, Validation from radar.validation.meta import MetaValidationMixin from radar.validation.patients import PatientValidationMixin from radar.validation.validators import required, none_if_blank, optional, max_length, in_...
<commit_before>from radar.validation.groups import CohortGroupValidationMixin from radar.validation.core import Field, Validation from radar.validation.meta import MetaValidationMixin from radar.validation.patients import PatientValidationMixin from radar.validation.validators import required, none_if_blank, optional, ...
from radar.validation.groups import CohortGroupValidationMixin from radar.validation.core import Field, Validation from radar.validation.meta import MetaValidationMixin from radar.validation.patients import PatientValidationMixin from radar.validation.validators import required, none_if_blank, optional, max_length, in_...
from radar.validation.groups import CohortGroupValidationMixin from radar.validation.core import Field, Validation from radar.validation.meta import MetaValidationMixin from radar.validation.patients import PatientValidationMixin from radar.validation.validators import required, none_if_blank, optional, max_length, in_...
<commit_before>from radar.validation.groups import CohortGroupValidationMixin from radar.validation.core import Field, Validation from radar.validation.meta import MetaValidationMixin from radar.validation.patients import PatientValidationMixin from radar.validation.validators import required, none_if_blank, optional, ...
e94b3ad6c393d6758d6bc5c5ca2b7e59febf710c
solidity/python/constants/PrintExpScalingFactors.py
solidity/python/constants/PrintExpScalingFactors.py
from common import exp MIN_PRECISION = 32 for n in [0.5,1.0,2.0,3.0]: print ' uint256 constant SCALED_EXP_{} = 0x{:x};'.format(n,int(exp(n)*(1<<MIN_PRECISION))).replace('.','P') print ' uint256 constant SCALED_VAL_{} = 0x{:x};'.format(n,int( (n)*(1<<MIN_PRECISION))).replace('.','P')
from math import exp MIN_PRECISION = 32 for n in [0.5,1.0,2.0,3.0]: print ' uint256 constant SCALED_EXP_{} = 0x{:x};'.format(n,int(exp(n)*(1<<MIN_PRECISION))).replace('.','P') print ' uint256 constant SCALED_VAL_{} = 0x{:x};'.format(n,int( (n)*(1<<MIN_PRECISION))).replace('.','P')
Revert previous commit on this specific file (mistake).
Revert previous commit on this specific file (mistake).
Python
apache-2.0
enjin/contracts
from common import exp MIN_PRECISION = 32 for n in [0.5,1.0,2.0,3.0]: print ' uint256 constant SCALED_EXP_{} = 0x{:x};'.format(n,int(exp(n)*(1<<MIN_PRECISION))).replace('.','P') print ' uint256 constant SCALED_VAL_{} = 0x{:x};'.format(n,int( (n)*(1<<MIN_PRECISION))).replace('.','P') Revert previous ...
from math import exp MIN_PRECISION = 32 for n in [0.5,1.0,2.0,3.0]: print ' uint256 constant SCALED_EXP_{} = 0x{:x};'.format(n,int(exp(n)*(1<<MIN_PRECISION))).replace('.','P') print ' uint256 constant SCALED_VAL_{} = 0x{:x};'.format(n,int( (n)*(1<<MIN_PRECISION))).replace('.','P')
<commit_before>from common import exp MIN_PRECISION = 32 for n in [0.5,1.0,2.0,3.0]: print ' uint256 constant SCALED_EXP_{} = 0x{:x};'.format(n,int(exp(n)*(1<<MIN_PRECISION))).replace('.','P') print ' uint256 constant SCALED_VAL_{} = 0x{:x};'.format(n,int( (n)*(1<<MIN_PRECISION))).replace('.','P') <...
from math import exp MIN_PRECISION = 32 for n in [0.5,1.0,2.0,3.0]: print ' uint256 constant SCALED_EXP_{} = 0x{:x};'.format(n,int(exp(n)*(1<<MIN_PRECISION))).replace('.','P') print ' uint256 constant SCALED_VAL_{} = 0x{:x};'.format(n,int( (n)*(1<<MIN_PRECISION))).replace('.','P')
from common import exp MIN_PRECISION = 32 for n in [0.5,1.0,2.0,3.0]: print ' uint256 constant SCALED_EXP_{} = 0x{:x};'.format(n,int(exp(n)*(1<<MIN_PRECISION))).replace('.','P') print ' uint256 constant SCALED_VAL_{} = 0x{:x};'.format(n,int( (n)*(1<<MIN_PRECISION))).replace('.','P') Revert previous ...
<commit_before>from common import exp MIN_PRECISION = 32 for n in [0.5,1.0,2.0,3.0]: print ' uint256 constant SCALED_EXP_{} = 0x{:x};'.format(n,int(exp(n)*(1<<MIN_PRECISION))).replace('.','P') print ' uint256 constant SCALED_VAL_{} = 0x{:x};'.format(n,int( (n)*(1<<MIN_PRECISION))).replace('.','P') <...
dbe5e67d2685083769e7d154926e6a1a234fa3c4
src/livestreamer/stream.py
src/livestreamer/stream.py
from livestreamer.utils import urlopen import pbs class StreamError(Exception): pass class Stream(object): def open(self): raise NotImplementedError class RTMPStream(Stream): def __init__(self, params): self.params = params or {} def open(self): try: rtmpdump = pb...
from livestreamer.utils import urlopen import os import pbs class StreamError(Exception): pass class Stream(object): def open(self): raise NotImplementedError class RTMPStream(Stream): def __init__(self, params): self.params = params or {} def open(self): try: rtm...
Fix rtmpdump locking up when stderr buffer is filled.
Fix rtmpdump locking up when stderr buffer is filled.
Python
bsd-2-clause
charmander/livestreamer,sbstp/streamlink,wolftankk/livestreamer,bastimeyer/streamlink,caorong/livestreamer,breunigs/livestreamer,lyhiving/livestreamer,breunigs/livestreamer,okaywit/livestreamer,derrod/livestreamer,fishscene/streamlink,back-to/streamlink,streamlink/streamlink,wlerin/streamlink,melmorabity/streamlink,sbs...
from livestreamer.utils import urlopen import pbs class StreamError(Exception): pass class Stream(object): def open(self): raise NotImplementedError class RTMPStream(Stream): def __init__(self, params): self.params = params or {} def open(self): try: rtmpdump = pb...
from livestreamer.utils import urlopen import os import pbs class StreamError(Exception): pass class Stream(object): def open(self): raise NotImplementedError class RTMPStream(Stream): def __init__(self, params): self.params = params or {} def open(self): try: rtm...
<commit_before>from livestreamer.utils import urlopen import pbs class StreamError(Exception): pass class Stream(object): def open(self): raise NotImplementedError class RTMPStream(Stream): def __init__(self, params): self.params = params or {} def open(self): try: ...
from livestreamer.utils import urlopen import os import pbs class StreamError(Exception): pass class Stream(object): def open(self): raise NotImplementedError class RTMPStream(Stream): def __init__(self, params): self.params = params or {} def open(self): try: rtm...
from livestreamer.utils import urlopen import pbs class StreamError(Exception): pass class Stream(object): def open(self): raise NotImplementedError class RTMPStream(Stream): def __init__(self, params): self.params = params or {} def open(self): try: rtmpdump = pb...
<commit_before>from livestreamer.utils import urlopen import pbs class StreamError(Exception): pass class Stream(object): def open(self): raise NotImplementedError class RTMPStream(Stream): def __init__(self, params): self.params = params or {} def open(self): try: ...
cf22defd6a705cab79bc24b82377e23b9d798dbf
nopassword/backends/base.py
nopassword/backends/base.py
# -*- coding: utf-8 -*- from datetime import datetime, timedelta from django.conf import settings from django.contrib.auth import get_user_model from django.contrib.auth.backends import ModelBackend from nopassword.models import LoginCode class NoPasswordBackend(ModelBackend): def authenticate(self, request, u...
# -*- coding: utf-8 -*- from datetime import timedelta from django.conf import settings from django.contrib.auth import get_user_model from django.contrib.auth.backends import ModelBackend from django.utils import timezone from nopassword.models import LoginCode class NoPasswordBackend(ModelBackend): def authe...
Use timezone.now() instead of datetime.now()
fix: Use timezone.now() instead of datetime.now()
Python
mit
relekang/django-nopassword,relekang/django-nopassword
# -*- coding: utf-8 -*- from datetime import datetime, timedelta from django.conf import settings from django.contrib.auth import get_user_model from django.contrib.auth.backends import ModelBackend from nopassword.models import LoginCode class NoPasswordBackend(ModelBackend): def authenticate(self, request, u...
# -*- coding: utf-8 -*- from datetime import timedelta from django.conf import settings from django.contrib.auth import get_user_model from django.contrib.auth.backends import ModelBackend from django.utils import timezone from nopassword.models import LoginCode class NoPasswordBackend(ModelBackend): def authe...
<commit_before># -*- coding: utf-8 -*- from datetime import datetime, timedelta from django.conf import settings from django.contrib.auth import get_user_model from django.contrib.auth.backends import ModelBackend from nopassword.models import LoginCode class NoPasswordBackend(ModelBackend): def authenticate(s...
# -*- coding: utf-8 -*- from datetime import timedelta from django.conf import settings from django.contrib.auth import get_user_model from django.contrib.auth.backends import ModelBackend from django.utils import timezone from nopassword.models import LoginCode class NoPasswordBackend(ModelBackend): def authe...
# -*- coding: utf-8 -*- from datetime import datetime, timedelta from django.conf import settings from django.contrib.auth import get_user_model from django.contrib.auth.backends import ModelBackend from nopassword.models import LoginCode class NoPasswordBackend(ModelBackend): def authenticate(self, request, u...
<commit_before># -*- coding: utf-8 -*- from datetime import datetime, timedelta from django.conf import settings from django.contrib.auth import get_user_model from django.contrib.auth.backends import ModelBackend from nopassword.models import LoginCode class NoPasswordBackend(ModelBackend): def authenticate(s...
a5befe542e857ec36717f7f8da53ff9f2c2af7e6
natasha/__init__.py
natasha/__init__.py
from copy import copy from collections import deque from yargy import FactParser from natasha.grammars import Person, Geo class Combinator(object): DEFAULT_GRAMMARS = [ Person, Geo, ] def __init__(self, grammars=None, cache_size=50000): self.grammars = grammars or self.DEFAULT_...
from copy import copy from collections import deque from yargy import FactParser from natasha.grammars import Person, Geo, Money, Date class Combinator(object): DEFAULT_GRAMMARS = [ Money, Person, Geo, Date, ] def __init__(self, grammars=None, cache_size=50000): ...
Add new grammars to Combinator.DEFAULT_GRAMMARS
Add new grammars to Combinator.DEFAULT_GRAMMARS
Python
mit
natasha/natasha
from copy import copy from collections import deque from yargy import FactParser from natasha.grammars import Person, Geo class Combinator(object): DEFAULT_GRAMMARS = [ Person, Geo, ] def __init__(self, grammars=None, cache_size=50000): self.grammars = grammars or self.DEFAULT_...
from copy import copy from collections import deque from yargy import FactParser from natasha.grammars import Person, Geo, Money, Date class Combinator(object): DEFAULT_GRAMMARS = [ Money, Person, Geo, Date, ] def __init__(self, grammars=None, cache_size=50000): ...
<commit_before>from copy import copy from collections import deque from yargy import FactParser from natasha.grammars import Person, Geo class Combinator(object): DEFAULT_GRAMMARS = [ Person, Geo, ] def __init__(self, grammars=None, cache_size=50000): self.grammars = grammars o...
from copy import copy from collections import deque from yargy import FactParser from natasha.grammars import Person, Geo, Money, Date class Combinator(object): DEFAULT_GRAMMARS = [ Money, Person, Geo, Date, ] def __init__(self, grammars=None, cache_size=50000): ...
from copy import copy from collections import deque from yargy import FactParser from natasha.grammars import Person, Geo class Combinator(object): DEFAULT_GRAMMARS = [ Person, Geo, ] def __init__(self, grammars=None, cache_size=50000): self.grammars = grammars or self.DEFAULT_...
<commit_before>from copy import copy from collections import deque from yargy import FactParser from natasha.grammars import Person, Geo class Combinator(object): DEFAULT_GRAMMARS = [ Person, Geo, ] def __init__(self, grammars=None, cache_size=50000): self.grammars = grammars o...
e382566a5a74a0eb2545456eb966cac569d5ebb4
pylatex/numpy.py
pylatex/numpy.py
# -*- coding: utf-8 -*- """ pylatex.numpy ~~~~~~~~~~~~~ This module implements the classes that deals with numpy objects. :copyright: (c) 2014 by Jelte Fennema. :license: MIT, see License for more details. """ import numpy as np from pylatex.base_classes import BaseLaTeXClass from pylatex.package...
# -*- coding: utf-8 -*- """ pylatex.numpy ~~~~~~~~~~~~~ This module implements the classes that deals with numpy objects. :copyright: (c) 2014 by Jelte Fennema. :license: MIT, see License for more details. """ import numpy as np from pylatex.base_classes import BaseLaTeXClass from pylatex.package...
Fix bug in VectorName, caused by new Command arguments
Fix bug in VectorName, caused by new Command arguments
Python
mit
JelteF/PyLaTeX,ovaskevich/PyLaTeX,bjodah/PyLaTeX,sebastianhaas/PyLaTeX,JelteF/PyLaTeX,votti/PyLaTeX,bjodah/PyLaTeX,jendas1/PyLaTeX,jendas1/PyLaTeX,sebastianhaas/PyLaTeX,votti/PyLaTeX,ovaskevich/PyLaTeX
# -*- coding: utf-8 -*- """ pylatex.numpy ~~~~~~~~~~~~~ This module implements the classes that deals with numpy objects. :copyright: (c) 2014 by Jelte Fennema. :license: MIT, see License for more details. """ import numpy as np from pylatex.base_classes import BaseLaTeXClass from pylatex.package...
# -*- coding: utf-8 -*- """ pylatex.numpy ~~~~~~~~~~~~~ This module implements the classes that deals with numpy objects. :copyright: (c) 2014 by Jelte Fennema. :license: MIT, see License for more details. """ import numpy as np from pylatex.base_classes import BaseLaTeXClass from pylatex.package...
<commit_before># -*- coding: utf-8 -*- """ pylatex.numpy ~~~~~~~~~~~~~ This module implements the classes that deals with numpy objects. :copyright: (c) 2014 by Jelte Fennema. :license: MIT, see License for more details. """ import numpy as np from pylatex.base_classes import BaseLaTeXClass from ...
# -*- coding: utf-8 -*- """ pylatex.numpy ~~~~~~~~~~~~~ This module implements the classes that deals with numpy objects. :copyright: (c) 2014 by Jelte Fennema. :license: MIT, see License for more details. """ import numpy as np from pylatex.base_classes import BaseLaTeXClass from pylatex.package...
# -*- coding: utf-8 -*- """ pylatex.numpy ~~~~~~~~~~~~~ This module implements the classes that deals with numpy objects. :copyright: (c) 2014 by Jelte Fennema. :license: MIT, see License for more details. """ import numpy as np from pylatex.base_classes import BaseLaTeXClass from pylatex.package...
<commit_before># -*- coding: utf-8 -*- """ pylatex.numpy ~~~~~~~~~~~~~ This module implements the classes that deals with numpy objects. :copyright: (c) 2014 by Jelte Fennema. :license: MIT, see License for more details. """ import numpy as np from pylatex.base_classes import BaseLaTeXClass from ...
95bac0b68e271d7ad5a4f8fa22c441d18a65390c
client/serial_datagrams.py
client/serial_datagrams.py
import struct from zlib import crc32 class CRCMismatchError(RuntimeError): """ Error raised when a datagram has an invalid CRC. """ pass class FrameError(RuntimeError): """ Error raised when a datagram is too short to be valid. """ END = b'\xC0' ESC = b'\xDB' ESC_END = b'\xDC' ESC_ESC = b...
import struct from zlib import crc32 class CRCMismatchError(RuntimeError): """ Error raised when a datagram has an invalid CRC. """ pass class FrameError(RuntimeError): """ Error raised when a datagram is too short to be valid. """ END = b'\xC0' ESC = b'\xDB' ESC_END = b'\xDC' ESC_ESC = b...
Correct crc32 behaviour for all python versions.
Correct crc32 behaviour for all python versions. This fixes signedness issue with crc32 from different python versions. Was suggested in the documentation: https://docs.python.org/3.4/library/zlib.html
Python
bsd-2-clause
cvra/can-bootloader,cvra/can-bootloader,cvra/can-bootloader,cvra/can-bootloader
import struct from zlib import crc32 class CRCMismatchError(RuntimeError): """ Error raised when a datagram has an invalid CRC. """ pass class FrameError(RuntimeError): """ Error raised when a datagram is too short to be valid. """ END = b'\xC0' ESC = b'\xDB' ESC_END = b'\xDC' ESC_ESC = b...
import struct from zlib import crc32 class CRCMismatchError(RuntimeError): """ Error raised when a datagram has an invalid CRC. """ pass class FrameError(RuntimeError): """ Error raised when a datagram is too short to be valid. """ END = b'\xC0' ESC = b'\xDB' ESC_END = b'\xDC' ESC_ESC = b...
<commit_before>import struct from zlib import crc32 class CRCMismatchError(RuntimeError): """ Error raised when a datagram has an invalid CRC. """ pass class FrameError(RuntimeError): """ Error raised when a datagram is too short to be valid. """ END = b'\xC0' ESC = b'\xDB' ESC_END = b'\x...
import struct from zlib import crc32 class CRCMismatchError(RuntimeError): """ Error raised when a datagram has an invalid CRC. """ pass class FrameError(RuntimeError): """ Error raised when a datagram is too short to be valid. """ END = b'\xC0' ESC = b'\xDB' ESC_END = b'\xDC' ESC_ESC = b...
import struct from zlib import crc32 class CRCMismatchError(RuntimeError): """ Error raised when a datagram has an invalid CRC. """ pass class FrameError(RuntimeError): """ Error raised when a datagram is too short to be valid. """ END = b'\xC0' ESC = b'\xDB' ESC_END = b'\xDC' ESC_ESC = b...
<commit_before>import struct from zlib import crc32 class CRCMismatchError(RuntimeError): """ Error raised when a datagram has an invalid CRC. """ pass class FrameError(RuntimeError): """ Error raised when a datagram is too short to be valid. """ END = b'\xC0' ESC = b'\xDB' ESC_END = b'\x...
31c0863d088488da5dd85e2cbe3c01c6b01aa4a2
system_tests/test_default.py
system_tests/test_default.py
# Copyright 2016 Google Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing,...
# Copyright 2016 Google Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing,...
Fix system tests when running on GCE
Fix system tests when running on GCE The new project ID logic for Cloud SDK invokes Cloud SDK directly. Cloud SDK helpfully falls back to the GCE project ID if the project ID is unset in the configuration. This breaks one of our previous expectations.
Python
apache-2.0
googleapis/google-auth-library-python,googleapis/google-auth-library-python
# Copyright 2016 Google Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing,...
# Copyright 2016 Google Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing,...
<commit_before># Copyright 2016 Google Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed...
# Copyright 2016 Google Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing,...
# Copyright 2016 Google Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing,...
<commit_before># Copyright 2016 Google Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed...
f042f6c9799d70edb41ae9495adf8bb78ed23e13
elections/ar_elections_2015/settings.py
elections/ar_elections_2015/settings.py
# -*- coding: utf-8 -*- ELECTION_RE = '(?P<election>diputados-argentina-paso-2015|gobernadores-argentina-paso-2015|senadores-argentina-paso-2015|presidentes-argentina-paso-2015)' MAPIT_BASE_URL = 'http://argentina.mapit.staging.mysociety.org/' SITE_OWNER = 'YoQuieroSaber' COPYRIGHT_HOLDER = 'YoQuieroSaber'
# -*- coding: utf-8 -*- ELECTION_RE = '(?P<election>diputados-argentina-paso-2015|gobernadores-argentina-paso-2015|senadores-argentina-paso-2015|presidentes-argentina-paso-2015|parlamentarios-mercosur-regional-paso-2015|parlamentarios-mercosur-unico-paso-2015)' MAPIT_BASE_URL = 'http://argentina.mapit.staging.mysociet...
Add some missing election slugs to Argentina's ELECTION_RE
AR: Add some missing election slugs to Argentina's ELECTION_RE
Python
agpl-3.0
mysociety/yournextmp-popit,DemocracyClub/yournextrepresentative,mysociety/yournextrepresentative,mysociety/yournextmp-popit,neavouli/yournextrepresentative,neavouli/yournextrepresentative,neavouli/yournextrepresentative,DemocracyClub/yournextrepresentative,mysociety/yournextmp-popit,datamade/yournextmp-popit,neavouli/y...
# -*- coding: utf-8 -*- ELECTION_RE = '(?P<election>diputados-argentina-paso-2015|gobernadores-argentina-paso-2015|senadores-argentina-paso-2015|presidentes-argentina-paso-2015)' MAPIT_BASE_URL = 'http://argentina.mapit.staging.mysociety.org/' SITE_OWNER = 'YoQuieroSaber' COPYRIGHT_HOLDER = 'YoQuieroSaber' AR: Add so...
# -*- coding: utf-8 -*- ELECTION_RE = '(?P<election>diputados-argentina-paso-2015|gobernadores-argentina-paso-2015|senadores-argentina-paso-2015|presidentes-argentina-paso-2015|parlamentarios-mercosur-regional-paso-2015|parlamentarios-mercosur-unico-paso-2015)' MAPIT_BASE_URL = 'http://argentina.mapit.staging.mysociet...
<commit_before># -*- coding: utf-8 -*- ELECTION_RE = '(?P<election>diputados-argentina-paso-2015|gobernadores-argentina-paso-2015|senadores-argentina-paso-2015|presidentes-argentina-paso-2015)' MAPIT_BASE_URL = 'http://argentina.mapit.staging.mysociety.org/' SITE_OWNER = 'YoQuieroSaber' COPYRIGHT_HOLDER = 'YoQuieroSa...
# -*- coding: utf-8 -*- ELECTION_RE = '(?P<election>diputados-argentina-paso-2015|gobernadores-argentina-paso-2015|senadores-argentina-paso-2015|presidentes-argentina-paso-2015|parlamentarios-mercosur-regional-paso-2015|parlamentarios-mercosur-unico-paso-2015)' MAPIT_BASE_URL = 'http://argentina.mapit.staging.mysociet...
# -*- coding: utf-8 -*- ELECTION_RE = '(?P<election>diputados-argentina-paso-2015|gobernadores-argentina-paso-2015|senadores-argentina-paso-2015|presidentes-argentina-paso-2015)' MAPIT_BASE_URL = 'http://argentina.mapit.staging.mysociety.org/' SITE_OWNER = 'YoQuieroSaber' COPYRIGHT_HOLDER = 'YoQuieroSaber' AR: Add so...
<commit_before># -*- coding: utf-8 -*- ELECTION_RE = '(?P<election>diputados-argentina-paso-2015|gobernadores-argentina-paso-2015|senadores-argentina-paso-2015|presidentes-argentina-paso-2015)' MAPIT_BASE_URL = 'http://argentina.mapit.staging.mysociety.org/' SITE_OWNER = 'YoQuieroSaber' COPYRIGHT_HOLDER = 'YoQuieroSa...
cf6c18925c05a6f009573c204631a09ed1957227
mama_cas/utils.py
mama_cas/utils.py
import urllib import urlparse def add_query_params(url, params): """ Inject additional query parameters into an existing URL. If existing parameters already exist with the same name, they will be overwritten. Return the modified URL as a string. """ # If any of the additional parameters h...
import urllib import urlparse def add_query_params(url, params): """ Inject additional query parameters into an existing URL. If parameters already exist with the same name, they will be overwritten. Return the modified URL as a string. """ # If any of the additional parameters have empty valu...
Tweak comment text for clarity
Tweak comment text for clarity
Python
bsd-3-clause
harlov/django-mama-cas,harlov/django-mama-cas,jbittel/django-mama-cas,orbitvu/django-mama-cas,jbittel/django-mama-cas,orbitvu/django-mama-cas,forcityplatform/django-mama-cas,forcityplatform/django-mama-cas
import urllib import urlparse def add_query_params(url, params): """ Inject additional query parameters into an existing URL. If existing parameters already exist with the same name, they will be overwritten. Return the modified URL as a string. """ # If any of the additional parameters h...
import urllib import urlparse def add_query_params(url, params): """ Inject additional query parameters into an existing URL. If parameters already exist with the same name, they will be overwritten. Return the modified URL as a string. """ # If any of the additional parameters have empty valu...
<commit_before>import urllib import urlparse def add_query_params(url, params): """ Inject additional query parameters into an existing URL. If existing parameters already exist with the same name, they will be overwritten. Return the modified URL as a string. """ # If any of the addition...
import urllib import urlparse def add_query_params(url, params): """ Inject additional query parameters into an existing URL. If parameters already exist with the same name, they will be overwritten. Return the modified URL as a string. """ # If any of the additional parameters have empty valu...
import urllib import urlparse def add_query_params(url, params): """ Inject additional query parameters into an existing URL. If existing parameters already exist with the same name, they will be overwritten. Return the modified URL as a string. """ # If any of the additional parameters h...
<commit_before>import urllib import urlparse def add_query_params(url, params): """ Inject additional query parameters into an existing URL. If existing parameters already exist with the same name, they will be overwritten. Return the modified URL as a string. """ # If any of the addition...
65504fbb13a61e36f1fe0ea9fcc790efdf7d8fd6
resolwe/__about__.py
resolwe/__about__.py
"""Central place for package metadata.""" # NOTE: We use __title__ instead of simply __name__ since the latter would # interfere with a global variable __name__ denoting object's name. __title__ = 'resolwe' __summary__ = 'Open source enterprise dataflow engine in Django' __url__ = 'https://github.com/genialis/re...
"""Central place for package metadata.""" # NOTE: We use __title__ instead of simply __name__ since the latter would # interfere with a global variable __name__ denoting object's name. __title__ = 'resolwe' __summary__ = 'Open source enterprise dataflow engine in Django' __url__ = 'https://github.com/genialis/re...
Change author in about file
Change author in about file
Python
apache-2.0
genialis/resolwe,jberci/resolwe,jberci/resolwe,genialis/resolwe
"""Central place for package metadata.""" # NOTE: We use __title__ instead of simply __name__ since the latter would # interfere with a global variable __name__ denoting object's name. __title__ = 'resolwe' __summary__ = 'Open source enterprise dataflow engine in Django' __url__ = 'https://github.com/genialis/re...
"""Central place for package metadata.""" # NOTE: We use __title__ instead of simply __name__ since the latter would # interfere with a global variable __name__ denoting object's name. __title__ = 'resolwe' __summary__ = 'Open source enterprise dataflow engine in Django' __url__ = 'https://github.com/genialis/re...
<commit_before>"""Central place for package metadata.""" # NOTE: We use __title__ instead of simply __name__ since the latter would # interfere with a global variable __name__ denoting object's name. __title__ = 'resolwe' __summary__ = 'Open source enterprise dataflow engine in Django' __url__ = 'https://github....
"""Central place for package metadata.""" # NOTE: We use __title__ instead of simply __name__ since the latter would # interfere with a global variable __name__ denoting object's name. __title__ = 'resolwe' __summary__ = 'Open source enterprise dataflow engine in Django' __url__ = 'https://github.com/genialis/re...
"""Central place for package metadata.""" # NOTE: We use __title__ instead of simply __name__ since the latter would # interfere with a global variable __name__ denoting object's name. __title__ = 'resolwe' __summary__ = 'Open source enterprise dataflow engine in Django' __url__ = 'https://github.com/genialis/re...
<commit_before>"""Central place for package metadata.""" # NOTE: We use __title__ instead of simply __name__ since the latter would # interfere with a global variable __name__ denoting object's name. __title__ = 'resolwe' __summary__ = 'Open source enterprise dataflow engine in Django' __url__ = 'https://github....
81235c83c094e3dbca62f19d13c83a002d01da99
bokeh/mixins.py
bokeh/mixins.py
"""Classes that can be mixed-in to HasProps classes to get them the corresponding attributes. """ from .properties import HasProps, ColorSpec, DataSpec, Enum, DashPattern, Int, String from .enums import LineJoin, LineCap, FontStyle, TextAlign, TextBaseline class FillProps(HasProps): """ Mirrors the BokehJS proper...
"""Classes that can be mixed-in to HasProps classes to get them the corresponding attributes. """ from .properties import HasProps, ColorSpec, DataSpec, Enum, DashPattern, Int, String from .enums import LineJoin, LineCap, FontStyle, TextAlign, TextBaseline class FillProps(HasProps): """ Mirrors the BokehJS proper...
Unify bokeh's text properties' values with bokehjs
Unify bokeh's text properties' values with bokehjs
Python
bsd-3-clause
eteq/bokeh,jakirkham/bokeh,Karel-van-de-Plassche/bokeh,caseyclements/bokeh,bokeh/bokeh,xguse/bokeh,timothydmorton/bokeh,azjps/bokeh,ptitjano/bokeh,timothydmorton/bokeh,canavandl/bokeh,alan-unravel/bokeh,ahmadia/bokeh,eteq/bokeh,stuart-knock/bokeh,CrazyGuo/bokeh,ChristosChristofidis/bokeh,percyfal/bokeh,aavanian/bokeh,l...
"""Classes that can be mixed-in to HasProps classes to get them the corresponding attributes. """ from .properties import HasProps, ColorSpec, DataSpec, Enum, DashPattern, Int, String from .enums import LineJoin, LineCap, FontStyle, TextAlign, TextBaseline class FillProps(HasProps): """ Mirrors the BokehJS proper...
"""Classes that can be mixed-in to HasProps classes to get them the corresponding attributes. """ from .properties import HasProps, ColorSpec, DataSpec, Enum, DashPattern, Int, String from .enums import LineJoin, LineCap, FontStyle, TextAlign, TextBaseline class FillProps(HasProps): """ Mirrors the BokehJS proper...
<commit_before>"""Classes that can be mixed-in to HasProps classes to get them the corresponding attributes. """ from .properties import HasProps, ColorSpec, DataSpec, Enum, DashPattern, Int, String from .enums import LineJoin, LineCap, FontStyle, TextAlign, TextBaseline class FillProps(HasProps): """ Mirrors the...
"""Classes that can be mixed-in to HasProps classes to get them the corresponding attributes. """ from .properties import HasProps, ColorSpec, DataSpec, Enum, DashPattern, Int, String from .enums import LineJoin, LineCap, FontStyle, TextAlign, TextBaseline class FillProps(HasProps): """ Mirrors the BokehJS proper...
"""Classes that can be mixed-in to HasProps classes to get them the corresponding attributes. """ from .properties import HasProps, ColorSpec, DataSpec, Enum, DashPattern, Int, String from .enums import LineJoin, LineCap, FontStyle, TextAlign, TextBaseline class FillProps(HasProps): """ Mirrors the BokehJS proper...
<commit_before>"""Classes that can be mixed-in to HasProps classes to get them the corresponding attributes. """ from .properties import HasProps, ColorSpec, DataSpec, Enum, DashPattern, Int, String from .enums import LineJoin, LineCap, FontStyle, TextAlign, TextBaseline class FillProps(HasProps): """ Mirrors the...
e081646028e4f3283fb9c7278fed89c3e42cc4d3
server/tests/api/test_user_api.py
server/tests/api/test_user_api.py
import json from tests.helpers import FlaskTestCase, fixtures class TestUserAPI(FlaskTestCase): @fixtures('base.json') def test_get_empty_users(self): """Test GET /api/users endpoint with no data""" response = self.test_client.get('/api/users') assert response.status_code is 200 ...
import json from tests.helpers import FlaskTestCase, fixtures class TestUserAPI(FlaskTestCase): @fixtures('base.json') def test_get_empty_users(self): """Test GET /api/users endpoint with no data""" response, data = self.api_request('get', '/api/users') assert data['num_results'] is 0...
Implement tests for getting empty users list and single user list
Implement tests for getting empty users list and single user list
Python
mit
ganemone/ontheside,ganemone/ontheside,ganemone/ontheside
import json from tests.helpers import FlaskTestCase, fixtures class TestUserAPI(FlaskTestCase): @fixtures('base.json') def test_get_empty_users(self): """Test GET /api/users endpoint with no data""" response = self.test_client.get('/api/users') assert response.status_code is 200 ...
import json from tests.helpers import FlaskTestCase, fixtures class TestUserAPI(FlaskTestCase): @fixtures('base.json') def test_get_empty_users(self): """Test GET /api/users endpoint with no data""" response, data = self.api_request('get', '/api/users') assert data['num_results'] is 0...
<commit_before>import json from tests.helpers import FlaskTestCase, fixtures class TestUserAPI(FlaskTestCase): @fixtures('base.json') def test_get_empty_users(self): """Test GET /api/users endpoint with no data""" response = self.test_client.get('/api/users') assert response.status_co...
import json from tests.helpers import FlaskTestCase, fixtures class TestUserAPI(FlaskTestCase): @fixtures('base.json') def test_get_empty_users(self): """Test GET /api/users endpoint with no data""" response, data = self.api_request('get', '/api/users') assert data['num_results'] is 0...
import json from tests.helpers import FlaskTestCase, fixtures class TestUserAPI(FlaskTestCase): @fixtures('base.json') def test_get_empty_users(self): """Test GET /api/users endpoint with no data""" response = self.test_client.get('/api/users') assert response.status_code is 200 ...
<commit_before>import json from tests.helpers import FlaskTestCase, fixtures class TestUserAPI(FlaskTestCase): @fixtures('base.json') def test_get_empty_users(self): """Test GET /api/users endpoint with no data""" response = self.test_client.get('/api/users') assert response.status_co...
962f26299a7038879eb1efeb8f16b0801fd9a04a
glitter/assets/apps.py
glitter/assets/apps.py
# -*- coding: utf-8 -*- from django.apps import AppConfig class GlitterBasicAssetsConfig(AppConfig): name = 'glitter.assets' label = 'glitter_assets' def ready(self): super(GlitterBasicAssetsConfig, self).ready() from . import listeners # noqa
# -*- coding: utf-8 -*- from django.apps import AppConfig class GlitterBasicAssetsConfig(AppConfig): name = 'glitter.assets' label = 'glitter_assets' verbose_name = 'Assets' def ready(self): super(GlitterBasicAssetsConfig, self).ready() from . import listeners # noqa
Improve verbose name for assets
Improve verbose name for assets
Python
bsd-3-clause
blancltd/django-glitter,blancltd/django-glitter,developersociety/django-glitter,blancltd/django-glitter,developersociety/django-glitter,developersociety/django-glitter
# -*- coding: utf-8 -*- from django.apps import AppConfig class GlitterBasicAssetsConfig(AppConfig): name = 'glitter.assets' label = 'glitter_assets' def ready(self): super(GlitterBasicAssetsConfig, self).ready() from . import listeners # noqa Improve verbose name for assets
# -*- coding: utf-8 -*- from django.apps import AppConfig class GlitterBasicAssetsConfig(AppConfig): name = 'glitter.assets' label = 'glitter_assets' verbose_name = 'Assets' def ready(self): super(GlitterBasicAssetsConfig, self).ready() from . import listeners # noqa
<commit_before># -*- coding: utf-8 -*- from django.apps import AppConfig class GlitterBasicAssetsConfig(AppConfig): name = 'glitter.assets' label = 'glitter_assets' def ready(self): super(GlitterBasicAssetsConfig, self).ready() from . import listeners # noqa <commit_msg>Improve verbose ...
# -*- coding: utf-8 -*- from django.apps import AppConfig class GlitterBasicAssetsConfig(AppConfig): name = 'glitter.assets' label = 'glitter_assets' verbose_name = 'Assets' def ready(self): super(GlitterBasicAssetsConfig, self).ready() from . import listeners # noqa
# -*- coding: utf-8 -*- from django.apps import AppConfig class GlitterBasicAssetsConfig(AppConfig): name = 'glitter.assets' label = 'glitter_assets' def ready(self): super(GlitterBasicAssetsConfig, self).ready() from . import listeners # noqa Improve verbose name for assets# -*- coding...
<commit_before># -*- coding: utf-8 -*- from django.apps import AppConfig class GlitterBasicAssetsConfig(AppConfig): name = 'glitter.assets' label = 'glitter_assets' def ready(self): super(GlitterBasicAssetsConfig, self).ready() from . import listeners # noqa <commit_msg>Improve verbose ...
5dfc8a9b759e2106cfa33d13f736b27fddee9079
influxdb_metrics/loader.py
influxdb_metrics/loader.py
"""Loads celery or non-celery version.""" from django.conf import settings try: from .tasks import write_points as write_points_celery except Exception: write_points_celery = None from .utils import write_points as write_points_normal write_points = None if getattr(settings, 'INFLUXDB_USE_CELERY', False): ...
"""Loads celery or non-celery version.""" from django.conf import settings try: from .tasks import write_points as write_points_celery except ImportError: write_points_celery = None from .utils import write_points as write_points_normal write_points = None if getattr(settings, 'INFLUXDB_USE_CELERY', False): ...
Fix to not silently swallow all Exceptions.
Fix to not silently swallow all Exceptions. Great lib, thanks!
Python
mit
bitmazk/django-influxdb-metrics,bitlabstudio/django-influxdb-metrics,bitlabstudio/django-influxdb-metrics,bitmazk/django-influxdb-metrics
"""Loads celery or non-celery version.""" from django.conf import settings try: from .tasks import write_points as write_points_celery except Exception: write_points_celery = None from .utils import write_points as write_points_normal write_points = None if getattr(settings, 'INFLUXDB_USE_CELERY', False): ...
"""Loads celery or non-celery version.""" from django.conf import settings try: from .tasks import write_points as write_points_celery except ImportError: write_points_celery = None from .utils import write_points as write_points_normal write_points = None if getattr(settings, 'INFLUXDB_USE_CELERY', False): ...
<commit_before>"""Loads celery or non-celery version.""" from django.conf import settings try: from .tasks import write_points as write_points_celery except Exception: write_points_celery = None from .utils import write_points as write_points_normal write_points = None if getattr(settings, 'INFLUXDB_USE_CELE...
"""Loads celery or non-celery version.""" from django.conf import settings try: from .tasks import write_points as write_points_celery except ImportError: write_points_celery = None from .utils import write_points as write_points_normal write_points = None if getattr(settings, 'INFLUXDB_USE_CELERY', False): ...
"""Loads celery or non-celery version.""" from django.conf import settings try: from .tasks import write_points as write_points_celery except Exception: write_points_celery = None from .utils import write_points as write_points_normal write_points = None if getattr(settings, 'INFLUXDB_USE_CELERY', False): ...
<commit_before>"""Loads celery or non-celery version.""" from django.conf import settings try: from .tasks import write_points as write_points_celery except Exception: write_points_celery = None from .utils import write_points as write_points_normal write_points = None if getattr(settings, 'INFLUXDB_USE_CELE...
28f504dccd02046604761e997f929015a285dffd
pyQuantuccia/tests/test_get_holiday_date.py
pyQuantuccia/tests/test_get_holiday_date.py
from datetime import date import calendar print(calendar.__dir__()) print(calendar.__dict__) def test_united_kingdom_is_business_day(): """ Check a single day to see that we can identify holidays. """ assert(calendar.united_kingdom_is_business_day(date(2017, 4, 17)) is False)
from datetime import date import calendar def test_foo(): assert(calendar.__dir__() == "") def test_dummy(): assert(calendar.__dict__ == "") def test_united_kingdom_is_business_day(): """ Check a single day to see that we can identify holidays. """ assert(calendar.united_kingdom_is_busine...
Add some bogus tests to try and get this info.
Add some bogus tests to try and get this info.
Python
bsd-3-clause
jwg4/pyQuantuccia,jwg4/pyQuantuccia
from datetime import date import calendar print(calendar.__dir__()) print(calendar.__dict__) def test_united_kingdom_is_business_day(): """ Check a single day to see that we can identify holidays. """ assert(calendar.united_kingdom_is_business_day(date(2017, 4, 17)) is False) Add some bogus tests to...
from datetime import date import calendar def test_foo(): assert(calendar.__dir__() == "") def test_dummy(): assert(calendar.__dict__ == "") def test_united_kingdom_is_business_day(): """ Check a single day to see that we can identify holidays. """ assert(calendar.united_kingdom_is_busine...
<commit_before>from datetime import date import calendar print(calendar.__dir__()) print(calendar.__dict__) def test_united_kingdom_is_business_day(): """ Check a single day to see that we can identify holidays. """ assert(calendar.united_kingdom_is_business_day(date(2017, 4, 17)) is False) <commit_...
from datetime import date import calendar def test_foo(): assert(calendar.__dir__() == "") def test_dummy(): assert(calendar.__dict__ == "") def test_united_kingdom_is_business_day(): """ Check a single day to see that we can identify holidays. """ assert(calendar.united_kingdom_is_busine...
from datetime import date import calendar print(calendar.__dir__()) print(calendar.__dict__) def test_united_kingdom_is_business_day(): """ Check a single day to see that we can identify holidays. """ assert(calendar.united_kingdom_is_business_day(date(2017, 4, 17)) is False) Add some bogus tests to...
<commit_before>from datetime import date import calendar print(calendar.__dir__()) print(calendar.__dict__) def test_united_kingdom_is_business_day(): """ Check a single day to see that we can identify holidays. """ assert(calendar.united_kingdom_is_business_day(date(2017, 4, 17)) is False) <commit_...
fea4f04abc18b8dcf4970a1f338a8d610f04260d
src/pytz/tests/test_docs.py
src/pytz/tests/test_docs.py
#!/usr/bin/env python # -*- coding: ascii -*- import unittest, os, os.path, sys from doctest import DocFileSuite sys.path.insert(0, os.path.join(os.pardir, os.pardir)) locs = [ 'README.txt', os.path.join(os.pardir, 'README.txt'), os.path.join(os.pardir, os.pardir, 'README.txt'), ] README = None for lo...
#!/usr/bin/env python # -*- coding: ascii -*- import unittest, os, os.path, sys from doctest import DocFileSuite sys.path.insert(0, os.path.join(os.pardir, os.pardir)) locs = [ 'README.txt', os.path.join(os.pardir, 'README.txt'), os.path.join(os.pardir, os.pardir, 'README.txt'), ] README = None for lo...
Add a test_suite method as used by the Zope3 test runner
Add a test_suite method as used by the Zope3 test runner
Python
mit
stub42/pytz,stub42/pytz,stub42/pytz,stub42/pytz
#!/usr/bin/env python # -*- coding: ascii -*- import unittest, os, os.path, sys from doctest import DocFileSuite sys.path.insert(0, os.path.join(os.pardir, os.pardir)) locs = [ 'README.txt', os.path.join(os.pardir, 'README.txt'), os.path.join(os.pardir, os.pardir, 'README.txt'), ] README = None for lo...
#!/usr/bin/env python # -*- coding: ascii -*- import unittest, os, os.path, sys from doctest import DocFileSuite sys.path.insert(0, os.path.join(os.pardir, os.pardir)) locs = [ 'README.txt', os.path.join(os.pardir, 'README.txt'), os.path.join(os.pardir, os.pardir, 'README.txt'), ] README = None for lo...
<commit_before>#!/usr/bin/env python # -*- coding: ascii -*- import unittest, os, os.path, sys from doctest import DocFileSuite sys.path.insert(0, os.path.join(os.pardir, os.pardir)) locs = [ 'README.txt', os.path.join(os.pardir, 'README.txt'), os.path.join(os.pardir, os.pardir, 'README.txt'), ] READM...
#!/usr/bin/env python # -*- coding: ascii -*- import unittest, os, os.path, sys from doctest import DocFileSuite sys.path.insert(0, os.path.join(os.pardir, os.pardir)) locs = [ 'README.txt', os.path.join(os.pardir, 'README.txt'), os.path.join(os.pardir, os.pardir, 'README.txt'), ] README = None for lo...
#!/usr/bin/env python # -*- coding: ascii -*- import unittest, os, os.path, sys from doctest import DocFileSuite sys.path.insert(0, os.path.join(os.pardir, os.pardir)) locs = [ 'README.txt', os.path.join(os.pardir, 'README.txt'), os.path.join(os.pardir, os.pardir, 'README.txt'), ] README = None for lo...
<commit_before>#!/usr/bin/env python # -*- coding: ascii -*- import unittest, os, os.path, sys from doctest import DocFileSuite sys.path.insert(0, os.path.join(os.pardir, os.pardir)) locs = [ 'README.txt', os.path.join(os.pardir, 'README.txt'), os.path.join(os.pardir, os.pardir, 'README.txt'), ] READM...
c3c0bf614e046f4640d123f801739fc7ea0d7cac
salt/states/salt_proxy.py
salt/states/salt_proxy.py
# -*- coding: utf-8 -*- ''' Salt proxy state .. versionadded:: 2015.8.2 State to deploy and run salt-proxy processes on a minion. Set up pillar data for your proxies per the documentation. Run the state as below ..code-block:: yaml salt-proxy-configure: salt_proxy.c...
# -*- coding: utf-8 -*- ''' Salt proxy state .. versionadded:: 2015.8.2 State to deploy and run salt-proxy processes on a minion. Set up pillar data for your proxies per the documentation. Run the state as below ..code-block:: yaml salt-proxy-configure: salt_proxy.c...
Add example to function docstring
Add example to function docstring
Python
apache-2.0
saltstack/salt,saltstack/salt,saltstack/salt,saltstack/salt,saltstack/salt
# -*- coding: utf-8 -*- ''' Salt proxy state .. versionadded:: 2015.8.2 State to deploy and run salt-proxy processes on a minion. Set up pillar data for your proxies per the documentation. Run the state as below ..code-block:: yaml salt-proxy-configure: salt_proxy.c...
# -*- coding: utf-8 -*- ''' Salt proxy state .. versionadded:: 2015.8.2 State to deploy and run salt-proxy processes on a minion. Set up pillar data for your proxies per the documentation. Run the state as below ..code-block:: yaml salt-proxy-configure: salt_proxy.c...
<commit_before># -*- coding: utf-8 -*- ''' Salt proxy state .. versionadded:: 2015.8.2 State to deploy and run salt-proxy processes on a minion. Set up pillar data for your proxies per the documentation. Run the state as below ..code-block:: yaml salt-proxy-configure: ...
# -*- coding: utf-8 -*- ''' Salt proxy state .. versionadded:: 2015.8.2 State to deploy and run salt-proxy processes on a minion. Set up pillar data for your proxies per the documentation. Run the state as below ..code-block:: yaml salt-proxy-configure: salt_proxy.c...
# -*- coding: utf-8 -*- ''' Salt proxy state .. versionadded:: 2015.8.2 State to deploy and run salt-proxy processes on a minion. Set up pillar data for your proxies per the documentation. Run the state as below ..code-block:: yaml salt-proxy-configure: salt_proxy.c...
<commit_before># -*- coding: utf-8 -*- ''' Salt proxy state .. versionadded:: 2015.8.2 State to deploy and run salt-proxy processes on a minion. Set up pillar data for your proxies per the documentation. Run the state as below ..code-block:: yaml salt-proxy-configure: ...
dd63ef92e14a3111fd0914e9994aaea9ebd4e668
hcalendar/hcalendar.py
hcalendar/hcalendar.py
import bs4 from vcalendar import vCalendar class hCalendar(object): def __init__(self, markup, value=None, key='id'): self._soup = bs4.BeautifulSoup(markup) if value: self._soup = self._soup.find(**{key: value}) self._cals = self._soup.findAll(attrs='vcalendar') ...
from vcalendar import vCalendar from bs4 import BeautifulSoup class hCalendar(object): def __init__(self, markup, value=None, key='id'): if isinstance(markup, BeautifulSoup): self._soup = markup else: self._soup = BeautifulSoup(markup) if value: ...
Allow BeautifulSoup object being passed into hCalendar
Allow BeautifulSoup object being passed into hCalendar
Python
mit
mback2k/python-hcalendar
import bs4 from vcalendar import vCalendar class hCalendar(object): def __init__(self, markup, value=None, key='id'): self._soup = bs4.BeautifulSoup(markup) if value: self._soup = self._soup.find(**{key: value}) self._cals = self._soup.findAll(attrs='vcalendar') ...
from vcalendar import vCalendar from bs4 import BeautifulSoup class hCalendar(object): def __init__(self, markup, value=None, key='id'): if isinstance(markup, BeautifulSoup): self._soup = markup else: self._soup = BeautifulSoup(markup) if value: ...
<commit_before>import bs4 from vcalendar import vCalendar class hCalendar(object): def __init__(self, markup, value=None, key='id'): self._soup = bs4.BeautifulSoup(markup) if value: self._soup = self._soup.find(**{key: value}) self._cals = self._soup.findAll(attrs='vcale...
from vcalendar import vCalendar from bs4 import BeautifulSoup class hCalendar(object): def __init__(self, markup, value=None, key='id'): if isinstance(markup, BeautifulSoup): self._soup = markup else: self._soup = BeautifulSoup(markup) if value: ...
import bs4 from vcalendar import vCalendar class hCalendar(object): def __init__(self, markup, value=None, key='id'): self._soup = bs4.BeautifulSoup(markup) if value: self._soup = self._soup.find(**{key: value}) self._cals = self._soup.findAll(attrs='vcalendar') ...
<commit_before>import bs4 from vcalendar import vCalendar class hCalendar(object): def __init__(self, markup, value=None, key='id'): self._soup = bs4.BeautifulSoup(markup) if value: self._soup = self._soup.find(**{key: value}) self._cals = self._soup.findAll(attrs='vcale...
a773b1aa98a96b6335b76fc587ea714e5cca7545
cle/relocations/mips.py
cle/relocations/mips.py
from . import generic arch = 'MIPS32' R_MIPS_32 = generic.GenericAbsoluteAddendReloc R_MIPS_REL32 = generic.GenericRelativeReloc R_MIPS_TLS_DTPMOD32 = generic.GenericTLSModIdReloc R_MIPS_TLS_TPREL32 = generic.GenericTLSOffsetReloc R_MIPS_TLS_DTPREL32 = generic.GenericTLSDoffsetReloc
from . import generic arch = 'MIPS32' R_MIPS_32 = generic.GenericAbsoluteAddendReloc R_MIPS_REL32 = generic.GenericRelativeReloc R_MIPS_TLS_DTPMOD32 = generic.GenericTLSModIdReloc R_MIPS_TLS_TPREL32 = generic.GenericTLSOffsetReloc R_MIPS_TLS_DTPREL32 = generic.GenericTLSDoffsetReloc R_MIPS_JUMP_SLOT = generic.Generic...
Add R_MIPS_JUMP_SLOT and R_MIPS_GLOB_DAT relocations
Add R_MIPS_JUMP_SLOT and R_MIPS_GLOB_DAT relocations
Python
bsd-2-clause
chubbymaggie/cle,angr/cle
from . import generic arch = 'MIPS32' R_MIPS_32 = generic.GenericAbsoluteAddendReloc R_MIPS_REL32 = generic.GenericRelativeReloc R_MIPS_TLS_DTPMOD32 = generic.GenericTLSModIdReloc R_MIPS_TLS_TPREL32 = generic.GenericTLSOffsetReloc R_MIPS_TLS_DTPREL32 = generic.GenericTLSDoffsetReloc Add R_MIPS_JUMP_SLOT and R_MIPS_GL...
from . import generic arch = 'MIPS32' R_MIPS_32 = generic.GenericAbsoluteAddendReloc R_MIPS_REL32 = generic.GenericRelativeReloc R_MIPS_TLS_DTPMOD32 = generic.GenericTLSModIdReloc R_MIPS_TLS_TPREL32 = generic.GenericTLSOffsetReloc R_MIPS_TLS_DTPREL32 = generic.GenericTLSDoffsetReloc R_MIPS_JUMP_SLOT = generic.Generic...
<commit_before>from . import generic arch = 'MIPS32' R_MIPS_32 = generic.GenericAbsoluteAddendReloc R_MIPS_REL32 = generic.GenericRelativeReloc R_MIPS_TLS_DTPMOD32 = generic.GenericTLSModIdReloc R_MIPS_TLS_TPREL32 = generic.GenericTLSOffsetReloc R_MIPS_TLS_DTPREL32 = generic.GenericTLSDoffsetReloc <commit_msg>Add R_M...
from . import generic arch = 'MIPS32' R_MIPS_32 = generic.GenericAbsoluteAddendReloc R_MIPS_REL32 = generic.GenericRelativeReloc R_MIPS_TLS_DTPMOD32 = generic.GenericTLSModIdReloc R_MIPS_TLS_TPREL32 = generic.GenericTLSOffsetReloc R_MIPS_TLS_DTPREL32 = generic.GenericTLSDoffsetReloc R_MIPS_JUMP_SLOT = generic.Generic...
from . import generic arch = 'MIPS32' R_MIPS_32 = generic.GenericAbsoluteAddendReloc R_MIPS_REL32 = generic.GenericRelativeReloc R_MIPS_TLS_DTPMOD32 = generic.GenericTLSModIdReloc R_MIPS_TLS_TPREL32 = generic.GenericTLSOffsetReloc R_MIPS_TLS_DTPREL32 = generic.GenericTLSDoffsetReloc Add R_MIPS_JUMP_SLOT and R_MIPS_GL...
<commit_before>from . import generic arch = 'MIPS32' R_MIPS_32 = generic.GenericAbsoluteAddendReloc R_MIPS_REL32 = generic.GenericRelativeReloc R_MIPS_TLS_DTPMOD32 = generic.GenericTLSModIdReloc R_MIPS_TLS_TPREL32 = generic.GenericTLSOffsetReloc R_MIPS_TLS_DTPREL32 = generic.GenericTLSDoffsetReloc <commit_msg>Add R_M...
5863cbf81156074df4e0a9abb7a823a7701933da
tlsenum/__init__.py
tlsenum/__init__.py
import click CONTEXT_SETTINGS = dict(help_option_names=["-h", "--help"]) @click.command(context_settings=CONTEXT_SETTINGS) @click.argument("host", type=click.STRING) @click.argument("port", type=click.INT) @click.option("--verify-cert", is_flag=True) def cli(host, port, verify_cert): """ A command line tool...
import socket import click from construct import UBInt16 from tlsenum.parse_hello import ( ClientHello, Extensions, HandshakeFailure, ServerHello ) from tlsenum.mappings import CipherSuites, ECCurves, ECPointFormat CONTEXT_SETTINGS = dict(help_option_names=["-h", "--help"]) def send_client_hello(host, port, d...
Add very basic logic to figure out supported cipher suites.
Add very basic logic to figure out supported cipher suites.
Python
mit
Ayrx/tlsenum,Ayrx/tlsenum
import click CONTEXT_SETTINGS = dict(help_option_names=["-h", "--help"]) @click.command(context_settings=CONTEXT_SETTINGS) @click.argument("host", type=click.STRING) @click.argument("port", type=click.INT) @click.option("--verify-cert", is_flag=True) def cli(host, port, verify_cert): """ A command line tool...
import socket import click from construct import UBInt16 from tlsenum.parse_hello import ( ClientHello, Extensions, HandshakeFailure, ServerHello ) from tlsenum.mappings import CipherSuites, ECCurves, ECPointFormat CONTEXT_SETTINGS = dict(help_option_names=["-h", "--help"]) def send_client_hello(host, port, d...
<commit_before>import click CONTEXT_SETTINGS = dict(help_option_names=["-h", "--help"]) @click.command(context_settings=CONTEXT_SETTINGS) @click.argument("host", type=click.STRING) @click.argument("port", type=click.INT) @click.option("--verify-cert", is_flag=True) def cli(host, port, verify_cert): """ A co...
import socket import click from construct import UBInt16 from tlsenum.parse_hello import ( ClientHello, Extensions, HandshakeFailure, ServerHello ) from tlsenum.mappings import CipherSuites, ECCurves, ECPointFormat CONTEXT_SETTINGS = dict(help_option_names=["-h", "--help"]) def send_client_hello(host, port, d...
import click CONTEXT_SETTINGS = dict(help_option_names=["-h", "--help"]) @click.command(context_settings=CONTEXT_SETTINGS) @click.argument("host", type=click.STRING) @click.argument("port", type=click.INT) @click.option("--verify-cert", is_flag=True) def cli(host, port, verify_cert): """ A command line tool...
<commit_before>import click CONTEXT_SETTINGS = dict(help_option_names=["-h", "--help"]) @click.command(context_settings=CONTEXT_SETTINGS) @click.argument("host", type=click.STRING) @click.argument("port", type=click.INT) @click.option("--verify-cert", is_flag=True) def cli(host, port, verify_cert): """ A co...
f6d54387a620020e3766ca9f2528b5b4af41e9c1
tests/unit/tornado_tests.py
tests/unit/tornado_tests.py
""" Tests for pika.adapters.tornado_connection """ import unittest import mock from pika.adapters import tornado_connection class TornadoConnectionTests(unittest.TestCase): @mock.patch('pika.adapters.base_connection.BaseConnection.__init__') def test_tornado_connection_call_parent(self, mock_init): ...
""" Tests for pika.adapters.tornado_connection """ import unittest import mock from pika.adapters import tornado_connection class TornadoConnectionTests(unittest.TestCase): @mock.patch('pika.adapters.base_connection.BaseConnection.__init__') def test_tornado_connection_call_parent(self, mock_init): ...
Revert "Fixed check in test_tornado_connection_call_parent." accidentally committed to wrong branch
Revert "Fixed check in test_tornado_connection_call_parent." accidentally committed to wrong branch This reverts commit 3ca1365eafa63712e6d0dca7f5d6aa134f05d580.
Python
bsd-3-clause
pika/pika,vitaly-krugl/pika
""" Tests for pika.adapters.tornado_connection """ import unittest import mock from pika.adapters import tornado_connection class TornadoConnectionTests(unittest.TestCase): @mock.patch('pika.adapters.base_connection.BaseConnection.__init__') def test_tornado_connection_call_parent(self, mock_init): ...
""" Tests for pika.adapters.tornado_connection """ import unittest import mock from pika.adapters import tornado_connection class TornadoConnectionTests(unittest.TestCase): @mock.patch('pika.adapters.base_connection.BaseConnection.__init__') def test_tornado_connection_call_parent(self, mock_init): ...
<commit_before>""" Tests for pika.adapters.tornado_connection """ import unittest import mock from pika.adapters import tornado_connection class TornadoConnectionTests(unittest.TestCase): @mock.patch('pika.adapters.base_connection.BaseConnection.__init__') def test_tornado_connection_call_parent(self, mock...
""" Tests for pika.adapters.tornado_connection """ import unittest import mock from pika.adapters import tornado_connection class TornadoConnectionTests(unittest.TestCase): @mock.patch('pika.adapters.base_connection.BaseConnection.__init__') def test_tornado_connection_call_parent(self, mock_init): ...
""" Tests for pika.adapters.tornado_connection """ import unittest import mock from pika.adapters import tornado_connection class TornadoConnectionTests(unittest.TestCase): @mock.patch('pika.adapters.base_connection.BaseConnection.__init__') def test_tornado_connection_call_parent(self, mock_init): ...
<commit_before>""" Tests for pika.adapters.tornado_connection """ import unittest import mock from pika.adapters import tornado_connection class TornadoConnectionTests(unittest.TestCase): @mock.patch('pika.adapters.base_connection.BaseConnection.__init__') def test_tornado_connection_call_parent(self, mock...
157d427646ccee414503089e7080b92335848803
floq/helpers.py
floq/helpers.py
def n_to_i(num, n): """ Translate num, ranging from -(n-1)/2 through (n-1)/2 into an index i from 0 to n-1 If num > (n-1)/2, map it into the interval This is necessary to translate from a physical Fourier mode number to an index in an array. """ cutoff = (n-1)/2 if num > cutoff...
def n_to_i(num, n): """ Translate num, ranging from -(n-1)/2 through (n-1)/2 into an index i from 0 to n-1 If num > (n-1)/2, map it into the interval This is necessary to translate from a physical Fourier mode number to an index in an array. """ cutoff = (n-1)/2 return (num+cut...
Implement rollover correctly and a lot more concisely
Implement rollover correctly and a lot more concisely
Python
mit
sirmarcel/floq
def n_to_i(num, n): """ Translate num, ranging from -(n-1)/2 through (n-1)/2 into an index i from 0 to n-1 If num > (n-1)/2, map it into the interval This is necessary to translate from a physical Fourier mode number to an index in an array. """ cutoff = (n-1)/2 if num > cutoff...
def n_to_i(num, n): """ Translate num, ranging from -(n-1)/2 through (n-1)/2 into an index i from 0 to n-1 If num > (n-1)/2, map it into the interval This is necessary to translate from a physical Fourier mode number to an index in an array. """ cutoff = (n-1)/2 return (num+cut...
<commit_before>def n_to_i(num, n): """ Translate num, ranging from -(n-1)/2 through (n-1)/2 into an index i from 0 to n-1 If num > (n-1)/2, map it into the interval This is necessary to translate from a physical Fourier mode number to an index in an array. """ cutoff = (n-1)/2 ...
def n_to_i(num, n): """ Translate num, ranging from -(n-1)/2 through (n-1)/2 into an index i from 0 to n-1 If num > (n-1)/2, map it into the interval This is necessary to translate from a physical Fourier mode number to an index in an array. """ cutoff = (n-1)/2 return (num+cut...
def n_to_i(num, n): """ Translate num, ranging from -(n-1)/2 through (n-1)/2 into an index i from 0 to n-1 If num > (n-1)/2, map it into the interval This is necessary to translate from a physical Fourier mode number to an index in an array. """ cutoff = (n-1)/2 if num > cutoff...
<commit_before>def n_to_i(num, n): """ Translate num, ranging from -(n-1)/2 through (n-1)/2 into an index i from 0 to n-1 If num > (n-1)/2, map it into the interval This is necessary to translate from a physical Fourier mode number to an index in an array. """ cutoff = (n-1)/2 ...
610ada5f26d7421c2b0dd16a8a14ac9c95e4ed8c
config/test/__init__.py
config/test/__init__.py
from SCons.Script import * def run_tests(env): import shlex import subprocess import sys sys.exit(subprocess.call(shlex.split(env.get('TEST_COMMAND')))) def generate(env): import os import distutils.spawn python = distutils.spawn.find_executable('python3') if not python: python = d...
from SCons.Script import * def run_tests(env): import shlex import subprocess import sys cmd = shlex.split(env.get('TEST_COMMAND')) print('Executing:', cmd) sys.exit(subprocess.call(cmd)) def generate(env): import os import distutils.spawn python = distutils.spawn.find_executab...
Fix "test" target in Windows
Fix "test" target in Windows
Python
lgpl-2.1
CauldronDevelopmentLLC/cbang,CauldronDevelopmentLLC/cbang,CauldronDevelopmentLLC/cbang,CauldronDevelopmentLLC/cbang
from SCons.Script import * def run_tests(env): import shlex import subprocess import sys sys.exit(subprocess.call(shlex.split(env.get('TEST_COMMAND')))) def generate(env): import os import distutils.spawn python = distutils.spawn.find_executable('python3') if not python: python = d...
from SCons.Script import * def run_tests(env): import shlex import subprocess import sys cmd = shlex.split(env.get('TEST_COMMAND')) print('Executing:', cmd) sys.exit(subprocess.call(cmd)) def generate(env): import os import distutils.spawn python = distutils.spawn.find_executab...
<commit_before>from SCons.Script import * def run_tests(env): import shlex import subprocess import sys sys.exit(subprocess.call(shlex.split(env.get('TEST_COMMAND')))) def generate(env): import os import distutils.spawn python = distutils.spawn.find_executable('python3') if not pyt...
from SCons.Script import * def run_tests(env): import shlex import subprocess import sys cmd = shlex.split(env.get('TEST_COMMAND')) print('Executing:', cmd) sys.exit(subprocess.call(cmd)) def generate(env): import os import distutils.spawn python = distutils.spawn.find_executab...
from SCons.Script import * def run_tests(env): import shlex import subprocess import sys sys.exit(subprocess.call(shlex.split(env.get('TEST_COMMAND')))) def generate(env): import os import distutils.spawn python = distutils.spawn.find_executable('python3') if not python: python = d...
<commit_before>from SCons.Script import * def run_tests(env): import shlex import subprocess import sys sys.exit(subprocess.call(shlex.split(env.get('TEST_COMMAND')))) def generate(env): import os import distutils.spawn python = distutils.spawn.find_executable('python3') if not pyt...