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
1ea2ca47070ab58a8df9e308d2bcb4bd4debe088
tests/test_script.py
tests/test_script.py
#!/usr/bin/env python # -*- coding: utf-8 -*- # vim: sw=4:ts=4:expandtab """ A script to test CKAN Utils functionality """ from __future__ import ( absolute_import, division, print_function, with_statement, unicode_literals) from sys import exit, stderr from scripttest import TestFileEnvironment def main()...
#!/usr/bin/env python # -*- coding: utf-8 -*- # vim: sw=4:ts=4:expandtab """ A script to test CKAN Utils functionality """ from __future__ import ( absolute_import, division, print_function, with_statement, unicode_literals) from sys import exit, stderr from os import path as p from scripttest import TestFil...
Fix and update script test
Fix and update script test
Python
mit
luiscape/ckanutils,reubano/ckanutils,reubano/ckanny,reubano/ckanutils,reubano/ckanny,luiscape/ckanutils
#!/usr/bin/env python # -*- coding: utf-8 -*- # vim: sw=4:ts=4:expandtab """ A script to test CKAN Utils functionality """ from __future__ import ( absolute_import, division, print_function, with_statement, unicode_literals) from sys import exit, stderr from scripttest import TestFileEnvironment def main()...
#!/usr/bin/env python # -*- coding: utf-8 -*- # vim: sw=4:ts=4:expandtab """ A script to test CKAN Utils functionality """ from __future__ import ( absolute_import, division, print_function, with_statement, unicode_literals) from sys import exit, stderr from os import path as p from scripttest import TestFil...
<commit_before>#!/usr/bin/env python # -*- coding: utf-8 -*- # vim: sw=4:ts=4:expandtab """ A script to test CKAN Utils functionality """ from __future__ import ( absolute_import, division, print_function, with_statement, unicode_literals) from sys import exit, stderr from scripttest import TestFileEnvironme...
#!/usr/bin/env python # -*- coding: utf-8 -*- # vim: sw=4:ts=4:expandtab """ A script to test CKAN Utils functionality """ from __future__ import ( absolute_import, division, print_function, with_statement, unicode_literals) from sys import exit, stderr from os import path as p from scripttest import TestFil...
#!/usr/bin/env python # -*- coding: utf-8 -*- # vim: sw=4:ts=4:expandtab """ A script to test CKAN Utils functionality """ from __future__ import ( absolute_import, division, print_function, with_statement, unicode_literals) from sys import exit, stderr from scripttest import TestFileEnvironment def main()...
<commit_before>#!/usr/bin/env python # -*- coding: utf-8 -*- # vim: sw=4:ts=4:expandtab """ A script to test CKAN Utils functionality """ from __future__ import ( absolute_import, division, print_function, with_statement, unicode_literals) from sys import exit, stderr from scripttest import TestFileEnvironme...
2a893314a6f20092379298cfb53910c15154243c
tests/test_trivia.py
tests/test_trivia.py
import unittest from units.trivia import check_answer class TestCheckAnswer(unittest.TestCase): def test_correct_answer(self): self.assertTrue(check_answer("correct", "correct")) def test_incorrect_answer(self): self.assertFalse(check_answer("correct", "incorrect")) def test_large_num...
import unittest from units.trivia import check_answer class TestCheckAnswer(unittest.TestCase): def test_correct_answer(self): self.assertTrue(check_answer("correct", "correct")) def test_incorrect_answer(self): self.assertFalse(check_answer("correct", "incorrect")) def test_correct_e...
Test correct encoding for trivia answer
[Tests] Test correct encoding for trivia answer Rename test_wrong_encoding to test_incorrect_encoding
Python
mit
Harmon758/Harmonbot,Harmon758/Harmonbot
import unittest from units.trivia import check_answer class TestCheckAnswer(unittest.TestCase): def test_correct_answer(self): self.assertTrue(check_answer("correct", "correct")) def test_incorrect_answer(self): self.assertFalse(check_answer("correct", "incorrect")) def test_large_num...
import unittest from units.trivia import check_answer class TestCheckAnswer(unittest.TestCase): def test_correct_answer(self): self.assertTrue(check_answer("correct", "correct")) def test_incorrect_answer(self): self.assertFalse(check_answer("correct", "incorrect")) def test_correct_e...
<commit_before> import unittest from units.trivia import check_answer class TestCheckAnswer(unittest.TestCase): def test_correct_answer(self): self.assertTrue(check_answer("correct", "correct")) def test_incorrect_answer(self): self.assertFalse(check_answer("correct", "incorrect")) def...
import unittest from units.trivia import check_answer class TestCheckAnswer(unittest.TestCase): def test_correct_answer(self): self.assertTrue(check_answer("correct", "correct")) def test_incorrect_answer(self): self.assertFalse(check_answer("correct", "incorrect")) def test_correct_e...
import unittest from units.trivia import check_answer class TestCheckAnswer(unittest.TestCase): def test_correct_answer(self): self.assertTrue(check_answer("correct", "correct")) def test_incorrect_answer(self): self.assertFalse(check_answer("correct", "incorrect")) def test_large_num...
<commit_before> import unittest from units.trivia import check_answer class TestCheckAnswer(unittest.TestCase): def test_correct_answer(self): self.assertTrue(check_answer("correct", "correct")) def test_incorrect_answer(self): self.assertFalse(check_answer("correct", "incorrect")) def...
b4f8e0ca25b27047cc3bf556a15cb603688ba905
respite/serializers/jsonserializer.py
respite/serializers/jsonserializer.py
try: import json except ImportError: from django.utils import simplejson as json from base import Serializer class JSONSerializer(Serializer): def serialize(self): data = self.preprocess() return json.dumps(data)
try: import json except ImportError: from django.utils import simplejson as json from base import Serializer class JSONSerializer(Serializer): def serialize(self): data = self.preprocess() return json.dumps(data, ensure_ascii=False)
Fix a bug that caused JSON to be serialized as a byte stream with unicode code points
Fix a bug that caused JSON to be serialized as a byte stream with unicode code points
Python
mit
jgorset/django-respite,jgorset/django-respite,jgorset/django-respite
try: import json except ImportError: from django.utils import simplejson as json from base import Serializer class JSONSerializer(Serializer): def serialize(self): data = self.preprocess() return json.dumps(data) Fix a bug that caused JSON to be serialized as a byte stream with u...
try: import json except ImportError: from django.utils import simplejson as json from base import Serializer class JSONSerializer(Serializer): def serialize(self): data = self.preprocess() return json.dumps(data, ensure_ascii=False)
<commit_before>try: import json except ImportError: from django.utils import simplejson as json from base import Serializer class JSONSerializer(Serializer): def serialize(self): data = self.preprocess() return json.dumps(data) <commit_msg>Fix a bug that caused JSON to be seriali...
try: import json except ImportError: from django.utils import simplejson as json from base import Serializer class JSONSerializer(Serializer): def serialize(self): data = self.preprocess() return json.dumps(data, ensure_ascii=False)
try: import json except ImportError: from django.utils import simplejson as json from base import Serializer class JSONSerializer(Serializer): def serialize(self): data = self.preprocess() return json.dumps(data) Fix a bug that caused JSON to be serialized as a byte stream with u...
<commit_before>try: import json except ImportError: from django.utils import simplejson as json from base import Serializer class JSONSerializer(Serializer): def serialize(self): data = self.preprocess() return json.dumps(data) <commit_msg>Fix a bug that caused JSON to be seriali...
2c64a9e0bd1a19cc766035d80b72ec8c4baec99f
project/submission/forms.py
project/submission/forms.py
from django import forms from crispy_forms.helper import FormHelper from crispy_forms.layout import Submit from .models import FileSubmission, VideoSubmission class VideoSubmissionForm(forms.ModelForm): class Meta: model = VideoSubmission fields = ['video_url'] def __init__(self, *args, **...
from django import forms from crispy_forms.helper import FormHelper from crispy_forms.layout import Submit from .models import FileSubmission, VideoSubmission class VideoSubmissionForm(forms.ModelForm): class Meta: model = VideoSubmission fields = ['video_url'] def __init__(self, *args, **...
Decrease accepted file size to 128MB
Decrease accepted file size to 128MB
Python
mit
compsci-hfh/app,compsci-hfh/app
from django import forms from crispy_forms.helper import FormHelper from crispy_forms.layout import Submit from .models import FileSubmission, VideoSubmission class VideoSubmissionForm(forms.ModelForm): class Meta: model = VideoSubmission fields = ['video_url'] def __init__(self, *args, **...
from django import forms from crispy_forms.helper import FormHelper from crispy_forms.layout import Submit from .models import FileSubmission, VideoSubmission class VideoSubmissionForm(forms.ModelForm): class Meta: model = VideoSubmission fields = ['video_url'] def __init__(self, *args, **...
<commit_before>from django import forms from crispy_forms.helper import FormHelper from crispy_forms.layout import Submit from .models import FileSubmission, VideoSubmission class VideoSubmissionForm(forms.ModelForm): class Meta: model = VideoSubmission fields = ['video_url'] def __init__(...
from django import forms from crispy_forms.helper import FormHelper from crispy_forms.layout import Submit from .models import FileSubmission, VideoSubmission class VideoSubmissionForm(forms.ModelForm): class Meta: model = VideoSubmission fields = ['video_url'] def __init__(self, *args, **...
from django import forms from crispy_forms.helper import FormHelper from crispy_forms.layout import Submit from .models import FileSubmission, VideoSubmission class VideoSubmissionForm(forms.ModelForm): class Meta: model = VideoSubmission fields = ['video_url'] def __init__(self, *args, **...
<commit_before>from django import forms from crispy_forms.helper import FormHelper from crispy_forms.layout import Submit from .models import FileSubmission, VideoSubmission class VideoSubmissionForm(forms.ModelForm): class Meta: model = VideoSubmission fields = ['video_url'] def __init__(...
81d9558c5d75671349228b8cde84d7049289d3df
troposphere/settings/__init__.py
troposphere/settings/__init__.py
from troposphere.settings.default import * from troposphere.settings.local import *
from troposphere.settings.default import * try: from troposphere.settings.local import * except ImportError: raise Exception("No local settings module found. Refer to README.md")
Add exception for people who dont read the docs
Add exception for people who dont read the docs
Python
apache-2.0
CCI-MOC/GUI-Frontend,CCI-MOC/GUI-Frontend,CCI-MOC/GUI-Frontend,CCI-MOC/GUI-Frontend,CCI-MOC/GUI-Frontend
from troposphere.settings.default import * from troposphere.settings.local import * Add exception for people who dont read the docs
from troposphere.settings.default import * try: from troposphere.settings.local import * except ImportError: raise Exception("No local settings module found. Refer to README.md")
<commit_before>from troposphere.settings.default import * from troposphere.settings.local import * <commit_msg>Add exception for people who dont read the docs<commit_after>
from troposphere.settings.default import * try: from troposphere.settings.local import * except ImportError: raise Exception("No local settings module found. Refer to README.md")
from troposphere.settings.default import * from troposphere.settings.local import * Add exception for people who dont read the docsfrom troposphere.settings.default import * try: from troposphere.settings.local import * except ImportError: raise Exception("No local settings module found. Refer to README.md")
<commit_before>from troposphere.settings.default import * from troposphere.settings.local import * <commit_msg>Add exception for people who dont read the docs<commit_after>from troposphere.settings.default import * try: from troposphere.settings.local import * except ImportError: raise Exception("No local setti...
011a285ce247286879e4c063e7c5917f1125732f
numba/postpasses.py
numba/postpasses.py
# -*- coding: utf-8 -*- """ Postpasses over the LLVM IR. The signature of each postpass is postpass(env, ee, lmod, lfunc) -> lfunc """ from __future__ import print_function, division, absolute_import from numba.support.math_support import math_support default_postpasses = {} def register_default(name): def dec...
# -*- coding: utf-8 -*- """ Postpasses over the LLVM IR. The signature of each postpass is postpass(env, ee, lmod, lfunc) -> lfunc """ from __future__ import print_function, division, absolute_import from numba.support.math_support import math_support default_postpasses = {} def register_default(name): def dec...
Resolve math functions from LLVM math library
Resolve math functions from LLVM math library
Python
bsd-2-clause
pombredanne/numba,stonebig/numba,pitrou/numba,gmarkall/numba,cpcloud/numba,ssarangi/numba,stonebig/numba,sklam/numba,ssarangi/numba,pombredanne/numba,stefanseefeld/numba,IntelLabs/numba,numba/numba,cpcloud/numba,stefanseefeld/numba,stonebig/numba,seibert/numba,pombredanne/numba,gdementen/numba,seibert/numba,cpcloud/num...
# -*- coding: utf-8 -*- """ Postpasses over the LLVM IR. The signature of each postpass is postpass(env, ee, lmod, lfunc) -> lfunc """ from __future__ import print_function, division, absolute_import from numba.support.math_support import math_support default_postpasses = {} def register_default(name): def dec...
# -*- coding: utf-8 -*- """ Postpasses over the LLVM IR. The signature of each postpass is postpass(env, ee, lmod, lfunc) -> lfunc """ from __future__ import print_function, division, absolute_import from numba.support.math_support import math_support default_postpasses = {} def register_default(name): def dec...
<commit_before># -*- coding: utf-8 -*- """ Postpasses over the LLVM IR. The signature of each postpass is postpass(env, ee, lmod, lfunc) -> lfunc """ from __future__ import print_function, division, absolute_import from numba.support.math_support import math_support default_postpasses = {} def register_default(nam...
# -*- coding: utf-8 -*- """ Postpasses over the LLVM IR. The signature of each postpass is postpass(env, ee, lmod, lfunc) -> lfunc """ from __future__ import print_function, division, absolute_import from numba.support.math_support import math_support default_postpasses = {} def register_default(name): def dec...
# -*- coding: utf-8 -*- """ Postpasses over the LLVM IR. The signature of each postpass is postpass(env, ee, lmod, lfunc) -> lfunc """ from __future__ import print_function, division, absolute_import from numba.support.math_support import math_support default_postpasses = {} def register_default(name): def dec...
<commit_before># -*- coding: utf-8 -*- """ Postpasses over the LLVM IR. The signature of each postpass is postpass(env, ee, lmod, lfunc) -> lfunc """ from __future__ import print_function, division, absolute_import from numba.support.math_support import math_support default_postpasses = {} def register_default(nam...
3de28fe8be76662654386f5b628eed87dca675db
abusehelper/bots/archivebot/tests/test_archivebot.py
abusehelper/bots/archivebot/tests/test_archivebot.py
import unittest import os from tempfile import NamedTemporaryFile from .. import archivebot class TestRename(unittest.TestCase): def test_valid_rename(self): try: tmp = NamedTemporaryFile() new_tmp = archivebot._rename(tmp.name) self.assertFalse(os.path.isfile(tmp.name...
import unittest import os from tempfile import NamedTemporaryFile from .. import archivebot class TestRename(unittest.TestCase): def test_valid_rename(self): try: tmp = NamedTemporaryFile() new_tmp = archivebot._rename(tmp.name) self.assertFalse(os.path.isfile(tmp.name...
Remove all temporary files from disk
Remove all temporary files from disk
Python
mit
abusesa/abusehelper
import unittest import os from tempfile import NamedTemporaryFile from .. import archivebot class TestRename(unittest.TestCase): def test_valid_rename(self): try: tmp = NamedTemporaryFile() new_tmp = archivebot._rename(tmp.name) self.assertFalse(os.path.isfile(tmp.name...
import unittest import os from tempfile import NamedTemporaryFile from .. import archivebot class TestRename(unittest.TestCase): def test_valid_rename(self): try: tmp = NamedTemporaryFile() new_tmp = archivebot._rename(tmp.name) self.assertFalse(os.path.isfile(tmp.name...
<commit_before>import unittest import os from tempfile import NamedTemporaryFile from .. import archivebot class TestRename(unittest.TestCase): def test_valid_rename(self): try: tmp = NamedTemporaryFile() new_tmp = archivebot._rename(tmp.name) self.assertFalse(os.path....
import unittest import os from tempfile import NamedTemporaryFile from .. import archivebot class TestRename(unittest.TestCase): def test_valid_rename(self): try: tmp = NamedTemporaryFile() new_tmp = archivebot._rename(tmp.name) self.assertFalse(os.path.isfile(tmp.name...
import unittest import os from tempfile import NamedTemporaryFile from .. import archivebot class TestRename(unittest.TestCase): def test_valid_rename(self): try: tmp = NamedTemporaryFile() new_tmp = archivebot._rename(tmp.name) self.assertFalse(os.path.isfile(tmp.name...
<commit_before>import unittest import os from tempfile import NamedTemporaryFile from .. import archivebot class TestRename(unittest.TestCase): def test_valid_rename(self): try: tmp = NamedTemporaryFile() new_tmp = archivebot._rename(tmp.name) self.assertFalse(os.path....
24b6c8650fe99791a4091cbdc2c24686e86aa67c
pythran/tests/test_cases.py
pythran/tests/test_cases.py
""" Tests for test cases directory. """ # TODO: check http://code.google.com/p/unladen-swallow/wiki/Benchmarks import os from distutils.version import LooseVersion import numpy import unittest from pythran.tests import TestFromDir class TestCases(TestFromDir): """ Class to check all tests in the cases director...
""" Tests for test cases directory. """ # TODO: check http://code.google.com/p/unladen-swallow/wiki/Benchmarks import os from distutils.version import LooseVersion import numpy import unittest from pythran.tests import TestFromDir class TestCases(TestFromDir): """ Class to check all tests in the cases director...
Disable loopy-jacob test on old gcc version
Disable loopy-jacob test on old gcc version This one consumes too much memory and fails the validation, but it compiles fine with a modern gcc or clang, so let's just blacklist it.
Python
bsd-3-clause
serge-sans-paille/pythran,pombredanne/pythran,pombredanne/pythran,pombredanne/pythran,serge-sans-paille/pythran
""" Tests for test cases directory. """ # TODO: check http://code.google.com/p/unladen-swallow/wiki/Benchmarks import os from distutils.version import LooseVersion import numpy import unittest from pythran.tests import TestFromDir class TestCases(TestFromDir): """ Class to check all tests in the cases director...
""" Tests for test cases directory. """ # TODO: check http://code.google.com/p/unladen-swallow/wiki/Benchmarks import os from distutils.version import LooseVersion import numpy import unittest from pythran.tests import TestFromDir class TestCases(TestFromDir): """ Class to check all tests in the cases director...
<commit_before>""" Tests for test cases directory. """ # TODO: check http://code.google.com/p/unladen-swallow/wiki/Benchmarks import os from distutils.version import LooseVersion import numpy import unittest from pythran.tests import TestFromDir class TestCases(TestFromDir): """ Class to check all tests in the...
""" Tests for test cases directory. """ # TODO: check http://code.google.com/p/unladen-swallow/wiki/Benchmarks import os from distutils.version import LooseVersion import numpy import unittest from pythran.tests import TestFromDir class TestCases(TestFromDir): """ Class to check all tests in the cases director...
""" Tests for test cases directory. """ # TODO: check http://code.google.com/p/unladen-swallow/wiki/Benchmarks import os from distutils.version import LooseVersion import numpy import unittest from pythran.tests import TestFromDir class TestCases(TestFromDir): """ Class to check all tests in the cases director...
<commit_before>""" Tests for test cases directory. """ # TODO: check http://code.google.com/p/unladen-swallow/wiki/Benchmarks import os from distutils.version import LooseVersion import numpy import unittest from pythran.tests import TestFromDir class TestCases(TestFromDir): """ Class to check all tests in the...
bb19c79ebc976bfa390f3c6ecc59ec6e0d03dd7e
speed_spider.py
speed_spider.py
#!/usr/bin/env python # coding: utf-8 from grab.spider import Spider, Task from grab.tools.logs import default_logging import time import logging from random import randint from grab.util.py3k_support import * URL_28K = 'http://load.local/grab.html' def timer(func): """ Display time taken to execute the deco...
#!/usr/bin/env python # coding: utf-8 from grab.spider import Spider, Task from grab.tools.logs import default_logging import time import logging from random import randint from grab.util.py3k_support import * URL_28K = 'http://load.local/grab.html' def timer(func): """ Display time taken to execute the deco...
Change code of speed test
Change code of speed test
Python
mit
shaunstanislaus/grab,alihalabyah/grab,pombredanne/grab-1,alihalabyah/grab,lorien/grab,DDShadoww/grab,maurobaraldi/grab,maurobaraldi/grab,codevlabs/grab,istinspring/grab,DDShadoww/grab,codevlabs/grab,huiyi1990/grab,lorien/grab,kevinlondon/grab,giserh/grab,liorvh/grab,pombredanne/grab-1,shaunstanislaus/grab,raybuhr/grab,...
#!/usr/bin/env python # coding: utf-8 from grab.spider import Spider, Task from grab.tools.logs import default_logging import time import logging from random import randint from grab.util.py3k_support import * URL_28K = 'http://load.local/grab.html' def timer(func): """ Display time taken to execute the deco...
#!/usr/bin/env python # coding: utf-8 from grab.spider import Spider, Task from grab.tools.logs import default_logging import time import logging from random import randint from grab.util.py3k_support import * URL_28K = 'http://load.local/grab.html' def timer(func): """ Display time taken to execute the deco...
<commit_before>#!/usr/bin/env python # coding: utf-8 from grab.spider import Spider, Task from grab.tools.logs import default_logging import time import logging from random import randint from grab.util.py3k_support import * URL_28K = 'http://load.local/grab.html' def timer(func): """ Display time taken to e...
#!/usr/bin/env python # coding: utf-8 from grab.spider import Spider, Task from grab.tools.logs import default_logging import time import logging from random import randint from grab.util.py3k_support import * URL_28K = 'http://load.local/grab.html' def timer(func): """ Display time taken to execute the deco...
#!/usr/bin/env python # coding: utf-8 from grab.spider import Spider, Task from grab.tools.logs import default_logging import time import logging from random import randint from grab.util.py3k_support import * URL_28K = 'http://load.local/grab.html' def timer(func): """ Display time taken to execute the deco...
<commit_before>#!/usr/bin/env python # coding: utf-8 from grab.spider import Spider, Task from grab.tools.logs import default_logging import time import logging from random import randint from grab.util.py3k_support import * URL_28K = 'http://load.local/grab.html' def timer(func): """ Display time taken to e...
7f1f001802ffdf4a53e17b120e65af3ef9d1d2da
openfisca_france/conf/cache_blacklist.py
openfisca_france/conf/cache_blacklist.py
# When using openfisca for a large population, having too many variables in cache make openfisca performances drop. # The following variables are intermadiate results and do not need to be cached in those usecases. cache_blacklist = set([ 'aide_logement_loyer_retenu', 'aide_logement_charges', 'aide_logemen...
# When using openfisca for a large population, having too many variables in cache make openfisca performances drop. # The following variables are intermediate results and do not need to be cached in those usecases. cache_blacklist = set([ 'aide_logement_loyer_retenu', 'aide_logement_charges', 'aide_logemen...
Add new variable to cache blacklist
Add new variable to cache blacklist
Python
agpl-3.0
sgmap/openfisca-france,antoinearnoud/openfisca-france,antoinearnoud/openfisca-france,sgmap/openfisca-france
# When using openfisca for a large population, having too many variables in cache make openfisca performances drop. # The following variables are intermadiate results and do not need to be cached in those usecases. cache_blacklist = set([ 'aide_logement_loyer_retenu', 'aide_logement_charges', 'aide_logemen...
# When using openfisca for a large population, having too many variables in cache make openfisca performances drop. # The following variables are intermediate results and do not need to be cached in those usecases. cache_blacklist = set([ 'aide_logement_loyer_retenu', 'aide_logement_charges', 'aide_logemen...
<commit_before># When using openfisca for a large population, having too many variables in cache make openfisca performances drop. # The following variables are intermadiate results and do not need to be cached in those usecases. cache_blacklist = set([ 'aide_logement_loyer_retenu', 'aide_logement_charges', ...
# When using openfisca for a large population, having too many variables in cache make openfisca performances drop. # The following variables are intermediate results and do not need to be cached in those usecases. cache_blacklist = set([ 'aide_logement_loyer_retenu', 'aide_logement_charges', 'aide_logemen...
# When using openfisca for a large population, having too many variables in cache make openfisca performances drop. # The following variables are intermadiate results and do not need to be cached in those usecases. cache_blacklist = set([ 'aide_logement_loyer_retenu', 'aide_logement_charges', 'aide_logemen...
<commit_before># When using openfisca for a large population, having too many variables in cache make openfisca performances drop. # The following variables are intermadiate results and do not need to be cached in those usecases. cache_blacklist = set([ 'aide_logement_loyer_retenu', 'aide_logement_charges', ...
f98ab4eb86d1753b6eeff2b78251de0c14ef0f0f
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' 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 = 'default' DEFAULT_PANEL = 'monitoring' # Python panel class of ...
Remove panel group Other in dashboard
Remove panel group Other in dashboard
Python
apache-2.0
openstack/monasca-ui,stackforge/monasca-ui,stackforge/monasca-ui,openstack/monasca-ui,stackforge/monasca-ui,stackforge/monasca-ui,openstack/monasca-ui,openstack/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' 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 = 'default' DEFAULT_PANEL = 'monitoring' # Python panel class of ...
<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' DEFAULT_PANEL = 'monitoring' # Python p...
# 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 = 'default' DEFAULT_PANEL = 'monitoring' # Python panel class of ...
# 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' DEFAULT_PANEL = 'monitoring' # Python p...
6e12974b1099044dff95fb632307cd6c5500c411
corehq/apps/builds/utils.py
corehq/apps/builds/utils.py
import re from .models import CommCareBuild, CommCareBuildConfig def get_all_versions(versions=None): """ Returns a list of all versions found in the database, plus those in the optional list parameter. """ versions = versions or [] db = CommCareBuild.get_db() results = db.view('builds/al...
import re from .models import CommCareBuild, CommCareBuildConfig def get_all_versions(versions): """ Returns a list of all versions found in the database, plus those in the optional list parameter. """ db = CommCareBuild.get_db() results = db.view('builds/all', group_level=1).all() versio...
Remove optional arg that's now always used
Remove optional arg that's now always used
Python
bsd-3-clause
dimagi/commcare-hq,dimagi/commcare-hq,dimagi/commcare-hq,dimagi/commcare-hq,dimagi/commcare-hq
import re from .models import CommCareBuild, CommCareBuildConfig def get_all_versions(versions=None): """ Returns a list of all versions found in the database, plus those in the optional list parameter. """ versions = versions or [] db = CommCareBuild.get_db() results = db.view('builds/al...
import re from .models import CommCareBuild, CommCareBuildConfig def get_all_versions(versions): """ Returns a list of all versions found in the database, plus those in the optional list parameter. """ db = CommCareBuild.get_db() results = db.view('builds/all', group_level=1).all() versio...
<commit_before>import re from .models import CommCareBuild, CommCareBuildConfig def get_all_versions(versions=None): """ Returns a list of all versions found in the database, plus those in the optional list parameter. """ versions = versions or [] db = CommCareBuild.get_db() results = db....
import re from .models import CommCareBuild, CommCareBuildConfig def get_all_versions(versions): """ Returns a list of all versions found in the database, plus those in the optional list parameter. """ db = CommCareBuild.get_db() results = db.view('builds/all', group_level=1).all() versio...
import re from .models import CommCareBuild, CommCareBuildConfig def get_all_versions(versions=None): """ Returns a list of all versions found in the database, plus those in the optional list parameter. """ versions = versions or [] db = CommCareBuild.get_db() results = db.view('builds/al...
<commit_before>import re from .models import CommCareBuild, CommCareBuildConfig def get_all_versions(versions=None): """ Returns a list of all versions found in the database, plus those in the optional list parameter. """ versions = versions or [] db = CommCareBuild.get_db() results = db....
ce1395db9340ee694ef7a7c35d7d185e4319cf4e
plugins/spotify.py
plugins/spotify.py
from plugins.util import command, get_url import json import re SPOTIFY_URI_REGEX = r"(?<=spotify:)(?:track|album|artist):[a-zA-Z0-9]{22}" ENDPOINT = "https://api.spotify.com/v1/{0}s/{1}" @command() def spotify(m): spotify_uris = re.findall(SPOTIFY_URI_REGEX, m.body) for spotify_uri in spotify_uris: t...
from plugins.util import command, get_url import json import re SPOTIFY_URI_REGEX = r"(?<=spotify:)(?:track|album|artist):[a-zA-Z0-9]{22}" ENDPOINT = "https://api.spotify.com/v1/{0}s/{1}" @command() def spotify(m): spotify_uris = re.findall(SPOTIFY_URI_REGEX, m.body) for spotify_uri in spotify_uris: t...
Change formatting of response, add URL
Change formatting of response, add URL
Python
mit
quanticle/GorillaBot,quanticle/GorillaBot,molly/GorillaBot,molly/GorillaBot
from plugins.util import command, get_url import json import re SPOTIFY_URI_REGEX = r"(?<=spotify:)(?:track|album|artist):[a-zA-Z0-9]{22}" ENDPOINT = "https://api.spotify.com/v1/{0}s/{1}" @command() def spotify(m): spotify_uris = re.findall(SPOTIFY_URI_REGEX, m.body) for spotify_uri in spotify_uris: t...
from plugins.util import command, get_url import json import re SPOTIFY_URI_REGEX = r"(?<=spotify:)(?:track|album|artist):[a-zA-Z0-9]{22}" ENDPOINT = "https://api.spotify.com/v1/{0}s/{1}" @command() def spotify(m): spotify_uris = re.findall(SPOTIFY_URI_REGEX, m.body) for spotify_uri in spotify_uris: t...
<commit_before>from plugins.util import command, get_url import json import re SPOTIFY_URI_REGEX = r"(?<=spotify:)(?:track|album|artist):[a-zA-Z0-9]{22}" ENDPOINT = "https://api.spotify.com/v1/{0}s/{1}" @command() def spotify(m): spotify_uris = re.findall(SPOTIFY_URI_REGEX, m.body) for spotify_uri in spotify_...
from plugins.util import command, get_url import json import re SPOTIFY_URI_REGEX = r"(?<=spotify:)(?:track|album|artist):[a-zA-Z0-9]{22}" ENDPOINT = "https://api.spotify.com/v1/{0}s/{1}" @command() def spotify(m): spotify_uris = re.findall(SPOTIFY_URI_REGEX, m.body) for spotify_uri in spotify_uris: t...
from plugins.util import command, get_url import json import re SPOTIFY_URI_REGEX = r"(?<=spotify:)(?:track|album|artist):[a-zA-Z0-9]{22}" ENDPOINT = "https://api.spotify.com/v1/{0}s/{1}" @command() def spotify(m): spotify_uris = re.findall(SPOTIFY_URI_REGEX, m.body) for spotify_uri in spotify_uris: t...
<commit_before>from plugins.util import command, get_url import json import re SPOTIFY_URI_REGEX = r"(?<=spotify:)(?:track|album|artist):[a-zA-Z0-9]{22}" ENDPOINT = "https://api.spotify.com/v1/{0}s/{1}" @command() def spotify(m): spotify_uris = re.findall(SPOTIFY_URI_REGEX, m.body) for spotify_uri in spotify_...
8052577164ba144263c7f45e4c823ba396f19d65
badgekit_webhooks/views.py
badgekit_webhooks/views.py
from django.http import HttpResponse, HttpResponseBadRequest from django.views.decorators.http import require_POST import json def hello(request): return HttpResponse("Hello, world. Badges!!!") @require_POST def badge_issued_hook(request): try: data = json.loads(request.body) except ValueError: ...
from django.http import HttpResponse, HttpResponseBadRequest from django.views.decorators.csrf import csrf_exempt from django.views.decorators.http import require_POST import json def hello(request): return HttpResponse("Hello, world. Badges!!!") @require_POST @csrf_exempt def badge_issued_hook(request): try...
Make webhook exempt from CSRF protection
Make webhook exempt from CSRF protection Soon, we will add JWT verification, to replace it.
Python
mit
tgs/django-badgekit-webhooks
from django.http import HttpResponse, HttpResponseBadRequest from django.views.decorators.http import require_POST import json def hello(request): return HttpResponse("Hello, world. Badges!!!") @require_POST def badge_issued_hook(request): try: data = json.loads(request.body) except ValueError: ...
from django.http import HttpResponse, HttpResponseBadRequest from django.views.decorators.csrf import csrf_exempt from django.views.decorators.http import require_POST import json def hello(request): return HttpResponse("Hello, world. Badges!!!") @require_POST @csrf_exempt def badge_issued_hook(request): try...
<commit_before>from django.http import HttpResponse, HttpResponseBadRequest from django.views.decorators.http import require_POST import json def hello(request): return HttpResponse("Hello, world. Badges!!!") @require_POST def badge_issued_hook(request): try: data = json.loads(request.body) excep...
from django.http import HttpResponse, HttpResponseBadRequest from django.views.decorators.csrf import csrf_exempt from django.views.decorators.http import require_POST import json def hello(request): return HttpResponse("Hello, world. Badges!!!") @require_POST @csrf_exempt def badge_issued_hook(request): try...
from django.http import HttpResponse, HttpResponseBadRequest from django.views.decorators.http import require_POST import json def hello(request): return HttpResponse("Hello, world. Badges!!!") @require_POST def badge_issued_hook(request): try: data = json.loads(request.body) except ValueError: ...
<commit_before>from django.http import HttpResponse, HttpResponseBadRequest from django.views.decorators.http import require_POST import json def hello(request): return HttpResponse("Hello, world. Badges!!!") @require_POST def badge_issued_hook(request): try: data = json.loads(request.body) excep...
ea026eeeaae0ee30a5f3a4cb9f8cc2a9d1c37e6c
jackrabbit/utils.py
jackrabbit/utils.py
import collections def is_callable(o): return isinstance(o, collections.Callable)
import collections import sys if sys.platform == 'win32': from time import clock as time else: from time import time def is_callable(o): return isinstance(o, collections.Callable)
Add platform dependent time import for best resolution.
Add platform dependent time import for best resolution.
Python
mit
cbigler/jackrabbit
import collections def is_callable(o): return isinstance(o, collections.Callable) Add platform dependent time import for best resolution.
import collections import sys if sys.platform == 'win32': from time import clock as time else: from time import time def is_callable(o): return isinstance(o, collections.Callable)
<commit_before>import collections def is_callable(o): return isinstance(o, collections.Callable) <commit_msg>Add platform dependent time import for best resolution.<commit_after>
import collections import sys if sys.platform == 'win32': from time import clock as time else: from time import time def is_callable(o): return isinstance(o, collections.Callable)
import collections def is_callable(o): return isinstance(o, collections.Callable) Add platform dependent time import for best resolution.import collections import sys if sys.platform == 'win32': from time import clock as time else: from time import time def is_callable(o): return isinstance(o, coll...
<commit_before>import collections def is_callable(o): return isinstance(o, collections.Callable) <commit_msg>Add platform dependent time import for best resolution.<commit_after>import collections import sys if sys.platform == 'win32': from time import clock as time else: from time import time def is_c...
a24bf76cd3d50b1370e5e63077e1f4ae1023b086
lib/euehelpers.py
lib/euehelpers.py
""" helpers functions for various aspect of eue-ng project """ def check_mail(self, email): """ Verify that the provided email is valid """ regex = r"^[_.0-9A-Za-z-]+@([0-9A-Za-z][0-9A-Za-z-]+.)+[A-Za-z]{2,4}$" if not re.match(regex, email): return False else: return True
#!/usr/bin/python # -*- coding: utf-8 -*- import re """ helpers functions for various aspect of eue-ng project """ def check_mail(email): """ Verify that the provided email is valid """ regex = r"^[_.0-9A-Za-z-]+@([0-9A-Za-z][0-9A-Za-z-]+.)+[A-Za-z]{2,4}$" if not re.match(regex, email): ...
Fix check_mail helpers extracted from a class
Fix check_mail helpers extracted from a class
Python
agpl-3.0
david-guenault/eue-ng,david-guenault/eue-ng,david-guenault/eue-ng,david-guenault/eue-ng,david-guenault/eue-ng,david-guenault/eue-ng
""" helpers functions for various aspect of eue-ng project """ def check_mail(self, email): """ Verify that the provided email is valid """ regex = r"^[_.0-9A-Za-z-]+@([0-9A-Za-z][0-9A-Za-z-]+.)+[A-Za-z]{2,4}$" if not re.match(regex, email): return False else: return True Fix ...
#!/usr/bin/python # -*- coding: utf-8 -*- import re """ helpers functions for various aspect of eue-ng project """ def check_mail(email): """ Verify that the provided email is valid """ regex = r"^[_.0-9A-Za-z-]+@([0-9A-Za-z][0-9A-Za-z-]+.)+[A-Za-z]{2,4}$" if not re.match(regex, email): ...
<commit_before>""" helpers functions for various aspect of eue-ng project """ def check_mail(self, email): """ Verify that the provided email is valid """ regex = r"^[_.0-9A-Za-z-]+@([0-9A-Za-z][0-9A-Za-z-]+.)+[A-Za-z]{2,4}$" if not re.match(regex, email): return False else: r...
#!/usr/bin/python # -*- coding: utf-8 -*- import re """ helpers functions for various aspect of eue-ng project """ def check_mail(email): """ Verify that the provided email is valid """ regex = r"^[_.0-9A-Za-z-]+@([0-9A-Za-z][0-9A-Za-z-]+.)+[A-Za-z]{2,4}$" if not re.match(regex, email): ...
""" helpers functions for various aspect of eue-ng project """ def check_mail(self, email): """ Verify that the provided email is valid """ regex = r"^[_.0-9A-Za-z-]+@([0-9A-Za-z][0-9A-Za-z-]+.)+[A-Za-z]{2,4}$" if not re.match(regex, email): return False else: return True Fix ...
<commit_before>""" helpers functions for various aspect of eue-ng project """ def check_mail(self, email): """ Verify that the provided email is valid """ regex = r"^[_.0-9A-Za-z-]+@([0-9A-Za-z][0-9A-Za-z-]+.)+[A-Za-z]{2,4}$" if not re.match(regex, email): return False else: r...
500664fb110ebf198fa634a44bbabf2fe26f83af
wafer/talks/forms.py
wafer/talks/forms.py
from django import forms from django.core.urlresolvers import reverse from django.utils.translation import ugettext as _ from crispy_forms.bootstrap import FormActions from crispy_forms.helper import FormHelper from crispy_forms.layout import Submit, HTML from wafer.talks.models import Talk class TalkForm(forms.Mod...
from django import forms from django.core.urlresolvers import reverse from django.utils.translation import ugettext as _ from crispy_forms.bootstrap import FormActions from crispy_forms.helper import FormHelper from crispy_forms.layout import Submit, HTML from markitup.widgets import MarkItUpWidget from wafer.talks.m...
Use markitup widget in talk form
Use markitup widget in talk form
Python
isc
CarlFK/wafer,CarlFK/wafer,CTPUG/wafer,CarlFK/wafer,CTPUG/wafer,CTPUG/wafer,CTPUG/wafer,CarlFK/wafer
from django import forms from django.core.urlresolvers import reverse from django.utils.translation import ugettext as _ from crispy_forms.bootstrap import FormActions from crispy_forms.helper import FormHelper from crispy_forms.layout import Submit, HTML from wafer.talks.models import Talk class TalkForm(forms.Mod...
from django import forms from django.core.urlresolvers import reverse from django.utils.translation import ugettext as _ from crispy_forms.bootstrap import FormActions from crispy_forms.helper import FormHelper from crispy_forms.layout import Submit, HTML from markitup.widgets import MarkItUpWidget from wafer.talks.m...
<commit_before>from django import forms from django.core.urlresolvers import reverse from django.utils.translation import ugettext as _ from crispy_forms.bootstrap import FormActions from crispy_forms.helper import FormHelper from crispy_forms.layout import Submit, HTML from wafer.talks.models import Talk class Tal...
from django import forms from django.core.urlresolvers import reverse from django.utils.translation import ugettext as _ from crispy_forms.bootstrap import FormActions from crispy_forms.helper import FormHelper from crispy_forms.layout import Submit, HTML from markitup.widgets import MarkItUpWidget from wafer.talks.m...
from django import forms from django.core.urlresolvers import reverse from django.utils.translation import ugettext as _ from crispy_forms.bootstrap import FormActions from crispy_forms.helper import FormHelper from crispy_forms.layout import Submit, HTML from wafer.talks.models import Talk class TalkForm(forms.Mod...
<commit_before>from django import forms from django.core.urlresolvers import reverse from django.utils.translation import ugettext as _ from crispy_forms.bootstrap import FormActions from crispy_forms.helper import FormHelper from crispy_forms.layout import Submit, HTML from wafer.talks.models import Talk class Tal...
857015c55819a35d177cd1804a3d86ac790a15c6
journal/__init__.py
journal/__init__.py
#!/usr/bin/env python # -*- coding: utf-8 -*- """ journal Copyright (c) 2011 Matt Behrens <askedrelic@gmail.com> http://asktherelic.com A CLI tool to help with keeping a datetime organized journal Licensing included in LICENSE.txt """ __author__ = "Matt Behrens <askedrelic@gmail.com>" __version__ = "0.2.0" __all_...
#!/usr/bin/env python # -*- coding: utf-8 -*- """ journal Copyright (c) 2011 Matt Behrens <askedrelic@gmail.com> http://asktherelic.com A CLI tool to help with keeping a datetime organized journal Licensing included in LICENSE.txt """ __author__ = "Matt Behrens <askedrelic@gmail.com>" __version__ = "0.3.0dev" __a...
Set correct current working version
Set correct current working version
Python
mit
askedrelic/journal
#!/usr/bin/env python # -*- coding: utf-8 -*- """ journal Copyright (c) 2011 Matt Behrens <askedrelic@gmail.com> http://asktherelic.com A CLI tool to help with keeping a datetime organized journal Licensing included in LICENSE.txt """ __author__ = "Matt Behrens <askedrelic@gmail.com>" __version__ = "0.2.0" __all_...
#!/usr/bin/env python # -*- coding: utf-8 -*- """ journal Copyright (c) 2011 Matt Behrens <askedrelic@gmail.com> http://asktherelic.com A CLI tool to help with keeping a datetime organized journal Licensing included in LICENSE.txt """ __author__ = "Matt Behrens <askedrelic@gmail.com>" __version__ = "0.3.0dev" __a...
<commit_before>#!/usr/bin/env python # -*- coding: utf-8 -*- """ journal Copyright (c) 2011 Matt Behrens <askedrelic@gmail.com> http://asktherelic.com A CLI tool to help with keeping a datetime organized journal Licensing included in LICENSE.txt """ __author__ = "Matt Behrens <askedrelic@gmail.com>" __version__ = ...
#!/usr/bin/env python # -*- coding: utf-8 -*- """ journal Copyright (c) 2011 Matt Behrens <askedrelic@gmail.com> http://asktherelic.com A CLI tool to help with keeping a datetime organized journal Licensing included in LICENSE.txt """ __author__ = "Matt Behrens <askedrelic@gmail.com>" __version__ = "0.3.0dev" __a...
#!/usr/bin/env python # -*- coding: utf-8 -*- """ journal Copyright (c) 2011 Matt Behrens <askedrelic@gmail.com> http://asktherelic.com A CLI tool to help with keeping a datetime organized journal Licensing included in LICENSE.txt """ __author__ = "Matt Behrens <askedrelic@gmail.com>" __version__ = "0.2.0" __all_...
<commit_before>#!/usr/bin/env python # -*- coding: utf-8 -*- """ journal Copyright (c) 2011 Matt Behrens <askedrelic@gmail.com> http://asktherelic.com A CLI tool to help with keeping a datetime organized journal Licensing included in LICENSE.txt """ __author__ = "Matt Behrens <askedrelic@gmail.com>" __version__ = ...
ddf3e604cee09d82ea8741d2ed08f600ba2f70c0
scaffolder/commands/list.py
scaffolder/commands/list.py
#!/usr/bin/env python # -*- coding: utf-8 -*- from optparse import make_option from optparse import OptionParser from scaffolder.core.commands import BaseCommand from scaffolder.core.template import TemplateManager class ListCommand(BaseCommand): def __init__(self, name, help='', aliases=(), stdout=None, stderr=...
#!/usr/bin/env python # -*- coding: utf-8 -*- from optparse import make_option from optparse import OptionParser from scaffolder.core.commands import BaseCommand from scaffolder.core.template import TemplateManager class ListCommand(BaseCommand): help = 'Template command help entry' def run(self, *args, **o...
Remove __init__ method, not needed.
ListCommand: Remove __init__ method, not needed.
Python
mit
goliatone/minions
#!/usr/bin/env python # -*- coding: utf-8 -*- from optparse import make_option from optparse import OptionParser from scaffolder.core.commands import BaseCommand from scaffolder.core.template import TemplateManager class ListCommand(BaseCommand): def __init__(self, name, help='', aliases=(), stdout=None, stderr=...
#!/usr/bin/env python # -*- coding: utf-8 -*- from optparse import make_option from optparse import OptionParser from scaffolder.core.commands import BaseCommand from scaffolder.core.template import TemplateManager class ListCommand(BaseCommand): help = 'Template command help entry' def run(self, *args, **o...
<commit_before>#!/usr/bin/env python # -*- coding: utf-8 -*- from optparse import make_option from optparse import OptionParser from scaffolder.core.commands import BaseCommand from scaffolder.core.template import TemplateManager class ListCommand(BaseCommand): def __init__(self, name, help='', aliases=(), stdou...
#!/usr/bin/env python # -*- coding: utf-8 -*- from optparse import make_option from optparse import OptionParser from scaffolder.core.commands import BaseCommand from scaffolder.core.template import TemplateManager class ListCommand(BaseCommand): help = 'Template command help entry' def run(self, *args, **o...
#!/usr/bin/env python # -*- coding: utf-8 -*- from optparse import make_option from optparse import OptionParser from scaffolder.core.commands import BaseCommand from scaffolder.core.template import TemplateManager class ListCommand(BaseCommand): def __init__(self, name, help='', aliases=(), stdout=None, stderr=...
<commit_before>#!/usr/bin/env python # -*- coding: utf-8 -*- from optparse import make_option from optparse import OptionParser from scaffolder.core.commands import BaseCommand from scaffolder.core.template import TemplateManager class ListCommand(BaseCommand): def __init__(self, name, help='', aliases=(), stdou...
2d31f6b842f26b5c33d2650f0f7672ba09230bfd
ratechecker/migrations/0002_remove_fee_loader.py
ratechecker/migrations/0002_remove_fee_loader.py
# -*- coding: utf-8 -*- # Generated by Django 1.11.22 on 2019-10-31 16:33 from __future__ import unicode_literals from django.db import migrations, OperationalError, ProgrammingError class Migration(migrations.Migration): dependencies = [ ('ratechecker', '0001_initial'), ] operations = [ ...
# -*- coding: utf-8 -*- # Generated by Django 1.11.22 on 2019-10-31 16:33 from __future__ import unicode_literals from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('ratechecker', '0001_initial'), ] operations = [ migrations.AlterUniqueTogether( ...
Remove OperationalError and ProgrammingError imports
Remove OperationalError and ProgrammingError imports
Python
cc0-1.0
cfpb/owning-a-home-api
# -*- coding: utf-8 -*- # Generated by Django 1.11.22 on 2019-10-31 16:33 from __future__ import unicode_literals from django.db import migrations, OperationalError, ProgrammingError class Migration(migrations.Migration): dependencies = [ ('ratechecker', '0001_initial'), ] operations = [ ...
# -*- coding: utf-8 -*- # Generated by Django 1.11.22 on 2019-10-31 16:33 from __future__ import unicode_literals from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('ratechecker', '0001_initial'), ] operations = [ migrations.AlterUniqueTogether( ...
<commit_before># -*- coding: utf-8 -*- # Generated by Django 1.11.22 on 2019-10-31 16:33 from __future__ import unicode_literals from django.db import migrations, OperationalError, ProgrammingError class Migration(migrations.Migration): dependencies = [ ('ratechecker', '0001_initial'), ] operati...
# -*- coding: utf-8 -*- # Generated by Django 1.11.22 on 2019-10-31 16:33 from __future__ import unicode_literals from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('ratechecker', '0001_initial'), ] operations = [ migrations.AlterUniqueTogether( ...
# -*- coding: utf-8 -*- # Generated by Django 1.11.22 on 2019-10-31 16:33 from __future__ import unicode_literals from django.db import migrations, OperationalError, ProgrammingError class Migration(migrations.Migration): dependencies = [ ('ratechecker', '0001_initial'), ] operations = [ ...
<commit_before># -*- coding: utf-8 -*- # Generated by Django 1.11.22 on 2019-10-31 16:33 from __future__ import unicode_literals from django.db import migrations, OperationalError, ProgrammingError class Migration(migrations.Migration): dependencies = [ ('ratechecker', '0001_initial'), ] operati...
337ab254305d30d6cbe99ac4b6abe396966042b9
mrequests/tests/connect-wiznet.py
mrequests/tests/connect-wiznet.py
"""Sets up network on MicroPython board with Wiznet 5500 ethernet adapter attached via SPI. This uses the netconfig_ module from my ``micropythonstm-lib``. To compile the MicroPython ``stm32`` port with support for the Wiznet 5500 adapter, add the following to ``mpconfigboard.mk`` in your board definition:: MICR...
"""Sets up network on MicroPython board with Wiznet 5500 ethernet adapter attached via SPI. This uses the netconfig_ module from my ``micropython-stm-lib``. To compile the MicroPython ``stm32`` port with support for the Wiznet 5500 adapter, add the following to ``mpconfigboard.mk`` in your board definition:: MIC...
Fix minor typo in doc string in test support mopule
Fix minor typo in doc string in test support mopule Signed-off-by: Christopher Arndt <711c73f64afdce07b7e38039a96d2224209e9a6c@chrisarndt.de>
Python
mit
SpotlightKid/micropython-stm-lib
"""Sets up network on MicroPython board with Wiznet 5500 ethernet adapter attached via SPI. This uses the netconfig_ module from my ``micropythonstm-lib``. To compile the MicroPython ``stm32`` port with support for the Wiznet 5500 adapter, add the following to ``mpconfigboard.mk`` in your board definition:: MICR...
"""Sets up network on MicroPython board with Wiznet 5500 ethernet adapter attached via SPI. This uses the netconfig_ module from my ``micropython-stm-lib``. To compile the MicroPython ``stm32`` port with support for the Wiznet 5500 adapter, add the following to ``mpconfigboard.mk`` in your board definition:: MIC...
<commit_before>"""Sets up network on MicroPython board with Wiznet 5500 ethernet adapter attached via SPI. This uses the netconfig_ module from my ``micropythonstm-lib``. To compile the MicroPython ``stm32`` port with support for the Wiznet 5500 adapter, add the following to ``mpconfigboard.mk`` in your board definit...
"""Sets up network on MicroPython board with Wiznet 5500 ethernet adapter attached via SPI. This uses the netconfig_ module from my ``micropython-stm-lib``. To compile the MicroPython ``stm32`` port with support for the Wiznet 5500 adapter, add the following to ``mpconfigboard.mk`` in your board definition:: MIC...
"""Sets up network on MicroPython board with Wiznet 5500 ethernet adapter attached via SPI. This uses the netconfig_ module from my ``micropythonstm-lib``. To compile the MicroPython ``stm32`` port with support for the Wiznet 5500 adapter, add the following to ``mpconfigboard.mk`` in your board definition:: MICR...
<commit_before>"""Sets up network on MicroPython board with Wiznet 5500 ethernet adapter attached via SPI. This uses the netconfig_ module from my ``micropythonstm-lib``. To compile the MicroPython ``stm32`` port with support for the Wiznet 5500 adapter, add the following to ``mpconfigboard.mk`` in your board definit...
ffc0b75d33264baea876898092bbd65247f564e6
generate_input.py
generate_input.py
import sys from random import randint f = open('input', 'w') if (len(sys.argv) < 2): print('python3 generate_input.py <n>') sys.exit() n = int(sys.argv[1]) f.write(str(n)+'\n') for x in range(0, n): for y in range(0, n): if (y != 0): f.write(' ' + str(randint(0, 20) - 10)) e...
import sys from random import randint f = open('input', 'w') if (len(sys.argv) < 2): print('python3 generate_input.py <nlines> <ncolums>') sys.exit() nl = int(sys.argv[1]) nc = int(sys.argv[2]) f.write(str(nl)+'\n') f.write(str(nc)+'\n') for x in range(0, nl): for y in range(0, nc): if (y != 0)...
Add variable lines and columns
Add variable lines and columns
Python
mit
alepmaros/cuda_matrix_multiplication,alepmaros/cuda_matrix_multiplication,alepmaros/cuda_matrix_multiplication
import sys from random import randint f = open('input', 'w') if (len(sys.argv) < 2): print('python3 generate_input.py <n>') sys.exit() n = int(sys.argv[1]) f.write(str(n)+'\n') for x in range(0, n): for y in range(0, n): if (y != 0): f.write(' ' + str(randint(0, 20) - 10)) e...
import sys from random import randint f = open('input', 'w') if (len(sys.argv) < 2): print('python3 generate_input.py <nlines> <ncolums>') sys.exit() nl = int(sys.argv[1]) nc = int(sys.argv[2]) f.write(str(nl)+'\n') f.write(str(nc)+'\n') for x in range(0, nl): for y in range(0, nc): if (y != 0)...
<commit_before>import sys from random import randint f = open('input', 'w') if (len(sys.argv) < 2): print('python3 generate_input.py <n>') sys.exit() n = int(sys.argv[1]) f.write(str(n)+'\n') for x in range(0, n): for y in range(0, n): if (y != 0): f.write(' ' + str(randint(0, 20) -...
import sys from random import randint f = open('input', 'w') if (len(sys.argv) < 2): print('python3 generate_input.py <nlines> <ncolums>') sys.exit() nl = int(sys.argv[1]) nc = int(sys.argv[2]) f.write(str(nl)+'\n') f.write(str(nc)+'\n') for x in range(0, nl): for y in range(0, nc): if (y != 0)...
import sys from random import randint f = open('input', 'w') if (len(sys.argv) < 2): print('python3 generate_input.py <n>') sys.exit() n = int(sys.argv[1]) f.write(str(n)+'\n') for x in range(0, n): for y in range(0, n): if (y != 0): f.write(' ' + str(randint(0, 20) - 10)) e...
<commit_before>import sys from random import randint f = open('input', 'w') if (len(sys.argv) < 2): print('python3 generate_input.py <n>') sys.exit() n = int(sys.argv[1]) f.write(str(n)+'\n') for x in range(0, n): for y in range(0, n): if (y != 0): f.write(' ' + str(randint(0, 20) -...
143224fe0a8ca17378a2b37dd050df27c000f772
lbrynet/__init__.py
lbrynet/__init__.py
import logging __version__ = "0.17.2rc11" version = tuple(__version__.split('.')) logging.getLogger(__name__).addHandler(logging.NullHandler())
import logging __version__ = "0.18.0rc1" version = tuple(__version__.split('.')) logging.getLogger(__name__).addHandler(logging.NullHandler())
Bump version 0.17.2rc11 --> 0.18.0rc1
Bump version 0.17.2rc11 --> 0.18.0rc1 Signed-off-by: Jack Robison <40884020c67726395ea162083a125620dc32cdab@lbry.io>
Python
mit
lbryio/lbry,lbryio/lbry,lbryio/lbry
import logging __version__ = "0.17.2rc11" version = tuple(__version__.split('.')) logging.getLogger(__name__).addHandler(logging.NullHandler()) Bump version 0.17.2rc11 --> 0.18.0rc1 Signed-off-by: Jack Robison <40884020c67726395ea162083a125620dc32cdab@lbry.io>
import logging __version__ = "0.18.0rc1" version = tuple(__version__.split('.')) logging.getLogger(__name__).addHandler(logging.NullHandler())
<commit_before>import logging __version__ = "0.17.2rc11" version = tuple(__version__.split('.')) logging.getLogger(__name__).addHandler(logging.NullHandler()) <commit_msg>Bump version 0.17.2rc11 --> 0.18.0rc1 Signed-off-by: Jack Robison <40884020c67726395ea162083a125620dc32cdab@lbry.io><commit_after>
import logging __version__ = "0.18.0rc1" version = tuple(__version__.split('.')) logging.getLogger(__name__).addHandler(logging.NullHandler())
import logging __version__ = "0.17.2rc11" version = tuple(__version__.split('.')) logging.getLogger(__name__).addHandler(logging.NullHandler()) Bump version 0.17.2rc11 --> 0.18.0rc1 Signed-off-by: Jack Robison <40884020c67726395ea162083a125620dc32cdab@lbry.io>import logging __version__ = "0.18.0rc1" version = tuple...
<commit_before>import logging __version__ = "0.17.2rc11" version = tuple(__version__.split('.')) logging.getLogger(__name__).addHandler(logging.NullHandler()) <commit_msg>Bump version 0.17.2rc11 --> 0.18.0rc1 Signed-off-by: Jack Robison <40884020c67726395ea162083a125620dc32cdab@lbry.io><commit_after>import logging ...
d020aeccc44d6de29724750355c341375739a6a9
project_template/dataset_score_lookup.py
project_template/dataset_score_lookup.py
import json """ Input: the path of the dataset file, a list of song and line indices Output: List of tuples of words with highest tf-idf scores Given a list of song-line tuple (song_index, line_index), returns a list of a word-score tuple, with the word with highest score at the head of the list. """ d...
import json """ Input: Loaded dataset, a list of song and line indices Output: List of tuples of words with highest tf-idf scores Given a list of song-line tuple (song_index, line_index), returns a list of a word-score tuple, with the word with highest score at the head of the list. """ def score_looku...
Update score lookup to not load dataset file
Update score lookup to not load dataset file
Python
mit
warrencrowell/cs4300sp2016-TweetBeat,warrencrowell/cs4300sp2016-TweetBeat
import json """ Input: the path of the dataset file, a list of song and line indices Output: List of tuples of words with highest tf-idf scores Given a list of song-line tuple (song_index, line_index), returns a list of a word-score tuple, with the word with highest score at the head of the list. """ d...
import json """ Input: Loaded dataset, a list of song and line indices Output: List of tuples of words with highest tf-idf scores Given a list of song-line tuple (song_index, line_index), returns a list of a word-score tuple, with the word with highest score at the head of the list. """ def score_looku...
<commit_before>import json """ Input: the path of the dataset file, a list of song and line indices Output: List of tuples of words with highest tf-idf scores Given a list of song-line tuple (song_index, line_index), returns a list of a word-score tuple, with the word with highest score at the head of ...
import json """ Input: Loaded dataset, a list of song and line indices Output: List of tuples of words with highest tf-idf scores Given a list of song-line tuple (song_index, line_index), returns a list of a word-score tuple, with the word with highest score at the head of the list. """ def score_looku...
import json """ Input: the path of the dataset file, a list of song and line indices Output: List of tuples of words with highest tf-idf scores Given a list of song-line tuple (song_index, line_index), returns a list of a word-score tuple, with the word with highest score at the head of the list. """ d...
<commit_before>import json """ Input: the path of the dataset file, a list of song and line indices Output: List of tuples of words with highest tf-idf scores Given a list of song-line tuple (song_index, line_index), returns a list of a word-score tuple, with the word with highest score at the head of ...
49721933b824e321db9e848c85647bb3d05a2388
lib/feeds/errors.py
lib/feeds/errors.py
# Copyright 2009-2010 by Ka-Ping Yee # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in w...
# Copyright 2009-2010 by Ka-Ping Yee # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in w...
Remove import logging. This file is now identical to the branch point.
Remove import logging. This file is now identical to the branch point.
Python
apache-2.0
Princessgladys/googleresourcefinder,Princessgladys/googleresourcefinder,Princessgladys/googleresourcefinder
# Copyright 2009-2010 by Ka-Ping Yee # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in w...
# Copyright 2009-2010 by Ka-Ping Yee # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in w...
<commit_before># Copyright 2009-2010 by Ka-Ping Yee # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or...
# Copyright 2009-2010 by Ka-Ping Yee # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in w...
# Copyright 2009-2010 by Ka-Ping Yee # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in w...
<commit_before># Copyright 2009-2010 by Ka-Ping Yee # # 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...
fe692f0a3cdec2b3351c4e7742b115280a82343c
tests/unit/dashboard/voucher_form_tests.py
tests/unit/dashboard/voucher_form_tests.py
from django import test from oscar.apps.dashboard.vouchers import forms class TestVoucherForm(test.TestCase): def test_handles_empty_date_fields(self): data = {'code': '', 'name': '', 'start_date': '', 'end_date': '', 'benefit_range': '', ...
from django import test from oscar.apps.dashboard.vouchers import forms class TestVoucherForm(test.TestCase): def test_doesnt_crash_on_empty_date_fields(self): """ There was a bug fixed in 02b3644 where the voucher form would raise an exception (instead of just failing validation) when b...
Change wording for voucher form test
Change wording for voucher form test I was confused by what the test does, and had to ask @codeinthehole to explain. Hopefully made it's intention a bit clearer now.
Python
bsd-3-clause
rocopartners/django-oscar,sasha0/django-oscar,rocopartners/django-oscar,solarissmoke/django-oscar,dongguangming/django-oscar,itbabu/django-oscar,solarissmoke/django-oscar,bnprk/django-oscar,rocopartners/django-oscar,WillisXChen/django-oscar,lijoantony/django-oscar,bschuon/django-oscar,jlmadurga/django-oscar,machtfit/dj...
from django import test from oscar.apps.dashboard.vouchers import forms class TestVoucherForm(test.TestCase): def test_handles_empty_date_fields(self): data = {'code': '', 'name': '', 'start_date': '', 'end_date': '', 'benefit_range': '', ...
from django import test from oscar.apps.dashboard.vouchers import forms class TestVoucherForm(test.TestCase): def test_doesnt_crash_on_empty_date_fields(self): """ There was a bug fixed in 02b3644 where the voucher form would raise an exception (instead of just failing validation) when b...
<commit_before>from django import test from oscar.apps.dashboard.vouchers import forms class TestVoucherForm(test.TestCase): def test_handles_empty_date_fields(self): data = {'code': '', 'name': '', 'start_date': '', 'end_date': '', 'benefi...
from django import test from oscar.apps.dashboard.vouchers import forms class TestVoucherForm(test.TestCase): def test_doesnt_crash_on_empty_date_fields(self): """ There was a bug fixed in 02b3644 where the voucher form would raise an exception (instead of just failing validation) when b...
from django import test from oscar.apps.dashboard.vouchers import forms class TestVoucherForm(test.TestCase): def test_handles_empty_date_fields(self): data = {'code': '', 'name': '', 'start_date': '', 'end_date': '', 'benefit_range': '', ...
<commit_before>from django import test from oscar.apps.dashboard.vouchers import forms class TestVoucherForm(test.TestCase): def test_handles_empty_date_fields(self): data = {'code': '', 'name': '', 'start_date': '', 'end_date': '', 'benefi...
0eac6cb99624b5404824a5fbbfddc7e520cdb535
pyconde/search/search_indexes.py
pyconde/search/search_indexes.py
import re from django.test.client import RequestFactory from django.template import RequestContext from haystack import indexes from cms import models as cmsmodels rf = RequestFactory() HTML_TAG_RE = re.compile(r'<[^>]+>') def cleanup_content(s): """ Removes HTML tags from data and replaces them with sp...
import re from django.test.client import RequestFactory from django.template import RequestContext from haystack import indexes from cms import models as cmsmodels rf = RequestFactory() HTML_TAG_RE = re.compile(r'<[^>]+>') def cleanup_content(s): """ Removes HTML tags from data and replaces them with sp...
Add whitespace between title and text for search index.
Add whitespace between title and text for search index.
Python
bsd-3-clause
pysv/djep,pysv/djep,EuroPython/djep,zerok/pyconde-website-mirror,zerok/pyconde-website-mirror,zerok/pyconde-website-mirror,EuroPython/djep,pysv/djep,EuroPython/djep,EuroPython/djep,pysv/djep,pysv/djep
import re from django.test.client import RequestFactory from django.template import RequestContext from haystack import indexes from cms import models as cmsmodels rf = RequestFactory() HTML_TAG_RE = re.compile(r'<[^>]+>') def cleanup_content(s): """ Removes HTML tags from data and replaces them with sp...
import re from django.test.client import RequestFactory from django.template import RequestContext from haystack import indexes from cms import models as cmsmodels rf = RequestFactory() HTML_TAG_RE = re.compile(r'<[^>]+>') def cleanup_content(s): """ Removes HTML tags from data and replaces them with sp...
<commit_before>import re from django.test.client import RequestFactory from django.template import RequestContext from haystack import indexes from cms import models as cmsmodels rf = RequestFactory() HTML_TAG_RE = re.compile(r'<[^>]+>') def cleanup_content(s): """ Removes HTML tags from data and replac...
import re from django.test.client import RequestFactory from django.template import RequestContext from haystack import indexes from cms import models as cmsmodels rf = RequestFactory() HTML_TAG_RE = re.compile(r'<[^>]+>') def cleanup_content(s): """ Removes HTML tags from data and replaces them with sp...
import re from django.test.client import RequestFactory from django.template import RequestContext from haystack import indexes from cms import models as cmsmodels rf = RequestFactory() HTML_TAG_RE = re.compile(r'<[^>]+>') def cleanup_content(s): """ Removes HTML tags from data and replaces them with sp...
<commit_before>import re from django.test.client import RequestFactory from django.template import RequestContext from haystack import indexes from cms import models as cmsmodels rf = RequestFactory() HTML_TAG_RE = re.compile(r'<[^>]+>') def cleanup_content(s): """ Removes HTML tags from data and replac...
8ab7e02668f60c67534bc0f9e986347c9b84ed50
climlab/__init__.py
climlab/__init__.py
__version__ = '0.3.0a' # This list defines all the modules that will be loaded if a user invokes # from climLab import * # totally out of date! #__all__ = ["constants", "thermo", "orbital_table", # "long_orbital_table", "insolation", "ebm", # "column", "convadj"] #from climlab import radiatio...
__version__ = '0.3.0.1' # This list defines all the modules that will be loaded if a user invokes # from climLab import * # totally out of date! #__all__ = ["constants", "thermo", "orbital_table", # "long_orbital_table", "insolation", "ebm", # "column", "convadj"] #from climlab import radiati...
Change version number to 0.3.0.1
Change version number to 0.3.0.1
Python
mit
brian-rose/climlab,cjcardinale/climlab,brian-rose/climlab,cjcardinale/climlab,cjcardinale/climlab
__version__ = '0.3.0a' # This list defines all the modules that will be loaded if a user invokes # from climLab import * # totally out of date! #__all__ = ["constants", "thermo", "orbital_table", # "long_orbital_table", "insolation", "ebm", # "column", "convadj"] #from climlab import radiatio...
__version__ = '0.3.0.1' # This list defines all the modules that will be loaded if a user invokes # from climLab import * # totally out of date! #__all__ = ["constants", "thermo", "orbital_table", # "long_orbital_table", "insolation", "ebm", # "column", "convadj"] #from climlab import radiati...
<commit_before>__version__ = '0.3.0a' # This list defines all the modules that will be loaded if a user invokes # from climLab import * # totally out of date! #__all__ = ["constants", "thermo", "orbital_table", # "long_orbital_table", "insolation", "ebm", # "column", "convadj"] #from climlab ...
__version__ = '0.3.0.1' # This list defines all the modules that will be loaded if a user invokes # from climLab import * # totally out of date! #__all__ = ["constants", "thermo", "orbital_table", # "long_orbital_table", "insolation", "ebm", # "column", "convadj"] #from climlab import radiati...
__version__ = '0.3.0a' # This list defines all the modules that will be loaded if a user invokes # from climLab import * # totally out of date! #__all__ = ["constants", "thermo", "orbital_table", # "long_orbital_table", "insolation", "ebm", # "column", "convadj"] #from climlab import radiatio...
<commit_before>__version__ = '0.3.0a' # This list defines all the modules that will be loaded if a user invokes # from climLab import * # totally out of date! #__all__ = ["constants", "thermo", "orbital_table", # "long_orbital_table", "insolation", "ebm", # "column", "convadj"] #from climlab ...
6a1846c91a5829d0b41ca3f81f797e9f4aa26d6e
misura/canon/plugin/__init__.py
misura/canon/plugin/__init__.py
#!/usr/bin/python # -*- coding: utf-8 -*- """Plugin utilities""" from domains import NavigatorDomain, navigator_domains, node, nodes from dataimport import Converter, create_tree, create_dataset, search_registry, get_converter, convert_file, data_importers # List of functions which will be executed to update confdb a...
#!/usr/bin/python # -*- coding: utf-8 -*- """Plugin utilities""" from domains import NavigatorDomain, navigator_domains, node, nodes from dataimport import Converter, create_tree, create_dataset, search_registry, get_converter, convert_file, data_importers # List of functions which will be executed to update confdb a...
Remove obsolete load_rules definition, FLTD-196
Remove obsolete load_rules definition, FLTD-196
Python
mit
tainstr/misura.canon,tainstr/misura.canon
#!/usr/bin/python # -*- coding: utf-8 -*- """Plugin utilities""" from domains import NavigatorDomain, navigator_domains, node, nodes from dataimport import Converter, create_tree, create_dataset, search_registry, get_converter, convert_file, data_importers # List of functions which will be executed to update confdb a...
#!/usr/bin/python # -*- coding: utf-8 -*- """Plugin utilities""" from domains import NavigatorDomain, navigator_domains, node, nodes from dataimport import Converter, create_tree, create_dataset, search_registry, get_converter, convert_file, data_importers # List of functions which will be executed to update confdb a...
<commit_before>#!/usr/bin/python # -*- coding: utf-8 -*- """Plugin utilities""" from domains import NavigatorDomain, navigator_domains, node, nodes from dataimport import Converter, create_tree, create_dataset, search_registry, get_converter, convert_file, data_importers # List of functions which will be executed to ...
#!/usr/bin/python # -*- coding: utf-8 -*- """Plugin utilities""" from domains import NavigatorDomain, navigator_domains, node, nodes from dataimport import Converter, create_tree, create_dataset, search_registry, get_converter, convert_file, data_importers # List of functions which will be executed to update confdb a...
#!/usr/bin/python # -*- coding: utf-8 -*- """Plugin utilities""" from domains import NavigatorDomain, navigator_domains, node, nodes from dataimport import Converter, create_tree, create_dataset, search_registry, get_converter, convert_file, data_importers # List of functions which will be executed to update confdb a...
<commit_before>#!/usr/bin/python # -*- coding: utf-8 -*- """Plugin utilities""" from domains import NavigatorDomain, navigator_domains, node, nodes from dataimport import Converter, create_tree, create_dataset, search_registry, get_converter, convert_file, data_importers # List of functions which will be executed to ...
2c6bda335b48ca290070a629c5582b19751c524a
salt/modules/ftp.py
salt/modules/ftp.py
''' Minion side functions for salt-ftp ''' import os def recv(files, dest): ''' Used with salt-ftp, pass the files dict, and the destination ''' if not os.path.isdir(dest) or not os.path.isdir(os.path.dirname(dest)): return 'Destination not available' ret = {} for path, data in files.it...
''' Minion side functions for salt-ftp ''' import os def recv(files, dest): ''' Used with salt-ftp, pass the files dict, and the destination ''' if not os.path.isdir(dest) or not os.path.isdir(os.path.dirname(dest)): return 'Destination not available' ret = {} for path, data in files.it...
Make naming the destination file work
Make naming the destination file work
Python
apache-2.0
saltstack/salt,saltstack/salt,saltstack/salt,saltstack/salt,saltstack/salt
''' Minion side functions for salt-ftp ''' import os def recv(files, dest): ''' Used with salt-ftp, pass the files dict, and the destination ''' if not os.path.isdir(dest) or not os.path.isdir(os.path.dirname(dest)): return 'Destination not available' ret = {} for path, data in files.it...
''' Minion side functions for salt-ftp ''' import os def recv(files, dest): ''' Used with salt-ftp, pass the files dict, and the destination ''' if not os.path.isdir(dest) or not os.path.isdir(os.path.dirname(dest)): return 'Destination not available' ret = {} for path, data in files.it...
<commit_before>''' Minion side functions for salt-ftp ''' import os def recv(files, dest): ''' Used with salt-ftp, pass the files dict, and the destination ''' if not os.path.isdir(dest) or not os.path.isdir(os.path.dirname(dest)): return 'Destination not available' ret = {} for path, d...
''' Minion side functions for salt-ftp ''' import os def recv(files, dest): ''' Used with salt-ftp, pass the files dict, and the destination ''' if not os.path.isdir(dest) or not os.path.isdir(os.path.dirname(dest)): return 'Destination not available' ret = {} for path, data in files.it...
''' Minion side functions for salt-ftp ''' import os def recv(files, dest): ''' Used with salt-ftp, pass the files dict, and the destination ''' if not os.path.isdir(dest) or not os.path.isdir(os.path.dirname(dest)): return 'Destination not available' ret = {} for path, data in files.it...
<commit_before>''' Minion side functions for salt-ftp ''' import os def recv(files, dest): ''' Used with salt-ftp, pass the files dict, and the destination ''' if not os.path.isdir(dest) or not os.path.isdir(os.path.dirname(dest)): return 'Destination not available' ret = {} for path, d...
33154ad8decc2848ce30444ec51615397a4d8d37
src/clusto/test/testbase.py
src/clusto/test/testbase.py
import sys import os sys.path.insert(0, os.curdir) import unittest import clusto import ConfigParser DB='sqlite:///:memory:' ECHO=False class ClustoTestResult(unittest.TestResult): def addError(self, test, err): """Called when an error has occurred. 'err' is a tuple of values as returned by s...
import sys import os sys.path.insert(0, os.curdir) import unittest import clusto import ConfigParser DB='sqlite:///:memory:' ECHO=False class ClustoTestResult(unittest.TestResult): def addError(self, test, err): """Called when an error has occurred. 'err' is a tuple of values as returned by s...
Enable versioning during unit tests
Enable versioning during unit tests
Python
bsd-3-clause
clusto/clusto,thekad/clusto,sloppyfocus/clusto,sloppyfocus/clusto,motivator/clusto,JTCunning/clusto,motivator/clusto,clusto/clusto,thekad/clusto,JTCunning/clusto
import sys import os sys.path.insert(0, os.curdir) import unittest import clusto import ConfigParser DB='sqlite:///:memory:' ECHO=False class ClustoTestResult(unittest.TestResult): def addError(self, test, err): """Called when an error has occurred. 'err' is a tuple of values as returned by s...
import sys import os sys.path.insert(0, os.curdir) import unittest import clusto import ConfigParser DB='sqlite:///:memory:' ECHO=False class ClustoTestResult(unittest.TestResult): def addError(self, test, err): """Called when an error has occurred. 'err' is a tuple of values as returned by s...
<commit_before>import sys import os sys.path.insert(0, os.curdir) import unittest import clusto import ConfigParser DB='sqlite:///:memory:' ECHO=False class ClustoTestResult(unittest.TestResult): def addError(self, test, err): """Called when an error has occurred. 'err' is a tuple of values as ...
import sys import os sys.path.insert(0, os.curdir) import unittest import clusto import ConfigParser DB='sqlite:///:memory:' ECHO=False class ClustoTestResult(unittest.TestResult): def addError(self, test, err): """Called when an error has occurred. 'err' is a tuple of values as returned by s...
import sys import os sys.path.insert(0, os.curdir) import unittest import clusto import ConfigParser DB='sqlite:///:memory:' ECHO=False class ClustoTestResult(unittest.TestResult): def addError(self, test, err): """Called when an error has occurred. 'err' is a tuple of values as returned by s...
<commit_before>import sys import os sys.path.insert(0, os.curdir) import unittest import clusto import ConfigParser DB='sqlite:///:memory:' ECHO=False class ClustoTestResult(unittest.TestResult): def addError(self, test, err): """Called when an error has occurred. 'err' is a tuple of values as ...
c08e6a22e589880d97b92048cfaec994c41a23d4
pylama/lint/pylama_pydocstyle.py
pylama/lint/pylama_pydocstyle.py
"""pydocstyle support.""" from pydocstyle import PEP257Checker from pylama.lint import Linter as Abstract class Linter(Abstract): """Check pydocstyle errors.""" @staticmethod def run(path, code=None, **meta): """pydocstyle code checking. :return list: List of errors. """ ...
"""pydocstyle support.""" THIRD_ARG = True try: #: Import for pydocstyle 2.0.0 and newer from pydocstyle import ConventionChecker as PyDocChecker except ImportError: #: Backward compatibility for pydocstyle prior to 2.0.0 from pydocstyle import PEP257Checker as PyDocChecker THIRD_ARG = False from ...
Update for pydocstyle 2.0.0 compatibility
Update for pydocstyle 2.0.0 compatibility Fix klen/pylama#96 Adding the newer ignore_decorators argument. Thanks to @not-raspberry for the tip!
Python
mit
klen/pylama
"""pydocstyle support.""" from pydocstyle import PEP257Checker from pylama.lint import Linter as Abstract class Linter(Abstract): """Check pydocstyle errors.""" @staticmethod def run(path, code=None, **meta): """pydocstyle code checking. :return list: List of errors. """ ...
"""pydocstyle support.""" THIRD_ARG = True try: #: Import for pydocstyle 2.0.0 and newer from pydocstyle import ConventionChecker as PyDocChecker except ImportError: #: Backward compatibility for pydocstyle prior to 2.0.0 from pydocstyle import PEP257Checker as PyDocChecker THIRD_ARG = False from ...
<commit_before>"""pydocstyle support.""" from pydocstyle import PEP257Checker from pylama.lint import Linter as Abstract class Linter(Abstract): """Check pydocstyle errors.""" @staticmethod def run(path, code=None, **meta): """pydocstyle code checking. :return list: List of errors. ...
"""pydocstyle support.""" THIRD_ARG = True try: #: Import for pydocstyle 2.0.0 and newer from pydocstyle import ConventionChecker as PyDocChecker except ImportError: #: Backward compatibility for pydocstyle prior to 2.0.0 from pydocstyle import PEP257Checker as PyDocChecker THIRD_ARG = False from ...
"""pydocstyle support.""" from pydocstyle import PEP257Checker from pylama.lint import Linter as Abstract class Linter(Abstract): """Check pydocstyle errors.""" @staticmethod def run(path, code=None, **meta): """pydocstyle code checking. :return list: List of errors. """ ...
<commit_before>"""pydocstyle support.""" from pydocstyle import PEP257Checker from pylama.lint import Linter as Abstract class Linter(Abstract): """Check pydocstyle errors.""" @staticmethod def run(path, code=None, **meta): """pydocstyle code checking. :return list: List of errors. ...
95807cb007c9ea51a3594adca33b7fab809afc3e
tests/zeus/api/test_authentication.py
tests/zeus/api/test_authentication.py
import pytest from zeus import factories from zeus.auth import AuthenticationFailed from zeus.api.authentication import ApiTokenAuthentication def test_no_header(app): with app.test_request_context('/'): assert not ApiTokenAuthentication().authenticate() def test_invalid_authentication_type(app): w...
import pytest from zeus import factories from zeus.auth import AuthenticationFailed from zeus.api.authentication import ApiTokenAuthentication def test_no_header(app): with app.test_request_context('/'): assert not ApiTokenAuthentication().authenticate() def test_invalid_authentication_type(app): w...
Fix tests for new header
test(auth): Fix tests for new header
Python
apache-2.0
getsentry/zeus,getsentry/zeus,getsentry/zeus,getsentry/zeus
import pytest from zeus import factories from zeus.auth import AuthenticationFailed from zeus.api.authentication import ApiTokenAuthentication def test_no_header(app): with app.test_request_context('/'): assert not ApiTokenAuthentication().authenticate() def test_invalid_authentication_type(app): w...
import pytest from zeus import factories from zeus.auth import AuthenticationFailed from zeus.api.authentication import ApiTokenAuthentication def test_no_header(app): with app.test_request_context('/'): assert not ApiTokenAuthentication().authenticate() def test_invalid_authentication_type(app): w...
<commit_before>import pytest from zeus import factories from zeus.auth import AuthenticationFailed from zeus.api.authentication import ApiTokenAuthentication def test_no_header(app): with app.test_request_context('/'): assert not ApiTokenAuthentication().authenticate() def test_invalid_authentication_t...
import pytest from zeus import factories from zeus.auth import AuthenticationFailed from zeus.api.authentication import ApiTokenAuthentication def test_no_header(app): with app.test_request_context('/'): assert not ApiTokenAuthentication().authenticate() def test_invalid_authentication_type(app): w...
import pytest from zeus import factories from zeus.auth import AuthenticationFailed from zeus.api.authentication import ApiTokenAuthentication def test_no_header(app): with app.test_request_context('/'): assert not ApiTokenAuthentication().authenticate() def test_invalid_authentication_type(app): w...
<commit_before>import pytest from zeus import factories from zeus.auth import AuthenticationFailed from zeus.api.authentication import ApiTokenAuthentication def test_no_header(app): with app.test_request_context('/'): assert not ApiTokenAuthentication().authenticate() def test_invalid_authentication_t...
79d2a78c0043aea7232933735654169ac05a70c3
ofxclient/util.py
ofxclient/util.py
from ofxclient.client import Client from StringIO import StringIO def combined_download(accounts, days=60): """Download OFX files and combine them into one It expects an 'accounts' list of ofxclient.Account objects as well as an optional 'days' specifier which defaults to 60 """ client = Client(...
from ofxclient.client import Client from StringIO import StringIO def combined_download(accounts, days=60): """Download OFX files and combine them into one It expects an 'accounts' list of ofxclient.Account objects as well as an optional 'days' specifier which defaults to 60 """ client = Client(...
Fix bug with document merger
Fix bug with document merger
Python
mit
captin411/ofxclient,jbms/ofxclient
from ofxclient.client import Client from StringIO import StringIO def combined_download(accounts, days=60): """Download OFX files and combine them into one It expects an 'accounts' list of ofxclient.Account objects as well as an optional 'days' specifier which defaults to 60 """ client = Client(...
from ofxclient.client import Client from StringIO import StringIO def combined_download(accounts, days=60): """Download OFX files and combine them into one It expects an 'accounts' list of ofxclient.Account objects as well as an optional 'days' specifier which defaults to 60 """ client = Client(...
<commit_before>from ofxclient.client import Client from StringIO import StringIO def combined_download(accounts, days=60): """Download OFX files and combine them into one It expects an 'accounts' list of ofxclient.Account objects as well as an optional 'days' specifier which defaults to 60 """ c...
from ofxclient.client import Client from StringIO import StringIO def combined_download(accounts, days=60): """Download OFX files and combine them into one It expects an 'accounts' list of ofxclient.Account objects as well as an optional 'days' specifier which defaults to 60 """ client = Client(...
from ofxclient.client import Client from StringIO import StringIO def combined_download(accounts, days=60): """Download OFX files and combine them into one It expects an 'accounts' list of ofxclient.Account objects as well as an optional 'days' specifier which defaults to 60 """ client = Client(...
<commit_before>from ofxclient.client import Client from StringIO import StringIO def combined_download(accounts, days=60): """Download OFX files and combine them into one It expects an 'accounts' list of ofxclient.Account objects as well as an optional 'days' specifier which defaults to 60 """ c...
bc5fa08e84cd11349dc44c3065b7b5380d60ebd9
raven/contrib/django/handlers.py
raven/contrib/django/handlers.py
""" raven.contrib.django.handlers ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :copyright: (c) 2010-2012 by the Sentry Team, see AUTHORS for more details. :license: BSD, see LICENSE for more details. """ from __future__ import absolute_import import logging from raven.handlers.logging import SentryHandler as BaseSentryHandler cl...
""" raven.contrib.django.handlers ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :copyright: (c) 2010-2012 by the Sentry Team, see AUTHORS for more details. :license: BSD, see LICENSE for more details. """ from __future__ import absolute_import import logging from raven.handlers.logging import SentryHandler as BaseSentryHandler cl...
Allow level param in Django SentryHandler.__init__
Allow level param in Django SentryHandler.__init__ For consistency with superclass and with logging.Handler
Python
bsd-3-clause
arthurlogilab/raven-python,inspirehep/raven-python,ewdurbin/raven-python,jbarbuto/raven-python,getsentry/raven-python,dbravender/raven-python,jbarbuto/raven-python,Photonomie/raven-python,percipient/raven-python,akheron/raven-python,icereval/raven-python,nikolas/raven-python,akalipetis/raven-python,someonehan/raven-pyt...
""" raven.contrib.django.handlers ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :copyright: (c) 2010-2012 by the Sentry Team, see AUTHORS for more details. :license: BSD, see LICENSE for more details. """ from __future__ import absolute_import import logging from raven.handlers.logging import SentryHandler as BaseSentryHandler cl...
""" raven.contrib.django.handlers ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :copyright: (c) 2010-2012 by the Sentry Team, see AUTHORS for more details. :license: BSD, see LICENSE for more details. """ from __future__ import absolute_import import logging from raven.handlers.logging import SentryHandler as BaseSentryHandler cl...
<commit_before>""" raven.contrib.django.handlers ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :copyright: (c) 2010-2012 by the Sentry Team, see AUTHORS for more details. :license: BSD, see LICENSE for more details. """ from __future__ import absolute_import import logging from raven.handlers.logging import SentryHandler as BaseSen...
""" raven.contrib.django.handlers ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :copyright: (c) 2010-2012 by the Sentry Team, see AUTHORS for more details. :license: BSD, see LICENSE for more details. """ from __future__ import absolute_import import logging from raven.handlers.logging import SentryHandler as BaseSentryHandler cl...
""" raven.contrib.django.handlers ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :copyright: (c) 2010-2012 by the Sentry Team, see AUTHORS for more details. :license: BSD, see LICENSE for more details. """ from __future__ import absolute_import import logging from raven.handlers.logging import SentryHandler as BaseSentryHandler cl...
<commit_before>""" raven.contrib.django.handlers ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :copyright: (c) 2010-2012 by the Sentry Team, see AUTHORS for more details. :license: BSD, see LICENSE for more details. """ from __future__ import absolute_import import logging from raven.handlers.logging import SentryHandler as BaseSen...
486633791bea00c6a846b88124860efbc7532433
fancypages/assets/fields.py
fancypages/assets/fields.py
from django.db.models.fields.related import ForeignKey from .forms import AssetField class AssetKey(ForeignKey): def formfield(self, **kwargs): kwargs['form_class'] = AssetField return super(AssetKey, self).formfield(**kwargs) def value_from_object(self, obj): asset_obj = getattr(ob...
# -*- coding: utf-8 -*- from __future__ import unicode_literals, absolute_import import django from django.db.models.fields.related import ForeignKey from .forms import AssetField class AssetKey(ForeignKey): def formfield(self, **kwargs): kwargs['form_class'] = AssetField return super(AssetKey, ...
Fix south introspection rule for custom AssetField
Fix south introspection rule for custom AssetField
Python
bsd-3-clause
tangentlabs/django-fancypages,tangentlabs/django-fancypages,tangentlabs/django-fancypages
from django.db.models.fields.related import ForeignKey from .forms import AssetField class AssetKey(ForeignKey): def formfield(self, **kwargs): kwargs['form_class'] = AssetField return super(AssetKey, self).formfield(**kwargs) def value_from_object(self, obj): asset_obj = getattr(ob...
# -*- coding: utf-8 -*- from __future__ import unicode_literals, absolute_import import django from django.db.models.fields.related import ForeignKey from .forms import AssetField class AssetKey(ForeignKey): def formfield(self, **kwargs): kwargs['form_class'] = AssetField return super(AssetKey, ...
<commit_before>from django.db.models.fields.related import ForeignKey from .forms import AssetField class AssetKey(ForeignKey): def formfield(self, **kwargs): kwargs['form_class'] = AssetField return super(AssetKey, self).formfield(**kwargs) def value_from_object(self, obj): asset_o...
# -*- coding: utf-8 -*- from __future__ import unicode_literals, absolute_import import django from django.db.models.fields.related import ForeignKey from .forms import AssetField class AssetKey(ForeignKey): def formfield(self, **kwargs): kwargs['form_class'] = AssetField return super(AssetKey, ...
from django.db.models.fields.related import ForeignKey from .forms import AssetField class AssetKey(ForeignKey): def formfield(self, **kwargs): kwargs['form_class'] = AssetField return super(AssetKey, self).formfield(**kwargs) def value_from_object(self, obj): asset_obj = getattr(ob...
<commit_before>from django.db.models.fields.related import ForeignKey from .forms import AssetField class AssetKey(ForeignKey): def formfield(self, **kwargs): kwargs['form_class'] = AssetField return super(AssetKey, self).formfield(**kwargs) def value_from_object(self, obj): asset_o...
5c858e20eca77a2175178deacdbbc8005232879a
fireplace/cards/gvg/mage.py
fireplace/cards/gvg/mage.py
from ..utils import * ## # Minions # Snowchugger class GVG_002: events = Damage().on( lambda self, target, amount, source: source is self and Freeze(target) ) # Goblin Blastmage class GVG_004: play = Find(FRIENDLY_MINIONS + MECH) & Hit(RANDOM_ENEMY_CHARACTER, 1) * 4 # Flame Leviathan class GVG_007: in_hand...
from ..utils import * ## # Minions # Snowchugger class GVG_002: events = Damage().on( lambda self, target, amount, source: source is self and Freeze(target) ) # Goblin Blastmage class GVG_004: play = Find(FRIENDLY_MINIONS + MECH) & Hit(RANDOM_ENEMY_CHARACTER, 1) * 4 # Flame Leviathan class GVG_007: draw = ...
Update Flame Leviathan to use draw script
Update Flame Leviathan to use draw script
Python
agpl-3.0
smallnamespace/fireplace,oftc-ftw/fireplace,amw2104/fireplace,Ragowit/fireplace,smallnamespace/fireplace,liujimj/fireplace,NightKev/fireplace,oftc-ftw/fireplace,Meerkov/fireplace,Meerkov/fireplace,Ragowit/fireplace,amw2104/fireplace,liujimj/fireplace,jleclanche/fireplace,beheh/fireplace
from ..utils import * ## # Minions # Snowchugger class GVG_002: events = Damage().on( lambda self, target, amount, source: source is self and Freeze(target) ) # Goblin Blastmage class GVG_004: play = Find(FRIENDLY_MINIONS + MECH) & Hit(RANDOM_ENEMY_CHARACTER, 1) * 4 # Flame Leviathan class GVG_007: in_hand...
from ..utils import * ## # Minions # Snowchugger class GVG_002: events = Damage().on( lambda self, target, amount, source: source is self and Freeze(target) ) # Goblin Blastmage class GVG_004: play = Find(FRIENDLY_MINIONS + MECH) & Hit(RANDOM_ENEMY_CHARACTER, 1) * 4 # Flame Leviathan class GVG_007: draw = ...
<commit_before>from ..utils import * ## # Minions # Snowchugger class GVG_002: events = Damage().on( lambda self, target, amount, source: source is self and Freeze(target) ) # Goblin Blastmage class GVG_004: play = Find(FRIENDLY_MINIONS + MECH) & Hit(RANDOM_ENEMY_CHARACTER, 1) * 4 # Flame Leviathan class GV...
from ..utils import * ## # Minions # Snowchugger class GVG_002: events = Damage().on( lambda self, target, amount, source: source is self and Freeze(target) ) # Goblin Blastmage class GVG_004: play = Find(FRIENDLY_MINIONS + MECH) & Hit(RANDOM_ENEMY_CHARACTER, 1) * 4 # Flame Leviathan class GVG_007: draw = ...
from ..utils import * ## # Minions # Snowchugger class GVG_002: events = Damage().on( lambda self, target, amount, source: source is self and Freeze(target) ) # Goblin Blastmage class GVG_004: play = Find(FRIENDLY_MINIONS + MECH) & Hit(RANDOM_ENEMY_CHARACTER, 1) * 4 # Flame Leviathan class GVG_007: in_hand...
<commit_before>from ..utils import * ## # Minions # Snowchugger class GVG_002: events = Damage().on( lambda self, target, amount, source: source is self and Freeze(target) ) # Goblin Blastmage class GVG_004: play = Find(FRIENDLY_MINIONS + MECH) & Hit(RANDOM_ENEMY_CHARACTER, 1) * 4 # Flame Leviathan class GV...
2814d7b8060d1f468bb6fb34d1460cdad1811031
tools/android/emulator/reporting.py
tools/android/emulator/reporting.py
"""An interface to report the status of emulator launches.""" from __future__ import absolute_import from __future__ import division from __future__ import print_function import json import logging import os import uuid class NoOpReporter(object): """Captures all device and failure data and throws it away.""" ...
"""An interface to report the status of emulator launches.""" from __future__ import absolute_import from __future__ import division from __future__ import print_function import json import logging import os import uuid class NoOpReporter(object): """Captures all device and failure data and throws it away.""" ...
Update the reporter interface to even track the total runtime
Update the reporter interface to even track the total runtime PiperOrigin-RevId: 160982468
Python
apache-2.0
android/android-test,android/android-test,android/android-test,android/android-test,android/android-test
"""An interface to report the status of emulator launches.""" from __future__ import absolute_import from __future__ import division from __future__ import print_function import json import logging import os import uuid class NoOpReporter(object): """Captures all device and failure data and throws it away.""" ...
"""An interface to report the status of emulator launches.""" from __future__ import absolute_import from __future__ import division from __future__ import print_function import json import logging import os import uuid class NoOpReporter(object): """Captures all device and failure data and throws it away.""" ...
<commit_before>"""An interface to report the status of emulator launches.""" from __future__ import absolute_import from __future__ import division from __future__ import print_function import json import logging import os import uuid class NoOpReporter(object): """Captures all device and failure data and throws...
"""An interface to report the status of emulator launches.""" from __future__ import absolute_import from __future__ import division from __future__ import print_function import json import logging import os import uuid class NoOpReporter(object): """Captures all device and failure data and throws it away.""" ...
"""An interface to report the status of emulator launches.""" from __future__ import absolute_import from __future__ import division from __future__ import print_function import json import logging import os import uuid class NoOpReporter(object): """Captures all device and failure data and throws it away.""" ...
<commit_before>"""An interface to report the status of emulator launches.""" from __future__ import absolute_import from __future__ import division from __future__ import print_function import json import logging import os import uuid class NoOpReporter(object): """Captures all device and failure data and throws...
16ed5ff024a8ee04809cf9192727e1e7adcf565d
frigg/builds/serializers.py
frigg/builds/serializers.py
from rest_framework import serializers from frigg.projects.models import Project from .models import Build, BuildResult class ProjectInlineSerializer(serializers.ModelSerializer): class Meta: model = Project fields = ( 'id', 'owner', 'name', 'priv...
from rest_framework import serializers from frigg.projects.models import Project from .models import Build, BuildResult class ProjectInlineSerializer(serializers.ModelSerializer): class Meta: model = Project fields = ( 'id', 'owner', 'name', 'priv...
Add more data to the api
Add more data to the api
Python
mit
frigg/frigg-hq,frigg/frigg-hq,frigg/frigg-hq
from rest_framework import serializers from frigg.projects.models import Project from .models import Build, BuildResult class ProjectInlineSerializer(serializers.ModelSerializer): class Meta: model = Project fields = ( 'id', 'owner', 'name', 'priv...
from rest_framework import serializers from frigg.projects.models import Project from .models import Build, BuildResult class ProjectInlineSerializer(serializers.ModelSerializer): class Meta: model = Project fields = ( 'id', 'owner', 'name', 'priv...
<commit_before>from rest_framework import serializers from frigg.projects.models import Project from .models import Build, BuildResult class ProjectInlineSerializer(serializers.ModelSerializer): class Meta: model = Project fields = ( 'id', 'owner', 'name', ...
from rest_framework import serializers from frigg.projects.models import Project from .models import Build, BuildResult class ProjectInlineSerializer(serializers.ModelSerializer): class Meta: model = Project fields = ( 'id', 'owner', 'name', 'priv...
from rest_framework import serializers from frigg.projects.models import Project from .models import Build, BuildResult class ProjectInlineSerializer(serializers.ModelSerializer): class Meta: model = Project fields = ( 'id', 'owner', 'name', 'priv...
<commit_before>from rest_framework import serializers from frigg.projects.models import Project from .models import Build, BuildResult class ProjectInlineSerializer(serializers.ModelSerializer): class Meta: model = Project fields = ( 'id', 'owner', 'name', ...
8ed7fff1b7ec0d069e9a4545785bf99768afe761
flask_jsonapiview/fields.py
flask_jsonapiview/fields.py
from marshmallow import fields, ValidationError from .exceptions import IncorrectTypeError __all__ = ('StubObject',) # ----------------------------------------------------------------------------- class Type(fields.Field): _CHECK_ATTRIBUTE = False def _add_to_schema(self, field_name, schema): supe...
from marshmallow import fields, ValidationError from marshmallow.compat import basestring from .exceptions import IncorrectTypeError __all__ = ('StubObject',) # ----------------------------------------------------------------------------- class Type(fields.Field): _CHECK_ATTRIBUTE = False def _add_to_sche...
Use compat basestring for id validation
Use compat basestring for id validation
Python
mit
taion/flask-jsonapiview,4Catalyzer/flask-resty,4Catalyzer/flask-jsonapiview
from marshmallow import fields, ValidationError from .exceptions import IncorrectTypeError __all__ = ('StubObject',) # ----------------------------------------------------------------------------- class Type(fields.Field): _CHECK_ATTRIBUTE = False def _add_to_schema(self, field_name, schema): supe...
from marshmallow import fields, ValidationError from marshmallow.compat import basestring from .exceptions import IncorrectTypeError __all__ = ('StubObject',) # ----------------------------------------------------------------------------- class Type(fields.Field): _CHECK_ATTRIBUTE = False def _add_to_sche...
<commit_before>from marshmallow import fields, ValidationError from .exceptions import IncorrectTypeError __all__ = ('StubObject',) # ----------------------------------------------------------------------------- class Type(fields.Field): _CHECK_ATTRIBUTE = False def _add_to_schema(self, field_name, schema...
from marshmallow import fields, ValidationError from marshmallow.compat import basestring from .exceptions import IncorrectTypeError __all__ = ('StubObject',) # ----------------------------------------------------------------------------- class Type(fields.Field): _CHECK_ATTRIBUTE = False def _add_to_sche...
from marshmallow import fields, ValidationError from .exceptions import IncorrectTypeError __all__ = ('StubObject',) # ----------------------------------------------------------------------------- class Type(fields.Field): _CHECK_ATTRIBUTE = False def _add_to_schema(self, field_name, schema): supe...
<commit_before>from marshmallow import fields, ValidationError from .exceptions import IncorrectTypeError __all__ = ('StubObject',) # ----------------------------------------------------------------------------- class Type(fields.Field): _CHECK_ATTRIBUTE = False def _add_to_schema(self, field_name, schema...
555536b93609ab3b1c29475d51408aaf7eda4675
cray_test.py
cray_test.py
# -*- coding: utf-8 -*- '''module for unit test and task for CI''' import sys import unittest from yatest import testpost, testpage, testutility, testconfig if __name__ == '__main__': all_test_suites = [] all_test_suites.append(testpost.get_test_suites()) all_test_suites.append(testpage.get_test_suites())...
# -*- coding: utf-8 -*- '''module for unit test and task for CI''' import sys import unittest from yatest import testpost, testpage, testutility, testconfig, testgenerator, testpostmanager if __name__ == '__main__': all_test_suites = [] all_test_suites.append(testpost.get_test_suites()) all_test_suites.ap...
Add new added test cases to travis.
Add new added test cases to travis.
Python
mit
boluny/cray,boluny/cray
# -*- coding: utf-8 -*- '''module for unit test and task for CI''' import sys import unittest from yatest import testpost, testpage, testutility, testconfig if __name__ == '__main__': all_test_suites = [] all_test_suites.append(testpost.get_test_suites()) all_test_suites.append(testpage.get_test_suites())...
# -*- coding: utf-8 -*- '''module for unit test and task for CI''' import sys import unittest from yatest import testpost, testpage, testutility, testconfig, testgenerator, testpostmanager if __name__ == '__main__': all_test_suites = [] all_test_suites.append(testpost.get_test_suites()) all_test_suites.ap...
<commit_before># -*- coding: utf-8 -*- '''module for unit test and task for CI''' import sys import unittest from yatest import testpost, testpage, testutility, testconfig if __name__ == '__main__': all_test_suites = [] all_test_suites.append(testpost.get_test_suites()) all_test_suites.append(testpage.get...
# -*- coding: utf-8 -*- '''module for unit test and task for CI''' import sys import unittest from yatest import testpost, testpage, testutility, testconfig, testgenerator, testpostmanager if __name__ == '__main__': all_test_suites = [] all_test_suites.append(testpost.get_test_suites()) all_test_suites.ap...
# -*- coding: utf-8 -*- '''module for unit test and task for CI''' import sys import unittest from yatest import testpost, testpage, testutility, testconfig if __name__ == '__main__': all_test_suites = [] all_test_suites.append(testpost.get_test_suites()) all_test_suites.append(testpage.get_test_suites())...
<commit_before># -*- coding: utf-8 -*- '''module for unit test and task for CI''' import sys import unittest from yatest import testpost, testpage, testutility, testconfig if __name__ == '__main__': all_test_suites = [] all_test_suites.append(testpost.get_test_suites()) all_test_suites.append(testpage.get...
e56e85b56fe68112c40f4d76ce103d5c10d6dea7
kyokai/asphalt.py
kyokai/asphalt.py
""" Asphalt framework mixin for Kyokai. """ import logging import asyncio from functools import partial from typing import Union from asphalt.core import Component, resolve_reference, Context from typeguard import check_argument_types from kyokai.app import Kyokai from kyokai.protocol import KyokaiProtocol logger =...
""" Asphalt framework mixin for Kyokai. """ import logging import asyncio from functools import partial from typing import Union from asphalt.core import Component, resolve_reference, Context from typeguard import check_argument_types from kyokai.app import Kyokai from kyokai.protocol import KyokaiProtocol logger =...
Fix server not being created properly.
Fix server not being created properly.
Python
mit
SunDwarf/Kyoukai
""" Asphalt framework mixin for Kyokai. """ import logging import asyncio from functools import partial from typing import Union from asphalt.core import Component, resolve_reference, Context from typeguard import check_argument_types from kyokai.app import Kyokai from kyokai.protocol import KyokaiProtocol logger =...
""" Asphalt framework mixin for Kyokai. """ import logging import asyncio from functools import partial from typing import Union from asphalt.core import Component, resolve_reference, Context from typeguard import check_argument_types from kyokai.app import Kyokai from kyokai.protocol import KyokaiProtocol logger =...
<commit_before>""" Asphalt framework mixin for Kyokai. """ import logging import asyncio from functools import partial from typing import Union from asphalt.core import Component, resolve_reference, Context from typeguard import check_argument_types from kyokai.app import Kyokai from kyokai.protocol import KyokaiPro...
""" Asphalt framework mixin for Kyokai. """ import logging import asyncio from functools import partial from typing import Union from asphalt.core import Component, resolve_reference, Context from typeguard import check_argument_types from kyokai.app import Kyokai from kyokai.protocol import KyokaiProtocol logger =...
""" Asphalt framework mixin for Kyokai. """ import logging import asyncio from functools import partial from typing import Union from asphalt.core import Component, resolve_reference, Context from typeguard import check_argument_types from kyokai.app import Kyokai from kyokai.protocol import KyokaiProtocol logger =...
<commit_before>""" Asphalt framework mixin for Kyokai. """ import logging import asyncio from functools import partial from typing import Union from asphalt.core import Component, resolve_reference, Context from typeguard import check_argument_types from kyokai.app import Kyokai from kyokai.protocol import KyokaiPro...
52bca1129cfe21669b5f7faf2e99e148a559bd32
src/utils/build_dependencies.py
src/utils/build_dependencies.py
#!/usr/bin/env python import glob dependencies = {} for src in glob.iglob('*.F90'): module = src.strip('.F90') d = set() for line in open(src, 'r'): words = line.split() if words and words[0].lower() == 'use': name = words[1].strip(',') if name in ['mpi','hdf5','h5...
#!/usr/bin/env python import glob import re dependencies = {} for src in glob.iglob('*.F90'): module = src.strip('.F90') deps = set() d = re.findall(r'\n\s*use\s+(\w+)', open(src,'r').read()) for name in d: if name in ['mpi','hdf5','h5lt']: continue if n...
Fix potential bug in build dependencies script. If you gave it ' use module,only: ...' before it would not work.
Fix potential bug in build dependencies script. If you gave it ' use module,only: ...' before it would not work.
Python
mit
mjlong/openmc,wbinventor/openmc,kellyrowland/openmc,lilulu/openmc,liangjg/openmc,mit-crpg/openmc,johnnyliu27/openmc,smharper/openmc,keadyk/openmc_mg_prepush,smharper/openmc,paulromano/openmc,johnnyliu27/openmc,smharper/openmc,liangjg/openmc,mit-crpg/openmc,smharper/openmc,walshjon/openmc,lilulu/openmc,sxds/opemmc,paulr...
#!/usr/bin/env python import glob dependencies = {} for src in glob.iglob('*.F90'): module = src.strip('.F90') d = set() for line in open(src, 'r'): words = line.split() if words and words[0].lower() == 'use': name = words[1].strip(',') if name in ['mpi','hdf5','h5...
#!/usr/bin/env python import glob import re dependencies = {} for src in glob.iglob('*.F90'): module = src.strip('.F90') deps = set() d = re.findall(r'\n\s*use\s+(\w+)', open(src,'r').read()) for name in d: if name in ['mpi','hdf5','h5lt']: continue if n...
<commit_before>#!/usr/bin/env python import glob dependencies = {} for src in glob.iglob('*.F90'): module = src.strip('.F90') d = set() for line in open(src, 'r'): words = line.split() if words and words[0].lower() == 'use': name = words[1].strip(',') if name in ['...
#!/usr/bin/env python import glob import re dependencies = {} for src in glob.iglob('*.F90'): module = src.strip('.F90') deps = set() d = re.findall(r'\n\s*use\s+(\w+)', open(src,'r').read()) for name in d: if name in ['mpi','hdf5','h5lt']: continue if n...
#!/usr/bin/env python import glob dependencies = {} for src in glob.iglob('*.F90'): module = src.strip('.F90') d = set() for line in open(src, 'r'): words = line.split() if words and words[0].lower() == 'use': name = words[1].strip(',') if name in ['mpi','hdf5','h5...
<commit_before>#!/usr/bin/env python import glob dependencies = {} for src in glob.iglob('*.F90'): module = src.strip('.F90') d = set() for line in open(src, 'r'): words = line.split() if words and words[0].lower() == 'use': name = words[1].strip(',') if name in ['...
005890de77432c1e97e834483b8c477ef92be187
src/cli/_errors.py
src/cli/_errors.py
""" Error heirarchy for stratis cli. """ class StratisCliError(Exception): """ Top-level stratis cli error. """ pass class StratisCliValueError(StratisCliError): """ Raised when a parameter has an unacceptable value. May also be raised when the parameter has an unacceptable type. """...
""" Error heirarchy for stratis cli. """ class StratisCliError(Exception): """ Top-level stratis cli error. """ pass class StratisCliValueError(StratisCliError): """ Raised when a parameter has an unacceptable value. May also be raised when the parameter has an unacceptable type. """...
Add a class for a known error that prevents implementation.
Add a class for a known error that prevents implementation. Signed-off-by: mulhern <7b51bcf507bcd7afb72bf8663752c0ddbeb517f6@redhat.com>
Python
apache-2.0
stratis-storage/stratis-cli,stratis-storage/stratis-cli
""" Error heirarchy for stratis cli. """ class StratisCliError(Exception): """ Top-level stratis cli error. """ pass class StratisCliValueError(StratisCliError): """ Raised when a parameter has an unacceptable value. May also be raised when the parameter has an unacceptable type. """...
""" Error heirarchy for stratis cli. """ class StratisCliError(Exception): """ Top-level stratis cli error. """ pass class StratisCliValueError(StratisCliError): """ Raised when a parameter has an unacceptable value. May also be raised when the parameter has an unacceptable type. """...
<commit_before>""" Error heirarchy for stratis cli. """ class StratisCliError(Exception): """ Top-level stratis cli error. """ pass class StratisCliValueError(StratisCliError): """ Raised when a parameter has an unacceptable value. May also be raised when the parameter has an unacceptabl...
""" Error heirarchy for stratis cli. """ class StratisCliError(Exception): """ Top-level stratis cli error. """ pass class StratisCliValueError(StratisCliError): """ Raised when a parameter has an unacceptable value. May also be raised when the parameter has an unacceptable type. """...
""" Error heirarchy for stratis cli. """ class StratisCliError(Exception): """ Top-level stratis cli error. """ pass class StratisCliValueError(StratisCliError): """ Raised when a parameter has an unacceptable value. May also be raised when the parameter has an unacceptable type. """...
<commit_before>""" Error heirarchy for stratis cli. """ class StratisCliError(Exception): """ Top-level stratis cli error. """ pass class StratisCliValueError(StratisCliError): """ Raised when a parameter has an unacceptable value. May also be raised when the parameter has an unacceptabl...
2084ac35a66067046db98e6b6d76d589952f1953
chipy8.py
chipy8.py
class Memory(object): def __init__(self): self._stream = [0x00] * 4096 def __len__(self): return len(self._stream) def read_byte(self, address): return self._stream[address] def write_byte(self, address, data): self._stream[address] = data def load(self, address...
class Memory(object): def __init__(self): self._stream = [0x00] * 4096 def __len__(self): return len(self._stream) def read_byte(self, address): return self._stream[address] def write_byte(self, address, data): self._stream[address] = data def load(self, address...
Refactor Chip8 to use a Memory instance.
Refactor Chip8 to use a Memory instance.
Python
bsd-3-clause
gutomaia/chipy8
class Memory(object): def __init__(self): self._stream = [0x00] * 4096 def __len__(self): return len(self._stream) def read_byte(self, address): return self._stream[address] def write_byte(self, address, data): self._stream[address] = data def load(self, address...
class Memory(object): def __init__(self): self._stream = [0x00] * 4096 def __len__(self): return len(self._stream) def read_byte(self, address): return self._stream[address] def write_byte(self, address, data): self._stream[address] = data def load(self, address...
<commit_before> class Memory(object): def __init__(self): self._stream = [0x00] * 4096 def __len__(self): return len(self._stream) def read_byte(self, address): return self._stream[address] def write_byte(self, address, data): self._stream[address] = data def loa...
class Memory(object): def __init__(self): self._stream = [0x00] * 4096 def __len__(self): return len(self._stream) def read_byte(self, address): return self._stream[address] def write_byte(self, address, data): self._stream[address] = data def load(self, address...
class Memory(object): def __init__(self): self._stream = [0x00] * 4096 def __len__(self): return len(self._stream) def read_byte(self, address): return self._stream[address] def write_byte(self, address, data): self._stream[address] = data def load(self, address...
<commit_before> class Memory(object): def __init__(self): self._stream = [0x00] * 4096 def __len__(self): return len(self._stream) def read_byte(self, address): return self._stream[address] def write_byte(self, address, data): self._stream[address] = data def loa...
e6b24f6e8bfca6f8e22bd63c893a228cc2a694f1
starter_project/normalize_breton_test.py
starter_project/normalize_breton_test.py
import unittest class TestStringMethods(unittest.TestCase): def test_upper(self): self.assertEqual('foo'.upper(), 'FOO') if __name__ == '__main__': unittest.main()
import unittest import normalize_breton_lib class TestStringMethods(unittest.TestCase): def test_normalize_breton(self): 'Test the output of NormalizeBreton.' test_cases = [(('a--bc', 'a-bc'), ('ccb--a', 'ccb-a'), ('ba--aa', 'ba-aa'))] for test in test_cases: for test_case, expec...
Add basic test for example Pynini FST.
Add basic test for example Pynini FST.
Python
apache-2.0
googleinterns/text-norm-for-low-resource-languages,googleinterns/text-norm-for-low-resource-languages
import unittest class TestStringMethods(unittest.TestCase): def test_upper(self): self.assertEqual('foo'.upper(), 'FOO') if __name__ == '__main__': unittest.main() Add basic test for example Pynini FST.
import unittest import normalize_breton_lib class TestStringMethods(unittest.TestCase): def test_normalize_breton(self): 'Test the output of NormalizeBreton.' test_cases = [(('a--bc', 'a-bc'), ('ccb--a', 'ccb-a'), ('ba--aa', 'ba-aa'))] for test in test_cases: for test_case, expec...
<commit_before>import unittest class TestStringMethods(unittest.TestCase): def test_upper(self): self.assertEqual('foo'.upper(), 'FOO') if __name__ == '__main__': unittest.main() <commit_msg>Add basic test for example Pynini FST.<commit_after>
import unittest import normalize_breton_lib class TestStringMethods(unittest.TestCase): def test_normalize_breton(self): 'Test the output of NormalizeBreton.' test_cases = [(('a--bc', 'a-bc'), ('ccb--a', 'ccb-a'), ('ba--aa', 'ba-aa'))] for test in test_cases: for test_case, expec...
import unittest class TestStringMethods(unittest.TestCase): def test_upper(self): self.assertEqual('foo'.upper(), 'FOO') if __name__ == '__main__': unittest.main() Add basic test for example Pynini FST.import unittest import normalize_breton_lib class TestStringMethods(unittest.TestCase): def t...
<commit_before>import unittest class TestStringMethods(unittest.TestCase): def test_upper(self): self.assertEqual('foo'.upper(), 'FOO') if __name__ == '__main__': unittest.main() <commit_msg>Add basic test for example Pynini FST.<commit_after>import unittest import normalize_breton_lib class TestStr...
c2f30f7c192b8a282c44727b2afc71b90e98cd3a
django_project/core/settings/prod_docker.py
django_project/core/settings/prod_docker.py
from .project import * import os ALLOWED_HOSTS = ['*'] DATABASES = { 'default': { 'ENGINE': 'django.contrib.gis.db.backends.postgis', 'NAME': 'gis', 'USER': os.environ['DATABASE_USERNAME'], 'PASSWORD': os.environ['DATABASE_PASSWORD'], 'HOST': os.environ['DATABASE_HOST'], ...
from .project import * import os ALLOWED_HOSTS = ['*'] DATABASES = { 'default': { 'ENGINE': 'django.contrib.gis.db.backends.postgis', 'NAME': 'gis', 'USER': os.environ['DATABASE_USERNAME'], 'PASSWORD': os.environ['DATABASE_PASSWORD'], 'HOST': os.environ['DATABASE_HOST'], ...
Comment out yuglify search path
Comment out yuglify search path
Python
bsd-2-clause
ismailsunni/healthsites,ismailsunni/healthsites,ismailsunni/healthsites,ismailsunni/healthsites
from .project import * import os ALLOWED_HOSTS = ['*'] DATABASES = { 'default': { 'ENGINE': 'django.contrib.gis.db.backends.postgis', 'NAME': 'gis', 'USER': os.environ['DATABASE_USERNAME'], 'PASSWORD': os.environ['DATABASE_PASSWORD'], 'HOST': os.environ['DATABASE_HOST'], ...
from .project import * import os ALLOWED_HOSTS = ['*'] DATABASES = { 'default': { 'ENGINE': 'django.contrib.gis.db.backends.postgis', 'NAME': 'gis', 'USER': os.environ['DATABASE_USERNAME'], 'PASSWORD': os.environ['DATABASE_PASSWORD'], 'HOST': os.environ['DATABASE_HOST'], ...
<commit_before>from .project import * import os ALLOWED_HOSTS = ['*'] DATABASES = { 'default': { 'ENGINE': 'django.contrib.gis.db.backends.postgis', 'NAME': 'gis', 'USER': os.environ['DATABASE_USERNAME'], 'PASSWORD': os.environ['DATABASE_PASSWORD'], 'HOST': os.environ['DATA...
from .project import * import os ALLOWED_HOSTS = ['*'] DATABASES = { 'default': { 'ENGINE': 'django.contrib.gis.db.backends.postgis', 'NAME': 'gis', 'USER': os.environ['DATABASE_USERNAME'], 'PASSWORD': os.environ['DATABASE_PASSWORD'], 'HOST': os.environ['DATABASE_HOST'], ...
from .project import * import os ALLOWED_HOSTS = ['*'] DATABASES = { 'default': { 'ENGINE': 'django.contrib.gis.db.backends.postgis', 'NAME': 'gis', 'USER': os.environ['DATABASE_USERNAME'], 'PASSWORD': os.environ['DATABASE_PASSWORD'], 'HOST': os.environ['DATABASE_HOST'], ...
<commit_before>from .project import * import os ALLOWED_HOSTS = ['*'] DATABASES = { 'default': { 'ENGINE': 'django.contrib.gis.db.backends.postgis', 'NAME': 'gis', 'USER': os.environ['DATABASE_USERNAME'], 'PASSWORD': os.environ['DATABASE_PASSWORD'], 'HOST': os.environ['DATA...
da3995150d6eacf7695c4606e83c24c82a17546d
autogenerate_config_docs/hooks.py
autogenerate_config_docs/hooks.py
# # A collection of shared functions for managing help flag mapping files. # # 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 requi...
# # A collection of shared functions for managing help flag mapping files. # # 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 requi...
Add a hook for nova.cmd.spicehtml5proxy
Add a hook for nova.cmd.spicehtml5proxy The cmd/ folders are excluded from the autohelp imports to avoid ending up with a bunch of CLI options. nova/cmd/spicehtml5proxy.py holds real configuration options and needs to be imported. Change-Id: Ic0f8066332a45cae253ad3e03f4717f1887e16ee Partial-Bug: #1394595
Python
apache-2.0
openstack/openstack-doc-tools,savinash47/openstack-doc-tools,savinash47/openstack-doc-tools,savinash47/openstack-doc-tools,openstack/openstack-doc-tools
# # A collection of shared functions for managing help flag mapping files. # # 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 requi...
# # A collection of shared functions for managing help flag mapping files. # # 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 requi...
<commit_before># # A collection of shared functions for managing help flag mapping files. # # 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 #...
# # A collection of shared functions for managing help flag mapping files. # # 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 requi...
# # A collection of shared functions for managing help flag mapping files. # # 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 requi...
<commit_before># # A collection of shared functions for managing help flag mapping files. # # 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 #...
09468a6411a5c0816ecb2f79037b0a79b3ceb9c5
lib/carbon/hashing.py
lib/carbon/hashing.py
import hashlib import bisect serverRing = None class ConsistentHashRing: def __init__(self, nodes, replica_count=100): self.ring = [] self.replica_count = replica_count for node in nodes: self.add_node(node) def compute_ring_position(self, key): big_hash = hashlib.md5( str(key) ).hexdiges...
try: from hashlib import md5 except ImportError: from md5 import md5 import bisect serverRing = None class ConsistentHashRing: def __init__(self, nodes, replica_count=100): self.ring = [] self.replica_count = replica_count for node in nodes: self.add_node(node) def compute_ring_position(s...
Make compatible with python 2.4 hashlib was added in python 2.5, but just using the md5() method so fall back to md5.md5() if we can't import hashlib
Make compatible with python 2.4 hashlib was added in python 2.5, but just using the md5() method so fall back to md5.md5() if we can't import hashlib
Python
apache-2.0
kharandziuk/carbon,criteo-forks/carbon,krux/carbon,graphite-project/carbon,pratX/carbon,johnseekins/carbon,graphite-server/carbon,JeanFred/carbon,mleinart/carbon,benburry/carbon,graphite-server/carbon,iain-buclaw-sociomantic/carbon,obfuscurity/carbon,xadjmerripen/carbon,cbowman0/carbon,deniszh/carbon,obfuscurity/carbon...
import hashlib import bisect serverRing = None class ConsistentHashRing: def __init__(self, nodes, replica_count=100): self.ring = [] self.replica_count = replica_count for node in nodes: self.add_node(node) def compute_ring_position(self, key): big_hash = hashlib.md5( str(key) ).hexdiges...
try: from hashlib import md5 except ImportError: from md5 import md5 import bisect serverRing = None class ConsistentHashRing: def __init__(self, nodes, replica_count=100): self.ring = [] self.replica_count = replica_count for node in nodes: self.add_node(node) def compute_ring_position(s...
<commit_before>import hashlib import bisect serverRing = None class ConsistentHashRing: def __init__(self, nodes, replica_count=100): self.ring = [] self.replica_count = replica_count for node in nodes: self.add_node(node) def compute_ring_position(self, key): big_hash = hashlib.md5( str(...
try: from hashlib import md5 except ImportError: from md5 import md5 import bisect serverRing = None class ConsistentHashRing: def __init__(self, nodes, replica_count=100): self.ring = [] self.replica_count = replica_count for node in nodes: self.add_node(node) def compute_ring_position(s...
import hashlib import bisect serverRing = None class ConsistentHashRing: def __init__(self, nodes, replica_count=100): self.ring = [] self.replica_count = replica_count for node in nodes: self.add_node(node) def compute_ring_position(self, key): big_hash = hashlib.md5( str(key) ).hexdiges...
<commit_before>import hashlib import bisect serverRing = None class ConsistentHashRing: def __init__(self, nodes, replica_count=100): self.ring = [] self.replica_count = replica_count for node in nodes: self.add_node(node) def compute_ring_position(self, key): big_hash = hashlib.md5( str(...
dde6e366fb61d6f4e16fb1f810f3eb4ffb582f0f
config.py
config.py
import os BASEDIR = os.path.abspath(os.path.dirname(__file__)) SECRET_KEY = 'secret' class Config(object): DEBUG = False TESTING = False SECRET_KEY = 'secret' SQLALCHEMY_DATABASE_URI = 'sqlite:///' + os.path.join(BASEDIR, 'bucketlist.sqlite') class ProductionConfig(Config): SQLALCHE...
import os BASEDIR = os.path.abspath(os.path.dirname(__file__)) class Config(object): DEBUG = False TESTING = False SECRET_KEY = 'secret' SQLALCHEMY_DATABASE_URI = 'sqlite:///' + os.path.join(BASEDIR, 'bucketlist.sqlite') class ProductionConfig(Config): SQLALCHEMY_DATABASE_URI = 'sqli...
Remove repetition for secret key setting
Remove repetition for secret key setting
Python
mit
andela-hoyeboade/bucketlist-api
import os BASEDIR = os.path.abspath(os.path.dirname(__file__)) SECRET_KEY = 'secret' class Config(object): DEBUG = False TESTING = False SECRET_KEY = 'secret' SQLALCHEMY_DATABASE_URI = 'sqlite:///' + os.path.join(BASEDIR, 'bucketlist.sqlite') class ProductionConfig(Config): SQLALCHE...
import os BASEDIR = os.path.abspath(os.path.dirname(__file__)) class Config(object): DEBUG = False TESTING = False SECRET_KEY = 'secret' SQLALCHEMY_DATABASE_URI = 'sqlite:///' + os.path.join(BASEDIR, 'bucketlist.sqlite') class ProductionConfig(Config): SQLALCHEMY_DATABASE_URI = 'sqli...
<commit_before>import os BASEDIR = os.path.abspath(os.path.dirname(__file__)) SECRET_KEY = 'secret' class Config(object): DEBUG = False TESTING = False SECRET_KEY = 'secret' SQLALCHEMY_DATABASE_URI = 'sqlite:///' + os.path.join(BASEDIR, 'bucketlist.sqlite') class ProductionConfig(Config)...
import os BASEDIR = os.path.abspath(os.path.dirname(__file__)) class Config(object): DEBUG = False TESTING = False SECRET_KEY = 'secret' SQLALCHEMY_DATABASE_URI = 'sqlite:///' + os.path.join(BASEDIR, 'bucketlist.sqlite') class ProductionConfig(Config): SQLALCHEMY_DATABASE_URI = 'sqli...
import os BASEDIR = os.path.abspath(os.path.dirname(__file__)) SECRET_KEY = 'secret' class Config(object): DEBUG = False TESTING = False SECRET_KEY = 'secret' SQLALCHEMY_DATABASE_URI = 'sqlite:///' + os.path.join(BASEDIR, 'bucketlist.sqlite') class ProductionConfig(Config): SQLALCHE...
<commit_before>import os BASEDIR = os.path.abspath(os.path.dirname(__file__)) SECRET_KEY = 'secret' class Config(object): DEBUG = False TESTING = False SECRET_KEY = 'secret' SQLALCHEMY_DATABASE_URI = 'sqlite:///' + os.path.join(BASEDIR, 'bucketlist.sqlite') class ProductionConfig(Config)...
93835ce92dd04ada1c073888a61bd2edd4dc17d2
links/folder/serializers.py
links/folder/serializers.py
from rest_framework import serializers from folder.models import Folder from link.serializers import LinkSerializer class FolderSerializer(serializers.ModelSerializer): class Meta: model = Folder fields = ('id', 'name', 'description', 'is_public', 'created',) read_only_fields = ('created...
from rest_framework import serializers from folder.models import Folder from link.serializers import LinkSerializer class FolderSerializer(serializers.ModelSerializer): class Meta: model = Folder fields = ('id', 'name', 'description', 'is_public', 'created',) read_only_fields = ('created...
Add links list to response serializer
Add links list to response serializer
Python
mit
projectweekend/Links-API,projectweekend/Links-API
from rest_framework import serializers from folder.models import Folder from link.serializers import LinkSerializer class FolderSerializer(serializers.ModelSerializer): class Meta: model = Folder fields = ('id', 'name', 'description', 'is_public', 'created',) read_only_fields = ('created...
from rest_framework import serializers from folder.models import Folder from link.serializers import LinkSerializer class FolderSerializer(serializers.ModelSerializer): class Meta: model = Folder fields = ('id', 'name', 'description', 'is_public', 'created',) read_only_fields = ('created...
<commit_before>from rest_framework import serializers from folder.models import Folder from link.serializers import LinkSerializer class FolderSerializer(serializers.ModelSerializer): class Meta: model = Folder fields = ('id', 'name', 'description', 'is_public', 'created',) read_only_fie...
from rest_framework import serializers from folder.models import Folder from link.serializers import LinkSerializer class FolderSerializer(serializers.ModelSerializer): class Meta: model = Folder fields = ('id', 'name', 'description', 'is_public', 'created',) read_only_fields = ('created...
from rest_framework import serializers from folder.models import Folder from link.serializers import LinkSerializer class FolderSerializer(serializers.ModelSerializer): class Meta: model = Folder fields = ('id', 'name', 'description', 'is_public', 'created',) read_only_fields = ('created...
<commit_before>from rest_framework import serializers from folder.models import Folder from link.serializers import LinkSerializer class FolderSerializer(serializers.ModelSerializer): class Meta: model = Folder fields = ('id', 'name', 'description', 'is_public', 'created',) read_only_fie...
60c28f155a605508e2b1c481c7380ebbd09f0b42
examples/firewallpolicy.py
examples/firewallpolicy.py
#!env python #License upload using FORTIOSAPI from Github import sys from fortiosapi import FortiOSAPI import json def main(): # Parse for command line argument for fgt ip if len(sys.argv) < 2: # Requires fgt ip and vdom print "Please specify fgt ip address" exit() # Initilize fg...
#!/usr/bin/env python #License upload using FORTIOSAPI from Github import logging import sys from fortiosapi import FortiOSAPI formatter = logging.Formatter( '%(asctime)s %(name)-12s %(levelname)-8s %(message)s') logger = logging.getLogger('fortiosapi') hdlr = logging.FileHandler('testfortiosapi.log') hdlr.setFo...
Create an example firewall rule push with the antivirus enablement.
Create an example firewall rule push with the antivirus enablement.
Python
apache-2.0
thomnico/fortigateconf,thomnico/fortiosapi,thomnico/fortiosapi
#!env python #License upload using FORTIOSAPI from Github import sys from fortiosapi import FortiOSAPI import json def main(): # Parse for command line argument for fgt ip if len(sys.argv) < 2: # Requires fgt ip and vdom print "Please specify fgt ip address" exit() # Initilize fg...
#!/usr/bin/env python #License upload using FORTIOSAPI from Github import logging import sys from fortiosapi import FortiOSAPI formatter = logging.Formatter( '%(asctime)s %(name)-12s %(levelname)-8s %(message)s') logger = logging.getLogger('fortiosapi') hdlr = logging.FileHandler('testfortiosapi.log') hdlr.setFo...
<commit_before>#!env python #License upload using FORTIOSAPI from Github import sys from fortiosapi import FortiOSAPI import json def main(): # Parse for command line argument for fgt ip if len(sys.argv) < 2: # Requires fgt ip and vdom print "Please specify fgt ip address" exit() ...
#!/usr/bin/env python #License upload using FORTIOSAPI from Github import logging import sys from fortiosapi import FortiOSAPI formatter = logging.Formatter( '%(asctime)s %(name)-12s %(levelname)-8s %(message)s') logger = logging.getLogger('fortiosapi') hdlr = logging.FileHandler('testfortiosapi.log') hdlr.setFo...
#!env python #License upload using FORTIOSAPI from Github import sys from fortiosapi import FortiOSAPI import json def main(): # Parse for command line argument for fgt ip if len(sys.argv) < 2: # Requires fgt ip and vdom print "Please specify fgt ip address" exit() # Initilize fg...
<commit_before>#!env python #License upload using FORTIOSAPI from Github import sys from fortiosapi import FortiOSAPI import json def main(): # Parse for command line argument for fgt ip if len(sys.argv) < 2: # Requires fgt ip and vdom print "Please specify fgt ip address" exit() ...
f2aecf968edc95fdab3ff47218e279c487464684
django_sites/templatetags/_sities_resolve.py
django_sites/templatetags/_sities_resolve.py
# -*- coding: utf-8 -*- from .. import utils try: from django_jinja.base import Library jinja_register = Library() jinja_register.global_function("sites_resolve", utils.resolve) except ImportError: pass
# -*- coding: utf-8 -*- from .. import utils try: from django_jinja.base import Library jinja_register = Library() jinja_register.global_function("sites_reverse", utils.reverse) except ImportError: pass
Fix invalid templatetag function register.
Fix invalid templatetag function register.
Python
bsd-3-clause
niwinz/django-sites,niwinz/django-sites
# -*- coding: utf-8 -*- from .. import utils try: from django_jinja.base import Library jinja_register = Library() jinja_register.global_function("sites_resolve", utils.resolve) except ImportError: pass Fix invalid templatetag function register.
# -*- coding: utf-8 -*- from .. import utils try: from django_jinja.base import Library jinja_register = Library() jinja_register.global_function("sites_reverse", utils.reverse) except ImportError: pass
<commit_before># -*- coding: utf-8 -*- from .. import utils try: from django_jinja.base import Library jinja_register = Library() jinja_register.global_function("sites_resolve", utils.resolve) except ImportError: pass <commit_msg>Fix invalid templatetag function register.<commit_after>
# -*- coding: utf-8 -*- from .. import utils try: from django_jinja.base import Library jinja_register = Library() jinja_register.global_function("sites_reverse", utils.reverse) except ImportError: pass
# -*- coding: utf-8 -*- from .. import utils try: from django_jinja.base import Library jinja_register = Library() jinja_register.global_function("sites_resolve", utils.resolve) except ImportError: pass Fix invalid templatetag function register.# -*- coding: utf-8 -*- from .. import utils try: f...
<commit_before># -*- coding: utf-8 -*- from .. import utils try: from django_jinja.base import Library jinja_register = Library() jinja_register.global_function("sites_resolve", utils.resolve) except ImportError: pass <commit_msg>Fix invalid templatetag function register.<commit_after># -*- coding: ut...
81a35c396834667ba322456bac5abebe748e04f9
tests/test_django_prometheus.py
tests/test_django_prometheus.py
#!/usr/bin/env python import django_prometheus import unittest # TODO(korfuri): Add real tests. For now, this is just a placeholder # to set up a testing system. class DjangoPrometheusTest(unittest.TestCase): def testNothing(self): self.assertTrue(True) if __name__ == 'main': unittest.main()
#!/usr/bin/env python import django_prometheus from django_prometheus.utils import PowersOf, _INF import unittest class DjangoPrometheusTest(unittest.TestCase): def testPowersOf(self): """Tests utils.PowersOf.""" self.assertEqual( [0, 1, 2, 4, 8, _INF], PowersOf(2, 4)) ...
Add a test for PowersOf.
Add a test for PowersOf.
Python
apache-2.0
obytes/django-prometheus,wangwanzhong/django-prometheus,wangwanzhong/django-prometheus,korfuri/django-prometheus,DingaGa/django-prometheus,DingaGa/django-prometheus,obytes/django-prometheus,korfuri/django-prometheus
#!/usr/bin/env python import django_prometheus import unittest # TODO(korfuri): Add real tests. For now, this is just a placeholder # to set up a testing system. class DjangoPrometheusTest(unittest.TestCase): def testNothing(self): self.assertTrue(True) if __name__ == 'main': unittest.main() Add a t...
#!/usr/bin/env python import django_prometheus from django_prometheus.utils import PowersOf, _INF import unittest class DjangoPrometheusTest(unittest.TestCase): def testPowersOf(self): """Tests utils.PowersOf.""" self.assertEqual( [0, 1, 2, 4, 8, _INF], PowersOf(2, 4)) ...
<commit_before>#!/usr/bin/env python import django_prometheus import unittest # TODO(korfuri): Add real tests. For now, this is just a placeholder # to set up a testing system. class DjangoPrometheusTest(unittest.TestCase): def testNothing(self): self.assertTrue(True) if __name__ == 'main': unittest...
#!/usr/bin/env python import django_prometheus from django_prometheus.utils import PowersOf, _INF import unittest class DjangoPrometheusTest(unittest.TestCase): def testPowersOf(self): """Tests utils.PowersOf.""" self.assertEqual( [0, 1, 2, 4, 8, _INF], PowersOf(2, 4)) ...
#!/usr/bin/env python import django_prometheus import unittest # TODO(korfuri): Add real tests. For now, this is just a placeholder # to set up a testing system. class DjangoPrometheusTest(unittest.TestCase): def testNothing(self): self.assertTrue(True) if __name__ == 'main': unittest.main() Add a t...
<commit_before>#!/usr/bin/env python import django_prometheus import unittest # TODO(korfuri): Add real tests. For now, this is just a placeholder # to set up a testing system. class DjangoPrometheusTest(unittest.TestCase): def testNothing(self): self.assertTrue(True) if __name__ == 'main': unittest...
02e41cb74be0c346f43453daad43353a2ee5ca0f
src/mercury/inventory/options.py
src/mercury/inventory/options.py
from mercury.common.configuration import MercuryConfiguration DEFAULT_CONFIG_FILE = 'mercury-inventory.yaml' def parse_options(): configuration = MercuryConfiguration( 'mercury-inventory', DEFAULT_CONFIG_FILE, description='The mercury inventory service' ) configuration.add_option...
from mercury.common.configuration import MercuryConfiguration DEFAULT_CONFIG_FILE = 'mercury-inventory.yaml' def parse_options(): configuration = MercuryConfiguration( 'mercury-inventory', DEFAULT_CONFIG_FILE, description='The mercury inventory service' ) configuration.add_option...
Use the correct option name
Use the correct option name
Python
apache-2.0
jr0d/mercury,jr0d/mercury
from mercury.common.configuration import MercuryConfiguration DEFAULT_CONFIG_FILE = 'mercury-inventory.yaml' def parse_options(): configuration = MercuryConfiguration( 'mercury-inventory', DEFAULT_CONFIG_FILE, description='The mercury inventory service' ) configuration.add_option...
from mercury.common.configuration import MercuryConfiguration DEFAULT_CONFIG_FILE = 'mercury-inventory.yaml' def parse_options(): configuration = MercuryConfiguration( 'mercury-inventory', DEFAULT_CONFIG_FILE, description='The mercury inventory service' ) configuration.add_option...
<commit_before>from mercury.common.configuration import MercuryConfiguration DEFAULT_CONFIG_FILE = 'mercury-inventory.yaml' def parse_options(): configuration = MercuryConfiguration( 'mercury-inventory', DEFAULT_CONFIG_FILE, description='The mercury inventory service' ) configura...
from mercury.common.configuration import MercuryConfiguration DEFAULT_CONFIG_FILE = 'mercury-inventory.yaml' def parse_options(): configuration = MercuryConfiguration( 'mercury-inventory', DEFAULT_CONFIG_FILE, description='The mercury inventory service' ) configuration.add_option...
from mercury.common.configuration import MercuryConfiguration DEFAULT_CONFIG_FILE = 'mercury-inventory.yaml' def parse_options(): configuration = MercuryConfiguration( 'mercury-inventory', DEFAULT_CONFIG_FILE, description='The mercury inventory service' ) configuration.add_option...
<commit_before>from mercury.common.configuration import MercuryConfiguration DEFAULT_CONFIG_FILE = 'mercury-inventory.yaml' def parse_options(): configuration = MercuryConfiguration( 'mercury-inventory', DEFAULT_CONFIG_FILE, description='The mercury inventory service' ) configura...
f701ee5a8c1ee707fedcb9e20c86161f537b9013
thinc/neural/_classes/resnet.py
thinc/neural/_classes/resnet.py
from .model import Model from ...api import layerize from .affine import Affine class Residual(Model): def __init__(self, layer): Model.__init__(self) self._layers.append(layer) self.on_data_hooks.append(on_data) def __call__(self, X): return X + self._layers[0](X) def be...
from .model import Model from ...api import layerize from .affine import Affine class Residual(Model): def __init__(self, layer): Model.__init__(self) self._layers.append(layer) self.on_data_hooks.append(on_data) def __call__(self, X): Y = self._layers[0](X) if isinsta...
Make residual connections work for list-valued inputs
Make residual connections work for list-valued inputs
Python
mit
spacy-io/thinc,explosion/thinc,spacy-io/thinc,explosion/thinc,explosion/thinc,spacy-io/thinc,explosion/thinc
from .model import Model from ...api import layerize from .affine import Affine class Residual(Model): def __init__(self, layer): Model.__init__(self) self._layers.append(layer) self.on_data_hooks.append(on_data) def __call__(self, X): return X + self._layers[0](X) def be...
from .model import Model from ...api import layerize from .affine import Affine class Residual(Model): def __init__(self, layer): Model.__init__(self) self._layers.append(layer) self.on_data_hooks.append(on_data) def __call__(self, X): Y = self._layers[0](X) if isinsta...
<commit_before>from .model import Model from ...api import layerize from .affine import Affine class Residual(Model): def __init__(self, layer): Model.__init__(self) self._layers.append(layer) self.on_data_hooks.append(on_data) def __call__(self, X): return X + self._layers[0]...
from .model import Model from ...api import layerize from .affine import Affine class Residual(Model): def __init__(self, layer): Model.__init__(self) self._layers.append(layer) self.on_data_hooks.append(on_data) def __call__(self, X): Y = self._layers[0](X) if isinsta...
from .model import Model from ...api import layerize from .affine import Affine class Residual(Model): def __init__(self, layer): Model.__init__(self) self._layers.append(layer) self.on_data_hooks.append(on_data) def __call__(self, X): return X + self._layers[0](X) def be...
<commit_before>from .model import Model from ...api import layerize from .affine import Affine class Residual(Model): def __init__(self, layer): Model.__init__(self) self._layers.append(layer) self.on_data_hooks.append(on_data) def __call__(self, X): return X + self._layers[0]...
5ab5d583aa056fb15b3b375768665aea8e9ab4be
pyhomer/__init__.py
pyhomer/__init__.py
# -*- coding: utf-8 -*- __author__ = 'Olga Botvinnik' __email__ = 'olga.botvinnik@gmail.com' __version__ = '0.1.0' from .pyhomer import ForegroundBackgroundPair
# -*- coding: utf-8 -*- __author__ = 'Olga Botvinnik' __email__ = 'olga.botvinnik@gmail.com' __version__ = '0.1.0' from .pyhomer import ForegroundBackgroundPair, construct_homer_command
Add constructing homer command to module level functions
Add constructing homer command to module level functions
Python
bsd-3-clause
olgabot/pyhomer
# -*- coding: utf-8 -*- __author__ = 'Olga Botvinnik' __email__ = 'olga.botvinnik@gmail.com' __version__ = '0.1.0' from .pyhomer import ForegroundBackgroundPairAdd constructing homer command to module level functions
# -*- coding: utf-8 -*- __author__ = 'Olga Botvinnik' __email__ = 'olga.botvinnik@gmail.com' __version__ = '0.1.0' from .pyhomer import ForegroundBackgroundPair, construct_homer_command
<commit_before># -*- coding: utf-8 -*- __author__ = 'Olga Botvinnik' __email__ = 'olga.botvinnik@gmail.com' __version__ = '0.1.0' from .pyhomer import ForegroundBackgroundPair<commit_msg>Add constructing homer command to module level functions<commit_after>
# -*- coding: utf-8 -*- __author__ = 'Olga Botvinnik' __email__ = 'olga.botvinnik@gmail.com' __version__ = '0.1.0' from .pyhomer import ForegroundBackgroundPair, construct_homer_command
# -*- coding: utf-8 -*- __author__ = 'Olga Botvinnik' __email__ = 'olga.botvinnik@gmail.com' __version__ = '0.1.0' from .pyhomer import ForegroundBackgroundPairAdd constructing homer command to module level functions# -*- coding: utf-8 -*- __author__ = 'Olga Botvinnik' __email__ = 'olga.botvinnik@gmail.com' __versio...
<commit_before># -*- coding: utf-8 -*- __author__ = 'Olga Botvinnik' __email__ = 'olga.botvinnik@gmail.com' __version__ = '0.1.0' from .pyhomer import ForegroundBackgroundPair<commit_msg>Add constructing homer command to module level functions<commit_after># -*- coding: utf-8 -*- __author__ = 'Olga Botvinnik' __emai...
c56cc755044e223c3ac641ba4bbcb38a6780bd4d
apps/polls/templatetags/react_polls.py
apps/polls/templatetags/react_polls.py
import json from django import template from django.utils.html import format_html from rest_framework.renderers import JSONRenderer from .. import serializers register = template.Library() @register.simple_tag(takes_context=True) def react_polls(context, question): user = context['request'].user user_choic...
import json from django import template from django.utils.html import format_html from rest_framework.renderers import JSONRenderer from .. import serializers register = template.Library() @register.simple_tag(takes_context=True) def react_polls(context, question): user = context['request'].user user_choic...
Use Manager to annotate vote count
Fix: Use Manager to annotate vote count
Python
agpl-3.0
liqd/a4-meinberlin,liqd/a4-meinberlin,liqd/a4-meinberlin,liqd/a4-meinberlin
import json from django import template from django.utils.html import format_html from rest_framework.renderers import JSONRenderer from .. import serializers register = template.Library() @register.simple_tag(takes_context=True) def react_polls(context, question): user = context['request'].user user_choic...
import json from django import template from django.utils.html import format_html from rest_framework.renderers import JSONRenderer from .. import serializers register = template.Library() @register.simple_tag(takes_context=True) def react_polls(context, question): user = context['request'].user user_choic...
<commit_before>import json from django import template from django.utils.html import format_html from rest_framework.renderers import JSONRenderer from .. import serializers register = template.Library() @register.simple_tag(takes_context=True) def react_polls(context, question): user = context['request'].user...
import json from django import template from django.utils.html import format_html from rest_framework.renderers import JSONRenderer from .. import serializers register = template.Library() @register.simple_tag(takes_context=True) def react_polls(context, question): user = context['request'].user user_choic...
import json from django import template from django.utils.html import format_html from rest_framework.renderers import JSONRenderer from .. import serializers register = template.Library() @register.simple_tag(takes_context=True) def react_polls(context, question): user = context['request'].user user_choic...
<commit_before>import json from django import template from django.utils.html import format_html from rest_framework.renderers import JSONRenderer from .. import serializers register = template.Library() @register.simple_tag(takes_context=True) def react_polls(context, question): user = context['request'].user...
e08c2b053ab99de5a77b49b43524f5fab816b19e
fluent_blogs/templatetags/fluent_blogs_comments_tags.py
fluent_blogs/templatetags/fluent_blogs_comments_tags.py
""" A simple wrapper library, that makes sure that the template ``fluent_blogs/entry_detail/comments.html`` can still be rendered when ``django.contrib.comments`` is not included in the site. This way, project authors can easily use an online commenting system (such as DISQUS or Facebook comments) instead. """ from dj...
""" A simple wrapper library, that makes sure that the template ``fluent_blogs/entry_detail/comments.html`` can still be rendered when ``django.contrib.comments`` is not included in the site. This way, project authors can easily use an online commenting system (such as DISQUS or Facebook comments) instead. """ import ...
Add render_comment_list / render_comment_form stub tags for Django
Add render_comment_list / render_comment_form stub tags for Django
Python
apache-2.0
edoburu/django-fluent-blogs,edoburu/django-fluent-blogs
""" A simple wrapper library, that makes sure that the template ``fluent_blogs/entry_detail/comments.html`` can still be rendered when ``django.contrib.comments`` is not included in the site. This way, project authors can easily use an online commenting system (such as DISQUS or Facebook comments) instead. """ from dj...
""" A simple wrapper library, that makes sure that the template ``fluent_blogs/entry_detail/comments.html`` can still be rendered when ``django.contrib.comments`` is not included in the site. This way, project authors can easily use an online commenting system (such as DISQUS or Facebook comments) instead. """ import ...
<commit_before>""" A simple wrapper library, that makes sure that the template ``fluent_blogs/entry_detail/comments.html`` can still be rendered when ``django.contrib.comments`` is not included in the site. This way, project authors can easily use an online commenting system (such as DISQUS or Facebook comments) inste...
""" A simple wrapper library, that makes sure that the template ``fluent_blogs/entry_detail/comments.html`` can still be rendered when ``django.contrib.comments`` is not included in the site. This way, project authors can easily use an online commenting system (such as DISQUS or Facebook comments) instead. """ import ...
""" A simple wrapper library, that makes sure that the template ``fluent_blogs/entry_detail/comments.html`` can still be rendered when ``django.contrib.comments`` is not included in the site. This way, project authors can easily use an online commenting system (such as DISQUS or Facebook comments) instead. """ from dj...
<commit_before>""" A simple wrapper library, that makes sure that the template ``fluent_blogs/entry_detail/comments.html`` can still be rendered when ``django.contrib.comments`` is not included in the site. This way, project authors can easily use an online commenting system (such as DISQUS or Facebook comments) inste...
514be833dd759c51a2b3f8ca0ae2df4499d63b83
tests/test_video_conferences.py
tests/test_video_conferences.py
import pytest @pytest.mark.skip( reason="Broken in 5.0. https://github.com/RocketChat/Rocket.Chat/issues/26520" ) def test_update_jitsi_timeout(logged_rocket): update_jitsi_timeout = logged_rocket.update_jitsi_timeout(room_id="GENERAL").json() assert update_jitsi_timeout.get("success")
import pytest # TODO: Go back to this test once the ticket has being answered @pytest.mark.skip( reason="Broken in 5.0. https://github.com/RocketChat/Rocket.Chat/issues/26520" ) def test_update_jitsi_timeout(logged_rocket): update_jitsi_timeout = logged_rocket.update_jitsi_timeout(room_id="GENERAL").json() ...
Add todo in the test_update_jitsi_timeout so it's easier to find in the future
Add todo in the test_update_jitsi_timeout so it's easier to find in the future
Python
mit
jadolg/rocketchat_API
import pytest @pytest.mark.skip( reason="Broken in 5.0. https://github.com/RocketChat/Rocket.Chat/issues/26520" ) def test_update_jitsi_timeout(logged_rocket): update_jitsi_timeout = logged_rocket.update_jitsi_timeout(room_id="GENERAL").json() assert update_jitsi_timeout.get("success") Add todo in the tes...
import pytest # TODO: Go back to this test once the ticket has being answered @pytest.mark.skip( reason="Broken in 5.0. https://github.com/RocketChat/Rocket.Chat/issues/26520" ) def test_update_jitsi_timeout(logged_rocket): update_jitsi_timeout = logged_rocket.update_jitsi_timeout(room_id="GENERAL").json() ...
<commit_before>import pytest @pytest.mark.skip( reason="Broken in 5.0. https://github.com/RocketChat/Rocket.Chat/issues/26520" ) def test_update_jitsi_timeout(logged_rocket): update_jitsi_timeout = logged_rocket.update_jitsi_timeout(room_id="GENERAL").json() assert update_jitsi_timeout.get("success") <com...
import pytest # TODO: Go back to this test once the ticket has being answered @pytest.mark.skip( reason="Broken in 5.0. https://github.com/RocketChat/Rocket.Chat/issues/26520" ) def test_update_jitsi_timeout(logged_rocket): update_jitsi_timeout = logged_rocket.update_jitsi_timeout(room_id="GENERAL").json() ...
import pytest @pytest.mark.skip( reason="Broken in 5.0. https://github.com/RocketChat/Rocket.Chat/issues/26520" ) def test_update_jitsi_timeout(logged_rocket): update_jitsi_timeout = logged_rocket.update_jitsi_timeout(room_id="GENERAL").json() assert update_jitsi_timeout.get("success") Add todo in the tes...
<commit_before>import pytest @pytest.mark.skip( reason="Broken in 5.0. https://github.com/RocketChat/Rocket.Chat/issues/26520" ) def test_update_jitsi_timeout(logged_rocket): update_jitsi_timeout = logged_rocket.update_jitsi_timeout(room_id="GENERAL").json() assert update_jitsi_timeout.get("success") <com...
bc70937c953bae8d25478a71652a57c27f0940f2
blanc_basic_events/events/listeners.py
blanc_basic_events/events/listeners.py
from django.db.models.signals import post_save, post_delete from .models import RecurringEvent, RecurringEventExclusion def update_event(sender, instance, raw=False, **kwargs): if not raw: instance.event.save() post_save.connect(update_event, sender=RecurringEvent) post_save.connect(update_event, sender...
from django.db.models.signals import post_save, post_delete from .models import Event, RecurringEvent, RecurringEventExclusion def update_event(sender, instance, raw=False, **kwargs): if not raw: try: instance.event.save() except Event.DoesNotExist: pass post_save.connect...
Fix for when the event gets deleted before the recurring event or recurring event exclusion
Fix for when the event gets deleted before the recurring event or recurring event exclusion
Python
bsd-3-clause
blancltd/blanc-basic-events
from django.db.models.signals import post_save, post_delete from .models import RecurringEvent, RecurringEventExclusion def update_event(sender, instance, raw=False, **kwargs): if not raw: instance.event.save() post_save.connect(update_event, sender=RecurringEvent) post_save.connect(update_event, sender...
from django.db.models.signals import post_save, post_delete from .models import Event, RecurringEvent, RecurringEventExclusion def update_event(sender, instance, raw=False, **kwargs): if not raw: try: instance.event.save() except Event.DoesNotExist: pass post_save.connect...
<commit_before>from django.db.models.signals import post_save, post_delete from .models import RecurringEvent, RecurringEventExclusion def update_event(sender, instance, raw=False, **kwargs): if not raw: instance.event.save() post_save.connect(update_event, sender=RecurringEvent) post_save.connect(updat...
from django.db.models.signals import post_save, post_delete from .models import Event, RecurringEvent, RecurringEventExclusion def update_event(sender, instance, raw=False, **kwargs): if not raw: try: instance.event.save() except Event.DoesNotExist: pass post_save.connect...
from django.db.models.signals import post_save, post_delete from .models import RecurringEvent, RecurringEventExclusion def update_event(sender, instance, raw=False, **kwargs): if not raw: instance.event.save() post_save.connect(update_event, sender=RecurringEvent) post_save.connect(update_event, sender...
<commit_before>from django.db.models.signals import post_save, post_delete from .models import RecurringEvent, RecurringEventExclusion def update_event(sender, instance, raw=False, **kwargs): if not raw: instance.event.save() post_save.connect(update_event, sender=RecurringEvent) post_save.connect(updat...
147d545b7118d7d8974cfe2ee95648d62fc0d1e9
microcms/admin.py
microcms/admin.py
# -*- coding: utf-8 -*- from django.contrib import admin from django.contrib.flatpages.models import FlatPage from django.contrib.flatpages.admin import FlatPageAdmin as StockFlatPageAdmin from django.contrib.sites.models import Site from microcms.conf import settings from microcms.models import Meta class MetaAdmin(...
# -*- coding: utf-8 -*- from django.contrib import admin from django.contrib.flatpages.models import FlatPage from django.contrib.flatpages.admin import FlatPageAdmin as StockFlatPageAdmin from django.contrib.sites.models import Site from django.utils.translation import ugettext_lazy as _ from microcms.conf import set...
Insert automatically flatpage default site
Insert automatically flatpage default site
Python
bsd-3-clause
eriol/django-microcms,eriol/django-microcms
# -*- coding: utf-8 -*- from django.contrib import admin from django.contrib.flatpages.models import FlatPage from django.contrib.flatpages.admin import FlatPageAdmin as StockFlatPageAdmin from django.contrib.sites.models import Site from microcms.conf import settings from microcms.models import Meta class MetaAdmin(...
# -*- coding: utf-8 -*- from django.contrib import admin from django.contrib.flatpages.models import FlatPage from django.contrib.flatpages.admin import FlatPageAdmin as StockFlatPageAdmin from django.contrib.sites.models import Site from django.utils.translation import ugettext_lazy as _ from microcms.conf import set...
<commit_before># -*- coding: utf-8 -*- from django.contrib import admin from django.contrib.flatpages.models import FlatPage from django.contrib.flatpages.admin import FlatPageAdmin as StockFlatPageAdmin from django.contrib.sites.models import Site from microcms.conf import settings from microcms.models import Meta c...
# -*- coding: utf-8 -*- from django.contrib import admin from django.contrib.flatpages.models import FlatPage from django.contrib.flatpages.admin import FlatPageAdmin as StockFlatPageAdmin from django.contrib.sites.models import Site from django.utils.translation import ugettext_lazy as _ from microcms.conf import set...
# -*- coding: utf-8 -*- from django.contrib import admin from django.contrib.flatpages.models import FlatPage from django.contrib.flatpages.admin import FlatPageAdmin as StockFlatPageAdmin from django.contrib.sites.models import Site from microcms.conf import settings from microcms.models import Meta class MetaAdmin(...
<commit_before># -*- coding: utf-8 -*- from django.contrib import admin from django.contrib.flatpages.models import FlatPage from django.contrib.flatpages.admin import FlatPageAdmin as StockFlatPageAdmin from django.contrib.sites.models import Site from microcms.conf import settings from microcms.models import Meta c...
60de17292159deb590de6e5c9c2a45f1b95b0094
girder/app/app/__init__.py
girder/app/app/__init__.py
from .configuration import Configuration from girder.utility import setting_utilities from .constants import Features, Branding, Deployment from .launch_taskflow import launch_taskflow from .user import get_orcid, set_orcid, get_twitter, set_twitter from girder.plugin import GirderPlugin @setting_utilities.validator...
from .configuration import Configuration from girder.api.rest import Resource from girder.utility import setting_utilities from .constants import Features, Branding, Deployment from .launch_taskflow import launch_taskflow from .user import get_orcid, set_orcid, get_twitter, set_twitter from girder.plugin import Girde...
Put the endpoint at /launch_taskflow/launch
Put the endpoint at /launch_taskflow/launch Put it here instead of under "queues" Signed-off-by: Patrick Avery <743342299f279e7a8c3ff5eb40671fce3e95f13a@kitware.com>
Python
bsd-3-clause
OpenChemistry/mongochemserver
from .configuration import Configuration from girder.utility import setting_utilities from .constants import Features, Branding, Deployment from .launch_taskflow import launch_taskflow from .user import get_orcid, set_orcid, get_twitter, set_twitter from girder.plugin import GirderPlugin @setting_utilities.validator...
from .configuration import Configuration from girder.api.rest import Resource from girder.utility import setting_utilities from .constants import Features, Branding, Deployment from .launch_taskflow import launch_taskflow from .user import get_orcid, set_orcid, get_twitter, set_twitter from girder.plugin import Girde...
<commit_before>from .configuration import Configuration from girder.utility import setting_utilities from .constants import Features, Branding, Deployment from .launch_taskflow import launch_taskflow from .user import get_orcid, set_orcid, get_twitter, set_twitter from girder.plugin import GirderPlugin @setting_util...
from .configuration import Configuration from girder.api.rest import Resource from girder.utility import setting_utilities from .constants import Features, Branding, Deployment from .launch_taskflow import launch_taskflow from .user import get_orcid, set_orcid, get_twitter, set_twitter from girder.plugin import Girde...
from .configuration import Configuration from girder.utility import setting_utilities from .constants import Features, Branding, Deployment from .launch_taskflow import launch_taskflow from .user import get_orcid, set_orcid, get_twitter, set_twitter from girder.plugin import GirderPlugin @setting_utilities.validator...
<commit_before>from .configuration import Configuration from girder.utility import setting_utilities from .constants import Features, Branding, Deployment from .launch_taskflow import launch_taskflow from .user import get_orcid, set_orcid, get_twitter, set_twitter from girder.plugin import GirderPlugin @setting_util...
61d20995b7bc291796299055751099204180bf28
UM/Operations/AddSceneNodeOperation.py
UM/Operations/AddSceneNodeOperation.py
# Copyright (c) 2015 Ultimaker B.V. # Uranium is released under the terms of the AGPLv3 or higher. from . import Operation from UM.Scene.SceneNode import SceneNode class AddSceneNodeOperation(Operation.Operation): def __init__(self, node, parent): super().__init__() self._node = node self...
# Copyright (c) 2015 Ultimaker B.V. # Uranium is released under the terms of the AGPLv3 or higher. from . import Operation from UM.Scene.Selection import Selection from UM.Scene.SceneNode import SceneNode class AddSceneNodeOperation(Operation.Operation): def __init__(self, node, parent): super().__init__...
Undo & redo of add SceneNode now correctly set the previous selection state.
Undo & redo of add SceneNode now correctly set the previous selection state. CURA-640
Python
agpl-3.0
onitake/Uranium,onitake/Uranium
# Copyright (c) 2015 Ultimaker B.V. # Uranium is released under the terms of the AGPLv3 or higher. from . import Operation from UM.Scene.SceneNode import SceneNode class AddSceneNodeOperation(Operation.Operation): def __init__(self, node, parent): super().__init__() self._node = node self...
# Copyright (c) 2015 Ultimaker B.V. # Uranium is released under the terms of the AGPLv3 or higher. from . import Operation from UM.Scene.Selection import Selection from UM.Scene.SceneNode import SceneNode class AddSceneNodeOperation(Operation.Operation): def __init__(self, node, parent): super().__init__...
<commit_before># Copyright (c) 2015 Ultimaker B.V. # Uranium is released under the terms of the AGPLv3 or higher. from . import Operation from UM.Scene.SceneNode import SceneNode class AddSceneNodeOperation(Operation.Operation): def __init__(self, node, parent): super().__init__() self._node = no...
# Copyright (c) 2015 Ultimaker B.V. # Uranium is released under the terms of the AGPLv3 or higher. from . import Operation from UM.Scene.Selection import Selection from UM.Scene.SceneNode import SceneNode class AddSceneNodeOperation(Operation.Operation): def __init__(self, node, parent): super().__init__...
# Copyright (c) 2015 Ultimaker B.V. # Uranium is released under the terms of the AGPLv3 or higher. from . import Operation from UM.Scene.SceneNode import SceneNode class AddSceneNodeOperation(Operation.Operation): def __init__(self, node, parent): super().__init__() self._node = node self...
<commit_before># Copyright (c) 2015 Ultimaker B.V. # Uranium is released under the terms of the AGPLv3 or higher. from . import Operation from UM.Scene.SceneNode import SceneNode class AddSceneNodeOperation(Operation.Operation): def __init__(self, node, parent): super().__init__() self._node = no...
59789bae7df5de6d7568a1b372b95a891fd5c3a2
confluent_server/confluent/userutil.py
confluent_server/confluent/userutil.py
from ctypes import * from ctypes.util import find_library import grp import pwd import os libc = cdll.LoadLibrary(find_library('libc')) _getgrouplist = libc.getgrouplist _getgrouplist.restype = c_int32 class TooSmallException(Exception): def __init__(self, count): self.count = count super(TooSmall...
from ctypes import * from ctypes.util import find_library import grp import pwd import os libc = cdll.LoadLibrary(find_library('libc')) _getgrouplist = libc.getgrouplist _getgrouplist.restype = c_int32 class TooSmallException(Exception): def __init__(self, count): self.count = count super(TooSmall...
Fix python3 ctypes str usage
Fix python3 ctypes str usage In python3, the string is likely to be unicode and incompatible with the libc function. If it isn't bytes, force it to be bytes.
Python
apache-2.0
xcat2/confluent,xcat2/confluent,jjohnson42/confluent,xcat2/confluent,jjohnson42/confluent,jjohnson42/confluent,xcat2/confluent,xcat2/confluent,jjohnson42/confluent,jjohnson42/confluent
from ctypes import * from ctypes.util import find_library import grp import pwd import os libc = cdll.LoadLibrary(find_library('libc')) _getgrouplist = libc.getgrouplist _getgrouplist.restype = c_int32 class TooSmallException(Exception): def __init__(self, count): self.count = count super(TooSmall...
from ctypes import * from ctypes.util import find_library import grp import pwd import os libc = cdll.LoadLibrary(find_library('libc')) _getgrouplist = libc.getgrouplist _getgrouplist.restype = c_int32 class TooSmallException(Exception): def __init__(self, count): self.count = count super(TooSmall...
<commit_before>from ctypes import * from ctypes.util import find_library import grp import pwd import os libc = cdll.LoadLibrary(find_library('libc')) _getgrouplist = libc.getgrouplist _getgrouplist.restype = c_int32 class TooSmallException(Exception): def __init__(self, count): self.count = count ...
from ctypes import * from ctypes.util import find_library import grp import pwd import os libc = cdll.LoadLibrary(find_library('libc')) _getgrouplist = libc.getgrouplist _getgrouplist.restype = c_int32 class TooSmallException(Exception): def __init__(self, count): self.count = count super(TooSmall...
from ctypes import * from ctypes.util import find_library import grp import pwd import os libc = cdll.LoadLibrary(find_library('libc')) _getgrouplist = libc.getgrouplist _getgrouplist.restype = c_int32 class TooSmallException(Exception): def __init__(self, count): self.count = count super(TooSmall...
<commit_before>from ctypes import * from ctypes.util import find_library import grp import pwd import os libc = cdll.LoadLibrary(find_library('libc')) _getgrouplist = libc.getgrouplist _getgrouplist.restype = c_int32 class TooSmallException(Exception): def __init__(self, count): self.count = count ...
d12be22b5427a1433dd2ff7b1d2f97951d2b9c0f
pycon/migrations/0002_remove_old_google_openid_auths.py
pycon/migrations/0002_remove_old_google_openid_auths.py
# -*- coding: utf-8 -*- from __future__ import unicode_literals """ Google OpenID auth has been turned off, so any associations that users had to their Google accounts via Google OpenID are now useless. Just remove them. """ from django.db import migrations def no_op(apps, schema_editor): pass def remove_old_...
# -*- coding: utf-8 -*- from __future__ import unicode_literals """ Google OpenID auth has been turned off, so any associations that users had to their Google accounts via Google OpenID are now useless. Just remove them. """ from django.db import migrations def no_op(apps, schema_editor): pass def remove_old_...
Undo premature fix for dependency
Undo premature fix for dependency
Python
bsd-3-clause
Diwahars/pycon,PyCon/pycon,njl/pycon,njl/pycon,njl/pycon,PyCon/pycon,Diwahars/pycon,Diwahars/pycon,PyCon/pycon,PyCon/pycon,Diwahars/pycon,njl/pycon
# -*- coding: utf-8 -*- from __future__ import unicode_literals """ Google OpenID auth has been turned off, so any associations that users had to their Google accounts via Google OpenID are now useless. Just remove them. """ from django.db import migrations def no_op(apps, schema_editor): pass def remove_old_...
# -*- coding: utf-8 -*- from __future__ import unicode_literals """ Google OpenID auth has been turned off, so any associations that users had to their Google accounts via Google OpenID are now useless. Just remove them. """ from django.db import migrations def no_op(apps, schema_editor): pass def remove_old_...
<commit_before># -*- coding: utf-8 -*- from __future__ import unicode_literals """ Google OpenID auth has been turned off, so any associations that users had to their Google accounts via Google OpenID are now useless. Just remove them. """ from django.db import migrations def no_op(apps, schema_editor): pass ...
# -*- coding: utf-8 -*- from __future__ import unicode_literals """ Google OpenID auth has been turned off, so any associations that users had to their Google accounts via Google OpenID are now useless. Just remove them. """ from django.db import migrations def no_op(apps, schema_editor): pass def remove_old_...
# -*- coding: utf-8 -*- from __future__ import unicode_literals """ Google OpenID auth has been turned off, so any associations that users had to their Google accounts via Google OpenID are now useless. Just remove them. """ from django.db import migrations def no_op(apps, schema_editor): pass def remove_old_...
<commit_before># -*- coding: utf-8 -*- from __future__ import unicode_literals """ Google OpenID auth has been turned off, so any associations that users had to their Google accounts via Google OpenID are now useless. Just remove them. """ from django.db import migrations def no_op(apps, schema_editor): pass ...
7a5d5f8c495870222955dbf24f9680903f9e90b4
recommends/management/commands/recommends_precompute.py
recommends/management/commands/recommends_precompute.py
from django.core.management.base import BaseCommand from recommends.tasks import recommends_precompute from datetime import datetime import dateutil.relativedelta from optparse import make_option import warnings class Command(BaseCommand): help = 'Calculate recommendations and similarities based on ratings' ...
from django.core.management.base import BaseCommand from recommends.tasks import recommends_precompute from datetime import datetime import dateutil.relativedelta import warnings class Command(BaseCommand): help = 'Calculate recommendations and similarities based on ratings' def add_arguments(self, parser)...
Change deprecated options_list to add_arguments
Change deprecated options_list to add_arguments
Python
mit
fcurella/django-recommends,fcurella/django-recommends
from django.core.management.base import BaseCommand from recommends.tasks import recommends_precompute from datetime import datetime import dateutil.relativedelta from optparse import make_option import warnings class Command(BaseCommand): help = 'Calculate recommendations and similarities based on ratings' ...
from django.core.management.base import BaseCommand from recommends.tasks import recommends_precompute from datetime import datetime import dateutil.relativedelta import warnings class Command(BaseCommand): help = 'Calculate recommendations and similarities based on ratings' def add_arguments(self, parser)...
<commit_before>from django.core.management.base import BaseCommand from recommends.tasks import recommends_precompute from datetime import datetime import dateutil.relativedelta from optparse import make_option import warnings class Command(BaseCommand): help = 'Calculate recommendations and similarities based ...
from django.core.management.base import BaseCommand from recommends.tasks import recommends_precompute from datetime import datetime import dateutil.relativedelta import warnings class Command(BaseCommand): help = 'Calculate recommendations and similarities based on ratings' def add_arguments(self, parser)...
from django.core.management.base import BaseCommand from recommends.tasks import recommends_precompute from datetime import datetime import dateutil.relativedelta from optparse import make_option import warnings class Command(BaseCommand): help = 'Calculate recommendations and similarities based on ratings' ...
<commit_before>from django.core.management.base import BaseCommand from recommends.tasks import recommends_precompute from datetime import datetime import dateutil.relativedelta from optparse import make_option import warnings class Command(BaseCommand): help = 'Calculate recommendations and similarities based ...
69167ea402872e49a6c6dcb3d384af2912fd13d1
anyway/parsers/news_flash/scrap_flash_news.py
anyway/parsers/news_flash/scrap_flash_news.py
import os import sys from .new_news_check import is_new_flash_news from .news_flash_crawl import news_flash_crawl from ..mda_twitter.mda_twitter import mda_twitter # from sys import exit # import time def scrap_flash_news(site_name, maps_key): """ init scraping for a site :param site_name: name of the sit...
import os import sys from .new_news_check import is_new_flash_news from .news_flash_crawl import news_flash_crawl from ..mda_twitter.mda_twitter import mda_twitter # from sys import exit # import time def scrap_flash_news(site_name, maps_key): """ init scraping for a site :param site_name: name of the sit...
Revert "temp stop twitter scraping"
Revert "temp stop twitter scraping" This reverts commit 21db824f3b2a544fa38547bb1fd6c6271f861354.
Python
mit
hasadna/anyway,hasadna/anyway,hasadna/anyway,hasadna/anyway
import os import sys from .new_news_check import is_new_flash_news from .news_flash_crawl import news_flash_crawl from ..mda_twitter.mda_twitter import mda_twitter # from sys import exit # import time def scrap_flash_news(site_name, maps_key): """ init scraping for a site :param site_name: name of the sit...
import os import sys from .new_news_check import is_new_flash_news from .news_flash_crawl import news_flash_crawl from ..mda_twitter.mda_twitter import mda_twitter # from sys import exit # import time def scrap_flash_news(site_name, maps_key): """ init scraping for a site :param site_name: name of the sit...
<commit_before>import os import sys from .new_news_check import is_new_flash_news from .news_flash_crawl import news_flash_crawl from ..mda_twitter.mda_twitter import mda_twitter # from sys import exit # import time def scrap_flash_news(site_name, maps_key): """ init scraping for a site :param site_name: ...
import os import sys from .new_news_check import is_new_flash_news from .news_flash_crawl import news_flash_crawl from ..mda_twitter.mda_twitter import mda_twitter # from sys import exit # import time def scrap_flash_news(site_name, maps_key): """ init scraping for a site :param site_name: name of the sit...
import os import sys from .new_news_check import is_new_flash_news from .news_flash_crawl import news_flash_crawl from ..mda_twitter.mda_twitter import mda_twitter # from sys import exit # import time def scrap_flash_news(site_name, maps_key): """ init scraping for a site :param site_name: name of the sit...
<commit_before>import os import sys from .new_news_check import is_new_flash_news from .news_flash_crawl import news_flash_crawl from ..mda_twitter.mda_twitter import mda_twitter # from sys import exit # import time def scrap_flash_news(site_name, maps_key): """ init scraping for a site :param site_name: ...
d426351e86ab52f0c77f9a2b97d5bcdb35ee719f
tests/dojo_test.py
tests/dojo_test.py
import unittest from src.dojo import Dojo class TestCreateRoom (unittest.TestCase): def test_create_room_successfully(self): my_class_instance = Dojo() initial_room_count = len(my_class_instance.all_rooms) blue_office = my_class_instance.create_room("Blue", "office") self.assertTru...
import unittest from src.dojo import Dojo class TestCreateRoom (unittest.TestCase): def test_create_room_successfully(self): my_class_instance = Dojo() initial_room_count = len(my_class_instance.all_rooms) blue_office = my_class_instance.create_room("office", "Blue") self.assertTru...
Add test for creation of multiple rooms
Add test for creation of multiple rooms
Python
mit
EdwinKato/Space-Allocator,EdwinKato/Space-Allocator
import unittest from src.dojo import Dojo class TestCreateRoom (unittest.TestCase): def test_create_room_successfully(self): my_class_instance = Dojo() initial_room_count = len(my_class_instance.all_rooms) blue_office = my_class_instance.create_room("Blue", "office") self.assertTru...
import unittest from src.dojo import Dojo class TestCreateRoom (unittest.TestCase): def test_create_room_successfully(self): my_class_instance = Dojo() initial_room_count = len(my_class_instance.all_rooms) blue_office = my_class_instance.create_room("office", "Blue") self.assertTru...
<commit_before>import unittest from src.dojo import Dojo class TestCreateRoom (unittest.TestCase): def test_create_room_successfully(self): my_class_instance = Dojo() initial_room_count = len(my_class_instance.all_rooms) blue_office = my_class_instance.create_room("Blue", "office") ...
import unittest from src.dojo import Dojo class TestCreateRoom (unittest.TestCase): def test_create_room_successfully(self): my_class_instance = Dojo() initial_room_count = len(my_class_instance.all_rooms) blue_office = my_class_instance.create_room("office", "Blue") self.assertTru...
import unittest from src.dojo import Dojo class TestCreateRoom (unittest.TestCase): def test_create_room_successfully(self): my_class_instance = Dojo() initial_room_count = len(my_class_instance.all_rooms) blue_office = my_class_instance.create_room("Blue", "office") self.assertTru...
<commit_before>import unittest from src.dojo import Dojo class TestCreateRoom (unittest.TestCase): def test_create_room_successfully(self): my_class_instance = Dojo() initial_room_count = len(my_class_instance.all_rooms) blue_office = my_class_instance.create_room("Blue", "office") ...
da74f8963ffbe80c2ae3c99e3b17bc30ea2e6728
user_management/utils/sentry.py
user_management/utils/sentry.py
from django.views.debug import SafeExceptionReporterFilter from raven.contrib.django.client import DjangoClient class SensitiveDjangoClient(DjangoClient): """ Hide sensitive request data from being logged by Sentry. Borrowed from http://stackoverflow.com/a/23966581/240995 """ def get_data_from_re...
from django.views.debug import SafeExceptionReporterFilter from raven.contrib.django.client import DjangoClient class SensitiveDjangoClient(DjangoClient): """ Hide sensitive request data from being logged by Sentry. Borrowed from http://stackoverflow.com/a/23966581/240995 """ def get_data_from_re...
Fix call to super for py2.7
Fix call to super for py2.7
Python
bsd-2-clause
incuna/django-user-management,incuna/django-user-management
from django.views.debug import SafeExceptionReporterFilter from raven.contrib.django.client import DjangoClient class SensitiveDjangoClient(DjangoClient): """ Hide sensitive request data from being logged by Sentry. Borrowed from http://stackoverflow.com/a/23966581/240995 """ def get_data_from_re...
from django.views.debug import SafeExceptionReporterFilter from raven.contrib.django.client import DjangoClient class SensitiveDjangoClient(DjangoClient): """ Hide sensitive request data from being logged by Sentry. Borrowed from http://stackoverflow.com/a/23966581/240995 """ def get_data_from_re...
<commit_before>from django.views.debug import SafeExceptionReporterFilter from raven.contrib.django.client import DjangoClient class SensitiveDjangoClient(DjangoClient): """ Hide sensitive request data from being logged by Sentry. Borrowed from http://stackoverflow.com/a/23966581/240995 """ def g...
from django.views.debug import SafeExceptionReporterFilter from raven.contrib.django.client import DjangoClient class SensitiveDjangoClient(DjangoClient): """ Hide sensitive request data from being logged by Sentry. Borrowed from http://stackoverflow.com/a/23966581/240995 """ def get_data_from_re...
from django.views.debug import SafeExceptionReporterFilter from raven.contrib.django.client import DjangoClient class SensitiveDjangoClient(DjangoClient): """ Hide sensitive request data from being logged by Sentry. Borrowed from http://stackoverflow.com/a/23966581/240995 """ def get_data_from_re...
<commit_before>from django.views.debug import SafeExceptionReporterFilter from raven.contrib.django.client import DjangoClient class SensitiveDjangoClient(DjangoClient): """ Hide sensitive request data from being logged by Sentry. Borrowed from http://stackoverflow.com/a/23966581/240995 """ def g...
a4d538d84fdfd8e20b58ada8a4435ed48ed64ab8
spreadflow_delta/test/matchers.py
spreadflow_delta/test/matchers.py
from __future__ import absolute_import from __future__ import division from __future__ import unicode_literals from testtools import matchers from spreadflow_core.test.matchers import MatchesInvocation class MatchesDeltaItem(matchers.MatchesDict): def __init__(self, item): spec = { 'data': mat...
from __future__ import absolute_import from __future__ import division from __future__ import unicode_literals from testtools import matchers from spreadflow_core.test.matchers import MatchesInvocation class MatchesDeltaItem(matchers.MatchesDict): def __init__(self, item): spec = { 'data': mat...
Use equal matcher for remaining keys
Use equal matcher for remaining keys
Python
mit
znerol/spreadflow-delta
from __future__ import absolute_import from __future__ import division from __future__ import unicode_literals from testtools import matchers from spreadflow_core.test.matchers import MatchesInvocation class MatchesDeltaItem(matchers.MatchesDict): def __init__(self, item): spec = { 'data': mat...
from __future__ import absolute_import from __future__ import division from __future__ import unicode_literals from testtools import matchers from spreadflow_core.test.matchers import MatchesInvocation class MatchesDeltaItem(matchers.MatchesDict): def __init__(self, item): spec = { 'data': mat...
<commit_before>from __future__ import absolute_import from __future__ import division from __future__ import unicode_literals from testtools import matchers from spreadflow_core.test.matchers import MatchesInvocation class MatchesDeltaItem(matchers.MatchesDict): def __init__(self, item): spec = { ...
from __future__ import absolute_import from __future__ import division from __future__ import unicode_literals from testtools import matchers from spreadflow_core.test.matchers import MatchesInvocation class MatchesDeltaItem(matchers.MatchesDict): def __init__(self, item): spec = { 'data': mat...
from __future__ import absolute_import from __future__ import division from __future__ import unicode_literals from testtools import matchers from spreadflow_core.test.matchers import MatchesInvocation class MatchesDeltaItem(matchers.MatchesDict): def __init__(self, item): spec = { 'data': mat...
<commit_before>from __future__ import absolute_import from __future__ import division from __future__ import unicode_literals from testtools import matchers from spreadflow_core.test.matchers import MatchesInvocation class MatchesDeltaItem(matchers.MatchesDict): def __init__(self, item): spec = { ...
22e1bc81b7aa456c8211f3fc83c1fd4fc69f514b
web_scraper/core/prettifiers.py
web_scraper/core/prettifiers.py
import os import sys sys.path.insert(0, os.path.dirname(os.path.dirname(os.path.abspath(__file__)))) import re def simple_prettifier(scraped_data): """Return more presentable data (in a list) provided by scrape_target_elements() :param bs4.element.ResultSet scraped_data: all of the data scraped by scrape_ta...
import os import sys sys.path.insert(0, os.path.dirname(os.path.dirname(os.path.abspath(__file__)))) import re def remove_html_tags(scraped_data): """Return more presentable data (in a list) provided by scrape_target_elements() :param bs4.element.ResultSet scraped_data: all of the data scraped by scrape_tar...
Change function name to be more accurate
Change function name to be more accurate
Python
mit
Samuel-L/cli-ws,Samuel-L/cli-ws
import os import sys sys.path.insert(0, os.path.dirname(os.path.dirname(os.path.abspath(__file__)))) import re def simple_prettifier(scraped_data): """Return more presentable data (in a list) provided by scrape_target_elements() :param bs4.element.ResultSet scraped_data: all of the data scraped by scrape_ta...
import os import sys sys.path.insert(0, os.path.dirname(os.path.dirname(os.path.abspath(__file__)))) import re def remove_html_tags(scraped_data): """Return more presentable data (in a list) provided by scrape_target_elements() :param bs4.element.ResultSet scraped_data: all of the data scraped by scrape_tar...
<commit_before>import os import sys sys.path.insert(0, os.path.dirname(os.path.dirname(os.path.abspath(__file__)))) import re def simple_prettifier(scraped_data): """Return more presentable data (in a list) provided by scrape_target_elements() :param bs4.element.ResultSet scraped_data: all of the data scrap...
import os import sys sys.path.insert(0, os.path.dirname(os.path.dirname(os.path.abspath(__file__)))) import re def remove_html_tags(scraped_data): """Return more presentable data (in a list) provided by scrape_target_elements() :param bs4.element.ResultSet scraped_data: all of the data scraped by scrape_tar...
import os import sys sys.path.insert(0, os.path.dirname(os.path.dirname(os.path.abspath(__file__)))) import re def simple_prettifier(scraped_data): """Return more presentable data (in a list) provided by scrape_target_elements() :param bs4.element.ResultSet scraped_data: all of the data scraped by scrape_ta...
<commit_before>import os import sys sys.path.insert(0, os.path.dirname(os.path.dirname(os.path.abspath(__file__)))) import re def simple_prettifier(scraped_data): """Return more presentable data (in a list) provided by scrape_target_elements() :param bs4.element.ResultSet scraped_data: all of the data scrap...
a268f6c74806d5996d469dd84ab365b0cf830f96
OpenSSL/_util.py
OpenSSL/_util.py
from six import PY3, binary_type, text_type from cryptography.hazmat.bindings.openssl.binding import Binding binding = Binding() ffi = binding.ffi lib = binding.lib def exception_from_error_queue(exceptionType): def text(charp): return native(ffi.string(charp)) errors = [] while True: err...
from six import PY3, binary_type, text_type from cryptography.hazmat.bindings.openssl.binding import Binding binding = Binding() ffi = binding.ffi lib = binding.lib def exception_from_error_queue(exceptionType): def text(charp): if not charp: return "" return native(ffi.string(charp)) ...
Handle when an OpenSSL error doesn't contain a reason
Handle when an OpenSSL error doesn't contain a reason (Or any other field) You can reproduce the error by running: ``` treq.get('https://nile.ghdonline.org') ``` from within a twisted program (and doing the approrpiate deferred stuff). I'm unsure how to craft a unit test for this
Python
apache-2.0
mschmo/pyopenssl,daodaoliang/pyopenssl,mhils/pyopenssl,mhils/pyopenssl,pyca/pyopenssl,sorenh/pyopenssl,adamwolf/pyopenssl,reaperhulk/pyopenssl,aalba6675/pyopenssl,mitghi/pyopenssl,samv/pyopenssl,elitest/pyopenssl,r0ro/pyopenssl,r0ro/pyopenssl,reaperhulk/pyopenssl,kjav/pyopenssl,mitghi/pyopenssl,aalba6675/pyopenssl,hyne...
from six import PY3, binary_type, text_type from cryptography.hazmat.bindings.openssl.binding import Binding binding = Binding() ffi = binding.ffi lib = binding.lib def exception_from_error_queue(exceptionType): def text(charp): return native(ffi.string(charp)) errors = [] while True: err...
from six import PY3, binary_type, text_type from cryptography.hazmat.bindings.openssl.binding import Binding binding = Binding() ffi = binding.ffi lib = binding.lib def exception_from_error_queue(exceptionType): def text(charp): if not charp: return "" return native(ffi.string(charp)) ...
<commit_before>from six import PY3, binary_type, text_type from cryptography.hazmat.bindings.openssl.binding import Binding binding = Binding() ffi = binding.ffi lib = binding.lib def exception_from_error_queue(exceptionType): def text(charp): return native(ffi.string(charp)) errors = [] while Tr...
from six import PY3, binary_type, text_type from cryptography.hazmat.bindings.openssl.binding import Binding binding = Binding() ffi = binding.ffi lib = binding.lib def exception_from_error_queue(exceptionType): def text(charp): if not charp: return "" return native(ffi.string(charp)) ...
from six import PY3, binary_type, text_type from cryptography.hazmat.bindings.openssl.binding import Binding binding = Binding() ffi = binding.ffi lib = binding.lib def exception_from_error_queue(exceptionType): def text(charp): return native(ffi.string(charp)) errors = [] while True: err...
<commit_before>from six import PY3, binary_type, text_type from cryptography.hazmat.bindings.openssl.binding import Binding binding = Binding() ffi = binding.ffi lib = binding.lib def exception_from_error_queue(exceptionType): def text(charp): return native(ffi.string(charp)) errors = [] while Tr...
49adcb1053022ec0ee3c3e5591161969f33245b8
collectionkit/contrib/work_creator/admin_utils.py
collectionkit/contrib/work_creator/admin_utils.py
from django.core.urlresolvers import reverse from generic.admin.mixins import ThumbnailAdminMixin import settings def admin_link(obj): return "<a href='%s'>%s</a>" % (admin_url(obj), obj) def admin_url(obj): return reverse( 'admin:%s_%s_change' % (obj._meta.app_label, obj._meta.module_name), ...
from django.core.urlresolvers import reverse from generic.admin.mixins import ThumbnailAdminMixin import settings def admin_link(obj): return "<a href='%s'>%s</a>" % (admin_url(obj), obj) def admin_url(obj): return reverse( 'admin:%s_%s_change' % (obj._meta.app_label, obj._meta.model_name), a...
Update to 1.8 way of getting model name.
Update to 1.8 way of getting model name.
Python
mit
ic-labs/django-icekit,ic-labs/django-icekit,ic-labs/django-icekit,ic-labs/django-icekit,ic-labs/glamkit-collections,ic-labs/glamkit-collections
from django.core.urlresolvers import reverse from generic.admin.mixins import ThumbnailAdminMixin import settings def admin_link(obj): return "<a href='%s'>%s</a>" % (admin_url(obj), obj) def admin_url(obj): return reverse( 'admin:%s_%s_change' % (obj._meta.app_label, obj._meta.module_name), ...
from django.core.urlresolvers import reverse from generic.admin.mixins import ThumbnailAdminMixin import settings def admin_link(obj): return "<a href='%s'>%s</a>" % (admin_url(obj), obj) def admin_url(obj): return reverse( 'admin:%s_%s_change' % (obj._meta.app_label, obj._meta.model_name), a...
<commit_before>from django.core.urlresolvers import reverse from generic.admin.mixins import ThumbnailAdminMixin import settings def admin_link(obj): return "<a href='%s'>%s</a>" % (admin_url(obj), obj) def admin_url(obj): return reverse( 'admin:%s_%s_change' % (obj._meta.app_label, obj._meta.module_...
from django.core.urlresolvers import reverse from generic.admin.mixins import ThumbnailAdminMixin import settings def admin_link(obj): return "<a href='%s'>%s</a>" % (admin_url(obj), obj) def admin_url(obj): return reverse( 'admin:%s_%s_change' % (obj._meta.app_label, obj._meta.model_name), a...
from django.core.urlresolvers import reverse from generic.admin.mixins import ThumbnailAdminMixin import settings def admin_link(obj): return "<a href='%s'>%s</a>" % (admin_url(obj), obj) def admin_url(obj): return reverse( 'admin:%s_%s_change' % (obj._meta.app_label, obj._meta.module_name), ...
<commit_before>from django.core.urlresolvers import reverse from generic.admin.mixins import ThumbnailAdminMixin import settings def admin_link(obj): return "<a href='%s'>%s</a>" % (admin_url(obj), obj) def admin_url(obj): return reverse( 'admin:%s_%s_change' % (obj._meta.app_label, obj._meta.module_...
9f7b105b0ff84123df72cf3d14577eb82e15f699
community_mailbot/scripts/discourse_categories.py
community_mailbot/scripts/discourse_categories.py
# encoding: utf-8 """ List categories and their IDs in a Discourse forum. """ import os from argparse import ArgumentParser from urllib.parse import urljoin import requests def main(): args = parse_args() params = {} if args.key is not None: params['api_key'] = args.key if args.user is not N...
# encoding: utf-8 """ List categories and their IDs in a Discourse forum. """ import os from argparse import ArgumentParser from community_mailbot.discourse import SiteFeed def main(): args = parse_args() site_feed = SiteFeed(args.url, user=args.user, key=args.key) for c_id, name in site_feed.category_n...
Use SiteFeed to get a category listing
Use SiteFeed to get a category listing
Python
mit
lsst-sqre/community_mailbot
# encoding: utf-8 """ List categories and their IDs in a Discourse forum. """ import os from argparse import ArgumentParser from urllib.parse import urljoin import requests def main(): args = parse_args() params = {} if args.key is not None: params['api_key'] = args.key if args.user is not N...
# encoding: utf-8 """ List categories and their IDs in a Discourse forum. """ import os from argparse import ArgumentParser from community_mailbot.discourse import SiteFeed def main(): args = parse_args() site_feed = SiteFeed(args.url, user=args.user, key=args.key) for c_id, name in site_feed.category_n...
<commit_before># encoding: utf-8 """ List categories and their IDs in a Discourse forum. """ import os from argparse import ArgumentParser from urllib.parse import urljoin import requests def main(): args = parse_args() params = {} if args.key is not None: params['api_key'] = args.key if arg...
# encoding: utf-8 """ List categories and their IDs in a Discourse forum. """ import os from argparse import ArgumentParser from community_mailbot.discourse import SiteFeed def main(): args = parse_args() site_feed = SiteFeed(args.url, user=args.user, key=args.key) for c_id, name in site_feed.category_n...
# encoding: utf-8 """ List categories and their IDs in a Discourse forum. """ import os from argparse import ArgumentParser from urllib.parse import urljoin import requests def main(): args = parse_args() params = {} if args.key is not None: params['api_key'] = args.key if args.user is not N...
<commit_before># encoding: utf-8 """ List categories and their IDs in a Discourse forum. """ import os from argparse import ArgumentParser from urllib.parse import urljoin import requests def main(): args = parse_args() params = {} if args.key is not None: params['api_key'] = args.key if arg...
0668b59d8ec73e80976928706f96922605fe4f67
tsserver/models.py
tsserver/models.py
from tsserver import db from tsserver.dtutils import datetime_to_str class Telemetry(db.Model): """ All the data that is going to be obtained in regular time intervals (every second or so). """ id = db.Column(db.Integer, primary_key=True) timestamp = db.Column(db.DateTime) temperature = d...
from tsserver import db from tsserver.dtutils import datetime_to_str class Telemetry(db.Model): """ All the data that is going to be obtained in regular time intervals (every second or so). """ timestamp = db.Column(db.DateTime, primary_key=True) temperature = db.Column(db.Float) pressure...
Remove integer ID in Telemetry model
Remove integer ID in Telemetry model
Python
mit
m4tx/techswarm-server
from tsserver import db from tsserver.dtutils import datetime_to_str class Telemetry(db.Model): """ All the data that is going to be obtained in regular time intervals (every second or so). """ id = db.Column(db.Integer, primary_key=True) timestamp = db.Column(db.DateTime) temperature = d...
from tsserver import db from tsserver.dtutils import datetime_to_str class Telemetry(db.Model): """ All the data that is going to be obtained in regular time intervals (every second or so). """ timestamp = db.Column(db.DateTime, primary_key=True) temperature = db.Column(db.Float) pressure...
<commit_before>from tsserver import db from tsserver.dtutils import datetime_to_str class Telemetry(db.Model): """ All the data that is going to be obtained in regular time intervals (every second or so). """ id = db.Column(db.Integer, primary_key=True) timestamp = db.Column(db.DateTime) ...
from tsserver import db from tsserver.dtutils import datetime_to_str class Telemetry(db.Model): """ All the data that is going to be obtained in regular time intervals (every second or so). """ timestamp = db.Column(db.DateTime, primary_key=True) temperature = db.Column(db.Float) pressure...
from tsserver import db from tsserver.dtutils import datetime_to_str class Telemetry(db.Model): """ All the data that is going to be obtained in regular time intervals (every second or so). """ id = db.Column(db.Integer, primary_key=True) timestamp = db.Column(db.DateTime) temperature = d...
<commit_before>from tsserver import db from tsserver.dtutils import datetime_to_str class Telemetry(db.Model): """ All the data that is going to be obtained in regular time intervals (every second or so). """ id = db.Column(db.Integer, primary_key=True) timestamp = db.Column(db.DateTime) ...
ea180a007c1a5bfaeb56e6b223610876b0619e63
webmaster_verification/views.py
webmaster_verification/views.py
import logging logger = logging.getLogger(__name__) from django.http import Http404 from django.views.generic import TemplateView import settings class VerificationView(TemplateView): """ This simply adds the verification key to the view context and makes sure we return a 404 if the key wasn't set for t...
import logging logger = logging.getLogger(__name__) from django.http import Http404 from django.views.generic import TemplateView import settings class VerificationView(TemplateView): """ This simply adds the verification key to the view context and makes sure we return a 404 if the key wasn't set for t...
Use proper content-type for all files
Use proper content-type for all files
Python
bsd-3-clause
nkuttler/django-webmaster-verification,nkuttler/django-webmaster-verification
import logging logger = logging.getLogger(__name__) from django.http import Http404 from django.views.generic import TemplateView import settings class VerificationView(TemplateView): """ This simply adds the verification key to the view context and makes sure we return a 404 if the key wasn't set for t...
import logging logger = logging.getLogger(__name__) from django.http import Http404 from django.views.generic import TemplateView import settings class VerificationView(TemplateView): """ This simply adds the verification key to the view context and makes sure we return a 404 if the key wasn't set for t...
<commit_before>import logging logger = logging.getLogger(__name__) from django.http import Http404 from django.views.generic import TemplateView import settings class VerificationView(TemplateView): """ This simply adds the verification key to the view context and makes sure we return a 404 if the key w...
import logging logger = logging.getLogger(__name__) from django.http import Http404 from django.views.generic import TemplateView import settings class VerificationView(TemplateView): """ This simply adds the verification key to the view context and makes sure we return a 404 if the key wasn't set for t...
import logging logger = logging.getLogger(__name__) from django.http import Http404 from django.views.generic import TemplateView import settings class VerificationView(TemplateView): """ This simply adds the verification key to the view context and makes sure we return a 404 if the key wasn't set for t...
<commit_before>import logging logger = logging.getLogger(__name__) from django.http import Http404 from django.views.generic import TemplateView import settings class VerificationView(TemplateView): """ This simply adds the verification key to the view context and makes sure we return a 404 if the key w...
d84e8b60b0c619feaf529d4ab1eb53ef9e21aae5
lingcod/bookmarks/forms.py
lingcod/bookmarks/forms.py
from lingcod.features.forms import FeatureForm from lingcod.bookmarks.models import Bookmark from django import forms class BookmarkForm(FeatureForm): name = forms.CharField(label='Bookmark Name') latitude = forms.FloatField(widget=forms.HiddenInput()) longitude = forms.FloatField(widget=forms.HiddenInput(...
from lingcod.features.forms import FeatureForm from lingcod.bookmarks.models import Bookmark from django import forms class BookmarkForm(FeatureForm): name = forms.CharField(label='Bookmark Name') latitude = forms.FloatField(widget=forms.HiddenInput()) longitude = forms.FloatField(widget=forms.HiddenInput(...
Allow IP to be blank in form
Allow IP to be blank in form
Python
bsd-3-clause
Ecotrust/madrona_addons,Ecotrust/madrona_addons
from lingcod.features.forms import FeatureForm from lingcod.bookmarks.models import Bookmark from django import forms class BookmarkForm(FeatureForm): name = forms.CharField(label='Bookmark Name') latitude = forms.FloatField(widget=forms.HiddenInput()) longitude = forms.FloatField(widget=forms.HiddenInput(...
from lingcod.features.forms import FeatureForm from lingcod.bookmarks.models import Bookmark from django import forms class BookmarkForm(FeatureForm): name = forms.CharField(label='Bookmark Name') latitude = forms.FloatField(widget=forms.HiddenInput()) longitude = forms.FloatField(widget=forms.HiddenInput(...
<commit_before>from lingcod.features.forms import FeatureForm from lingcod.bookmarks.models import Bookmark from django import forms class BookmarkForm(FeatureForm): name = forms.CharField(label='Bookmark Name') latitude = forms.FloatField(widget=forms.HiddenInput()) longitude = forms.FloatField(widget=for...
from lingcod.features.forms import FeatureForm from lingcod.bookmarks.models import Bookmark from django import forms class BookmarkForm(FeatureForm): name = forms.CharField(label='Bookmark Name') latitude = forms.FloatField(widget=forms.HiddenInput()) longitude = forms.FloatField(widget=forms.HiddenInput(...
from lingcod.features.forms import FeatureForm from lingcod.bookmarks.models import Bookmark from django import forms class BookmarkForm(FeatureForm): name = forms.CharField(label='Bookmark Name') latitude = forms.FloatField(widget=forms.HiddenInput()) longitude = forms.FloatField(widget=forms.HiddenInput(...
<commit_before>from lingcod.features.forms import FeatureForm from lingcod.bookmarks.models import Bookmark from django import forms class BookmarkForm(FeatureForm): name = forms.CharField(label='Bookmark Name') latitude = forms.FloatField(widget=forms.HiddenInput()) longitude = forms.FloatField(widget=for...
97f81ddfdd78d062e5019793101926fb52b0db38
sum.py
sum.py
import sublime, sublime_plugin class SumCommand(sublime_plugin.TextCommand): def run(self, edit): new_view = self.view.window().new_file() new_view.set_name('Sum') new_view.insert(edit, 0, '42') new_view.set_scratch(True)
import sublime, sublime_plugin class SumCommand(sublime_plugin.TextCommand): def run(self, edit): new_view = self.view.window().new_file() new_view.set_name('Sum') new_view.insert(edit, 0, '42') new_view.set_read_only(True) new_view.set_scratch(True)
Set new file to read-only
Set new file to read-only Since the new file does not prompt about file changes when closed, if the user were to edit the new file and close without saving, their changes would be lost forever. By setting the new file to be read-only, the user will not be able to make changes to it that may be lost.
Python
mit
jbrudvik/sublime-sum,jbrudvik/sublime-sum
import sublime, sublime_plugin class SumCommand(sublime_plugin.TextCommand): def run(self, edit): new_view = self.view.window().new_file() new_view.set_name('Sum') new_view.insert(edit, 0, '42') new_view.set_scratch(True) Set new file to read-only Since the new file does not prompt about file change...
import sublime, sublime_plugin class SumCommand(sublime_plugin.TextCommand): def run(self, edit): new_view = self.view.window().new_file() new_view.set_name('Sum') new_view.insert(edit, 0, '42') new_view.set_read_only(True) new_view.set_scratch(True)
<commit_before>import sublime, sublime_plugin class SumCommand(sublime_plugin.TextCommand): def run(self, edit): new_view = self.view.window().new_file() new_view.set_name('Sum') new_view.insert(edit, 0, '42') new_view.set_scratch(True) <commit_msg>Set new file to read-only Since the new file does n...
import sublime, sublime_plugin class SumCommand(sublime_plugin.TextCommand): def run(self, edit): new_view = self.view.window().new_file() new_view.set_name('Sum') new_view.insert(edit, 0, '42') new_view.set_read_only(True) new_view.set_scratch(True)
import sublime, sublime_plugin class SumCommand(sublime_plugin.TextCommand): def run(self, edit): new_view = self.view.window().new_file() new_view.set_name('Sum') new_view.insert(edit, 0, '42') new_view.set_scratch(True) Set new file to read-only Since the new file does not prompt about file change...
<commit_before>import sublime, sublime_plugin class SumCommand(sublime_plugin.TextCommand): def run(self, edit): new_view = self.view.window().new_file() new_view.set_name('Sum') new_view.insert(edit, 0, '42') new_view.set_scratch(True) <commit_msg>Set new file to read-only Since the new file does n...
767471a5067198b810d8477abcf11da891930581
polemarch/__init__.py
polemarch/__init__.py
''' ### Polemarch is ansible based service for orchestration infrastructure. * [Documentation](http://polemarch.readthedocs.io/) * [Issue Tracker](https://gitlab.com/vstconsulting/polemarch/issues) * [Source Code](https://gitlab.com/vstconsulting/polemarch) ''' import os import warnings try: from vstutils.enviro...
''' ### Polemarch is ansible based service for orchestration infrastructure. * [Documentation](http://polemarch.readthedocs.io/) * [Issue Tracker](https://gitlab.com/vstconsulting/polemarch/issues) * [Source Code](https://gitlab.com/vstconsulting/polemarch) ''' import os import warnings try: from vstutils.enviro...
Update PM version to 1.4.5
Update PM version to 1.4.5
Python
agpl-3.0
vstconsulting/polemarch,vstconsulting/polemarch,vstconsulting/polemarch,vstconsulting/polemarch
''' ### Polemarch is ansible based service for orchestration infrastructure. * [Documentation](http://polemarch.readthedocs.io/) * [Issue Tracker](https://gitlab.com/vstconsulting/polemarch/issues) * [Source Code](https://gitlab.com/vstconsulting/polemarch) ''' import os import warnings try: from vstutils.enviro...
''' ### Polemarch is ansible based service for orchestration infrastructure. * [Documentation](http://polemarch.readthedocs.io/) * [Issue Tracker](https://gitlab.com/vstconsulting/polemarch/issues) * [Source Code](https://gitlab.com/vstconsulting/polemarch) ''' import os import warnings try: from vstutils.enviro...
<commit_before>''' ### Polemarch is ansible based service for orchestration infrastructure. * [Documentation](http://polemarch.readthedocs.io/) * [Issue Tracker](https://gitlab.com/vstconsulting/polemarch/issues) * [Source Code](https://gitlab.com/vstconsulting/polemarch) ''' import os import warnings try: from ...
''' ### Polemarch is ansible based service for orchestration infrastructure. * [Documentation](http://polemarch.readthedocs.io/) * [Issue Tracker](https://gitlab.com/vstconsulting/polemarch/issues) * [Source Code](https://gitlab.com/vstconsulting/polemarch) ''' import os import warnings try: from vstutils.enviro...
''' ### Polemarch is ansible based service for orchestration infrastructure. * [Documentation](http://polemarch.readthedocs.io/) * [Issue Tracker](https://gitlab.com/vstconsulting/polemarch/issues) * [Source Code](https://gitlab.com/vstconsulting/polemarch) ''' import os import warnings try: from vstutils.enviro...
<commit_before>''' ### Polemarch is ansible based service for orchestration infrastructure. * [Documentation](http://polemarch.readthedocs.io/) * [Issue Tracker](https://gitlab.com/vstconsulting/polemarch/issues) * [Source Code](https://gitlab.com/vstconsulting/polemarch) ''' import os import warnings try: from ...
c36718dfb0ec25427a5c5c1c42945da1b757924d
topaz/modules/ffi/function.py
topaz/modules/ffi/function.py
from topaz.objects.objectobject import W_Object from topaz.module import ClassDef from topaz.modules.ffi.type import W_TypeObject from topaz.error import RubyError from topaz.coerce import Coerce class W_FunctionObject(W_Object): classdef = ClassDef('Function', W_Object.classdef) @classdef.singleton_method('a...
from topaz.objects.objectobject import W_Object from topaz.module import ClassDef from topaz.modules.ffi.type import W_TypeObject from topaz.error import RubyError from topaz.coerce import Coerce class W_FunctionObject(W_Object): classdef = ClassDef('Function', W_Object.classdef) @classdef.singleton_method('a...
Put the type unwrapping into a separat method
Put the type unwrapping into a separat method
Python
bsd-3-clause
babelsberg/babelsberg-r,topazproject/topaz,babelsberg/babelsberg-r,topazproject/topaz,babelsberg/babelsberg-r,babelsberg/babelsberg-r,babelsberg/babelsberg-r,topazproject/topaz,topazproject/topaz
from topaz.objects.objectobject import W_Object from topaz.module import ClassDef from topaz.modules.ffi.type import W_TypeObject from topaz.error import RubyError from topaz.coerce import Coerce class W_FunctionObject(W_Object): classdef = ClassDef('Function', W_Object.classdef) @classdef.singleton_method('a...
from topaz.objects.objectobject import W_Object from topaz.module import ClassDef from topaz.modules.ffi.type import W_TypeObject from topaz.error import RubyError from topaz.coerce import Coerce class W_FunctionObject(W_Object): classdef = ClassDef('Function', W_Object.classdef) @classdef.singleton_method('a...
<commit_before>from topaz.objects.objectobject import W_Object from topaz.module import ClassDef from topaz.modules.ffi.type import W_TypeObject from topaz.error import RubyError from topaz.coerce import Coerce class W_FunctionObject(W_Object): classdef = ClassDef('Function', W_Object.classdef) @classdef.sing...
from topaz.objects.objectobject import W_Object from topaz.module import ClassDef from topaz.modules.ffi.type import W_TypeObject from topaz.error import RubyError from topaz.coerce import Coerce class W_FunctionObject(W_Object): classdef = ClassDef('Function', W_Object.classdef) @classdef.singleton_method('a...
from topaz.objects.objectobject import W_Object from topaz.module import ClassDef from topaz.modules.ffi.type import W_TypeObject from topaz.error import RubyError from topaz.coerce import Coerce class W_FunctionObject(W_Object): classdef = ClassDef('Function', W_Object.classdef) @classdef.singleton_method('a...
<commit_before>from topaz.objects.objectobject import W_Object from topaz.module import ClassDef from topaz.modules.ffi.type import W_TypeObject from topaz.error import RubyError from topaz.coerce import Coerce class W_FunctionObject(W_Object): classdef = ClassDef('Function', W_Object.classdef) @classdef.sing...
d01a13f498e01efe613bace4c140d6901752475b
multilingual_model/admin.py
multilingual_model/admin.py
from django.contrib import admin from .forms import TranslationFormSet from . import settings class TranslationInline(admin.StackedInline): def __init__(self, *args, **kwargs): super(TranslationInline, self).__init__(*args, **kwargs) if settings.AUTO_HIDE_LANGUAGE: self.exclude = ('l...
from django.contrib import admin from .forms import TranslationFormSet from . import settings class TranslationStackedInline(admin.StackedInline): def __init__(self, *args, **kwargs): super(TranslationStackedInline, self).__init__(*args, **kwargs) if settings.AUTO_HIDE_LANGUAGE: self...
Rename TranslationInline to TranslationStackedInline, add TranslationTabularInline.
Rename TranslationInline to TranslationStackedInline, add TranslationTabularInline.
Python
agpl-3.0
dokterbob/django-multilingual-model
from django.contrib import admin from .forms import TranslationFormSet from . import settings class TranslationInline(admin.StackedInline): def __init__(self, *args, **kwargs): super(TranslationInline, self).__init__(*args, **kwargs) if settings.AUTO_HIDE_LANGUAGE: self.exclude = ('l...
from django.contrib import admin from .forms import TranslationFormSet from . import settings class TranslationStackedInline(admin.StackedInline): def __init__(self, *args, **kwargs): super(TranslationStackedInline, self).__init__(*args, **kwargs) if settings.AUTO_HIDE_LANGUAGE: self...
<commit_before>from django.contrib import admin from .forms import TranslationFormSet from . import settings class TranslationInline(admin.StackedInline): def __init__(self, *args, **kwargs): super(TranslationInline, self).__init__(*args, **kwargs) if settings.AUTO_HIDE_LANGUAGE: sel...
from django.contrib import admin from .forms import TranslationFormSet from . import settings class TranslationStackedInline(admin.StackedInline): def __init__(self, *args, **kwargs): super(TranslationStackedInline, self).__init__(*args, **kwargs) if settings.AUTO_HIDE_LANGUAGE: self...
from django.contrib import admin from .forms import TranslationFormSet from . import settings class TranslationInline(admin.StackedInline): def __init__(self, *args, **kwargs): super(TranslationInline, self).__init__(*args, **kwargs) if settings.AUTO_HIDE_LANGUAGE: self.exclude = ('l...
<commit_before>from django.contrib import admin from .forms import TranslationFormSet from . import settings class TranslationInline(admin.StackedInline): def __init__(self, *args, **kwargs): super(TranslationInline, self).__init__(*args, **kwargs) if settings.AUTO_HIDE_LANGUAGE: sel...
1aa98285f1d51e36f9091542dd0323168a443a28
wiblog/formatting.py
wiblog/formatting.py
from django.utils.safestring import mark_safe import CommonMark # Convert a markdown string into HTML5, and prevent Django from escaping it def mdToHTML(value): parser = CommonMark.DocParser() renderer = CommonMark.HTMLRenderer() ast = parser.parse(value) return mark_safe(renderer.render(ast)) # Get a summary...
from django.utils.safestring import mark_safe import CommonMark # Convert a markdown string into HTML5, and prevent Django from escaping it def mdToHTML(value): parser = CommonMark.Parser() renderer = CommonMark.HTMLRenderer() ast = parser.parse(value) return mark_safe(renderer.render(ast)) # Get a summary of...
Fix changed CommonMark syntax (?)
Fix changed CommonMark syntax (?)
Python
agpl-3.0
lo-windigo/fragdev,lo-windigo/fragdev
from django.utils.safestring import mark_safe import CommonMark # Convert a markdown string into HTML5, and prevent Django from escaping it def mdToHTML(value): parser = CommonMark.DocParser() renderer = CommonMark.HTMLRenderer() ast = parser.parse(value) return mark_safe(renderer.render(ast)) # Get a summary...
from django.utils.safestring import mark_safe import CommonMark # Convert a markdown string into HTML5, and prevent Django from escaping it def mdToHTML(value): parser = CommonMark.Parser() renderer = CommonMark.HTMLRenderer() ast = parser.parse(value) return mark_safe(renderer.render(ast)) # Get a summary of...
<commit_before>from django.utils.safestring import mark_safe import CommonMark # Convert a markdown string into HTML5, and prevent Django from escaping it def mdToHTML(value): parser = CommonMark.DocParser() renderer = CommonMark.HTMLRenderer() ast = parser.parse(value) return mark_safe(renderer.render(ast)) ...
from django.utils.safestring import mark_safe import CommonMark # Convert a markdown string into HTML5, and prevent Django from escaping it def mdToHTML(value): parser = CommonMark.Parser() renderer = CommonMark.HTMLRenderer() ast = parser.parse(value) return mark_safe(renderer.render(ast)) # Get a summary of...
from django.utils.safestring import mark_safe import CommonMark # Convert a markdown string into HTML5, and prevent Django from escaping it def mdToHTML(value): parser = CommonMark.DocParser() renderer = CommonMark.HTMLRenderer() ast = parser.parse(value) return mark_safe(renderer.render(ast)) # Get a summary...
<commit_before>from django.utils.safestring import mark_safe import CommonMark # Convert a markdown string into HTML5, and prevent Django from escaping it def mdToHTML(value): parser = CommonMark.DocParser() renderer = CommonMark.HTMLRenderer() ast = parser.parse(value) return mark_safe(renderer.render(ast)) ...
273127e89bd714502d2f57e1220e7e0f1811d7fb
django_git/utils.py
django_git/utils.py
import os from git import * from django.conf import settings def get_repos(): repos = [get_repo(dir) for dir in os.listdir(settings.REPOS_ROOT)] return [r for r in repos if not (r is None)] def get_repo(name): repo_path = os.path.join(settings.REPOS_ROOT, name) if os.path.isdir(repo_path): tr...
import os from git import * from django.conf import settings def get_repos(): repos = [get_repo(dir) for dir in os.listdir(settings.REPOS_ROOT)] return [r for r in repos if not (r is None)] def get_repo(name): repo_path = os.path.join(settings.REPOS_ROOT, name) if os.path.isdir(repo_path): tr...
Use os.sep for splitting directories
Use os.sep for splitting directories Signed-off-by: Seth Buntin <7fa3258757ee476d85f026594ec3f1563305da2c@gmail.com>
Python
bsd-3-clause
sethtrain/django-git,sethtrain/django-git
import os from git import * from django.conf import settings def get_repos(): repos = [get_repo(dir) for dir in os.listdir(settings.REPOS_ROOT)] return [r for r in repos if not (r is None)] def get_repo(name): repo_path = os.path.join(settings.REPOS_ROOT, name) if os.path.isdir(repo_path): tr...
import os from git import * from django.conf import settings def get_repos(): repos = [get_repo(dir) for dir in os.listdir(settings.REPOS_ROOT)] return [r for r in repos if not (r is None)] def get_repo(name): repo_path = os.path.join(settings.REPOS_ROOT, name) if os.path.isdir(repo_path): tr...
<commit_before>import os from git import * from django.conf import settings def get_repos(): repos = [get_repo(dir) for dir in os.listdir(settings.REPOS_ROOT)] return [r for r in repos if not (r is None)] def get_repo(name): repo_path = os.path.join(settings.REPOS_ROOT, name) if os.path.isdir(repo_pa...
import os from git import * from django.conf import settings def get_repos(): repos = [get_repo(dir) for dir in os.listdir(settings.REPOS_ROOT)] return [r for r in repos if not (r is None)] def get_repo(name): repo_path = os.path.join(settings.REPOS_ROOT, name) if os.path.isdir(repo_path): tr...
import os from git import * from django.conf import settings def get_repos(): repos = [get_repo(dir) for dir in os.listdir(settings.REPOS_ROOT)] return [r for r in repos if not (r is None)] def get_repo(name): repo_path = os.path.join(settings.REPOS_ROOT, name) if os.path.isdir(repo_path): tr...
<commit_before>import os from git import * from django.conf import settings def get_repos(): repos = [get_repo(dir) for dir in os.listdir(settings.REPOS_ROOT)] return [r for r in repos if not (r is None)] def get_repo(name): repo_path = os.path.join(settings.REPOS_ROOT, name) if os.path.isdir(repo_pa...
5e50f8127a48a08d66bdc9d8aec28064b33ad864
game.py
game.py
import datetime import map_loader class Game(object): def __init__(self, name=name, players=players, map=None): """ Initialize a new game. """ self.name = name, self.players = players, # List of player usernames self.status = 'Waiting', self.raw_state = self.generate_cle...
import datetime import json import map_loader class GAME_STATUS(object): """ Game status constants. """ lobby = 'waiting for players' waiting = 'waiting for moves' playing = 'playing' cancelled = 'cancelled' complete = 'complete' class Game(object): def __init__(self, name=name, players...
Add some state related methods to Game
Add some state related methods to Game
Python
mit
supermitch/mech-ai,supermitch/mech-ai,supermitch/mech-ai
import datetime import map_loader class Game(object): def __init__(self, name=name, players=players, map=None): """ Initialize a new game. """ self.name = name, self.players = players, # List of player usernames self.status = 'Waiting', self.raw_state = self.generate_cle...
import datetime import json import map_loader class GAME_STATUS(object): """ Game status constants. """ lobby = 'waiting for players' waiting = 'waiting for moves' playing = 'playing' cancelled = 'cancelled' complete = 'complete' class Game(object): def __init__(self, name=name, players...
<commit_before>import datetime import map_loader class Game(object): def __init__(self, name=name, players=players, map=None): """ Initialize a new game. """ self.name = name, self.players = players, # List of player usernames self.status = 'Waiting', self.raw_state = se...
import datetime import json import map_loader class GAME_STATUS(object): """ Game status constants. """ lobby = 'waiting for players' waiting = 'waiting for moves' playing = 'playing' cancelled = 'cancelled' complete = 'complete' class Game(object): def __init__(self, name=name, players...
import datetime import map_loader class Game(object): def __init__(self, name=name, players=players, map=None): """ Initialize a new game. """ self.name = name, self.players = players, # List of player usernames self.status = 'Waiting', self.raw_state = self.generate_cle...
<commit_before>import datetime import map_loader class Game(object): def __init__(self, name=name, players=players, map=None): """ Initialize a new game. """ self.name = name, self.players = players, # List of player usernames self.status = 'Waiting', self.raw_state = se...
067036e927fde0a97708162323ba13d4a239bb5b
grammpy/exceptions/NotNonterminalException.py
grammpy/exceptions/NotNonterminalException.py
#!/usr/bin/env python """ :Author Patrik Valkovic :Created 23.06.2017 16:39 :Licence GNUv3 Part of grammpy """ from .GrammpyException import GrammpyException class NotNonterminalException(GrammpyException): pass
#!/usr/bin/env python """ :Author Patrik Valkovic :Created 23.06.2017 16:39 :Licence GNUv3 Part of grammpy """ from typing import Any from .GrammpyException import GrammpyException class NotNonterminalException(GrammpyException): def __init__(self, parameter, *args: Any) -> None: super()....
Implement NotNonterminalEception __init__ method and pass object
Implement NotNonterminalEception __init__ method and pass object
Python
mit
PatrikValkovic/grammpy
#!/usr/bin/env python """ :Author Patrik Valkovic :Created 23.06.2017 16:39 :Licence GNUv3 Part of grammpy """ from .GrammpyException import GrammpyException class NotNonterminalException(GrammpyException): pass Implement NotNonterminalEception __init__ method and pass object
#!/usr/bin/env python """ :Author Patrik Valkovic :Created 23.06.2017 16:39 :Licence GNUv3 Part of grammpy """ from typing import Any from .GrammpyException import GrammpyException class NotNonterminalException(GrammpyException): def __init__(self, parameter, *args: Any) -> None: super()....
<commit_before>#!/usr/bin/env python """ :Author Patrik Valkovic :Created 23.06.2017 16:39 :Licence GNUv3 Part of grammpy """ from .GrammpyException import GrammpyException class NotNonterminalException(GrammpyException): pass <commit_msg>Implement NotNonterminalEception __init__ method and pass o...
#!/usr/bin/env python """ :Author Patrik Valkovic :Created 23.06.2017 16:39 :Licence GNUv3 Part of grammpy """ from typing import Any from .GrammpyException import GrammpyException class NotNonterminalException(GrammpyException): def __init__(self, parameter, *args: Any) -> None: super()....
#!/usr/bin/env python """ :Author Patrik Valkovic :Created 23.06.2017 16:39 :Licence GNUv3 Part of grammpy """ from .GrammpyException import GrammpyException class NotNonterminalException(GrammpyException): pass Implement NotNonterminalEception __init__ method and pass object#!/usr/bin/env python ...
<commit_before>#!/usr/bin/env python """ :Author Patrik Valkovic :Created 23.06.2017 16:39 :Licence GNUv3 Part of grammpy """ from .GrammpyException import GrammpyException class NotNonterminalException(GrammpyException): pass <commit_msg>Implement NotNonterminalEception __init__ method and pass o...
0d24acf08ec81f2b84609ce417cc314a4e76c570
testproject/tablib_test/tests.py
testproject/tablib_test/tests.py
from django.test import TestCase from django_tablib import ModelDataset, Field from .models import TestModel class DjangoTablibTestCase(TestCase): def setUp(self): TestModel.objects.create(field1='value') def test_declarative_fields(self): class TestModelDataset(ModelDataset): f...
from django.test import TestCase from django_tablib import ModelDataset, Field from .models import TestModel class DjangoTablibTestCase(TestCase): def setUp(self): TestModel.objects.create(field1='value') def test_declarative_fields(self): class TestModelDataset(ModelDataset): f...
Adjust test for new functionality.
Adjust test for new functionality.
Python
mit
ebrelsford/django-tablib,joshourisman/django-tablib,joshourisman/django-tablib,ebrelsford/django-tablib
from django.test import TestCase from django_tablib import ModelDataset, Field from .models import TestModel class DjangoTablibTestCase(TestCase): def setUp(self): TestModel.objects.create(field1='value') def test_declarative_fields(self): class TestModelDataset(ModelDataset): f...
from django.test import TestCase from django_tablib import ModelDataset, Field from .models import TestModel class DjangoTablibTestCase(TestCase): def setUp(self): TestModel.objects.create(field1='value') def test_declarative_fields(self): class TestModelDataset(ModelDataset): f...
<commit_before>from django.test import TestCase from django_tablib import ModelDataset, Field from .models import TestModel class DjangoTablibTestCase(TestCase): def setUp(self): TestModel.objects.create(field1='value') def test_declarative_fields(self): class TestModelDataset(ModelDataset)...
from django.test import TestCase from django_tablib import ModelDataset, Field from .models import TestModel class DjangoTablibTestCase(TestCase): def setUp(self): TestModel.objects.create(field1='value') def test_declarative_fields(self): class TestModelDataset(ModelDataset): f...
from django.test import TestCase from django_tablib import ModelDataset, Field from .models import TestModel class DjangoTablibTestCase(TestCase): def setUp(self): TestModel.objects.create(field1='value') def test_declarative_fields(self): class TestModelDataset(ModelDataset): f...
<commit_before>from django.test import TestCase from django_tablib import ModelDataset, Field from .models import TestModel class DjangoTablibTestCase(TestCase): def setUp(self): TestModel.objects.create(field1='value') def test_declarative_fields(self): class TestModelDataset(ModelDataset)...
9cc9f7db5c230460e4e181c1aed2ec2270d18449
tests/test_preferred_encoding.py
tests/test_preferred_encoding.py
# -*- coding: utf-8 -*- import locale import codecs import pytest from cookiecutter.compat import PY3 @pytest.mark.skipif(not PY3, reason='Only necessary on Python3') def test_not_ascii(): """Make sure that the systems preferred encoding is not `ascii`. Otherwise `click` is raising a RuntimeError for Python...
# -*- coding: utf-8 -*- import locale import codecs import pytest from cookiecutter.compat import PY3 @pytest.mark.skipif(not PY3, reason='Only necessary on Python3') def test_not_ascii(): """Make sure that the systems preferred encoding is not `ascii`. Otherwise `click` is raising a RuntimeError for Pytho...
Add another blank line to fix flake8 check
Add another blank line to fix flake8 check
Python
bsd-3-clause
cguardia/cookiecutter,moi65/cookiecutter,pjbull/cookiecutter,kkujawinski/cookiecutter,dajose/cookiecutter,Vauxoo/cookiecutter,venumech/cookiecutter,lgp171188/cookiecutter,lucius-feng/cookiecutter,atlassian/cookiecutter,foodszhang/cookiecutter,Vauxoo/cookiecutter,venumech/cookiecutter,hackebrot/cookiecutter,moi65/cookie...
# -*- coding: utf-8 -*- import locale import codecs import pytest from cookiecutter.compat import PY3 @pytest.mark.skipif(not PY3, reason='Only necessary on Python3') def test_not_ascii(): """Make sure that the systems preferred encoding is not `ascii`. Otherwise `click` is raising a RuntimeError for Python...
# -*- coding: utf-8 -*- import locale import codecs import pytest from cookiecutter.compat import PY3 @pytest.mark.skipif(not PY3, reason='Only necessary on Python3') def test_not_ascii(): """Make sure that the systems preferred encoding is not `ascii`. Otherwise `click` is raising a RuntimeError for Pytho...
<commit_before># -*- coding: utf-8 -*- import locale import codecs import pytest from cookiecutter.compat import PY3 @pytest.mark.skipif(not PY3, reason='Only necessary on Python3') def test_not_ascii(): """Make sure that the systems preferred encoding is not `ascii`. Otherwise `click` is raising a RuntimeE...
# -*- coding: utf-8 -*- import locale import codecs import pytest from cookiecutter.compat import PY3 @pytest.mark.skipif(not PY3, reason='Only necessary on Python3') def test_not_ascii(): """Make sure that the systems preferred encoding is not `ascii`. Otherwise `click` is raising a RuntimeError for Pytho...
# -*- coding: utf-8 -*- import locale import codecs import pytest from cookiecutter.compat import PY3 @pytest.mark.skipif(not PY3, reason='Only necessary on Python3') def test_not_ascii(): """Make sure that the systems preferred encoding is not `ascii`. Otherwise `click` is raising a RuntimeError for Python...
<commit_before># -*- coding: utf-8 -*- import locale import codecs import pytest from cookiecutter.compat import PY3 @pytest.mark.skipif(not PY3, reason='Only necessary on Python3') def test_not_ascii(): """Make sure that the systems preferred encoding is not `ascii`. Otherwise `click` is raising a RuntimeE...
3f51ab2ada60e78c9821cef557cb06194a24226a
tests/optvis/test_integration.py
tests/optvis/test_integration.py
from __future__ import absolute_import, division, print_function import pytest import tensorflow as tf from lucid.modelzoo.vision_models import InceptionV1 from lucid.optvis import objectives, param, render, transform model = InceptionV1() model.load_graphdef() @pytest.mark.parametrize("decorrelate", [True, False...
from __future__ import absolute_import, division, print_function import pytest import tensorflow as tf from lucid.modelzoo.vision_models import InceptionV1 from lucid.optvis import objectives, param, render, transform @pytest.fixture def inceptionv1(): model = InceptionV1() model.load_graphdef() return model ...
Move model init into pytest fixture to avoid loading model and downloading graph just by importing the test module
Move model init into pytest fixture to avoid loading model and downloading graph just by importing the test module
Python
apache-2.0
tensorflow/lucid,tensorflow/lucid,tensorflow/lucid,tensorflow/lucid
from __future__ import absolute_import, division, print_function import pytest import tensorflow as tf from lucid.modelzoo.vision_models import InceptionV1 from lucid.optvis import objectives, param, render, transform model = InceptionV1() model.load_graphdef() @pytest.mark.parametrize("decorrelate", [True, False...
from __future__ import absolute_import, division, print_function import pytest import tensorflow as tf from lucid.modelzoo.vision_models import InceptionV1 from lucid.optvis import objectives, param, render, transform @pytest.fixture def inceptionv1(): model = InceptionV1() model.load_graphdef() return model ...
<commit_before>from __future__ import absolute_import, division, print_function import pytest import tensorflow as tf from lucid.modelzoo.vision_models import InceptionV1 from lucid.optvis import objectives, param, render, transform model = InceptionV1() model.load_graphdef() @pytest.mark.parametrize("decorrelate...
from __future__ import absolute_import, division, print_function import pytest import tensorflow as tf from lucid.modelzoo.vision_models import InceptionV1 from lucid.optvis import objectives, param, render, transform @pytest.fixture def inceptionv1(): model = InceptionV1() model.load_graphdef() return model ...
from __future__ import absolute_import, division, print_function import pytest import tensorflow as tf from lucid.modelzoo.vision_models import InceptionV1 from lucid.optvis import objectives, param, render, transform model = InceptionV1() model.load_graphdef() @pytest.mark.parametrize("decorrelate", [True, False...
<commit_before>from __future__ import absolute_import, division, print_function import pytest import tensorflow as tf from lucid.modelzoo.vision_models import InceptionV1 from lucid.optvis import objectives, param, render, transform model = InceptionV1() model.load_graphdef() @pytest.mark.parametrize("decorrelate...
b14ec035f6a4890ce85504f449402aec857227fe
cla_backend/apps/status/tests/smoketests.py
cla_backend/apps/status/tests/smoketests.py
import unittest from celery import Celery from django.conf import settings from django.db import connection class SmokeTests(unittest.TestCase): def setUp(self): pass def test_can_access_db(self): "access the database" cursor = connection.cursor() cursor.execute('SELECT 1') ...
import unittest from celery import Celery from django.conf import settings from django.db import connection class SmokeTests(unittest.TestCase): def setUp(self): pass def test_can_access_db(self): "access the database" cursor = connection.cursor() cursor.execute('SELECT 1') ...
Configure Celery correctly in smoketest
Configure Celery correctly in smoketest
Python
mit
ministryofjustice/cla_backend,ministryofjustice/cla_backend,ministryofjustice/cla_backend,ministryofjustice/cla_backend
import unittest from celery import Celery from django.conf import settings from django.db import connection class SmokeTests(unittest.TestCase): def setUp(self): pass def test_can_access_db(self): "access the database" cursor = connection.cursor() cursor.execute('SELECT 1') ...
import unittest from celery import Celery from django.conf import settings from django.db import connection class SmokeTests(unittest.TestCase): def setUp(self): pass def test_can_access_db(self): "access the database" cursor = connection.cursor() cursor.execute('SELECT 1') ...
<commit_before>import unittest from celery import Celery from django.conf import settings from django.db import connection class SmokeTests(unittest.TestCase): def setUp(self): pass def test_can_access_db(self): "access the database" cursor = connection.cursor() cursor.execu...
import unittest from celery import Celery from django.conf import settings from django.db import connection class SmokeTests(unittest.TestCase): def setUp(self): pass def test_can_access_db(self): "access the database" cursor = connection.cursor() cursor.execute('SELECT 1') ...
import unittest from celery import Celery from django.conf import settings from django.db import connection class SmokeTests(unittest.TestCase): def setUp(self): pass def test_can_access_db(self): "access the database" cursor = connection.cursor() cursor.execute('SELECT 1') ...
<commit_before>import unittest from celery import Celery from django.conf import settings from django.db import connection class SmokeTests(unittest.TestCase): def setUp(self): pass def test_can_access_db(self): "access the database" cursor = connection.cursor() cursor.execu...
4158e2b5d2d7524f4d8e66b9ee021c1f63e11b25
blanc_basic_events/events/templatetags/events_tags.py
blanc_basic_events/events/templatetags/events_tags.py
from django import template from blanc_basic_events.events.models import Event register = template.Library() @register.assignment_tag def get_events(): return Event.objects.all().prefetch_related('recurringevent_set', 'recurringeventexclusion_set')
from django import template from blanc_basic_events.events.models import Category, Event register = template.Library() @register.assignment_tag def get_events_categories(): return Category.objects.all() @register.assignment_tag def get_events(): return Event.objects.all().prefetch_related('recurringevent_s...
Tag to get all categories
Tag to get all categories
Python
bsd-3-clause
blancltd/blanc-basic-events
from django import template from blanc_basic_events.events.models import Event register = template.Library() @register.assignment_tag def get_events(): return Event.objects.all().prefetch_related('recurringevent_set', 'recurringeventexclusion_set') Tag to get all categories
from django import template from blanc_basic_events.events.models import Category, Event register = template.Library() @register.assignment_tag def get_events_categories(): return Category.objects.all() @register.assignment_tag def get_events(): return Event.objects.all().prefetch_related('recurringevent_s...
<commit_before>from django import template from blanc_basic_events.events.models import Event register = template.Library() @register.assignment_tag def get_events(): return Event.objects.all().prefetch_related('recurringevent_set', 'recurringeventexclusion_set') <commit_msg>Tag to get all categories<commit_afte...
from django import template from blanc_basic_events.events.models import Category, Event register = template.Library() @register.assignment_tag def get_events_categories(): return Category.objects.all() @register.assignment_tag def get_events(): return Event.objects.all().prefetch_related('recurringevent_s...
from django import template from blanc_basic_events.events.models import Event register = template.Library() @register.assignment_tag def get_events(): return Event.objects.all().prefetch_related('recurringevent_set', 'recurringeventexclusion_set') Tag to get all categoriesfrom django import template from blanc_...
<commit_before>from django import template from blanc_basic_events.events.models import Event register = template.Library() @register.assignment_tag def get_events(): return Event.objects.all().prefetch_related('recurringevent_set', 'recurringeventexclusion_set') <commit_msg>Tag to get all categories<commit_afte...
1344b1e521afd83494f99930260c00f679e883d1
cms/djangoapps/contentstore/views/session_kv_store.py
cms/djangoapps/contentstore/views/session_kv_store.py
from xblock.runtime import KeyValueStore, InvalidScopeError class SessionKeyValueStore(KeyValueStore): def __init__(self, request, model_data): self._model_data = model_data self._session = request.session def get(self, key): try: return self._model_data[key.field_name] ...
from xblock.runtime import KeyValueStore, InvalidScopeError class SessionKeyValueStore(KeyValueStore): def __init__(self, request, descriptor_model_data): self._descriptor_model_data = descriptor_model_data self._session = request.session def get(self, key): try: return se...
Make SessionKeyValueStore variable names clearer
Make SessionKeyValueStore variable names clearer
Python
agpl-3.0
TsinghuaX/edx-platform,cognitiveclass/edx-platform,shashank971/edx-platform,J861449197/edx-platform,kursitet/edx-platform,LearnEra/LearnEraPlaftform,chauhanhardik/populo_2,philanthropy-u/edx-platform,analyseuc3m/ANALYSE-v1,amir-qayyum-khan/edx-platform,10clouds/edx-platform,abdoosh00/edraak,Semi-global/edx-platform,sam...
from xblock.runtime import KeyValueStore, InvalidScopeError class SessionKeyValueStore(KeyValueStore): def __init__(self, request, model_data): self._model_data = model_data self._session = request.session def get(self, key): try: return self._model_data[key.field_name] ...
from xblock.runtime import KeyValueStore, InvalidScopeError class SessionKeyValueStore(KeyValueStore): def __init__(self, request, descriptor_model_data): self._descriptor_model_data = descriptor_model_data self._session = request.session def get(self, key): try: return se...
<commit_before>from xblock.runtime import KeyValueStore, InvalidScopeError class SessionKeyValueStore(KeyValueStore): def __init__(self, request, model_data): self._model_data = model_data self._session = request.session def get(self, key): try: return self._model_data[key...
from xblock.runtime import KeyValueStore, InvalidScopeError class SessionKeyValueStore(KeyValueStore): def __init__(self, request, descriptor_model_data): self._descriptor_model_data = descriptor_model_data self._session = request.session def get(self, key): try: return se...
from xblock.runtime import KeyValueStore, InvalidScopeError class SessionKeyValueStore(KeyValueStore): def __init__(self, request, model_data): self._model_data = model_data self._session = request.session def get(self, key): try: return self._model_data[key.field_name] ...
<commit_before>from xblock.runtime import KeyValueStore, InvalidScopeError class SessionKeyValueStore(KeyValueStore): def __init__(self, request, model_data): self._model_data = model_data self._session = request.session def get(self, key): try: return self._model_data[key...
03bca9051114a936b584632a72242ca023cbde3e
openslides/utils/csv_ext.py
openslides/utils/csv_ext.py
#!/usr/bin/env python # -*- coding: utf-8 -*- """ openslides.utils.csv_ext ~~~~~~~~~~~~~~~~~~~~~~~~ Additional dialect definitions for pythons CSV module. :copyright: 2011 by the OpenSlides team, see AUTHORS. :license: GNU GPL, see LICENSE for more details. """ from csv import Dialect, excel, reg...
#!/usr/bin/env python # -*- coding: utf-8 -*- """ openslides.utils.csv_ext ~~~~~~~~~~~~~~~~~~~~~~~~ Additional dialect definitions for pythons CSV module. :copyright: 2011 by the OpenSlides team, see AUTHORS. :license: GNU GPL, see LICENSE for more details. """ from csv import Dialect, excel, reg...
Extend patchup for builtin excel dialect
Extend patchup for builtin excel dialect
Python
mit
ostcar/OpenSlides,normanjaeckel/OpenSlides,tsiegleauq/OpenSlides,jwinzer/OpenSlides,normanjaeckel/OpenSlides,OpenSlides/OpenSlides,emanuelschuetze/OpenSlides,CatoTH/OpenSlides,jwinzer/OpenSlides,rolandgeider/OpenSlides,emanuelschuetze/OpenSlides,OpenSlides/OpenSlides,jwinzer/OpenSlides,ostcar/OpenSlides,FinnStutzenstei...
#!/usr/bin/env python # -*- coding: utf-8 -*- """ openslides.utils.csv_ext ~~~~~~~~~~~~~~~~~~~~~~~~ Additional dialect definitions for pythons CSV module. :copyright: 2011 by the OpenSlides team, see AUTHORS. :license: GNU GPL, see LICENSE for more details. """ from csv import Dialect, excel, reg...
#!/usr/bin/env python # -*- coding: utf-8 -*- """ openslides.utils.csv_ext ~~~~~~~~~~~~~~~~~~~~~~~~ Additional dialect definitions for pythons CSV module. :copyright: 2011 by the OpenSlides team, see AUTHORS. :license: GNU GPL, see LICENSE for more details. """ from csv import Dialect, excel, reg...
<commit_before>#!/usr/bin/env python # -*- coding: utf-8 -*- """ openslides.utils.csv_ext ~~~~~~~~~~~~~~~~~~~~~~~~ Additional dialect definitions for pythons CSV module. :copyright: 2011 by the OpenSlides team, see AUTHORS. :license: GNU GPL, see LICENSE for more details. """ from csv import Dial...
#!/usr/bin/env python # -*- coding: utf-8 -*- """ openslides.utils.csv_ext ~~~~~~~~~~~~~~~~~~~~~~~~ Additional dialect definitions for pythons CSV module. :copyright: 2011 by the OpenSlides team, see AUTHORS. :license: GNU GPL, see LICENSE for more details. """ from csv import Dialect, excel, reg...
#!/usr/bin/env python # -*- coding: utf-8 -*- """ openslides.utils.csv_ext ~~~~~~~~~~~~~~~~~~~~~~~~ Additional dialect definitions for pythons CSV module. :copyright: 2011 by the OpenSlides team, see AUTHORS. :license: GNU GPL, see LICENSE for more details. """ from csv import Dialect, excel, reg...
<commit_before>#!/usr/bin/env python # -*- coding: utf-8 -*- """ openslides.utils.csv_ext ~~~~~~~~~~~~~~~~~~~~~~~~ Additional dialect definitions for pythons CSV module. :copyright: 2011 by the OpenSlides team, see AUTHORS. :license: GNU GPL, see LICENSE for more details. """ from csv import Dial...
921ec4fce301dd98fc18d81fc7c78347486ea4f0
counterpartylib/test/config_context_test.py
counterpartylib/test/config_context_test.py
#! /usr/bin/python3 import pprint import tempfile from counterpartylib.test import conftest # this is require near the top to do setup of the test suite from counterpartylib.test.fixtures.params import DEFAULT_PARAMS as DP from counterpartylib.test import util_test from counterpartylib.test.util_test import CURR_DIR ...
#! /usr/bin/python3 import pprint import tempfile from counterpartylib.test import conftest # this is require near the top to do setup of the test suite from counterpartylib.test.fixtures.params import DEFAULT_PARAMS as DP from counterpartylib.test import util_test from counterpartylib.test.util_test import CURR_DIR ...
Fix test failures comparing with "Bitcoin".
Fix test failures comparing with "Bitcoin".
Python
mit
monaparty/counterparty-lib,monaparty/counterparty-lib
#! /usr/bin/python3 import pprint import tempfile from counterpartylib.test import conftest # this is require near the top to do setup of the test suite from counterpartylib.test.fixtures.params import DEFAULT_PARAMS as DP from counterpartylib.test import util_test from counterpartylib.test.util_test import CURR_DIR ...
#! /usr/bin/python3 import pprint import tempfile from counterpartylib.test import conftest # this is require near the top to do setup of the test suite from counterpartylib.test.fixtures.params import DEFAULT_PARAMS as DP from counterpartylib.test import util_test from counterpartylib.test.util_test import CURR_DIR ...
<commit_before>#! /usr/bin/python3 import pprint import tempfile from counterpartylib.test import conftest # this is require near the top to do setup of the test suite from counterpartylib.test.fixtures.params import DEFAULT_PARAMS as DP from counterpartylib.test import util_test from counterpartylib.test.util_test im...
#! /usr/bin/python3 import pprint import tempfile from counterpartylib.test import conftest # this is require near the top to do setup of the test suite from counterpartylib.test.fixtures.params import DEFAULT_PARAMS as DP from counterpartylib.test import util_test from counterpartylib.test.util_test import CURR_DIR ...
#! /usr/bin/python3 import pprint import tempfile from counterpartylib.test import conftest # this is require near the top to do setup of the test suite from counterpartylib.test.fixtures.params import DEFAULT_PARAMS as DP from counterpartylib.test import util_test from counterpartylib.test.util_test import CURR_DIR ...
<commit_before>#! /usr/bin/python3 import pprint import tempfile from counterpartylib.test import conftest # this is require near the top to do setup of the test suite from counterpartylib.test.fixtures.params import DEFAULT_PARAMS as DP from counterpartylib.test import util_test from counterpartylib.test.util_test im...
86e01016763cd96e6c623b554811a10cceb02fe3
rnacentral/portal/templatetags/portal_extras.py
rnacentral/portal/templatetags/portal_extras.py
""" Copyright [2009-2015] EMBL-European Bioinformatics Institute 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 a...
""" Copyright [2009-2015] EMBL-European Bioinformatics Institute 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 a...
Update Expert Databases columns in the footer
Update Expert Databases columns in the footer
Python
apache-2.0
RNAcentral/rnacentral-webcode,RNAcentral/rnacentral-webcode,RNAcentral/rnacentral-webcode,RNAcentral/rnacentral-webcode
""" Copyright [2009-2015] EMBL-European Bioinformatics Institute 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 a...
""" Copyright [2009-2015] EMBL-European Bioinformatics Institute 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 a...
<commit_before>""" Copyright [2009-2015] EMBL-European Bioinformatics Institute 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 appl...
""" Copyright [2009-2015] EMBL-European Bioinformatics Institute 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 a...
""" Copyright [2009-2015] EMBL-European Bioinformatics Institute 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 a...
<commit_before>""" Copyright [2009-2015] EMBL-European Bioinformatics Institute 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 appl...
4bb164688a90e2b07ff0e0c3a74ce8b27f743d4b
contrib/core/actions/inject_trigger.py
contrib/core/actions/inject_trigger.py
# Licensed to the StackStorm, Inc ('StackStorm') under one or more # contributor license agreements. See the NOTICE file distributed with # this work for additional information regarding copyright ownership. # The ASF licenses this file to You under the Apache License, Version 2.0 # (the "License"); you may not use th...
# Licensed to the StackStorm, Inc ('StackStorm') under one or more # contributor license agreements. See the NOTICE file distributed with # this work for additional information regarding copyright ownership. # The ASF licenses this file to You under the Apache License, Version 2.0 # (the "License"); you may not use th...
Add a comment / clarfification.
Add a comment / clarfification.
Python
apache-2.0
Plexxi/st2,StackStorm/st2,nzlosh/st2,Plexxi/st2,Plexxi/st2,StackStorm/st2,nzlosh/st2,StackStorm/st2,nzlosh/st2,Plexxi/st2,StackStorm/st2,nzlosh/st2
# Licensed to the StackStorm, Inc ('StackStorm') under one or more # contributor license agreements. See the NOTICE file distributed with # this work for additional information regarding copyright ownership. # The ASF licenses this file to You under the Apache License, Version 2.0 # (the "License"); you may not use th...
# Licensed to the StackStorm, Inc ('StackStorm') under one or more # contributor license agreements. See the NOTICE file distributed with # this work for additional information regarding copyright ownership. # The ASF licenses this file to You under the Apache License, Version 2.0 # (the "License"); you may not use th...
<commit_before># Licensed to the StackStorm, Inc ('StackStorm') under one or more # contributor license agreements. See the NOTICE file distributed with # this work for additional information regarding copyright ownership. # The ASF licenses this file to You under the Apache License, Version 2.0 # (the "License"); you...
# Licensed to the StackStorm, Inc ('StackStorm') under one or more # contributor license agreements. See the NOTICE file distributed with # this work for additional information regarding copyright ownership. # The ASF licenses this file to You under the Apache License, Version 2.0 # (the "License"); you may not use th...
# Licensed to the StackStorm, Inc ('StackStorm') under one or more # contributor license agreements. See the NOTICE file distributed with # this work for additional information regarding copyright ownership. # The ASF licenses this file to You under the Apache License, Version 2.0 # (the "License"); you may not use th...
<commit_before># Licensed to the StackStorm, Inc ('StackStorm') under one or more # contributor license agreements. See the NOTICE file distributed with # this work for additional information regarding copyright ownership. # The ASF licenses this file to You under the Apache License, Version 2.0 # (the "License"); you...
8d0c87b21b17f0567dc4ce642437860cdf35bc6b
linter.py
linter.py
# # linter.py # Linter for SublimeLinter3, a code checking framework for Sublime Text 3 # # Copyright (c) 2014 CorvisaCloud, LLC # # License: MIT # """This module exports the Luacheck plugin class.""" from SublimeLinter.lint import Linter class Luacheck(Linter): """Provides an interface to luacheck.""" syn...
# # linter.py # Linter for SublimeLinter3, a code checking framework for Sublime Text 3 # # Copyright (c) 2015-2017 The SublimeLinter Community # Copyright (c) 2014 CorvisaCloud, LLC # # License: MIT # """This module exports the Luacheck plugin class.""" from SublimeLinter.lint import Linter class Luacheck(Linter):...
Update for luacheck >= 0.11.0
Update for luacheck >= 0.11.0 * Remove 'channel' from default ignore list. * Remove SublimeLinter inline options, use luacheck inline options. * Use `--ranges` to highlight tokens correctly. * Use `--codes` to distinguish warnings from errors. * Use `--filename` to apply per-path config overrides correctly. * Add vers...
Python
mit
SublimeLinter/SublimeLinter-luacheck
# # linter.py # Linter for SublimeLinter3, a code checking framework for Sublime Text 3 # # Copyright (c) 2014 CorvisaCloud, LLC # # License: MIT # """This module exports the Luacheck plugin class.""" from SublimeLinter.lint import Linter class Luacheck(Linter): """Provides an interface to luacheck.""" syn...
# # linter.py # Linter for SublimeLinter3, a code checking framework for Sublime Text 3 # # Copyright (c) 2015-2017 The SublimeLinter Community # Copyright (c) 2014 CorvisaCloud, LLC # # License: MIT # """This module exports the Luacheck plugin class.""" from SublimeLinter.lint import Linter class Luacheck(Linter):...
<commit_before># # linter.py # Linter for SublimeLinter3, a code checking framework for Sublime Text 3 # # Copyright (c) 2014 CorvisaCloud, LLC # # License: MIT # """This module exports the Luacheck plugin class.""" from SublimeLinter.lint import Linter class Luacheck(Linter): """Provides an interface to luache...
# # linter.py # Linter for SublimeLinter3, a code checking framework for Sublime Text 3 # # Copyright (c) 2015-2017 The SublimeLinter Community # Copyright (c) 2014 CorvisaCloud, LLC # # License: MIT # """This module exports the Luacheck plugin class.""" from SublimeLinter.lint import Linter class Luacheck(Linter):...
# # linter.py # Linter for SublimeLinter3, a code checking framework for Sublime Text 3 # # Copyright (c) 2014 CorvisaCloud, LLC # # License: MIT # """This module exports the Luacheck plugin class.""" from SublimeLinter.lint import Linter class Luacheck(Linter): """Provides an interface to luacheck.""" syn...
<commit_before># # linter.py # Linter for SublimeLinter3, a code checking framework for Sublime Text 3 # # Copyright (c) 2014 CorvisaCloud, LLC # # License: MIT # """This module exports the Luacheck plugin class.""" from SublimeLinter.lint import Linter class Luacheck(Linter): """Provides an interface to luache...
0e5dbca7b28ad12f8b285418b815d8706f494c56
web_scraper/core/proxy_pinger.py
web_scraper/core/proxy_pinger.py
from platform import system as system_name from os import system as system_call def ping_several_hosts(hosts_list): """ Ping all hosts in hosts_list and return dict with statuses of hosts Positional Arguments: host_lists (list): a list of hostnames Return: dict: dict containing hosts ...
from platform import system as system_name from os import system as system_call def ping_several_hosts(hosts_list): """Ping all hosts in hosts_list and return dict with statuses of hosts Positional Arguments: host_lists (list): a list of hostnames Return: dict: dict containing hosts t...
Fix whitespace in docs in ping_several_hosts
Fix whitespace in docs in ping_several_hosts
Python
mit
Samuel-L/cli-ws,Samuel-L/cli-ws
from platform import system as system_name from os import system as system_call def ping_several_hosts(hosts_list): """ Ping all hosts in hosts_list and return dict with statuses of hosts Positional Arguments: host_lists (list): a list of hostnames Return: dict: dict containing hosts ...
from platform import system as system_name from os import system as system_call def ping_several_hosts(hosts_list): """Ping all hosts in hosts_list and return dict with statuses of hosts Positional Arguments: host_lists (list): a list of hostnames Return: dict: dict containing hosts t...
<commit_before>from platform import system as system_name from os import system as system_call def ping_several_hosts(hosts_list): """ Ping all hosts in hosts_list and return dict with statuses of hosts Positional Arguments: host_lists (list): a list of hostnames Return: dict: dict co...
from platform import system as system_name from os import system as system_call def ping_several_hosts(hosts_list): """Ping all hosts in hosts_list and return dict with statuses of hosts Positional Arguments: host_lists (list): a list of hostnames Return: dict: dict containing hosts t...
from platform import system as system_name from os import system as system_call def ping_several_hosts(hosts_list): """ Ping all hosts in hosts_list and return dict with statuses of hosts Positional Arguments: host_lists (list): a list of hostnames Return: dict: dict containing hosts ...
<commit_before>from platform import system as system_name from os import system as system_call def ping_several_hosts(hosts_list): """ Ping all hosts in hosts_list and return dict with statuses of hosts Positional Arguments: host_lists (list): a list of hostnames Return: dict: dict co...
41aa2c20a564c87fac1fd02d3bf40db84b02d49d
testing/test_run.py
testing/test_run.py
from regr_test import run from subprocess import check_output import os def test_source(): script = 'test_env.sh' var_name, var_value = 'TESTVAR', 'This is a test' with open(script, 'w') as f: f.write('export %s="%s"' % (var_name, var_value)) env = run.source(script) cmd = ['/bin/bash', ...
from regr_test import run import os from subprocess import check_output from tempfile import NamedTemporaryFile def test_source(): var_name, var_value = 'TESTVAR', 'This is a test' with NamedTemporaryFile('w', delete=False) as f: f.write('export %s="%s"' % (var_name, var_value)) script_name =...
Make a test more secure
Make a test more secure Choose a random filename to avoid overwriting a file.
Python
mit
davidchall/nrtest
from regr_test import run from subprocess import check_output import os def test_source(): script = 'test_env.sh' var_name, var_value = 'TESTVAR', 'This is a test' with open(script, 'w') as f: f.write('export %s="%s"' % (var_name, var_value)) env = run.source(script) cmd = ['/bin/bash', ...
from regr_test import run import os from subprocess import check_output from tempfile import NamedTemporaryFile def test_source(): var_name, var_value = 'TESTVAR', 'This is a test' with NamedTemporaryFile('w', delete=False) as f: f.write('export %s="%s"' % (var_name, var_value)) script_name =...
<commit_before>from regr_test import run from subprocess import check_output import os def test_source(): script = 'test_env.sh' var_name, var_value = 'TESTVAR', 'This is a test' with open(script, 'w') as f: f.write('export %s="%s"' % (var_name, var_value)) env = run.source(script) cmd =...
from regr_test import run import os from subprocess import check_output from tempfile import NamedTemporaryFile def test_source(): var_name, var_value = 'TESTVAR', 'This is a test' with NamedTemporaryFile('w', delete=False) as f: f.write('export %s="%s"' % (var_name, var_value)) script_name =...
from regr_test import run from subprocess import check_output import os def test_source(): script = 'test_env.sh' var_name, var_value = 'TESTVAR', 'This is a test' with open(script, 'w') as f: f.write('export %s="%s"' % (var_name, var_value)) env = run.source(script) cmd = ['/bin/bash', ...
<commit_before>from regr_test import run from subprocess import check_output import os def test_source(): script = 'test_env.sh' var_name, var_value = 'TESTVAR', 'This is a test' with open(script, 'w') as f: f.write('export %s="%s"' % (var_name, var_value)) env = run.source(script) cmd =...
6f25ac61617547726ff6410f3095456b98d584eb
proj/proj/utils/account.py
proj/proj/utils/account.py
# coding: utf-8 from flask import session from ..models import User def signin_user(user, permenent): """Sign in user""" session.permanent = permenent session['user_id'] = user.id def signout_user(): """Sign out user""" session.pop('user_id', None) def get_current_user(): """获取当前user,同时进行s...
# coding: utf-8 from flask import session from ..models import User def signin_user(user, permenent=True): """Sign in user""" session.permanent = permenent session['user_id'] = user.id def signout_user(): """Sign out user""" session.pop('user_id', None) def get_current_user(): """获取当前user,...
Set permenent to True in utils.signin_user method.
Set permenent to True in utils.signin_user method.
Python
mit
1045347128/Flask-Boost,hustlzp/Flask-Boost,hustlzp/Flask-Boost,1045347128/Flask-Boost,hustlzp/Flask-Boost,1045347128/Flask-Boost,1045347128/Flask-Boost,hustlzp/Flask-Boost
# coding: utf-8 from flask import session from ..models import User def signin_user(user, permenent): """Sign in user""" session.permanent = permenent session['user_id'] = user.id def signout_user(): """Sign out user""" session.pop('user_id', None) def get_current_user(): """获取当前user,同时进行s...
# coding: utf-8 from flask import session from ..models import User def signin_user(user, permenent=True): """Sign in user""" session.permanent = permenent session['user_id'] = user.id def signout_user(): """Sign out user""" session.pop('user_id', None) def get_current_user(): """获取当前user,...
<commit_before># coding: utf-8 from flask import session from ..models import User def signin_user(user, permenent): """Sign in user""" session.permanent = permenent session['user_id'] = user.id def signout_user(): """Sign out user""" session.pop('user_id', None) def get_current_user(): ""...
# coding: utf-8 from flask import session from ..models import User def signin_user(user, permenent=True): """Sign in user""" session.permanent = permenent session['user_id'] = user.id def signout_user(): """Sign out user""" session.pop('user_id', None) def get_current_user(): """获取当前user,...
# coding: utf-8 from flask import session from ..models import User def signin_user(user, permenent): """Sign in user""" session.permanent = permenent session['user_id'] = user.id def signout_user(): """Sign out user""" session.pop('user_id', None) def get_current_user(): """获取当前user,同时进行s...
<commit_before># coding: utf-8 from flask import session from ..models import User def signin_user(user, permenent): """Sign in user""" session.permanent = permenent session['user_id'] = user.id def signout_user(): """Sign out user""" session.pop('user_id', None) def get_current_user(): ""...