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
f2bf249f4ea954b318819bd5976584eedba35517
pytablereader/__init__.py
pytablereader/__init__.py
# encoding: utf-8 """ .. codeauthor:: Tsuyoshi Hombashi <tsuyoshi.hombashi@gmail.com> """ from __future__ import absolute_import from tabledata import DataError, InvalidHeaderNameError, InvalidTableNameError from .__version__ import __author__, __copyright__, __email__, __license__, __version__ from ._constant impo...
# encoding: utf-8 """ .. codeauthor:: Tsuyoshi Hombashi <tsuyoshi.hombashi@gmail.com> """ from __future__ import absolute_import from tabledata import DataError, InvalidHeaderNameError, InvalidTableNameError from .__version__ import __author__, __copyright__, __email__, __license__, __version__ from ._constant impo...
Hide logger from outside of the package
Hide logger from outside of the package
Python
mit
thombashi/pytablereader,thombashi/pytablereader,thombashi/pytablereader
# encoding: utf-8 """ .. codeauthor:: Tsuyoshi Hombashi <tsuyoshi.hombashi@gmail.com> """ from __future__ import absolute_import from tabledata import DataError, InvalidHeaderNameError, InvalidTableNameError from .__version__ import __author__, __copyright__, __email__, __license__, __version__ from ._constant impo...
# encoding: utf-8 """ .. codeauthor:: Tsuyoshi Hombashi <tsuyoshi.hombashi@gmail.com> """ from __future__ import absolute_import from tabledata import DataError, InvalidHeaderNameError, InvalidTableNameError from .__version__ import __author__, __copyright__, __email__, __license__, __version__ from ._constant impo...
<commit_before># encoding: utf-8 """ .. codeauthor:: Tsuyoshi Hombashi <tsuyoshi.hombashi@gmail.com> """ from __future__ import absolute_import from tabledata import DataError, InvalidHeaderNameError, InvalidTableNameError from .__version__ import __author__, __copyright__, __email__, __license__, __version__ from ...
# encoding: utf-8 """ .. codeauthor:: Tsuyoshi Hombashi <tsuyoshi.hombashi@gmail.com> """ from __future__ import absolute_import from tabledata import DataError, InvalidHeaderNameError, InvalidTableNameError from .__version__ import __author__, __copyright__, __email__, __license__, __version__ from ._constant impo...
# encoding: utf-8 """ .. codeauthor:: Tsuyoshi Hombashi <tsuyoshi.hombashi@gmail.com> """ from __future__ import absolute_import from tabledata import DataError, InvalidHeaderNameError, InvalidTableNameError from .__version__ import __author__, __copyright__, __email__, __license__, __version__ from ._constant impo...
<commit_before># encoding: utf-8 """ .. codeauthor:: Tsuyoshi Hombashi <tsuyoshi.hombashi@gmail.com> """ from __future__ import absolute_import from tabledata import DataError, InvalidHeaderNameError, InvalidTableNameError from .__version__ import __author__, __copyright__, __email__, __license__, __version__ from ...
57f3bec127148c80a9304194e5c3c8a3d3f3bae2
tests/scoring_engine/web/views/test_scoreboard.py
tests/scoring_engine/web/views/test_scoreboard.py
from tests.scoring_engine.web.web_test import WebTest class TestScoreboard(WebTest): def test_home(self): # todo fix this up!!!! # resp = self.client.get('/scoreboard') # assert resp.status_code == 200 # lazy AF assert 1 == 1
from tests.scoring_engine.web.web_test import WebTest from tests.scoring_engine.helpers import populate_sample_data class TestScoreboard(WebTest): def test_scoreboard(self): populate_sample_data(self.session) resp = self.client.get('/scoreboard') assert resp.status_code == 200 ass...
Add tests for scoreboard view
Add tests for scoreboard view
Python
mit
pwnbus/scoring_engine,pwnbus/scoring_engine,pwnbus/scoring_engine,pwnbus/scoring_engine
from tests.scoring_engine.web.web_test import WebTest class TestScoreboard(WebTest): def test_home(self): # todo fix this up!!!! # resp = self.client.get('/scoreboard') # assert resp.status_code == 200 # lazy AF assert 1 == 1 Add tests for scoreboard view
from tests.scoring_engine.web.web_test import WebTest from tests.scoring_engine.helpers import populate_sample_data class TestScoreboard(WebTest): def test_scoreboard(self): populate_sample_data(self.session) resp = self.client.get('/scoreboard') assert resp.status_code == 200 ass...
<commit_before>from tests.scoring_engine.web.web_test import WebTest class TestScoreboard(WebTest): def test_home(self): # todo fix this up!!!! # resp = self.client.get('/scoreboard') # assert resp.status_code == 200 # lazy AF assert 1 == 1 <commit_msg>Add tests for scoreb...
from tests.scoring_engine.web.web_test import WebTest from tests.scoring_engine.helpers import populate_sample_data class TestScoreboard(WebTest): def test_scoreboard(self): populate_sample_data(self.session) resp = self.client.get('/scoreboard') assert resp.status_code == 200 ass...
from tests.scoring_engine.web.web_test import WebTest class TestScoreboard(WebTest): def test_home(self): # todo fix this up!!!! # resp = self.client.get('/scoreboard') # assert resp.status_code == 200 # lazy AF assert 1 == 1 Add tests for scoreboard viewfrom tests.scoring...
<commit_before>from tests.scoring_engine.web.web_test import WebTest class TestScoreboard(WebTest): def test_home(self): # todo fix this up!!!! # resp = self.client.get('/scoreboard') # assert resp.status_code == 200 # lazy AF assert 1 == 1 <commit_msg>Add tests for scoreb...
ebac72a3753205d3e45041c6db636a378187e3cf
pylua/tests/test_compiled.py
pylua/tests/test_compiled.py
import os import subprocess from pylua.tests.helpers import test_file class TestCompiled(object): """ Tests compiled binary """ def test_addition(self, capsys): f = test_file(src=""" -- short add x = 10 y = 5 z = y + y + x print(z) ...
import os import subprocess from pylua.tests.helpers import test_file class TestCompiled(object): """ Tests compiled binary """ PYLUA_BIN = os.path.join(os.path.dirname(os.path.abspath(__file__)), ('../../bin/pylua')) def test_addition(self, capsys): f = test_file(src=""" --...
Use absolute path for lua binary in tests
Use absolute path for lua binary in tests
Python
bsd-3-clause
fhahn/luna,fhahn/luna
import os import subprocess from pylua.tests.helpers import test_file class TestCompiled(object): """ Tests compiled binary """ def test_addition(self, capsys): f = test_file(src=""" -- short add x = 10 y = 5 z = y + y + x print(z) ...
import os import subprocess from pylua.tests.helpers import test_file class TestCompiled(object): """ Tests compiled binary """ PYLUA_BIN = os.path.join(os.path.dirname(os.path.abspath(__file__)), ('../../bin/pylua')) def test_addition(self, capsys): f = test_file(src=""" --...
<commit_before>import os import subprocess from pylua.tests.helpers import test_file class TestCompiled(object): """ Tests compiled binary """ def test_addition(self, capsys): f = test_file(src=""" -- short add x = 10 y = 5 z = y + y + x ...
import os import subprocess from pylua.tests.helpers import test_file class TestCompiled(object): """ Tests compiled binary """ PYLUA_BIN = os.path.join(os.path.dirname(os.path.abspath(__file__)), ('../../bin/pylua')) def test_addition(self, capsys): f = test_file(src=""" --...
import os import subprocess from pylua.tests.helpers import test_file class TestCompiled(object): """ Tests compiled binary """ def test_addition(self, capsys): f = test_file(src=""" -- short add x = 10 y = 5 z = y + y + x print(z) ...
<commit_before>import os import subprocess from pylua.tests.helpers import test_file class TestCompiled(object): """ Tests compiled binary """ def test_addition(self, capsys): f = test_file(src=""" -- short add x = 10 y = 5 z = y + y + x ...
5577b2a20a98aa232f5591a46269e5ee6c88070d
MyMoment.py
MyMoment.py
import datetime #Humanize time in milliseconds #Reference: http://stackoverflow.com/questions/26276906/python-convert-seconds-from-epoch-time-into-human-readable-time def HTM(aa): a = int(aa) b = int(datetime.datetime.now().strftime("%s")) c = b - a days = c // 86400 hours = c // 3600 % 24 minu...
import datetime from time import gmtime, strftime import pytz #Humanize time in milliseconds #Reference: http://stackoverflow.com/questions/26276906/python-convert-seconds-from-epoch-time-into-human-readable-time #http://www.epochconverter.com/ #1/6/2015, 8:19:34 AM PST -> 23 hours ago #print HTM(1420561174000/1000) ...
Add functions to generate timestamp for logfiles & filenames; use localtimezone
Add functions to generate timestamp for logfiles & filenames; use localtimezone
Python
mit
harishvc/githubanalytics,harishvc/githubanalytics,harishvc/githubanalytics
import datetime #Humanize time in milliseconds #Reference: http://stackoverflow.com/questions/26276906/python-convert-seconds-from-epoch-time-into-human-readable-time def HTM(aa): a = int(aa) b = int(datetime.datetime.now().strftime("%s")) c = b - a days = c // 86400 hours = c // 3600 % 24 minu...
import datetime from time import gmtime, strftime import pytz #Humanize time in milliseconds #Reference: http://stackoverflow.com/questions/26276906/python-convert-seconds-from-epoch-time-into-human-readable-time #http://www.epochconverter.com/ #1/6/2015, 8:19:34 AM PST -> 23 hours ago #print HTM(1420561174000/1000) ...
<commit_before>import datetime #Humanize time in milliseconds #Reference: http://stackoverflow.com/questions/26276906/python-convert-seconds-from-epoch-time-into-human-readable-time def HTM(aa): a = int(aa) b = int(datetime.datetime.now().strftime("%s")) c = b - a days = c // 86400 hours = c // 360...
import datetime from time import gmtime, strftime import pytz #Humanize time in milliseconds #Reference: http://stackoverflow.com/questions/26276906/python-convert-seconds-from-epoch-time-into-human-readable-time #http://www.epochconverter.com/ #1/6/2015, 8:19:34 AM PST -> 23 hours ago #print HTM(1420561174000/1000) ...
import datetime #Humanize time in milliseconds #Reference: http://stackoverflow.com/questions/26276906/python-convert-seconds-from-epoch-time-into-human-readable-time def HTM(aa): a = int(aa) b = int(datetime.datetime.now().strftime("%s")) c = b - a days = c // 86400 hours = c // 3600 % 24 minu...
<commit_before>import datetime #Humanize time in milliseconds #Reference: http://stackoverflow.com/questions/26276906/python-convert-seconds-from-epoch-time-into-human-readable-time def HTM(aa): a = int(aa) b = int(datetime.datetime.now().strftime("%s")) c = b - a days = c // 86400 hours = c // 360...
5cf17b6a46a3d4bbf4cecb65e4b9ef43066869d9
feincms/templatetags/applicationcontent_tags.py
feincms/templatetags/applicationcontent_tags.py
from django import template # backwards compatibility import from feincms.templatetags.fragment_tags import fragment, get_fragment, has_fragment register = template.Library() register.tag(fragment) register.tag(get_fragment) register.filter(has_fragment) @register.simple_tag def feincms_render_region_appcontent(pa...
from django import template # backwards compatibility import from feincms.templatetags.fragment_tags import fragment, get_fragment, has_fragment register = template.Library() register.tag(fragment) register.tag(get_fragment) register.filter(has_fragment) @register.simple_tag def feincms_render_region_appcontent(pa...
Use all_of_type instead of isinstance check in feincms_render_region_appcontent
Use all_of_type instead of isinstance check in feincms_render_region_appcontent
Python
bsd-3-clause
feincms/feincms,joshuajonah/feincms,feincms/feincms,matthiask/feincms2-content,matthiask/django-content-editor,michaelkuty/feincms,mjl/feincms,matthiask/feincms2-content,mjl/feincms,matthiask/django-content-editor,matthiask/django-content-editor,michaelkuty/feincms,nickburlett/feincms,matthiask/django-content-editor,jo...
from django import template # backwards compatibility import from feincms.templatetags.fragment_tags import fragment, get_fragment, has_fragment register = template.Library() register.tag(fragment) register.tag(get_fragment) register.filter(has_fragment) @register.simple_tag def feincms_render_region_appcontent(pa...
from django import template # backwards compatibility import from feincms.templatetags.fragment_tags import fragment, get_fragment, has_fragment register = template.Library() register.tag(fragment) register.tag(get_fragment) register.filter(has_fragment) @register.simple_tag def feincms_render_region_appcontent(pa...
<commit_before>from django import template # backwards compatibility import from feincms.templatetags.fragment_tags import fragment, get_fragment, has_fragment register = template.Library() register.tag(fragment) register.tag(get_fragment) register.filter(has_fragment) @register.simple_tag def feincms_render_regio...
from django import template # backwards compatibility import from feincms.templatetags.fragment_tags import fragment, get_fragment, has_fragment register = template.Library() register.tag(fragment) register.tag(get_fragment) register.filter(has_fragment) @register.simple_tag def feincms_render_region_appcontent(pa...
from django import template # backwards compatibility import from feincms.templatetags.fragment_tags import fragment, get_fragment, has_fragment register = template.Library() register.tag(fragment) register.tag(get_fragment) register.filter(has_fragment) @register.simple_tag def feincms_render_region_appcontent(pa...
<commit_before>from django import template # backwards compatibility import from feincms.templatetags.fragment_tags import fragment, get_fragment, has_fragment register = template.Library() register.tag(fragment) register.tag(get_fragment) register.filter(has_fragment) @register.simple_tag def feincms_render_regio...
b457eac63690deba408c4b5bdc1db179347f43da
postgres/fields/uuid_field.py
postgres/fields/uuid_field.py
from __future__ import unicode_literals import uuid from django.core.exceptions import ValidationError from django.db import models from django.utils import six from django.utils.translation import ugettext_lazy as _ from psycopg2.extras import register_uuid register_uuid() class UUIDField(six.with_metaclass(mode...
from __future__ import unicode_literals import uuid from django.core.exceptions import ValidationError from django.db import models from django.utils import six from django.utils.translation import ugettext_lazy as _ from psycopg2.extras import register_uuid register_uuid() class UUIDField(six.with_metaclass(mode...
Make UUIDField have a fixed max-length
Make UUIDField have a fixed max-length
Python
bsd-3-clause
wlanslovenija/django-postgres
from __future__ import unicode_literals import uuid from django.core.exceptions import ValidationError from django.db import models from django.utils import six from django.utils.translation import ugettext_lazy as _ from psycopg2.extras import register_uuid register_uuid() class UUIDField(six.with_metaclass(mode...
from __future__ import unicode_literals import uuid from django.core.exceptions import ValidationError from django.db import models from django.utils import six from django.utils.translation import ugettext_lazy as _ from psycopg2.extras import register_uuid register_uuid() class UUIDField(six.with_metaclass(mode...
<commit_before>from __future__ import unicode_literals import uuid from django.core.exceptions import ValidationError from django.db import models from django.utils import six from django.utils.translation import ugettext_lazy as _ from psycopg2.extras import register_uuid register_uuid() class UUIDField(six.with...
from __future__ import unicode_literals import uuid from django.core.exceptions import ValidationError from django.db import models from django.utils import six from django.utils.translation import ugettext_lazy as _ from psycopg2.extras import register_uuid register_uuid() class UUIDField(six.with_metaclass(mode...
from __future__ import unicode_literals import uuid from django.core.exceptions import ValidationError from django.db import models from django.utils import six from django.utils.translation import ugettext_lazy as _ from psycopg2.extras import register_uuid register_uuid() class UUIDField(six.with_metaclass(mode...
<commit_before>from __future__ import unicode_literals import uuid from django.core.exceptions import ValidationError from django.db import models from django.utils import six from django.utils.translation import ugettext_lazy as _ from psycopg2.extras import register_uuid register_uuid() class UUIDField(six.with...
89fe38163426efe02da92974bac369538ab5532f
elmextensions/__init__.py
elmextensions/__init__.py
from .sortedlist import * from .embeddedterminal import * from .aboutwindow import * from .fileselector import * from .tabbedbox import * from .StandardButton import * from .StandardPopup import * from .SearchableList import *
from .sortedlist import * from .embeddedterminal import * from .aboutwindow import * from .fileselector import * from .fontselector import * from .tabbedbox import * from .StandardButton import * from .StandardPopup import * from .SearchableList import * __copyright__ = "Copyright 2015-2017 Jeff Hoogland" __license__...
Access to module level information
Access to module level information
Python
bsd-3-clause
JeffHoogland/python-elm-extensions
from .sortedlist import * from .embeddedterminal import * from .aboutwindow import * from .fileselector import * from .tabbedbox import * from .StandardButton import * from .StandardPopup import * from .SearchableList import * Access to module level information
from .sortedlist import * from .embeddedterminal import * from .aboutwindow import * from .fileselector import * from .fontselector import * from .tabbedbox import * from .StandardButton import * from .StandardPopup import * from .SearchableList import * __copyright__ = "Copyright 2015-2017 Jeff Hoogland" __license__...
<commit_before>from .sortedlist import * from .embeddedterminal import * from .aboutwindow import * from .fileselector import * from .tabbedbox import * from .StandardButton import * from .StandardPopup import * from .SearchableList import * <commit_msg>Access to module level information<commit_after>
from .sortedlist import * from .embeddedterminal import * from .aboutwindow import * from .fileselector import * from .fontselector import * from .tabbedbox import * from .StandardButton import * from .StandardPopup import * from .SearchableList import * __copyright__ = "Copyright 2015-2017 Jeff Hoogland" __license__...
from .sortedlist import * from .embeddedterminal import * from .aboutwindow import * from .fileselector import * from .tabbedbox import * from .StandardButton import * from .StandardPopup import * from .SearchableList import * Access to module level informationfrom .sortedlist import * from .embeddedterminal import * f...
<commit_before>from .sortedlist import * from .embeddedterminal import * from .aboutwindow import * from .fileselector import * from .tabbedbox import * from .StandardButton import * from .StandardPopup import * from .SearchableList import * <commit_msg>Access to module level information<commit_after>from .sortedlist i...
f517442097b6ae12eb13b16f2fa6ca40a00b9998
__init__.py
__init__.py
from .features import Giraffe_Feature_Base from .features import Aligned_Feature
from .features import Giraffe_Feature_Base from .features import Aligned_Feature from .features import Feature_Type_Choices
Move Feature_Type_Choices to toplevel name sapce
Move Feature_Type_Choices to toplevel name sapce
Python
mit
benjiec/giraffe-features
from .features import Giraffe_Feature_Base from .features import Aligned_Feature Move Feature_Type_Choices to toplevel name sapce
from .features import Giraffe_Feature_Base from .features import Aligned_Feature from .features import Feature_Type_Choices
<commit_before>from .features import Giraffe_Feature_Base from .features import Aligned_Feature <commit_msg>Move Feature_Type_Choices to toplevel name sapce<commit_after>
from .features import Giraffe_Feature_Base from .features import Aligned_Feature from .features import Feature_Type_Choices
from .features import Giraffe_Feature_Base from .features import Aligned_Feature Move Feature_Type_Choices to toplevel name sapcefrom .features import Giraffe_Feature_Base from .features import Aligned_Feature from .features import Feature_Type_Choices
<commit_before>from .features import Giraffe_Feature_Base from .features import Aligned_Feature <commit_msg>Move Feature_Type_Choices to toplevel name sapce<commit_after>from .features import Giraffe_Feature_Base from .features import Aligned_Feature from .features import Feature_Type_Choices
0830f131b50d9679e6b2097febc7913bc09e5132
mopidy_scrobbler/__init__.py
mopidy_scrobbler/__init__.py
import pathlib from mopidy import config, ext __version__ = "1.2.1" class Extension(ext.Extension): dist_name = "Mopidy-Scrobbler" ext_name = "scrobbler" version = __version__ def get_default_config(self): return config.read(pathlib.Path(__file__).parent / "ext.conf") def get_config_s...
import pathlib import pkg_resources from mopidy import config, ext __version__ = pkg_resources.get_distribution("Mopidy-Scrobbler").version class Extension(ext.Extension): dist_name = "Mopidy-Scrobbler" ext_name = "scrobbler" version = __version__ def get_default_config(self): return conf...
Use pkg_resources to read version
Use pkg_resources to read version
Python
apache-2.0
mopidy/mopidy-scrobbler
import pathlib from mopidy import config, ext __version__ = "1.2.1" class Extension(ext.Extension): dist_name = "Mopidy-Scrobbler" ext_name = "scrobbler" version = __version__ def get_default_config(self): return config.read(pathlib.Path(__file__).parent / "ext.conf") def get_config_s...
import pathlib import pkg_resources from mopidy import config, ext __version__ = pkg_resources.get_distribution("Mopidy-Scrobbler").version class Extension(ext.Extension): dist_name = "Mopidy-Scrobbler" ext_name = "scrobbler" version = __version__ def get_default_config(self): return conf...
<commit_before>import pathlib from mopidy import config, ext __version__ = "1.2.1" class Extension(ext.Extension): dist_name = "Mopidy-Scrobbler" ext_name = "scrobbler" version = __version__ def get_default_config(self): return config.read(pathlib.Path(__file__).parent / "ext.conf") d...
import pathlib import pkg_resources from mopidy import config, ext __version__ = pkg_resources.get_distribution("Mopidy-Scrobbler").version class Extension(ext.Extension): dist_name = "Mopidy-Scrobbler" ext_name = "scrobbler" version = __version__ def get_default_config(self): return conf...
import pathlib from mopidy import config, ext __version__ = "1.2.1" class Extension(ext.Extension): dist_name = "Mopidy-Scrobbler" ext_name = "scrobbler" version = __version__ def get_default_config(self): return config.read(pathlib.Path(__file__).parent / "ext.conf") def get_config_s...
<commit_before>import pathlib from mopidy import config, ext __version__ = "1.2.1" class Extension(ext.Extension): dist_name = "Mopidy-Scrobbler" ext_name = "scrobbler" version = __version__ def get_default_config(self): return config.read(pathlib.Path(__file__).parent / "ext.conf") d...
48ffd37eb826edb78750652628145a924053b204
website/wsgi.py
website/wsgi.py
""" WSGI config for classicalguitar project. It exposes the WSGI callable as a module-level variable named ``application``. For more information on this file, see https://docs.djangoproject.com/en/1.7/howto/deployment/wsgi/ """ import os os.environ.setdefault("DJANGO_SETTINGS_MODULE", "classicalguitar.settings") fr...
""" WSGI config for website project. It exposes the WSGI callable as a module-level variable named ``application``. For more information on this file, see https://docs.djangoproject.com/en/1.7/howto/deployment/wsgi/ """ import os os.environ.setdefault("DJANGO_SETTINGS_MODULE", "website.settings") from django.core.w...
Correct some remaining classical guitar refs
Correct some remaining classical guitar refs
Python
bsd-3-clause
chrisguitarguy/GuitarSocieties.org,chrisguitarguy/GuitarSocieties.org
""" WSGI config for classicalguitar project. It exposes the WSGI callable as a module-level variable named ``application``. For more information on this file, see https://docs.djangoproject.com/en/1.7/howto/deployment/wsgi/ """ import os os.environ.setdefault("DJANGO_SETTINGS_MODULE", "classicalguitar.settings") fr...
""" WSGI config for website project. It exposes the WSGI callable as a module-level variable named ``application``. For more information on this file, see https://docs.djangoproject.com/en/1.7/howto/deployment/wsgi/ """ import os os.environ.setdefault("DJANGO_SETTINGS_MODULE", "website.settings") from django.core.w...
<commit_before>""" WSGI config for classicalguitar project. It exposes the WSGI callable as a module-level variable named ``application``. For more information on this file, see https://docs.djangoproject.com/en/1.7/howto/deployment/wsgi/ """ import os os.environ.setdefault("DJANGO_SETTINGS_MODULE", "classicalguitar...
""" WSGI config for website project. It exposes the WSGI callable as a module-level variable named ``application``. For more information on this file, see https://docs.djangoproject.com/en/1.7/howto/deployment/wsgi/ """ import os os.environ.setdefault("DJANGO_SETTINGS_MODULE", "website.settings") from django.core.w...
""" WSGI config for classicalguitar project. It exposes the WSGI callable as a module-level variable named ``application``. For more information on this file, see https://docs.djangoproject.com/en/1.7/howto/deployment/wsgi/ """ import os os.environ.setdefault("DJANGO_SETTINGS_MODULE", "classicalguitar.settings") fr...
<commit_before>""" WSGI config for classicalguitar project. It exposes the WSGI callable as a module-level variable named ``application``. For more information on this file, see https://docs.djangoproject.com/en/1.7/howto/deployment/wsgi/ """ import os os.environ.setdefault("DJANGO_SETTINGS_MODULE", "classicalguitar...
5a8788222d9a5765bf66a2c93eed25ca7879c856
__init__.py
__init__.py
import inspect import sys if sys.version_info[0] == 2: from .python2 import httplib2 else: from .python3 import httplib2 globals().update(inspect.getmembers(httplib2))
import os import sys path = os.path.dirname(__file__)+os.path.sep+'python'+str(sys.version_info[0]) sys.path.insert(0, path) del sys.modules['httplib2'] import httplib2
Rewrite python version dependent import
Rewrite python version dependent import The top level of this external includes a __init__.py so that it may be imported with only 'externals' in sys.path. However it copies the contents of the python version dependent httplib2 code, resulting in module level variables appearing in two different namespaces. As a res...
Python
mit
jayvdb/httplib2,wikimedia/pywikibot-externals-httplib2,jayvdb/httplib2,wikimedia/pywikibot-externals-httplib2
import inspect import sys if sys.version_info[0] == 2: from .python2 import httplib2 else: from .python3 import httplib2 globals().update(inspect.getmembers(httplib2)) Rewrite python version dependent import The top level of this external includes a __init__.py so that it may be imported with only 'externals' ...
import os import sys path = os.path.dirname(__file__)+os.path.sep+'python'+str(sys.version_info[0]) sys.path.insert(0, path) del sys.modules['httplib2'] import httplib2
<commit_before>import inspect import sys if sys.version_info[0] == 2: from .python2 import httplib2 else: from .python3 import httplib2 globals().update(inspect.getmembers(httplib2)) <commit_msg>Rewrite python version dependent import The top level of this external includes a __init__.py so that it may be impo...
import os import sys path = os.path.dirname(__file__)+os.path.sep+'python'+str(sys.version_info[0]) sys.path.insert(0, path) del sys.modules['httplib2'] import httplib2
import inspect import sys if sys.version_info[0] == 2: from .python2 import httplib2 else: from .python3 import httplib2 globals().update(inspect.getmembers(httplib2)) Rewrite python version dependent import The top level of this external includes a __init__.py so that it may be imported with only 'externals' ...
<commit_before>import inspect import sys if sys.version_info[0] == 2: from .python2 import httplib2 else: from .python3 import httplib2 globals().update(inspect.getmembers(httplib2)) <commit_msg>Rewrite python version dependent import The top level of this external includes a __init__.py so that it may be impo...
2b2e0b180393af779c7d303a1a3162febe098639
permuta/misc/union_find.py
permuta/misc/union_find.py
class UnionFind(object): def __init__(self, n): self.p = [-1]*n self.leaders = set( i for i in range(n) ) def find(self, x): if self.p[x] < 0: return x self.p[x] = self.find(self.p[x]) return self.p[x] def size(self, x): return -self.p[self.find...
class UnionFind(object): """A collection of distjoint sets.""" def __init__(self, n = 0): """Creates a collection of n disjoint unit sets.""" self.p = [-1]*n self.leaders = set( i for i in range(n) ) def find(self, x): """Return the identifier of a representative element f...
Document UnionFind and implement add function
Document UnionFind and implement add function
Python
bsd-3-clause
PermutaTriangle/Permuta
class UnionFind(object): def __init__(self, n): self.p = [-1]*n self.leaders = set( i for i in range(n) ) def find(self, x): if self.p[x] < 0: return x self.p[x] = self.find(self.p[x]) return self.p[x] def size(self, x): return -self.p[self.find...
class UnionFind(object): """A collection of distjoint sets.""" def __init__(self, n = 0): """Creates a collection of n disjoint unit sets.""" self.p = [-1]*n self.leaders = set( i for i in range(n) ) def find(self, x): """Return the identifier of a representative element f...
<commit_before> class UnionFind(object): def __init__(self, n): self.p = [-1]*n self.leaders = set( i for i in range(n) ) def find(self, x): if self.p[x] < 0: return x self.p[x] = self.find(self.p[x]) return self.p[x] def size(self, x): return -s...
class UnionFind(object): """A collection of distjoint sets.""" def __init__(self, n = 0): """Creates a collection of n disjoint unit sets.""" self.p = [-1]*n self.leaders = set( i for i in range(n) ) def find(self, x): """Return the identifier of a representative element f...
class UnionFind(object): def __init__(self, n): self.p = [-1]*n self.leaders = set( i for i in range(n) ) def find(self, x): if self.p[x] < 0: return x self.p[x] = self.find(self.p[x]) return self.p[x] def size(self, x): return -self.p[self.find...
<commit_before> class UnionFind(object): def __init__(self, n): self.p = [-1]*n self.leaders = set( i for i in range(n) ) def find(self, x): if self.p[x] < 0: return x self.p[x] = self.find(self.p[x]) return self.p[x] def size(self, x): return -s...
40e96e99dc8538ae3b5e5a95d9c6d81ec656ad6c
dash2012/auth/views.py
dash2012/auth/views.py
from django.http import HttpResponseRedirect from django.shortcuts import render from django.core.urlresolvers import reverse from django.contrib.auth import authenticate, login as auth_login, logout as auth_logout from django.contrib.auth.decorators import login_required from cloudfish.models import Cloud def login(...
from django.http import HttpResponseRedirect from django.shortcuts import render from django.core.urlresolvers import reverse from django.contrib.auth import authenticate, login as auth_login, logout as auth_logout from django.contrib.auth.decorators import login_required from cloudfish.models import Cloud def login(...
Fix erros msg in login view
Fix erros msg in login view
Python
bsd-3-clause
losmiserables/djangodash2012,losmiserables/djangodash2012
from django.http import HttpResponseRedirect from django.shortcuts import render from django.core.urlresolvers import reverse from django.contrib.auth import authenticate, login as auth_login, logout as auth_logout from django.contrib.auth.decorators import login_required from cloudfish.models import Cloud def login(...
from django.http import HttpResponseRedirect from django.shortcuts import render from django.core.urlresolvers import reverse from django.contrib.auth import authenticate, login as auth_login, logout as auth_logout from django.contrib.auth.decorators import login_required from cloudfish.models import Cloud def login(...
<commit_before>from django.http import HttpResponseRedirect from django.shortcuts import render from django.core.urlresolvers import reverse from django.contrib.auth import authenticate, login as auth_login, logout as auth_logout from django.contrib.auth.decorators import login_required from cloudfish.models import Clo...
from django.http import HttpResponseRedirect from django.shortcuts import render from django.core.urlresolvers import reverse from django.contrib.auth import authenticate, login as auth_login, logout as auth_logout from django.contrib.auth.decorators import login_required from cloudfish.models import Cloud def login(...
from django.http import HttpResponseRedirect from django.shortcuts import render from django.core.urlresolvers import reverse from django.contrib.auth import authenticate, login as auth_login, logout as auth_logout from django.contrib.auth.decorators import login_required from cloudfish.models import Cloud def login(...
<commit_before>from django.http import HttpResponseRedirect from django.shortcuts import render from django.core.urlresolvers import reverse from django.contrib.auth import authenticate, login as auth_login, logout as auth_logout from django.contrib.auth.decorators import login_required from cloudfish.models import Clo...
01c5b53ba16a95ab77918d30dfa3a63f2ef2707f
var/spack/repos/builtin/packages/libxcb/package.py
var/spack/repos/builtin/packages/libxcb/package.py
from spack import * class Libxcb(Package): """The X protocol C-language Binding (XCB) is a replacement for Xlib featuring a small footprint, latency hiding, direct access to the protocol, improved threading support, and extensibility.""" homepage = "http://xcb.freedesktop.org/" url = "...
from spack import * class Libxcb(Package): """The X protocol C-language Binding (XCB) is a replacement for Xlib featuring a small footprint, latency hiding, direct access to the protocol, improved threading support, and extensibility.""" homepage = "http://xcb.freedesktop.org/" url = "htt...
Make libxcb compile with gcc 4.9.
Make libxcb compile with gcc 4.9.
Python
lgpl-2.1
krafczyk/spack,krafczyk/spack,mfherbst/spack,skosukhin/spack,tmerrick1/spack,iulian787/spack,EmreAtes/spack,lgarren/spack,EmreAtes/spack,matthiasdiener/spack,lgarren/spack,TheTimmy/spack,LLNL/spack,mfherbst/spack,lgarren/spack,iulian787/spack,skosukhin/spack,LLNL/spack,LLNL/spack,mfherbst/spack,skosukhin/spack,matthias...
from spack import * class Libxcb(Package): """The X protocol C-language Binding (XCB) is a replacement for Xlib featuring a small footprint, latency hiding, direct access to the protocol, improved threading support, and extensibility.""" homepage = "http://xcb.freedesktop.org/" url = "...
from spack import * class Libxcb(Package): """The X protocol C-language Binding (XCB) is a replacement for Xlib featuring a small footprint, latency hiding, direct access to the protocol, improved threading support, and extensibility.""" homepage = "http://xcb.freedesktop.org/" url = "htt...
<commit_before>from spack import * class Libxcb(Package): """The X protocol C-language Binding (XCB) is a replacement for Xlib featuring a small footprint, latency hiding, direct access to the protocol, improved threading support, and extensibility.""" homepage = "http://xcb.freedesktop.org/" ...
from spack import * class Libxcb(Package): """The X protocol C-language Binding (XCB) is a replacement for Xlib featuring a small footprint, latency hiding, direct access to the protocol, improved threading support, and extensibility.""" homepage = "http://xcb.freedesktop.org/" url = "htt...
from spack import * class Libxcb(Package): """The X protocol C-language Binding (XCB) is a replacement for Xlib featuring a small footprint, latency hiding, direct access to the protocol, improved threading support, and extensibility.""" homepage = "http://xcb.freedesktop.org/" url = "...
<commit_before>from spack import * class Libxcb(Package): """The X protocol C-language Binding (XCB) is a replacement for Xlib featuring a small footprint, latency hiding, direct access to the protocol, improved threading support, and extensibility.""" homepage = "http://xcb.freedesktop.org/" ...
79e68ca4b377f479d7eb557879b3450134efaf16
ydf/yaml_ext.py
ydf/yaml_ext.py
""" ydf/yaml_ext ~~~~~~~~~~~~ Contains extensions to existing YAML functionality. """ import collections from ruamel import yaml from ruamel.yaml import resolver __all__ = ['load_all', 'load_all_gen'] class OrderedRoundTripLoader(yaml.RoundTripLoader): """ Extends the default round trip YAML ...
""" ydf/yaml_ext ~~~~~~~~~~~~ Contains extensions to existing YAML functionality. """ import collections from ruamel import yaml from ruamel.yaml import resolver __all__ = ['load', 'load_all', 'load_all_gen'] class OrderedRoundTripLoader(yaml.RoundTripLoader): """ Extends the default round tr...
Add YAML load for single document.
Add YAML load for single document.
Python
apache-2.0
ahawker/ydf
""" ydf/yaml_ext ~~~~~~~~~~~~ Contains extensions to existing YAML functionality. """ import collections from ruamel import yaml from ruamel.yaml import resolver __all__ = ['load_all', 'load_all_gen'] class OrderedRoundTripLoader(yaml.RoundTripLoader): """ Extends the default round trip YAML ...
""" ydf/yaml_ext ~~~~~~~~~~~~ Contains extensions to existing YAML functionality. """ import collections from ruamel import yaml from ruamel.yaml import resolver __all__ = ['load', 'load_all', 'load_all_gen'] class OrderedRoundTripLoader(yaml.RoundTripLoader): """ Extends the default round tr...
<commit_before>""" ydf/yaml_ext ~~~~~~~~~~~~ Contains extensions to existing YAML functionality. """ import collections from ruamel import yaml from ruamel.yaml import resolver __all__ = ['load_all', 'load_all_gen'] class OrderedRoundTripLoader(yaml.RoundTripLoader): """ Extends the default r...
""" ydf/yaml_ext ~~~~~~~~~~~~ Contains extensions to existing YAML functionality. """ import collections from ruamel import yaml from ruamel.yaml import resolver __all__ = ['load', 'load_all', 'load_all_gen'] class OrderedRoundTripLoader(yaml.RoundTripLoader): """ Extends the default round tr...
""" ydf/yaml_ext ~~~~~~~~~~~~ Contains extensions to existing YAML functionality. """ import collections from ruamel import yaml from ruamel.yaml import resolver __all__ = ['load_all', 'load_all_gen'] class OrderedRoundTripLoader(yaml.RoundTripLoader): """ Extends the default round trip YAML ...
<commit_before>""" ydf/yaml_ext ~~~~~~~~~~~~ Contains extensions to existing YAML functionality. """ import collections from ruamel import yaml from ruamel.yaml import resolver __all__ = ['load_all', 'load_all_gen'] class OrderedRoundTripLoader(yaml.RoundTripLoader): """ Extends the default r...
42f5b2c53474f20fbffbc0b8cdaa4e5b47a4751d
app/wsgi.py
app/wsgi.py
# TODO, figure out how to load gevent monkey patch cleanly in production try: from gevent.monkey import patch_all patch_all() except ImportError: print "unable to apply gevent monkey.patch_all" import os from werkzeug.contrib.fixers import ProxyFix from app import app as application if os.environ.get('S...
# TODO, figure out how to load gevent monkey patch cleanly in production # try: # from gevent.monkey import patch_all # patch_all() # except ImportError: # print "unable to apply gevent monkey.patch_all" import os from werkzeug.contrib.fixers import ProxyFix from app import app as application if os.envi...
Comment out gevent until we need it
Comment out gevent until we need it
Python
mit
spacedogXYZ/email-validator,spacedogXYZ/email-validator,spacedogXYZ/email-validator
# TODO, figure out how to load gevent monkey patch cleanly in production try: from gevent.monkey import patch_all patch_all() except ImportError: print "unable to apply gevent monkey.patch_all" import os from werkzeug.contrib.fixers import ProxyFix from app import app as application if os.environ.get('S...
# TODO, figure out how to load gevent monkey patch cleanly in production # try: # from gevent.monkey import patch_all # patch_all() # except ImportError: # print "unable to apply gevent monkey.patch_all" import os from werkzeug.contrib.fixers import ProxyFix from app import app as application if os.envi...
<commit_before># TODO, figure out how to load gevent monkey patch cleanly in production try: from gevent.monkey import patch_all patch_all() except ImportError: print "unable to apply gevent monkey.patch_all" import os from werkzeug.contrib.fixers import ProxyFix from app import app as application if os...
# TODO, figure out how to load gevent monkey patch cleanly in production # try: # from gevent.monkey import patch_all # patch_all() # except ImportError: # print "unable to apply gevent monkey.patch_all" import os from werkzeug.contrib.fixers import ProxyFix from app import app as application if os.envi...
# TODO, figure out how to load gevent monkey patch cleanly in production try: from gevent.monkey import patch_all patch_all() except ImportError: print "unable to apply gevent monkey.patch_all" import os from werkzeug.contrib.fixers import ProxyFix from app import app as application if os.environ.get('S...
<commit_before># TODO, figure out how to load gevent monkey patch cleanly in production try: from gevent.monkey import patch_all patch_all() except ImportError: print "unable to apply gevent monkey.patch_all" import os from werkzeug.contrib.fixers import ProxyFix from app import app as application if os...
785236ca766d832d859c2933389e23fd3d1bea20
djangocms_table/cms_plugins.py
djangocms_table/cms_plugins.py
from django.utils.translation import ugettext_lazy as _ from django.conf import settings from cms.plugin_pool import plugin_pool from cms.plugin_base import CMSPluginBase from models import Table from djangocms_table.forms import TableForm from django.utils import simplejson from djangocms_table.utils import static_url...
import json from django.utils.translation import ugettext_lazy as _ from django.conf import settings from cms.plugin_pool import plugin_pool from cms.plugin_base import CMSPluginBase from models import Table from djangocms_table.forms import TableForm from djangocms_table.utils import static_url from django.http import...
Fix another simplejson deprecation warning
Fix another simplejson deprecation warning
Python
bsd-3-clause
freelancersunion/djangocms-table,freelancersunion/djangocms-table,freelancersunion/djangocms-table,divio/djangocms-table,divio/djangocms-table,divio/djangocms-table
from django.utils.translation import ugettext_lazy as _ from django.conf import settings from cms.plugin_pool import plugin_pool from cms.plugin_base import CMSPluginBase from models import Table from djangocms_table.forms import TableForm from django.utils import simplejson from djangocms_table.utils import static_url...
import json from django.utils.translation import ugettext_lazy as _ from django.conf import settings from cms.plugin_pool import plugin_pool from cms.plugin_base import CMSPluginBase from models import Table from djangocms_table.forms import TableForm from djangocms_table.utils import static_url from django.http import...
<commit_before>from django.utils.translation import ugettext_lazy as _ from django.conf import settings from cms.plugin_pool import plugin_pool from cms.plugin_base import CMSPluginBase from models import Table from djangocms_table.forms import TableForm from django.utils import simplejson from djangocms_table.utils im...
import json from django.utils.translation import ugettext_lazy as _ from django.conf import settings from cms.plugin_pool import plugin_pool from cms.plugin_base import CMSPluginBase from models import Table from djangocms_table.forms import TableForm from djangocms_table.utils import static_url from django.http import...
from django.utils.translation import ugettext_lazy as _ from django.conf import settings from cms.plugin_pool import plugin_pool from cms.plugin_base import CMSPluginBase from models import Table from djangocms_table.forms import TableForm from django.utils import simplejson from djangocms_table.utils import static_url...
<commit_before>from django.utils.translation import ugettext_lazy as _ from django.conf import settings from cms.plugin_pool import plugin_pool from cms.plugin_base import CMSPluginBase from models import Table from djangocms_table.forms import TableForm from django.utils import simplejson from djangocms_table.utils im...
17d54738a57a355fef3e83484162af13ecd2ea63
localore/localore_admin/migrations/0003_auto_20160316_1646.py
localore/localore_admin/migrations/0003_auto_20160316_1646.py
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('localore_admin', '0002_auto_20160316_1444'), ] run_before = [ ('home', '0002_create_homepage'), ] operations = [ ...
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('localore_admin', '0002_auto_20160316_1444'), ] run_before = [ ('home', '0002_create_homepage'), ('people', '0006_aut...
Fix (?) another custom image model migration error
Fix (?) another custom image model migration error
Python
mpl-2.0
ghostwords/localore,ghostwords/localore,ghostwords/localore
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('localore_admin', '0002_auto_20160316_1444'), ] run_before = [ ('home', '0002_create_homepage'), ] operations = [ ...
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('localore_admin', '0002_auto_20160316_1444'), ] run_before = [ ('home', '0002_create_homepage'), ('people', '0006_aut...
<commit_before># -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('localore_admin', '0002_auto_20160316_1444'), ] run_before = [ ('home', '0002_create_homepage'), ] op...
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('localore_admin', '0002_auto_20160316_1444'), ] run_before = [ ('home', '0002_create_homepage'), ('people', '0006_aut...
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('localore_admin', '0002_auto_20160316_1444'), ] run_before = [ ('home', '0002_create_homepage'), ] operations = [ ...
<commit_before># -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('localore_admin', '0002_auto_20160316_1444'), ] run_before = [ ('home', '0002_create_homepage'), ] op...
6b3f568a6615e9439fc0df0eac68838b6cbda0d9
anti-XSS.py
anti-XSS.py
#!/usr/bin/env python ''' Copyright (c) 2016 anti-XSS developers ''' import sys from lib.core.link import Link from optparse import OptionParser from lib.core.engine import getPage from lib.core.engine import getScript from lib.core.engine import xssScanner from lib.generator.report import gnrReport def main(): ...
#!/usr/bin/env python ''' Copyright (c) 2016 anti-XSS developers ''' import sys from lib.core.urlfun import * from lib.core.link import Link from optparse import OptionParser from lib.core.engine import getPage from lib.core.engine import getScript from lib.core.engine import xssScanner from lib.generator.report im...
Add initialization before get url
Add initialization before get url
Python
mit
lewangbtcc/anti-XSS,lewangbtcc/anti-XSS
#!/usr/bin/env python ''' Copyright (c) 2016 anti-XSS developers ''' import sys from lib.core.link import Link from optparse import OptionParser from lib.core.engine import getPage from lib.core.engine import getScript from lib.core.engine import xssScanner from lib.generator.report import gnrReport def main(): ...
#!/usr/bin/env python ''' Copyright (c) 2016 anti-XSS developers ''' import sys from lib.core.urlfun import * from lib.core.link import Link from optparse import OptionParser from lib.core.engine import getPage from lib.core.engine import getScript from lib.core.engine import xssScanner from lib.generator.report im...
<commit_before>#!/usr/bin/env python ''' Copyright (c) 2016 anti-XSS developers ''' import sys from lib.core.link import Link from optparse import OptionParser from lib.core.engine import getPage from lib.core.engine import getScript from lib.core.engine import xssScanner from lib.generator.report import gnrReport ...
#!/usr/bin/env python ''' Copyright (c) 2016 anti-XSS developers ''' import sys from lib.core.urlfun import * from lib.core.link import Link from optparse import OptionParser from lib.core.engine import getPage from lib.core.engine import getScript from lib.core.engine import xssScanner from lib.generator.report im...
#!/usr/bin/env python ''' Copyright (c) 2016 anti-XSS developers ''' import sys from lib.core.link import Link from optparse import OptionParser from lib.core.engine import getPage from lib.core.engine import getScript from lib.core.engine import xssScanner from lib.generator.report import gnrReport def main(): ...
<commit_before>#!/usr/bin/env python ''' Copyright (c) 2016 anti-XSS developers ''' import sys from lib.core.link import Link from optparse import OptionParser from lib.core.engine import getPage from lib.core.engine import getScript from lib.core.engine import xssScanner from lib.generator.report import gnrReport ...
19d99f6040d1474feee0f2fb0bda7cb14fbf407c
nose2/tests/unit/test_config.py
nose2/tests/unit/test_config.py
from nose2 import config from nose2.compat import unittest class TestConfigSession(unittest.TestCase): def test_can_create_session(self): config.Session() class TestConfig(unittest.TestCase): def setUp(self): self.conf = config.Config([ ('a', ' 1 '), ('b', ' x\n y '), ('c',...
from nose2 import config from nose2.compat import unittest class TestConfigSession(unittest.TestCase): def test_can_create_session(self): config.Session() def test_load_plugins_from_module_can_load_plugins(self): class fakemod: pass f = fakemod() class A(events.Plu...
Add test for as_list bugfix
Add test for as_list bugfix
Python
bsd-2-clause
ojengwa/nose2,little-dude/nose2,leth/nose2,leth/nose2,ptthiem/nose2,ptthiem/nose2,ezigman/nose2,ojengwa/nose2,ezigman/nose2,little-dude/nose2
from nose2 import config from nose2.compat import unittest class TestConfigSession(unittest.TestCase): def test_can_create_session(self): config.Session() class TestConfig(unittest.TestCase): def setUp(self): self.conf = config.Config([ ('a', ' 1 '), ('b', ' x\n y '), ('c',...
from nose2 import config from nose2.compat import unittest class TestConfigSession(unittest.TestCase): def test_can_create_session(self): config.Session() def test_load_plugins_from_module_can_load_plugins(self): class fakemod: pass f = fakemod() class A(events.Plu...
<commit_before>from nose2 import config from nose2.compat import unittest class TestConfigSession(unittest.TestCase): def test_can_create_session(self): config.Session() class TestConfig(unittest.TestCase): def setUp(self): self.conf = config.Config([ ('a', ' 1 '), ('b', ' x...
from nose2 import config from nose2.compat import unittest class TestConfigSession(unittest.TestCase): def test_can_create_session(self): config.Session() def test_load_plugins_from_module_can_load_plugins(self): class fakemod: pass f = fakemod() class A(events.Plu...
from nose2 import config from nose2.compat import unittest class TestConfigSession(unittest.TestCase): def test_can_create_session(self): config.Session() class TestConfig(unittest.TestCase): def setUp(self): self.conf = config.Config([ ('a', ' 1 '), ('b', ' x\n y '), ('c',...
<commit_before>from nose2 import config from nose2.compat import unittest class TestConfigSession(unittest.TestCase): def test_can_create_session(self): config.Session() class TestConfig(unittest.TestCase): def setUp(self): self.conf = config.Config([ ('a', ' 1 '), ('b', ' x...
a3df62c7da4aa29ab9977a0307e0634fd43e37e8
pywebfaction/exceptions.py
pywebfaction/exceptions.py
import ast EXCEPTION_TYPE_PREFIX = "<class 'webfaction_api.exceptions." EXCEPTION_TYPE_SUFFIX = "'>" def _parse_exc_type(exc_type): # This is horribly hacky, but there's not a particularly elegant # way to go from the exception type to a string representing that # exception. if not exc_type.startswi...
import ast EXCEPTION_TYPE_PREFIX = "<class 'webfaction_api.exceptions." EXCEPTION_TYPE_SUFFIX = "'>" def _parse_exc_type(exc_type): # This is horribly hacky, but there's not a particularly elegant # way to go from the exception type to a string representing that # exception. if not exc_type.startswi...
Make code immune to bad fault messages
Make code immune to bad fault messages
Python
bsd-3-clause
dominicrodger/pywebfaction,dominicrodger/pywebfaction
import ast EXCEPTION_TYPE_PREFIX = "<class 'webfaction_api.exceptions." EXCEPTION_TYPE_SUFFIX = "'>" def _parse_exc_type(exc_type): # This is horribly hacky, but there's not a particularly elegant # way to go from the exception type to a string representing that # exception. if not exc_type.startswi...
import ast EXCEPTION_TYPE_PREFIX = "<class 'webfaction_api.exceptions." EXCEPTION_TYPE_SUFFIX = "'>" def _parse_exc_type(exc_type): # This is horribly hacky, but there's not a particularly elegant # way to go from the exception type to a string representing that # exception. if not exc_type.startswi...
<commit_before>import ast EXCEPTION_TYPE_PREFIX = "<class 'webfaction_api.exceptions." EXCEPTION_TYPE_SUFFIX = "'>" def _parse_exc_type(exc_type): # This is horribly hacky, but there's not a particularly elegant # way to go from the exception type to a string representing that # exception. if not ex...
import ast EXCEPTION_TYPE_PREFIX = "<class 'webfaction_api.exceptions." EXCEPTION_TYPE_SUFFIX = "'>" def _parse_exc_type(exc_type): # This is horribly hacky, but there's not a particularly elegant # way to go from the exception type to a string representing that # exception. if not exc_type.startswi...
import ast EXCEPTION_TYPE_PREFIX = "<class 'webfaction_api.exceptions." EXCEPTION_TYPE_SUFFIX = "'>" def _parse_exc_type(exc_type): # This is horribly hacky, but there's not a particularly elegant # way to go from the exception type to a string representing that # exception. if not exc_type.startswi...
<commit_before>import ast EXCEPTION_TYPE_PREFIX = "<class 'webfaction_api.exceptions." EXCEPTION_TYPE_SUFFIX = "'>" def _parse_exc_type(exc_type): # This is horribly hacky, but there's not a particularly elegant # way to go from the exception type to a string representing that # exception. if not ex...
9f345963d1c8dc25818d2cf6716d40e6c90cb615
sentry/client/handlers.py
sentry/client/handlers.py
import logging import sys class SentryHandler(logging.Handler): def emit(self, record): from sentry.client.models import get_client from sentry.client.middleware import SentryLogMiddleware # Fetch the request from a threadlocal variable, if available request = getattr(SentryLogMidd...
import logging import sys class SentryHandler(logging.Handler): def emit(self, record): from sentry.client.models import get_client from sentry.client.middleware import SentryLogMiddleware # Fetch the request from a threadlocal variable, if available request = getattr(SentryLogMidd...
Format records before referencing the message attribute
Format records before referencing the message attribute
Python
bsd-3-clause
pauloschilling/sentry,ngonzalvez/sentry,gencer/sentry,camilonova/sentry,NickPresta/sentry,Natim/sentry,dbravender/raven-python,fuziontech/sentry,korealerts1/sentry,jmagnusson/raven-python,imankulov/sentry,felixbuenemann/sentry,songyi199111/sentry,jokey2k/sentry,SilentCircle/sentry,zenefits/sentry,jean/sentry,jbarbuto/r...
import logging import sys class SentryHandler(logging.Handler): def emit(self, record): from sentry.client.models import get_client from sentry.client.middleware import SentryLogMiddleware # Fetch the request from a threadlocal variable, if available request = getattr(SentryLogMidd...
import logging import sys class SentryHandler(logging.Handler): def emit(self, record): from sentry.client.models import get_client from sentry.client.middleware import SentryLogMiddleware # Fetch the request from a threadlocal variable, if available request = getattr(SentryLogMidd...
<commit_before>import logging import sys class SentryHandler(logging.Handler): def emit(self, record): from sentry.client.models import get_client from sentry.client.middleware import SentryLogMiddleware # Fetch the request from a threadlocal variable, if available request = getatt...
import logging import sys class SentryHandler(logging.Handler): def emit(self, record): from sentry.client.models import get_client from sentry.client.middleware import SentryLogMiddleware # Fetch the request from a threadlocal variable, if available request = getattr(SentryLogMidd...
import logging import sys class SentryHandler(logging.Handler): def emit(self, record): from sentry.client.models import get_client from sentry.client.middleware import SentryLogMiddleware # Fetch the request from a threadlocal variable, if available request = getattr(SentryLogMidd...
<commit_before>import logging import sys class SentryHandler(logging.Handler): def emit(self, record): from sentry.client.models import get_client from sentry.client.middleware import SentryLogMiddleware # Fetch the request from a threadlocal variable, if available request = getatt...
e7e21188daba6efe02d44c2cef9c1b48c45c0636
readthedocs/donate/urls.py
readthedocs/donate/urls.py
from django.conf.urls import url, patterns, include from . import views urlpatterns = patterns( '', url(r'^$', views.DonateListView.as_view(), name='donate'), url(r'^contribute/$', views.DonateCreateView.as_view(), name='donate_add'), url(r'^contribute/thanks$', views.DonateSuccessView.as_view(), nam...
from django.conf.urls import url, patterns, include from .views import DonateCreateView from .views import DonateListView from .views import DonateSuccessView urlpatterns = patterns( '', url(r'^$', DonateListView.as_view(), name='donate'), url(r'^contribute/$', DonateCreateView.as_view(), name='donate_ad...
Resolve linting messages in readthedocs.donate.*
Resolve linting messages in readthedocs.donate.*
Python
mit
mhils/readthedocs.org,wijerasa/readthedocs.org,davidfischer/readthedocs.org,atsuyim/readthedocs.org,CedarLogic/readthedocs.org,istresearch/readthedocs.org,wanghaven/readthedocs.org,atsuyim/readthedocs.org,CedarLogic/readthedocs.org,hach-que/readthedocs.org,mhils/readthedocs.org,kenwang76/readthedocs.org,kenwang76/readt...
from django.conf.urls import url, patterns, include from . import views urlpatterns = patterns( '', url(r'^$', views.DonateListView.as_view(), name='donate'), url(r'^contribute/$', views.DonateCreateView.as_view(), name='donate_add'), url(r'^contribute/thanks$', views.DonateSuccessView.as_view(), nam...
from django.conf.urls import url, patterns, include from .views import DonateCreateView from .views import DonateListView from .views import DonateSuccessView urlpatterns = patterns( '', url(r'^$', DonateListView.as_view(), name='donate'), url(r'^contribute/$', DonateCreateView.as_view(), name='donate_ad...
<commit_before>from django.conf.urls import url, patterns, include from . import views urlpatterns = patterns( '', url(r'^$', views.DonateListView.as_view(), name='donate'), url(r'^contribute/$', views.DonateCreateView.as_view(), name='donate_add'), url(r'^contribute/thanks$', views.DonateSuccessView...
from django.conf.urls import url, patterns, include from .views import DonateCreateView from .views import DonateListView from .views import DonateSuccessView urlpatterns = patterns( '', url(r'^$', DonateListView.as_view(), name='donate'), url(r'^contribute/$', DonateCreateView.as_view(), name='donate_ad...
from django.conf.urls import url, patterns, include from . import views urlpatterns = patterns( '', url(r'^$', views.DonateListView.as_view(), name='donate'), url(r'^contribute/$', views.DonateCreateView.as_view(), name='donate_add'), url(r'^contribute/thanks$', views.DonateSuccessView.as_view(), nam...
<commit_before>from django.conf.urls import url, patterns, include from . import views urlpatterns = patterns( '', url(r'^$', views.DonateListView.as_view(), name='donate'), url(r'^contribute/$', views.DonateCreateView.as_view(), name='donate_add'), url(r'^contribute/thanks$', views.DonateSuccessView...
650e0497c99500810f0fd1fc205e975892b26ff2
ibmcnx/doc/DataSources.py
ibmcnx/doc/DataSources.py
###### # Check ExId (GUID) by Email through JDBC # # Author: Christoph Stoettner # Mail: christoph.stoettner@stoeps.de # Documentation: http://scripting101.stoeps.de # # Version: 2.0 # Date: 2014-06-04 # # License: Apache 2.0 # # Check ExId of a User in all Connections Appli...
###### # Check ExId (GUID) by Email through JDBC # # Author: Christoph Stoettner # Mail: christoph.stoettner@stoeps.de # Documentation: http://scripting101.stoeps.de # # Version: 2.0 # Date: 2014-06-04 # # License: Apache 2.0 # # Check ExId of a User in all Connections Appli...
Create documentation of DataSource Settings
8: Create documentation of DataSource Settings Task-Url: http://github.com/stoeps13/ibmcnx2/issues/issue/8
Python
apache-2.0
stoeps13/ibmcnx2,stoeps13/ibmcnx2
###### # Check ExId (GUID) by Email through JDBC # # Author: Christoph Stoettner # Mail: christoph.stoettner@stoeps.de # Documentation: http://scripting101.stoeps.de # # Version: 2.0 # Date: 2014-06-04 # # License: Apache 2.0 # # Check ExId of a User in all Connections Appli...
###### # Check ExId (GUID) by Email through JDBC # # Author: Christoph Stoettner # Mail: christoph.stoettner@stoeps.de # Documentation: http://scripting101.stoeps.de # # Version: 2.0 # Date: 2014-06-04 # # License: Apache 2.0 # # Check ExId of a User in all Connections Appli...
<commit_before>###### # Check ExId (GUID) by Email through JDBC # # Author: Christoph Stoettner # Mail: christoph.stoettner@stoeps.de # Documentation: http://scripting101.stoeps.de # # Version: 2.0 # Date: 2014-06-04 # # License: Apache 2.0 # # Check ExId of a User in all Co...
###### # Check ExId (GUID) by Email through JDBC # # Author: Christoph Stoettner # Mail: christoph.stoettner@stoeps.de # Documentation: http://scripting101.stoeps.de # # Version: 2.0 # Date: 2014-06-04 # # License: Apache 2.0 # # Check ExId of a User in all Connections Appli...
###### # Check ExId (GUID) by Email through JDBC # # Author: Christoph Stoettner # Mail: christoph.stoettner@stoeps.de # Documentation: http://scripting101.stoeps.de # # Version: 2.0 # Date: 2014-06-04 # # License: Apache 2.0 # # Check ExId of a User in all Connections Appli...
<commit_before>###### # Check ExId (GUID) by Email through JDBC # # Author: Christoph Stoettner # Mail: christoph.stoettner@stoeps.de # Documentation: http://scripting101.stoeps.de # # Version: 2.0 # Date: 2014-06-04 # # License: Apache 2.0 # # Check ExId of a User in all Co...
a4eb952cc2e583d3b7786f5dea101d1e013c8159
services/controllers/utils.py
services/controllers/utils.py
def map_range(x, in_min, in_max, out_min, out_max): out_delta = out_max - out_min in_delta = in_max - in_min return (x - in_min) * out_delta / in_delta + out_min
def lerp(a, b, t): return (1.0 - t) * a + t * b def map_range(x, in_min, in_max, out_min, out_max): out_delta = out_max - out_min in_delta = in_max - in_min return (x - in_min) * out_delta / in_delta + out_min
Add function for linear interpolation (lerp)
Add function for linear interpolation (lerp)
Python
bsd-3-clause
gizmo-cda/g2x-submarine-v2,gizmo-cda/g2x-submarine-v2,gizmo-cda/g2x-submarine-v2,gizmo-cda/g2x-submarine-v2
def map_range(x, in_min, in_max, out_min, out_max): out_delta = out_max - out_min in_delta = in_max - in_min return (x - in_min) * out_delta / in_delta + out_min Add function for linear interpolation (lerp)
def lerp(a, b, t): return (1.0 - t) * a + t * b def map_range(x, in_min, in_max, out_min, out_max): out_delta = out_max - out_min in_delta = in_max - in_min return (x - in_min) * out_delta / in_delta + out_min
<commit_before>def map_range(x, in_min, in_max, out_min, out_max): out_delta = out_max - out_min in_delta = in_max - in_min return (x - in_min) * out_delta / in_delta + out_min <commit_msg>Add function for linear interpolation (lerp)<commit_after>
def lerp(a, b, t): return (1.0 - t) * a + t * b def map_range(x, in_min, in_max, out_min, out_max): out_delta = out_max - out_min in_delta = in_max - in_min return (x - in_min) * out_delta / in_delta + out_min
def map_range(x, in_min, in_max, out_min, out_max): out_delta = out_max - out_min in_delta = in_max - in_min return (x - in_min) * out_delta / in_delta + out_min Add function for linear interpolation (lerp)def lerp(a, b, t): return (1.0 - t) * a + t * b def map_range(x, in_min, in_max, out_min, out_m...
<commit_before>def map_range(x, in_min, in_max, out_min, out_max): out_delta = out_max - out_min in_delta = in_max - in_min return (x - in_min) * out_delta / in_delta + out_min <commit_msg>Add function for linear interpolation (lerp)<commit_after>def lerp(a, b, t): return (1.0 - t) * a + t * b def ma...
a509cd74d1e49dd9f9585b8e4c43e88aaf2bc19d
tests/stonemason/service/tileserver/test_tileserver.py
tests/stonemason/service/tileserver/test_tileserver.py
# -*- encoding: utf-8 -*- """ tests.stonemason.service.tileserver.test_tileserver ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Test interfaces of the tile server application. """ import os import unittest from stonemason.service.tileserver import AppBuilder class TestExample(unittest.TestCase): ...
# -*- encoding: utf-8 -*- """ tests.stonemason.service.tileserver.test_tileserver ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Test interfaces of the tile server application. """ import os import unittest from stonemason.service.tileserver import AppBuilder class TestExample(unittest.TestCase): ...
Update tests for the test app
TEST: Update tests for the test app
Python
mit
Kotaimen/stonemason,Kotaimen/stonemason
# -*- encoding: utf-8 -*- """ tests.stonemason.service.tileserver.test_tileserver ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Test interfaces of the tile server application. """ import os import unittest from stonemason.service.tileserver import AppBuilder class TestExample(unittest.TestCase): ...
# -*- encoding: utf-8 -*- """ tests.stonemason.service.tileserver.test_tileserver ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Test interfaces of the tile server application. """ import os import unittest from stonemason.service.tileserver import AppBuilder class TestExample(unittest.TestCase): ...
<commit_before># -*- encoding: utf-8 -*- """ tests.stonemason.service.tileserver.test_tileserver ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Test interfaces of the tile server application. """ import os import unittest from stonemason.service.tileserver import AppBuilder class TestExample(unitt...
# -*- encoding: utf-8 -*- """ tests.stonemason.service.tileserver.test_tileserver ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Test interfaces of the tile server application. """ import os import unittest from stonemason.service.tileserver import AppBuilder class TestExample(unittest.TestCase): ...
# -*- encoding: utf-8 -*- """ tests.stonemason.service.tileserver.test_tileserver ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Test interfaces of the tile server application. """ import os import unittest from stonemason.service.tileserver import AppBuilder class TestExample(unittest.TestCase): ...
<commit_before># -*- encoding: utf-8 -*- """ tests.stonemason.service.tileserver.test_tileserver ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Test interfaces of the tile server application. """ import os import unittest from stonemason.service.tileserver import AppBuilder class TestExample(unitt...
7b66af8bea8e6c25e3c2f88efc22875504e8f87a
openstates/events.py
openstates/events.py
from pupa.scrape import Event from .base import OpenstatesBaseScraper import dateutil.parser dparse = lambda x: dateutil.parser.parse(x) if x else None class OpenstatesEventScraper(OpenstatesBaseScraper): def scrape(self): method = 'events/?state={}&dtstart=1776-07-04'.format(self.state) self.e...
from pupa.scrape import Event from .base import OpenstatesBaseScraper import dateutil.parser dparse = lambda x: dateutil.parser.parse(x) if x else None class OpenstatesEventScraper(OpenstatesBaseScraper): def scrape(self): method = 'events/?state={}&dtstart=1776-07-04'.format(self.state) self.e...
Add more keys in; validation
Add more keys in; validation
Python
bsd-3-clause
openstates/billy,sunlightlabs/billy,sunlightlabs/billy,openstates/billy,sunlightlabs/billy,openstates/billy
from pupa.scrape import Event from .base import OpenstatesBaseScraper import dateutil.parser dparse = lambda x: dateutil.parser.parse(x) if x else None class OpenstatesEventScraper(OpenstatesBaseScraper): def scrape(self): method = 'events/?state={}&dtstart=1776-07-04'.format(self.state) self.e...
from pupa.scrape import Event from .base import OpenstatesBaseScraper import dateutil.parser dparse = lambda x: dateutil.parser.parse(x) if x else None class OpenstatesEventScraper(OpenstatesBaseScraper): def scrape(self): method = 'events/?state={}&dtstart=1776-07-04'.format(self.state) self.e...
<commit_before>from pupa.scrape import Event from .base import OpenstatesBaseScraper import dateutil.parser dparse = lambda x: dateutil.parser.parse(x) if x else None class OpenstatesEventScraper(OpenstatesBaseScraper): def scrape(self): method = 'events/?state={}&dtstart=1776-07-04'.format(self.state)...
from pupa.scrape import Event from .base import OpenstatesBaseScraper import dateutil.parser dparse = lambda x: dateutil.parser.parse(x) if x else None class OpenstatesEventScraper(OpenstatesBaseScraper): def scrape(self): method = 'events/?state={}&dtstart=1776-07-04'.format(self.state) self.e...
from pupa.scrape import Event from .base import OpenstatesBaseScraper import dateutil.parser dparse = lambda x: dateutil.parser.parse(x) if x else None class OpenstatesEventScraper(OpenstatesBaseScraper): def scrape(self): method = 'events/?state={}&dtstart=1776-07-04'.format(self.state) self.e...
<commit_before>from pupa.scrape import Event from .base import OpenstatesBaseScraper import dateutil.parser dparse = lambda x: dateutil.parser.parse(x) if x else None class OpenstatesEventScraper(OpenstatesBaseScraper): def scrape(self): method = 'events/?state={}&dtstart=1776-07-04'.format(self.state)...
14bd2c0732b5871ac43991a237a8f12a334e982d
sirius/LI_V00/__init__.py
sirius/LI_V00/__init__.py
from . import lattice as _lattice from . import accelerator as _accelerator from . import record_names create_accelerator = accelerator.create_accelerator # -- default accelerator values for LI_V00 -- energy = _lattice._energy single_bunch_charge = _lattice._single_bunch_charge multi_bunch_charge = _lattice...
from . import lattice as _lattice from . import accelerator as _accelerator from . import record_names create_accelerator = accelerator.create_accelerator # -- default accelerator values for LI_V00 -- energy = _lattice._energy single_bunch_charge = _lattice._single_bunch_charge multi_bunch_charge = _lattice...
Add parameters of initial beam distribution at LI
Add parameters of initial beam distribution at LI
Python
mit
lnls-fac/sirius
from . import lattice as _lattice from . import accelerator as _accelerator from . import record_names create_accelerator = accelerator.create_accelerator # -- default accelerator values for LI_V00 -- energy = _lattice._energy single_bunch_charge = _lattice._single_bunch_charge multi_bunch_charge = _lattice...
from . import lattice as _lattice from . import accelerator as _accelerator from . import record_names create_accelerator = accelerator.create_accelerator # -- default accelerator values for LI_V00 -- energy = _lattice._energy single_bunch_charge = _lattice._single_bunch_charge multi_bunch_charge = _lattice...
<commit_before>from . import lattice as _lattice from . import accelerator as _accelerator from . import record_names create_accelerator = accelerator.create_accelerator # -- default accelerator values for LI_V00 -- energy = _lattice._energy single_bunch_charge = _lattice._single_bunch_charge multi_bunch_charge ...
from . import lattice as _lattice from . import accelerator as _accelerator from . import record_names create_accelerator = accelerator.create_accelerator # -- default accelerator values for LI_V00 -- energy = _lattice._energy single_bunch_charge = _lattice._single_bunch_charge multi_bunch_charge = _lattice...
from . import lattice as _lattice from . import accelerator as _accelerator from . import record_names create_accelerator = accelerator.create_accelerator # -- default accelerator values for LI_V00 -- energy = _lattice._energy single_bunch_charge = _lattice._single_bunch_charge multi_bunch_charge = _lattice...
<commit_before>from . import lattice as _lattice from . import accelerator as _accelerator from . import record_names create_accelerator = accelerator.create_accelerator # -- default accelerator values for LI_V00 -- energy = _lattice._energy single_bunch_charge = _lattice._single_bunch_charge multi_bunch_charge ...
c3ead28e278e2b4e3d44071fb891fa54de46b237
shopping_app/utils/helpers.py
shopping_app/utils/helpers.py
import os import random import string from datetime import date, datetime def random_name(): return ''.join([random.choice(string.ascii_lowercase + string.digits) for n in range(20)]) def json_serial(obj): """JSON serializer for objects not serializable by default json code""" if isinstance(obj, (datet...
import os import random import string from datetime import date, datetime def random_name(): return ''.join([random.choice(string.ascii_lowercase + string.digits) for n in range(20)]) def json_serial(obj): """JSON serializer for objects not serializable by default json code""" if isinstance(obj, (datet...
Update generate_secret function to the root of the app
Update generate_secret function to the root of the app
Python
mit
gr1d99/shopping-list,gr1d99/shopping-list,gr1d99/shopping-list
import os import random import string from datetime import date, datetime def random_name(): return ''.join([random.choice(string.ascii_lowercase + string.digits) for n in range(20)]) def json_serial(obj): """JSON serializer for objects not serializable by default json code""" if isinstance(obj, (datet...
import os import random import string from datetime import date, datetime def random_name(): return ''.join([random.choice(string.ascii_lowercase + string.digits) for n in range(20)]) def json_serial(obj): """JSON serializer for objects not serializable by default json code""" if isinstance(obj, (datet...
<commit_before>import os import random import string from datetime import date, datetime def random_name(): return ''.join([random.choice(string.ascii_lowercase + string.digits) for n in range(20)]) def json_serial(obj): """JSON serializer for objects not serializable by default json code""" if isinsta...
import os import random import string from datetime import date, datetime def random_name(): return ''.join([random.choice(string.ascii_lowercase + string.digits) for n in range(20)]) def json_serial(obj): """JSON serializer for objects not serializable by default json code""" if isinstance(obj, (datet...
import os import random import string from datetime import date, datetime def random_name(): return ''.join([random.choice(string.ascii_lowercase + string.digits) for n in range(20)]) def json_serial(obj): """JSON serializer for objects not serializable by default json code""" if isinstance(obj, (datet...
<commit_before>import os import random import string from datetime import date, datetime def random_name(): return ''.join([random.choice(string.ascii_lowercase + string.digits) for n in range(20)]) def json_serial(obj): """JSON serializer for objects not serializable by default json code""" if isinsta...
22a5985cfd29b87a1215a6a38d5ab07ab19e7508
auth_backends/__init__.py
auth_backends/__init__.py
""" Django authentication backends. These package is designed to be used primarily with Open edX Django projects, but should be compatible with non-edX projects as well. """ __version__ = '2.0.0' # pragma: no cover
""" Django authentication backends. These package is designed to be used primarily with Open edX Django projects, but should be compatible with non-edX projects as well. """ __version__ = '2.0.1' # pragma: no cover
Create new Version for auth-backends for release
Create new Version for auth-backends for release
Python
agpl-3.0
edx/auth-backends
""" Django authentication backends. These package is designed to be used primarily with Open edX Django projects, but should be compatible with non-edX projects as well. """ __version__ = '2.0.0' # pragma: no cover Create new Version for auth-backends for release
""" Django authentication backends. These package is designed to be used primarily with Open edX Django projects, but should be compatible with non-edX projects as well. """ __version__ = '2.0.1' # pragma: no cover
<commit_before>""" Django authentication backends. These package is designed to be used primarily with Open edX Django projects, but should be compatible with non-edX projects as well. """ __version__ = '2.0.0' # pragma: no cover <commit_msg>Create new Version for auth-backends for release<commit_after>
""" Django authentication backends. These package is designed to be used primarily with Open edX Django projects, but should be compatible with non-edX projects as well. """ __version__ = '2.0.1' # pragma: no cover
""" Django authentication backends. These package is designed to be used primarily with Open edX Django projects, but should be compatible with non-edX projects as well. """ __version__ = '2.0.0' # pragma: no cover Create new Version for auth-backends for release""" Django authentication backends. These package i...
<commit_before>""" Django authentication backends. These package is designed to be used primarily with Open edX Django projects, but should be compatible with non-edX projects as well. """ __version__ = '2.0.0' # pragma: no cover <commit_msg>Create new Version for auth-backends for release<commit_after>""" Django a...
61448043a039543c38c5ca7b9828792cfc8afbb8
justwatch/justwatchapi.py
justwatch/justwatchapi.py
import requests from babel import Locale class JustWatch: def __init__(self, country='AU', **kwargs): self.kwargs = kwargs self.country = country self.language = Locale.parse('und_{}'.format(self.country)).language def search_for_item(self, **kwargs): if kwargs: self.kwargs = kwargs null = None pay...
import requests from babel import Locale class JustWatch: def __init__(self, country='AU', **kwargs): self.kwargs = kwargs self.country = country self.language = Locale.parse('und_{}'.format(self.country)).language def search_for_item(self, **kwargs): if kwargs: self.kwargs = kwargs null = None pay...
Check and raise HTTP errors
Check and raise HTTP errors
Python
mit
dawoudt/JustWatchAPI
import requests from babel import Locale class JustWatch: def __init__(self, country='AU', **kwargs): self.kwargs = kwargs self.country = country self.language = Locale.parse('und_{}'.format(self.country)).language def search_for_item(self, **kwargs): if kwargs: self.kwargs = kwargs null = None pay...
import requests from babel import Locale class JustWatch: def __init__(self, country='AU', **kwargs): self.kwargs = kwargs self.country = country self.language = Locale.parse('und_{}'.format(self.country)).language def search_for_item(self, **kwargs): if kwargs: self.kwargs = kwargs null = None pay...
<commit_before>import requests from babel import Locale class JustWatch: def __init__(self, country='AU', **kwargs): self.kwargs = kwargs self.country = country self.language = Locale.parse('und_{}'.format(self.country)).language def search_for_item(self, **kwargs): if kwargs: self.kwargs = kwargs nu...
import requests from babel import Locale class JustWatch: def __init__(self, country='AU', **kwargs): self.kwargs = kwargs self.country = country self.language = Locale.parse('und_{}'.format(self.country)).language def search_for_item(self, **kwargs): if kwargs: self.kwargs = kwargs null = None pay...
import requests from babel import Locale class JustWatch: def __init__(self, country='AU', **kwargs): self.kwargs = kwargs self.country = country self.language = Locale.parse('und_{}'.format(self.country)).language def search_for_item(self, **kwargs): if kwargs: self.kwargs = kwargs null = None pay...
<commit_before>import requests from babel import Locale class JustWatch: def __init__(self, country='AU', **kwargs): self.kwargs = kwargs self.country = country self.language = Locale.parse('und_{}'.format(self.country)).language def search_for_item(self, **kwargs): if kwargs: self.kwargs = kwargs nu...
fc70feec85f0b22ebef05b0fa1316214a48a465a
background/config/prod.py
background/config/prod.py
from decouple import config from .base import BaseCeleryConfig class CeleryProduction(BaseCeleryConfig): enable_utc = config('CELERY_ENABLE_UTC', default=True, cast=bool) broker_url = config('CELERY_BROKER_URL') result_backend = config('CELERY_RESULT_BACKEND')
from decouple import config from .base import BaseCeleryConfig REDIS_URL = config('REDIS_URL') class CeleryProduction(BaseCeleryConfig): enable_utc = config('CELERY_ENABLE_UTC', default=True, cast=bool) broker_url = config('CELERY_BROKER_URL', default=REDIS_URL) result_backend = ...
Use REDIS_URL by default for Celery
Use REDIS_URL by default for Celery
Python
mit
RaitoBezarius/ryuzu-fb-bot
from decouple import config from .base import BaseCeleryConfig class CeleryProduction(BaseCeleryConfig): enable_utc = config('CELERY_ENABLE_UTC', default=True, cast=bool) broker_url = config('CELERY_BROKER_URL') result_backend = config('CELERY_RESULT_BACKEND') Use REDIS_URL by default for Celery
from decouple import config from .base import BaseCeleryConfig REDIS_URL = config('REDIS_URL') class CeleryProduction(BaseCeleryConfig): enable_utc = config('CELERY_ENABLE_UTC', default=True, cast=bool) broker_url = config('CELERY_BROKER_URL', default=REDIS_URL) result_backend = ...
<commit_before>from decouple import config from .base import BaseCeleryConfig class CeleryProduction(BaseCeleryConfig): enable_utc = config('CELERY_ENABLE_UTC', default=True, cast=bool) broker_url = config('CELERY_BROKER_URL') result_backend = config('CELERY_RESULT_BACKEND') <commit_msg>Use REDIS_URL by ...
from decouple import config from .base import BaseCeleryConfig REDIS_URL = config('REDIS_URL') class CeleryProduction(BaseCeleryConfig): enable_utc = config('CELERY_ENABLE_UTC', default=True, cast=bool) broker_url = config('CELERY_BROKER_URL', default=REDIS_URL) result_backend = ...
from decouple import config from .base import BaseCeleryConfig class CeleryProduction(BaseCeleryConfig): enable_utc = config('CELERY_ENABLE_UTC', default=True, cast=bool) broker_url = config('CELERY_BROKER_URL') result_backend = config('CELERY_RESULT_BACKEND') Use REDIS_URL by default for Celeryfrom deco...
<commit_before>from decouple import config from .base import BaseCeleryConfig class CeleryProduction(BaseCeleryConfig): enable_utc = config('CELERY_ENABLE_UTC', default=True, cast=bool) broker_url = config('CELERY_BROKER_URL') result_backend = config('CELERY_RESULT_BACKEND') <commit_msg>Use REDIS_URL by ...
431b8db027ce016a957a744ed38f833031e93070
syncplay/__init__.py
syncplay/__init__.py
version = '1.3.0' milestone = 'Chami' release_number = '5' projectURL = 'http://syncplay.pl/'
version = '1.3.0' milestone = 'Chami' release_number = '6' projectURL = 'http://syncplay.pl/'
Move up to release 6 (1.3.0 Beta 3b)
Move up to release 6 (1.3.0 Beta 3b)
Python
apache-2.0
NeverDecaf/syncplay,alby128/syncplay,alby128/syncplay,Syncplay/syncplay,NeverDecaf/syncplay,Syncplay/syncplay
version = '1.3.0' milestone = 'Chami' release_number = '5' projectURL = 'http://syncplay.pl/' Move up to release 6 (1.3.0 Beta 3b)
version = '1.3.0' milestone = 'Chami' release_number = '6' projectURL = 'http://syncplay.pl/'
<commit_before>version = '1.3.0' milestone = 'Chami' release_number = '5' projectURL = 'http://syncplay.pl/' <commit_msg>Move up to release 6 (1.3.0 Beta 3b)<commit_after>
version = '1.3.0' milestone = 'Chami' release_number = '6' projectURL = 'http://syncplay.pl/'
version = '1.3.0' milestone = 'Chami' release_number = '5' projectURL = 'http://syncplay.pl/' Move up to release 6 (1.3.0 Beta 3b)version = '1.3.0' milestone = 'Chami' release_number = '6' projectURL = 'http://syncplay.pl/'
<commit_before>version = '1.3.0' milestone = 'Chami' release_number = '5' projectURL = 'http://syncplay.pl/' <commit_msg>Move up to release 6 (1.3.0 Beta 3b)<commit_after>version = '1.3.0' milestone = 'Chami' release_number = '6' projectURL = 'http://syncplay.pl/'
dd0cef83edbd3849484b7fc0ec5cb6372f99bb3a
batchflow/models/utils.py
batchflow/models/utils.py
""" Auxiliary functions for models """ def unpack_args(args, layer_no, layers_max): """ Return layer parameters """ new_args = {} for arg in args: if isinstance(args[arg], list) and layers_max > 1: if len(args[arg]) >= layers_max: arg_value = args[arg][layer_no] ...
""" Auxiliary functions for models """ def unpack_args(args, layer_no, layers_max): """ Return layer parameters """ new_args = {} for arg in args: if isinstance(args[arg], list): if len(args[arg]) >= layers_max: arg_value = args[arg][layer_no] else: ...
Allow for 1 arg in a list
Allow for 1 arg in a list
Python
apache-2.0
analysiscenter/dataset
""" Auxiliary functions for models """ def unpack_args(args, layer_no, layers_max): """ Return layer parameters """ new_args = {} for arg in args: if isinstance(args[arg], list) and layers_max > 1: if len(args[arg]) >= layers_max: arg_value = args[arg][layer_no] ...
""" Auxiliary functions for models """ def unpack_args(args, layer_no, layers_max): """ Return layer parameters """ new_args = {} for arg in args: if isinstance(args[arg], list): if len(args[arg]) >= layers_max: arg_value = args[arg][layer_no] else: ...
<commit_before>""" Auxiliary functions for models """ def unpack_args(args, layer_no, layers_max): """ Return layer parameters """ new_args = {} for arg in args: if isinstance(args[arg], list) and layers_max > 1: if len(args[arg]) >= layers_max: arg_value = args[arg][la...
""" Auxiliary functions for models """ def unpack_args(args, layer_no, layers_max): """ Return layer parameters """ new_args = {} for arg in args: if isinstance(args[arg], list): if len(args[arg]) >= layers_max: arg_value = args[arg][layer_no] else: ...
""" Auxiliary functions for models """ def unpack_args(args, layer_no, layers_max): """ Return layer parameters """ new_args = {} for arg in args: if isinstance(args[arg], list) and layers_max > 1: if len(args[arg]) >= layers_max: arg_value = args[arg][layer_no] ...
<commit_before>""" Auxiliary functions for models """ def unpack_args(args, layer_no, layers_max): """ Return layer parameters """ new_args = {} for arg in args: if isinstance(args[arg], list) and layers_max > 1: if len(args[arg]) >= layers_max: arg_value = args[arg][la...
5c3863fdb366f857fb25b88c2e47508f23660cf3
tests/test_socket.py
tests/test_socket.py
import socket from unittest import TestCase try: from unitetest import mock except ImportError: import mock from routeros_api import api_socket class TestSocketWrapper(TestCase): def test_socket(self): inner = mock.Mock() wrapper = api_socket.SocketWrapper(inner) inner.recv.side_e...
import socket from unittest import TestCase try: from unitetest import mock except ImportError: import mock from routeros_api import api_socket class TestSocketWrapper(TestCase): def test_socket(self): inner = mock.Mock() wrapper = api_socket.SocketWrapper(inner) inner.recv.side_e...
Fix python2.6 compatibility in tests.
Fix python2.6 compatibility in tests.
Python
mit
kramarz/RouterOS-api,socialwifi/RouterOS-api,pozytywnie/RouterOS-api
import socket from unittest import TestCase try: from unitetest import mock except ImportError: import mock from routeros_api import api_socket class TestSocketWrapper(TestCase): def test_socket(self): inner = mock.Mock() wrapper = api_socket.SocketWrapper(inner) inner.recv.side_e...
import socket from unittest import TestCase try: from unitetest import mock except ImportError: import mock from routeros_api import api_socket class TestSocketWrapper(TestCase): def test_socket(self): inner = mock.Mock() wrapper = api_socket.SocketWrapper(inner) inner.recv.side_e...
<commit_before>import socket from unittest import TestCase try: from unitetest import mock except ImportError: import mock from routeros_api import api_socket class TestSocketWrapper(TestCase): def test_socket(self): inner = mock.Mock() wrapper = api_socket.SocketWrapper(inner) in...
import socket from unittest import TestCase try: from unitetest import mock except ImportError: import mock from routeros_api import api_socket class TestSocketWrapper(TestCase): def test_socket(self): inner = mock.Mock() wrapper = api_socket.SocketWrapper(inner) inner.recv.side_e...
import socket from unittest import TestCase try: from unitetest import mock except ImportError: import mock from routeros_api import api_socket class TestSocketWrapper(TestCase): def test_socket(self): inner = mock.Mock() wrapper = api_socket.SocketWrapper(inner) inner.recv.side_e...
<commit_before>import socket from unittest import TestCase try: from unitetest import mock except ImportError: import mock from routeros_api import api_socket class TestSocketWrapper(TestCase): def test_socket(self): inner = mock.Mock() wrapper = api_socket.SocketWrapper(inner) in...
8581d3bb9a0066b872dc8daddfde070fdcda7b89
docs/conf.py
docs/conf.py
from __future__ import unicode_literals import os import sys extensions = [] templates_path = [] source_suffix = ".rst" master_doc = "index" project = "django-user-accounts" copyright_holder = "James Tauber and contributors" copyright = "2013, {0}",format(copyright_holder) exclude_patterns = ["_build"] pygments_styl...
from __future__ import unicode_literals import os import sys extensions = [] templates_path = [] source_suffix = ".rst" master_doc = "index" project = "django-user-accounts" copyright_holder = "James Tauber and contributors" copyright = "2014, {0}",format(copyright_holder) exclude_patterns = ["_build"] pygments_styl...
Increment the year in the copyright
Increment the year in the copyright
Python
mit
jmburbach/django-user-accounts,mysociety/django-user-accounts,jpotterm/django-user-accounts,mgpyh/django-user-accounts,GeoNode/geonode-user-accounts,mentholi/django-user-accounts,ntucker/django-user-accounts,pinax/django-user-accounts,osmfj/django-user-accounts,pinax/django-user-accounts,jawed123/django-user-accounts,j...
from __future__ import unicode_literals import os import sys extensions = [] templates_path = [] source_suffix = ".rst" master_doc = "index" project = "django-user-accounts" copyright_holder = "James Tauber and contributors" copyright = "2013, {0}",format(copyright_holder) exclude_patterns = ["_build"] pygments_styl...
from __future__ import unicode_literals import os import sys extensions = [] templates_path = [] source_suffix = ".rst" master_doc = "index" project = "django-user-accounts" copyright_holder = "James Tauber and contributors" copyright = "2014, {0}",format(copyright_holder) exclude_patterns = ["_build"] pygments_styl...
<commit_before>from __future__ import unicode_literals import os import sys extensions = [] templates_path = [] source_suffix = ".rst" master_doc = "index" project = "django-user-accounts" copyright_holder = "James Tauber and contributors" copyright = "2013, {0}",format(copyright_holder) exclude_patterns = ["_build"...
from __future__ import unicode_literals import os import sys extensions = [] templates_path = [] source_suffix = ".rst" master_doc = "index" project = "django-user-accounts" copyright_holder = "James Tauber and contributors" copyright = "2014, {0}",format(copyright_holder) exclude_patterns = ["_build"] pygments_styl...
from __future__ import unicode_literals import os import sys extensions = [] templates_path = [] source_suffix = ".rst" master_doc = "index" project = "django-user-accounts" copyright_holder = "James Tauber and contributors" copyright = "2013, {0}",format(copyright_holder) exclude_patterns = ["_build"] pygments_styl...
<commit_before>from __future__ import unicode_literals import os import sys extensions = [] templates_path = [] source_suffix = ".rst" master_doc = "index" project = "django-user-accounts" copyright_holder = "James Tauber and contributors" copyright = "2013, {0}",format(copyright_holder) exclude_patterns = ["_build"...
fd76a19b399bb52dc2cd69fda9bbfed912c8a407
docs/conf.py
docs/conf.py
# -*- coding: utf-8 -*- import sys import os from glob import glob # ------------------------------------------------------------------------- # Configure extensions extensions = [ 'sphinx.ext.autodoc', ] # ------------------------------------------------------------------------- # General configuration projec...
# -*- coding: utf-8 -*- import sys import os from glob import glob # ------------------------------------------------------------------------- # Configure extensions extensions = [ 'sphinx.ext.autodoc', ] # ------------------------------------------------------------------------- # Helper function for retrievin...
Add retrieval of docs version from VERSION.txt
Add retrieval of docs version from VERSION.txt
Python
apache-2.0
t4ngo/sphinxcontrib-traceables
# -*- coding: utf-8 -*- import sys import os from glob import glob # ------------------------------------------------------------------------- # Configure extensions extensions = [ 'sphinx.ext.autodoc', ] # ------------------------------------------------------------------------- # General configuration projec...
# -*- coding: utf-8 -*- import sys import os from glob import glob # ------------------------------------------------------------------------- # Configure extensions extensions = [ 'sphinx.ext.autodoc', ] # ------------------------------------------------------------------------- # Helper function for retrievin...
<commit_before># -*- coding: utf-8 -*- import sys import os from glob import glob # ------------------------------------------------------------------------- # Configure extensions extensions = [ 'sphinx.ext.autodoc', ] # ------------------------------------------------------------------------- # General config...
# -*- coding: utf-8 -*- import sys import os from glob import glob # ------------------------------------------------------------------------- # Configure extensions extensions = [ 'sphinx.ext.autodoc', ] # ------------------------------------------------------------------------- # Helper function for retrievin...
# -*- coding: utf-8 -*- import sys import os from glob import glob # ------------------------------------------------------------------------- # Configure extensions extensions = [ 'sphinx.ext.autodoc', ] # ------------------------------------------------------------------------- # General configuration projec...
<commit_before># -*- coding: utf-8 -*- import sys import os from glob import glob # ------------------------------------------------------------------------- # Configure extensions extensions = [ 'sphinx.ext.autodoc', ] # ------------------------------------------------------------------------- # General config...
d7c5001f2109b7e97fbb5f8f82282f8187683365
docs/conf.py
docs/conf.py
import os import sdv project = u'stix-validator' copyright = u'2015, The MITRE Corporation' version = sdv.__version__ release = version extensions = [ 'sphinx.ext.autodoc', 'sphinxcontrib.napoleon', ] templates_path = ['_templates'] source_suffix = '.rst' master_doc = 'index' rst_prolog = """ **Version**: ...
import os import sdv project = u'stix-validator' copyright = u'2015, The MITRE Corporation' version = sdv.__version__ release = version extensions = [ 'sphinx.ext.autodoc', 'sphinxcontrib.napoleon', ] templates_path = ['_templates'] source_suffix = '.rst' master_doc = 'index' rst_prolog = """ **Version**: ...
Fix zero-length field error when building docs in Python 2.6
Fix zero-length field error when building docs in Python 2.6
Python
bsd-3-clause
pombredanne/stix-validator,STIXProject/stix-validator
import os import sdv project = u'stix-validator' copyright = u'2015, The MITRE Corporation' version = sdv.__version__ release = version extensions = [ 'sphinx.ext.autodoc', 'sphinxcontrib.napoleon', ] templates_path = ['_templates'] source_suffix = '.rst' master_doc = 'index' rst_prolog = """ **Version**: ...
import os import sdv project = u'stix-validator' copyright = u'2015, The MITRE Corporation' version = sdv.__version__ release = version extensions = [ 'sphinx.ext.autodoc', 'sphinxcontrib.napoleon', ] templates_path = ['_templates'] source_suffix = '.rst' master_doc = 'index' rst_prolog = """ **Version**: ...
<commit_before>import os import sdv project = u'stix-validator' copyright = u'2015, The MITRE Corporation' version = sdv.__version__ release = version extensions = [ 'sphinx.ext.autodoc', 'sphinxcontrib.napoleon', ] templates_path = ['_templates'] source_suffix = '.rst' master_doc = 'index' rst_prolog = ""...
import os import sdv project = u'stix-validator' copyright = u'2015, The MITRE Corporation' version = sdv.__version__ release = version extensions = [ 'sphinx.ext.autodoc', 'sphinxcontrib.napoleon', ] templates_path = ['_templates'] source_suffix = '.rst' master_doc = 'index' rst_prolog = """ **Version**: ...
import os import sdv project = u'stix-validator' copyright = u'2015, The MITRE Corporation' version = sdv.__version__ release = version extensions = [ 'sphinx.ext.autodoc', 'sphinxcontrib.napoleon', ] templates_path = ['_templates'] source_suffix = '.rst' master_doc = 'index' rst_prolog = """ **Version**: ...
<commit_before>import os import sdv project = u'stix-validator' copyright = u'2015, The MITRE Corporation' version = sdv.__version__ release = version extensions = [ 'sphinx.ext.autodoc', 'sphinxcontrib.napoleon', ] templates_path = ['_templates'] source_suffix = '.rst' master_doc = 'index' rst_prolog = ""...
889473ba81816aa0ad349823515843c337a6b985
benchexec/tools/deagle.py
benchexec/tools/deagle.py
# This file is part of BenchExec, a framework for reliable benchmarking: # https://github.com/sosy-lab/benchexec # # SPDX-FileCopyrightText: 2007-2020 Dirk Beyer <https://www.sosy-lab.org> # # SPDX-License-Identifier: Apache-2.0 import benchexec.result as result import benchexec.util as util import benchexec.tools.tem...
# This file is part of BenchExec, a framework for reliable benchmarking: # https://github.com/sosy-lab/benchexec # # SPDX-FileCopyrightText: 2007-2020 Dirk Beyer <https://www.sosy-lab.org> # # SPDX-License-Identifier: Apache-2.0 import benchexec.result as result import benchexec.util as util import benchexec.tools.tem...
Move --closure and --no-unwinding-assertions to bench-defs; rewrite choices between --32 and --64
Move --closure and --no-unwinding-assertions to bench-defs; rewrite choices between --32 and --64
Python
apache-2.0
ultimate-pa/benchexec,sosy-lab/benchexec,sosy-lab/benchexec,ultimate-pa/benchexec,ultimate-pa/benchexec,ultimate-pa/benchexec,ultimate-pa/benchexec,sosy-lab/benchexec,ultimate-pa/benchexec,sosy-lab/benchexec,sosy-lab/benchexec,sosy-lab/benchexec
# This file is part of BenchExec, a framework for reliable benchmarking: # https://github.com/sosy-lab/benchexec # # SPDX-FileCopyrightText: 2007-2020 Dirk Beyer <https://www.sosy-lab.org> # # SPDX-License-Identifier: Apache-2.0 import benchexec.result as result import benchexec.util as util import benchexec.tools.tem...
# This file is part of BenchExec, a framework for reliable benchmarking: # https://github.com/sosy-lab/benchexec # # SPDX-FileCopyrightText: 2007-2020 Dirk Beyer <https://www.sosy-lab.org> # # SPDX-License-Identifier: Apache-2.0 import benchexec.result as result import benchexec.util as util import benchexec.tools.tem...
<commit_before># This file is part of BenchExec, a framework for reliable benchmarking: # https://github.com/sosy-lab/benchexec # # SPDX-FileCopyrightText: 2007-2020 Dirk Beyer <https://www.sosy-lab.org> # # SPDX-License-Identifier: Apache-2.0 import benchexec.result as result import benchexec.util as util import benc...
# This file is part of BenchExec, a framework for reliable benchmarking: # https://github.com/sosy-lab/benchexec # # SPDX-FileCopyrightText: 2007-2020 Dirk Beyer <https://www.sosy-lab.org> # # SPDX-License-Identifier: Apache-2.0 import benchexec.result as result import benchexec.util as util import benchexec.tools.tem...
# This file is part of BenchExec, a framework for reliable benchmarking: # https://github.com/sosy-lab/benchexec # # SPDX-FileCopyrightText: 2007-2020 Dirk Beyer <https://www.sosy-lab.org> # # SPDX-License-Identifier: Apache-2.0 import benchexec.result as result import benchexec.util as util import benchexec.tools.tem...
<commit_before># This file is part of BenchExec, a framework for reliable benchmarking: # https://github.com/sosy-lab/benchexec # # SPDX-FileCopyrightText: 2007-2020 Dirk Beyer <https://www.sosy-lab.org> # # SPDX-License-Identifier: Apache-2.0 import benchexec.result as result import benchexec.util as util import benc...
6bc1f6e466fa09dd0bc6a076f9081e1aa03efdc7
examples/translations/dutch_test_1.py
examples/translations/dutch_test_1.py
# Dutch Language Test from seleniumbase.translate.dutch import Testgeval class MijnTestklasse(Testgeval): def test_voorbeeld_1(self): self.openen("https://nl.wikipedia.org/wiki/Hoofdpagina") self.controleren_element('a[title*="hoofdpagina gaan"]') self.controleren_tekst("Welkom op Wikiped...
# Dutch Language Test from seleniumbase.translate.dutch import Testgeval class MijnTestklasse(Testgeval): def test_voorbeeld_1(self): self.openen("https://nl.wikipedia.org/wiki/Hoofdpagina") self.controleren_element('a[title*="hoofdpagina gaan"]') self.controleren_tekst("Welkom op Wikiped...
Update the Dutch example test
Update the Dutch example test
Python
mit
seleniumbase/SeleniumBase,seleniumbase/SeleniumBase,mdmintz/SeleniumBase,mdmintz/SeleniumBase,mdmintz/SeleniumBase,seleniumbase/SeleniumBase,seleniumbase/SeleniumBase,mdmintz/SeleniumBase
# Dutch Language Test from seleniumbase.translate.dutch import Testgeval class MijnTestklasse(Testgeval): def test_voorbeeld_1(self): self.openen("https://nl.wikipedia.org/wiki/Hoofdpagina") self.controleren_element('a[title*="hoofdpagina gaan"]') self.controleren_tekst("Welkom op Wikiped...
# Dutch Language Test from seleniumbase.translate.dutch import Testgeval class MijnTestklasse(Testgeval): def test_voorbeeld_1(self): self.openen("https://nl.wikipedia.org/wiki/Hoofdpagina") self.controleren_element('a[title*="hoofdpagina gaan"]') self.controleren_tekst("Welkom op Wikiped...
<commit_before># Dutch Language Test from seleniumbase.translate.dutch import Testgeval class MijnTestklasse(Testgeval): def test_voorbeeld_1(self): self.openen("https://nl.wikipedia.org/wiki/Hoofdpagina") self.controleren_element('a[title*="hoofdpagina gaan"]') self.controleren_tekst("We...
# Dutch Language Test from seleniumbase.translate.dutch import Testgeval class MijnTestklasse(Testgeval): def test_voorbeeld_1(self): self.openen("https://nl.wikipedia.org/wiki/Hoofdpagina") self.controleren_element('a[title*="hoofdpagina gaan"]') self.controleren_tekst("Welkom op Wikiped...
# Dutch Language Test from seleniumbase.translate.dutch import Testgeval class MijnTestklasse(Testgeval): def test_voorbeeld_1(self): self.openen("https://nl.wikipedia.org/wiki/Hoofdpagina") self.controleren_element('a[title*="hoofdpagina gaan"]') self.controleren_tekst("Welkom op Wikiped...
<commit_before># Dutch Language Test from seleniumbase.translate.dutch import Testgeval class MijnTestklasse(Testgeval): def test_voorbeeld_1(self): self.openen("https://nl.wikipedia.org/wiki/Hoofdpagina") self.controleren_element('a[title*="hoofdpagina gaan"]') self.controleren_tekst("We...
f8d8aac9f342c10268165f4e2e641a6c667f97fd
Algorithms/Implementation/the-grid-search.py
Algorithms/Implementation/the-grid-search.py
# Python 2 import sys def search_inside(G, P, R, C, r, c): for i in range(R - r + 1): for j in range(C - c + 1): valid = True for k in range(r): if G[i + k][j:j + c] != P[k]: valid = False break if va...
# Python 2 import sys def search_inside(G, P, R, C, r, c): for i in range(R - r + 1): for j in range(C - c + 1): valid = True for k in range(r): if G[i + k][j:j + c] != P[k]: valid = False break # break out of for-l...
Add comment to clarify roll of break on line 12
Add comment to clarify roll of break on line 12
Python
mit
ugaliguy/HackerRank,ugaliguy/HackerRank,ugaliguy/HackerRank
# Python 2 import sys def search_inside(G, P, R, C, r, c): for i in range(R - r + 1): for j in range(C - c + 1): valid = True for k in range(r): if G[i + k][j:j + c] != P[k]: valid = False break if va...
# Python 2 import sys def search_inside(G, P, R, C, r, c): for i in range(R - r + 1): for j in range(C - c + 1): valid = True for k in range(r): if G[i + k][j:j + c] != P[k]: valid = False break # break out of for-l...
<commit_before># Python 2 import sys def search_inside(G, P, R, C, r, c): for i in range(R - r + 1): for j in range(C - c + 1): valid = True for k in range(r): if G[i + k][j:j + c] != P[k]: valid = False break ...
# Python 2 import sys def search_inside(G, P, R, C, r, c): for i in range(R - r + 1): for j in range(C - c + 1): valid = True for k in range(r): if G[i + k][j:j + c] != P[k]: valid = False break # break out of for-l...
# Python 2 import sys def search_inside(G, P, R, C, r, c): for i in range(R - r + 1): for j in range(C - c + 1): valid = True for k in range(r): if G[i + k][j:j + c] != P[k]: valid = False break if va...
<commit_before># Python 2 import sys def search_inside(G, P, R, C, r, c): for i in range(R - r + 1): for j in range(C - c + 1): valid = True for k in range(r): if G[i + k][j:j + c] != P[k]: valid = False break ...
7e068075c6cd231926cc5f5469472f3fafba7c18
biwako/bin/fields/util.py
biwako/bin/fields/util.py
import sys from .base import Field class Reserved(Field): def __init__(self, *args, **kwargs): super(Reserved, self).__init__(*args, **kwargs) # Hack to add the reserved field to the class without # having to explicitly give it a (likely useless) name frame = sys._getf...
import sys from .base import Field from ..fields import args class Reserved(Field): default = args.Override(default=None) def __init__(self, *args, **kwargs): super(Reserved, self).__init__(*args, **kwargs) # Hack to add the reserved field to the class without # having ...
Add a default value of None for reserved fields
Add a default value of None for reserved fields
Python
bsd-3-clause
gulopine/steel
import sys from .base import Field class Reserved(Field): def __init__(self, *args, **kwargs): super(Reserved, self).__init__(*args, **kwargs) # Hack to add the reserved field to the class without # having to explicitly give it a (likely useless) name frame = sys._getf...
import sys from .base import Field from ..fields import args class Reserved(Field): default = args.Override(default=None) def __init__(self, *args, **kwargs): super(Reserved, self).__init__(*args, **kwargs) # Hack to add the reserved field to the class without # having ...
<commit_before>import sys from .base import Field class Reserved(Field): def __init__(self, *args, **kwargs): super(Reserved, self).__init__(*args, **kwargs) # Hack to add the reserved field to the class without # having to explicitly give it a (likely useless) name fr...
import sys from .base import Field from ..fields import args class Reserved(Field): default = args.Override(default=None) def __init__(self, *args, **kwargs): super(Reserved, self).__init__(*args, **kwargs) # Hack to add the reserved field to the class without # having ...
import sys from .base import Field class Reserved(Field): def __init__(self, *args, **kwargs): super(Reserved, self).__init__(*args, **kwargs) # Hack to add the reserved field to the class without # having to explicitly give it a (likely useless) name frame = sys._getf...
<commit_before>import sys from .base import Field class Reserved(Field): def __init__(self, *args, **kwargs): super(Reserved, self).__init__(*args, **kwargs) # Hack to add the reserved field to the class without # having to explicitly give it a (likely useless) name fr...
dc2c960bb937cc287dedf95d407ed2e95f3f6724
sigma_files/serializers.py
sigma_files/serializers.py
from rest_framework import serializers from sigma.utils import CurrentUserCreateOnlyDefault from sigma_files.models import Image class ImageSerializer(serializers.ModelSerializer): class Meta: model = Image file = serializers.ImageField(max_length=255) height = serializers.IntegerField(source='f...
from rest_framework import serializers from dry_rest_permissions.generics import DRYPermissionsField from sigma.utils import CurrentUserCreateOnlyDefault from sigma_files.models import Image class ImageSerializer(serializers.ModelSerializer): class Meta: model = Image file = serializers.ImageField(m...
Add permissions field on ImageSerializer
Add permissions field on ImageSerializer
Python
agpl-3.0
ProjetSigma/backend,ProjetSigma/backend
from rest_framework import serializers from sigma.utils import CurrentUserCreateOnlyDefault from sigma_files.models import Image class ImageSerializer(serializers.ModelSerializer): class Meta: model = Image file = serializers.ImageField(max_length=255) height = serializers.IntegerField(source='f...
from rest_framework import serializers from dry_rest_permissions.generics import DRYPermissionsField from sigma.utils import CurrentUserCreateOnlyDefault from sigma_files.models import Image class ImageSerializer(serializers.ModelSerializer): class Meta: model = Image file = serializers.ImageField(m...
<commit_before>from rest_framework import serializers from sigma.utils import CurrentUserCreateOnlyDefault from sigma_files.models import Image class ImageSerializer(serializers.ModelSerializer): class Meta: model = Image file = serializers.ImageField(max_length=255) height = serializers.Integer...
from rest_framework import serializers from dry_rest_permissions.generics import DRYPermissionsField from sigma.utils import CurrentUserCreateOnlyDefault from sigma_files.models import Image class ImageSerializer(serializers.ModelSerializer): class Meta: model = Image file = serializers.ImageField(m...
from rest_framework import serializers from sigma.utils import CurrentUserCreateOnlyDefault from sigma_files.models import Image class ImageSerializer(serializers.ModelSerializer): class Meta: model = Image file = serializers.ImageField(max_length=255) height = serializers.IntegerField(source='f...
<commit_before>from rest_framework import serializers from sigma.utils import CurrentUserCreateOnlyDefault from sigma_files.models import Image class ImageSerializer(serializers.ModelSerializer): class Meta: model = Image file = serializers.ImageField(max_length=255) height = serializers.Integer...
d9262650eb1ce108c196bc10b0edcd8de6429dc2
fabconfig.py
fabconfig.py
from fabric.api import env env.client = 'zsoobhan' env.project_code = 'prometheus' env.web_dir = 'www' # Environment-agnostic folders env.project_dir = '/var/www/%(client)s/%(project_code)s' % env env.static_dir = '/mnt/static/%(client)s/%(project_code)s' % env env.builds_dir = '%(project_dir)s/builds' % env def _...
from fabric.api import env env.client = 'zsoobhan' env.project_code = 'prometheus' env.web_dir = 'www' # Environment-agnostic folders env.project_dir = '/var/www/%(client)s/%(project_code)s' % env env.static_dir = '/mnt/static/%(client)s/%(project_code)s' % env env.builds_dir = '%(project_dir)s/builds' % env def _...
Switch to new ec2 instance
Switch to new ec2 instance
Python
mit
zsoobhan/prometheus,zsoobhan/prometheus,zsoobhan/prometheus,zsoobhan/prometheus
from fabric.api import env env.client = 'zsoobhan' env.project_code = 'prometheus' env.web_dir = 'www' # Environment-agnostic folders env.project_dir = '/var/www/%(client)s/%(project_code)s' % env env.static_dir = '/mnt/static/%(client)s/%(project_code)s' % env env.builds_dir = '%(project_dir)s/builds' % env def _...
from fabric.api import env env.client = 'zsoobhan' env.project_code = 'prometheus' env.web_dir = 'www' # Environment-agnostic folders env.project_dir = '/var/www/%(client)s/%(project_code)s' % env env.static_dir = '/mnt/static/%(client)s/%(project_code)s' % env env.builds_dir = '%(project_dir)s/builds' % env def _...
<commit_before>from fabric.api import env env.client = 'zsoobhan' env.project_code = 'prometheus' env.web_dir = 'www' # Environment-agnostic folders env.project_dir = '/var/www/%(client)s/%(project_code)s' % env env.static_dir = '/mnt/static/%(client)s/%(project_code)s' % env env.builds_dir = '%(project_dir)s/builds...
from fabric.api import env env.client = 'zsoobhan' env.project_code = 'prometheus' env.web_dir = 'www' # Environment-agnostic folders env.project_dir = '/var/www/%(client)s/%(project_code)s' % env env.static_dir = '/mnt/static/%(client)s/%(project_code)s' % env env.builds_dir = '%(project_dir)s/builds' % env def _...
from fabric.api import env env.client = 'zsoobhan' env.project_code = 'prometheus' env.web_dir = 'www' # Environment-agnostic folders env.project_dir = '/var/www/%(client)s/%(project_code)s' % env env.static_dir = '/mnt/static/%(client)s/%(project_code)s' % env env.builds_dir = '%(project_dir)s/builds' % env def _...
<commit_before>from fabric.api import env env.client = 'zsoobhan' env.project_code = 'prometheus' env.web_dir = 'www' # Environment-agnostic folders env.project_dir = '/var/www/%(client)s/%(project_code)s' % env env.static_dir = '/mnt/static/%(client)s/%(project_code)s' % env env.builds_dir = '%(project_dir)s/builds...
05c9039c364d87c890cffdb9de7f0c8d1f7f9cb3
tfx/orchestration/config/kubernetes_component_config.py
tfx/orchestration/config/kubernetes_component_config.py
# Lint as: python2, python3 # Copyright 2019 Google LLC. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless req...
# Lint as: python2, python3 # Copyright 2019 Google LLC. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless req...
Convert k8s pod spec into dict structure to make sure that it's json serializable.
Convert k8s pod spec into dict structure to make sure that it's json serializable. PiperOrigin-RevId: 279162159
Python
apache-2.0
tensorflow/tfx,tensorflow/tfx
# Lint as: python2, python3 # Copyright 2019 Google LLC. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless req...
# Lint as: python2, python3 # Copyright 2019 Google LLC. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless req...
<commit_before># Lint as: python2, python3 # Copyright 2019 Google LLC. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0...
# Lint as: python2, python3 # Copyright 2019 Google LLC. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless req...
# Lint as: python2, python3 # Copyright 2019 Google LLC. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless req...
<commit_before># Lint as: python2, python3 # Copyright 2019 Google LLC. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0...
0f0a5e42422f71143c8bcbc3278ad0dc3b81c818
eratosthenes_lambda.py
eratosthenes_lambda.py
from __future__ import print_function from timeit import default_timer as timer import json import datetime print('Loading function') def eratosthenes(n): sieve = [ True for i in range(n+1) ] def markOff(pv): for i in range(pv+pv, n+1, pv): sieve[i] = False markOff(2) f...
from __future__ import print_function from timeit import default_timer as timer import json import datetime print('Loading function') def eratosthenes(n): sieve = [ True for i in range(n+1) ] def markOff(pv): for i in range(pv+pv, n+1, pv): sieve[i] = False markOff(2) for i in ...
Convert tabs to spaces per PEP 8.
Convert tabs to spaces per PEP 8.
Python
mit
jconning/lambda-cpu-cost,jconning/lambda-cpu-cost
from __future__ import print_function from timeit import default_timer as timer import json import datetime print('Loading function') def eratosthenes(n): sieve = [ True for i in range(n+1) ] def markOff(pv): for i in range(pv+pv, n+1, pv): sieve[i] = False markOff(2) f...
from __future__ import print_function from timeit import default_timer as timer import json import datetime print('Loading function') def eratosthenes(n): sieve = [ True for i in range(n+1) ] def markOff(pv): for i in range(pv+pv, n+1, pv): sieve[i] = False markOff(2) for i in ...
<commit_before>from __future__ import print_function from timeit import default_timer as timer import json import datetime print('Loading function') def eratosthenes(n): sieve = [ True for i in range(n+1) ] def markOff(pv): for i in range(pv+pv, n+1, pv): sieve[i] = False m...
from __future__ import print_function from timeit import default_timer as timer import json import datetime print('Loading function') def eratosthenes(n): sieve = [ True for i in range(n+1) ] def markOff(pv): for i in range(pv+pv, n+1, pv): sieve[i] = False markOff(2) for i in ...
from __future__ import print_function from timeit import default_timer as timer import json import datetime print('Loading function') def eratosthenes(n): sieve = [ True for i in range(n+1) ] def markOff(pv): for i in range(pv+pv, n+1, pv): sieve[i] = False markOff(2) f...
<commit_before>from __future__ import print_function from timeit import default_timer as timer import json import datetime print('Loading function') def eratosthenes(n): sieve = [ True for i in range(n+1) ] def markOff(pv): for i in range(pv+pv, n+1, pv): sieve[i] = False m...
525e7d5061326c7c815f4ede7757afb7c085ff78
apartments/models.py
apartments/models.py
from sqlalchemy import create_engine, Column, Integer, String from sqlalchemy.ext.declarative import declarative_base from sqlalchemy.orm import sessionmaker Base = declarative_base() class Listing(Base): __tablename__ = 'listings' id = Column(Integer, primary_key=True) craigslist_id = Column(String, u...
from sqlalchemy import create_engine, Column, DateTime, Integer, String from sqlalchemy.ext.declarative import declarative_base from sqlalchemy.orm import sessionmaker from sqlalchemy.sql import func Base = declarative_base() class Listing(Base): __tablename__ = 'listings' id = Column(Integer, primary_key=...
Add timestamp field to Listing
Add timestamp field to Listing
Python
mit
rlucioni/apartments,rlucioni/craigbot,rlucioni/craigbot
from sqlalchemy import create_engine, Column, Integer, String from sqlalchemy.ext.declarative import declarative_base from sqlalchemy.orm import sessionmaker Base = declarative_base() class Listing(Base): __tablename__ = 'listings' id = Column(Integer, primary_key=True) craigslist_id = Column(String, u...
from sqlalchemy import create_engine, Column, DateTime, Integer, String from sqlalchemy.ext.declarative import declarative_base from sqlalchemy.orm import sessionmaker from sqlalchemy.sql import func Base = declarative_base() class Listing(Base): __tablename__ = 'listings' id = Column(Integer, primary_key=...
<commit_before>from sqlalchemy import create_engine, Column, Integer, String from sqlalchemy.ext.declarative import declarative_base from sqlalchemy.orm import sessionmaker Base = declarative_base() class Listing(Base): __tablename__ = 'listings' id = Column(Integer, primary_key=True) craigslist_id = C...
from sqlalchemy import create_engine, Column, DateTime, Integer, String from sqlalchemy.ext.declarative import declarative_base from sqlalchemy.orm import sessionmaker from sqlalchemy.sql import func Base = declarative_base() class Listing(Base): __tablename__ = 'listings' id = Column(Integer, primary_key=...
from sqlalchemy import create_engine, Column, Integer, String from sqlalchemy.ext.declarative import declarative_base from sqlalchemy.orm import sessionmaker Base = declarative_base() class Listing(Base): __tablename__ = 'listings' id = Column(Integer, primary_key=True) craigslist_id = Column(String, u...
<commit_before>from sqlalchemy import create_engine, Column, Integer, String from sqlalchemy.ext.declarative import declarative_base from sqlalchemy.orm import sessionmaker Base = declarative_base() class Listing(Base): __tablename__ = 'listings' id = Column(Integer, primary_key=True) craigslist_id = C...
f67746750bdd2a1d6e662b1fc36d5a6fa13098c5
scripts/generate.py
scripts/generate.py
#!/usr/bin/env python template = """#!/bin/bash #PBS -l walltime=72:00:00 #PBS -l nodes=1:ppn=1 cd /RQusagers/vanmerb/rnnencdec export PYTHONPATH=/RQusagers/vanmerb/rnnencdec/groundhog-private/:$PYTHONPATH python /RQusagers/vanmerb/rnnencdec/groundhog-private/scripts/RNN_Enc_Dec_Phrase.py \"{options}\" >{log} 2>&1"...
#!/usr/bin/env python template = """#!/bin/bash #PBS -l walltime=72:00:00 #PBS -l nodes=1:ppn=1 cd /RQusagers/vanmerb/rnnencdec export PYTHONPATH=/RQusagers/vanmerb/rnnencdec/groundhog-private/:$PYTHONPATH python /RQusagers/vanmerb/rnnencdec/groundhog-private/scripts/RNN_Enc_Dec_Phrase.py \"{options}\" >{log} 2>&1"...
Add different prefixes for the experiments
Add different prefixes for the experiments
Python
bsd-3-clause
rizar/groundhog-private
#!/usr/bin/env python template = """#!/bin/bash #PBS -l walltime=72:00:00 #PBS -l nodes=1:ppn=1 cd /RQusagers/vanmerb/rnnencdec export PYTHONPATH=/RQusagers/vanmerb/rnnencdec/groundhog-private/:$PYTHONPATH python /RQusagers/vanmerb/rnnencdec/groundhog-private/scripts/RNN_Enc_Dec_Phrase.py \"{options}\" >{log} 2>&1"...
#!/usr/bin/env python template = """#!/bin/bash #PBS -l walltime=72:00:00 #PBS -l nodes=1:ppn=1 cd /RQusagers/vanmerb/rnnencdec export PYTHONPATH=/RQusagers/vanmerb/rnnencdec/groundhog-private/:$PYTHONPATH python /RQusagers/vanmerb/rnnencdec/groundhog-private/scripts/RNN_Enc_Dec_Phrase.py \"{options}\" >{log} 2>&1"...
<commit_before>#!/usr/bin/env python template = """#!/bin/bash #PBS -l walltime=72:00:00 #PBS -l nodes=1:ppn=1 cd /RQusagers/vanmerb/rnnencdec export PYTHONPATH=/RQusagers/vanmerb/rnnencdec/groundhog-private/:$PYTHONPATH python /RQusagers/vanmerb/rnnencdec/groundhog-private/scripts/RNN_Enc_Dec_Phrase.py \"{options}...
#!/usr/bin/env python template = """#!/bin/bash #PBS -l walltime=72:00:00 #PBS -l nodes=1:ppn=1 cd /RQusagers/vanmerb/rnnencdec export PYTHONPATH=/RQusagers/vanmerb/rnnencdec/groundhog-private/:$PYTHONPATH python /RQusagers/vanmerb/rnnencdec/groundhog-private/scripts/RNN_Enc_Dec_Phrase.py \"{options}\" >{log} 2>&1"...
#!/usr/bin/env python template = """#!/bin/bash #PBS -l walltime=72:00:00 #PBS -l nodes=1:ppn=1 cd /RQusagers/vanmerb/rnnencdec export PYTHONPATH=/RQusagers/vanmerb/rnnencdec/groundhog-private/:$PYTHONPATH python /RQusagers/vanmerb/rnnencdec/groundhog-private/scripts/RNN_Enc_Dec_Phrase.py \"{options}\" >{log} 2>&1"...
<commit_before>#!/usr/bin/env python template = """#!/bin/bash #PBS -l walltime=72:00:00 #PBS -l nodes=1:ppn=1 cd /RQusagers/vanmerb/rnnencdec export PYTHONPATH=/RQusagers/vanmerb/rnnencdec/groundhog-private/:$PYTHONPATH python /RQusagers/vanmerb/rnnencdec/groundhog-private/scripts/RNN_Enc_Dec_Phrase.py \"{options}...
7675547ab7669d1df03bf258ffc676799879a191
build/android/pylib/gtest/gtest_config.py
build/android/pylib/gtest/gtest_config.py
# Copyright (c) 2013 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """Configuration file for android gtest suites.""" # Add new suites here before upgrading them to the stable list below. EXPERIMENTAL_TEST_SUITES = [ ...
# Copyright (c) 2013 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """Configuration file for android gtest suites.""" # Add new suites here before upgrading them to the stable list below. EXPERIMENTAL_TEST_SUITES = [ ] ...
Move content_browsertests to main waterfall/trybots.
[Android] Move content_browsertests to main waterfall/trybots. It's passing consistently on android_fyi_dbg trybots and on FYI waterfall bots running ICS. BUG=270144 NOTRY=True Review URL: https://chromiumcodereview.appspot.com/22299007 git-svn-id: de016e52bd170d2d4f2344f9bf92d50478b649e0@216442 0039d316-1c4b-4281-...
Python
bsd-3-clause
jaruba/chromium.src,krieger-od/nwjs_chromium.src,krieger-od/nwjs_chromium.src,Chilledheart/chromium,patrickm/chromium.src,hgl888/chromium-crosswalk,M4sse/chromium.src,Chilledheart/chromium,Fireblend/chromium-crosswalk,bright-sparks/chromium-spacewalk,markYoungH/chromium.src,ltilve/chromium,ChromiumWebApps/chromium,mark...
# Copyright (c) 2013 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """Configuration file for android gtest suites.""" # Add new suites here before upgrading them to the stable list below. EXPERIMENTAL_TEST_SUITES = [ ...
# Copyright (c) 2013 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """Configuration file for android gtest suites.""" # Add new suites here before upgrading them to the stable list below. EXPERIMENTAL_TEST_SUITES = [ ] ...
<commit_before># Copyright (c) 2013 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """Configuration file for android gtest suites.""" # Add new suites here before upgrading them to the stable list below. EXPERIMENTAL_TES...
# Copyright (c) 2013 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """Configuration file for android gtest suites.""" # Add new suites here before upgrading them to the stable list below. EXPERIMENTAL_TEST_SUITES = [ ] ...
# Copyright (c) 2013 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """Configuration file for android gtest suites.""" # Add new suites here before upgrading them to the stable list below. EXPERIMENTAL_TEST_SUITES = [ ...
<commit_before># Copyright (c) 2013 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """Configuration file for android gtest suites.""" # Add new suites here before upgrading them to the stable list below. EXPERIMENTAL_TES...
8abd52f37e713d9d26cccd5c073fe338145759fd
child_sync_gp/model/project_compassion.py
child_sync_gp/model/project_compassion.py
# -*- encoding: utf-8 -*- ############################################################################## # # Copyright (C) 2014-2015 Compassion CH (http://www.compassion.ch) # Releasing children from poverty in Jesus' name # @author: Emanuel Cino <ecino@compassion.ch> # # The licence is in the file _...
# -*- encoding: utf-8 -*- ############################################################################## # # Copyright (C) 2014-2015 Compassion CH (http://www.compassion.ch) # Releasing children from poverty in Jesus' name # @author: Emanuel Cino <ecino@compassion.ch> # # The licence is in the file _...
Fix bug in write project.
Fix bug in write project.
Python
agpl-3.0
CompassionCH/compassion-switzerland,eicher31/compassion-switzerland,eicher31/compassion-switzerland,eicher31/compassion-switzerland,CompassionCH/compassion-switzerland,Secheron/compassion-switzerland,ecino/compassion-switzerland,ndtran/compassion-switzerland,MickSandoz/compassion-switzerland,Secheron/compassion-switzer...
# -*- encoding: utf-8 -*- ############################################################################## # # Copyright (C) 2014-2015 Compassion CH (http://www.compassion.ch) # Releasing children from poverty in Jesus' name # @author: Emanuel Cino <ecino@compassion.ch> # # The licence is in the file _...
# -*- encoding: utf-8 -*- ############################################################################## # # Copyright (C) 2014-2015 Compassion CH (http://www.compassion.ch) # Releasing children from poverty in Jesus' name # @author: Emanuel Cino <ecino@compassion.ch> # # The licence is in the file _...
<commit_before># -*- encoding: utf-8 -*- ############################################################################## # # Copyright (C) 2014-2015 Compassion CH (http://www.compassion.ch) # Releasing children from poverty in Jesus' name # @author: Emanuel Cino <ecino@compassion.ch> # # The licence i...
# -*- encoding: utf-8 -*- ############################################################################## # # Copyright (C) 2014-2015 Compassion CH (http://www.compassion.ch) # Releasing children from poverty in Jesus' name # @author: Emanuel Cino <ecino@compassion.ch> # # The licence is in the file _...
# -*- encoding: utf-8 -*- ############################################################################## # # Copyright (C) 2014-2015 Compassion CH (http://www.compassion.ch) # Releasing children from poverty in Jesus' name # @author: Emanuel Cino <ecino@compassion.ch> # # The licence is in the file _...
<commit_before># -*- encoding: utf-8 -*- ############################################################################## # # Copyright (C) 2014-2015 Compassion CH (http://www.compassion.ch) # Releasing children from poverty in Jesus' name # @author: Emanuel Cino <ecino@compassion.ch> # # The licence i...
1986000f7e3fff1366de245dadf8cd3b6e53f238
djstripe/contrib/rest_framework/permissions.py
djstripe/contrib/rest_framework/permissions.py
""" .. module:: dj-stripe.contrib.rest_framework.permissions. :synopsis: dj-stripe - Permissions to be used with the dj-stripe REST API. .. moduleauthor:: @kavdev, @pydanny """ from rest_framework.permissions import BasePermission from ...settings import subscriber_request_callback from ...utils import subscrib...
""" .. module:: dj-stripe.contrib.rest_framework.permissions. :synopsis: dj-stripe - Permissions to be used with the dj-stripe REST API. .. moduleauthor:: @kavdev, @pydanny """ from rest_framework.permissions import BasePermission from ...settings import subscriber_request_callback from ...utils import subscrib...
Fix missing return statement in DJStripeSubscriptionPermission
Fix missing return statement in DJStripeSubscriptionPermission Fixes #1250
Python
mit
dj-stripe/dj-stripe,dj-stripe/dj-stripe,pydanny/dj-stripe,pydanny/dj-stripe
""" .. module:: dj-stripe.contrib.rest_framework.permissions. :synopsis: dj-stripe - Permissions to be used with the dj-stripe REST API. .. moduleauthor:: @kavdev, @pydanny """ from rest_framework.permissions import BasePermission from ...settings import subscriber_request_callback from ...utils import subscrib...
""" .. module:: dj-stripe.contrib.rest_framework.permissions. :synopsis: dj-stripe - Permissions to be used with the dj-stripe REST API. .. moduleauthor:: @kavdev, @pydanny """ from rest_framework.permissions import BasePermission from ...settings import subscriber_request_callback from ...utils import subscrib...
<commit_before>""" .. module:: dj-stripe.contrib.rest_framework.permissions. :synopsis: dj-stripe - Permissions to be used with the dj-stripe REST API. .. moduleauthor:: @kavdev, @pydanny """ from rest_framework.permissions import BasePermission from ...settings import subscriber_request_callback from ...utils ...
""" .. module:: dj-stripe.contrib.rest_framework.permissions. :synopsis: dj-stripe - Permissions to be used with the dj-stripe REST API. .. moduleauthor:: @kavdev, @pydanny """ from rest_framework.permissions import BasePermission from ...settings import subscriber_request_callback from ...utils import subscrib...
""" .. module:: dj-stripe.contrib.rest_framework.permissions. :synopsis: dj-stripe - Permissions to be used with the dj-stripe REST API. .. moduleauthor:: @kavdev, @pydanny """ from rest_framework.permissions import BasePermission from ...settings import subscriber_request_callback from ...utils import subscrib...
<commit_before>""" .. module:: dj-stripe.contrib.rest_framework.permissions. :synopsis: dj-stripe - Permissions to be used with the dj-stripe REST API. .. moduleauthor:: @kavdev, @pydanny """ from rest_framework.permissions import BasePermission from ...settings import subscriber_request_callback from ...utils ...
25d93bf202e1735f21b6c3ad5830e660824efde6
flask_truss/blueprints/_blueprint/__init__.py
flask_truss/blueprints/_blueprint/__init__.py
from flask import Blueprint, render_template, current_app, request from flask_truss.async._task import _task from flask_truss.libs.logger import log_flask_request _blueprint = Blueprint('_blueprint', __name__, template_folder='templates') @_blueprint.route('/') def render_blueprint(): log_flask_request(current...
from flask import Blueprint, render_template, current_app, request from flask_truss.async._task import _task from flask_truss.lib.logger import log_flask_request _blueprint = Blueprint('_blueprint', __name__, template_folder='templates') @_blueprint.route('/') def render_blueprint(): log_flask_request(current_...
Fix typo in imports in _blueprint. Libs -> lib
Fix typo in imports in _blueprint. Libs -> lib
Python
mit
bmoar/flask-truss,bmoar/flask-truss
from flask import Blueprint, render_template, current_app, request from flask_truss.async._task import _task from flask_truss.libs.logger import log_flask_request _blueprint = Blueprint('_blueprint', __name__, template_folder='templates') @_blueprint.route('/') def render_blueprint(): log_flask_request(current...
from flask import Blueprint, render_template, current_app, request from flask_truss.async._task import _task from flask_truss.lib.logger import log_flask_request _blueprint = Blueprint('_blueprint', __name__, template_folder='templates') @_blueprint.route('/') def render_blueprint(): log_flask_request(current_...
<commit_before>from flask import Blueprint, render_template, current_app, request from flask_truss.async._task import _task from flask_truss.libs.logger import log_flask_request _blueprint = Blueprint('_blueprint', __name__, template_folder='templates') @_blueprint.route('/') def render_blueprint(): log_flask_...
from flask import Blueprint, render_template, current_app, request from flask_truss.async._task import _task from flask_truss.lib.logger import log_flask_request _blueprint = Blueprint('_blueprint', __name__, template_folder='templates') @_blueprint.route('/') def render_blueprint(): log_flask_request(current_...
from flask import Blueprint, render_template, current_app, request from flask_truss.async._task import _task from flask_truss.libs.logger import log_flask_request _blueprint = Blueprint('_blueprint', __name__, template_folder='templates') @_blueprint.route('/') def render_blueprint(): log_flask_request(current...
<commit_before>from flask import Blueprint, render_template, current_app, request from flask_truss.async._task import _task from flask_truss.libs.logger import log_flask_request _blueprint = Blueprint('_blueprint', __name__, template_folder='templates') @_blueprint.route('/') def render_blueprint(): log_flask_...
94351ce09112c7bd4c9ed58722334ee48fe99883
datapackage_pipelines_fiscal/processors/upload.py
datapackage_pipelines_fiscal/processors/upload.py
import os import zipfile import tempfile from datapackage_pipelines.wrapper import ingest, spew import gobble params, datapackage, res_iter = ingest() spew(datapackage, res_iter) user = gobble.user.User() in_filename = open(params['in-file'], 'rb') in_file = zipfile.ZipFile(in_filename) temp_dir = tempfile.mkdtemp...
import os import zipfile import tempfile from datapackage_pipelines.wrapper import ingest, spew import gobble params, datapackage, res_iter = ingest() spew(datapackage, res_iter) user = gobble.user.User() in_filename = open(params['in-file'], 'rb') in_file = zipfile.ZipFile(in_filename) temp_dir = tempfile.mkdtemp...
Set the publication with a parameter.
Set the publication with a parameter.
Python
mit
openspending/datapackage-pipelines-fiscal
import os import zipfile import tempfile from datapackage_pipelines.wrapper import ingest, spew import gobble params, datapackage, res_iter = ingest() spew(datapackage, res_iter) user = gobble.user.User() in_filename = open(params['in-file'], 'rb') in_file = zipfile.ZipFile(in_filename) temp_dir = tempfile.mkdtemp...
import os import zipfile import tempfile from datapackage_pipelines.wrapper import ingest, spew import gobble params, datapackage, res_iter = ingest() spew(datapackage, res_iter) user = gobble.user.User() in_filename = open(params['in-file'], 'rb') in_file = zipfile.ZipFile(in_filename) temp_dir = tempfile.mkdtemp...
<commit_before>import os import zipfile import tempfile from datapackage_pipelines.wrapper import ingest, spew import gobble params, datapackage, res_iter = ingest() spew(datapackage, res_iter) user = gobble.user.User() in_filename = open(params['in-file'], 'rb') in_file = zipfile.ZipFile(in_filename) temp_dir = t...
import os import zipfile import tempfile from datapackage_pipelines.wrapper import ingest, spew import gobble params, datapackage, res_iter = ingest() spew(datapackage, res_iter) user = gobble.user.User() in_filename = open(params['in-file'], 'rb') in_file = zipfile.ZipFile(in_filename) temp_dir = tempfile.mkdtemp...
import os import zipfile import tempfile from datapackage_pipelines.wrapper import ingest, spew import gobble params, datapackage, res_iter = ingest() spew(datapackage, res_iter) user = gobble.user.User() in_filename = open(params['in-file'], 'rb') in_file = zipfile.ZipFile(in_filename) temp_dir = tempfile.mkdtemp...
<commit_before>import os import zipfile import tempfile from datapackage_pipelines.wrapper import ingest, spew import gobble params, datapackage, res_iter = ingest() spew(datapackage, res_iter) user = gobble.user.User() in_filename = open(params['in-file'], 'rb') in_file = zipfile.ZipFile(in_filename) temp_dir = t...
9c52c82fab42ee5667791fdea612bcb94b17445e
server/constants.py
server/constants.py
#!/usr/bin/env python # -*- coding: utf-8 -*- # Constants representing the setting keys for this plugin class PluginSettings: HISTOMICSTK_DEFAULT_DRAW_STYLES = 'histomicstk.default_draw_styles'
#!/usr/bin/env python # -*- coding: utf-8 -*- # Constants representing the setting keys for this plugin class PluginSettings(object): HISTOMICSTK_DEFAULT_DRAW_STYLES = 'histomicstk.default_draw_styles'
Use new-style Python 2 classes.
Use new-style Python 2 classes.
Python
apache-2.0
DigitalSlideArchive/HistomicsTK,DigitalSlideArchive/HistomicsTK
#!/usr/bin/env python # -*- coding: utf-8 -*- # Constants representing the setting keys for this plugin class PluginSettings: HISTOMICSTK_DEFAULT_DRAW_STYLES = 'histomicstk.default_draw_styles' Use new-style Python 2 classes.
#!/usr/bin/env python # -*- coding: utf-8 -*- # Constants representing the setting keys for this plugin class PluginSettings(object): HISTOMICSTK_DEFAULT_DRAW_STYLES = 'histomicstk.default_draw_styles'
<commit_before>#!/usr/bin/env python # -*- coding: utf-8 -*- # Constants representing the setting keys for this plugin class PluginSettings: HISTOMICSTK_DEFAULT_DRAW_STYLES = 'histomicstk.default_draw_styles' <commit_msg>Use new-style Python 2 classes.<commit_after>
#!/usr/bin/env python # -*- coding: utf-8 -*- # Constants representing the setting keys for this plugin class PluginSettings(object): HISTOMICSTK_DEFAULT_DRAW_STYLES = 'histomicstk.default_draw_styles'
#!/usr/bin/env python # -*- coding: utf-8 -*- # Constants representing the setting keys for this plugin class PluginSettings: HISTOMICSTK_DEFAULT_DRAW_STYLES = 'histomicstk.default_draw_styles' Use new-style Python 2 classes.#!/usr/bin/env python # -*- coding: utf-8 -*- # Constants representing the setting keys...
<commit_before>#!/usr/bin/env python # -*- coding: utf-8 -*- # Constants representing the setting keys for this plugin class PluginSettings: HISTOMICSTK_DEFAULT_DRAW_STYLES = 'histomicstk.default_draw_styles' <commit_msg>Use new-style Python 2 classes.<commit_after>#!/usr/bin/env python # -*- coding: utf-8 -*- ...
155ab92dd2ff4340e4773e22762d52f557b300e8
dividebatur/tests/test_ticket_sort_key.py
dividebatur/tests/test_ticket_sort_key.py
from ..aecdata import ticket_sort_key def apply_ticket_sort(items): return list(sorted(items, key=ticket_sort_key)) def test_a_c_already_sorted(): assert(apply_ticket_sort(['A', 'B', 'C']) == ['A', 'B', 'C']) def test_a_c_reversed(): assert(apply_ticket_sort(['C', 'B', 'A']) == ['A', 'B', 'C']) def ...
from ..aecdata.utils import ticket_sort_key def apply_ticket_sort(items): return list(sorted(items, key=ticket_sort_key)) def test_a_c_already_sorted(): assert(apply_ticket_sort(['A', 'B', 'C']) == ['A', 'B', 'C']) def test_a_c_reversed(): assert(apply_ticket_sort(['C', 'B', 'A']) == ['A', 'B', 'C']) ...
Fix import in ticket_sort_key tests.
Fix import in ticket_sort_key tests.
Python
apache-2.0
grahame/dividebatur,grahame/dividebatur,grahame/dividebatur
from ..aecdata import ticket_sort_key def apply_ticket_sort(items): return list(sorted(items, key=ticket_sort_key)) def test_a_c_already_sorted(): assert(apply_ticket_sort(['A', 'B', 'C']) == ['A', 'B', 'C']) def test_a_c_reversed(): assert(apply_ticket_sort(['C', 'B', 'A']) == ['A', 'B', 'C']) def ...
from ..aecdata.utils import ticket_sort_key def apply_ticket_sort(items): return list(sorted(items, key=ticket_sort_key)) def test_a_c_already_sorted(): assert(apply_ticket_sort(['A', 'B', 'C']) == ['A', 'B', 'C']) def test_a_c_reversed(): assert(apply_ticket_sort(['C', 'B', 'A']) == ['A', 'B', 'C']) ...
<commit_before>from ..aecdata import ticket_sort_key def apply_ticket_sort(items): return list(sorted(items, key=ticket_sort_key)) def test_a_c_already_sorted(): assert(apply_ticket_sort(['A', 'B', 'C']) == ['A', 'B', 'C']) def test_a_c_reversed(): assert(apply_ticket_sort(['C', 'B', 'A']) == ['A', 'B...
from ..aecdata.utils import ticket_sort_key def apply_ticket_sort(items): return list(sorted(items, key=ticket_sort_key)) def test_a_c_already_sorted(): assert(apply_ticket_sort(['A', 'B', 'C']) == ['A', 'B', 'C']) def test_a_c_reversed(): assert(apply_ticket_sort(['C', 'B', 'A']) == ['A', 'B', 'C']) ...
from ..aecdata import ticket_sort_key def apply_ticket_sort(items): return list(sorted(items, key=ticket_sort_key)) def test_a_c_already_sorted(): assert(apply_ticket_sort(['A', 'B', 'C']) == ['A', 'B', 'C']) def test_a_c_reversed(): assert(apply_ticket_sort(['C', 'B', 'A']) == ['A', 'B', 'C']) def ...
<commit_before>from ..aecdata import ticket_sort_key def apply_ticket_sort(items): return list(sorted(items, key=ticket_sort_key)) def test_a_c_already_sorted(): assert(apply_ticket_sort(['A', 'B', 'C']) == ['A', 'B', 'C']) def test_a_c_reversed(): assert(apply_ticket_sort(['C', 'B', 'A']) == ['A', 'B...
ec4d84e0b67d26dd9888d1b54adda6fbbcdc67da
packages/blueprints/api.py
packages/blueprints/api.py
from flask import Blueprint, render_template, abort, request, redirect, session, url_for from flask.ext.login import current_user, login_user from sqlalchemy import desc from packages.objects import * from packages.common import * from packages.config import _cfg import os import zipfile import urllib api = Blueprint...
from flask import Blueprint, render_template, abort, request, redirect, session, url_for from flask.ext.login import current_user, login_user from sqlalchemy import desc from packages.objects import * from packages.common import * from packages.config import _cfg import os import zipfile import urllib api = Blueprint...
Add API endpoint for logging in
Add API endpoint for logging in
Python
mit
KnightOS/packages.knightos.org,MaxLeiter/packages.knightos.org,MaxLeiter/packages.knightos.org,KnightOS/packages.knightos.org,KnightOS/packages.knightos.org,MaxLeiter/packages.knightos.org
from flask import Blueprint, render_template, abort, request, redirect, session, url_for from flask.ext.login import current_user, login_user from sqlalchemy import desc from packages.objects import * from packages.common import * from packages.config import _cfg import os import zipfile import urllib api = Blueprint...
from flask import Blueprint, render_template, abort, request, redirect, session, url_for from flask.ext.login import current_user, login_user from sqlalchemy import desc from packages.objects import * from packages.common import * from packages.config import _cfg import os import zipfile import urllib api = Blueprint...
<commit_before>from flask import Blueprint, render_template, abort, request, redirect, session, url_for from flask.ext.login import current_user, login_user from sqlalchemy import desc from packages.objects import * from packages.common import * from packages.config import _cfg import os import zipfile import urllib ...
from flask import Blueprint, render_template, abort, request, redirect, session, url_for from flask.ext.login import current_user, login_user from sqlalchemy import desc from packages.objects import * from packages.common import * from packages.config import _cfg import os import zipfile import urllib api = Blueprint...
from flask import Blueprint, render_template, abort, request, redirect, session, url_for from flask.ext.login import current_user, login_user from sqlalchemy import desc from packages.objects import * from packages.common import * from packages.config import _cfg import os import zipfile import urllib api = Blueprint...
<commit_before>from flask import Blueprint, render_template, abort, request, redirect, session, url_for from flask.ext.login import current_user, login_user from sqlalchemy import desc from packages.objects import * from packages.common import * from packages.config import _cfg import os import zipfile import urllib ...
58c97445c8d55d48e03498c758f7b7c6dee245aa
enabled/_50_admin_add_monitoring_panel.py
enabled/_50_admin_add_monitoring_panel.py
# The name of the panel to be added to HORIZON_CONFIG. Required. PANEL = 'monitoring' # The name of the dashboard the PANEL associated with. Required. PANEL_DASHBOARD = 'overcloud' # The name of the panel group the PANEL is associated with. #PANEL_GROUP = 'admin' # Python panel class of the PANEL to be added. ADD_PANE...
# The name of the panel to be added to HORIZON_CONFIG. Required. PANEL = 'monitoring' # The name of the dashboard the PANEL associated with. Required. PANEL_DASHBOARD = 'overcloud' # The name of the panel group the PANEL is associated with. #PANEL_GROUP = 'admin' DEFAULT_PANEL = 'monitoring' # Python panel class of t...
Set DEFAULT_PANEL to monitoring panel
Set DEFAULT_PANEL to monitoring panel
Python
apache-2.0
stackforge/monasca-ui,openstack/monasca-ui,openstack/monasca-ui,stackforge/monasca-ui,openstack/monasca-ui,openstack/monasca-ui,stackforge/monasca-ui,stackforge/monasca-ui
# The name of the panel to be added to HORIZON_CONFIG. Required. PANEL = 'monitoring' # The name of the dashboard the PANEL associated with. Required. PANEL_DASHBOARD = 'overcloud' # The name of the panel group the PANEL is associated with. #PANEL_GROUP = 'admin' # Python panel class of the PANEL to be added. ADD_PANE...
# The name of the panel to be added to HORIZON_CONFIG. Required. PANEL = 'monitoring' # The name of the dashboard the PANEL associated with. Required. PANEL_DASHBOARD = 'overcloud' # The name of the panel group the PANEL is associated with. #PANEL_GROUP = 'admin' DEFAULT_PANEL = 'monitoring' # Python panel class of t...
<commit_before># The name of the panel to be added to HORIZON_CONFIG. Required. PANEL = 'monitoring' # The name of the dashboard the PANEL associated with. Required. PANEL_DASHBOARD = 'overcloud' # The name of the panel group the PANEL is associated with. #PANEL_GROUP = 'admin' # Python panel class of the PANEL to be ...
# The name of the panel to be added to HORIZON_CONFIG. Required. PANEL = 'monitoring' # The name of the dashboard the PANEL associated with. Required. PANEL_DASHBOARD = 'overcloud' # The name of the panel group the PANEL is associated with. #PANEL_GROUP = 'admin' DEFAULT_PANEL = 'monitoring' # Python panel class of t...
# The name of the panel to be added to HORIZON_CONFIG. Required. PANEL = 'monitoring' # The name of the dashboard the PANEL associated with. Required. PANEL_DASHBOARD = 'overcloud' # The name of the panel group the PANEL is associated with. #PANEL_GROUP = 'admin' # Python panel class of the PANEL to be added. ADD_PANE...
<commit_before># The name of the panel to be added to HORIZON_CONFIG. Required. PANEL = 'monitoring' # The name of the dashboard the PANEL associated with. Required. PANEL_DASHBOARD = 'overcloud' # The name of the panel group the PANEL is associated with. #PANEL_GROUP = 'admin' # Python panel class of the PANEL to be ...
948c269ba191339a471844eb512448941be4497c
readthedocs/doc_builder/base.py
readthedocs/doc_builder/base.py
from functools import wraps import os from functools import wraps def restoring_chdir(fn): @wraps(fn) def decorator(*args, **kw): try: path = os.getcwd() return fn(*args, **kw) finally: os.chdir(path) return decorator class BaseBuilder(object): """ ...
from functools import wraps import os from functools import wraps def restoring_chdir(fn): @wraps(fn) def decorator(*args, **kw): try: path = os.getcwd() return fn(*args, **kw) finally: os.chdir(path) return decorator class BaseBuilder(object): """ ...
Kill _changed from the Base so subclassing makes more sense.
Kill _changed from the Base so subclassing makes more sense.
Python
mit
gjtorikian/readthedocs.org,cgourlay/readthedocs.org,tddv/readthedocs.org,wanghaven/readthedocs.org,asampat3090/readthedocs.org,kenwang76/readthedocs.org,KamranMackey/readthedocs.org,clarkperkins/readthedocs.org,VishvajitP/readthedocs.org,emawind84/readthedocs.org,Carreau/readthedocs.org,johncosta/private-readthedocs.or...
from functools import wraps import os from functools import wraps def restoring_chdir(fn): @wraps(fn) def decorator(*args, **kw): try: path = os.getcwd() return fn(*args, **kw) finally: os.chdir(path) return decorator class BaseBuilder(object): """ ...
from functools import wraps import os from functools import wraps def restoring_chdir(fn): @wraps(fn) def decorator(*args, **kw): try: path = os.getcwd() return fn(*args, **kw) finally: os.chdir(path) return decorator class BaseBuilder(object): """ ...
<commit_before>from functools import wraps import os from functools import wraps def restoring_chdir(fn): @wraps(fn) def decorator(*args, **kw): try: path = os.getcwd() return fn(*args, **kw) finally: os.chdir(path) return decorator class BaseBuilder(ob...
from functools import wraps import os from functools import wraps def restoring_chdir(fn): @wraps(fn) def decorator(*args, **kw): try: path = os.getcwd() return fn(*args, **kw) finally: os.chdir(path) return decorator class BaseBuilder(object): """ ...
from functools import wraps import os from functools import wraps def restoring_chdir(fn): @wraps(fn) def decorator(*args, **kw): try: path = os.getcwd() return fn(*args, **kw) finally: os.chdir(path) return decorator class BaseBuilder(object): """ ...
<commit_before>from functools import wraps import os from functools import wraps def restoring_chdir(fn): @wraps(fn) def decorator(*args, **kw): try: path = os.getcwd() return fn(*args, **kw) finally: os.chdir(path) return decorator class BaseBuilder(ob...
7cedab4826d5d184e595864f4cf5ca3966a1921e
random_object_id/random_object_id.py
random_object_id/random_object_id.py
import binascii import os import time from optparse import OptionParser def gen_random_object_id(): timestamp = '{0:x}'.format(int(time.time())) rest = binascii.b2a_hex(os.urandom(8)).decode('ascii') return timestamp + rest if __name__ == '__main__': parser = OptionParser() parser.add_option('-l...
import binascii import os import time from argparse import ArgumentParser def gen_random_object_id(): timestamp = '{0:x}'.format(int(time.time())) rest = binascii.b2a_hex(os.urandom(8)).decode('ascii') return timestamp + rest if __name__ == '__main__': parser = ArgumentParser(description='Generate a...
Use argparse instead of optparse
Use argparse instead of optparse
Python
mit
mxr/random-object-id
import binascii import os import time from optparse import OptionParser def gen_random_object_id(): timestamp = '{0:x}'.format(int(time.time())) rest = binascii.b2a_hex(os.urandom(8)).decode('ascii') return timestamp + rest if __name__ == '__main__': parser = OptionParser() parser.add_option('-l...
import binascii import os import time from argparse import ArgumentParser def gen_random_object_id(): timestamp = '{0:x}'.format(int(time.time())) rest = binascii.b2a_hex(os.urandom(8)).decode('ascii') return timestamp + rest if __name__ == '__main__': parser = ArgumentParser(description='Generate a...
<commit_before>import binascii import os import time from optparse import OptionParser def gen_random_object_id(): timestamp = '{0:x}'.format(int(time.time())) rest = binascii.b2a_hex(os.urandom(8)).decode('ascii') return timestamp + rest if __name__ == '__main__': parser = OptionParser() parser...
import binascii import os import time from argparse import ArgumentParser def gen_random_object_id(): timestamp = '{0:x}'.format(int(time.time())) rest = binascii.b2a_hex(os.urandom(8)).decode('ascii') return timestamp + rest if __name__ == '__main__': parser = ArgumentParser(description='Generate a...
import binascii import os import time from optparse import OptionParser def gen_random_object_id(): timestamp = '{0:x}'.format(int(time.time())) rest = binascii.b2a_hex(os.urandom(8)).decode('ascii') return timestamp + rest if __name__ == '__main__': parser = OptionParser() parser.add_option('-l...
<commit_before>import binascii import os import time from optparse import OptionParser def gen_random_object_id(): timestamp = '{0:x}'.format(int(time.time())) rest = binascii.b2a_hex(os.urandom(8)).decode('ascii') return timestamp + rest if __name__ == '__main__': parser = OptionParser() parser...
ad2fd7bf2ccfee18856e6f94b996a630ae8362ee
sharepa/__init__.py
sharepa/__init__.py
from sharepa.search import ShareSearch, basic_search # noqa from sharepa.analysis import bucket_to_dataframe, merge_dataframes # noqa def source_counts(): return bucket_to_dataframe( 'total_source_counts', basic_search.execute().aggregations.sourceAgg.buckets )
from sharepa.search import ShareSearch, basic_search # noqa from sharepa.analysis import bucket_to_dataframe, merge_dataframes # noqa def source_counts(): return bucket_to_dataframe( 'total_source_counts', ShareSearch().execute().aggregations.sourceAgg.buckets )
Make total_source_counts always be a full query
Make total_source_counts always be a full query
Python
mit
fabianvf/sharepa,CenterForOpenScience/sharepa,erinspace/sharepa,samanehsan/sharepa
from sharepa.search import ShareSearch, basic_search # noqa from sharepa.analysis import bucket_to_dataframe, merge_dataframes # noqa def source_counts(): return bucket_to_dataframe( 'total_source_counts', basic_search.execute().aggregations.sourceAgg.buckets ) Make total_source_counts alway...
from sharepa.search import ShareSearch, basic_search # noqa from sharepa.analysis import bucket_to_dataframe, merge_dataframes # noqa def source_counts(): return bucket_to_dataframe( 'total_source_counts', ShareSearch().execute().aggregations.sourceAgg.buckets )
<commit_before>from sharepa.search import ShareSearch, basic_search # noqa from sharepa.analysis import bucket_to_dataframe, merge_dataframes # noqa def source_counts(): return bucket_to_dataframe( 'total_source_counts', basic_search.execute().aggregations.sourceAgg.buckets ) <commit_msg>Mak...
from sharepa.search import ShareSearch, basic_search # noqa from sharepa.analysis import bucket_to_dataframe, merge_dataframes # noqa def source_counts(): return bucket_to_dataframe( 'total_source_counts', ShareSearch().execute().aggregations.sourceAgg.buckets )
from sharepa.search import ShareSearch, basic_search # noqa from sharepa.analysis import bucket_to_dataframe, merge_dataframes # noqa def source_counts(): return bucket_to_dataframe( 'total_source_counts', basic_search.execute().aggregations.sourceAgg.buckets ) Make total_source_counts alway...
<commit_before>from sharepa.search import ShareSearch, basic_search # noqa from sharepa.analysis import bucket_to_dataframe, merge_dataframes # noqa def source_counts(): return bucket_to_dataframe( 'total_source_counts', basic_search.execute().aggregations.sourceAgg.buckets ) <commit_msg>Mak...
404b9208d98753dfccffb6c87594cfc70faed073
filer/tests/general.py
filer/tests/general.py
#-*- coding: utf-8 -*- from django.test import TestCase import filer class GeneralTestCase(TestCase): def test_version_is_set(self): self.assertTrue(len(filer.get_version())>0) def test_travisci_configuration(self): self.assertTrue(False)
#-*- coding: utf-8 -*- from django.test import TestCase import filer class GeneralTestCase(TestCase): def test_version_is_set(self): self.assertTrue(len(filer.get_version())>0)
Revert "travis ci: test if it REALLY works"
Revert "travis ci: test if it REALLY works" This reverts commit 78d87177c71adea7cc06d968374d2c2197dc5289.
Python
bsd-3-clause
Flight/django-filer,obigroup/django-filer,DylannCordel/django-filer,vstoykov/django-filer,o-zander/django-filer,mitar/django-filer,stefanfoulis/django-filer,skirsdeda/django-filer,thomasbilk/django-filer,kriwil/django-filer,sbussetti/django-filer,jakob-o/django-filer,lory87/django-filer,rollstudio/django-filer,Flight/d...
#-*- coding: utf-8 -*- from django.test import TestCase import filer class GeneralTestCase(TestCase): def test_version_is_set(self): self.assertTrue(len(filer.get_version())>0) def test_travisci_configuration(self): self.assertTrue(False)Revert "travis ci: test if it REALLY works" This rever...
#-*- coding: utf-8 -*- from django.test import TestCase import filer class GeneralTestCase(TestCase): def test_version_is_set(self): self.assertTrue(len(filer.get_version())>0)
<commit_before>#-*- coding: utf-8 -*- from django.test import TestCase import filer class GeneralTestCase(TestCase): def test_version_is_set(self): self.assertTrue(len(filer.get_version())>0) def test_travisci_configuration(self): self.assertTrue(False)<commit_msg>Revert "travis ci: test if i...
#-*- coding: utf-8 -*- from django.test import TestCase import filer class GeneralTestCase(TestCase): def test_version_is_set(self): self.assertTrue(len(filer.get_version())>0)
#-*- coding: utf-8 -*- from django.test import TestCase import filer class GeneralTestCase(TestCase): def test_version_is_set(self): self.assertTrue(len(filer.get_version())>0) def test_travisci_configuration(self): self.assertTrue(False)Revert "travis ci: test if it REALLY works" This rever...
<commit_before>#-*- coding: utf-8 -*- from django.test import TestCase import filer class GeneralTestCase(TestCase): def test_version_is_set(self): self.assertTrue(len(filer.get_version())>0) def test_travisci_configuration(self): self.assertTrue(False)<commit_msg>Revert "travis ci: test if i...
bbe2ef061eb52113d4579eac0415c79275b04721
src/masterfile/formatters.py
src/masterfile/formatters.py
# -*- coding: utf-8 -*- # Part of the masterfile package: https://github.com/njvack/masterfile # Copyright (c) 2018 Board of Regents of the University of Wisconsin System # Written by Nate Vack <njvack@wisc.edu> at the Center for Healthy Minds # at the University of Wisconsin-Madison. # Released under MIT licence; see...
# -*- coding: utf-8 -*- # Part of the masterfile package: https://github.com/njvack/masterfile # Copyright (c) 2018 Board of Regents of the University of Wisconsin System # Written by Nate Vack <njvack@wisc.edu> at the Center for Healthy Minds # at the University of Wisconsin-Madison. # Released under MIT licence; see...
Improve documentation for column formatter
Improve documentation for column formatter The algorithm is similar to a "convert to base X" one, except that it doesn't have a zero -- we go from "Z" to "AA" which is like going from 9 to 11. This is important enough to mention.
Python
mit
njvack/masterfile
# -*- coding: utf-8 -*- # Part of the masterfile package: https://github.com/njvack/masterfile # Copyright (c) 2018 Board of Regents of the University of Wisconsin System # Written by Nate Vack <njvack@wisc.edu> at the Center for Healthy Minds # at the University of Wisconsin-Madison. # Released under MIT licence; see...
# -*- coding: utf-8 -*- # Part of the masterfile package: https://github.com/njvack/masterfile # Copyright (c) 2018 Board of Regents of the University of Wisconsin System # Written by Nate Vack <njvack@wisc.edu> at the Center for Healthy Minds # at the University of Wisconsin-Madison. # Released under MIT licence; see...
<commit_before># -*- coding: utf-8 -*- # Part of the masterfile package: https://github.com/njvack/masterfile # Copyright (c) 2018 Board of Regents of the University of Wisconsin System # Written by Nate Vack <njvack@wisc.edu> at the Center for Healthy Minds # at the University of Wisconsin-Madison. # Released under M...
# -*- coding: utf-8 -*- # Part of the masterfile package: https://github.com/njvack/masterfile # Copyright (c) 2018 Board of Regents of the University of Wisconsin System # Written by Nate Vack <njvack@wisc.edu> at the Center for Healthy Minds # at the University of Wisconsin-Madison. # Released under MIT licence; see...
# -*- coding: utf-8 -*- # Part of the masterfile package: https://github.com/njvack/masterfile # Copyright (c) 2018 Board of Regents of the University of Wisconsin System # Written by Nate Vack <njvack@wisc.edu> at the Center for Healthy Minds # at the University of Wisconsin-Madison. # Released under MIT licence; see...
<commit_before># -*- coding: utf-8 -*- # Part of the masterfile package: https://github.com/njvack/masterfile # Copyright (c) 2018 Board of Regents of the University of Wisconsin System # Written by Nate Vack <njvack@wisc.edu> at the Center for Healthy Minds # at the University of Wisconsin-Madison. # Released under M...
ffb8f3f0d1fe17e13b349f8f4bae8fd9acbbd146
linter.py
linter.py
# # linter.py # Linter for SublimeLinter3, a code checking framework for Sublime Text 3 # # Written by Ethan Zimmerman # Copyright (c) 2014 Ethan Zimmerman # # License: MIT # """This module exports the RamlCop plugin class.""" from SublimeLinter.lint import NodeLinter class RamlCop(NodeLinter): """Provides an ...
# # linter.py # Linter for SublimeLinter3, a code checking framework for Sublime Text 3 # # Written by Ethan Zimmerman # Copyright (c) 2014 Ethan Zimmerman # # License: MIT # """This module exports the RamlCop plugin class.""" from SublimeLinter.lint import NodeLinter class RamlCop(NodeLinter): """Provides an ...
Update regex to match new parser output
Update regex to match new parser output
Python
mit
thebinarypenguin/SublimeLinter-contrib-raml-cop
# # linter.py # Linter for SublimeLinter3, a code checking framework for Sublime Text 3 # # Written by Ethan Zimmerman # Copyright (c) 2014 Ethan Zimmerman # # License: MIT # """This module exports the RamlCop plugin class.""" from SublimeLinter.lint import NodeLinter class RamlCop(NodeLinter): """Provides an ...
# # linter.py # Linter for SublimeLinter3, a code checking framework for Sublime Text 3 # # Written by Ethan Zimmerman # Copyright (c) 2014 Ethan Zimmerman # # License: MIT # """This module exports the RamlCop plugin class.""" from SublimeLinter.lint import NodeLinter class RamlCop(NodeLinter): """Provides an ...
<commit_before># # linter.py # Linter for SublimeLinter3, a code checking framework for Sublime Text 3 # # Written by Ethan Zimmerman # Copyright (c) 2014 Ethan Zimmerman # # License: MIT # """This module exports the RamlCop plugin class.""" from SublimeLinter.lint import NodeLinter class RamlCop(NodeLinter): ...
# # linter.py # Linter for SublimeLinter3, a code checking framework for Sublime Text 3 # # Written by Ethan Zimmerman # Copyright (c) 2014 Ethan Zimmerman # # License: MIT # """This module exports the RamlCop plugin class.""" from SublimeLinter.lint import NodeLinter class RamlCop(NodeLinter): """Provides an ...
# # linter.py # Linter for SublimeLinter3, a code checking framework for Sublime Text 3 # # Written by Ethan Zimmerman # Copyright (c) 2014 Ethan Zimmerman # # License: MIT # """This module exports the RamlCop plugin class.""" from SublimeLinter.lint import NodeLinter class RamlCop(NodeLinter): """Provides an ...
<commit_before># # linter.py # Linter for SublimeLinter3, a code checking framework for Sublime Text 3 # # Written by Ethan Zimmerman # Copyright (c) 2014 Ethan Zimmerman # # License: MIT # """This module exports the RamlCop plugin class.""" from SublimeLinter.lint import NodeLinter class RamlCop(NodeLinter): ...
302c246d1da11282e2f6a687fb504e18f1399a84
linter.py
linter.py
# # linter.py # Linter for SublimeLinter4, a code checking framework for Sublime Text 3 # # Written by Jack Cherng # Copyright (c) 2017-2019 jfcherng # # License: MIT # from SublimeLinter.lint import Linter import sublime class Iverilog(Linter): # http://www.sublimelinter.com/en/stable/linter_attributes.html ...
# # linter.py # Linter for SublimeLinter4, a code checking framework for Sublime Text 3 # # Written by Jack Cherng # Copyright (c) 2017-2019 jfcherng # # License: MIT # from SublimeLinter.lint import Linter import sublime class Iverilog(Linter): # http://www.sublimelinter.com/en/stable/linter_attributes.html ...
Add "-i" flag to ignore module not found errors
Add "-i" flag to ignore module not found errors https://github.com/steveicarus/iverilog/pull/151 Signed-off-by: Jack Cherng <159f0f32a62cc912ca55f89bb5e06807cf019bc7@gmail.com>
Python
mit
jfcherng/SublimeLinter-contrib-iverilog,jfcherng/SublimeLinter-contrib-iverilog
# # linter.py # Linter for SublimeLinter4, a code checking framework for Sublime Text 3 # # Written by Jack Cherng # Copyright (c) 2017-2019 jfcherng # # License: MIT # from SublimeLinter.lint import Linter import sublime class Iverilog(Linter): # http://www.sublimelinter.com/en/stable/linter_attributes.html ...
# # linter.py # Linter for SublimeLinter4, a code checking framework for Sublime Text 3 # # Written by Jack Cherng # Copyright (c) 2017-2019 jfcherng # # License: MIT # from SublimeLinter.lint import Linter import sublime class Iverilog(Linter): # http://www.sublimelinter.com/en/stable/linter_attributes.html ...
<commit_before># # linter.py # Linter for SublimeLinter4, a code checking framework for Sublime Text 3 # # Written by Jack Cherng # Copyright (c) 2017-2019 jfcherng # # License: MIT # from SublimeLinter.lint import Linter import sublime class Iverilog(Linter): # http://www.sublimelinter.com/en/stable/linter_attr...
# # linter.py # Linter for SublimeLinter4, a code checking framework for Sublime Text 3 # # Written by Jack Cherng # Copyright (c) 2017-2019 jfcherng # # License: MIT # from SublimeLinter.lint import Linter import sublime class Iverilog(Linter): # http://www.sublimelinter.com/en/stable/linter_attributes.html ...
# # linter.py # Linter for SublimeLinter4, a code checking framework for Sublime Text 3 # # Written by Jack Cherng # Copyright (c) 2017-2019 jfcherng # # License: MIT # from SublimeLinter.lint import Linter import sublime class Iverilog(Linter): # http://www.sublimelinter.com/en/stable/linter_attributes.html ...
<commit_before># # linter.py # Linter for SublimeLinter4, a code checking framework for Sublime Text 3 # # Written by Jack Cherng # Copyright (c) 2017-2019 jfcherng # # License: MIT # from SublimeLinter.lint import Linter import sublime class Iverilog(Linter): # http://www.sublimelinter.com/en/stable/linter_attr...
90c5c9db788c0450483d71c38155fcf0a9d56220
sc2reader/engine/plugins/apm.py
sc2reader/engine/plugins/apm.py
from collections import Counter class APMTracker(object): def handleInitGame(self, event, replay): for player in replay.players: player.apm = Counter() player.aps = Counter() player.seconds_played = replay.length.seconds def handlePlayerActionEvent(self, event, rep...
from collections import Counter class APMTracker(object): """ Builds ``player.aps`` and ``player.apm`` dictionaries where an action is any Selection, Hotkey, or Ability event. Also provides ``player.avg_apm`` which is defined as the sum of all the above actions divided by the number of seconds pla...
Fix the engine's APM plugin and add some documentation.
Fix the engine's APM plugin and add some documentation.
Python
mit
StoicLoofah/sc2reader,vlaufer/sc2reader,ggtracker/sc2reader,GraylinKim/sc2reader,GraylinKim/sc2reader,vlaufer/sc2reader,ggtracker/sc2reader,StoicLoofah/sc2reader
from collections import Counter class APMTracker(object): def handleInitGame(self, event, replay): for player in replay.players: player.apm = Counter() player.aps = Counter() player.seconds_played = replay.length.seconds def handlePlayerActionEvent(self, event, rep...
from collections import Counter class APMTracker(object): """ Builds ``player.aps`` and ``player.apm`` dictionaries where an action is any Selection, Hotkey, or Ability event. Also provides ``player.avg_apm`` which is defined as the sum of all the above actions divided by the number of seconds pla...
<commit_before>from collections import Counter class APMTracker(object): def handleInitGame(self, event, replay): for player in replay.players: player.apm = Counter() player.aps = Counter() player.seconds_played = replay.length.seconds def handlePlayerActionEvent(s...
from collections import Counter class APMTracker(object): """ Builds ``player.aps`` and ``player.apm`` dictionaries where an action is any Selection, Hotkey, or Ability event. Also provides ``player.avg_apm`` which is defined as the sum of all the above actions divided by the number of seconds pla...
from collections import Counter class APMTracker(object): def handleInitGame(self, event, replay): for player in replay.players: player.apm = Counter() player.aps = Counter() player.seconds_played = replay.length.seconds def handlePlayerActionEvent(self, event, rep...
<commit_before>from collections import Counter class APMTracker(object): def handleInitGame(self, event, replay): for player in replay.players: player.apm = Counter() player.aps = Counter() player.seconds_played = replay.length.seconds def handlePlayerActionEvent(s...
cd1eac109ed52f34df35ecea95935b7546147c87
tests/builtins/test_sum.py
tests/builtins/test_sum.py
from .. utils import TranspileTestCase, BuiltinFunctionTestCase class SumTests(TranspileTestCase): def test_sum_list(self): self.assertCodeExecution(""" print(sum([1, 2, 3, 4, 5, 6, 7])) """) def test_sum_tuple(self): self.assertCodeExecution(""" print(sum((1, ...
from .. utils import TranspileTestCase, BuiltinFunctionTestCase class SumTests(TranspileTestCase): def test_sum_list(self): self.assertCodeExecution(""" print(sum([1, 2, 3, 4, 5, 6, 7])) print(sum([[1, 2], [3, 4], [5, 6]], [])) """) def test_sum_tuple(self): se...
Add more tests for the sum builtin
Add more tests for the sum builtin
Python
bsd-3-clause
cflee/voc,freakboy3742/voc,freakboy3742/voc,cflee/voc
from .. utils import TranspileTestCase, BuiltinFunctionTestCase class SumTests(TranspileTestCase): def test_sum_list(self): self.assertCodeExecution(""" print(sum([1, 2, 3, 4, 5, 6, 7])) """) def test_sum_tuple(self): self.assertCodeExecution(""" print(sum((1, ...
from .. utils import TranspileTestCase, BuiltinFunctionTestCase class SumTests(TranspileTestCase): def test_sum_list(self): self.assertCodeExecution(""" print(sum([1, 2, 3, 4, 5, 6, 7])) print(sum([[1, 2], [3, 4], [5, 6]], [])) """) def test_sum_tuple(self): se...
<commit_before>from .. utils import TranspileTestCase, BuiltinFunctionTestCase class SumTests(TranspileTestCase): def test_sum_list(self): self.assertCodeExecution(""" print(sum([1, 2, 3, 4, 5, 6, 7])) """) def test_sum_tuple(self): self.assertCodeExecution(""" ...
from .. utils import TranspileTestCase, BuiltinFunctionTestCase class SumTests(TranspileTestCase): def test_sum_list(self): self.assertCodeExecution(""" print(sum([1, 2, 3, 4, 5, 6, 7])) print(sum([[1, 2], [3, 4], [5, 6]], [])) """) def test_sum_tuple(self): se...
from .. utils import TranspileTestCase, BuiltinFunctionTestCase class SumTests(TranspileTestCase): def test_sum_list(self): self.assertCodeExecution(""" print(sum([1, 2, 3, 4, 5, 6, 7])) """) def test_sum_tuple(self): self.assertCodeExecution(""" print(sum((1, ...
<commit_before>from .. utils import TranspileTestCase, BuiltinFunctionTestCase class SumTests(TranspileTestCase): def test_sum_list(self): self.assertCodeExecution(""" print(sum([1, 2, 3, 4, 5, 6, 7])) """) def test_sum_tuple(self): self.assertCodeExecution(""" ...
f3aea781c633c2ee212b59f17a6028684041568c
scripts/dbutil/clean_afos.py
scripts/dbutil/clean_afos.py
""" Clean up the AFOS database called from RUN_2AM.sh """ import psycopg2 AFOS = psycopg2.connect(database='afos', host='iemdb') acursor = AFOS.cursor() acursor.execute(""" delete from products WHERE entered < ('YESTERDAY'::date - '7 days'::interval) and entered > ('YESTERDAY'::date - '31 days'::interval...
"""Clean up some tables that contain bloaty NWS Text Data called from RUN_2AM.sh """ import psycopg2 # Clean AFOS AFOS = psycopg2.connect(database='afos', host='iemdb') acursor = AFOS.cursor() acursor.execute(""" delete from products WHERE entered < ('YESTERDAY'::date - '7 days'::interval) and entered >...
Add purging of postgis/text_products table
Add purging of postgis/text_products table
Python
mit
akrherz/iem,akrherz/iem,akrherz/iem,akrherz/iem,akrherz/iem
""" Clean up the AFOS database called from RUN_2AM.sh """ import psycopg2 AFOS = psycopg2.connect(database='afos', host='iemdb') acursor = AFOS.cursor() acursor.execute(""" delete from products WHERE entered < ('YESTERDAY'::date - '7 days'::interval) and entered > ('YESTERDAY'::date - '31 days'::interval...
"""Clean up some tables that contain bloaty NWS Text Data called from RUN_2AM.sh """ import psycopg2 # Clean AFOS AFOS = psycopg2.connect(database='afos', host='iemdb') acursor = AFOS.cursor() acursor.execute(""" delete from products WHERE entered < ('YESTERDAY'::date - '7 days'::interval) and entered >...
<commit_before>""" Clean up the AFOS database called from RUN_2AM.sh """ import psycopg2 AFOS = psycopg2.connect(database='afos', host='iemdb') acursor = AFOS.cursor() acursor.execute(""" delete from products WHERE entered < ('YESTERDAY'::date - '7 days'::interval) and entered > ('YESTERDAY'::date - '31 ...
"""Clean up some tables that contain bloaty NWS Text Data called from RUN_2AM.sh """ import psycopg2 # Clean AFOS AFOS = psycopg2.connect(database='afos', host='iemdb') acursor = AFOS.cursor() acursor.execute(""" delete from products WHERE entered < ('YESTERDAY'::date - '7 days'::interval) and entered >...
""" Clean up the AFOS database called from RUN_2AM.sh """ import psycopg2 AFOS = psycopg2.connect(database='afos', host='iemdb') acursor = AFOS.cursor() acursor.execute(""" delete from products WHERE entered < ('YESTERDAY'::date - '7 days'::interval) and entered > ('YESTERDAY'::date - '31 days'::interval...
<commit_before>""" Clean up the AFOS database called from RUN_2AM.sh """ import psycopg2 AFOS = psycopg2.connect(database='afos', host='iemdb') acursor = AFOS.cursor() acursor.execute(""" delete from products WHERE entered < ('YESTERDAY'::date - '7 days'::interval) and entered > ('YESTERDAY'::date - '31 ...
6f9b2dd428cde88418aafdf1708aefdfd047df13
test_assess_recovery.py
test_assess_recovery.py
from subprocess import CalledProcessError from textwrap import dedent from unittest import TestCase from test_recovery import ( parse_new_state_server_from_error, ) class RecoveryTestCase(TestCase): def test_parse_new_state_server_from_error(self): output = dedent(""" Waiting for address...
from subprocess import CalledProcessError from textwrap import dedent from unittest import TestCase from test_recovery import ( parse_new_state_server_from_error, ) class AssessRecoveryTestCase(TestCase): def test_parse_new_state_server_from_error(self): output = dedent(""" Waiting for a...
Rename the test case to match the renamed module.
Rename the test case to match the renamed module.
Python
agpl-3.0
mjs/juju,mjs/juju,mjs/juju,mjs/juju,mjs/juju,mjs/juju,mjs/juju
from subprocess import CalledProcessError from textwrap import dedent from unittest import TestCase from test_recovery import ( parse_new_state_server_from_error, ) class RecoveryTestCase(TestCase): def test_parse_new_state_server_from_error(self): output = dedent(""" Waiting for address...
from subprocess import CalledProcessError from textwrap import dedent from unittest import TestCase from test_recovery import ( parse_new_state_server_from_error, ) class AssessRecoveryTestCase(TestCase): def test_parse_new_state_server_from_error(self): output = dedent(""" Waiting for a...
<commit_before>from subprocess import CalledProcessError from textwrap import dedent from unittest import TestCase from test_recovery import ( parse_new_state_server_from_error, ) class RecoveryTestCase(TestCase): def test_parse_new_state_server_from_error(self): output = dedent(""" Wait...
from subprocess import CalledProcessError from textwrap import dedent from unittest import TestCase from test_recovery import ( parse_new_state_server_from_error, ) class AssessRecoveryTestCase(TestCase): def test_parse_new_state_server_from_error(self): output = dedent(""" Waiting for a...
from subprocess import CalledProcessError from textwrap import dedent from unittest import TestCase from test_recovery import ( parse_new_state_server_from_error, ) class RecoveryTestCase(TestCase): def test_parse_new_state_server_from_error(self): output = dedent(""" Waiting for address...
<commit_before>from subprocess import CalledProcessError from textwrap import dedent from unittest import TestCase from test_recovery import ( parse_new_state_server_from_error, ) class RecoveryTestCase(TestCase): def test_parse_new_state_server_from_error(self): output = dedent(""" Wait...
6c9bf9ee4428fbb3b35985d1bbd1c1e29b882f5c
appengine_django/db/creation.py
appengine_django/db/creation.py
#!/usr/bin/python2.4 # # Copyright 2008 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...
#!/usr/bin/python2.4 # # Copyright 2008 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...
Update SUPPORTS_TRANSACTIONS attribute to what is expected by Django 1.2.
Update SUPPORTS_TRANSACTIONS attribute to what is expected by Django 1.2. Patch contributed by Felix Leong. Thanks. Fixes Issue #162. git-svn-id: 7c59d995a3d63779dc3f8cdf6830411bfeeaa67b@109 d4307497-c249-0410-99bd-594fbd7e173e
Python
apache-2.0
wtanaka/google-app-engine-helper-for-django,clones/google-app-engine-django
#!/usr/bin/python2.4 # # Copyright 2008 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...
#!/usr/bin/python2.4 # # Copyright 2008 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...
<commit_before>#!/usr/bin/python2.4 # # Copyright 2008 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 ap...
#!/usr/bin/python2.4 # # Copyright 2008 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...
#!/usr/bin/python2.4 # # Copyright 2008 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...
<commit_before>#!/usr/bin/python2.4 # # Copyright 2008 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 ap...
69c81b16e07b67ba0a0bc8e1f55049e7987c5b8c
openstack_dashboard/dashboards/admin/instances/panel.py
openstack_dashboard/dashboards/admin/instances/panel.py
# Copyright 2012 United States Government as represented by the # Administrator of the National Aeronautics and Space Administration. # All Rights Reserved. # # Copyright 2012 Nebula, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the...
# Copyright 2012 United States Government as represented by the # Administrator of the National Aeronautics and Space Administration. # All Rights Reserved. # # Copyright 2012 Nebula, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the...
Fix an incorrect policy rule in Admin > Instances
Fix an incorrect policy rule in Admin > Instances Change-Id: I765ae0c36d19c88138fbea9545a2ca4791377ffb Closes-Bug: #1703066
Python
apache-2.0
BiznetGIO/horizon,BiznetGIO/horizon,noironetworks/horizon,ChameleonCloud/horizon,yeming233/horizon,NeCTAR-RC/horizon,yeming233/horizon,BiznetGIO/horizon,yeming233/horizon,openstack/horizon,noironetworks/horizon,NeCTAR-RC/horizon,yeming233/horizon,ChameleonCloud/horizon,NeCTAR-RC/horizon,noironetworks/horizon,openstack/...
# Copyright 2012 United States Government as represented by the # Administrator of the National Aeronautics and Space Administration. # All Rights Reserved. # # Copyright 2012 Nebula, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the...
# Copyright 2012 United States Government as represented by the # Administrator of the National Aeronautics and Space Administration. # All Rights Reserved. # # Copyright 2012 Nebula, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the...
<commit_before># Copyright 2012 United States Government as represented by the # Administrator of the National Aeronautics and Space Administration. # All Rights Reserved. # # Copyright 2012 Nebula, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in comp...
# Copyright 2012 United States Government as represented by the # Administrator of the National Aeronautics and Space Administration. # All Rights Reserved. # # Copyright 2012 Nebula, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the...
# Copyright 2012 United States Government as represented by the # Administrator of the National Aeronautics and Space Administration. # All Rights Reserved. # # Copyright 2012 Nebula, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the...
<commit_before># Copyright 2012 United States Government as represented by the # Administrator of the National Aeronautics and Space Administration. # All Rights Reserved. # # Copyright 2012 Nebula, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in comp...
5516b125bb00b928d85a044d3df777e1b0004d03
ovp_organizations/migrations/0008_auto_20161207_1941.py
ovp_organizations/migrations/0008_auto_20161207_1941.py
# -*- coding: utf-8 -*- # Generated by Django 1.10.1 on 2016-12-07 19:41 from __future__ import unicode_literals from django.db import migrations from ovp_organizations.models import Organization def add_members(apps, schema_editor): for organization in Organization.objects.all(): organization.members.add(orga...
# -*- coding: utf-8 -*- # Generated by Django 1.10.1 on 2016-12-07 19:41 from __future__ import unicode_literals from django.db import migrations from ovp_organizations.models import Organization def add_members(apps, schema_editor): for organization in Organization.objects.only('pk', 'members').all(): organiz...
Add ".only" restriction to query on migration 0008
Add ".only" restriction to query on migration 0008
Python
agpl-3.0
OpenVolunteeringPlatform/django-ovp-organizations,OpenVolunteeringPlatform/django-ovp-organizations
# -*- coding: utf-8 -*- # Generated by Django 1.10.1 on 2016-12-07 19:41 from __future__ import unicode_literals from django.db import migrations from ovp_organizations.models import Organization def add_members(apps, schema_editor): for organization in Organization.objects.all(): organization.members.add(orga...
# -*- coding: utf-8 -*- # Generated by Django 1.10.1 on 2016-12-07 19:41 from __future__ import unicode_literals from django.db import migrations from ovp_organizations.models import Organization def add_members(apps, schema_editor): for organization in Organization.objects.only('pk', 'members').all(): organiz...
<commit_before># -*- coding: utf-8 -*- # Generated by Django 1.10.1 on 2016-12-07 19:41 from __future__ import unicode_literals from django.db import migrations from ovp_organizations.models import Organization def add_members(apps, schema_editor): for organization in Organization.objects.all(): organization.m...
# -*- coding: utf-8 -*- # Generated by Django 1.10.1 on 2016-12-07 19:41 from __future__ import unicode_literals from django.db import migrations from ovp_organizations.models import Organization def add_members(apps, schema_editor): for organization in Organization.objects.only('pk', 'members').all(): organiz...
# -*- coding: utf-8 -*- # Generated by Django 1.10.1 on 2016-12-07 19:41 from __future__ import unicode_literals from django.db import migrations from ovp_organizations.models import Organization def add_members(apps, schema_editor): for organization in Organization.objects.all(): organization.members.add(orga...
<commit_before># -*- coding: utf-8 -*- # Generated by Django 1.10.1 on 2016-12-07 19:41 from __future__ import unicode_literals from django.db import migrations from ovp_organizations.models import Organization def add_members(apps, schema_editor): for organization in Organization.objects.all(): organization.m...
8b7529551d11c67aad4729e53a2b25473599b1f7
billjobs/urls.py
billjobs/urls.py
from django.conf.urls import url, include from rest_framework.authtoken.views import obtain_auth_token from . import views router = routers.DefaultRouter() router.register(r'users', views.UserViewSet) urlpatterns = [ url(r'^generate_pdf/(?P<bill_id>\d+)$', views.generate_pdf, name='generate-pdf'), url...
from django.conf.urls import url, include from rest_framework.authtoken.views import obtain_auth_token from . import views urlpatterns = [ url(r'^generate_pdf/(?P<bill_id>\d+)$', views.generate_pdf, name='generate-pdf'), url(r'^users/$', views.UserAdmin.as_view(), name='users'), url(r'^users/(?P<pk...
Remove rest_framework routers, add urlpattern for users api
Remove rest_framework routers, add urlpattern for users api
Python
mit
ioO/billjobs
from django.conf.urls import url, include from rest_framework.authtoken.views import obtain_auth_token from . import views router = routers.DefaultRouter() router.register(r'users', views.UserViewSet) urlpatterns = [ url(r'^generate_pdf/(?P<bill_id>\d+)$', views.generate_pdf, name='generate-pdf'), url...
from django.conf.urls import url, include from rest_framework.authtoken.views import obtain_auth_token from . import views urlpatterns = [ url(r'^generate_pdf/(?P<bill_id>\d+)$', views.generate_pdf, name='generate-pdf'), url(r'^users/$', views.UserAdmin.as_view(), name='users'), url(r'^users/(?P<pk...
<commit_before>from django.conf.urls import url, include from rest_framework.authtoken.views import obtain_auth_token from . import views router = routers.DefaultRouter() router.register(r'users', views.UserViewSet) urlpatterns = [ url(r'^generate_pdf/(?P<bill_id>\d+)$', views.generate_pdf, name='generate...
from django.conf.urls import url, include from rest_framework.authtoken.views import obtain_auth_token from . import views urlpatterns = [ url(r'^generate_pdf/(?P<bill_id>\d+)$', views.generate_pdf, name='generate-pdf'), url(r'^users/$', views.UserAdmin.as_view(), name='users'), url(r'^users/(?P<pk...
from django.conf.urls import url, include from rest_framework.authtoken.views import obtain_auth_token from . import views router = routers.DefaultRouter() router.register(r'users', views.UserViewSet) urlpatterns = [ url(r'^generate_pdf/(?P<bill_id>\d+)$', views.generate_pdf, name='generate-pdf'), url...
<commit_before>from django.conf.urls import url, include from rest_framework.authtoken.views import obtain_auth_token from . import views router = routers.DefaultRouter() router.register(r'users', views.UserViewSet) urlpatterns = [ url(r'^generate_pdf/(?P<bill_id>\d+)$', views.generate_pdf, name='generate...
f8bc5893ee875a309361c26b93996917dbef3ba8
silk/webdoc/html/__init__.py
silk/webdoc/html/__init__.py
from .common import *
from .common import ( # noqa A, ABBR, ACRONYM, ADDRESS, APPLET, AREA, ARTICLE, ASIDE, AUDIO, B, BASE, BASEFONT, BDI, BDO, BIG, BLOCKQUOTE, BODY, BR, BUTTON, Body, CANVAS, CAPTION, CAT, CENTER, CITE, CODE, COL, ...
Replace import * with explicit names
Replace import * with explicit names
Python
bsd-3-clause
orbnauticus/silk
from .common import * Replace import * with explicit names
from .common import ( # noqa A, ABBR, ACRONYM, ADDRESS, APPLET, AREA, ARTICLE, ASIDE, AUDIO, B, BASE, BASEFONT, BDI, BDO, BIG, BLOCKQUOTE, BODY, BR, BUTTON, Body, CANVAS, CAPTION, CAT, CENTER, CITE, CODE, COL, ...
<commit_before> from .common import * <commit_msg>Replace import * with explicit names<commit_after>
from .common import ( # noqa A, ABBR, ACRONYM, ADDRESS, APPLET, AREA, ARTICLE, ASIDE, AUDIO, B, BASE, BASEFONT, BDI, BDO, BIG, BLOCKQUOTE, BODY, BR, BUTTON, Body, CANVAS, CAPTION, CAT, CENTER, CITE, CODE, COL, ...
from .common import * Replace import * with explicit names from .common import ( # noqa A, ABBR, ACRONYM, ADDRESS, APPLET, AREA, ARTICLE, ASIDE, AUDIO, B, BASE, BASEFONT, BDI, BDO, BIG, BLOCKQUOTE, BODY, BR, BUTTON, Body, CANVAS, ...
<commit_before> from .common import * <commit_msg>Replace import * with explicit names<commit_after> from .common import ( # noqa A, ABBR, ACRONYM, ADDRESS, APPLET, AREA, ARTICLE, ASIDE, AUDIO, B, BASE, BASEFONT, BDI, BDO, BIG, BLOCKQUOTE, BODY, B...
4ec16018192c1bd8fbe60a9e4c410c6c898149f0
server/ec2spotmanager/migrations/0007_instance_type_to_list.py
server/ec2spotmanager/migrations/0007_instance_type_to_list.py
# -*- coding: utf-8 -*- # Generated by Django 1.11.5 on 2018-02-28 16:47 from __future__ import unicode_literals from django.db import migrations, models def instance_types_to_list(apps, schema_editor): PoolConfiguration = apps.get_model("ec2spotmanager", "PoolConfiguration") for pool in PoolConfiguration.ob...
# -*- coding: utf-8 -*- # Generated by Django 1.11.5 on 2018-02-28 16:47 from __future__ import print_function, unicode_literals import json import sys from django.db import migrations, models def instance_type_to_list(apps, schema_editor): PoolConfiguration = apps.get_model("ec2spotmanager", "PoolConfiguration"...
Fix migration. Custom triggers are not run in data migrations.
Fix migration. Custom triggers are not run in data migrations.
Python
mpl-2.0
MozillaSecurity/FuzzManager,MozillaSecurity/FuzzManager,MozillaSecurity/FuzzManager,MozillaSecurity/FuzzManager
# -*- coding: utf-8 -*- # Generated by Django 1.11.5 on 2018-02-28 16:47 from __future__ import unicode_literals from django.db import migrations, models def instance_types_to_list(apps, schema_editor): PoolConfiguration = apps.get_model("ec2spotmanager", "PoolConfiguration") for pool in PoolConfiguration.ob...
# -*- coding: utf-8 -*- # Generated by Django 1.11.5 on 2018-02-28 16:47 from __future__ import print_function, unicode_literals import json import sys from django.db import migrations, models def instance_type_to_list(apps, schema_editor): PoolConfiguration = apps.get_model("ec2spotmanager", "PoolConfiguration"...
<commit_before># -*- coding: utf-8 -*- # Generated by Django 1.11.5 on 2018-02-28 16:47 from __future__ import unicode_literals from django.db import migrations, models def instance_types_to_list(apps, schema_editor): PoolConfiguration = apps.get_model("ec2spotmanager", "PoolConfiguration") for pool in PoolC...
# -*- coding: utf-8 -*- # Generated by Django 1.11.5 on 2018-02-28 16:47 from __future__ import print_function, unicode_literals import json import sys from django.db import migrations, models def instance_type_to_list(apps, schema_editor): PoolConfiguration = apps.get_model("ec2spotmanager", "PoolConfiguration"...
# -*- coding: utf-8 -*- # Generated by Django 1.11.5 on 2018-02-28 16:47 from __future__ import unicode_literals from django.db import migrations, models def instance_types_to_list(apps, schema_editor): PoolConfiguration = apps.get_model("ec2spotmanager", "PoolConfiguration") for pool in PoolConfiguration.ob...
<commit_before># -*- coding: utf-8 -*- # Generated by Django 1.11.5 on 2018-02-28 16:47 from __future__ import unicode_literals from django.db import migrations, models def instance_types_to_list(apps, schema_editor): PoolConfiguration = apps.get_model("ec2spotmanager", "PoolConfiguration") for pool in PoolC...
9d4b85cdad969dfeb8e9bee1203eb9c916849b1a
wafer/sponsors/views.py
wafer/sponsors/views.py
from django.views.generic.list import ListView from django.views.generic import DetailView from rest_framework import viewsets from rest_framework.permissions import DjangoModelPermissionsOrAnonReadOnly from wafer.sponsors.models import Sponsor, SponsorshipPackage from wafer.sponsors.serializers import SponsorSeriali...
from django.views.generic.list import ListView from django.views.generic import DetailView from rest_framework import viewsets from rest_framework.permissions import DjangoModelPermissionsOrAnonReadOnly from wafer.sponsors.models import Sponsor, SponsorshipPackage from wafer.sponsors.serializers import SponsorSeriali...
Use order in all sponsors view query
Use order in all sponsors view query
Python
isc
CTPUG/wafer,CTPUG/wafer,CTPUG/wafer,CTPUG/wafer
from django.views.generic.list import ListView from django.views.generic import DetailView from rest_framework import viewsets from rest_framework.permissions import DjangoModelPermissionsOrAnonReadOnly from wafer.sponsors.models import Sponsor, SponsorshipPackage from wafer.sponsors.serializers import SponsorSeriali...
from django.views.generic.list import ListView from django.views.generic import DetailView from rest_framework import viewsets from rest_framework.permissions import DjangoModelPermissionsOrAnonReadOnly from wafer.sponsors.models import Sponsor, SponsorshipPackage from wafer.sponsors.serializers import SponsorSeriali...
<commit_before>from django.views.generic.list import ListView from django.views.generic import DetailView from rest_framework import viewsets from rest_framework.permissions import DjangoModelPermissionsOrAnonReadOnly from wafer.sponsors.models import Sponsor, SponsorshipPackage from wafer.sponsors.serializers import...
from django.views.generic.list import ListView from django.views.generic import DetailView from rest_framework import viewsets from rest_framework.permissions import DjangoModelPermissionsOrAnonReadOnly from wafer.sponsors.models import Sponsor, SponsorshipPackage from wafer.sponsors.serializers import SponsorSeriali...
from django.views.generic.list import ListView from django.views.generic import DetailView from rest_framework import viewsets from rest_framework.permissions import DjangoModelPermissionsOrAnonReadOnly from wafer.sponsors.models import Sponsor, SponsorshipPackage from wafer.sponsors.serializers import SponsorSeriali...
<commit_before>from django.views.generic.list import ListView from django.views.generic import DetailView from rest_framework import viewsets from rest_framework.permissions import DjangoModelPermissionsOrAnonReadOnly from wafer.sponsors.models import Sponsor, SponsorshipPackage from wafer.sponsors.serializers import...
19cd85215a7a305e6f253405a88d087aef114811
candidates/tests/test_constituencies_view.py
candidates/tests/test_constituencies_view.py
import re from django_webtest import WebTest class TestConstituencyDetailView(WebTest): def test_constituencies_page(self): # Just a smoke test to check that the page loads: response = self.app.get('/constituencies') aberdeen_north = response.html.find( 'a', text=re.compile(r'...
import re from mock import patch from django_webtest import WebTest class TestConstituencyDetailView(WebTest): @patch('candidates.popit.PopIt') def test_constituencies_page(self, mock_popit): # Just a smoke test to check that the page loads: response = self.app.get('/constituencies') ...
Make test_constituencies_page work without PopIt
Make test_constituencies_page work without PopIt
Python
agpl-3.0
DemocracyClub/yournextrepresentative,mysociety/yournextrepresentative,mysociety/yournextmp-popit,neavouli/yournextrepresentative,DemocracyClub/yournextrepresentative,YoQuieroSaber/yournextrepresentative,mysociety/yournextrepresentative,YoQuieroSaber/yournextrepresentative,YoQuieroSaber/yournextrepresentative,openstate/...
import re from django_webtest import WebTest class TestConstituencyDetailView(WebTest): def test_constituencies_page(self): # Just a smoke test to check that the page loads: response = self.app.get('/constituencies') aberdeen_north = response.html.find( 'a', text=re.compile(r'...
import re from mock import patch from django_webtest import WebTest class TestConstituencyDetailView(WebTest): @patch('candidates.popit.PopIt') def test_constituencies_page(self, mock_popit): # Just a smoke test to check that the page loads: response = self.app.get('/constituencies') ...
<commit_before>import re from django_webtest import WebTest class TestConstituencyDetailView(WebTest): def test_constituencies_page(self): # Just a smoke test to check that the page loads: response = self.app.get('/constituencies') aberdeen_north = response.html.find( 'a', tex...
import re from mock import patch from django_webtest import WebTest class TestConstituencyDetailView(WebTest): @patch('candidates.popit.PopIt') def test_constituencies_page(self, mock_popit): # Just a smoke test to check that the page loads: response = self.app.get('/constituencies') ...
import re from django_webtest import WebTest class TestConstituencyDetailView(WebTest): def test_constituencies_page(self): # Just a smoke test to check that the page loads: response = self.app.get('/constituencies') aberdeen_north = response.html.find( 'a', text=re.compile(r'...
<commit_before>import re from django_webtest import WebTest class TestConstituencyDetailView(WebTest): def test_constituencies_page(self): # Just a smoke test to check that the page loads: response = self.app.get('/constituencies') aberdeen_north = response.html.find( 'a', tex...
09b1830f1f8683f73ef0ad111155c8d0aa75e5e2
settings_unittest.py
settings_unittest.py
from settings_common import * DEBUG = TEMPLATE_DEBUG = True DATABASE_ENGINE = 'sqlite3' DAISY_PIPELINE_PATH = os.path.join(PROJECT_DIR, '..', '..', 'tmp', 'pipeline-20090410')
from settings_common import * DEBUG = TEMPLATE_DEBUG = False DATABASE_ENGINE = 'sqlite3' TEST_DATABASE_NAME = 'unittest.db' DAISY_PIPELINE_PATH = os.path.join(PROJECT_DIR, '..', '..', 'tmp', 'pipeline-20090410')
Disable debug for unit test and specify a test db name.
Disable debug for unit test and specify a test db name.
Python
agpl-3.0
sbsdev/daisyproducer,sbsdev/daisyproducer,sbsdev/daisyproducer,sbsdev/daisyproducer
from settings_common import * DEBUG = TEMPLATE_DEBUG = True DATABASE_ENGINE = 'sqlite3' DAISY_PIPELINE_PATH = os.path.join(PROJECT_DIR, '..', '..', 'tmp', 'pipeline-20090410') Disable debug for unit test and specify a test db name.
from settings_common import * DEBUG = TEMPLATE_DEBUG = False DATABASE_ENGINE = 'sqlite3' TEST_DATABASE_NAME = 'unittest.db' DAISY_PIPELINE_PATH = os.path.join(PROJECT_DIR, '..', '..', 'tmp', 'pipeline-20090410')
<commit_before>from settings_common import * DEBUG = TEMPLATE_DEBUG = True DATABASE_ENGINE = 'sqlite3' DAISY_PIPELINE_PATH = os.path.join(PROJECT_DIR, '..', '..', 'tmp', 'pipeline-20090410') <commit_msg>Disable debug for unit test and specify a test db name.<commit_after>
from settings_common import * DEBUG = TEMPLATE_DEBUG = False DATABASE_ENGINE = 'sqlite3' TEST_DATABASE_NAME = 'unittest.db' DAISY_PIPELINE_PATH = os.path.join(PROJECT_DIR, '..', '..', 'tmp', 'pipeline-20090410')
from settings_common import * DEBUG = TEMPLATE_DEBUG = True DATABASE_ENGINE = 'sqlite3' DAISY_PIPELINE_PATH = os.path.join(PROJECT_DIR, '..', '..', 'tmp', 'pipeline-20090410') Disable debug for unit test and specify a test db name.from settings_common import * DEBUG = TEMPLATE_DEBUG = False DATABASE_ENGINE = 'sqli...
<commit_before>from settings_common import * DEBUG = TEMPLATE_DEBUG = True DATABASE_ENGINE = 'sqlite3' DAISY_PIPELINE_PATH = os.path.join(PROJECT_DIR, '..', '..', 'tmp', 'pipeline-20090410') <commit_msg>Disable debug for unit test and specify a test db name.<commit_after>from settings_common import * DEBUG = TEMPLA...
a4585dc9a0d30b223db14755a00df79b96dd1f28
site/threads/urls.py
site/threads/urls.py
from django.conf.urls import url from . import views urlpatterns = [ url(r'^$', views.post_list.as_view()), url(r'/?P<id>[0-9]/$', views.post_detail.as_view()) ]
from django.conf.urls import url from . import views urlpatterns = [ url(r'^$', views.post_list.as_view()), url(r'P<id>[0-9]/$', views.post_detail.as_view()) ]
Remove leading slash from URL.
Remove leading slash from URL.
Python
mit
annaelde/forum-app,annaelde/forum-app,annaelde/forum-app
from django.conf.urls import url from . import views urlpatterns = [ url(r'^$', views.post_list.as_view()), url(r'/?P<id>[0-9]/$', views.post_detail.as_view()) ]Remove leading slash from URL.
from django.conf.urls import url from . import views urlpatterns = [ url(r'^$', views.post_list.as_view()), url(r'P<id>[0-9]/$', views.post_detail.as_view()) ]
<commit_before>from django.conf.urls import url from . import views urlpatterns = [ url(r'^$', views.post_list.as_view()), url(r'/?P<id>[0-9]/$', views.post_detail.as_view()) ]<commit_msg>Remove leading slash from URL.<commit_after>
from django.conf.urls import url from . import views urlpatterns = [ url(r'^$', views.post_list.as_view()), url(r'P<id>[0-9]/$', views.post_detail.as_view()) ]
from django.conf.urls import url from . import views urlpatterns = [ url(r'^$', views.post_list.as_view()), url(r'/?P<id>[0-9]/$', views.post_detail.as_view()) ]Remove leading slash from URL.from django.conf.urls import url from . import views urlpatterns = [ url(r'^$', views.post_list.as_view()), url...
<commit_before>from django.conf.urls import url from . import views urlpatterns = [ url(r'^$', views.post_list.as_view()), url(r'/?P<id>[0-9]/$', views.post_detail.as_view()) ]<commit_msg>Remove leading slash from URL.<commit_after>from django.conf.urls import url from . import views urlpatterns = [ url(r...
723a102d6272e7ba4b9df405b7c1493c34ac5b77
masters/master.chromium.fyi/master_site_config.py
masters/master.chromium.fyi/master_site_config.py
# Copyright 2013 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """ActiveMaster definition.""" from config_bootstrap import Master class ChromiumFYI(Master.Master1): project_name = 'Chromium FYI' master_port = 8011 ...
# Copyright 2013 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """ActiveMaster definition.""" from config_bootstrap import Master class ChromiumFYI(Master.Master1): project_name = 'Chromium FYI' master_port = 8011 ...
Revert pubsub roll on FYI
Revert pubsub roll on FYI BUG= TBR=estaab Review URL: https://codereview.chromium.org/1688503002 git-svn-id: 239fca9b83025a0b6f823aeeca02ba5be3d9fd76@298680 0039d316-1c4b-4281-b951-d872f2087c98
Python
bsd-3-clause
eunchong/build,eunchong/build,eunchong/build,eunchong/build
# Copyright 2013 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """ActiveMaster definition.""" from config_bootstrap import Master class ChromiumFYI(Master.Master1): project_name = 'Chromium FYI' master_port = 8011 ...
# Copyright 2013 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """ActiveMaster definition.""" from config_bootstrap import Master class ChromiumFYI(Master.Master1): project_name = 'Chromium FYI' master_port = 8011 ...
<commit_before># Copyright 2013 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """ActiveMaster definition.""" from config_bootstrap import Master class ChromiumFYI(Master.Master1): project_name = 'Chromium FYI' mast...
# Copyright 2013 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """ActiveMaster definition.""" from config_bootstrap import Master class ChromiumFYI(Master.Master1): project_name = 'Chromium FYI' master_port = 8011 ...
# Copyright 2013 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """ActiveMaster definition.""" from config_bootstrap import Master class ChromiumFYI(Master.Master1): project_name = 'Chromium FYI' master_port = 8011 ...
<commit_before># Copyright 2013 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """ActiveMaster definition.""" from config_bootstrap import Master class ChromiumFYI(Master.Master1): project_name = 'Chromium FYI' mast...
39d3f605d240a8abef22107424ec1d6f76161580
static_precompiler/models.py
static_precompiler/models.py
from django.db import models class Dependency(models.Model): source = models.CharField(max_length=255, db_index=True) depends_on = models.CharField(max_length=255, db_index=True) class Meta: unique_together = ("source", "depends_on")
from __future__ import unicode_literals from django.db import models class Dependency(models.Model): source = models.CharField(max_length=255, db_index=True) depends_on = models.CharField(max_length=255, db_index=True) class Meta: unique_together = ("source", "depends_on") def __unicode__(s...
Add __unicode__ to Dependency model
Add __unicode__ to Dependency model
Python
mit
jaheba/django-static-precompiler,jaheba/django-static-precompiler,paera/django-static-precompiler,liumengjun/django-static-precompiler,jaheba/django-static-precompiler,liumengjun/django-static-precompiler,paera/django-static-precompiler,liumengjun/django-static-precompiler,liumengjun/django-static-precompiler,liumengju...
from django.db import models class Dependency(models.Model): source = models.CharField(max_length=255, db_index=True) depends_on = models.CharField(max_length=255, db_index=True) class Meta: unique_together = ("source", "depends_on") Add __unicode__ to Dependency model
from __future__ import unicode_literals from django.db import models class Dependency(models.Model): source = models.CharField(max_length=255, db_index=True) depends_on = models.CharField(max_length=255, db_index=True) class Meta: unique_together = ("source", "depends_on") def __unicode__(s...
<commit_before>from django.db import models class Dependency(models.Model): source = models.CharField(max_length=255, db_index=True) depends_on = models.CharField(max_length=255, db_index=True) class Meta: unique_together = ("source", "depends_on") <commit_msg>Add __unicode__ to Dependency model...
from __future__ import unicode_literals from django.db import models class Dependency(models.Model): source = models.CharField(max_length=255, db_index=True) depends_on = models.CharField(max_length=255, db_index=True) class Meta: unique_together = ("source", "depends_on") def __unicode__(s...
from django.db import models class Dependency(models.Model): source = models.CharField(max_length=255, db_index=True) depends_on = models.CharField(max_length=255, db_index=True) class Meta: unique_together = ("source", "depends_on") Add __unicode__ to Dependency modelfrom __future__ import unic...
<commit_before>from django.db import models class Dependency(models.Model): source = models.CharField(max_length=255, db_index=True) depends_on = models.CharField(max_length=255, db_index=True) class Meta: unique_together = ("source", "depends_on") <commit_msg>Add __unicode__ to Dependency model...
d2051073d48873408a711b56676ee099e5ff685a
sunpy/timeseries/__init__.py
sunpy/timeseries/__init__.py
""" SunPy's TimeSeries module provides a datatype for 1D time series data, replacing the SunPy LightCurve module. Currently the objects can be instansiated from files (such as CSV and FITS) and urls to these files, but don't include data downloaders for their specific instruments as this will become part of the univer...
""" SunPy's TimeSeries module provides a datatype for 1D time series data, replacing the SunPy LightCurve module. Currently the objects can be instansiated from files (such as CSV and FITS) and urls to these files, but don't include data downloaders for their specific instruments as this will become part of the univer...
Fix matplotlib / pandas 0.21 bug in examples
Fix matplotlib / pandas 0.21 bug in examples Here we manually register the pandas matplotlib converters so people doing manual plotting with pandas works under pandas 0.21
Python
bsd-2-clause
dpshelio/sunpy,dpshelio/sunpy,dpshelio/sunpy
""" SunPy's TimeSeries module provides a datatype for 1D time series data, replacing the SunPy LightCurve module. Currently the objects can be instansiated from files (such as CSV and FITS) and urls to these files, but don't include data downloaders for their specific instruments as this will become part of the univer...
""" SunPy's TimeSeries module provides a datatype for 1D time series data, replacing the SunPy LightCurve module. Currently the objects can be instansiated from files (such as CSV and FITS) and urls to these files, but don't include data downloaders for their specific instruments as this will become part of the univer...
<commit_before>""" SunPy's TimeSeries module provides a datatype for 1D time series data, replacing the SunPy LightCurve module. Currently the objects can be instansiated from files (such as CSV and FITS) and urls to these files, but don't include data downloaders for their specific instruments as this will become par...
""" SunPy's TimeSeries module provides a datatype for 1D time series data, replacing the SunPy LightCurve module. Currently the objects can be instansiated from files (such as CSV and FITS) and urls to these files, but don't include data downloaders for their specific instruments as this will become part of the univer...
""" SunPy's TimeSeries module provides a datatype for 1D time series data, replacing the SunPy LightCurve module. Currently the objects can be instansiated from files (such as CSV and FITS) and urls to these files, but don't include data downloaders for their specific instruments as this will become part of the univer...
<commit_before>""" SunPy's TimeSeries module provides a datatype for 1D time series data, replacing the SunPy LightCurve module. Currently the objects can be instansiated from files (such as CSV and FITS) and urls to these files, but don't include data downloaders for their specific instruments as this will become par...
dae3f42c6f6800181bc1d9f2e98cbacf03849431
scripts/create_heatmap.py
scripts/create_heatmap.py
#!/usr/bin/python # -*- coding: utf-8 -*- import sys import os sys.path.append(os.path.dirname(os.path.dirname(__file__)) + '/src') import DataVisualizing if len(sys.argv) != 2: print 'usage: create_heatmap.py <data file>' print ' expected infile is a datafile containing tracking data' print ' this is a...
#!/usr/bin/python # -*- coding: utf-8 -*- import sys import os sys.path.append(os.path.dirname(os.path.dirname(__file__)) + '/src') import DataVisualizing if len(sys.argv) != 2: print 'usage: create_heatmap.py <data file>' print ' expected infile is a datafile containing tracking data' print ' this is a...
Add raw line data to output
Add raw line data to output
Python
mit
LifeWatchINBO/bird-tracking,LifeWatchINBO/bird-tracking
#!/usr/bin/python # -*- coding: utf-8 -*- import sys import os sys.path.append(os.path.dirname(os.path.dirname(__file__)) + '/src') import DataVisualizing if len(sys.argv) != 2: print 'usage: create_heatmap.py <data file>' print ' expected infile is a datafile containing tracking data' print ' this is a...
#!/usr/bin/python # -*- coding: utf-8 -*- import sys import os sys.path.append(os.path.dirname(os.path.dirname(__file__)) + '/src') import DataVisualizing if len(sys.argv) != 2: print 'usage: create_heatmap.py <data file>' print ' expected infile is a datafile containing tracking data' print ' this is a...
<commit_before>#!/usr/bin/python # -*- coding: utf-8 -*- import sys import os sys.path.append(os.path.dirname(os.path.dirname(__file__)) + '/src') import DataVisualizing if len(sys.argv) != 2: print 'usage: create_heatmap.py <data file>' print ' expected infile is a datafile containing tracking data' pri...
#!/usr/bin/python # -*- coding: utf-8 -*- import sys import os sys.path.append(os.path.dirname(os.path.dirname(__file__)) + '/src') import DataVisualizing if len(sys.argv) != 2: print 'usage: create_heatmap.py <data file>' print ' expected infile is a datafile containing tracking data' print ' this is a...
#!/usr/bin/python # -*- coding: utf-8 -*- import sys import os sys.path.append(os.path.dirname(os.path.dirname(__file__)) + '/src') import DataVisualizing if len(sys.argv) != 2: print 'usage: create_heatmap.py <data file>' print ' expected infile is a datafile containing tracking data' print ' this is a...
<commit_before>#!/usr/bin/python # -*- coding: utf-8 -*- import sys import os sys.path.append(os.path.dirname(os.path.dirname(__file__)) + '/src') import DataVisualizing if len(sys.argv) != 2: print 'usage: create_heatmap.py <data file>' print ' expected infile is a datafile containing tracking data' pri...
2de7222ffd3d9f4cc7971ad142aa2542eb7ca117
yunity/stores/models.py
yunity/stores/models.py
from config import settings from yunity.base.base_models import BaseModel, LocationModel from django.db import models class PickupDate(BaseModel): date = models.DateTimeField() collectors = models.ManyToManyField(settings.AUTH_USER_MODEL) store = models.ForeignKey('stores.store', related_name='pickupdates...
from config import settings from yunity.base.base_models import BaseModel, LocationModel from django.db import models class PickupDate(BaseModel): date = models.DateTimeField() collectors = models.ManyToManyField(settings.AUTH_USER_MODEL) store = models.ForeignKey('stores.store', related_name='pickupdates...
Add related name for group of store
Add related name for group of store
Python
agpl-3.0
yunity/yunity-core,yunity/foodsaving-backend,yunity/yunity-core,yunity/foodsaving-backend,yunity/foodsaving-backend
from config import settings from yunity.base.base_models import BaseModel, LocationModel from django.db import models class PickupDate(BaseModel): date = models.DateTimeField() collectors = models.ManyToManyField(settings.AUTH_USER_MODEL) store = models.ForeignKey('stores.store', related_name='pickupdates...
from config import settings from yunity.base.base_models import BaseModel, LocationModel from django.db import models class PickupDate(BaseModel): date = models.DateTimeField() collectors = models.ManyToManyField(settings.AUTH_USER_MODEL) store = models.ForeignKey('stores.store', related_name='pickupdates...
<commit_before>from config import settings from yunity.base.base_models import BaseModel, LocationModel from django.db import models class PickupDate(BaseModel): date = models.DateTimeField() collectors = models.ManyToManyField(settings.AUTH_USER_MODEL) store = models.ForeignKey('stores.store', related_na...
from config import settings from yunity.base.base_models import BaseModel, LocationModel from django.db import models class PickupDate(BaseModel): date = models.DateTimeField() collectors = models.ManyToManyField(settings.AUTH_USER_MODEL) store = models.ForeignKey('stores.store', related_name='pickupdates...
from config import settings from yunity.base.base_models import BaseModel, LocationModel from django.db import models class PickupDate(BaseModel): date = models.DateTimeField() collectors = models.ManyToManyField(settings.AUTH_USER_MODEL) store = models.ForeignKey('stores.store', related_name='pickupdates...
<commit_before>from config import settings from yunity.base.base_models import BaseModel, LocationModel from django.db import models class PickupDate(BaseModel): date = models.DateTimeField() collectors = models.ManyToManyField(settings.AUTH_USER_MODEL) store = models.ForeignKey('stores.store', related_na...
77ae27596c96ef5b8c05fcd02448576b419de074
config.py
config.py
class Config: SECRET_KEY = 'jsA5!@z1' class DevelopmentConfig(Config): DEBUG = True SQLALCHEMY_DATABASE_URI = "postgresql://admin:adminpass@localhost/fastmonkeys" config = { 'development': DevelopmentConfig }
class Config: SECRET_KEY = 'jsA5!@z1' class DevelopmentConfig(Config): DEBUG = True SQLALCHEMY_DATABASE_URI = "postgresql://admin:adminpass@localhost/fastmonkeys" SQLALCHEMY_COMMIT_ON_TEARDOWN = True config = { 'development': DevelopmentConfig }
Add SQLAlchemy commit on after request end
Add SQLAlchemy commit on after request end
Python
mit
timzdevz/fm-flask-app
class Config: SECRET_KEY = 'jsA5!@z1' class DevelopmentConfig(Config): DEBUG = True SQLALCHEMY_DATABASE_URI = "postgresql://admin:adminpass@localhost/fastmonkeys" config = { 'development': DevelopmentConfig } Add SQLAlchemy commit on after request end
class Config: SECRET_KEY = 'jsA5!@z1' class DevelopmentConfig(Config): DEBUG = True SQLALCHEMY_DATABASE_URI = "postgresql://admin:adminpass@localhost/fastmonkeys" SQLALCHEMY_COMMIT_ON_TEARDOWN = True config = { 'development': DevelopmentConfig }
<commit_before>class Config: SECRET_KEY = 'jsA5!@z1' class DevelopmentConfig(Config): DEBUG = True SQLALCHEMY_DATABASE_URI = "postgresql://admin:adminpass@localhost/fastmonkeys" config = { 'development': DevelopmentConfig } <commit_msg>Add SQLAlchemy commit on after request end<commit_after>
class Config: SECRET_KEY = 'jsA5!@z1' class DevelopmentConfig(Config): DEBUG = True SQLALCHEMY_DATABASE_URI = "postgresql://admin:adminpass@localhost/fastmonkeys" SQLALCHEMY_COMMIT_ON_TEARDOWN = True config = { 'development': DevelopmentConfig }
class Config: SECRET_KEY = 'jsA5!@z1' class DevelopmentConfig(Config): DEBUG = True SQLALCHEMY_DATABASE_URI = "postgresql://admin:adminpass@localhost/fastmonkeys" config = { 'development': DevelopmentConfig } Add SQLAlchemy commit on after request endclass Config: SECRET_KEY = 'jsA5!@z1' class De...
<commit_before>class Config: SECRET_KEY = 'jsA5!@z1' class DevelopmentConfig(Config): DEBUG = True SQLALCHEMY_DATABASE_URI = "postgresql://admin:adminpass@localhost/fastmonkeys" config = { 'development': DevelopmentConfig } <commit_msg>Add SQLAlchemy commit on after request end<commit_after>class Conf...
a475fc39480b52d4f38d37e58b3e3c45e8335a1e
tagalog/command/logship.py
tagalog/command/logship.py
from __future__ import print_function, unicode_literals import argparse import json import sys import textwrap from tagalog import io, stamp, tag from tagalog import shipper parser = argparse.ArgumentParser(description=textwrap.dedent(""" Ship log data from STDIN to somewhere else, timestamping and preprocessing ...
from __future__ import print_function, unicode_literals import argparse import json import sys import textwrap from tagalog import io, stamp, tag from tagalog import shipper parser = argparse.ArgumentParser(description=textwrap.dedent(""" Ship log data from STDIN to somewhere else, timestamping and preprocessing ...
Add support for elasticsearch bulk format
Add support for elasticsearch bulk format Add a switch to logship to enable support for sending log data in elasticsearch bulk format.
Python
mit
nickstenning/tagalog,nickstenning/tagalog,alphagov/tagalog,alphagov/tagalog
from __future__ import print_function, unicode_literals import argparse import json import sys import textwrap from tagalog import io, stamp, tag from tagalog import shipper parser = argparse.ArgumentParser(description=textwrap.dedent(""" Ship log data from STDIN to somewhere else, timestamping and preprocessing ...
from __future__ import print_function, unicode_literals import argparse import json import sys import textwrap from tagalog import io, stamp, tag from tagalog import shipper parser = argparse.ArgumentParser(description=textwrap.dedent(""" Ship log data from STDIN to somewhere else, timestamping and preprocessing ...
<commit_before>from __future__ import print_function, unicode_literals import argparse import json import sys import textwrap from tagalog import io, stamp, tag from tagalog import shipper parser = argparse.ArgumentParser(description=textwrap.dedent(""" Ship log data from STDIN to somewhere else, timestamping and...
from __future__ import print_function, unicode_literals import argparse import json import sys import textwrap from tagalog import io, stamp, tag from tagalog import shipper parser = argparse.ArgumentParser(description=textwrap.dedent(""" Ship log data from STDIN to somewhere else, timestamping and preprocessing ...
from __future__ import print_function, unicode_literals import argparse import json import sys import textwrap from tagalog import io, stamp, tag from tagalog import shipper parser = argparse.ArgumentParser(description=textwrap.dedent(""" Ship log data from STDIN to somewhere else, timestamping and preprocessing ...
<commit_before>from __future__ import print_function, unicode_literals import argparse import json import sys import textwrap from tagalog import io, stamp, tag from tagalog import shipper parser = argparse.ArgumentParser(description=textwrap.dedent(""" Ship log data from STDIN to somewhere else, timestamping and...
667182bf3460e2237255b00b0eea20a1cf4a83ab
app/main/views/feedback.py
app/main/views/feedback.py
import requests from werkzeug.exceptions import ServiceUnavailable from werkzeug.datastructures import MultiDict from werkzeug.urls import url_parse from flask import current_app, request, redirect, flash, Markup from .. import main @main.route('/feedback', methods=["POST"]) def send_feedback(): feedback_confi...
import requests from werkzeug.exceptions import ServiceUnavailable from werkzeug.datastructures import MultiDict from werkzeug.urls import url_parse from flask import current_app, request, redirect, flash, Markup from .. import main @main.route('/feedback', methods=["POST"]) def send_feedback(): feedback_confi...
Fix broken submission on Python 3.
Fix broken submission on Python 3. - this breaks Python 2, but we don't care any more. https://trello.com/c/Uak7y047/8-feedback-forms
Python
mit
alphagov/digitalmarketplace-buyer-frontend,alphagov/digitalmarketplace-buyer-frontend,alphagov/digitalmarketplace-buyer-frontend,alphagov/digitalmarketplace-buyer-frontend
import requests from werkzeug.exceptions import ServiceUnavailable from werkzeug.datastructures import MultiDict from werkzeug.urls import url_parse from flask import current_app, request, redirect, flash, Markup from .. import main @main.route('/feedback', methods=["POST"]) def send_feedback(): feedback_confi...
import requests from werkzeug.exceptions import ServiceUnavailable from werkzeug.datastructures import MultiDict from werkzeug.urls import url_parse from flask import current_app, request, redirect, flash, Markup from .. import main @main.route('/feedback', methods=["POST"]) def send_feedback(): feedback_confi...
<commit_before>import requests from werkzeug.exceptions import ServiceUnavailable from werkzeug.datastructures import MultiDict from werkzeug.urls import url_parse from flask import current_app, request, redirect, flash, Markup from .. import main @main.route('/feedback', methods=["POST"]) def send_feedback(): ...
import requests from werkzeug.exceptions import ServiceUnavailable from werkzeug.datastructures import MultiDict from werkzeug.urls import url_parse from flask import current_app, request, redirect, flash, Markup from .. import main @main.route('/feedback', methods=["POST"]) def send_feedback(): feedback_confi...
import requests from werkzeug.exceptions import ServiceUnavailable from werkzeug.datastructures import MultiDict from werkzeug.urls import url_parse from flask import current_app, request, redirect, flash, Markup from .. import main @main.route('/feedback', methods=["POST"]) def send_feedback(): feedback_confi...
<commit_before>import requests from werkzeug.exceptions import ServiceUnavailable from werkzeug.datastructures import MultiDict from werkzeug.urls import url_parse from flask import current_app, request, redirect, flash, Markup from .. import main @main.route('/feedback', methods=["POST"]) def send_feedback(): ...
7ddc4b975910bf9c77b753e8e0aeaebc45949e4e
linkatos.py
linkatos.py
#! /usr/bin/env python import os import time from slackclient import SlackClient import pyrebase import linkatos.parser as parser import linkatos.confirmation as confirmation import linkatos.printer as printer import linkatos.utils as utils import linkatos.firebase as fb # starterbot environment variables BOT_ID = os....
#! /usr/bin/env python import os import time from slackclient import SlackClient import pyrebase import linkatos.firebase as fb # starterbot environment variables BOT_ID = os.environ.get("BOT_ID") SLACK_BOT_TOKEN = os.environ.get("SLACK_BOT_TOKEN") # instantiate Slack clients slack_client = SlackClient(SLACK_BOT_TOKE...
Remove old imports from main
refactor: Remove old imports from main
Python
mit
iwi/linkatos,iwi/linkatos
#! /usr/bin/env python import os import time from slackclient import SlackClient import pyrebase import linkatos.parser as parser import linkatos.confirmation as confirmation import linkatos.printer as printer import linkatos.utils as utils import linkatos.firebase as fb # starterbot environment variables BOT_ID = os....
#! /usr/bin/env python import os import time from slackclient import SlackClient import pyrebase import linkatos.firebase as fb # starterbot environment variables BOT_ID = os.environ.get("BOT_ID") SLACK_BOT_TOKEN = os.environ.get("SLACK_BOT_TOKEN") # instantiate Slack clients slack_client = SlackClient(SLACK_BOT_TOKE...
<commit_before>#! /usr/bin/env python import os import time from slackclient import SlackClient import pyrebase import linkatos.parser as parser import linkatos.confirmation as confirmation import linkatos.printer as printer import linkatos.utils as utils import linkatos.firebase as fb # starterbot environment variabl...
#! /usr/bin/env python import os import time from slackclient import SlackClient import pyrebase import linkatos.firebase as fb # starterbot environment variables BOT_ID = os.environ.get("BOT_ID") SLACK_BOT_TOKEN = os.environ.get("SLACK_BOT_TOKEN") # instantiate Slack clients slack_client = SlackClient(SLACK_BOT_TOKE...
#! /usr/bin/env python import os import time from slackclient import SlackClient import pyrebase import linkatos.parser as parser import linkatos.confirmation as confirmation import linkatos.printer as printer import linkatos.utils as utils import linkatos.firebase as fb # starterbot environment variables BOT_ID = os....
<commit_before>#! /usr/bin/env python import os import time from slackclient import SlackClient import pyrebase import linkatos.parser as parser import linkatos.confirmation as confirmation import linkatos.printer as printer import linkatos.utils as utils import linkatos.firebase as fb # starterbot environment variabl...
d5cd1eddf1ecf0c463a90d0e69413aadd311977a
lots/urls.py
lots/urls.py
from django.conf.urls import patterns, include, url from django.conf import settings from django.contrib import admin admin.autodiscover() urlpatterns = patterns('', # Examples: url(r'^$', 'lots_client.views.home', name='home'), url(r'^status/$', 'lots_client.views.status', name='status'), url(r'^appl...
from django.conf.urls import patterns, include, url from django.contrib import admin admin.autodiscover() urlpatterns = patterns('', # Examples: url(r'^$', 'lots_client.views.home', name='home'), url(r'^status/$', 'lots_client.views.status', name='status'), url(r'^apply/$', 'lots_client.views.apply', ...
Revert "Picture access from admin console"
Revert "Picture access from admin console" This reverts commit 324fa160fb629f6c4537ca15212c0822e8ac436d.
Python
mit
opencleveland/large-lots,skorasaurus/large-lots,opencleveland/large-lots,skorasaurus/large-lots,skorasaurus/large-lots,skorasaurus/large-lots,opencleveland/large-lots,opencleveland/large-lots
from django.conf.urls import patterns, include, url from django.conf import settings from django.contrib import admin admin.autodiscover() urlpatterns = patterns('', # Examples: url(r'^$', 'lots_client.views.home', name='home'), url(r'^status/$', 'lots_client.views.status', name='status'), url(r'^appl...
from django.conf.urls import patterns, include, url from django.contrib import admin admin.autodiscover() urlpatterns = patterns('', # Examples: url(r'^$', 'lots_client.views.home', name='home'), url(r'^status/$', 'lots_client.views.status', name='status'), url(r'^apply/$', 'lots_client.views.apply', ...
<commit_before>from django.conf.urls import patterns, include, url from django.conf import settings from django.contrib import admin admin.autodiscover() urlpatterns = patterns('', # Examples: url(r'^$', 'lots_client.views.home', name='home'), url(r'^status/$', 'lots_client.views.status', name='status'), ...
from django.conf.urls import patterns, include, url from django.contrib import admin admin.autodiscover() urlpatterns = patterns('', # Examples: url(r'^$', 'lots_client.views.home', name='home'), url(r'^status/$', 'lots_client.views.status', name='status'), url(r'^apply/$', 'lots_client.views.apply', ...
from django.conf.urls import patterns, include, url from django.conf import settings from django.contrib import admin admin.autodiscover() urlpatterns = patterns('', # Examples: url(r'^$', 'lots_client.views.home', name='home'), url(r'^status/$', 'lots_client.views.status', name='status'), url(r'^appl...
<commit_before>from django.conf.urls import patterns, include, url from django.conf import settings from django.contrib import admin admin.autodiscover() urlpatterns = patterns('', # Examples: url(r'^$', 'lots_client.views.home', name='home'), url(r'^status/$', 'lots_client.views.status', name='status'), ...
418b65554d86f6fea33d0656ef2a98cb32607fd9
src/dicomweb_client/__init__.py
src/dicomweb_client/__init__.py
__version__ = '0.21.0rc' from dicomweb_client.api import DICOMwebClient
__version__ = '0.21.0' from dicomweb_client.api import DICOMwebClient
Increase package version for release
Increase package version for release
Python
mit
MGHComputationalPathology/dicomweb-client
__version__ = '0.21.0rc' from dicomweb_client.api import DICOMwebClient Increase package version for release
__version__ = '0.21.0' from dicomweb_client.api import DICOMwebClient
<commit_before>__version__ = '0.21.0rc' from dicomweb_client.api import DICOMwebClient <commit_msg>Increase package version for release<commit_after>
__version__ = '0.21.0' from dicomweb_client.api import DICOMwebClient
__version__ = '0.21.0rc' from dicomweb_client.api import DICOMwebClient Increase package version for release__version__ = '0.21.0' from dicomweb_client.api import DICOMwebClient
<commit_before>__version__ = '0.21.0rc' from dicomweb_client.api import DICOMwebClient <commit_msg>Increase package version for release<commit_after>__version__ = '0.21.0' from dicomweb_client.api import DICOMwebClient
88a31ebcd7b65f9282bb0d0a19ad299c1ad431ec
spectral_cube/__init__.py
spectral_cube/__init__.py
# Licensed under a 3-clause BSD style license - see LICENSE.rst """ This is an Astropy affiliated package. """ # Affiliated packages may add whatever they like to this file, but # should keep this content at the top. # ---------------------------------------------------------------------------- from ._astropy_init im...
# Licensed under a 3-clause BSD style license - see LICENSE.rst """ This is an Astropy affiliated package. """ # Affiliated packages may add whatever they like to this file, but # should keep this content at the top. # ---------------------------------------------------------------------------- from ._astropy_init im...
Make Projection importable from the top level of the package
Make Projection importable from the top level of the package
Python
bsd-3-clause
e-koch/spectral-cube,jzuhone/spectral-cube,radio-astro-tools/spectral-cube,keflavich/spectral-cube,low-sky/spectral-cube
# Licensed under a 3-clause BSD style license - see LICENSE.rst """ This is an Astropy affiliated package. """ # Affiliated packages may add whatever they like to this file, but # should keep this content at the top. # ---------------------------------------------------------------------------- from ._astropy_init im...
# Licensed under a 3-clause BSD style license - see LICENSE.rst """ This is an Astropy affiliated package. """ # Affiliated packages may add whatever they like to this file, but # should keep this content at the top. # ---------------------------------------------------------------------------- from ._astropy_init im...
<commit_before># Licensed under a 3-clause BSD style license - see LICENSE.rst """ This is an Astropy affiliated package. """ # Affiliated packages may add whatever they like to this file, but # should keep this content at the top. # ---------------------------------------------------------------------------- from ._...
# Licensed under a 3-clause BSD style license - see LICENSE.rst """ This is an Astropy affiliated package. """ # Affiliated packages may add whatever they like to this file, but # should keep this content at the top. # ---------------------------------------------------------------------------- from ._astropy_init im...
# Licensed under a 3-clause BSD style license - see LICENSE.rst """ This is an Astropy affiliated package. """ # Affiliated packages may add whatever they like to this file, but # should keep this content at the top. # ---------------------------------------------------------------------------- from ._astropy_init im...
<commit_before># Licensed under a 3-clause BSD style license - see LICENSE.rst """ This is an Astropy affiliated package. """ # Affiliated packages may add whatever they like to this file, but # should keep this content at the top. # ---------------------------------------------------------------------------- from ._...
26749bd6bd36c4cd930e60c1eb2d0460fd16506e
CodeFights/knapsackLight.py
CodeFights/knapsackLight.py
#!/usr/local/bin/python # Code Fights Knapsack Problem def knapsackLight(value1, weight1, value2, weight2, maxW): if weight1 + weight2 <= maxW: return value1 + value2 else: return max([v for v, w in zip((value1, value2), (weight1, weight2)) if w <= maxW] + [0]) def main():...
#!/usr/local/bin/python # Code Fights Knapsack Problem def knapsackLight(value1, weight1, value2, weight2, maxW): if weight1 + weight2 <= maxW: return value1 + value2 else: return max([v for v, w in zip((value1, value2), (weight1, weight2)) if w <= maxW] + [0]) def main():...
Add half tests to knapsack light problem
Add half tests to knapsack light problem
Python
mit
HKuz/Test_Code
#!/usr/local/bin/python # Code Fights Knapsack Problem def knapsackLight(value1, weight1, value2, weight2, maxW): if weight1 + weight2 <= maxW: return value1 + value2 else: return max([v for v, w in zip((value1, value2), (weight1, weight2)) if w <= maxW] + [0]) def main():...
#!/usr/local/bin/python # Code Fights Knapsack Problem def knapsackLight(value1, weight1, value2, weight2, maxW): if weight1 + weight2 <= maxW: return value1 + value2 else: return max([v for v, w in zip((value1, value2), (weight1, weight2)) if w <= maxW] + [0]) def main():...
<commit_before>#!/usr/local/bin/python # Code Fights Knapsack Problem def knapsackLight(value1, weight1, value2, weight2, maxW): if weight1 + weight2 <= maxW: return value1 + value2 else: return max([v for v, w in zip((value1, value2), (weight1, weight2)) if w <= maxW] + [0]...
#!/usr/local/bin/python # Code Fights Knapsack Problem def knapsackLight(value1, weight1, value2, weight2, maxW): if weight1 + weight2 <= maxW: return value1 + value2 else: return max([v for v, w in zip((value1, value2), (weight1, weight2)) if w <= maxW] + [0]) def main():...
#!/usr/local/bin/python # Code Fights Knapsack Problem def knapsackLight(value1, weight1, value2, weight2, maxW): if weight1 + weight2 <= maxW: return value1 + value2 else: return max([v for v, w in zip((value1, value2), (weight1, weight2)) if w <= maxW] + [0]) def main():...
<commit_before>#!/usr/local/bin/python # Code Fights Knapsack Problem def knapsackLight(value1, weight1, value2, weight2, maxW): if weight1 + weight2 <= maxW: return value1 + value2 else: return max([v for v, w in zip((value1, value2), (weight1, weight2)) if w <= maxW] + [0]...
60290b0ae96f144cc3b5672a47596355fe117ba7
tests/test_project/settings.py
tests/test_project/settings.py
DATABASES = { 'default': { 'ENGINE': 'django.db.backends.sqlite3', 'NAME': 'tests.db', }, } INSTALLED_APPS = [ 'django.contrib.auth', 'django.contrib.admin', 'django.contrib.sessions', 'django.contrib.sites', 'django.contrib.contenttypes', 'django.contrib.staticfiles', ...
DATABASES = { 'default': { 'ENGINE': 'django.db.backends.sqlite3', 'NAME': 'tests.db', }, } INSTALLED_APPS = [ 'django.contrib.auth', 'django.contrib.admin', 'django.contrib.sessions', 'django.contrib.sites', 'django.contrib.contenttypes', 'django.contrib.staticfiles', ...
Remove tz context processor (not available in 1.3)
Remove tz context processor (not available in 1.3)
Python
mit
ionelmc/django-easyfilters,ionelmc/django-easyfilters
DATABASES = { 'default': { 'ENGINE': 'django.db.backends.sqlite3', 'NAME': 'tests.db', }, } INSTALLED_APPS = [ 'django.contrib.auth', 'django.contrib.admin', 'django.contrib.sessions', 'django.contrib.sites', 'django.contrib.contenttypes', 'django.contrib.staticfiles', ...
DATABASES = { 'default': { 'ENGINE': 'django.db.backends.sqlite3', 'NAME': 'tests.db', }, } INSTALLED_APPS = [ 'django.contrib.auth', 'django.contrib.admin', 'django.contrib.sessions', 'django.contrib.sites', 'django.contrib.contenttypes', 'django.contrib.staticfiles', ...
<commit_before>DATABASES = { 'default': { 'ENGINE': 'django.db.backends.sqlite3', 'NAME': 'tests.db', }, } INSTALLED_APPS = [ 'django.contrib.auth', 'django.contrib.admin', 'django.contrib.sessions', 'django.contrib.sites', 'django.contrib.contenttypes', 'django.contrib....
DATABASES = { 'default': { 'ENGINE': 'django.db.backends.sqlite3', 'NAME': 'tests.db', }, } INSTALLED_APPS = [ 'django.contrib.auth', 'django.contrib.admin', 'django.contrib.sessions', 'django.contrib.sites', 'django.contrib.contenttypes', 'django.contrib.staticfiles', ...
DATABASES = { 'default': { 'ENGINE': 'django.db.backends.sqlite3', 'NAME': 'tests.db', }, } INSTALLED_APPS = [ 'django.contrib.auth', 'django.contrib.admin', 'django.contrib.sessions', 'django.contrib.sites', 'django.contrib.contenttypes', 'django.contrib.staticfiles', ...
<commit_before>DATABASES = { 'default': { 'ENGINE': 'django.db.backends.sqlite3', 'NAME': 'tests.db', }, } INSTALLED_APPS = [ 'django.contrib.auth', 'django.contrib.admin', 'django.contrib.sessions', 'django.contrib.sites', 'django.contrib.contenttypes', 'django.contrib....
a8d2ede0a38188670f6921bd9c2f08ee073b0cdd
test/test_configuration.py
test/test_configuration.py
from __future__ import with_statement import os.path import tempfile from nose.tools import * from behave import configuration # one entry of each kind handled TEST_CONFIG='''[behave] outfile=/tmp/spam paths = /absolute/path relative/path tags = @foo,~@bar @zap format=pretty tag-counter stdout_c...
from __future__ import with_statement import os.path import tempfile from nose.tools import * from behave import configuration # one entry of each kind handled TEST_CONFIG='''[behave] outfile=/tmp/spam paths = /absolute/path relative/path tags = @foo,~@bar @zap format=pretty tag-counter stdout_c...
FIX test for Windows platform.
FIX test for Windows platform.
Python
bsd-2-clause
allanlewis/behave,allanlewis/behave,Gimpneek/behave,vrutkovs/behave,metaperl/behave,kymbert/behave,jenisys/behave,Abdoctor/behave,kymbert/behave,benthomasson/behave,mzcity123/behave,joshal/behave,charleswhchan/behave,joshal/behave,hugeinc/behave-parallel,benthomasson/behave,spacediver/behave,connorsml/behave,KevinOrtma...
from __future__ import with_statement import os.path import tempfile from nose.tools import * from behave import configuration # one entry of each kind handled TEST_CONFIG='''[behave] outfile=/tmp/spam paths = /absolute/path relative/path tags = @foo,~@bar @zap format=pretty tag-counter stdout_c...
from __future__ import with_statement import os.path import tempfile from nose.tools import * from behave import configuration # one entry of each kind handled TEST_CONFIG='''[behave] outfile=/tmp/spam paths = /absolute/path relative/path tags = @foo,~@bar @zap format=pretty tag-counter stdout_c...
<commit_before>from __future__ import with_statement import os.path import tempfile from nose.tools import * from behave import configuration # one entry of each kind handled TEST_CONFIG='''[behave] outfile=/tmp/spam paths = /absolute/path relative/path tags = @foo,~@bar @zap format=pretty tag-c...
from __future__ import with_statement import os.path import tempfile from nose.tools import * from behave import configuration # one entry of each kind handled TEST_CONFIG='''[behave] outfile=/tmp/spam paths = /absolute/path relative/path tags = @foo,~@bar @zap format=pretty tag-counter stdout_c...
from __future__ import with_statement import os.path import tempfile from nose.tools import * from behave import configuration # one entry of each kind handled TEST_CONFIG='''[behave] outfile=/tmp/spam paths = /absolute/path relative/path tags = @foo,~@bar @zap format=pretty tag-counter stdout_c...
<commit_before>from __future__ import with_statement import os.path import tempfile from nose.tools import * from behave import configuration # one entry of each kind handled TEST_CONFIG='''[behave] outfile=/tmp/spam paths = /absolute/path relative/path tags = @foo,~@bar @zap format=pretty tag-c...
6a4046aafe43930c202e2f18a55b1cd8517d95f9
testanalyzer/javaanalyzer.py
testanalyzer/javaanalyzer.py
import re from fileanalyzer import FileAnalyzer class JavaAnalyzer(FileAnalyzer): def get_class_count(self, content): return len( re.findall("[a-zA-Z ]*class +[a-zA-Z0-9_]+ *\n*\{", content)) # TODO: Accept angle brackets and decline "else if" def get_function_count(self, content): ...
import re from fileanalyzer import FileAnalyzer class JavaAnalyzer(FileAnalyzer): def get_class_count(self, content): return len( re.findall("[a-zA-Z ]*class +[a-zA-Z0-9_<>, ]+\n*\{", content)) def get_function_count(self, content): matches = re.findall( "[a-zA-Z <>]+ ...
Fix regex to match generics
Fix regex to match generics
Python
mpl-2.0
CheriPai/TestAnalyzer,CheriPai/TestAnalyzer,CheriPai/TestAnalyzer
import re from fileanalyzer import FileAnalyzer class JavaAnalyzer(FileAnalyzer): def get_class_count(self, content): return len( re.findall("[a-zA-Z ]*class +[a-zA-Z0-9_]+ *\n*\{", content)) # TODO: Accept angle brackets and decline "else if" def get_function_count(self, content): ...
import re from fileanalyzer import FileAnalyzer class JavaAnalyzer(FileAnalyzer): def get_class_count(self, content): return len( re.findall("[a-zA-Z ]*class +[a-zA-Z0-9_<>, ]+\n*\{", content)) def get_function_count(self, content): matches = re.findall( "[a-zA-Z <>]+ ...
<commit_before>import re from fileanalyzer import FileAnalyzer class JavaAnalyzer(FileAnalyzer): def get_class_count(self, content): return len( re.findall("[a-zA-Z ]*class +[a-zA-Z0-9_]+ *\n*\{", content)) # TODO: Accept angle brackets and decline "else if" def get_function_count(sel...
import re from fileanalyzer import FileAnalyzer class JavaAnalyzer(FileAnalyzer): def get_class_count(self, content): return len( re.findall("[a-zA-Z ]*class +[a-zA-Z0-9_<>, ]+\n*\{", content)) def get_function_count(self, content): matches = re.findall( "[a-zA-Z <>]+ ...
import re from fileanalyzer import FileAnalyzer class JavaAnalyzer(FileAnalyzer): def get_class_count(self, content): return len( re.findall("[a-zA-Z ]*class +[a-zA-Z0-9_]+ *\n*\{", content)) # TODO: Accept angle brackets and decline "else if" def get_function_count(self, content): ...
<commit_before>import re from fileanalyzer import FileAnalyzer class JavaAnalyzer(FileAnalyzer): def get_class_count(self, content): return len( re.findall("[a-zA-Z ]*class +[a-zA-Z0-9_]+ *\n*\{", content)) # TODO: Accept angle brackets and decline "else if" def get_function_count(sel...
3d1f4a241363d2acff056798e6cb459db1acfb1b
tests/server/handlers/test_render.py
tests/server/handlers/test_render.py
import mfr import json from tests import utils from tornado import testing class TestRenderHandler(utils.HandlerTestCase): @testing.gen_test def test_options_skips_prepare(self): # Would crash b/c lack of mocks yield self.http_client.fetch( self.get_url('/render'), met...
Add a small test for renderer
Add a small test for renderer
Python
apache-2.0
AddisonSchiller/modular-file-renderer,haoyuchen1992/modular-file-renderer,TomBaxter/modular-file-renderer,Johnetordoff/modular-file-renderer,TomBaxter/modular-file-renderer,rdhyee/modular-file-renderer,AddisonSchiller/modular-file-renderer,haoyuchen1992/modular-file-renderer,felliott/modular-file-renderer,Johnetordoff/...
Add a small test for renderer
import mfr import json from tests import utils from tornado import testing class TestRenderHandler(utils.HandlerTestCase): @testing.gen_test def test_options_skips_prepare(self): # Would crash b/c lack of mocks yield self.http_client.fetch( self.get_url('/render'), met...
<commit_before><commit_msg>Add a small test for renderer<commit_after>
import mfr import json from tests import utils from tornado import testing class TestRenderHandler(utils.HandlerTestCase): @testing.gen_test def test_options_skips_prepare(self): # Would crash b/c lack of mocks yield self.http_client.fetch( self.get_url('/render'), met...
Add a small test for rendererimport mfr import json from tests import utils from tornado import testing class TestRenderHandler(utils.HandlerTestCase): @testing.gen_test def test_options_skips_prepare(self): # Would crash b/c lack of mocks yield self.http_client.fetch( self.get_ur...
<commit_before><commit_msg>Add a small test for renderer<commit_after>import mfr import json from tests import utils from tornado import testing class TestRenderHandler(utils.HandlerTestCase): @testing.gen_test def test_options_skips_prepare(self): # Would crash b/c lack of mocks yield self.h...
ea1c62ae3f13d47ee820eae31a2e284e3d66b6ab
libPiLite.py
libPiLite.py
#!/usr/bin/env python def createBlankGrid(row,column): blankgrid = [[0 for x in range(column)] for y in range(row)] return blankgrid def getHeight(grid): return len(grid) def getWidth(grid): return len(grid[0]) def printGrid(grid): numRow = len(grid) for i in range(0,numRow): ro...
#!/usr/bin/env python def createBlankGrid(row,column): blankgrid = [[0 for x in range(column)] for y in range(row)] return blankgrid def getHeight(grid): return len(grid) def getWidth(grid): return len(grid[0]) def printGrid(grid): numRow = len(grid) for i in range(0,numRow): ro...
Add setGrid and resetGrid functions
Add setGrid and resetGrid functions
Python
mit
rorasa/RPiClockArray
#!/usr/bin/env python def createBlankGrid(row,column): blankgrid = [[0 for x in range(column)] for y in range(row)] return blankgrid def getHeight(grid): return len(grid) def getWidth(grid): return len(grid[0]) def printGrid(grid): numRow = len(grid) for i in range(0,numRow): ro...
#!/usr/bin/env python def createBlankGrid(row,column): blankgrid = [[0 for x in range(column)] for y in range(row)] return blankgrid def getHeight(grid): return len(grid) def getWidth(grid): return len(grid[0]) def printGrid(grid): numRow = len(grid) for i in range(0,numRow): ro...
<commit_before>#!/usr/bin/env python def createBlankGrid(row,column): blankgrid = [[0 for x in range(column)] for y in range(row)] return blankgrid def getHeight(grid): return len(grid) def getWidth(grid): return len(grid[0]) def printGrid(grid): numRow = len(grid) for i in range(0,numR...
#!/usr/bin/env python def createBlankGrid(row,column): blankgrid = [[0 for x in range(column)] for y in range(row)] return blankgrid def getHeight(grid): return len(grid) def getWidth(grid): return len(grid[0]) def printGrid(grid): numRow = len(grid) for i in range(0,numRow): ro...
#!/usr/bin/env python def createBlankGrid(row,column): blankgrid = [[0 for x in range(column)] for y in range(row)] return blankgrid def getHeight(grid): return len(grid) def getWidth(grid): return len(grid[0]) def printGrid(grid): numRow = len(grid) for i in range(0,numRow): ro...
<commit_before>#!/usr/bin/env python def createBlankGrid(row,column): blankgrid = [[0 for x in range(column)] for y in range(row)] return blankgrid def getHeight(grid): return len(grid) def getWidth(grid): return len(grid[0]) def printGrid(grid): numRow = len(grid) for i in range(0,numR...
e0b3b767ccb7fc601eb7b40d336f94d75f8aa43c
2016/python/aoc_2016_03.py
2016/python/aoc_2016_03.py
from __future__ import annotations from typing import List, Tuple from aoc_common import load_puzzle_input, report_solution def parse_horizontal(string: str) -> List[Tuple[int, int, int]]: """Parse the instruction lines into sorted triples of side lengths.""" sorted_sides = [ sorted(int(x) for x in ...
from __future__ import annotations from typing import List, Tuple from aoc_common import load_puzzle_input, report_solution def parse_horizontal(string: str) -> List[Tuple[int, int, int]]: """Parse the instruction lines into triples of side lengths.""" sides = [[int(x) for x in line.split()] for line in str...
Sort triples in separate step
2016-03.py: Sort triples in separate step
Python
mit
robjwells/adventofcode-solutions,robjwells/adventofcode-solutions,robjwells/adventofcode-solutions,robjwells/adventofcode-solutions,robjwells/adventofcode-solutions,robjwells/adventofcode-solutions
from __future__ import annotations from typing import List, Tuple from aoc_common import load_puzzle_input, report_solution def parse_horizontal(string: str) -> List[Tuple[int, int, int]]: """Parse the instruction lines into sorted triples of side lengths.""" sorted_sides = [ sorted(int(x) for x in ...
from __future__ import annotations from typing import List, Tuple from aoc_common import load_puzzle_input, report_solution def parse_horizontal(string: str) -> List[Tuple[int, int, int]]: """Parse the instruction lines into triples of side lengths.""" sides = [[int(x) for x in line.split()] for line in str...
<commit_before>from __future__ import annotations from typing import List, Tuple from aoc_common import load_puzzle_input, report_solution def parse_horizontal(string: str) -> List[Tuple[int, int, int]]: """Parse the instruction lines into sorted triples of side lengths.""" sorted_sides = [ sorted(i...
from __future__ import annotations from typing import List, Tuple from aoc_common import load_puzzle_input, report_solution def parse_horizontal(string: str) -> List[Tuple[int, int, int]]: """Parse the instruction lines into triples of side lengths.""" sides = [[int(x) for x in line.split()] for line in str...
from __future__ import annotations from typing import List, Tuple from aoc_common import load_puzzle_input, report_solution def parse_horizontal(string: str) -> List[Tuple[int, int, int]]: """Parse the instruction lines into sorted triples of side lengths.""" sorted_sides = [ sorted(int(x) for x in ...
<commit_before>from __future__ import annotations from typing import List, Tuple from aoc_common import load_puzzle_input, report_solution def parse_horizontal(string: str) -> List[Tuple[int, int, int]]: """Parse the instruction lines into sorted triples of side lengths.""" sorted_sides = [ sorted(i...
28fe69ab1bb9362a1ee105821ec4631b574417d3
tools/perf_expectations/PRESUBMIT.py
tools/perf_expectations/PRESUBMIT.py
#!/usr/bin/python # Copyright (c) 2009 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """Presubmit script for perf_expectations. See http://dev.chromium.org/developers/how-tos/depottools/presubmit-scripts for details on ...
#!/usr/bin/python # Copyright (c) 2009 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """Presubmit script for perf_expectations. See http://dev.chromium.org/developers/how-tos/depottools/presubmit-scripts for details on ...
Use full pathname to perf_expectations in test.
Use full pathname to perf_expectations in test. BUG=none TEST=none Review URL: http://codereview.chromium.org/266055 git-svn-id: de016e52bd170d2d4f2344f9bf92d50478b649e0@28770 0039d316-1c4b-4281-b951-d872f2087c98
Python
bsd-3-clause
littlstar/chromium.src,hgl888/chromium-crosswalk-efl,Jonekee/chromium.src,keishi/chromium,markYoungH/chromium.src,Just-D/chromium-1,chuan9/chromium-crosswalk,Chilledheart/chromium,timopulkkinen/BubbleFish,keishi/chromium,pozdnyakov/chromium-crosswalk,mogoweb/chromium-crosswalk,ltilve/chromium,pozdnyakov/chromium-crossw...
#!/usr/bin/python # Copyright (c) 2009 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """Presubmit script for perf_expectations. See http://dev.chromium.org/developers/how-tos/depottools/presubmit-scripts for details on ...
#!/usr/bin/python # Copyright (c) 2009 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """Presubmit script for perf_expectations. See http://dev.chromium.org/developers/how-tos/depottools/presubmit-scripts for details on ...
<commit_before>#!/usr/bin/python # Copyright (c) 2009 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """Presubmit script for perf_expectations. See http://dev.chromium.org/developers/how-tos/depottools/presubmit-scripts ...
#!/usr/bin/python # Copyright (c) 2009 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """Presubmit script for perf_expectations. See http://dev.chromium.org/developers/how-tos/depottools/presubmit-scripts for details on ...
#!/usr/bin/python # Copyright (c) 2009 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """Presubmit script for perf_expectations. See http://dev.chromium.org/developers/how-tos/depottools/presubmit-scripts for details on ...
<commit_before>#!/usr/bin/python # Copyright (c) 2009 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """Presubmit script for perf_expectations. See http://dev.chromium.org/developers/how-tos/depottools/presubmit-scripts ...
8b5337878172df95400a708b096e012436f8a706
dags/main_summary.py
dags/main_summary.py
from airflow import DAG from datetime import datetime, timedelta from operators.emr_spark_operator import EMRSparkOperator from airflow.operators import BashOperator default_args = { 'owner': 'mreid@mozilla.com', 'depends_on_past': False, 'start_date': datetime(2016, 6, 27), 'email': ['telemetry-alerts...
from airflow import DAG from datetime import datetime, timedelta from operators.emr_spark_operator import EMRSparkOperator from airflow.operators import BashOperator default_args = { 'owner': 'mreid@mozilla.com', 'depends_on_past': False, 'start_date': datetime(2016, 6, 25), 'email': ['telemetry-alerts...
Prepare "Main Summary" job for backfill
Prepare "Main Summary" job for backfill Set the max number of active runs so we don't overwhelm the system, and rewind the start date by a couple of days to test that the scheduler does the right thing.
Python
mpl-2.0
opentrials/opentrials-airflow,opentrials/opentrials-airflow
from airflow import DAG from datetime import datetime, timedelta from operators.emr_spark_operator import EMRSparkOperator from airflow.operators import BashOperator default_args = { 'owner': 'mreid@mozilla.com', 'depends_on_past': False, 'start_date': datetime(2016, 6, 27), 'email': ['telemetry-alerts...
from airflow import DAG from datetime import datetime, timedelta from operators.emr_spark_operator import EMRSparkOperator from airflow.operators import BashOperator default_args = { 'owner': 'mreid@mozilla.com', 'depends_on_past': False, 'start_date': datetime(2016, 6, 25), 'email': ['telemetry-alerts...
<commit_before>from airflow import DAG from datetime import datetime, timedelta from operators.emr_spark_operator import EMRSparkOperator from airflow.operators import BashOperator default_args = { 'owner': 'mreid@mozilla.com', 'depends_on_past': False, 'start_date': datetime(2016, 6, 27), 'email': ['t...
from airflow import DAG from datetime import datetime, timedelta from operators.emr_spark_operator import EMRSparkOperator from airflow.operators import BashOperator default_args = { 'owner': 'mreid@mozilla.com', 'depends_on_past': False, 'start_date': datetime(2016, 6, 25), 'email': ['telemetry-alerts...
from airflow import DAG from datetime import datetime, timedelta from operators.emr_spark_operator import EMRSparkOperator from airflow.operators import BashOperator default_args = { 'owner': 'mreid@mozilla.com', 'depends_on_past': False, 'start_date': datetime(2016, 6, 27), 'email': ['telemetry-alerts...
<commit_before>from airflow import DAG from datetime import datetime, timedelta from operators.emr_spark_operator import EMRSparkOperator from airflow.operators import BashOperator default_args = { 'owner': 'mreid@mozilla.com', 'depends_on_past': False, 'start_date': datetime(2016, 6, 27), 'email': ['t...
847375a5cd6cbc160c190c9fb5e9fa2b1f0cdea9
lustro/db.py
lustro/db.py
# -*- coding: utf-8 -*- from sqlalchemy import MetaData, create_engine from sqlalchemy.orm import Session from sqlalchemy.ext.automap import automap_base class DB(object): """Facade for the low level DB operations""" def __init__(self, dsn, schema=None): self.engine = create_engine(dsn) self....
# -*- coding: utf-8 -*- from sqlalchemy import MetaData, create_engine from sqlalchemy.orm import Session from sqlalchemy.ext.automap import automap_base class DB(object): """Facade for the low level DB operations""" def __init__(self, dsn, schema=None): self.engine = create_engine(dsn) self....
Fix arguments to diff method
Fix arguments to diff method
Python
mit
ashwoods/lustro
# -*- coding: utf-8 -*- from sqlalchemy import MetaData, create_engine from sqlalchemy.orm import Session from sqlalchemy.ext.automap import automap_base class DB(object): """Facade for the low level DB operations""" def __init__(self, dsn, schema=None): self.engine = create_engine(dsn) self....
# -*- coding: utf-8 -*- from sqlalchemy import MetaData, create_engine from sqlalchemy.orm import Session from sqlalchemy.ext.automap import automap_base class DB(object): """Facade for the low level DB operations""" def __init__(self, dsn, schema=None): self.engine = create_engine(dsn) self....
<commit_before># -*- coding: utf-8 -*- from sqlalchemy import MetaData, create_engine from sqlalchemy.orm import Session from sqlalchemy.ext.automap import automap_base class DB(object): """Facade for the low level DB operations""" def __init__(self, dsn, schema=None): self.engine = create_engine(dsn...
# -*- coding: utf-8 -*- from sqlalchemy import MetaData, create_engine from sqlalchemy.orm import Session from sqlalchemy.ext.automap import automap_base class DB(object): """Facade for the low level DB operations""" def __init__(self, dsn, schema=None): self.engine = create_engine(dsn) self....
# -*- coding: utf-8 -*- from sqlalchemy import MetaData, create_engine from sqlalchemy.orm import Session from sqlalchemy.ext.automap import automap_base class DB(object): """Facade for the low level DB operations""" def __init__(self, dsn, schema=None): self.engine = create_engine(dsn) self....
<commit_before># -*- coding: utf-8 -*- from sqlalchemy import MetaData, create_engine from sqlalchemy.orm import Session from sqlalchemy.ext.automap import automap_base class DB(object): """Facade for the low level DB operations""" def __init__(self, dsn, schema=None): self.engine = create_engine(dsn...