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
e4e3f0d7270e93e6123dbf05e1f51993e38d970c
tests/cpydiff/types_exception_subclassinit.py
tests/cpydiff/types_exception_subclassinit.py
""" categories: Types,Exception description: Exception.__init__ raises TypeError if overridden and called by subclass cause: Unknown workaround: Unknown """ class A(Exception): def __init__(self): Exception.__init__(self) a = A()
""" categories: Types,Exception description: Exception.__init__ method does not exist. cause: Subclassing native classes is not fully supported in MicroPython. workaround: Call using ``super()`` instead:: class A(Exception): def __init__(self): super().__init__() """ class A(Exception): def __init__(se...
Update subclassing Exception case and give work-around.
tests/cpydiff: Update subclassing Exception case and give work-around.
Python
mit
adafruit/micropython,pfalcon/micropython,adafruit/circuitpython,blazewicz/micropython,adafruit/circuitpython,blazewicz/micropython,ryannathans/micropython,ryannathans/micropython,henriknelson/micropython,MrSurly/micropython,trezor/micropython,adafruit/micropython,adafruit/micropython,dmazzella/micropython,pramasoul/mic...
""" categories: Types,Exception description: Exception.__init__ raises TypeError if overridden and called by subclass cause: Unknown workaround: Unknown """ class A(Exception): def __init__(self): Exception.__init__(self) a = A() tests/cpydiff: Update subclassing Exception case and give work-around.
""" categories: Types,Exception description: Exception.__init__ method does not exist. cause: Subclassing native classes is not fully supported in MicroPython. workaround: Call using ``super()`` instead:: class A(Exception): def __init__(self): super().__init__() """ class A(Exception): def __init__(se...
<commit_before>""" categories: Types,Exception description: Exception.__init__ raises TypeError if overridden and called by subclass cause: Unknown workaround: Unknown """ class A(Exception): def __init__(self): Exception.__init__(self) a = A() <commit_msg>tests/cpydiff: Update subclassing Exception case a...
""" categories: Types,Exception description: Exception.__init__ method does not exist. cause: Subclassing native classes is not fully supported in MicroPython. workaround: Call using ``super()`` instead:: class A(Exception): def __init__(self): super().__init__() """ class A(Exception): def __init__(se...
""" categories: Types,Exception description: Exception.__init__ raises TypeError if overridden and called by subclass cause: Unknown workaround: Unknown """ class A(Exception): def __init__(self): Exception.__init__(self) a = A() tests/cpydiff: Update subclassing Exception case and give work-around.""" cat...
<commit_before>""" categories: Types,Exception description: Exception.__init__ raises TypeError if overridden and called by subclass cause: Unknown workaround: Unknown """ class A(Exception): def __init__(self): Exception.__init__(self) a = A() <commit_msg>tests/cpydiff: Update subclassing Exception case a...
1f7979edaa918a52702bea5de6f2bdd7a8e60796
encryption.py
encryption.py
import base64 from Crypto.Cipher import AES from Crypto import Random def encrypt(raw, key): raw = pad(raw) iv = Random.new().read(AES.block_size) cipher = AES.new(key, AES.MODE_CBC, iv) return base64.b64encode(iv + cipher.encrypt(raw)) def decrypt(enc, key): enc = base64.b64decode(enc) iv = e...
import base64 from Crypto.Cipher import AES from Crypto import Random def encrypt(raw, key): raw = pad(raw) iv = Random.new().read(AES.block_size) cipher = AES.new(key, AES.MODE_CBC, iv) return base64.b64encode(iv + cipher.encrypt(raw)).decode('utf-8') def decrypt(enc, key): enc = base64.b64decode...
Add decode(utf-8) to return on encrypt
Add decode(utf-8) to return on encrypt
Python
mit
regexpressyourself/passman
import base64 from Crypto.Cipher import AES from Crypto import Random def encrypt(raw, key): raw = pad(raw) iv = Random.new().read(AES.block_size) cipher = AES.new(key, AES.MODE_CBC, iv) return base64.b64encode(iv + cipher.encrypt(raw)) def decrypt(enc, key): enc = base64.b64decode(enc) iv = e...
import base64 from Crypto.Cipher import AES from Crypto import Random def encrypt(raw, key): raw = pad(raw) iv = Random.new().read(AES.block_size) cipher = AES.new(key, AES.MODE_CBC, iv) return base64.b64encode(iv + cipher.encrypt(raw)).decode('utf-8') def decrypt(enc, key): enc = base64.b64decode...
<commit_before>import base64 from Crypto.Cipher import AES from Crypto import Random def encrypt(raw, key): raw = pad(raw) iv = Random.new().read(AES.block_size) cipher = AES.new(key, AES.MODE_CBC, iv) return base64.b64encode(iv + cipher.encrypt(raw)) def decrypt(enc, key): enc = base64.b64decode(...
import base64 from Crypto.Cipher import AES from Crypto import Random def encrypt(raw, key): raw = pad(raw) iv = Random.new().read(AES.block_size) cipher = AES.new(key, AES.MODE_CBC, iv) return base64.b64encode(iv + cipher.encrypt(raw)).decode('utf-8') def decrypt(enc, key): enc = base64.b64decode...
import base64 from Crypto.Cipher import AES from Crypto import Random def encrypt(raw, key): raw = pad(raw) iv = Random.new().read(AES.block_size) cipher = AES.new(key, AES.MODE_CBC, iv) return base64.b64encode(iv + cipher.encrypt(raw)) def decrypt(enc, key): enc = base64.b64decode(enc) iv = e...
<commit_before>import base64 from Crypto.Cipher import AES from Crypto import Random def encrypt(raw, key): raw = pad(raw) iv = Random.new().read(AES.block_size) cipher = AES.new(key, AES.MODE_CBC, iv) return base64.b64encode(iv + cipher.encrypt(raw)) def decrypt(enc, key): enc = base64.b64decode(...
68374c16d66cdeea9dbce620dc29d375e3009070
bcbio/bam/fasta.py
bcbio/bam/fasta.py
from Bio import SeqIO def sequence_length(fasta): """ return a dict of the lengths of sequences in a fasta file """ file_handle = open(fasta) in_handle = SeqIO.parse(file_handle, "fasta") records = {record.id: len(record) for record in in_handle} file_handle.close() return records
from Bio import SeqIO def sequence_length(fasta): """ return a dict of the lengths of sequences in a fasta file """ sequences = SeqIO.parse(fasta, "fasta") records = {record.id: len(record) for record in sequences} return records def sequence_names(fasta): """ return a list of the sequ...
Add function to get list of sequence names from a FASTA file.
Add function to get list of sequence names from a FASTA file. Refactor to be simpler.
Python
mit
vladsaveliev/bcbio-nextgen,biocyberman/bcbio-nextgen,chapmanb/bcbio-nextgen,chapmanb/bcbio-nextgen,biocyberman/bcbio-nextgen,chapmanb/bcbio-nextgen,vladsaveliev/bcbio-nextgen,lbeltrame/bcbio-nextgen,vladsaveliev/bcbio-nextgen,brainstorm/bcbio-nextgen,lbeltrame/bcbio-nextgen,biocyberman/bcbio-nextgen,a113n/bcbio-nextgen...
from Bio import SeqIO def sequence_length(fasta): """ return a dict of the lengths of sequences in a fasta file """ file_handle = open(fasta) in_handle = SeqIO.parse(file_handle, "fasta") records = {record.id: len(record) for record in in_handle} file_handle.close() return records Add f...
from Bio import SeqIO def sequence_length(fasta): """ return a dict of the lengths of sequences in a fasta file """ sequences = SeqIO.parse(fasta, "fasta") records = {record.id: len(record) for record in sequences} return records def sequence_names(fasta): """ return a list of the sequ...
<commit_before>from Bio import SeqIO def sequence_length(fasta): """ return a dict of the lengths of sequences in a fasta file """ file_handle = open(fasta) in_handle = SeqIO.parse(file_handle, "fasta") records = {record.id: len(record) for record in in_handle} file_handle.close() retur...
from Bio import SeqIO def sequence_length(fasta): """ return a dict of the lengths of sequences in a fasta file """ sequences = SeqIO.parse(fasta, "fasta") records = {record.id: len(record) for record in sequences} return records def sequence_names(fasta): """ return a list of the sequ...
from Bio import SeqIO def sequence_length(fasta): """ return a dict of the lengths of sequences in a fasta file """ file_handle = open(fasta) in_handle = SeqIO.parse(file_handle, "fasta") records = {record.id: len(record) for record in in_handle} file_handle.close() return records Add f...
<commit_before>from Bio import SeqIO def sequence_length(fasta): """ return a dict of the lengths of sequences in a fasta file """ file_handle = open(fasta) in_handle = SeqIO.parse(file_handle, "fasta") records = {record.id: len(record) for record in in_handle} file_handle.close() retur...
e6d7ec55bf00960d42b3288ae5e0e501030d5fa9
test/library/gyptest-shared-obj-install-path.py
test/library/gyptest-shared-obj-install-path.py
#!/usr/bin/env python # Copyright (c) 2010 Google Inc. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """ Verifies that .so files that are order only dependencies are specified by their install location rather than by their alias. """ import...
#!/usr/bin/env python # Copyright (c) 2010 Google Inc. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """ Verifies that .so files that are order only dependencies are specified by their install location rather than by their alias. """ # Pyth...
Add with_statement import for python2.5.
Add with_statement import for python2.5. See http://www.python.org/dev/peps/pep-0343/ which describes the with statement. Review URL: http://codereview.chromium.org/5690003
Python
bsd-3-clause
witwall/gyp,witwall/gyp,witwall/gyp,witwall/gyp,witwall/gyp
#!/usr/bin/env python # Copyright (c) 2010 Google Inc. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """ Verifies that .so files that are order only dependencies are specified by their install location rather than by their alias. """ import...
#!/usr/bin/env python # Copyright (c) 2010 Google Inc. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """ Verifies that .so files that are order only dependencies are specified by their install location rather than by their alias. """ # Pyth...
<commit_before>#!/usr/bin/env python # Copyright (c) 2010 Google Inc. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """ Verifies that .so files that are order only dependencies are specified by their install location rather than by their ali...
#!/usr/bin/env python # Copyright (c) 2010 Google Inc. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """ Verifies that .so files that are order only dependencies are specified by their install location rather than by their alias. """ # Pyth...
#!/usr/bin/env python # Copyright (c) 2010 Google Inc. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """ Verifies that .so files that are order only dependencies are specified by their install location rather than by their alias. """ import...
<commit_before>#!/usr/bin/env python # Copyright (c) 2010 Google Inc. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """ Verifies that .so files that are order only dependencies are specified by their install location rather than by their ali...
4e1d0ce04c762d60eedf5bd2ecdd689fb706cbc2
anserv/cronjobs/__init__.py
anserv/cronjobs/__init__.py
registered = {} registered_lock = {} parameters = {} def register(f=None, lock=True, params={}): """Decorator to add the function to the cronjob library. @cronjobs.register def my_task(): print('I can be run once/machine at a time.') @cronjobs.register(lock=False) def ...
registered = {} registered_lock = {} parameters = {} from decorator import decorator def register(f=None, lock=True, params={}): """Decorator to add the function to the cronjob library. @cronjobs.register def my_task(): print('I can be run once/machine at a time.') @cronjobs.r...
Change decorators in cron to preserve signature
Change decorators in cron to preserve signature
Python
agpl-3.0
edx/edxanalytics,edx/edxanalytics,edx/edxanalytics,edx/insights,edx/insights,edx/edxanalytics
registered = {} registered_lock = {} parameters = {} def register(f=None, lock=True, params={}): """Decorator to add the function to the cronjob library. @cronjobs.register def my_task(): print('I can be run once/machine at a time.') @cronjobs.register(lock=False) def ...
registered = {} registered_lock = {} parameters = {} from decorator import decorator def register(f=None, lock=True, params={}): """Decorator to add the function to the cronjob library. @cronjobs.register def my_task(): print('I can be run once/machine at a time.') @cronjobs.r...
<commit_before>registered = {} registered_lock = {} parameters = {} def register(f=None, lock=True, params={}): """Decorator to add the function to the cronjob library. @cronjobs.register def my_task(): print('I can be run once/machine at a time.') @cronjobs.register(lock=Fals...
registered = {} registered_lock = {} parameters = {} from decorator import decorator def register(f=None, lock=True, params={}): """Decorator to add the function to the cronjob library. @cronjobs.register def my_task(): print('I can be run once/machine at a time.') @cronjobs.r...
registered = {} registered_lock = {} parameters = {} def register(f=None, lock=True, params={}): """Decorator to add the function to the cronjob library. @cronjobs.register def my_task(): print('I can be run once/machine at a time.') @cronjobs.register(lock=False) def ...
<commit_before>registered = {} registered_lock = {} parameters = {} def register(f=None, lock=True, params={}): """Decorator to add the function to the cronjob library. @cronjobs.register def my_task(): print('I can be run once/machine at a time.') @cronjobs.register(lock=Fals...
c3a15b4753ecfe7436b08456da90efb7be545a50
test/test_exceptions.py
test/test_exceptions.py
from neomodel import StructuredNode, StringProperty, DoesNotExist, CypherException import pickle class Person(StructuredNode): name = StringProperty(unique_index=True) def test_cypher_exception_can_be_displayed(): print CypherException("SOME QUERY", (), "ERROR", None, None) def test_object_does_not_exist()...
from neomodel import StructuredNode, StringProperty, DoesNotExist, CypherException import pickle class Person(StructuredNode): name = StringProperty(unique_index=True) def test_cypher_exception_can_be_displayed(): print(CypherException("SOME QUERY", (), "ERROR", None, None)) def test_object_does_not_exist(...
Fix syntax Error for compability with python 3.X
Fix syntax Error for compability with python 3.X
Python
mit
robinedwards/neomodel,wcooley/neomodel,robinedwards/neomodel,pombredanne/neomodel,fpieper/neomodel
from neomodel import StructuredNode, StringProperty, DoesNotExist, CypherException import pickle class Person(StructuredNode): name = StringProperty(unique_index=True) def test_cypher_exception_can_be_displayed(): print CypherException("SOME QUERY", (), "ERROR", None, None) def test_object_does_not_exist()...
from neomodel import StructuredNode, StringProperty, DoesNotExist, CypherException import pickle class Person(StructuredNode): name = StringProperty(unique_index=True) def test_cypher_exception_can_be_displayed(): print(CypherException("SOME QUERY", (), "ERROR", None, None)) def test_object_does_not_exist(...
<commit_before>from neomodel import StructuredNode, StringProperty, DoesNotExist, CypherException import pickle class Person(StructuredNode): name = StringProperty(unique_index=True) def test_cypher_exception_can_be_displayed(): print CypherException("SOME QUERY", (), "ERROR", None, None) def test_object_d...
from neomodel import StructuredNode, StringProperty, DoesNotExist, CypherException import pickle class Person(StructuredNode): name = StringProperty(unique_index=True) def test_cypher_exception_can_be_displayed(): print(CypherException("SOME QUERY", (), "ERROR", None, None)) def test_object_does_not_exist(...
from neomodel import StructuredNode, StringProperty, DoesNotExist, CypherException import pickle class Person(StructuredNode): name = StringProperty(unique_index=True) def test_cypher_exception_can_be_displayed(): print CypherException("SOME QUERY", (), "ERROR", None, None) def test_object_does_not_exist()...
<commit_before>from neomodel import StructuredNode, StringProperty, DoesNotExist, CypherException import pickle class Person(StructuredNode): name = StringProperty(unique_index=True) def test_cypher_exception_can_be_displayed(): print CypherException("SOME QUERY", (), "ERROR", None, None) def test_object_d...
14a4b836853909763b8961dfcdc58477607180fd
protocols/views.py
protocols/views.py
from django.shortcuts import render from django.conf.urls.defaults import * from django.contrib.auth.decorators import user_passes_test from .forms import ProtocolForm, TopicFormSet def can_add_protocols(user): return user.is_authenticated() and user.has_perm('protocols.add_protocol') @user_passes_test(can_ad...
from django.shortcuts import render from django.conf.urls import * from django.contrib.auth.decorators import user_passes_test from .forms import ProtocolForm, TopicFormSet def can_add_protocols(user): return user.is_authenticated() and user.has_perm('protocols.add_protocol') @user_passes_test(can_add_protoco...
Change django.conf.urls.defaults (it is depricated)
Change django.conf.urls.defaults (it is depricated)
Python
mit
Hackfmi/Diaphanum,Hackfmi/Diaphanum
from django.shortcuts import render from django.conf.urls.defaults import * from django.contrib.auth.decorators import user_passes_test from .forms import ProtocolForm, TopicFormSet def can_add_protocols(user): return user.is_authenticated() and user.has_perm('protocols.add_protocol') @user_passes_test(can_ad...
from django.shortcuts import render from django.conf.urls import * from django.contrib.auth.decorators import user_passes_test from .forms import ProtocolForm, TopicFormSet def can_add_protocols(user): return user.is_authenticated() and user.has_perm('protocols.add_protocol') @user_passes_test(can_add_protoco...
<commit_before>from django.shortcuts import render from django.conf.urls.defaults import * from django.contrib.auth.decorators import user_passes_test from .forms import ProtocolForm, TopicFormSet def can_add_protocols(user): return user.is_authenticated() and user.has_perm('protocols.add_protocol') @user_pas...
from django.shortcuts import render from django.conf.urls import * from django.contrib.auth.decorators import user_passes_test from .forms import ProtocolForm, TopicFormSet def can_add_protocols(user): return user.is_authenticated() and user.has_perm('protocols.add_protocol') @user_passes_test(can_add_protoco...
from django.shortcuts import render from django.conf.urls.defaults import * from django.contrib.auth.decorators import user_passes_test from .forms import ProtocolForm, TopicFormSet def can_add_protocols(user): return user.is_authenticated() and user.has_perm('protocols.add_protocol') @user_passes_test(can_ad...
<commit_before>from django.shortcuts import render from django.conf.urls.defaults import * from django.contrib.auth.decorators import user_passes_test from .forms import ProtocolForm, TopicFormSet def can_add_protocols(user): return user.is_authenticated() and user.has_perm('protocols.add_protocol') @user_pas...
6fa5c20f4d3b6ea9716adbf4c5fd50739f2f987e
protractor/test.py
protractor/test.py
# -*- coding: utf-8 -*- import os import subprocess class ProtractorTestCaseMixin(object): protractor_conf = 'protractor.conf.js' suite = None specs = None @classmethod def setUpClass(cls): super(ProtractorTestCaseMixin, cls).setUpClass() with open(os.devnull, 'wb') as f: ...
# -*- coding: utf-8 -*- import os import subprocess class ProtractorTestCaseMixin(object): protractor_conf = 'protractor.conf.js' suite = None specs = None @classmethod def setUpClass(cls): super(ProtractorTestCaseMixin, cls).setUpClass() with open(os.devnull, 'wb') as f: ...
Add hook for protactor params
Add hook for protactor params
Python
mit
jpulec/django-protractor,penguin359/django-protractor
# -*- coding: utf-8 -*- import os import subprocess class ProtractorTestCaseMixin(object): protractor_conf = 'protractor.conf.js' suite = None specs = None @classmethod def setUpClass(cls): super(ProtractorTestCaseMixin, cls).setUpClass() with open(os.devnull, 'wb') as f: ...
# -*- coding: utf-8 -*- import os import subprocess class ProtractorTestCaseMixin(object): protractor_conf = 'protractor.conf.js' suite = None specs = None @classmethod def setUpClass(cls): super(ProtractorTestCaseMixin, cls).setUpClass() with open(os.devnull, 'wb') as f: ...
<commit_before># -*- coding: utf-8 -*- import os import subprocess class ProtractorTestCaseMixin(object): protractor_conf = 'protractor.conf.js' suite = None specs = None @classmethod def setUpClass(cls): super(ProtractorTestCaseMixin, cls).setUpClass() with open(os.devnull, 'wb'...
# -*- coding: utf-8 -*- import os import subprocess class ProtractorTestCaseMixin(object): protractor_conf = 'protractor.conf.js' suite = None specs = None @classmethod def setUpClass(cls): super(ProtractorTestCaseMixin, cls).setUpClass() with open(os.devnull, 'wb') as f: ...
# -*- coding: utf-8 -*- import os import subprocess class ProtractorTestCaseMixin(object): protractor_conf = 'protractor.conf.js' suite = None specs = None @classmethod def setUpClass(cls): super(ProtractorTestCaseMixin, cls).setUpClass() with open(os.devnull, 'wb') as f: ...
<commit_before># -*- coding: utf-8 -*- import os import subprocess class ProtractorTestCaseMixin(object): protractor_conf = 'protractor.conf.js' suite = None specs = None @classmethod def setUpClass(cls): super(ProtractorTestCaseMixin, cls).setUpClass() with open(os.devnull, 'wb'...
ac850c8f9284fbe6fd8e6318431d5e4856f26c7c
openquake/calculators/tests/classical_risk_test.py
openquake/calculators/tests/classical_risk_test.py
import unittest from nose.plugins.attrib import attr from openquake.qa_tests_data.classical_risk import ( case_1, case_2, case_3, case_4) from openquake.calculators.tests import CalculatorTestCase class ClassicalRiskTestCase(CalculatorTestCase): @attr('qa', 'risk', 'classical_risk') def test_case_1(self...
import unittest from nose.plugins.attrib import attr from openquake.qa_tests_data.classical_risk import ( case_1, case_2, case_3, case_4) from openquake.calculators.tests import CalculatorTestCase class ClassicalRiskTestCase(CalculatorTestCase): @attr('qa', 'risk', 'classical_risk') def test_case_1(self...
Work on classical_risk test_case_1 and test_case_2
Work on classical_risk test_case_1 and test_case_2
Python
agpl-3.0
gem/oq-engine,gem/oq-engine,gem/oq-engine,gem/oq-engine,gem/oq-engine
import unittest from nose.plugins.attrib import attr from openquake.qa_tests_data.classical_risk import ( case_1, case_2, case_3, case_4) from openquake.calculators.tests import CalculatorTestCase class ClassicalRiskTestCase(CalculatorTestCase): @attr('qa', 'risk', 'classical_risk') def test_case_1(self...
import unittest from nose.plugins.attrib import attr from openquake.qa_tests_data.classical_risk import ( case_1, case_2, case_3, case_4) from openquake.calculators.tests import CalculatorTestCase class ClassicalRiskTestCase(CalculatorTestCase): @attr('qa', 'risk', 'classical_risk') def test_case_1(self...
<commit_before>import unittest from nose.plugins.attrib import attr from openquake.qa_tests_data.classical_risk import ( case_1, case_2, case_3, case_4) from openquake.calculators.tests import CalculatorTestCase class ClassicalRiskTestCase(CalculatorTestCase): @attr('qa', 'risk', 'classical_risk') def t...
import unittest from nose.plugins.attrib import attr from openquake.qa_tests_data.classical_risk import ( case_1, case_2, case_3, case_4) from openquake.calculators.tests import CalculatorTestCase class ClassicalRiskTestCase(CalculatorTestCase): @attr('qa', 'risk', 'classical_risk') def test_case_1(self...
import unittest from nose.plugins.attrib import attr from openquake.qa_tests_data.classical_risk import ( case_1, case_2, case_3, case_4) from openquake.calculators.tests import CalculatorTestCase class ClassicalRiskTestCase(CalculatorTestCase): @attr('qa', 'risk', 'classical_risk') def test_case_1(self...
<commit_before>import unittest from nose.plugins.attrib import attr from openquake.qa_tests_data.classical_risk import ( case_1, case_2, case_3, case_4) from openquake.calculators.tests import CalculatorTestCase class ClassicalRiskTestCase(CalculatorTestCase): @attr('qa', 'risk', 'classical_risk') def t...
9a5229fe7ae4a240d91bfae59b61c5e8dda1aa13
bucketeer/test/test_commit.py
bucketeer/test/test_commit.py
import unittest, boto, os from bucketeer import commit class BuckeeterTest(unittest.TestCase): # Constants - TODO move to config file global existing_bucket, test_dir, test_file existing_bucket = 'bucket.exists' test_dir = 'bucketeer_test_dir' test_file = 'bucketeer_test_file' def setUp(self): connec...
import unittest, boto, os from bucketeer import commit class BuckeeterTest(unittest.TestCase): # Constants - TODO move to config file global existing_bucket, test_dir, test_file existing_bucket = 'bucket.exists' test_dir = 'bucketeer_test_dir' test_file = 'bucketeer_test_file' def setUp(self): connec...
Add test for new file upload to existing bucket
Add test for new file upload to existing bucket
Python
mit
mgarbacz/bucketeer
import unittest, boto, os from bucketeer import commit class BuckeeterTest(unittest.TestCase): # Constants - TODO move to config file global existing_bucket, test_dir, test_file existing_bucket = 'bucket.exists' test_dir = 'bucketeer_test_dir' test_file = 'bucketeer_test_file' def setUp(self): connec...
import unittest, boto, os from bucketeer import commit class BuckeeterTest(unittest.TestCase): # Constants - TODO move to config file global existing_bucket, test_dir, test_file existing_bucket = 'bucket.exists' test_dir = 'bucketeer_test_dir' test_file = 'bucketeer_test_file' def setUp(self): connec...
<commit_before>import unittest, boto, os from bucketeer import commit class BuckeeterTest(unittest.TestCase): # Constants - TODO move to config file global existing_bucket, test_dir, test_file existing_bucket = 'bucket.exists' test_dir = 'bucketeer_test_dir' test_file = 'bucketeer_test_file' def setUp(se...
import unittest, boto, os from bucketeer import commit class BuckeeterTest(unittest.TestCase): # Constants - TODO move to config file global existing_bucket, test_dir, test_file existing_bucket = 'bucket.exists' test_dir = 'bucketeer_test_dir' test_file = 'bucketeer_test_file' def setUp(self): connec...
import unittest, boto, os from bucketeer import commit class BuckeeterTest(unittest.TestCase): # Constants - TODO move to config file global existing_bucket, test_dir, test_file existing_bucket = 'bucket.exists' test_dir = 'bucketeer_test_dir' test_file = 'bucketeer_test_file' def setUp(self): connec...
<commit_before>import unittest, boto, os from bucketeer import commit class BuckeeterTest(unittest.TestCase): # Constants - TODO move to config file global existing_bucket, test_dir, test_file existing_bucket = 'bucket.exists' test_dir = 'bucketeer_test_dir' test_file = 'bucketeer_test_file' def setUp(se...
5da51e1820c03a76dfdb9926023848b7399691da
inthe_am/taskmanager/models/usermetadata.py
inthe_am/taskmanager/models/usermetadata.py
from django.conf import settings from django.contrib.auth.models import User from django.db import models class UserMetadata(models.Model): user = models.ForeignKey( User, related_name="metadata", unique=True, on_delete=models.CASCADE ) tos_version = models.IntegerField(default=0) tos_accepted...
from django.conf import settings from django.contrib.auth.models import User from django.db import models class UserMetadata(models.Model): user = models.OneToOneField( User, related_name="metadata", on_delete=models.CASCADE ) tos_version = models.IntegerField(default=0) tos_accepted = models....
Change mapping to avoid warning
Change mapping to avoid warning
Python
agpl-3.0
coddingtonbear/inthe.am,coddingtonbear/inthe.am,coddingtonbear/inthe.am,coddingtonbear/inthe.am,coddingtonbear/inthe.am
from django.conf import settings from django.contrib.auth.models import User from django.db import models class UserMetadata(models.Model): user = models.ForeignKey( User, related_name="metadata", unique=True, on_delete=models.CASCADE ) tos_version = models.IntegerField(default=0) tos_accepted...
from django.conf import settings from django.contrib.auth.models import User from django.db import models class UserMetadata(models.Model): user = models.OneToOneField( User, related_name="metadata", on_delete=models.CASCADE ) tos_version = models.IntegerField(default=0) tos_accepted = models....
<commit_before>from django.conf import settings from django.contrib.auth.models import User from django.db import models class UserMetadata(models.Model): user = models.ForeignKey( User, related_name="metadata", unique=True, on_delete=models.CASCADE ) tos_version = models.IntegerField(default=0) ...
from django.conf import settings from django.contrib.auth.models import User from django.db import models class UserMetadata(models.Model): user = models.OneToOneField( User, related_name="metadata", on_delete=models.CASCADE ) tos_version = models.IntegerField(default=0) tos_accepted = models....
from django.conf import settings from django.contrib.auth.models import User from django.db import models class UserMetadata(models.Model): user = models.ForeignKey( User, related_name="metadata", unique=True, on_delete=models.CASCADE ) tos_version = models.IntegerField(default=0) tos_accepted...
<commit_before>from django.conf import settings from django.contrib.auth.models import User from django.db import models class UserMetadata(models.Model): user = models.ForeignKey( User, related_name="metadata", unique=True, on_delete=models.CASCADE ) tos_version = models.IntegerField(default=0) ...
9e41b1b8d19b27cd6bd1bb81fb34c9a3adf30ad5
entrypoint.py
entrypoint.py
#!/usr/bin/python3 # # Define containerized environment for running Diosix on Qemu # # On Google Cloud Run: Creates HTTP server on port 8080 # or whatever was specified using the PORT system variable. # Outputs via the HTTP port. This requires K_SERVICE to be set. # # On all other environments: Log to stdout # # syntax...
#!/usr/bin/python3 # # Define containerized environment for running Diosix on Qemu # # On Google Cloud Run: Creates HTTP server on port 8080 # or whatever was specified using the PORT system variable. # Outputs via the HTTP port. This requires K_SERVICE to be set. # # On all other environments: Log to stdout # # syntax...
Debug Google Cloud Run support
Debug Google Cloud Run support
Python
mit
diodesign/diosix
#!/usr/bin/python3 # # Define containerized environment for running Diosix on Qemu # # On Google Cloud Run: Creates HTTP server on port 8080 # or whatever was specified using the PORT system variable. # Outputs via the HTTP port. This requires K_SERVICE to be set. # # On all other environments: Log to stdout # # syntax...
#!/usr/bin/python3 # # Define containerized environment for running Diosix on Qemu # # On Google Cloud Run: Creates HTTP server on port 8080 # or whatever was specified using the PORT system variable. # Outputs via the HTTP port. This requires K_SERVICE to be set. # # On all other environments: Log to stdout # # syntax...
<commit_before>#!/usr/bin/python3 # # Define containerized environment for running Diosix on Qemu # # On Google Cloud Run: Creates HTTP server on port 8080 # or whatever was specified using the PORT system variable. # Outputs via the HTTP port. This requires K_SERVICE to be set. # # On all other environments: Log to st...
#!/usr/bin/python3 # # Define containerized environment for running Diosix on Qemu # # On Google Cloud Run: Creates HTTP server on port 8080 # or whatever was specified using the PORT system variable. # Outputs via the HTTP port. This requires K_SERVICE to be set. # # On all other environments: Log to stdout # # syntax...
#!/usr/bin/python3 # # Define containerized environment for running Diosix on Qemu # # On Google Cloud Run: Creates HTTP server on port 8080 # or whatever was specified using the PORT system variable. # Outputs via the HTTP port. This requires K_SERVICE to be set. # # On all other environments: Log to stdout # # syntax...
<commit_before>#!/usr/bin/python3 # # Define containerized environment for running Diosix on Qemu # # On Google Cloud Run: Creates HTTP server on port 8080 # or whatever was specified using the PORT system variable. # Outputs via the HTTP port. This requires K_SERVICE to be set. # # On all other environments: Log to st...
95fffa0fbe744b9087547a14a97fb7dd0e68ba76
chainer/functions/__init__.py
chainer/functions/__init__.py
# Non-parameterized functions from accuracy import accuracy from basic_math import exp, log from concat import concat from copy import copy from dropout import dropout from identity import identity from leaky_relu import leaky_relu from lstm import lstm from mean_squared_error import mean_squared...
"""Collection of :class:`~chainer.Function` implementations.""" # Parameterized function classes from batch_normalization import BatchNormalization from convolution_2d import Convolution2D from embed_id import EmbedID from inception import Inception from linear import Linear from...
Sort function imports to fit with documentation order
Sort function imports to fit with documentation order
Python
mit
kikusu/chainer,niboshi/chainer,ttakamura/chainer,wkentaro/chainer,okuta/chainer,cupy/cupy,ktnyt/chainer,nushio3/chainer,cupy/cupy,ytoyama/yans_chainer_hackathon,chainer/chainer,okuta/chainer,jnishi/chainer,keisuke-umezawa/chainer,kashif/chainer,cupy/cupy,cupy/cupy,muupan/chainer,chainer/chainer,masia02/chainer,jnishi/c...
# Non-parameterized functions from accuracy import accuracy from basic_math import exp, log from concat import concat from copy import copy from dropout import dropout from identity import identity from leaky_relu import leaky_relu from lstm import lstm from mean_squared_error import mean_squared...
"""Collection of :class:`~chainer.Function` implementations.""" # Parameterized function classes from batch_normalization import BatchNormalization from convolution_2d import Convolution2D from embed_id import EmbedID from inception import Inception from linear import Linear from...
<commit_before># Non-parameterized functions from accuracy import accuracy from basic_math import exp, log from concat import concat from copy import copy from dropout import dropout from identity import identity from leaky_relu import leaky_relu from lstm import lstm from mean_squared_error impo...
"""Collection of :class:`~chainer.Function` implementations.""" # Parameterized function classes from batch_normalization import BatchNormalization from convolution_2d import Convolution2D from embed_id import EmbedID from inception import Inception from linear import Linear from...
# Non-parameterized functions from accuracy import accuracy from basic_math import exp, log from concat import concat from copy import copy from dropout import dropout from identity import identity from leaky_relu import leaky_relu from lstm import lstm from mean_squared_error import mean_squared...
<commit_before># Non-parameterized functions from accuracy import accuracy from basic_math import exp, log from concat import concat from copy import copy from dropout import dropout from identity import identity from leaky_relu import leaky_relu from lstm import lstm from mean_squared_error impo...
896f402c79dd3bbe7d5cbc6e59787398a96b3747
runtests.py
runtests.py
import argparse import os import sys # Force this to happen before loading django try: os.environ["DJANGO_SETTINGS_MODULE"] = "testtinymce.settings" test_dir = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) sys.path.insert(0, test_dir) except ImportError: pass else: import django f...
import argparse import os import sys # Force this to happen before loading django try: os.environ["DJANGO_SETTINGS_MODULE"] = "testtinymce.settings" test_dir = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) sys.path.insert(0, test_dir) except ImportError: pass else: import django f...
Add ability to run subset of tests
Add ability to run subset of tests
Python
mit
aljosa/django-tinymce,aljosa/django-tinymce,aljosa/django-tinymce,aljosa/django-tinymce
import argparse import os import sys # Force this to happen before loading django try: os.environ["DJANGO_SETTINGS_MODULE"] = "testtinymce.settings" test_dir = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) sys.path.insert(0, test_dir) except ImportError: pass else: import django f...
import argparse import os import sys # Force this to happen before loading django try: os.environ["DJANGO_SETTINGS_MODULE"] = "testtinymce.settings" test_dir = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) sys.path.insert(0, test_dir) except ImportError: pass else: import django f...
<commit_before>import argparse import os import sys # Force this to happen before loading django try: os.environ["DJANGO_SETTINGS_MODULE"] = "testtinymce.settings" test_dir = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) sys.path.insert(0, test_dir) except ImportError: pass else: impo...
import argparse import os import sys # Force this to happen before loading django try: os.environ["DJANGO_SETTINGS_MODULE"] = "testtinymce.settings" test_dir = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) sys.path.insert(0, test_dir) except ImportError: pass else: import django f...
import argparse import os import sys # Force this to happen before loading django try: os.environ["DJANGO_SETTINGS_MODULE"] = "testtinymce.settings" test_dir = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) sys.path.insert(0, test_dir) except ImportError: pass else: import django f...
<commit_before>import argparse import os import sys # Force this to happen before loading django try: os.environ["DJANGO_SETTINGS_MODULE"] = "testtinymce.settings" test_dir = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) sys.path.insert(0, test_dir) except ImportError: pass else: impo...
5e2697b55f1720c4c144840e680004fb28a3cfcc
runtests.py
runtests.py
#!/usr/bin/env python import sys from django.conf import settings if not settings.configured: settings.configure( DATABASES={ 'default': { 'ENGINE': 'django.db.backends.sqlite3', 'NAME': ':memory:', } }, INSTALLED_APPS=( ...
#!/usr/bin/env python import sys from django.conf import settings if not settings.configured: settings.configure( DATABASES={ 'default': { 'ENGINE': 'django.db.backends.sqlite3', 'NAME': ':memory:', } }, INSTALLED_APPS=( ...
Add more flexibity to run tests independantly
Add more flexibity to run tests independantly
Python
mit
TailorDev/django-tailordev-biblio,TailorDev/django-tailordev-biblio,TailorDev/django-tailordev-biblio,TailorDev/django-tailordev-biblio
#!/usr/bin/env python import sys from django.conf import settings if not settings.configured: settings.configure( DATABASES={ 'default': { 'ENGINE': 'django.db.backends.sqlite3', 'NAME': ':memory:', } }, INSTALLED_APPS=( ...
#!/usr/bin/env python import sys from django.conf import settings if not settings.configured: settings.configure( DATABASES={ 'default': { 'ENGINE': 'django.db.backends.sqlite3', 'NAME': ':memory:', } }, INSTALLED_APPS=( ...
<commit_before>#!/usr/bin/env python import sys from django.conf import settings if not settings.configured: settings.configure( DATABASES={ 'default': { 'ENGINE': 'django.db.backends.sqlite3', 'NAME': ':memory:', } }, INSTALLED_APPS...
#!/usr/bin/env python import sys from django.conf import settings if not settings.configured: settings.configure( DATABASES={ 'default': { 'ENGINE': 'django.db.backends.sqlite3', 'NAME': ':memory:', } }, INSTALLED_APPS=( ...
#!/usr/bin/env python import sys from django.conf import settings if not settings.configured: settings.configure( DATABASES={ 'default': { 'ENGINE': 'django.db.backends.sqlite3', 'NAME': ':memory:', } }, INSTALLED_APPS=( ...
<commit_before>#!/usr/bin/env python import sys from django.conf import settings if not settings.configured: settings.configure( DATABASES={ 'default': { 'ENGINE': 'django.db.backends.sqlite3', 'NAME': ':memory:', } }, INSTALLED_APPS...
946220075802cc59f3b34d3557c0b749c526c4b1
runtests.py
runtests.py
#!/usr/bin/env python import os import sys os.environ.setdefault("DJANGO_SETTINGS_MODULE", "farnsworth.settings") this_dir = os.path.abspath(os.path.dirname(__file__)) if this_dir not in sys.path: sys.path.insert(0, this_dir) from django.test.utils import get_runner from django.conf import settings def runtests():...
#!/usr/bin/env python import os import sys os.environ.setdefault("DJANGO_SETTINGS_MODULE", "farnsworth.settings") this_dir = os.path.abspath(os.path.dirname(__file__)) if this_dir not in sys.path: sys.path.insert(0, this_dir) from django.test.utils import get_runner from django.conf import settings def runtests():...
Add workshift to the list of tests
Add workshift to the list of tests
Python
bsd-2-clause
knagra/farnsworth,knagra/farnsworth,knagra/farnsworth,knagra/farnsworth
#!/usr/bin/env python import os import sys os.environ.setdefault("DJANGO_SETTINGS_MODULE", "farnsworth.settings") this_dir = os.path.abspath(os.path.dirname(__file__)) if this_dir not in sys.path: sys.path.insert(0, this_dir) from django.test.utils import get_runner from django.conf import settings def runtests():...
#!/usr/bin/env python import os import sys os.environ.setdefault("DJANGO_SETTINGS_MODULE", "farnsworth.settings") this_dir = os.path.abspath(os.path.dirname(__file__)) if this_dir not in sys.path: sys.path.insert(0, this_dir) from django.test.utils import get_runner from django.conf import settings def runtests():...
<commit_before>#!/usr/bin/env python import os import sys os.environ.setdefault("DJANGO_SETTINGS_MODULE", "farnsworth.settings") this_dir = os.path.abspath(os.path.dirname(__file__)) if this_dir not in sys.path: sys.path.insert(0, this_dir) from django.test.utils import get_runner from django.conf import settings ...
#!/usr/bin/env python import os import sys os.environ.setdefault("DJANGO_SETTINGS_MODULE", "farnsworth.settings") this_dir = os.path.abspath(os.path.dirname(__file__)) if this_dir not in sys.path: sys.path.insert(0, this_dir) from django.test.utils import get_runner from django.conf import settings def runtests():...
#!/usr/bin/env python import os import sys os.environ.setdefault("DJANGO_SETTINGS_MODULE", "farnsworth.settings") this_dir = os.path.abspath(os.path.dirname(__file__)) if this_dir not in sys.path: sys.path.insert(0, this_dir) from django.test.utils import get_runner from django.conf import settings def runtests():...
<commit_before>#!/usr/bin/env python import os import sys os.environ.setdefault("DJANGO_SETTINGS_MODULE", "farnsworth.settings") this_dir = os.path.abspath(os.path.dirname(__file__)) if this_dir not in sys.path: sys.path.insert(0, this_dir) from django.test.utils import get_runner from django.conf import settings ...
45e758b56370f5bb34ff28c4660837fd9037b945
dom/automation/detect_malloc_errors.py
dom/automation/detect_malloc_errors.py
#!/usr/bin/env python # Look for "szone_error" (Tiger), "malloc_error_break" (Leopard), "MallocHelp" (?) # which are signs of malloc being unhappy (double free, out-of-memory, etc). def amiss(logPrefix): foundSomething = False currentFile = file(logPrefix + "-err", "r") pline = "" ppline = "" ...
#!/usr/bin/env python # Look for "szone_error" (Tiger), "malloc_error_break" (Leopard), "MallocHelp" (?) # which are signs of malloc being unhappy (double free, out-of-memory, etc). def amiss(logPrefix): foundSomething = False currentFile = file(logPrefix + "-err", "r") pline = "" ppline = "" ...
Fix reversed condition for ignoring "can't allocate region" errors
Fix reversed condition for ignoring "can't allocate region" errors
Python
mpl-2.0
MozillaSecurity/funfuzz,nth10sd/funfuzz,nth10sd/funfuzz,MozillaSecurity/funfuzz,MozillaSecurity/funfuzz,nth10sd/funfuzz
#!/usr/bin/env python # Look for "szone_error" (Tiger), "malloc_error_break" (Leopard), "MallocHelp" (?) # which are signs of malloc being unhappy (double free, out-of-memory, etc). def amiss(logPrefix): foundSomething = False currentFile = file(logPrefix + "-err", "r") pline = "" ppline = "" ...
#!/usr/bin/env python # Look for "szone_error" (Tiger), "malloc_error_break" (Leopard), "MallocHelp" (?) # which are signs of malloc being unhappy (double free, out-of-memory, etc). def amiss(logPrefix): foundSomething = False currentFile = file(logPrefix + "-err", "r") pline = "" ppline = "" ...
<commit_before>#!/usr/bin/env python # Look for "szone_error" (Tiger), "malloc_error_break" (Leopard), "MallocHelp" (?) # which are signs of malloc being unhappy (double free, out-of-memory, etc). def amiss(logPrefix): foundSomething = False currentFile = file(logPrefix + "-err", "r") pline = "" ...
#!/usr/bin/env python # Look for "szone_error" (Tiger), "malloc_error_break" (Leopard), "MallocHelp" (?) # which are signs of malloc being unhappy (double free, out-of-memory, etc). def amiss(logPrefix): foundSomething = False currentFile = file(logPrefix + "-err", "r") pline = "" ppline = "" ...
#!/usr/bin/env python # Look for "szone_error" (Tiger), "malloc_error_break" (Leopard), "MallocHelp" (?) # which are signs of malloc being unhappy (double free, out-of-memory, etc). def amiss(logPrefix): foundSomething = False currentFile = file(logPrefix + "-err", "r") pline = "" ppline = "" ...
<commit_before>#!/usr/bin/env python # Look for "szone_error" (Tiger), "malloc_error_break" (Leopard), "MallocHelp" (?) # which are signs of malloc being unhappy (double free, out-of-memory, etc). def amiss(logPrefix): foundSomething = False currentFile = file(logPrefix + "-err", "r") pline = "" ...
94788bd7a7ba0a7799689c4613a2afbcc377649b
games/migrations/0016_auto_20161209_1256.py
games/migrations/0016_auto_20161209_1256.py
# -*- coding: utf-8 -*- # Generated by Django 1.10.2 on 2016-12-09 11:56 from __future__ import unicode_literals from django.db import migrations from django.core.management import call_command def create_revisions(apps, schema_editor): call_command('createinitialrevisions') class Migration(migrations.Migratio...
# -*- coding: utf-8 -*- # Generated by Django 1.10.2 on 2016-12-09 11:56 from __future__ import unicode_literals from django.db import migrations from django.core.management import call_command def create_revisions(apps, schema_editor): call_command('createinitialrevisions') class Migration(migrations.Migratio...
Add dependency to reversion data migration
Add dependency to reversion data migration
Python
agpl-3.0
Turupawn/website,Turupawn/website,lutris/website,lutris/website,lutris/website,Turupawn/website,Turupawn/website,lutris/website
# -*- coding: utf-8 -*- # Generated by Django 1.10.2 on 2016-12-09 11:56 from __future__ import unicode_literals from django.db import migrations from django.core.management import call_command def create_revisions(apps, schema_editor): call_command('createinitialrevisions') class Migration(migrations.Migratio...
# -*- coding: utf-8 -*- # Generated by Django 1.10.2 on 2016-12-09 11:56 from __future__ import unicode_literals from django.db import migrations from django.core.management import call_command def create_revisions(apps, schema_editor): call_command('createinitialrevisions') class Migration(migrations.Migratio...
<commit_before># -*- coding: utf-8 -*- # Generated by Django 1.10.2 on 2016-12-09 11:56 from __future__ import unicode_literals from django.db import migrations from django.core.management import call_command def create_revisions(apps, schema_editor): call_command('createinitialrevisions') class Migration(migr...
# -*- coding: utf-8 -*- # Generated by Django 1.10.2 on 2016-12-09 11:56 from __future__ import unicode_literals from django.db import migrations from django.core.management import call_command def create_revisions(apps, schema_editor): call_command('createinitialrevisions') class Migration(migrations.Migratio...
# -*- coding: utf-8 -*- # Generated by Django 1.10.2 on 2016-12-09 11:56 from __future__ import unicode_literals from django.db import migrations from django.core.management import call_command def create_revisions(apps, schema_editor): call_command('createinitialrevisions') class Migration(migrations.Migratio...
<commit_before># -*- coding: utf-8 -*- # Generated by Django 1.10.2 on 2016-12-09 11:56 from __future__ import unicode_literals from django.db import migrations from django.core.management import call_command def create_revisions(apps, schema_editor): call_command('createinitialrevisions') class Migration(migr...
4c3a2a61c6a8cb5e0ece14bced4ec8b33df45400
tests/simple/_util.py
tests/simple/_util.py
####################################################### # Copyright (c) 2015, ArrayFire # All rights reserved. # # This file is distributed under 3-clause BSD license. # The complete license agreement can be obtained at: # http://arrayfire.com/licenses/BSD-3-Clause ######################################################...
####################################################### # Copyright (c) 2015, ArrayFire # All rights reserved. # # This file is distributed under 3-clause BSD license. # The complete license agreement can be obtained at: # http://arrayfire.com/licenses/BSD-3-Clause ######################################################...
Add proper logging to tests when in verbose mode
Add proper logging to tests when in verbose mode
Python
bsd-3-clause
arrayfire/arrayfire_python,pavanky/arrayfire-python,arrayfire/arrayfire-python
####################################################### # Copyright (c) 2015, ArrayFire # All rights reserved. # # This file is distributed under 3-clause BSD license. # The complete license agreement can be obtained at: # http://arrayfire.com/licenses/BSD-3-Clause ######################################################...
####################################################### # Copyright (c) 2015, ArrayFire # All rights reserved. # # This file is distributed under 3-clause BSD license. # The complete license agreement can be obtained at: # http://arrayfire.com/licenses/BSD-3-Clause ######################################################...
<commit_before>####################################################### # Copyright (c) 2015, ArrayFire # All rights reserved. # # This file is distributed under 3-clause BSD license. # The complete license agreement can be obtained at: # http://arrayfire.com/licenses/BSD-3-Clause #######################################...
####################################################### # Copyright (c) 2015, ArrayFire # All rights reserved. # # This file is distributed under 3-clause BSD license. # The complete license agreement can be obtained at: # http://arrayfire.com/licenses/BSD-3-Clause ######################################################...
####################################################### # Copyright (c) 2015, ArrayFire # All rights reserved. # # This file is distributed under 3-clause BSD license. # The complete license agreement can be obtained at: # http://arrayfire.com/licenses/BSD-3-Clause ######################################################...
<commit_before>####################################################### # Copyright (c) 2015, ArrayFire # All rights reserved. # # This file is distributed under 3-clause BSD license. # The complete license agreement can be obtained at: # http://arrayfire.com/licenses/BSD-3-Clause #######################################...
361af42be2c3044a15480572befb1405a603b4ab
VALDprepare.py
VALDprepare.py
#!/usr/bin/env python # -*- coding: utf8 -*- # My imports import argparse import gzip def _parser(): parser = argparse.ArgumentParser(description='Prepare the data downloaded ' 'from VALD.') parser.add_argument('input', help='input compressed file') parser.add_argumen...
#!/usr/bin/env python # -*- coding: utf8 -*- # My imports import argparse import gzip import os def _parser(): parser = argparse.ArgumentParser(description='Prepare the data downloaded ' 'from VALD.') parser.add_argument('input', help='input compressed file', type=str) ...
Check if the file exists before doing anything else.
Check if the file exists before doing anything else.
Python
mit
DanielAndreasen/astro_scripts
#!/usr/bin/env python # -*- coding: utf8 -*- # My imports import argparse import gzip def _parser(): parser = argparse.ArgumentParser(description='Prepare the data downloaded ' 'from VALD.') parser.add_argument('input', help='input compressed file') parser.add_argumen...
#!/usr/bin/env python # -*- coding: utf8 -*- # My imports import argparse import gzip import os def _parser(): parser = argparse.ArgumentParser(description='Prepare the data downloaded ' 'from VALD.') parser.add_argument('input', help='input compressed file', type=str) ...
<commit_before>#!/usr/bin/env python # -*- coding: utf8 -*- # My imports import argparse import gzip def _parser(): parser = argparse.ArgumentParser(description='Prepare the data downloaded ' 'from VALD.') parser.add_argument('input', help='input compressed file') par...
#!/usr/bin/env python # -*- coding: utf8 -*- # My imports import argparse import gzip import os def _parser(): parser = argparse.ArgumentParser(description='Prepare the data downloaded ' 'from VALD.') parser.add_argument('input', help='input compressed file', type=str) ...
#!/usr/bin/env python # -*- coding: utf8 -*- # My imports import argparse import gzip def _parser(): parser = argparse.ArgumentParser(description='Prepare the data downloaded ' 'from VALD.') parser.add_argument('input', help='input compressed file') parser.add_argumen...
<commit_before>#!/usr/bin/env python # -*- coding: utf8 -*- # My imports import argparse import gzip def _parser(): parser = argparse.ArgumentParser(description='Prepare the data downloaded ' 'from VALD.') parser.add_argument('input', help='input compressed file') par...
62f681803401d05fd0a5e554d4d6c7210dcc7c17
cbv/management/commands/load_all_django_versions.py
cbv/management/commands/load_all_django_versions.py
import os import re from django.conf import settings from django.core.management import call_command, BaseCommand class Command(BaseCommand): """Load the Django project fixtures and all version fixtures""" def handle(self, **options): fixtures_dir = os.path.join(settings.DIRNAME, 'cbv', 'fixtures') ...
import glob import os from django.core.management import call_command, BaseCommand class Command(BaseCommand): """Load the Django project fixtures and all version fixtures""" def handle(self, **options): self.stdout.write('Loading project.json') call_command('loaddata', 'cbv/fixtures/project...
Use glob for finding version fixtures
Use glob for finding version fixtures Thanks @ghickman!
Python
bsd-2-clause
refreshoxford/django-cbv-inspector,refreshoxford/django-cbv-inspector,refreshoxford/django-cbv-inspector,refreshoxford/django-cbv-inspector
import os import re from django.conf import settings from django.core.management import call_command, BaseCommand class Command(BaseCommand): """Load the Django project fixtures and all version fixtures""" def handle(self, **options): fixtures_dir = os.path.join(settings.DIRNAME, 'cbv', 'fixtures') ...
import glob import os from django.core.management import call_command, BaseCommand class Command(BaseCommand): """Load the Django project fixtures and all version fixtures""" def handle(self, **options): self.stdout.write('Loading project.json') call_command('loaddata', 'cbv/fixtures/project...
<commit_before>import os import re from django.conf import settings from django.core.management import call_command, BaseCommand class Command(BaseCommand): """Load the Django project fixtures and all version fixtures""" def handle(self, **options): fixtures_dir = os.path.join(settings.DIRNAME, 'cbv...
import glob import os from django.core.management import call_command, BaseCommand class Command(BaseCommand): """Load the Django project fixtures and all version fixtures""" def handle(self, **options): self.stdout.write('Loading project.json') call_command('loaddata', 'cbv/fixtures/project...
import os import re from django.conf import settings from django.core.management import call_command, BaseCommand class Command(BaseCommand): """Load the Django project fixtures and all version fixtures""" def handle(self, **options): fixtures_dir = os.path.join(settings.DIRNAME, 'cbv', 'fixtures') ...
<commit_before>import os import re from django.conf import settings from django.core.management import call_command, BaseCommand class Command(BaseCommand): """Load the Django project fixtures and all version fixtures""" def handle(self, **options): fixtures_dir = os.path.join(settings.DIRNAME, 'cbv...
b6416ba4c32aaeddb567be4486854d6415c3048e
tornwamp/customize.py
tornwamp/customize.py
""" TornWAMP user-configurable structures. """ from tornwamp.processors import GoodbyeProcessor, HelloProcessor, pubsub, rpc from tornwamp.messages import Code processors = { Code.HELLO: HelloProcessor, Code.GOODBYE: GoodbyeProcessor, Code.SUBSCRIBE: pubsub.SubscribeProcessor, Code.CALL: rpc.CallProces...
""" TornWAMP user-configurable structures. """ from tornwamp.processors import GoodbyeProcessor, HelloProcessor, pubsub, rpc from tornwamp.messages import Code processors = { Code.HELLO: HelloProcessor, Code.GOODBYE: GoodbyeProcessor, Code.SUBSCRIBE: pubsub.SubscribeProcessor, Code.CALL: rpc.CallProces...
Add PublishProcessor to processors' list
Add PublishProcessor to processors' list
Python
apache-2.0
ef-ctx/tornwamp
""" TornWAMP user-configurable structures. """ from tornwamp.processors import GoodbyeProcessor, HelloProcessor, pubsub, rpc from tornwamp.messages import Code processors = { Code.HELLO: HelloProcessor, Code.GOODBYE: GoodbyeProcessor, Code.SUBSCRIBE: pubsub.SubscribeProcessor, Code.CALL: rpc.CallProces...
""" TornWAMP user-configurable structures. """ from tornwamp.processors import GoodbyeProcessor, HelloProcessor, pubsub, rpc from tornwamp.messages import Code processors = { Code.HELLO: HelloProcessor, Code.GOODBYE: GoodbyeProcessor, Code.SUBSCRIBE: pubsub.SubscribeProcessor, Code.CALL: rpc.CallProces...
<commit_before>""" TornWAMP user-configurable structures. """ from tornwamp.processors import GoodbyeProcessor, HelloProcessor, pubsub, rpc from tornwamp.messages import Code processors = { Code.HELLO: HelloProcessor, Code.GOODBYE: GoodbyeProcessor, Code.SUBSCRIBE: pubsub.SubscribeProcessor, Code.CALL:...
""" TornWAMP user-configurable structures. """ from tornwamp.processors import GoodbyeProcessor, HelloProcessor, pubsub, rpc from tornwamp.messages import Code processors = { Code.HELLO: HelloProcessor, Code.GOODBYE: GoodbyeProcessor, Code.SUBSCRIBE: pubsub.SubscribeProcessor, Code.CALL: rpc.CallProces...
""" TornWAMP user-configurable structures. """ from tornwamp.processors import GoodbyeProcessor, HelloProcessor, pubsub, rpc from tornwamp.messages import Code processors = { Code.HELLO: HelloProcessor, Code.GOODBYE: GoodbyeProcessor, Code.SUBSCRIBE: pubsub.SubscribeProcessor, Code.CALL: rpc.CallProces...
<commit_before>""" TornWAMP user-configurable structures. """ from tornwamp.processors import GoodbyeProcessor, HelloProcessor, pubsub, rpc from tornwamp.messages import Code processors = { Code.HELLO: HelloProcessor, Code.GOODBYE: GoodbyeProcessor, Code.SUBSCRIBE: pubsub.SubscribeProcessor, Code.CALL:...
369964986df0ca558c2e340bc8d15272296af67e
tools/debug_launcher.py
tools/debug_launcher.py
from __future__ import print_function import sys import os import time import socket import argparse import subprocess parser = argparse.ArgumentParser() parser.add_argument('--launch-adapter') parser.add_argument('--lldb') parser.add_argument('--wait-port') args = parser.parse_args() if args.launch_adapter: lld...
from __future__ import print_function import sys import os import time import socket import argparse import subprocess parser = argparse.ArgumentParser() parser.add_argument('--launch-adapter') parser.add_argument('--lldb') parser.add_argument('--wait-port') args = parser.parse_args() if args.launch_adapter: lld...
Fix python debugging on Windows.
Fix python debugging on Windows.
Python
mit
vadimcn/vscode-lldb,vadimcn/vscode-lldb,vadimcn/vscode-lldb,vadimcn/vscode-lldb,vadimcn/vscode-lldb,vadimcn/vscode-lldb,vadimcn/vscode-lldb
from __future__ import print_function import sys import os import time import socket import argparse import subprocess parser = argparse.ArgumentParser() parser.add_argument('--launch-adapter') parser.add_argument('--lldb') parser.add_argument('--wait-port') args = parser.parse_args() if args.launch_adapter: lld...
from __future__ import print_function import sys import os import time import socket import argparse import subprocess parser = argparse.ArgumentParser() parser.add_argument('--launch-adapter') parser.add_argument('--lldb') parser.add_argument('--wait-port') args = parser.parse_args() if args.launch_adapter: lld...
<commit_before>from __future__ import print_function import sys import os import time import socket import argparse import subprocess parser = argparse.ArgumentParser() parser.add_argument('--launch-adapter') parser.add_argument('--lldb') parser.add_argument('--wait-port') args = parser.parse_args() if args.launch_a...
from __future__ import print_function import sys import os import time import socket import argparse import subprocess parser = argparse.ArgumentParser() parser.add_argument('--launch-adapter') parser.add_argument('--lldb') parser.add_argument('--wait-port') args = parser.parse_args() if args.launch_adapter: lld...
from __future__ import print_function import sys import os import time import socket import argparse import subprocess parser = argparse.ArgumentParser() parser.add_argument('--launch-adapter') parser.add_argument('--lldb') parser.add_argument('--wait-port') args = parser.parse_args() if args.launch_adapter: lld...
<commit_before>from __future__ import print_function import sys import os import time import socket import argparse import subprocess parser = argparse.ArgumentParser() parser.add_argument('--launch-adapter') parser.add_argument('--lldb') parser.add_argument('--wait-port') args = parser.parse_args() if args.launch_a...
d4aa2b1a0a72696ce34f5aa2f5e588fc3a72e622
cfgrib/__main__.py
cfgrib/__main__.py
import argparse import sys from . import eccodes def main(): parser = argparse.ArgumentParser() parser.add_argument('--selfcheck', default=False, action='store_true') args = parser.parse_args() if args.selfcheck: eccodes.codes_get_api_version() print("Your system is ready.") else...
# # Copyright 2017-2018 European Centre for Medium-Range Weather Forecasts (ECMWF). # # 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...
Add copyright noticeand Authors comment.
Add copyright noticeand Authors comment.
Python
apache-2.0
ecmwf/cfgrib
import argparse import sys from . import eccodes def main(): parser = argparse.ArgumentParser() parser.add_argument('--selfcheck', default=False, action='store_true') args = parser.parse_args() if args.selfcheck: eccodes.codes_get_api_version() print("Your system is ready.") else...
# # Copyright 2017-2018 European Centre for Medium-Range Weather Forecasts (ECMWF). # # 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...
<commit_before> import argparse import sys from . import eccodes def main(): parser = argparse.ArgumentParser() parser.add_argument('--selfcheck', default=False, action='store_true') args = parser.parse_args() if args.selfcheck: eccodes.codes_get_api_version() print("Your system is re...
# # Copyright 2017-2018 European Centre for Medium-Range Weather Forecasts (ECMWF). # # 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...
import argparse import sys from . import eccodes def main(): parser = argparse.ArgumentParser() parser.add_argument('--selfcheck', default=False, action='store_true') args = parser.parse_args() if args.selfcheck: eccodes.codes_get_api_version() print("Your system is ready.") else...
<commit_before> import argparse import sys from . import eccodes def main(): parser = argparse.ArgumentParser() parser.add_argument('--selfcheck', default=False, action='store_true') args = parser.parse_args() if args.selfcheck: eccodes.codes_get_api_version() print("Your system is re...
9fec06c6acf57b4d49b9c49b7e1d3b5c90e2c9c4
blog/admin.py
blog/admin.py
from django.contrib import admin from .models import Post @admin.register(Post) class PostAdmin(admin.ModelAdmin): # list view date_hierarchy = 'pub_date' list_display = ('title', 'pub_date') list_filter = ('pub_date',) search_fields = ('title', 'text') # form view fieldsets = ( (...
from django.contrib import admin from .models import Post @admin.register(Post) class PostAdmin(admin.ModelAdmin): # list view date_hierarchy = 'pub_date' list_display = ('title', 'pub_date') list_filter = ('pub_date',) search_fields = ('title', 'text') # form view fieldsets = ( (...
Use horizontal filter for M2M in PostAdmin.
Ch23: Use horizontal filter for M2M in PostAdmin.
Python
bsd-2-clause
jambonrose/DjangoUnleashed-1.8,jambonrose/DjangoUnleashed-1.8
from django.contrib import admin from .models import Post @admin.register(Post) class PostAdmin(admin.ModelAdmin): # list view date_hierarchy = 'pub_date' list_display = ('title', 'pub_date') list_filter = ('pub_date',) search_fields = ('title', 'text') # form view fieldsets = ( (...
from django.contrib import admin from .models import Post @admin.register(Post) class PostAdmin(admin.ModelAdmin): # list view date_hierarchy = 'pub_date' list_display = ('title', 'pub_date') list_filter = ('pub_date',) search_fields = ('title', 'text') # form view fieldsets = ( (...
<commit_before>from django.contrib import admin from .models import Post @admin.register(Post) class PostAdmin(admin.ModelAdmin): # list view date_hierarchy = 'pub_date' list_display = ('title', 'pub_date') list_filter = ('pub_date',) search_fields = ('title', 'text') # form view fieldset...
from django.contrib import admin from .models import Post @admin.register(Post) class PostAdmin(admin.ModelAdmin): # list view date_hierarchy = 'pub_date' list_display = ('title', 'pub_date') list_filter = ('pub_date',) search_fields = ('title', 'text') # form view fieldsets = ( (...
from django.contrib import admin from .models import Post @admin.register(Post) class PostAdmin(admin.ModelAdmin): # list view date_hierarchy = 'pub_date' list_display = ('title', 'pub_date') list_filter = ('pub_date',) search_fields = ('title', 'text') # form view fieldsets = ( (...
<commit_before>from django.contrib import admin from .models import Post @admin.register(Post) class PostAdmin(admin.ModelAdmin): # list view date_hierarchy = 'pub_date' list_display = ('title', 'pub_date') list_filter = ('pub_date',) search_fields = ('title', 'text') # form view fieldset...
b0273cc12abaf9a3f9f2e6c534d82bd7581c240e
ctypeslib/test/test_dynmodule.py
ctypeslib/test/test_dynmodule.py
# Basic test of dynamic code generation import unittest import stdio from ctypes import POINTER, c_int class DynModTest(unittest.TestCase): def test_fopen(self): self.failUnlessEqual(stdio.fopen.restype, POINTER(stdio.FILE)) self.failUnlessEqual(stdio.fopen.argtypes, [stdio.STRING, stdio.STRING]) ...
# Basic test of dynamic code generation import unittest import os, glob import stdio from ctypes import POINTER, c_int class DynModTest(unittest.TestCase): def tearDown(self): for fnm in glob.glob(stdio._gen_basename + ".*"): try: os.remove(fnm) except IOError: ...
Clean up generated files in the tearDown method.
Clean up generated files in the tearDown method. git-svn-id: ac2c3632cb6543e7ab5fafd132c7fe15057a1882@52711 6015fed2-1504-0410-9fe1-9d1591cc4771
Python
mit
trolldbois/ctypeslib,trolldbois/ctypeslib,luzfcb/ctypeslib,trolldbois/ctypeslib,luzfcb/ctypeslib,luzfcb/ctypeslib
# Basic test of dynamic code generation import unittest import stdio from ctypes import POINTER, c_int class DynModTest(unittest.TestCase): def test_fopen(self): self.failUnlessEqual(stdio.fopen.restype, POINTER(stdio.FILE)) self.failUnlessEqual(stdio.fopen.argtypes, [stdio.STRING, stdio.STRING]) ...
# Basic test of dynamic code generation import unittest import os, glob import stdio from ctypes import POINTER, c_int class DynModTest(unittest.TestCase): def tearDown(self): for fnm in glob.glob(stdio._gen_basename + ".*"): try: os.remove(fnm) except IOError: ...
<commit_before># Basic test of dynamic code generation import unittest import stdio from ctypes import POINTER, c_int class DynModTest(unittest.TestCase): def test_fopen(self): self.failUnlessEqual(stdio.fopen.restype, POINTER(stdio.FILE)) self.failUnlessEqual(stdio.fopen.argtypes, [stdio.STRING, ...
# Basic test of dynamic code generation import unittest import os, glob import stdio from ctypes import POINTER, c_int class DynModTest(unittest.TestCase): def tearDown(self): for fnm in glob.glob(stdio._gen_basename + ".*"): try: os.remove(fnm) except IOError: ...
# Basic test of dynamic code generation import unittest import stdio from ctypes import POINTER, c_int class DynModTest(unittest.TestCase): def test_fopen(self): self.failUnlessEqual(stdio.fopen.restype, POINTER(stdio.FILE)) self.failUnlessEqual(stdio.fopen.argtypes, [stdio.STRING, stdio.STRING]) ...
<commit_before># Basic test of dynamic code generation import unittest import stdio from ctypes import POINTER, c_int class DynModTest(unittest.TestCase): def test_fopen(self): self.failUnlessEqual(stdio.fopen.restype, POINTER(stdio.FILE)) self.failUnlessEqual(stdio.fopen.argtypes, [stdio.STRING, ...
0945e04edcb4739069f4263bbd022bff4320606e
examples/LKE_example.py
examples/LKE_example.py
# for local run, before pygraphc packaging import sys sys.path.insert(0, '../pygraphc/misc') from LKE import * sys.path.insert(0, '../pygraphc/clustering') from ClusterUtility import * from ClusterEvaluation import * ip_address = '161.166.232.17' standard_path = '/home/hudan/Git/labeled-authlog/dataset/' + ip_address ...
# for local run, before pygraphc packaging import sys sys.path.insert(0, '../pygraphc/misc') from LKE import * sys.path.insert(0, '../pygraphc/evaluation') from ExternalEvaluation import * ip_address = '161.166.232.17' standard_path = '/home/hudan/Git/labeled-authlog/dataset/' + ip_address standard_file = standard_pat...
Change module path for cluster evaluation and edit how to get original logs
Change module path for cluster evaluation and edit how to get original logs
Python
mit
studiawan/pygraphc
# for local run, before pygraphc packaging import sys sys.path.insert(0, '../pygraphc/misc') from LKE import * sys.path.insert(0, '../pygraphc/clustering') from ClusterUtility import * from ClusterEvaluation import * ip_address = '161.166.232.17' standard_path = '/home/hudan/Git/labeled-authlog/dataset/' + ip_address ...
# for local run, before pygraphc packaging import sys sys.path.insert(0, '../pygraphc/misc') from LKE import * sys.path.insert(0, '../pygraphc/evaluation') from ExternalEvaluation import * ip_address = '161.166.232.17' standard_path = '/home/hudan/Git/labeled-authlog/dataset/' + ip_address standard_file = standard_pat...
<commit_before># for local run, before pygraphc packaging import sys sys.path.insert(0, '../pygraphc/misc') from LKE import * sys.path.insert(0, '../pygraphc/clustering') from ClusterUtility import * from ClusterEvaluation import * ip_address = '161.166.232.17' standard_path = '/home/hudan/Git/labeled-authlog/dataset/...
# for local run, before pygraphc packaging import sys sys.path.insert(0, '../pygraphc/misc') from LKE import * sys.path.insert(0, '../pygraphc/evaluation') from ExternalEvaluation import * ip_address = '161.166.232.17' standard_path = '/home/hudan/Git/labeled-authlog/dataset/' + ip_address standard_file = standard_pat...
# for local run, before pygraphc packaging import sys sys.path.insert(0, '../pygraphc/misc') from LKE import * sys.path.insert(0, '../pygraphc/clustering') from ClusterUtility import * from ClusterEvaluation import * ip_address = '161.166.232.17' standard_path = '/home/hudan/Git/labeled-authlog/dataset/' + ip_address ...
<commit_before># for local run, before pygraphc packaging import sys sys.path.insert(0, '../pygraphc/misc') from LKE import * sys.path.insert(0, '../pygraphc/clustering') from ClusterUtility import * from ClusterEvaluation import * ip_address = '161.166.232.17' standard_path = '/home/hudan/Git/labeled-authlog/dataset/...
7c49517c3c24d239c2bd44d82916b4f3d90ca1e2
utilities/__init__.py
utilities/__init__.py
#! /usr/bin/env python from subprocess import Popen, PIPE def launch(cmd): """ Fork the specified command, returning a tuple of (stdout, stderr) """ return Popen(cmd, shell=True, stdout=PIPE, stderr=PIPE).communicate() def get_stdout(cmd): """ Fork the specified command, returning stdout ...
#! /usr/bin/env python from subprocess import Popen, PIPE def popen(cmd): """ Fork the specified command, returning a tuple of (stdout, stderr) """ return Popen(cmd, shell=True, stdout=PIPE, stderr=PIPE).communicate() def get_stdout(cmd): """ Fork the specified command, returning stdout ...
Switch to using popen as the function name to stick more to subprocess naming
Switch to using popen as the function name to stick more to subprocess naming
Python
mit
IanLee1521/utilities
#! /usr/bin/env python from subprocess import Popen, PIPE def launch(cmd): """ Fork the specified command, returning a tuple of (stdout, stderr) """ return Popen(cmd, shell=True, stdout=PIPE, stderr=PIPE).communicate() def get_stdout(cmd): """ Fork the specified command, returning stdout ...
#! /usr/bin/env python from subprocess import Popen, PIPE def popen(cmd): """ Fork the specified command, returning a tuple of (stdout, stderr) """ return Popen(cmd, shell=True, stdout=PIPE, stderr=PIPE).communicate() def get_stdout(cmd): """ Fork the specified command, returning stdout ...
<commit_before>#! /usr/bin/env python from subprocess import Popen, PIPE def launch(cmd): """ Fork the specified command, returning a tuple of (stdout, stderr) """ return Popen(cmd, shell=True, stdout=PIPE, stderr=PIPE).communicate() def get_stdout(cmd): """ Fork the specified command, retu...
#! /usr/bin/env python from subprocess import Popen, PIPE def popen(cmd): """ Fork the specified command, returning a tuple of (stdout, stderr) """ return Popen(cmd, shell=True, stdout=PIPE, stderr=PIPE).communicate() def get_stdout(cmd): """ Fork the specified command, returning stdout ...
#! /usr/bin/env python from subprocess import Popen, PIPE def launch(cmd): """ Fork the specified command, returning a tuple of (stdout, stderr) """ return Popen(cmd, shell=True, stdout=PIPE, stderr=PIPE).communicate() def get_stdout(cmd): """ Fork the specified command, returning stdout ...
<commit_before>#! /usr/bin/env python from subprocess import Popen, PIPE def launch(cmd): """ Fork the specified command, returning a tuple of (stdout, stderr) """ return Popen(cmd, shell=True, stdout=PIPE, stderr=PIPE).communicate() def get_stdout(cmd): """ Fork the specified command, retu...
d147d8865dc4b82eaff87d0d4dd65ba7f4622a90
django/contrib/admin/__init__.py
django/contrib/admin/__init__.py
from django.contrib.admin.options import ModelAdmin, HORIZONTAL, VERTICAL from django.contrib.admin.options import StackedInline, TabularInline from django.contrib.admin.sites import AdminSite, site def autodiscover(): """ Auto-discover INSTALLED_APPS admin.py modules and fail silently when not present. T...
# ACTION_CHECKBOX_NAME is unused, but should stay since its import from here # has been referenced in documentation. from django.contrib.admin.helpers import ACTION_CHECKBOX_NAME from django.contrib.admin.options import ModelAdmin, HORIZONTAL, VERTICAL from django.contrib.admin.options import StackedInline, TabularInli...
Revert the removal of an unused import (in [14175]) that was referenced in documentation. Thanks for noticing, clong.
Revert the removal of an unused import (in [14175]) that was referenced in documentation. Thanks for noticing, clong. git-svn-id: http://code.djangoproject.com/svn/django/trunk@14359 bcc190cf-cafb-0310-a4f2-bffc1f526a37 --HG-- extra : convert_revision : e026073455a73c9fe9a9f026b76ac783b2a12d23
Python
bsd-3-clause
adieu/django-nonrel,heracek/django-nonrel,adieu/django-nonrel,heracek/django-nonrel,adieu/django-nonrel,heracek/django-nonrel
from django.contrib.admin.options import ModelAdmin, HORIZONTAL, VERTICAL from django.contrib.admin.options import StackedInline, TabularInline from django.contrib.admin.sites import AdminSite, site def autodiscover(): """ Auto-discover INSTALLED_APPS admin.py modules and fail silently when not present. T...
# ACTION_CHECKBOX_NAME is unused, but should stay since its import from here # has been referenced in documentation. from django.contrib.admin.helpers import ACTION_CHECKBOX_NAME from django.contrib.admin.options import ModelAdmin, HORIZONTAL, VERTICAL from django.contrib.admin.options import StackedInline, TabularInli...
<commit_before>from django.contrib.admin.options import ModelAdmin, HORIZONTAL, VERTICAL from django.contrib.admin.options import StackedInline, TabularInline from django.contrib.admin.sites import AdminSite, site def autodiscover(): """ Auto-discover INSTALLED_APPS admin.py modules and fail silently when ...
# ACTION_CHECKBOX_NAME is unused, but should stay since its import from here # has been referenced in documentation. from django.contrib.admin.helpers import ACTION_CHECKBOX_NAME from django.contrib.admin.options import ModelAdmin, HORIZONTAL, VERTICAL from django.contrib.admin.options import StackedInline, TabularInli...
from django.contrib.admin.options import ModelAdmin, HORIZONTAL, VERTICAL from django.contrib.admin.options import StackedInline, TabularInline from django.contrib.admin.sites import AdminSite, site def autodiscover(): """ Auto-discover INSTALLED_APPS admin.py modules and fail silently when not present. T...
<commit_before>from django.contrib.admin.options import ModelAdmin, HORIZONTAL, VERTICAL from django.contrib.admin.options import StackedInline, TabularInline from django.contrib.admin.sites import AdminSite, site def autodiscover(): """ Auto-discover INSTALLED_APPS admin.py modules and fail silently when ...
4f05805c0ec31da0b978cdccc0d79336272859fe
node/multi_var.py
node/multi_var.py
from nodes import Node class MultiVar(Node): char = "'" args = 0 results = None contents = -1 def __init__(self, node_1: Node.NodeSingle, node_2: Node.NodeSingle): self.node_1 = node_1 self.node_2 = node_2 self.args = max([node_1.args, node_2.args]) def pr...
from nodes import Node class MultiVar(Node): char = "'" args = 0 results = None contents = -1 def __init__(self, node_1: Node.NodeSingle, node_2: Node.NodeSingle): self.node_1 = node_1 self.node_2 = node_2 def prepare(self, stack): self.node_1.prepare(stac...
Fix multivar for nodes with variable length stacks
Fix multivar for nodes with variable length stacks
Python
mit
muddyfish/PYKE,muddyfish/PYKE
from nodes import Node class MultiVar(Node): char = "'" args = 0 results = None contents = -1 def __init__(self, node_1: Node.NodeSingle, node_2: Node.NodeSingle): self.node_1 = node_1 self.node_2 = node_2 self.args = max([node_1.args, node_2.args]) def pr...
from nodes import Node class MultiVar(Node): char = "'" args = 0 results = None contents = -1 def __init__(self, node_1: Node.NodeSingle, node_2: Node.NodeSingle): self.node_1 = node_1 self.node_2 = node_2 def prepare(self, stack): self.node_1.prepare(stac...
<commit_before> from nodes import Node class MultiVar(Node): char = "'" args = 0 results = None contents = -1 def __init__(self, node_1: Node.NodeSingle, node_2: Node.NodeSingle): self.node_1 = node_1 self.node_2 = node_2 self.args = max([node_1.args, node_2.args]) ...
from nodes import Node class MultiVar(Node): char = "'" args = 0 results = None contents = -1 def __init__(self, node_1: Node.NodeSingle, node_2: Node.NodeSingle): self.node_1 = node_1 self.node_2 = node_2 def prepare(self, stack): self.node_1.prepare(stac...
from nodes import Node class MultiVar(Node): char = "'" args = 0 results = None contents = -1 def __init__(self, node_1: Node.NodeSingle, node_2: Node.NodeSingle): self.node_1 = node_1 self.node_2 = node_2 self.args = max([node_1.args, node_2.args]) def pr...
<commit_before> from nodes import Node class MultiVar(Node): char = "'" args = 0 results = None contents = -1 def __init__(self, node_1: Node.NodeSingle, node_2: Node.NodeSingle): self.node_1 = node_1 self.node_2 = node_2 self.args = max([node_1.args, node_2.args]) ...
3518e9088ecbbc273f922ba418d2962d6af2dda5
feature_extraction/measurements/texture_haralick.py
feature_extraction/measurements/texture_haralick.py
from . import Measurement import feature_extraction.util.cleanup as cleanup class HaralickTexture(Measurement): def compute(self, image): return []
from . import Measurement import feature_extraction.util.cleanup as cleanup from skimage.morphology import binary_erosion, disk class HaralickTexture(Measurement): default_options = { 'clip_cell_borders': True, 'erode_cell': False, 'erode_cell_amount': False, } def __init__(self, options=None): super(Harali...
Add cell-boundary preprocessing to HaralickTexture measurement
Add cell-boundary preprocessing to HaralickTexture measurement
Python
apache-2.0
widoptimization-willett/feature-extraction
from . import Measurement import feature_extraction.util.cleanup as cleanup class HaralickTexture(Measurement): def compute(self, image): return [] Add cell-boundary preprocessing to HaralickTexture measurement
from . import Measurement import feature_extraction.util.cleanup as cleanup from skimage.morphology import binary_erosion, disk class HaralickTexture(Measurement): default_options = { 'clip_cell_borders': True, 'erode_cell': False, 'erode_cell_amount': False, } def __init__(self, options=None): super(Harali...
<commit_before>from . import Measurement import feature_extraction.util.cleanup as cleanup class HaralickTexture(Measurement): def compute(self, image): return [] <commit_msg>Add cell-boundary preprocessing to HaralickTexture measurement<commit_after>
from . import Measurement import feature_extraction.util.cleanup as cleanup from skimage.morphology import binary_erosion, disk class HaralickTexture(Measurement): default_options = { 'clip_cell_borders': True, 'erode_cell': False, 'erode_cell_amount': False, } def __init__(self, options=None): super(Harali...
from . import Measurement import feature_extraction.util.cleanup as cleanup class HaralickTexture(Measurement): def compute(self, image): return [] Add cell-boundary preprocessing to HaralickTexture measurementfrom . import Measurement import feature_extraction.util.cleanup as cleanup from skimage.morphology import...
<commit_before>from . import Measurement import feature_extraction.util.cleanup as cleanup class HaralickTexture(Measurement): def compute(self, image): return [] <commit_msg>Add cell-boundary preprocessing to HaralickTexture measurement<commit_after>from . import Measurement import feature_extraction.util.cleanup ...
b08315337e71737a36e3e79da99ce167620711b9
photodaemon.py
photodaemon.py
#!/bin/env python import picamera import redis import time import json import os def take_photo(): print "%s Capture photo" % (time.strftime('%Y.%m.%d %H:%M:%S %Z')) camera = picamera.PiCamera() camera.vflip = True camera.resolution = (1280, 720) time.sleep(1) camera.capture('static/photo.jpg'...
#!/bin/env python import picamera import redis import time import json import os def take_photo(): print "%s Capture photo" % (time.strftime('%Y.%m.%d %H:%M:%S %Z')) camera = picamera.PiCamera() camera.vflip = True camera.resolution = (1280, 720) time.sleep(1) camera.capture('static/photo.jpg'...
Fix publishing photo creation event
Fix publishing photo creation event
Python
mit
Ajnasz/pippo,Ajnasz/pippo,Ajnasz/pippo
#!/bin/env python import picamera import redis import time import json import os def take_photo(): print "%s Capture photo" % (time.strftime('%Y.%m.%d %H:%M:%S %Z')) camera = picamera.PiCamera() camera.vflip = True camera.resolution = (1280, 720) time.sleep(1) camera.capture('static/photo.jpg'...
#!/bin/env python import picamera import redis import time import json import os def take_photo(): print "%s Capture photo" % (time.strftime('%Y.%m.%d %H:%M:%S %Z')) camera = picamera.PiCamera() camera.vflip = True camera.resolution = (1280, 720) time.sleep(1) camera.capture('static/photo.jpg'...
<commit_before>#!/bin/env python import picamera import redis import time import json import os def take_photo(): print "%s Capture photo" % (time.strftime('%Y.%m.%d %H:%M:%S %Z')) camera = picamera.PiCamera() camera.vflip = True camera.resolution = (1280, 720) time.sleep(1) camera.capture('st...
#!/bin/env python import picamera import redis import time import json import os def take_photo(): print "%s Capture photo" % (time.strftime('%Y.%m.%d %H:%M:%S %Z')) camera = picamera.PiCamera() camera.vflip = True camera.resolution = (1280, 720) time.sleep(1) camera.capture('static/photo.jpg'...
#!/bin/env python import picamera import redis import time import json import os def take_photo(): print "%s Capture photo" % (time.strftime('%Y.%m.%d %H:%M:%S %Z')) camera = picamera.PiCamera() camera.vflip = True camera.resolution = (1280, 720) time.sleep(1) camera.capture('static/photo.jpg'...
<commit_before>#!/bin/env python import picamera import redis import time import json import os def take_photo(): print "%s Capture photo" % (time.strftime('%Y.%m.%d %H:%M:%S %Z')) camera = picamera.PiCamera() camera.vflip = True camera.resolution = (1280, 720) time.sleep(1) camera.capture('st...
b2fbb48049abbfff7f1636059f8ad7eda07667c7
test/single_system/all.py
test/single_system/all.py
import sys, unittest import bmc_test import power_test import xmlrunner tests = [] tests.extend(bmc_test.tests) #tests.extend(power_test.tests) if __name__ == '__main__': for test in tests: test.system = sys.argv[1] suite = unittest.TestLoader().loadTestsFromTestCase(test) xmlrunner.XMLTes...
import sys, unittest, os import bmc_test import power_test import xmlrunner tests = [] tests.extend(bmc_test.tests) #tests.extend(power_test.tests) if __name__ == '__main__': for test in tests: test.system = sys.argv[1] suite = unittest.TestLoader().loadTestsFromTestCase(test) result = xml...
Return a bad error code when a test fails
Return a bad error code when a test fails
Python
bsd-3-clause
Cynerva/pyipmi,emaadmanzoor/pyipmi
import sys, unittest import bmc_test import power_test import xmlrunner tests = [] tests.extend(bmc_test.tests) #tests.extend(power_test.tests) if __name__ == '__main__': for test in tests: test.system = sys.argv[1] suite = unittest.TestLoader().loadTestsFromTestCase(test) xmlrunner.XMLTes...
import sys, unittest, os import bmc_test import power_test import xmlrunner tests = [] tests.extend(bmc_test.tests) #tests.extend(power_test.tests) if __name__ == '__main__': for test in tests: test.system = sys.argv[1] suite = unittest.TestLoader().loadTestsFromTestCase(test) result = xml...
<commit_before>import sys, unittest import bmc_test import power_test import xmlrunner tests = [] tests.extend(bmc_test.tests) #tests.extend(power_test.tests) if __name__ == '__main__': for test in tests: test.system = sys.argv[1] suite = unittest.TestLoader().loadTestsFromTestCase(test) x...
import sys, unittest, os import bmc_test import power_test import xmlrunner tests = [] tests.extend(bmc_test.tests) #tests.extend(power_test.tests) if __name__ == '__main__': for test in tests: test.system = sys.argv[1] suite = unittest.TestLoader().loadTestsFromTestCase(test) result = xml...
import sys, unittest import bmc_test import power_test import xmlrunner tests = [] tests.extend(bmc_test.tests) #tests.extend(power_test.tests) if __name__ == '__main__': for test in tests: test.system = sys.argv[1] suite = unittest.TestLoader().loadTestsFromTestCase(test) xmlrunner.XMLTes...
<commit_before>import sys, unittest import bmc_test import power_test import xmlrunner tests = [] tests.extend(bmc_test.tests) #tests.extend(power_test.tests) if __name__ == '__main__': for test in tests: test.system = sys.argv[1] suite = unittest.TestLoader().loadTestsFromTestCase(test) x...
6046de052e1f19d2b7cdd3d86f921ac3c16ce338
usaidmmc/__init__.py
usaidmmc/__init__.py
from __future__ import absolute_import from usaidmmc.celery import app as celery_app
from __future__ import absolute_import from usaidmmc.celery import app as celery_app # flake8: noqa
Stop flake8 complaining about task importer
Stop flake8 complaining about task importer
Python
bsd-3-clause
praekelt/django-usaid-mmc,praekelt/django-usaid-mmc
from __future__ import absolute_import from usaidmmc.celery import app as celery_app Stop flake8 complaining about task importer
from __future__ import absolute_import from usaidmmc.celery import app as celery_app # flake8: noqa
<commit_before>from __future__ import absolute_import from usaidmmc.celery import app as celery_app <commit_msg>Stop flake8 complaining about task importer<commit_after>
from __future__ import absolute_import from usaidmmc.celery import app as celery_app # flake8: noqa
from __future__ import absolute_import from usaidmmc.celery import app as celery_app Stop flake8 complaining about task importerfrom __future__ import absolute_import from usaidmmc.celery import app as celery_app # flake8: noqa
<commit_before>from __future__ import absolute_import from usaidmmc.celery import app as celery_app <commit_msg>Stop flake8 complaining about task importer<commit_after>from __future__ import absolute_import from usaidmmc.celery import app as celery_app # flake8: noqa
94b55ead63523f7f5677989f1a4999994b205cdf
src/runcommands/util/enums.py
src/runcommands/util/enums.py
import enum import subprocess from blessings import Terminal TERM = Terminal() class Color(enum.Enum): none = "" reset = TERM.normal black = TERM.black red = TERM.red green = TERM.green yellow = TERM.yellow blue = TERM.blue magenta = TERM.magenta cyan = TERM.cyan white = TE...
import enum import os import subprocess import sys from blessings import Terminal from .misc import isatty if not (isatty(sys.stdout) and os.getenv("TERM")): class Terminal: def __getattr__(self, name): return "" TERM = Terminal() class Color(enum.Enum): none = "" reset = TERM....
Check for TTY and TERM when setting up Color enum
Check for TTY and TERM when setting up Color enum Amends 0d27649df30419a79ca063ee3e47073f2ba8330e
Python
mit
wylee/runcommands,wylee/runcommands
import enum import subprocess from blessings import Terminal TERM = Terminal() class Color(enum.Enum): none = "" reset = TERM.normal black = TERM.black red = TERM.red green = TERM.green yellow = TERM.yellow blue = TERM.blue magenta = TERM.magenta cyan = TERM.cyan white = TE...
import enum import os import subprocess import sys from blessings import Terminal from .misc import isatty if not (isatty(sys.stdout) and os.getenv("TERM")): class Terminal: def __getattr__(self, name): return "" TERM = Terminal() class Color(enum.Enum): none = "" reset = TERM....
<commit_before>import enum import subprocess from blessings import Terminal TERM = Terminal() class Color(enum.Enum): none = "" reset = TERM.normal black = TERM.black red = TERM.red green = TERM.green yellow = TERM.yellow blue = TERM.blue magenta = TERM.magenta cyan = TERM.cyan...
import enum import os import subprocess import sys from blessings import Terminal from .misc import isatty if not (isatty(sys.stdout) and os.getenv("TERM")): class Terminal: def __getattr__(self, name): return "" TERM = Terminal() class Color(enum.Enum): none = "" reset = TERM....
import enum import subprocess from blessings import Terminal TERM = Terminal() class Color(enum.Enum): none = "" reset = TERM.normal black = TERM.black red = TERM.red green = TERM.green yellow = TERM.yellow blue = TERM.blue magenta = TERM.magenta cyan = TERM.cyan white = TE...
<commit_before>import enum import subprocess from blessings import Terminal TERM = Terminal() class Color(enum.Enum): none = "" reset = TERM.normal black = TERM.black red = TERM.red green = TERM.green yellow = TERM.yellow blue = TERM.blue magenta = TERM.magenta cyan = TERM.cyan...
621ca7bebfcc53026d8f98b9f6cfefe6ff25961b
src/util/constants.py
src/util/constants.py
# start of sentence token SOS = '<S>' # end of sentence token EOS = '</S>'
# start of sentence token SOS = chr(2) # end of sentence token EOS = chr(3)
Use separate characters for SOS and EOS
Use separate characters for SOS and EOS
Python
mit
milankinen/c2w2c,milankinen/c2w2c
# start of sentence token SOS = '<S>' # end of sentence token EOS = '</S>' Use separate characters for SOS and EOS
# start of sentence token SOS = chr(2) # end of sentence token EOS = chr(3)
<commit_before> # start of sentence token SOS = '<S>' # end of sentence token EOS = '</S>' <commit_msg>Use separate characters for SOS and EOS <commit_after>
# start of sentence token SOS = chr(2) # end of sentence token EOS = chr(3)
# start of sentence token SOS = '<S>' # end of sentence token EOS = '</S>' Use separate characters for SOS and EOS # start of sentence token SOS = chr(2) # end of sentence token EOS = chr(3)
<commit_before> # start of sentence token SOS = '<S>' # end of sentence token EOS = '</S>' <commit_msg>Use separate characters for SOS and EOS <commit_after> # start of sentence token SOS = chr(2) # end of sentence token EOS = chr(3)
e6bfc4eb1d8f5a4d0239232fa89aa9d3d756549c
test/geocoders/geonames.py
test/geocoders/geonames.py
import unittest from geopy.geocoders import GeoNames from test.geocoders.util import GeocoderTestBase, env @unittest.skipUnless( # pylint: disable=R0904,C0111 bool(env.get('GEONAMES_USERNAME')), "No GEONAMES_USERNAME env variable set" ) class GeoNamesTestCase(GeocoderTestBase): @classmethod def se...
# -*- coding: UTF-8 -*- import unittest from geopy.geocoders import GeoNames from test.geocoders.util import GeocoderTestBase, env @unittest.skipUnless( # pylint: disable=R0904,C0111 bool(env.get('GEONAMES_USERNAME')), "No GEONAMES_USERNAME env variable set" ) class GeoNamesTestCase(GeocoderTestBase): ...
Use different location for GeoNames integration test
Use different location for GeoNames integration test
Python
mit
RDXT/geopy,Vimos/geopy,mthh/geopy,memaldi/geopy,ahlusar1989/geopy,jmb/geopy,two9seven/geopy,magnushiie/geopy,ahlusar1989/geopy,mthh/geopy,Vimos/geopy,smileliaohua/geopy,SoftwareArtisan/geopy,magnushiie/geopy,cffk/geopy,cffk/geopy,geopy/geopy,memaldi/geopy,RDXT/geopy,sebastianneubauer/geopy,sebastianneubauer/geopy,smile...
import unittest from geopy.geocoders import GeoNames from test.geocoders.util import GeocoderTestBase, env @unittest.skipUnless( # pylint: disable=R0904,C0111 bool(env.get('GEONAMES_USERNAME')), "No GEONAMES_USERNAME env variable set" ) class GeoNamesTestCase(GeocoderTestBase): @classmethod def se...
# -*- coding: UTF-8 -*- import unittest from geopy.geocoders import GeoNames from test.geocoders.util import GeocoderTestBase, env @unittest.skipUnless( # pylint: disable=R0904,C0111 bool(env.get('GEONAMES_USERNAME')), "No GEONAMES_USERNAME env variable set" ) class GeoNamesTestCase(GeocoderTestBase): ...
<commit_before> import unittest from geopy.geocoders import GeoNames from test.geocoders.util import GeocoderTestBase, env @unittest.skipUnless( # pylint: disable=R0904,C0111 bool(env.get('GEONAMES_USERNAME')), "No GEONAMES_USERNAME env variable set" ) class GeoNamesTestCase(GeocoderTestBase): @classme...
# -*- coding: UTF-8 -*- import unittest from geopy.geocoders import GeoNames from test.geocoders.util import GeocoderTestBase, env @unittest.skipUnless( # pylint: disable=R0904,C0111 bool(env.get('GEONAMES_USERNAME')), "No GEONAMES_USERNAME env variable set" ) class GeoNamesTestCase(GeocoderTestBase): ...
import unittest from geopy.geocoders import GeoNames from test.geocoders.util import GeocoderTestBase, env @unittest.skipUnless( # pylint: disable=R0904,C0111 bool(env.get('GEONAMES_USERNAME')), "No GEONAMES_USERNAME env variable set" ) class GeoNamesTestCase(GeocoderTestBase): @classmethod def se...
<commit_before> import unittest from geopy.geocoders import GeoNames from test.geocoders.util import GeocoderTestBase, env @unittest.skipUnless( # pylint: disable=R0904,C0111 bool(env.get('GEONAMES_USERNAME')), "No GEONAMES_USERNAME env variable set" ) class GeoNamesTestCase(GeocoderTestBase): @classme...
56e5e255b19c0b0d5998628706542d8f9666f58c
tests/builtins/test_sum.py
tests/builtins/test_sum.py
from .. utils import TranspileTestCase, BuiltinFunctionTestCase class SumTests(TranspileTestCase): def test_sum_list(self): self.assertCodeExecution(""" print(sum([1, 2, 3, 4, 5, 6, 7])) """) def test_sum_tuple(self): self.assertCodeExecution(""" print(sum((1, ...
from .. utils import TranspileTestCase, BuiltinFunctionTestCase class SumTests(TranspileTestCase): def test_sum_list(self): self.assertCodeExecution(""" print(sum([1, 2, 3, 4, 5, 6, 7])) """) def test_sum_tuple(self): self.assertCodeExecution(""" print(sum((1, ...
Put ‘test_frozenset’ back into BuiltinSumFunctionTests.not_implemented
Put ‘test_frozenset’ back into BuiltinSumFunctionTests.not_implemented I’m fairly certain that this was accidentally removed by my automatic processing
Python
bsd-3-clause
cflee/voc,freakboy3742/voc,cflee/voc,freakboy3742/voc
from .. utils import TranspileTestCase, BuiltinFunctionTestCase class SumTests(TranspileTestCase): def test_sum_list(self): self.assertCodeExecution(""" print(sum([1, 2, 3, 4, 5, 6, 7])) """) def test_sum_tuple(self): self.assertCodeExecution(""" print(sum((1, ...
from .. utils import TranspileTestCase, BuiltinFunctionTestCase class SumTests(TranspileTestCase): def test_sum_list(self): self.assertCodeExecution(""" print(sum([1, 2, 3, 4, 5, 6, 7])) """) def test_sum_tuple(self): self.assertCodeExecution(""" print(sum((1, ...
<commit_before>from .. utils import TranspileTestCase, BuiltinFunctionTestCase class SumTests(TranspileTestCase): def test_sum_list(self): self.assertCodeExecution(""" print(sum([1, 2, 3, 4, 5, 6, 7])) """) def test_sum_tuple(self): self.assertCodeExecution(""" ...
from .. utils import TranspileTestCase, BuiltinFunctionTestCase class SumTests(TranspileTestCase): def test_sum_list(self): self.assertCodeExecution(""" print(sum([1, 2, 3, 4, 5, 6, 7])) """) def test_sum_tuple(self): self.assertCodeExecution(""" print(sum((1, ...
from .. utils import TranspileTestCase, BuiltinFunctionTestCase class SumTests(TranspileTestCase): def test_sum_list(self): self.assertCodeExecution(""" print(sum([1, 2, 3, 4, 5, 6, 7])) """) def test_sum_tuple(self): self.assertCodeExecution(""" print(sum((1, ...
<commit_before>from .. utils import TranspileTestCase, BuiltinFunctionTestCase class SumTests(TranspileTestCase): def test_sum_list(self): self.assertCodeExecution(""" print(sum([1, 2, 3, 4, 5, 6, 7])) """) def test_sum_tuple(self): self.assertCodeExecution(""" ...
abd0f3af8967cb7f261082a4f1ee90d4b5f274ca
purefap/core/management/commands/deleteusers.py
purefap/core/management/commands/deleteusers.py
from django.core.management.base import BaseCommand, CommandError from purefap.core.models import FTPUser, FTPStaff, FTPClient import shutil from datetime import datetime from optparse import make_option class Command(BaseCommand): option_list = BaseCommand.option_list + ( make_option('--noop', ...
from django.core.management.base import BaseCommand, CommandError from purefap.core.models import FTPUser, FTPStaff, FTPClient import shutil from datetime import datetime from optparse import make_option class Command(BaseCommand): option_list = BaseCommand.option_list + ( make_option('--noop', ...
Fix rmtree call for deleting user's homedirs
Fix rmtree call for deleting user's homedirs
Python
bsd-2-clause
fim/purefap
from django.core.management.base import BaseCommand, CommandError from purefap.core.models import FTPUser, FTPStaff, FTPClient import shutil from datetime import datetime from optparse import make_option class Command(BaseCommand): option_list = BaseCommand.option_list + ( make_option('--noop', ...
from django.core.management.base import BaseCommand, CommandError from purefap.core.models import FTPUser, FTPStaff, FTPClient import shutil from datetime import datetime from optparse import make_option class Command(BaseCommand): option_list = BaseCommand.option_list + ( make_option('--noop', ...
<commit_before>from django.core.management.base import BaseCommand, CommandError from purefap.core.models import FTPUser, FTPStaff, FTPClient import shutil from datetime import datetime from optparse import make_option class Command(BaseCommand): option_list = BaseCommand.option_list + ( make_option('--noo...
from django.core.management.base import BaseCommand, CommandError from purefap.core.models import FTPUser, FTPStaff, FTPClient import shutil from datetime import datetime from optparse import make_option class Command(BaseCommand): option_list = BaseCommand.option_list + ( make_option('--noop', ...
from django.core.management.base import BaseCommand, CommandError from purefap.core.models import FTPUser, FTPStaff, FTPClient import shutil from datetime import datetime from optparse import make_option class Command(BaseCommand): option_list = BaseCommand.option_list + ( make_option('--noop', ...
<commit_before>from django.core.management.base import BaseCommand, CommandError from purefap.core.models import FTPUser, FTPStaff, FTPClient import shutil from datetime import datetime from optparse import make_option class Command(BaseCommand): option_list = BaseCommand.option_list + ( make_option('--noo...
3f180c4251a4217c31d954bae3fd5ffb5b49fbd7
build/presubmit_checks.py
build/presubmit_checks.py
# Copyright (c) 2015 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. import re def CheckChangeLogBug(input_api, output_api): if input_api.change.BUG is None or re.match('\#\d+$', input_api.change.BUG): return [] e...
# Copyright (c) 2015 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. import re def CheckChangeLogBug(input_api, output_api): if input_api.change.BUG is None or re.match( '(\#\d+)(,\s*\#\d+)*$', input_api.change.BU...
Fix multiple bug IDs on presubmit.
Fix multiple bug IDs on presubmit. BUG=#1212 TBR=nduca@chromium.org Review URL: https://codereview.chromium.org/1282273002
Python
bsd-3-clause
catapult-project/catapult,scottmcmaster/catapult,catapult-project/catapult,SummerLW/Perf-Insight-Report,catapult-project/catapult-csm,danbeam/catapult,SummerLW/Perf-Insight-Report,catapult-project/catapult-csm,catapult-project/catapult-csm,catapult-project/catapult,0x90sled/catapult,SummerLW/Perf-Insight-Report,catapul...
# Copyright (c) 2015 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. import re def CheckChangeLogBug(input_api, output_api): if input_api.change.BUG is None or re.match('\#\d+$', input_api.change.BUG): return [] e...
# Copyright (c) 2015 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. import re def CheckChangeLogBug(input_api, output_api): if input_api.change.BUG is None or re.match( '(\#\d+)(,\s*\#\d+)*$', input_api.change.BU...
<commit_before># Copyright (c) 2015 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. import re def CheckChangeLogBug(input_api, output_api): if input_api.change.BUG is None or re.match('\#\d+$', input_api.change.BUG): ...
# Copyright (c) 2015 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. import re def CheckChangeLogBug(input_api, output_api): if input_api.change.BUG is None or re.match( '(\#\d+)(,\s*\#\d+)*$', input_api.change.BU...
# Copyright (c) 2015 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. import re def CheckChangeLogBug(input_api, output_api): if input_api.change.BUG is None or re.match('\#\d+$', input_api.change.BUG): return [] e...
<commit_before># Copyright (c) 2015 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. import re def CheckChangeLogBug(input_api, output_api): if input_api.change.BUG is None or re.match('\#\d+$', input_api.change.BUG): ...
dd6621267957bf621629f6ccb1930f089c7fd3eb
Lib/plat-riscos/riscosenviron.py
Lib/plat-riscos/riscosenviron.py
"""A more or less complete user-defined wrapper around dictionary objects.""" import riscos class _Environ: def __init__(self, initial = None): pass def __repr__(self): return repr(riscos.getenvdict()) def __cmp__(self, dict): if isinstance(dict, UserDict): return cmp(r...
"""A more or less complete user-defined wrapper around dictionary objects.""" import riscos class _Environ: def __init__(self, initial = None): pass def __repr__(self): return repr(riscos.getenvdict()) def __cmp__(self, dict): if isinstance(dict, UserDict): return cmp(r...
Replace setenv with putenv. Reported by Dietmar Schwertberger.
Replace setenv with putenv. Reported by Dietmar Schwertberger.
Python
mit
sk-/python2.7-type-annotator,sk-/python2.7-type-annotator,sk-/python2.7-type-annotator
"""A more or less complete user-defined wrapper around dictionary objects.""" import riscos class _Environ: def __init__(self, initial = None): pass def __repr__(self): return repr(riscos.getenvdict()) def __cmp__(self, dict): if isinstance(dict, UserDict): return cmp(r...
"""A more or less complete user-defined wrapper around dictionary objects.""" import riscos class _Environ: def __init__(self, initial = None): pass def __repr__(self): return repr(riscos.getenvdict()) def __cmp__(self, dict): if isinstance(dict, UserDict): return cmp(r...
<commit_before>"""A more or less complete user-defined wrapper around dictionary objects.""" import riscos class _Environ: def __init__(self, initial = None): pass def __repr__(self): return repr(riscos.getenvdict()) def __cmp__(self, dict): if isinstance(dict, UserDict): ...
"""A more or less complete user-defined wrapper around dictionary objects.""" import riscos class _Environ: def __init__(self, initial = None): pass def __repr__(self): return repr(riscos.getenvdict()) def __cmp__(self, dict): if isinstance(dict, UserDict): return cmp(r...
"""A more or less complete user-defined wrapper around dictionary objects.""" import riscos class _Environ: def __init__(self, initial = None): pass def __repr__(self): return repr(riscos.getenvdict()) def __cmp__(self, dict): if isinstance(dict, UserDict): return cmp(r...
<commit_before>"""A more or less complete user-defined wrapper around dictionary objects.""" import riscos class _Environ: def __init__(self, initial = None): pass def __repr__(self): return repr(riscos.getenvdict()) def __cmp__(self, dict): if isinstance(dict, UserDict): ...
cf0193adcf6c58d82b577f09842c265bc09a685a
candidates/csv_helpers.py
candidates/csv_helpers.py
import csv import StringIO from .models import CSV_ROW_FIELDS def encode_row_values(d): return { k: unicode('' if v is None else v).encode('utf-8') for k, v in d.items() } def list_to_csv(candidates_list): output = StringIO.StringIO() writer = csv.DictWriter( output, f...
import csv import StringIO from .models import CSV_ROW_FIELDS def encode_row_values(d): return { k: unicode('' if v is None else v).encode('utf-8') for k, v in d.items() } def candidate_sort_key(row): return (row['constituency'], row['name'].split()[-1]) def list_to_csv(candidates_list):...
Sort the rows in CSV output on (constituency, last name)
Sort the rows in CSV output on (constituency, last name)
Python
agpl-3.0
datamade/yournextmp-popit,openstate/yournextrepresentative,datamade/yournextmp-popit,DemocracyClub/yournextrepresentative,neavouli/yournextrepresentative,YoQuieroSaber/yournextrepresentative,openstate/yournextrepresentative,mysociety/yournextrepresentative,DemocracyClub/yournextrepresentative,mysociety/yournextmp-popit...
import csv import StringIO from .models import CSV_ROW_FIELDS def encode_row_values(d): return { k: unicode('' if v is None else v).encode('utf-8') for k, v in d.items() } def list_to_csv(candidates_list): output = StringIO.StringIO() writer = csv.DictWriter( output, f...
import csv import StringIO from .models import CSV_ROW_FIELDS def encode_row_values(d): return { k: unicode('' if v is None else v).encode('utf-8') for k, v in d.items() } def candidate_sort_key(row): return (row['constituency'], row['name'].split()[-1]) def list_to_csv(candidates_list):...
<commit_before>import csv import StringIO from .models import CSV_ROW_FIELDS def encode_row_values(d): return { k: unicode('' if v is None else v).encode('utf-8') for k, v in d.items() } def list_to_csv(candidates_list): output = StringIO.StringIO() writer = csv.DictWriter( ou...
import csv import StringIO from .models import CSV_ROW_FIELDS def encode_row_values(d): return { k: unicode('' if v is None else v).encode('utf-8') for k, v in d.items() } def candidate_sort_key(row): return (row['constituency'], row['name'].split()[-1]) def list_to_csv(candidates_list):...
import csv import StringIO from .models import CSV_ROW_FIELDS def encode_row_values(d): return { k: unicode('' if v is None else v).encode('utf-8') for k, v in d.items() } def list_to_csv(candidates_list): output = StringIO.StringIO() writer = csv.DictWriter( output, f...
<commit_before>import csv import StringIO from .models import CSV_ROW_FIELDS def encode_row_values(d): return { k: unicode('' if v is None else v).encode('utf-8') for k, v in d.items() } def list_to_csv(candidates_list): output = StringIO.StringIO() writer = csv.DictWriter( ou...
f1c09bc9969cf9d66179baef80b5cbb3d28d5596
app/report/views.py
app/report/views.py
from flask import render_template from app import app @app.route('/') def index(): return render_template('index.html') @app.route('/report/<path:repository>') def report(): pass
from flask import flash, g, redirect, render_template, request, url_for from app import app from vcs.repository import is_valid_github_repository, parse_url_and_get_repo @app.route('/') def index(): return render_template('index.html') @app.route('/about') def about(): return render_template('about.html') ...
Create default behaviour for all routers
Create default behaviour for all routers
Python
mit
mingrammer/pyreportcard,mingrammer/pyreportcard
from flask import render_template from app import app @app.route('/') def index(): return render_template('index.html') @app.route('/report/<path:repository>') def report(): pass Create default behaviour for all routers
from flask import flash, g, redirect, render_template, request, url_for from app import app from vcs.repository import is_valid_github_repository, parse_url_and_get_repo @app.route('/') def index(): return render_template('index.html') @app.route('/about') def about(): return render_template('about.html') ...
<commit_before>from flask import render_template from app import app @app.route('/') def index(): return render_template('index.html') @app.route('/report/<path:repository>') def report(): pass <commit_msg>Create default behaviour for all routers<commit_after>
from flask import flash, g, redirect, render_template, request, url_for from app import app from vcs.repository import is_valid_github_repository, parse_url_and_get_repo @app.route('/') def index(): return render_template('index.html') @app.route('/about') def about(): return render_template('about.html') ...
from flask import render_template from app import app @app.route('/') def index(): return render_template('index.html') @app.route('/report/<path:repository>') def report(): pass Create default behaviour for all routersfrom flask import flash, g, redirect, render_template, request, url_for from app import...
<commit_before>from flask import render_template from app import app @app.route('/') def index(): return render_template('index.html') @app.route('/report/<path:repository>') def report(): pass <commit_msg>Create default behaviour for all routers<commit_after>from flask import flash, g, redirect, render_te...
3c02b3d104f3a43b019fec9b4168558562ad366c
cfp/migrations/0029_auto_20150228_0428.py
cfp/migrations/0029_auto_20150228_0428.py
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations from django.db import transaction @transaction.atomic def create_topics(apps, schema_editor): Topic = apps.get_model("cfp", "Topic") Conference = apps.get_model("cfp", "Conference") for conf in Conference.ob...
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations from django.db import transaction @transaction.atomic def create_topics(apps, schema_editor): Topic = apps.get_model("cfp", "Topic") Conference = apps.get_model("cfp", "Conference") for conf in Conference.ob...
Fix migration that never actually worked
Fix migration that never actually worked
Python
mit
kyleconroy/speakers,kyleconroy/speakers,kyleconroy/speakers
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations from django.db import transaction @transaction.atomic def create_topics(apps, schema_editor): Topic = apps.get_model("cfp", "Topic") Conference = apps.get_model("cfp", "Conference") for conf in Conference.ob...
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations from django.db import transaction @transaction.atomic def create_topics(apps, schema_editor): Topic = apps.get_model("cfp", "Topic") Conference = apps.get_model("cfp", "Conference") for conf in Conference.ob...
<commit_before># -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations from django.db import transaction @transaction.atomic def create_topics(apps, schema_editor): Topic = apps.get_model("cfp", "Topic") Conference = apps.get_model("cfp", "Conference") for conf i...
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations from django.db import transaction @transaction.atomic def create_topics(apps, schema_editor): Topic = apps.get_model("cfp", "Topic") Conference = apps.get_model("cfp", "Conference") for conf in Conference.ob...
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations from django.db import transaction @transaction.atomic def create_topics(apps, schema_editor): Topic = apps.get_model("cfp", "Topic") Conference = apps.get_model("cfp", "Conference") for conf in Conference.ob...
<commit_before># -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations from django.db import transaction @transaction.atomic def create_topics(apps, schema_editor): Topic = apps.get_model("cfp", "Topic") Conference = apps.get_model("cfp", "Conference") for conf i...
703fb96d207d71bc2061f796ceabb7ffaccca34e
dotter/__main__.py
dotter/__main__.py
import argparse import logging import os from .client import GithubCachedClient from .search import get_dotfiles, SEARCH_QUERIES def parse_args(): parser = argparse.ArgumentParser(description='Search github for common lines in dotfiles') parser.add_argument('-t', '--token-file', type=os.path.abspath, ...
import argparse import logging import os from .client import GithubCachedClient, GithubClient from .search import get_dotfiles, SEARCH_QUERIES def parse_args(): parser = argparse.ArgumentParser(description='Search github for common lines in dotfiles') parser.add_argument('-t', '--token-file', type=os.path.ab...
Make token-file and cache-path optional
Make token-file and cache-path optional
Python
mit
allait/dotter
import argparse import logging import os from .client import GithubCachedClient from .search import get_dotfiles, SEARCH_QUERIES def parse_args(): parser = argparse.ArgumentParser(description='Search github for common lines in dotfiles') parser.add_argument('-t', '--token-file', type=os.path.abspath, ...
import argparse import logging import os from .client import GithubCachedClient, GithubClient from .search import get_dotfiles, SEARCH_QUERIES def parse_args(): parser = argparse.ArgumentParser(description='Search github for common lines in dotfiles') parser.add_argument('-t', '--token-file', type=os.path.ab...
<commit_before>import argparse import logging import os from .client import GithubCachedClient from .search import get_dotfiles, SEARCH_QUERIES def parse_args(): parser = argparse.ArgumentParser(description='Search github for common lines in dotfiles') parser.add_argument('-t', '--token-file', type=os.path.a...
import argparse import logging import os from .client import GithubCachedClient, GithubClient from .search import get_dotfiles, SEARCH_QUERIES def parse_args(): parser = argparse.ArgumentParser(description='Search github for common lines in dotfiles') parser.add_argument('-t', '--token-file', type=os.path.ab...
import argparse import logging import os from .client import GithubCachedClient from .search import get_dotfiles, SEARCH_QUERIES def parse_args(): parser = argparse.ArgumentParser(description='Search github for common lines in dotfiles') parser.add_argument('-t', '--token-file', type=os.path.abspath, ...
<commit_before>import argparse import logging import os from .client import GithubCachedClient from .search import get_dotfiles, SEARCH_QUERIES def parse_args(): parser = argparse.ArgumentParser(description='Search github for common lines in dotfiles') parser.add_argument('-t', '--token-file', type=os.path.a...
40b78b23072841cb7926d06a9d37f5a7cdd817ab
erpnext_ebay/tasks.py
erpnext_ebay/tasks.py
# -*- coding: utf-8 -*- """Scheduled tasks to be run by erpnext_ebay""" from frappe.utils.background_jobs import enqueue def all(): pass def hourly(): enqueue('erpnext_ebay.sync_orders.sync', queue='long', job_name='Sync eBay Orders') def daily(): enqueue('erpnext_ebay.ebay_active_listin...
# -*- coding: utf-8 -*- """Scheduled tasks to be run by erpnext_ebay""" from frappe.utils.background_jobs import enqueue def all(): pass def hourly(): enqueue('erpnext_ebay.sync_orders.sync', queue='long', job_name='Sync eBay Orders') def daily(): enqueue('erpnext_ebay.ebay_active_listin...
Add multiple_error_sites for daily eBay update
fix: Add multiple_error_sites for daily eBay update
Python
mit
bglazier/erpnext_ebay,bglazier/erpnext_ebay
# -*- coding: utf-8 -*- """Scheduled tasks to be run by erpnext_ebay""" from frappe.utils.background_jobs import enqueue def all(): pass def hourly(): enqueue('erpnext_ebay.sync_orders.sync', queue='long', job_name='Sync eBay Orders') def daily(): enqueue('erpnext_ebay.ebay_active_listin...
# -*- coding: utf-8 -*- """Scheduled tasks to be run by erpnext_ebay""" from frappe.utils.background_jobs import enqueue def all(): pass def hourly(): enqueue('erpnext_ebay.sync_orders.sync', queue='long', job_name='Sync eBay Orders') def daily(): enqueue('erpnext_ebay.ebay_active_listin...
<commit_before># -*- coding: utf-8 -*- """Scheduled tasks to be run by erpnext_ebay""" from frappe.utils.background_jobs import enqueue def all(): pass def hourly(): enqueue('erpnext_ebay.sync_orders.sync', queue='long', job_name='Sync eBay Orders') def daily(): enqueue('erpnext_ebay.eba...
# -*- coding: utf-8 -*- """Scheduled tasks to be run by erpnext_ebay""" from frappe.utils.background_jobs import enqueue def all(): pass def hourly(): enqueue('erpnext_ebay.sync_orders.sync', queue='long', job_name='Sync eBay Orders') def daily(): enqueue('erpnext_ebay.ebay_active_listin...
# -*- coding: utf-8 -*- """Scheduled tasks to be run by erpnext_ebay""" from frappe.utils.background_jobs import enqueue def all(): pass def hourly(): enqueue('erpnext_ebay.sync_orders.sync', queue='long', job_name='Sync eBay Orders') def daily(): enqueue('erpnext_ebay.ebay_active_listin...
<commit_before># -*- coding: utf-8 -*- """Scheduled tasks to be run by erpnext_ebay""" from frappe.utils.background_jobs import enqueue def all(): pass def hourly(): enqueue('erpnext_ebay.sync_orders.sync', queue='long', job_name='Sync eBay Orders') def daily(): enqueue('erpnext_ebay.eba...
3fe40e91f70e8256d7c86c46f866e82e3ccf26e2
commandment/profiles/cert.py
commandment/profiles/cert.py
''' Copyright (c) 2015 Jesse Peterson Licensed under the MIT license. See the included LICENSE.txt file for details. ''' from . import Payload import plistlib # needed for Data() wrapper class PEMCertificatePayload(Payload): '''PEM-encoded certificate without private key. May contain root certificates. P...
''' Copyright (c) 2015 Jesse Peterson Licensed under the MIT license. See the included LICENSE.txt file for details. ''' from . import Payload import plistlib # needed for Data() wrapper class PEMCertificatePayload(Payload): '''PEM-encoded certificate without private key. May contain root certificates. P...
Change style of Payload suclasses to better encapsulate internal structure
Change style of Payload suclasses to better encapsulate internal structure
Python
mit
mosen/commandment,jessepeterson/commandment,mosen/commandment,mosen/commandment,mosen/commandment,jessepeterson/commandment,mosen/commandment
''' Copyright (c) 2015 Jesse Peterson Licensed under the MIT license. See the included LICENSE.txt file for details. ''' from . import Payload import plistlib # needed for Data() wrapper class PEMCertificatePayload(Payload): '''PEM-encoded certificate without private key. May contain root certificates. P...
''' Copyright (c) 2015 Jesse Peterson Licensed under the MIT license. See the included LICENSE.txt file for details. ''' from . import Payload import plistlib # needed for Data() wrapper class PEMCertificatePayload(Payload): '''PEM-encoded certificate without private key. May contain root certificates. P...
<commit_before>''' Copyright (c) 2015 Jesse Peterson Licensed under the MIT license. See the included LICENSE.txt file for details. ''' from . import Payload import plistlib # needed for Data() wrapper class PEMCertificatePayload(Payload): '''PEM-encoded certificate without private key. May contain root certi...
''' Copyright (c) 2015 Jesse Peterson Licensed under the MIT license. See the included LICENSE.txt file for details. ''' from . import Payload import plistlib # needed for Data() wrapper class PEMCertificatePayload(Payload): '''PEM-encoded certificate without private key. May contain root certificates. P...
''' Copyright (c) 2015 Jesse Peterson Licensed under the MIT license. See the included LICENSE.txt file for details. ''' from . import Payload import plistlib # needed for Data() wrapper class PEMCertificatePayload(Payload): '''PEM-encoded certificate without private key. May contain root certificates. P...
<commit_before>''' Copyright (c) 2015 Jesse Peterson Licensed under the MIT license. See the included LICENSE.txt file for details. ''' from . import Payload import plistlib # needed for Data() wrapper class PEMCertificatePayload(Payload): '''PEM-encoded certificate without private key. May contain root certi...
20211a9494cc4ecd3f50bf1280d034da8f0cda50
comics/accounts/models.py
comics/accounts/models.py
import uuid from django.contrib.auth.models import User from django.db import models from django.dispatch import receiver @receiver(models.signals.post_save, sender=User) def create_user_profile(sender, instance, created, **kwargs): if created: UserProfile.objects.create(user=instance) class UserProfil...
import uuid from django.contrib.auth.models import User from django.db import models from django.dispatch import receiver @receiver(models.signals.post_save, sender=User) def create_user_profile(sender, instance, created, **kwargs): if created: UserProfile.objects.create(user=instance) def make_secret_...
Fix secret key generation for superuser created with mangage.py
Fix secret key generation for superuser created with mangage.py
Python
agpl-3.0
datagutten/comics,datagutten/comics,jodal/comics,datagutten/comics,jodal/comics,jodal/comics,jodal/comics,datagutten/comics
import uuid from django.contrib.auth.models import User from django.db import models from django.dispatch import receiver @receiver(models.signals.post_save, sender=User) def create_user_profile(sender, instance, created, **kwargs): if created: UserProfile.objects.create(user=instance) class UserProfil...
import uuid from django.contrib.auth.models import User from django.db import models from django.dispatch import receiver @receiver(models.signals.post_save, sender=User) def create_user_profile(sender, instance, created, **kwargs): if created: UserProfile.objects.create(user=instance) def make_secret_...
<commit_before>import uuid from django.contrib.auth.models import User from django.db import models from django.dispatch import receiver @receiver(models.signals.post_save, sender=User) def create_user_profile(sender, instance, created, **kwargs): if created: UserProfile.objects.create(user=instance) c...
import uuid from django.contrib.auth.models import User from django.db import models from django.dispatch import receiver @receiver(models.signals.post_save, sender=User) def create_user_profile(sender, instance, created, **kwargs): if created: UserProfile.objects.create(user=instance) def make_secret_...
import uuid from django.contrib.auth.models import User from django.db import models from django.dispatch import receiver @receiver(models.signals.post_save, sender=User) def create_user_profile(sender, instance, created, **kwargs): if created: UserProfile.objects.create(user=instance) class UserProfil...
<commit_before>import uuid from django.contrib.auth.models import User from django.db import models from django.dispatch import receiver @receiver(models.signals.post_save, sender=User) def create_user_profile(sender, instance, created, **kwargs): if created: UserProfile.objects.create(user=instance) c...
21b884876ad211851b0c8954a1cc3e4b42cae11e
test_chatbot_brain.py
test_chatbot_brain.py
import chatbot_brain import input_filters def test_initialize_bot(): bot = chatbot_brain.Chatbot() assert len(bot.tri_lexicon) == 0 assert len(bot.bi_lexicon) == 0 def test_fill_lexicon(): bot = chatbot_brain.Chatbot() bot.fill_lexicon() assert len(bot.tri_lexicon) > 0 assert len(bot.bi_...
import chatbot_brain def test_initialize_bot(): bot = chatbot_brain.Chatbot() assert len(bot.tri_lexicon) == 0 assert len(bot.bi_lexicon) == 0 def test_fill_lexicon(): bot = chatbot_brain.Chatbot() bot.fill_lexicon() assert len(bot.tri_lexicon) > 0 assert len(bot.bi_lexicon) > 0 def te...
Add test_i_filter_random_empty_words() to assert that a list that contains an empty string will return the stock phrase
Add test_i_filter_random_empty_words() to assert that a list that contains an empty string will return the stock phrase
Python
mit
corinnelhh/chatbot,corinnelhh/chatbot
import chatbot_brain import input_filters def test_initialize_bot(): bot = chatbot_brain.Chatbot() assert len(bot.tri_lexicon) == 0 assert len(bot.bi_lexicon) == 0 def test_fill_lexicon(): bot = chatbot_brain.Chatbot() bot.fill_lexicon() assert len(bot.tri_lexicon) > 0 assert len(bot.bi_...
import chatbot_brain def test_initialize_bot(): bot = chatbot_brain.Chatbot() assert len(bot.tri_lexicon) == 0 assert len(bot.bi_lexicon) == 0 def test_fill_lexicon(): bot = chatbot_brain.Chatbot() bot.fill_lexicon() assert len(bot.tri_lexicon) > 0 assert len(bot.bi_lexicon) > 0 def te...
<commit_before>import chatbot_brain import input_filters def test_initialize_bot(): bot = chatbot_brain.Chatbot() assert len(bot.tri_lexicon) == 0 assert len(bot.bi_lexicon) == 0 def test_fill_lexicon(): bot = chatbot_brain.Chatbot() bot.fill_lexicon() assert len(bot.tri_lexicon) > 0 ass...
import chatbot_brain def test_initialize_bot(): bot = chatbot_brain.Chatbot() assert len(bot.tri_lexicon) == 0 assert len(bot.bi_lexicon) == 0 def test_fill_lexicon(): bot = chatbot_brain.Chatbot() bot.fill_lexicon() assert len(bot.tri_lexicon) > 0 assert len(bot.bi_lexicon) > 0 def te...
import chatbot_brain import input_filters def test_initialize_bot(): bot = chatbot_brain.Chatbot() assert len(bot.tri_lexicon) == 0 assert len(bot.bi_lexicon) == 0 def test_fill_lexicon(): bot = chatbot_brain.Chatbot() bot.fill_lexicon() assert len(bot.tri_lexicon) > 0 assert len(bot.bi_...
<commit_before>import chatbot_brain import input_filters def test_initialize_bot(): bot = chatbot_brain.Chatbot() assert len(bot.tri_lexicon) == 0 assert len(bot.bi_lexicon) == 0 def test_fill_lexicon(): bot = chatbot_brain.Chatbot() bot.fill_lexicon() assert len(bot.tri_lexicon) > 0 ass...
3414f24398c3336f5dae8d18035f703db24e492a
ynr/apps/elections/urls.py
ynr/apps/elections/urls.py
from django.conf.urls import url from elections import views from elections.helpers import ElectionIDSwitcher urlpatterns = [ url( "elections/$", views.ElectionListView.as_view(), name="election_list_view", ), url( "elections/(?P<election>[^/]+)/$", ElectionIDSwitch...
from django.conf.urls import url from elections import views from elections.helpers import ElectionIDSwitcher urlpatterns = [ url( "^elections/$", views.ElectionListView.as_view(), name="election_list_view", ), url( "^elections/(?P<election>[^/]+)/$", ElectionIDSwit...
Make elections URLs match less
Make elections URLs match less
Python
agpl-3.0
DemocracyClub/yournextrepresentative,DemocracyClub/yournextrepresentative,DemocracyClub/yournextrepresentative
from django.conf.urls import url from elections import views from elections.helpers import ElectionIDSwitcher urlpatterns = [ url( "elections/$", views.ElectionListView.as_view(), name="election_list_view", ), url( "elections/(?P<election>[^/]+)/$", ElectionIDSwitch...
from django.conf.urls import url from elections import views from elections.helpers import ElectionIDSwitcher urlpatterns = [ url( "^elections/$", views.ElectionListView.as_view(), name="election_list_view", ), url( "^elections/(?P<election>[^/]+)/$", ElectionIDSwit...
<commit_before>from django.conf.urls import url from elections import views from elections.helpers import ElectionIDSwitcher urlpatterns = [ url( "elections/$", views.ElectionListView.as_view(), name="election_list_view", ), url( "elections/(?P<election>[^/]+)/$", E...
from django.conf.urls import url from elections import views from elections.helpers import ElectionIDSwitcher urlpatterns = [ url( "^elections/$", views.ElectionListView.as_view(), name="election_list_view", ), url( "^elections/(?P<election>[^/]+)/$", ElectionIDSwit...
from django.conf.urls import url from elections import views from elections.helpers import ElectionIDSwitcher urlpatterns = [ url( "elections/$", views.ElectionListView.as_view(), name="election_list_view", ), url( "elections/(?P<election>[^/]+)/$", ElectionIDSwitch...
<commit_before>from django.conf.urls import url from elections import views from elections.helpers import ElectionIDSwitcher urlpatterns = [ url( "elections/$", views.ElectionListView.as_view(), name="election_list_view", ), url( "elections/(?P<election>[^/]+)/$", E...
e60649e08ce6b1b01d1480bc06433007c9c320ee
zun/tests/tempest/utils.py
zun/tests/tempest/utils.py
# Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the Li...
# Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the Li...
Change the tempest test interval to 2s.
Change the tempest test interval to 2s. Always seen tempest test fail with api timeout error. Refer to http://logs.openstack.org/42/469342/2/check/ gate-zun-devstack-dsvm-docker-sql/02b4650/ logs/apache/zun_api.txt.gz#_2017-05-31_08_29_52_459 But run the tempest in local devstack, the logs show there are lots of rabbi...
Python
apache-2.0
kevin-zhaoshuai/zun,kevin-zhaoshuai/zun,kevin-zhaoshuai/zun
# Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the Li...
# Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the Li...
<commit_before># Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distribut...
# Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the Li...
# Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the Li...
<commit_before># Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distribut...
fa6902b75b9eb274e2dd410e3702d77fed018050
bot/api/telegram.py
bot/api/telegram.py
import requests from bot.api.domain import ApiObject class TelegramBotApi: def __init__(self, auth_token, debug: bool): self.base_url = "https://api.telegram.org/bot" + auth_token + "/" self.debug = debug def __getattr__(self, item): return self.__get_request_from_function_name(item)...
import requests class TelegramBotApi: """This is a threading-safe API. Avoid breaking it by adding state.""" def __init__(self, auth_token, debug: bool): self.base_url = "https://api.telegram.org/bot" + auth_token + "/" self.debug = debug def __getattr__(self, item): return self....
Mark TelegramBotApi as thread-safe. Also remove unused import.
Mark TelegramBotApi as thread-safe. Also remove unused import.
Python
agpl-3.0
alvarogzp/telegram-bot,alvarogzp/telegram-bot
import requests from bot.api.domain import ApiObject class TelegramBotApi: def __init__(self, auth_token, debug: bool): self.base_url = "https://api.telegram.org/bot" + auth_token + "/" self.debug = debug def __getattr__(self, item): return self.__get_request_from_function_name(item)...
import requests class TelegramBotApi: """This is a threading-safe API. Avoid breaking it by adding state.""" def __init__(self, auth_token, debug: bool): self.base_url = "https://api.telegram.org/bot" + auth_token + "/" self.debug = debug def __getattr__(self, item): return self....
<commit_before>import requests from bot.api.domain import ApiObject class TelegramBotApi: def __init__(self, auth_token, debug: bool): self.base_url = "https://api.telegram.org/bot" + auth_token + "/" self.debug = debug def __getattr__(self, item): return self.__get_request_from_func...
import requests class TelegramBotApi: """This is a threading-safe API. Avoid breaking it by adding state.""" def __init__(self, auth_token, debug: bool): self.base_url = "https://api.telegram.org/bot" + auth_token + "/" self.debug = debug def __getattr__(self, item): return self....
import requests from bot.api.domain import ApiObject class TelegramBotApi: def __init__(self, auth_token, debug: bool): self.base_url = "https://api.telegram.org/bot" + auth_token + "/" self.debug = debug def __getattr__(self, item): return self.__get_request_from_function_name(item)...
<commit_before>import requests from bot.api.domain import ApiObject class TelegramBotApi: def __init__(self, auth_token, debug: bool): self.base_url = "https://api.telegram.org/bot" + auth_token + "/" self.debug = debug def __getattr__(self, item): return self.__get_request_from_func...
bc7b52e9f2095291f9277e3c9cbac9c191fa61a5
cherrypy/py3util.py
cherrypy/py3util.py
""" A simple module that helps unify the code between a python2 and python3 library. """ import sys def sorted(lst): newlst = list(lst) newlst.sort() return newlst def reversed(lst): newlst = list(lst) return iter(newlst[::-1])
""" A simple module that helps unify the code between a python2 and python3 library. """ import sys try: sorted = sorted except NameError: def sorted(lst): newlst = list(lst) newlst.sort() return newlst try: reversed = reversed except NameError: def reversed(lst): newls...
Use builtin sorted, reversed if available.
Use builtin sorted, reversed if available. --HG-- extra : convert_revision : svn%3Ae1d34091-3ce9-0310-8e96-997e60db3bd5/trunk%402444
Python
bsd-3-clause
cherrypy/magicbus
""" A simple module that helps unify the code between a python2 and python3 library. """ import sys def sorted(lst): newlst = list(lst) newlst.sort() return newlst def reversed(lst): newlst = list(lst) return iter(newlst[::-1]) Use builtin sorted, reversed if available. --HG-- extra : convert_rev...
""" A simple module that helps unify the code between a python2 and python3 library. """ import sys try: sorted = sorted except NameError: def sorted(lst): newlst = list(lst) newlst.sort() return newlst try: reversed = reversed except NameError: def reversed(lst): newls...
<commit_before>""" A simple module that helps unify the code between a python2 and python3 library. """ import sys def sorted(lst): newlst = list(lst) newlst.sort() return newlst def reversed(lst): newlst = list(lst) return iter(newlst[::-1]) <commit_msg>Use builtin sorted, reversed if available. ...
""" A simple module that helps unify the code between a python2 and python3 library. """ import sys try: sorted = sorted except NameError: def sorted(lst): newlst = list(lst) newlst.sort() return newlst try: reversed = reversed except NameError: def reversed(lst): newls...
""" A simple module that helps unify the code between a python2 and python3 library. """ import sys def sorted(lst): newlst = list(lst) newlst.sort() return newlst def reversed(lst): newlst = list(lst) return iter(newlst[::-1]) Use builtin sorted, reversed if available. --HG-- extra : convert_rev...
<commit_before>""" A simple module that helps unify the code between a python2 and python3 library. """ import sys def sorted(lst): newlst = list(lst) newlst.sort() return newlst def reversed(lst): newlst = list(lst) return iter(newlst[::-1]) <commit_msg>Use builtin sorted, reversed if available. ...
20370bf79b43dc566a6a7e85a903275d80e437a2
api/projects/signals.py
api/projects/signals.py
from django.db.models.signals import post_save from django.dispatch import receiver from projects.models import ExperimentGroup from projects.tasks import start_group_experiments from experiments.models import Experiment @receiver(post_save, sender=ExperimentGroup, dispatch_uid="experiment_group_saved") def new_expe...
from django.db.models.signals import post_save, pre_save from django.dispatch import receiver from projects.models import ExperimentGroup from projects.tasks import start_group_experiments from experiments.models import Experiment from spawner import scheduler @receiver(post_save, sender=ExperimentGroup, dispatch_ui...
Stop experiments before deleting group
Stop experiments before deleting group
Python
apache-2.0
polyaxon/polyaxon,polyaxon/polyaxon,polyaxon/polyaxon
from django.db.models.signals import post_save from django.dispatch import receiver from projects.models import ExperimentGroup from projects.tasks import start_group_experiments from experiments.models import Experiment @receiver(post_save, sender=ExperimentGroup, dispatch_uid="experiment_group_saved") def new_expe...
from django.db.models.signals import post_save, pre_save from django.dispatch import receiver from projects.models import ExperimentGroup from projects.tasks import start_group_experiments from experiments.models import Experiment from spawner import scheduler @receiver(post_save, sender=ExperimentGroup, dispatch_ui...
<commit_before>from django.db.models.signals import post_save from django.dispatch import receiver from projects.models import ExperimentGroup from projects.tasks import start_group_experiments from experiments.models import Experiment @receiver(post_save, sender=ExperimentGroup, dispatch_uid="experiment_group_saved...
from django.db.models.signals import post_save, pre_save from django.dispatch import receiver from projects.models import ExperimentGroup from projects.tasks import start_group_experiments from experiments.models import Experiment from spawner import scheduler @receiver(post_save, sender=ExperimentGroup, dispatch_ui...
from django.db.models.signals import post_save from django.dispatch import receiver from projects.models import ExperimentGroup from projects.tasks import start_group_experiments from experiments.models import Experiment @receiver(post_save, sender=ExperimentGroup, dispatch_uid="experiment_group_saved") def new_expe...
<commit_before>from django.db.models.signals import post_save from django.dispatch import receiver from projects.models import ExperimentGroup from projects.tasks import start_group_experiments from experiments.models import Experiment @receiver(post_save, sender=ExperimentGroup, dispatch_uid="experiment_group_saved...
0eafac86c679689c77e371150c173c351d0aa926
appex_dump.py
appex_dump.py
# coding: utf-8 # See: https://forum.omz-software.com/topic/2358/appex-safari-content import appex def main(): if appex.is_running_extension(): for func in (appex.get_attachments, appex.get_file_path, appex.get_file_paths, appex.get_image, appex.get_images, appex.get_text, appex.g...
# coding: utf-8 # See: https://forum.omz-software.com/topic/2358/appex-safari-content import appex, inspect def main(): if appex.is_running_extension(): for name_func in inspect.getmembers(appex): name, func = name_func if name.startswith('get_'): # find all appex.get_xxx() metho...
Use inspect to remove hardcoding of method names
Use inspect to remove hardcoding of method names
Python
apache-2.0
cclauss/Ten-lines-or-less
# coding: utf-8 # See: https://forum.omz-software.com/topic/2358/appex-safari-content import appex def main(): if appex.is_running_extension(): for func in (appex.get_attachments, appex.get_file_path, appex.get_file_paths, appex.get_image, appex.get_images, appex.get_text, appex.g...
# coding: utf-8 # See: https://forum.omz-software.com/topic/2358/appex-safari-content import appex, inspect def main(): if appex.is_running_extension(): for name_func in inspect.getmembers(appex): name, func = name_func if name.startswith('get_'): # find all appex.get_xxx() metho...
<commit_before># coding: utf-8 # See: https://forum.omz-software.com/topic/2358/appex-safari-content import appex def main(): if appex.is_running_extension(): for func in (appex.get_attachments, appex.get_file_path, appex.get_file_paths, appex.get_image, appex.get_images, appex.ge...
# coding: utf-8 # See: https://forum.omz-software.com/topic/2358/appex-safari-content import appex, inspect def main(): if appex.is_running_extension(): for name_func in inspect.getmembers(appex): name, func = name_func if name.startswith('get_'): # find all appex.get_xxx() metho...
# coding: utf-8 # See: https://forum.omz-software.com/topic/2358/appex-safari-content import appex def main(): if appex.is_running_extension(): for func in (appex.get_attachments, appex.get_file_path, appex.get_file_paths, appex.get_image, appex.get_images, appex.get_text, appex.g...
<commit_before># coding: utf-8 # See: https://forum.omz-software.com/topic/2358/appex-safari-content import appex def main(): if appex.is_running_extension(): for func in (appex.get_attachments, appex.get_file_path, appex.get_file_paths, appex.get_image, appex.get_images, appex.ge...
42536943591ef77df3fc453e6e0b456e7a2bed89
cupy/array_api/_typing.py
cupy/array_api/_typing.py
""" This file defines the types for type annotations. These names aren't part of the module namespace, but they are used in the annotations in the function signatures. The functions in the module are only valid for inputs that match the given type annotations. """ from cupy.cuda import Device as _Device __all__ = [...
""" This file defines the types for type annotations. These names aren't part of the module namespace, but they are used in the annotations in the function signatures. The functions in the module are only valid for inputs that match the given type annotations. """ from cupy.cuda import Device as _Device from __futu...
Replace `NestedSequence` with a proper nested sequence protocol
ENH: Replace `NestedSequence` with a proper nested sequence protocol
Python
mit
cupy/cupy,cupy/cupy,cupy/cupy,cupy/cupy
""" This file defines the types for type annotations. These names aren't part of the module namespace, but they are used in the annotations in the function signatures. The functions in the module are only valid for inputs that match the given type annotations. """ from cupy.cuda import Device as _Device __all__ = [...
""" This file defines the types for type annotations. These names aren't part of the module namespace, but they are used in the annotations in the function signatures. The functions in the module are only valid for inputs that match the given type annotations. """ from cupy.cuda import Device as _Device from __futu...
<commit_before>""" This file defines the types for type annotations. These names aren't part of the module namespace, but they are used in the annotations in the function signatures. The functions in the module are only valid for inputs that match the given type annotations. """ from cupy.cuda import Device as _Devic...
""" This file defines the types for type annotations. These names aren't part of the module namespace, but they are used in the annotations in the function signatures. The functions in the module are only valid for inputs that match the given type annotations. """ from cupy.cuda import Device as _Device from __futu...
""" This file defines the types for type annotations. These names aren't part of the module namespace, but they are used in the annotations in the function signatures. The functions in the module are only valid for inputs that match the given type annotations. """ from cupy.cuda import Device as _Device __all__ = [...
<commit_before>""" This file defines the types for type annotations. These names aren't part of the module namespace, but they are used in the annotations in the function signatures. The functions in the module are only valid for inputs that match the given type annotations. """ from cupy.cuda import Device as _Devic...
79488513dfedb27a627a1eb516fb2fb2b6a2900c
geotrek/settings/env_tests.py
geotrek/settings/env_tests.py
# # Django Tests # .......................... TEST = True CELERY_ALWAYS_EAGER = True TEST_EXCLUDE = ('django',) INSTALLED_APPS += ( 'geotrek.diving', 'geotrek.sensitivity', 'geotrek.outdoor', ) LOGGING['handlers']['console']['level'] = 'CRITICAL' LANGUAGE_CODE = 'en' MODELTRANSLATION_DEFAULT_LANGUAGE...
# # Django Tests # .......................... TEST = True CELERY_ALWAYS_EAGER = True TEST_EXCLUDE = ('django',) INSTALLED_APPS += ( 'geotrek.diving', 'geotrek.sensitivity', 'geotrek.outdoor', 'drf_yasg', ) LOGGING['handlers']['console']['level'] = 'CRITICAL' LANGUAGE_CODE = 'en' MODELTRANSLATION_...
Enable drf_yasg in test settings
Enable drf_yasg in test settings
Python
bsd-2-clause
makinacorpus/Geotrek,GeotrekCE/Geotrek-admin,GeotrekCE/Geotrek-admin,makinacorpus/Geotrek,GeotrekCE/Geotrek-admin,makinacorpus/Geotrek,GeotrekCE/Geotrek-admin,makinacorpus/Geotrek
# # Django Tests # .......................... TEST = True CELERY_ALWAYS_EAGER = True TEST_EXCLUDE = ('django',) INSTALLED_APPS += ( 'geotrek.diving', 'geotrek.sensitivity', 'geotrek.outdoor', ) LOGGING['handlers']['console']['level'] = 'CRITICAL' LANGUAGE_CODE = 'en' MODELTRANSLATION_DEFAULT_LANGUAGE...
# # Django Tests # .......................... TEST = True CELERY_ALWAYS_EAGER = True TEST_EXCLUDE = ('django',) INSTALLED_APPS += ( 'geotrek.diving', 'geotrek.sensitivity', 'geotrek.outdoor', 'drf_yasg', ) LOGGING['handlers']['console']['level'] = 'CRITICAL' LANGUAGE_CODE = 'en' MODELTRANSLATION_...
<commit_before># # Django Tests # .......................... TEST = True CELERY_ALWAYS_EAGER = True TEST_EXCLUDE = ('django',) INSTALLED_APPS += ( 'geotrek.diving', 'geotrek.sensitivity', 'geotrek.outdoor', ) LOGGING['handlers']['console']['level'] = 'CRITICAL' LANGUAGE_CODE = 'en' MODELTRANSLATION_D...
# # Django Tests # .......................... TEST = True CELERY_ALWAYS_EAGER = True TEST_EXCLUDE = ('django',) INSTALLED_APPS += ( 'geotrek.diving', 'geotrek.sensitivity', 'geotrek.outdoor', 'drf_yasg', ) LOGGING['handlers']['console']['level'] = 'CRITICAL' LANGUAGE_CODE = 'en' MODELTRANSLATION_...
# # Django Tests # .......................... TEST = True CELERY_ALWAYS_EAGER = True TEST_EXCLUDE = ('django',) INSTALLED_APPS += ( 'geotrek.diving', 'geotrek.sensitivity', 'geotrek.outdoor', ) LOGGING['handlers']['console']['level'] = 'CRITICAL' LANGUAGE_CODE = 'en' MODELTRANSLATION_DEFAULT_LANGUAGE...
<commit_before># # Django Tests # .......................... TEST = True CELERY_ALWAYS_EAGER = True TEST_EXCLUDE = ('django',) INSTALLED_APPS += ( 'geotrek.diving', 'geotrek.sensitivity', 'geotrek.outdoor', ) LOGGING['handlers']['console']['level'] = 'CRITICAL' LANGUAGE_CODE = 'en' MODELTRANSLATION_D...
4a6ef7b593786f409c72f192c50e16e40082c8de
apps/dashboards/urls.py
apps/dashboards/urls.py
from django.conf.urls import patterns, url from django.views.generic.simple import redirect_to urlpatterns = patterns('dashboards.views', url(r'^dashboards/revisions$', 'revisions', name='dashboards.revisions'), url(r'^dashboards/user_lookup$', 'user_lookup', name='dashboards.user_lookup'), url(r'...
from django.conf.urls import patterns, url from django.views.generic.base import RedirectView urlpatterns = patterns('dashboards.views', url(r'^dashboards/revisions$', 'revisions', name='dashboards.revisions'), url(r'^dashboards/user_lookup$', 'user_lookup', name='dashboards.user_lookup'), url(r'^...
Hide DeprecationWarning for old function based generic views.
Hide DeprecationWarning for old function based generic views.
Python
mpl-2.0
jwhitlock/kuma,ollie314/kuma,chirilo/kuma,varunkamra/kuma,biswajitsahu/kuma,robhudson/kuma,openjck/kuma,RanadeepPolavarapu/kuma,scrollback/kuma,davehunt/kuma,a2sheppy/kuma,scrollback/kuma,davidyezsetz/kuma,robhudson/kuma,mozilla/kuma,davidyezsetz/kuma,nhenezi/kuma,MenZil/kuma,jezdez/kuma,RanadeepPolavarapu/kuma,escatto...
from django.conf.urls import patterns, url from django.views.generic.simple import redirect_to urlpatterns = patterns('dashboards.views', url(r'^dashboards/revisions$', 'revisions', name='dashboards.revisions'), url(r'^dashboards/user_lookup$', 'user_lookup', name='dashboards.user_lookup'), url(r'...
from django.conf.urls import patterns, url from django.views.generic.base import RedirectView urlpatterns = patterns('dashboards.views', url(r'^dashboards/revisions$', 'revisions', name='dashboards.revisions'), url(r'^dashboards/user_lookup$', 'user_lookup', name='dashboards.user_lookup'), url(r'^...
<commit_before>from django.conf.urls import patterns, url from django.views.generic.simple import redirect_to urlpatterns = patterns('dashboards.views', url(r'^dashboards/revisions$', 'revisions', name='dashboards.revisions'), url(r'^dashboards/user_lookup$', 'user_lookup', name='dashboards.user_looku...
from django.conf.urls import patterns, url from django.views.generic.base import RedirectView urlpatterns = patterns('dashboards.views', url(r'^dashboards/revisions$', 'revisions', name='dashboards.revisions'), url(r'^dashboards/user_lookup$', 'user_lookup', name='dashboards.user_lookup'), url(r'^...
from django.conf.urls import patterns, url from django.views.generic.simple import redirect_to urlpatterns = patterns('dashboards.views', url(r'^dashboards/revisions$', 'revisions', name='dashboards.revisions'), url(r'^dashboards/user_lookup$', 'user_lookup', name='dashboards.user_lookup'), url(r'...
<commit_before>from django.conf.urls import patterns, url from django.views.generic.simple import redirect_to urlpatterns = patterns('dashboards.views', url(r'^dashboards/revisions$', 'revisions', name='dashboards.revisions'), url(r'^dashboards/user_lookup$', 'user_lookup', name='dashboards.user_looku...
1a10f21566f59c9f4f8171bc088af1e2a18d9702
prestoadmin/_version.py
prestoadmin/_version.py
# -*- coding: utf-8 -*- # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software ...
# -*- coding: utf-8 -*- # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software ...
Prepare for the next development iteration
Prepare for the next development iteration
Python
apache-2.0
prestodb/presto-admin,prestodb/presto-admin
# -*- coding: utf-8 -*- # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software ...
# -*- coding: utf-8 -*- # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software ...
<commit_before># -*- coding: utf-8 -*- # # 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 wri...
# -*- coding: utf-8 -*- # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software ...
# -*- coding: utf-8 -*- # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software ...
<commit_before># -*- coding: utf-8 -*- # # 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 wri...
8a254f3b80016bf9d2a048191e947cb66993cc7a
bin/reactobus.py
bin/reactobus.py
#!/usr/bin/python3 import argparse def main(): # Parse the command line parser = argparse.ArgumentParser() parser.add_argument("-c", "--conf", default="/etc/reactobus.yaml", help="ReactOBus configuration") loggrp = parser.add_argument_group('Logging') loggrp.add_argument("...
#!/usr/bin/python3 import argparse import logging import sys FORMAT = "%(asctime)-15s %(levelname)s %(message)s" LOG = logging.getLogger("ReactOBus") def configure_logger(log_file, level): if level == "ERROR": LOG.setLevel(logging.ERROR) elif level == "WARN": LOG.setLevel(logging.WARN) e...
Add logging and argument parsing
Add logging and argument parsing
Python
agpl-3.0
ivoire/ReactOBus,ivoire/ReactOBus
#!/usr/bin/python3 import argparse def main(): # Parse the command line parser = argparse.ArgumentParser() parser.add_argument("-c", "--conf", default="/etc/reactobus.yaml", help="ReactOBus configuration") loggrp = parser.add_argument_group('Logging') loggrp.add_argument("...
#!/usr/bin/python3 import argparse import logging import sys FORMAT = "%(asctime)-15s %(levelname)s %(message)s" LOG = logging.getLogger("ReactOBus") def configure_logger(log_file, level): if level == "ERROR": LOG.setLevel(logging.ERROR) elif level == "WARN": LOG.setLevel(logging.WARN) e...
<commit_before>#!/usr/bin/python3 import argparse def main(): # Parse the command line parser = argparse.ArgumentParser() parser.add_argument("-c", "--conf", default="/etc/reactobus.yaml", help="ReactOBus configuration") loggrp = parser.add_argument_group('Logging') loggrp...
#!/usr/bin/python3 import argparse import logging import sys FORMAT = "%(asctime)-15s %(levelname)s %(message)s" LOG = logging.getLogger("ReactOBus") def configure_logger(log_file, level): if level == "ERROR": LOG.setLevel(logging.ERROR) elif level == "WARN": LOG.setLevel(logging.WARN) e...
#!/usr/bin/python3 import argparse def main(): # Parse the command line parser = argparse.ArgumentParser() parser.add_argument("-c", "--conf", default="/etc/reactobus.yaml", help="ReactOBus configuration") loggrp = parser.add_argument_group('Logging') loggrp.add_argument("...
<commit_before>#!/usr/bin/python3 import argparse def main(): # Parse the command line parser = argparse.ArgumentParser() parser.add_argument("-c", "--conf", default="/etc/reactobus.yaml", help="ReactOBus configuration") loggrp = parser.add_argument_group('Logging') loggrp...
2f084990d919855a4b1e4bb909c607ef91810fba
knights/dj.py
knights/dj.py
from collections import defaultdict from django.template import TemplateDoesNotExist, TemplateSyntaxError # NOQA from django.template.backends.base import BaseEngine from django.template.backends.utils import csrf_input_lazy, csrf_token_lazy from . import compiler from . import loader class KnightsTemplater(BaseEn...
from collections import defaultdict from django.template import TemplateDoesNotExist, TemplateSyntaxError # NOQA from django.template.backends.base import BaseEngine from django.template.backends.utils import csrf_input_lazy, csrf_token_lazy from . import compiler from . import loader class KnightsTemplater(BaseEn...
Use built in template dirs list Add user to context
Use built in template dirs list Add user to context
Python
mit
funkybob/knights-templater,funkybob/knights-templater
from collections import defaultdict from django.template import TemplateDoesNotExist, TemplateSyntaxError # NOQA from django.template.backends.base import BaseEngine from django.template.backends.utils import csrf_input_lazy, csrf_token_lazy from . import compiler from . import loader class KnightsTemplater(BaseEn...
from collections import defaultdict from django.template import TemplateDoesNotExist, TemplateSyntaxError # NOQA from django.template.backends.base import BaseEngine from django.template.backends.utils import csrf_input_lazy, csrf_token_lazy from . import compiler from . import loader class KnightsTemplater(BaseEn...
<commit_before>from collections import defaultdict from django.template import TemplateDoesNotExist, TemplateSyntaxError # NOQA from django.template.backends.base import BaseEngine from django.template.backends.utils import csrf_input_lazy, csrf_token_lazy from . import compiler from . import loader class KnightsT...
from collections import defaultdict from django.template import TemplateDoesNotExist, TemplateSyntaxError # NOQA from django.template.backends.base import BaseEngine from django.template.backends.utils import csrf_input_lazy, csrf_token_lazy from . import compiler from . import loader class KnightsTemplater(BaseEn...
from collections import defaultdict from django.template import TemplateDoesNotExist, TemplateSyntaxError # NOQA from django.template.backends.base import BaseEngine from django.template.backends.utils import csrf_input_lazy, csrf_token_lazy from . import compiler from . import loader class KnightsTemplater(BaseEn...
<commit_before>from collections import defaultdict from django.template import TemplateDoesNotExist, TemplateSyntaxError # NOQA from django.template.backends.base import BaseEngine from django.template.backends.utils import csrf_input_lazy, csrf_token_lazy from . import compiler from . import loader class KnightsT...
720537726b3f1eb88e67ec7454ddddbee1f123fa
benchmarks/variables.py
benchmarks/variables.py
# Copyright 2022 D-Wave Systems Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or...
# Copyright 2022 D-Wave Systems Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or...
Add benchmarks for Variables construction
Add benchmarks for Variables construction
Python
apache-2.0
dwavesystems/dimod,dwavesystems/dimod
# Copyright 2022 D-Wave Systems Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or...
# Copyright 2022 D-Wave Systems Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or...
<commit_before># Copyright 2022 D-Wave Systems Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by ap...
# Copyright 2022 D-Wave Systems Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or...
# Copyright 2022 D-Wave Systems Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or...
<commit_before># Copyright 2022 D-Wave Systems Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by ap...
e6dc05681fdf20b4dd2683fdc52991645cfbaf59
shuup/admin/modules/attributes/views/list.py
shuup/admin/modules/attributes/views/list.py
# -*- coding: utf-8 -*- # This file is part of Shuup. # # Copyright (c) 2012-2016, Shoop Ltd. All rights reserved. # # This source code is licensed under the AGPLv3 license found in the # LICENSE file in the root directory of this source tree. from __future__ import unicode_literals from django.db.models import Count ...
# -*- coding: utf-8 -*- # This file is part of Shuup. # # Copyright (c) 2012-2016, Shoop Ltd. All rights reserved. # # This source code is licensed under the AGPLv3 license found in the # LICENSE file in the root directory of this source tree. from __future__ import unicode_literals from django.db.models import Count ...
Modify attributes for dynamic columns
Modify attributes for dynamic columns Refs SH-64
Python
agpl-3.0
suutari/shoop,shoopio/shoop,shawnadelic/shuup,shawnadelic/shuup,shoopio/shoop,suutari-ai/shoop,suutari-ai/shoop,suutari-ai/shoop,suutari/shoop,shawnadelic/shuup,shoopio/shoop,suutari/shoop
# -*- coding: utf-8 -*- # This file is part of Shuup. # # Copyright (c) 2012-2016, Shoop Ltd. All rights reserved. # # This source code is licensed under the AGPLv3 license found in the # LICENSE file in the root directory of this source tree. from __future__ import unicode_literals from django.db.models import Count ...
# -*- coding: utf-8 -*- # This file is part of Shuup. # # Copyright (c) 2012-2016, Shoop Ltd. All rights reserved. # # This source code is licensed under the AGPLv3 license found in the # LICENSE file in the root directory of this source tree. from __future__ import unicode_literals from django.db.models import Count ...
<commit_before># -*- coding: utf-8 -*- # This file is part of Shuup. # # Copyright (c) 2012-2016, Shoop Ltd. All rights reserved. # # This source code is licensed under the AGPLv3 license found in the # LICENSE file in the root directory of this source tree. from __future__ import unicode_literals from django.db.model...
# -*- coding: utf-8 -*- # This file is part of Shuup. # # Copyright (c) 2012-2016, Shoop Ltd. All rights reserved. # # This source code is licensed under the AGPLv3 license found in the # LICENSE file in the root directory of this source tree. from __future__ import unicode_literals from django.db.models import Count ...
# -*- coding: utf-8 -*- # This file is part of Shuup. # # Copyright (c) 2012-2016, Shoop Ltd. All rights reserved. # # This source code is licensed under the AGPLv3 license found in the # LICENSE file in the root directory of this source tree. from __future__ import unicode_literals from django.db.models import Count ...
<commit_before># -*- coding: utf-8 -*- # This file is part of Shuup. # # Copyright (c) 2012-2016, Shoop Ltd. All rights reserved. # # This source code is licensed under the AGPLv3 license found in the # LICENSE file in the root directory of this source tree. from __future__ import unicode_literals from django.db.model...
9de844864b3e6c732241a68d1871f701232d2733
celery_janitor/utils.py
celery_janitor/utils.py
import importlib import urlparse from celery_janitor import conf from celery_janitor.exceptions import BackendNotSupportedException BACKEND_MAPPING = { 'sqs': 'celery_janitor.backends.sqs.SQSBackend' } def import_class(path): path_bits = path.split('.') class_name = path_bits.pop() module_path = '....
import importlib try: from urlparse import urlparse except ImportError: # Python 3.x from urllib.parse import urlparse from celery_janitor import conf from celery_janitor.exceptions import BackendNotSupportedException BACKEND_MAPPING = { 'sqs': 'celery_janitor.backends.sqs.SQSBackend' } def import_cla...
Fix Python 3.4 import error
Fix Python 3.4 import error
Python
mit
comandrei/celery-janitor
import importlib import urlparse from celery_janitor import conf from celery_janitor.exceptions import BackendNotSupportedException BACKEND_MAPPING = { 'sqs': 'celery_janitor.backends.sqs.SQSBackend' } def import_class(path): path_bits = path.split('.') class_name = path_bits.pop() module_path = '....
import importlib try: from urlparse import urlparse except ImportError: # Python 3.x from urllib.parse import urlparse from celery_janitor import conf from celery_janitor.exceptions import BackendNotSupportedException BACKEND_MAPPING = { 'sqs': 'celery_janitor.backends.sqs.SQSBackend' } def import_cla...
<commit_before>import importlib import urlparse from celery_janitor import conf from celery_janitor.exceptions import BackendNotSupportedException BACKEND_MAPPING = { 'sqs': 'celery_janitor.backends.sqs.SQSBackend' } def import_class(path): path_bits = path.split('.') class_name = path_bits.pop() m...
import importlib try: from urlparse import urlparse except ImportError: # Python 3.x from urllib.parse import urlparse from celery_janitor import conf from celery_janitor.exceptions import BackendNotSupportedException BACKEND_MAPPING = { 'sqs': 'celery_janitor.backends.sqs.SQSBackend' } def import_cla...
import importlib import urlparse from celery_janitor import conf from celery_janitor.exceptions import BackendNotSupportedException BACKEND_MAPPING = { 'sqs': 'celery_janitor.backends.sqs.SQSBackend' } def import_class(path): path_bits = path.split('.') class_name = path_bits.pop() module_path = '....
<commit_before>import importlib import urlparse from celery_janitor import conf from celery_janitor.exceptions import BackendNotSupportedException BACKEND_MAPPING = { 'sqs': 'celery_janitor.backends.sqs.SQSBackend' } def import_class(path): path_bits = path.split('.') class_name = path_bits.pop() m...
8fc43046ebfaa41410c28ba6d3d27fffed25ee4e
var/spack/repos/builtin/packages/glm/package.py
var/spack/repos/builtin/packages/glm/package.py
from spack import * class Glm(Package): """ OpenGL Mathematics (GLM) is a header only C++ mathematics library for graphics software based on the OpenGL Shading Language (GLSL) specification. """ homepage = "https://github.com/g-truc/glm" url = "https://github.com/g-truc/glm/archive/0.9.7.1.ta...
from spack import * class Glm(Package): """ OpenGL Mathematics (GLM) is a header only C++ mathematics library for graphics software based on the OpenGL Shading Language (GLSL) specification. """ homepage = "https://github.com/g-truc/glm" url = "https://github.com/g-truc/glm/archive/0.9.7.1.ta...
Add missing dependency for glm
Add missing dependency for glm
Python
lgpl-2.1
TheTimmy/spack,EmreAtes/spack,TheTimmy/spack,tmerrick1/spack,LLNL/spack,tmerrick1/spack,skosukhin/spack,matthiasdiener/spack,lgarren/spack,skosukhin/spack,TheTimmy/spack,LLNL/spack,EmreAtes/spack,matthiasdiener/spack,mfherbst/spack,matthiasdiener/spack,krafczyk/spack,tmerrick1/spack,EmreAtes/spack,skosukhin/spack,matth...
from spack import * class Glm(Package): """ OpenGL Mathematics (GLM) is a header only C++ mathematics library for graphics software based on the OpenGL Shading Language (GLSL) specification. """ homepage = "https://github.com/g-truc/glm" url = "https://github.com/g-truc/glm/archive/0.9.7.1.ta...
from spack import * class Glm(Package): """ OpenGL Mathematics (GLM) is a header only C++ mathematics library for graphics software based on the OpenGL Shading Language (GLSL) specification. """ homepage = "https://github.com/g-truc/glm" url = "https://github.com/g-truc/glm/archive/0.9.7.1.ta...
<commit_before>from spack import * class Glm(Package): """ OpenGL Mathematics (GLM) is a header only C++ mathematics library for graphics software based on the OpenGL Shading Language (GLSL) specification. """ homepage = "https://github.com/g-truc/glm" url = "https://github.com/g-truc/glm/arc...
from spack import * class Glm(Package): """ OpenGL Mathematics (GLM) is a header only C++ mathematics library for graphics software based on the OpenGL Shading Language (GLSL) specification. """ homepage = "https://github.com/g-truc/glm" url = "https://github.com/g-truc/glm/archive/0.9.7.1.ta...
from spack import * class Glm(Package): """ OpenGL Mathematics (GLM) is a header only C++ mathematics library for graphics software based on the OpenGL Shading Language (GLSL) specification. """ homepage = "https://github.com/g-truc/glm" url = "https://github.com/g-truc/glm/archive/0.9.7.1.ta...
<commit_before>from spack import * class Glm(Package): """ OpenGL Mathematics (GLM) is a header only C++ mathematics library for graphics software based on the OpenGL Shading Language (GLSL) specification. """ homepage = "https://github.com/g-truc/glm" url = "https://github.com/g-truc/glm/arc...
875f70c0c43b6fdc5825525e8ccfd137cecb2bfe
malcolm/modules/builtin/parts/helppart.py
malcolm/modules/builtin/parts/helppart.py
from annotypes import Anno from malcolm.core import Part, PartRegistrar, StringMeta, Widget, APartName from ..util import set_tags with Anno("The URL that gives some help documentation for this Block"): AHelpUrl = str # Pull re-used annotypes into our namespace in case we are subclassed APartName = APartName ...
from annotypes import Anno from malcolm.core import Part, PartRegistrar, StringMeta, Widget, APartName from ..util import set_tags with Anno("The URL that gives some help documentation for this Block"): AHelpUrl = str with Anno("The description of what the help documentation is about"): ADesc = str # Pull ...
Allow description to be changed in HelpPart
Allow description to be changed in HelpPart
Python
apache-2.0
dls-controls/pymalcolm,dls-controls/pymalcolm,dls-controls/pymalcolm
from annotypes import Anno from malcolm.core import Part, PartRegistrar, StringMeta, Widget, APartName from ..util import set_tags with Anno("The URL that gives some help documentation for this Block"): AHelpUrl = str # Pull re-used annotypes into our namespace in case we are subclassed APartName = APartName ...
from annotypes import Anno from malcolm.core import Part, PartRegistrar, StringMeta, Widget, APartName from ..util import set_tags with Anno("The URL that gives some help documentation for this Block"): AHelpUrl = str with Anno("The description of what the help documentation is about"): ADesc = str # Pull ...
<commit_before>from annotypes import Anno from malcolm.core import Part, PartRegistrar, StringMeta, Widget, APartName from ..util import set_tags with Anno("The URL that gives some help documentation for this Block"): AHelpUrl = str # Pull re-used annotypes into our namespace in case we are subclassed APartName...
from annotypes import Anno from malcolm.core import Part, PartRegistrar, StringMeta, Widget, APartName from ..util import set_tags with Anno("The URL that gives some help documentation for this Block"): AHelpUrl = str with Anno("The description of what the help documentation is about"): ADesc = str # Pull ...
from annotypes import Anno from malcolm.core import Part, PartRegistrar, StringMeta, Widget, APartName from ..util import set_tags with Anno("The URL that gives some help documentation for this Block"): AHelpUrl = str # Pull re-used annotypes into our namespace in case we are subclassed APartName = APartName ...
<commit_before>from annotypes import Anno from malcolm.core import Part, PartRegistrar, StringMeta, Widget, APartName from ..util import set_tags with Anno("The URL that gives some help documentation for this Block"): AHelpUrl = str # Pull re-used annotypes into our namespace in case we are subclassed APartName...
0468c944464d55ba7ce0a821e1085ae530d49cf6
corehq/apps/es/cases.py
corehq/apps/es/cases.py
from .es_query import HQESQuery from . import filters class CaseES(HQESQuery): index = 'cases' @property def builtin_filters(self): return [ opened_range, closed_range, is_closed, case_type, ] + super(CaseES, self).builtin_filters def open...
from .es_query import HQESQuery from . import filters class CaseES(HQESQuery): index = 'cases' @property def builtin_filters(self): return [ opened_range, closed_range, is_closed, case_type, owner, ] + super(CaseES, self).builtin...
Add `owner` filter to CaseES
Add `owner` filter to CaseES
Python
bsd-3-clause
puttarajubr/commcare-hq,qedsoftware/commcare-hq,puttarajubr/commcare-hq,puttarajubr/commcare-hq,dimagi/commcare-hq,dimagi/commcare-hq,dimagi/commcare-hq,dimagi/commcare-hq,puttarajubr/commcare-hq,qedsoftware/commcare-hq,qedsoftware/commcare-hq,qedsoftware/commcare-hq,qedsoftware/commcare-hq,dimagi/commcare-hq
from .es_query import HQESQuery from . import filters class CaseES(HQESQuery): index = 'cases' @property def builtin_filters(self): return [ opened_range, closed_range, is_closed, case_type, ] + super(CaseES, self).builtin_filters def open...
from .es_query import HQESQuery from . import filters class CaseES(HQESQuery): index = 'cases' @property def builtin_filters(self): return [ opened_range, closed_range, is_closed, case_type, owner, ] + super(CaseES, self).builtin...
<commit_before>from .es_query import HQESQuery from . import filters class CaseES(HQESQuery): index = 'cases' @property def builtin_filters(self): return [ opened_range, closed_range, is_closed, case_type, ] + super(CaseES, self).builtin_fil...
from .es_query import HQESQuery from . import filters class CaseES(HQESQuery): index = 'cases' @property def builtin_filters(self): return [ opened_range, closed_range, is_closed, case_type, owner, ] + super(CaseES, self).builtin...
from .es_query import HQESQuery from . import filters class CaseES(HQESQuery): index = 'cases' @property def builtin_filters(self): return [ opened_range, closed_range, is_closed, case_type, ] + super(CaseES, self).builtin_filters def open...
<commit_before>from .es_query import HQESQuery from . import filters class CaseES(HQESQuery): index = 'cases' @property def builtin_filters(self): return [ opened_range, closed_range, is_closed, case_type, ] + super(CaseES, self).builtin_fil...
ef11e9d0247fbd10e317d30ca8898f9a3c079e37
cyder/base/tests/__init__.py
cyder/base/tests/__init__.py
from exceptions import AssertionError from django.core.exceptions import ValidationError from django.test import TestCase from django.test.client import Client from cyder.core.ctnr.models import Ctnr class CyTestMixin(object): """ Mixin for all tests. """ def _pre_setup(self): super(TestCase...
from exceptions import AssertionError from django.core.exceptions import ValidationError from django.test import TestCase from django.test.client import Client from cyder.core.ctnr.models import Ctnr class CyTestMixin(object): """ Mixin for all tests. """ def _pre_setup(self): super(TestCase...
Change variable names to reduce confusion
Change variable names to reduce confusion
Python
bsd-3-clause
murrown/cyder,drkitty/cyder,akeym/cyder,drkitty/cyder,OSU-Net/cyder,OSU-Net/cyder,zeeman/cyder,akeym/cyder,zeeman/cyder,akeym/cyder,akeym/cyder,drkitty/cyder,OSU-Net/cyder,zeeman/cyder,drkitty/cyder,zeeman/cyder,OSU-Net/cyder,murrown/cyder,murrown/cyder,murrown/cyder
from exceptions import AssertionError from django.core.exceptions import ValidationError from django.test import TestCase from django.test.client import Client from cyder.core.ctnr.models import Ctnr class CyTestMixin(object): """ Mixin for all tests. """ def _pre_setup(self): super(TestCase...
from exceptions import AssertionError from django.core.exceptions import ValidationError from django.test import TestCase from django.test.client import Client from cyder.core.ctnr.models import Ctnr class CyTestMixin(object): """ Mixin for all tests. """ def _pre_setup(self): super(TestCase...
<commit_before>from exceptions import AssertionError from django.core.exceptions import ValidationError from django.test import TestCase from django.test.client import Client from cyder.core.ctnr.models import Ctnr class CyTestMixin(object): """ Mixin for all tests. """ def _pre_setup(self): ...
from exceptions import AssertionError from django.core.exceptions import ValidationError from django.test import TestCase from django.test.client import Client from cyder.core.ctnr.models import Ctnr class CyTestMixin(object): """ Mixin for all tests. """ def _pre_setup(self): super(TestCase...
from exceptions import AssertionError from django.core.exceptions import ValidationError from django.test import TestCase from django.test.client import Client from cyder.core.ctnr.models import Ctnr class CyTestMixin(object): """ Mixin for all tests. """ def _pre_setup(self): super(TestCase...
<commit_before>from exceptions import AssertionError from django.core.exceptions import ValidationError from django.test import TestCase from django.test.client import Client from cyder.core.ctnr.models import Ctnr class CyTestMixin(object): """ Mixin for all tests. """ def _pre_setup(self): ...
a42a7e237a72825080fa0afea263dbd5766417bb
conary/lib/digestlib.py
conary/lib/digestlib.py
# # Copyright (c) 2004-2008 rPath, Inc. # # This program is distributed under the terms of the Common Public License, # version 1.0. A copy of this license should have been distributed with this # source file in a file called LICENSE. If it is not present, the license # is always available at http://www.rpath.com/perma...
# # Copyright (c) 2004-2008 rPath, Inc. # # This program is distributed under the terms of the Common Public License, # version 1.0. A copy of this license should have been distributed with this # source file in a file called LICENSE. If it is not present, the license # is always available at http://www.rpath.com/perma...
Use sha256 algorithm from pycrypto.
Use sha256 algorithm from pycrypto.
Python
apache-2.0
fedora-conary/conary,fedora-conary/conary,fedora-conary/conary,fedora-conary/conary,fedora-conary/conary
# # Copyright (c) 2004-2008 rPath, Inc. # # This program is distributed under the terms of the Common Public License, # version 1.0. A copy of this license should have been distributed with this # source file in a file called LICENSE. If it is not present, the license # is always available at http://www.rpath.com/perma...
# # Copyright (c) 2004-2008 rPath, Inc. # # This program is distributed under the terms of the Common Public License, # version 1.0. A copy of this license should have been distributed with this # source file in a file called LICENSE. If it is not present, the license # is always available at http://www.rpath.com/perma...
<commit_before># # Copyright (c) 2004-2008 rPath, Inc. # # This program is distributed under the terms of the Common Public License, # version 1.0. A copy of this license should have been distributed with this # source file in a file called LICENSE. If it is not present, the license # is always available at http://www....
# # Copyright (c) 2004-2008 rPath, Inc. # # This program is distributed under the terms of the Common Public License, # version 1.0. A copy of this license should have been distributed with this # source file in a file called LICENSE. If it is not present, the license # is always available at http://www.rpath.com/perma...
# # Copyright (c) 2004-2008 rPath, Inc. # # This program is distributed under the terms of the Common Public License, # version 1.0. A copy of this license should have been distributed with this # source file in a file called LICENSE. If it is not present, the license # is always available at http://www.rpath.com/perma...
<commit_before># # Copyright (c) 2004-2008 rPath, Inc. # # This program is distributed under the terms of the Common Public License, # version 1.0. A copy of this license should have been distributed with this # source file in a file called LICENSE. If it is not present, the license # is always available at http://www....
9a527d999075a92de3db174e0696e961c05041c4
dead_mailer.py
dead_mailer.py
#!/usr/bin/env python3 import boto3 client = boto3.client('ses') client.send_email( Source='david@severski.net', Message={ 'Subject': { 'Data': 'Here!', }, 'Body': { 'Text': { 'Data': "I'm not dead yet!", } } }, Destination={'ToAddresses': ['davidski@deadheaven.com']} )
#!/usr/bin/env python import boto3 from random import sample def acknowledge_send(): print "Acknowledge" def indicate_failure(): print "Failure" def set_message_body(selection): switcher = { '0': "I'm here!", '1': "Brrrraaaaains!", '2': "Arrived!" } return switcher.get(str(selection), 'nothing') if _...
Break down into core functions
Break down into core functions
Python
mit
davidski/imnotdeadyet,davidski/imnotdeadyet
#!/usr/bin/env python3 import boto3 client = boto3.client('ses') client.send_email( Source='david@severski.net', Message={ 'Subject': { 'Data': 'Here!', }, 'Body': { 'Text': { 'Data': "I'm not dead yet!", } } }, Destination={'ToAddresses': ['davidski@deadheaven.com']} ) Break down into core...
#!/usr/bin/env python import boto3 from random import sample def acknowledge_send(): print "Acknowledge" def indicate_failure(): print "Failure" def set_message_body(selection): switcher = { '0': "I'm here!", '1': "Brrrraaaaains!", '2': "Arrived!" } return switcher.get(str(selection), 'nothing') if _...
<commit_before>#!/usr/bin/env python3 import boto3 client = boto3.client('ses') client.send_email( Source='david@severski.net', Message={ 'Subject': { 'Data': 'Here!', }, 'Body': { 'Text': { 'Data': "I'm not dead yet!", } } }, Destination={'ToAddresses': ['davidski@deadheaven.com']} ) <comm...
#!/usr/bin/env python import boto3 from random import sample def acknowledge_send(): print "Acknowledge" def indicate_failure(): print "Failure" def set_message_body(selection): switcher = { '0': "I'm here!", '1': "Brrrraaaaains!", '2': "Arrived!" } return switcher.get(str(selection), 'nothing') if _...
#!/usr/bin/env python3 import boto3 client = boto3.client('ses') client.send_email( Source='david@severski.net', Message={ 'Subject': { 'Data': 'Here!', }, 'Body': { 'Text': { 'Data': "I'm not dead yet!", } } }, Destination={'ToAddresses': ['davidski@deadheaven.com']} ) Break down into core...
<commit_before>#!/usr/bin/env python3 import boto3 client = boto3.client('ses') client.send_email( Source='david@severski.net', Message={ 'Subject': { 'Data': 'Here!', }, 'Body': { 'Text': { 'Data': "I'm not dead yet!", } } }, Destination={'ToAddresses': ['davidski@deadheaven.com']} ) <comm...
7d7afb7d92797b48f215505579e0fb872deee0f3
rst2pdf/utils.py
rst2pdf/utils.py
# -*- coding: utf-8 -*- # See LICENSE.txt for licensing terms #$HeadURL$ #$LastChangedDate$ #$LastChangedRevision$ import shlex from reportlab.platypus import Spacer from flowables import * def parseRaw(data): """Parse and process a simple DSL to handle creation of flowables. Supported (ca...
# -*- coding: utf-8 -*- # See LICENSE.txt for licensing terms #$HeadURL$ #$LastChangedDate$ #$LastChangedRevision$ import shlex from reportlab.platypus import Spacer from flowables import * from styles import adjustUnits def parseRaw(data): """Parse and process a simple DSL to handle creation of f...
Add unit support for spacers
Add unit support for spacers
Python
mit
rafaelmartins/rst2pdf,rafaelmartins/rst2pdf
# -*- coding: utf-8 -*- # See LICENSE.txt for licensing terms #$HeadURL$ #$LastChangedDate$ #$LastChangedRevision$ import shlex from reportlab.platypus import Spacer from flowables import * def parseRaw(data): """Parse and process a simple DSL to handle creation of flowables. Supported (ca...
# -*- coding: utf-8 -*- # See LICENSE.txt for licensing terms #$HeadURL$ #$LastChangedDate$ #$LastChangedRevision$ import shlex from reportlab.platypus import Spacer from flowables import * from styles import adjustUnits def parseRaw(data): """Parse and process a simple DSL to handle creation of f...
<commit_before># -*- coding: utf-8 -*- # See LICENSE.txt for licensing terms #$HeadURL$ #$LastChangedDate$ #$LastChangedRevision$ import shlex from reportlab.platypus import Spacer from flowables import * def parseRaw(data): """Parse and process a simple DSL to handle creation of flowables. ...
# -*- coding: utf-8 -*- # See LICENSE.txt for licensing terms #$HeadURL$ #$LastChangedDate$ #$LastChangedRevision$ import shlex from reportlab.platypus import Spacer from flowables import * from styles import adjustUnits def parseRaw(data): """Parse and process a simple DSL to handle creation of f...
# -*- coding: utf-8 -*- # See LICENSE.txt for licensing terms #$HeadURL$ #$LastChangedDate$ #$LastChangedRevision$ import shlex from reportlab.platypus import Spacer from flowables import * def parseRaw(data): """Parse and process a simple DSL to handle creation of flowables. Supported (ca...
<commit_before># -*- coding: utf-8 -*- # See LICENSE.txt for licensing terms #$HeadURL$ #$LastChangedDate$ #$LastChangedRevision$ import shlex from reportlab.platypus import Spacer from flowables import * def parseRaw(data): """Parse and process a simple DSL to handle creation of flowables. ...
ff4c708d66f2d176697f01227061a9791e7d2488
statscache/utils.py
statscache/utils.py
import pkg_resources import logging log = logging.getLogger("fedmsg") def find_stats_consumer(hub): for cons in hub.consumers: if 'StatsConsumer' in str(type(cons)): return cons raise ValueError('StatsConsumer not found.') class memoized(object): def __init__(self, func): s...
import pkg_resources import logging log = logging.getLogger("fedmsg") def find_stats_consumer(hub): for cons in hub.consumers: if 'StatsConsumer' in str(type(cons)): return cons raise ValueError('StatsConsumer not found.') class memoized(object): def __init__(self, func): s...
Allow plugins to specify permissible update frequencies.
Allow plugins to specify permissible update frequencies. Fixed #2.
Python
lgpl-2.1
yazman/statscache,yazman/statscache,yazman/statscache
import pkg_resources import logging log = logging.getLogger("fedmsg") def find_stats_consumer(hub): for cons in hub.consumers: if 'StatsConsumer' in str(type(cons)): return cons raise ValueError('StatsConsumer not found.') class memoized(object): def __init__(self, func): s...
import pkg_resources import logging log = logging.getLogger("fedmsg") def find_stats_consumer(hub): for cons in hub.consumers: if 'StatsConsumer' in str(type(cons)): return cons raise ValueError('StatsConsumer not found.') class memoized(object): def __init__(self, func): s...
<commit_before>import pkg_resources import logging log = logging.getLogger("fedmsg") def find_stats_consumer(hub): for cons in hub.consumers: if 'StatsConsumer' in str(type(cons)): return cons raise ValueError('StatsConsumer not found.') class memoized(object): def __init__(self, f...
import pkg_resources import logging log = logging.getLogger("fedmsg") def find_stats_consumer(hub): for cons in hub.consumers: if 'StatsConsumer' in str(type(cons)): return cons raise ValueError('StatsConsumer not found.') class memoized(object): def __init__(self, func): s...
import pkg_resources import logging log = logging.getLogger("fedmsg") def find_stats_consumer(hub): for cons in hub.consumers: if 'StatsConsumer' in str(type(cons)): return cons raise ValueError('StatsConsumer not found.') class memoized(object): def __init__(self, func): s...
<commit_before>import pkg_resources import logging log = logging.getLogger("fedmsg") def find_stats_consumer(hub): for cons in hub.consumers: if 'StatsConsumer' in str(type(cons)): return cons raise ValueError('StatsConsumer not found.') class memoized(object): def __init__(self, f...
a36033badfa90fde764b136fa1e713dbb267a02b
depot/admin.py
depot/admin.py
from django.contrib import admin from .models import Depot, Item # make items modifiable by admin admin.site.register(Item) class DepotAdmin(admin.ModelAdmin): list_display = ['name', 'active'] ordering = ['name'] actions = ["make_archived", "make_restored"] def make_message(self, num_changed, ch...
from django.contrib import admin from .models import Depot, Item # make items modifiable by admin admin.site.register(Item) class DepotAdmin(admin.ModelAdmin): list_display = ['name', 'active'] ordering = ['name'] actions = ["make_archived", "make_restored"] @staticmethod def format_message(n...
Fix pylint complaining about spaces and other stuff
Fix pylint complaining about spaces and other stuff
Python
agpl-3.0
verleihtool/verleihtool,verleihtool/verleihtool,verleihtool/verleihtool,verleihtool/verleihtool
from django.contrib import admin from .models import Depot, Item # make items modifiable by admin admin.site.register(Item) class DepotAdmin(admin.ModelAdmin): list_display = ['name', 'active'] ordering = ['name'] actions = ["make_archived", "make_restored"] def make_message(self, num_changed, ch...
from django.contrib import admin from .models import Depot, Item # make items modifiable by admin admin.site.register(Item) class DepotAdmin(admin.ModelAdmin): list_display = ['name', 'active'] ordering = ['name'] actions = ["make_archived", "make_restored"] @staticmethod def format_message(n...
<commit_before>from django.contrib import admin from .models import Depot, Item # make items modifiable by admin admin.site.register(Item) class DepotAdmin(admin.ModelAdmin): list_display = ['name', 'active'] ordering = ['name'] actions = ["make_archived", "make_restored"] def make_message(self, ...
from django.contrib import admin from .models import Depot, Item # make items modifiable by admin admin.site.register(Item) class DepotAdmin(admin.ModelAdmin): list_display = ['name', 'active'] ordering = ['name'] actions = ["make_archived", "make_restored"] @staticmethod def format_message(n...
from django.contrib import admin from .models import Depot, Item # make items modifiable by admin admin.site.register(Item) class DepotAdmin(admin.ModelAdmin): list_display = ['name', 'active'] ordering = ['name'] actions = ["make_archived", "make_restored"] def make_message(self, num_changed, ch...
<commit_before>from django.contrib import admin from .models import Depot, Item # make items modifiable by admin admin.site.register(Item) class DepotAdmin(admin.ModelAdmin): list_display = ['name', 'active'] ordering = ['name'] actions = ["make_archived", "make_restored"] def make_message(self, ...
5651445944bce163a2c3f746d6ac1acd9ae76032
numpy/array_api/tests/test_asarray.py
numpy/array_api/tests/test_asarray.py
import numpy as np def test_fast_return(): """""" a = np.array([1, 2, 3], dtype='i') assert np.asarray(a) is a assert np.asarray(a, dtype='i') is a # This may produce a new view or a copy, but is never the same object. assert np.asarray(a, dtype='l') is not a unequal_type = np.dtype('i', ...
import numpy as np def test_fast_return(): """""" a = np.array([1, 2, 3], dtype='i') assert np.asarray(a) is a assert np.asarray(a, dtype='i') is a # This may produce a new view or a copy, but is never the same object. assert np.asarray(a, dtype='l') is not a unequal_type = np.dtype('i', ...
Update comment and obey formatting requirements.
Update comment and obey formatting requirements.
Python
bsd-3-clause
charris/numpy,mhvk/numpy,mattip/numpy,mattip/numpy,mattip/numpy,numpy/numpy,mhvk/numpy,endolith/numpy,charris/numpy,numpy/numpy,endolith/numpy,charris/numpy,numpy/numpy,endolith/numpy,endolith/numpy,charris/numpy,mattip/numpy,numpy/numpy,mhvk/numpy,mhvk/numpy,mhvk/numpy
import numpy as np def test_fast_return(): """""" a = np.array([1, 2, 3], dtype='i') assert np.asarray(a) is a assert np.asarray(a, dtype='i') is a # This may produce a new view or a copy, but is never the same object. assert np.asarray(a, dtype='l') is not a unequal_type = np.dtype('i', ...
import numpy as np def test_fast_return(): """""" a = np.array([1, 2, 3], dtype='i') assert np.asarray(a) is a assert np.asarray(a, dtype='i') is a # This may produce a new view or a copy, but is never the same object. assert np.asarray(a, dtype='l') is not a unequal_type = np.dtype('i', ...
<commit_before>import numpy as np def test_fast_return(): """""" a = np.array([1, 2, 3], dtype='i') assert np.asarray(a) is a assert np.asarray(a, dtype='i') is a # This may produce a new view or a copy, but is never the same object. assert np.asarray(a, dtype='l') is not a unequal_type =...
import numpy as np def test_fast_return(): """""" a = np.array([1, 2, 3], dtype='i') assert np.asarray(a) is a assert np.asarray(a, dtype='i') is a # This may produce a new view or a copy, but is never the same object. assert np.asarray(a, dtype='l') is not a unequal_type = np.dtype('i', ...
import numpy as np def test_fast_return(): """""" a = np.array([1, 2, 3], dtype='i') assert np.asarray(a) is a assert np.asarray(a, dtype='i') is a # This may produce a new view or a copy, but is never the same object. assert np.asarray(a, dtype='l') is not a unequal_type = np.dtype('i', ...
<commit_before>import numpy as np def test_fast_return(): """""" a = np.array([1, 2, 3], dtype='i') assert np.asarray(a) is a assert np.asarray(a, dtype='i') is a # This may produce a new view or a copy, but is never the same object. assert np.asarray(a, dtype='l') is not a unequal_type =...
7fed0208770413399fde5e76ad2046b6bc440b16
src/nodemgr/common/windows_process_manager.py
src/nodemgr/common/windows_process_manager.py
# # Copyright (c) 2018 Juniper Networks, Inc. All rights reserved. # import time from windows_process_mem_cpu import WindowsProcessMemCpuUsageData class WindowsProcessInfoManager(object): def get_mem_cpu_usage_data(self, pid, last_cpu, last_time): return WindowsProcessMemCpuUsageData(pid, last_cpu, last_...
# # Copyright (c) 2018 Juniper Networks, Inc. All rights reserved. # import psutil import time from windows_process_mem_cpu import WindowsProcessMemCpuUsageData def _service_status_to_state(status): if status == 'running': return 'PROCESS_STATE_RUNNING' else: return 'PROCESS_STATE_STOPPED' ...
Implement checking if agent is up on Windows
Implement checking if agent is up on Windows Very simple implementation using psutil Change-Id: I2b7c65d6d677f0f57e79277ac2298f0b73729b94 Partial-Bug: #1783539
Python
apache-2.0
eonpatapon/contrail-controller,rombie/contrail-controller,eonpatapon/contrail-controller,eonpatapon/contrail-controller,rombie/contrail-controller,eonpatapon/contrail-controller,rombie/contrail-controller,eonpatapon/contrail-controller,eonpatapon/contrail-controller,eonpatapon/contrail-controller,rombie/contrail-contro...
# # Copyright (c) 2018 Juniper Networks, Inc. All rights reserved. # import time from windows_process_mem_cpu import WindowsProcessMemCpuUsageData class WindowsProcessInfoManager(object): def get_mem_cpu_usage_data(self, pid, last_cpu, last_time): return WindowsProcessMemCpuUsageData(pid, last_cpu, last_...
# # Copyright (c) 2018 Juniper Networks, Inc. All rights reserved. # import psutil import time from windows_process_mem_cpu import WindowsProcessMemCpuUsageData def _service_status_to_state(status): if status == 'running': return 'PROCESS_STATE_RUNNING' else: return 'PROCESS_STATE_STOPPED' ...
<commit_before># # Copyright (c) 2018 Juniper Networks, Inc. All rights reserved. # import time from windows_process_mem_cpu import WindowsProcessMemCpuUsageData class WindowsProcessInfoManager(object): def get_mem_cpu_usage_data(self, pid, last_cpu, last_time): return WindowsProcessMemCpuUsageData(pid, ...
# # Copyright (c) 2018 Juniper Networks, Inc. All rights reserved. # import psutil import time from windows_process_mem_cpu import WindowsProcessMemCpuUsageData def _service_status_to_state(status): if status == 'running': return 'PROCESS_STATE_RUNNING' else: return 'PROCESS_STATE_STOPPED' ...
# # Copyright (c) 2018 Juniper Networks, Inc. All rights reserved. # import time from windows_process_mem_cpu import WindowsProcessMemCpuUsageData class WindowsProcessInfoManager(object): def get_mem_cpu_usage_data(self, pid, last_cpu, last_time): return WindowsProcessMemCpuUsageData(pid, last_cpu, last_...
<commit_before># # Copyright (c) 2018 Juniper Networks, Inc. All rights reserved. # import time from windows_process_mem_cpu import WindowsProcessMemCpuUsageData class WindowsProcessInfoManager(object): def get_mem_cpu_usage_data(self, pid, last_cpu, last_time): return WindowsProcessMemCpuUsageData(pid, ...
47a7770bd3c5552d61f69b7df62bf4c36de56dc8
wysteria/__init__.py
wysteria/__init__.py
from wysteria.client import Client, TlsConfig from wysteria import errors from wysteria.constants import FACET_COLLECTION from wysteria.constants import FACET_ITEM_TYPE from wysteria.constants import FACET_ITEM_VARIANT __all__ = [ "Client", "TlsConfig", "errors", "FACET_COLLECTION", "FACET_ITEM_TY...
"""The wysteria module provides a python interface for talking to a wysteria asset management server. Files: ------ - client.py high level class that wraps a middleware connection & adds some helpful functions. - constants.py various constants used - errors.py contains various exceptions that can be rais...
Add module level imports and doc strings
Add module level imports and doc strings
Python
bsd-3-clause
voidshard/pywysteria,voidshard/pywysteria
from wysteria.client import Client, TlsConfig from wysteria import errors from wysteria.constants import FACET_COLLECTION from wysteria.constants import FACET_ITEM_TYPE from wysteria.constants import FACET_ITEM_VARIANT __all__ = [ "Client", "TlsConfig", "errors", "FACET_COLLECTION", "FACET_ITEM_TY...
"""The wysteria module provides a python interface for talking to a wysteria asset management server. Files: ------ - client.py high level class that wraps a middleware connection & adds some helpful functions. - constants.py various constants used - errors.py contains various exceptions that can be rais...
<commit_before>from wysteria.client import Client, TlsConfig from wysteria import errors from wysteria.constants import FACET_COLLECTION from wysteria.constants import FACET_ITEM_TYPE from wysteria.constants import FACET_ITEM_VARIANT __all__ = [ "Client", "TlsConfig", "errors", "FACET_COLLECTION", ...
"""The wysteria module provides a python interface for talking to a wysteria asset management server. Files: ------ - client.py high level class that wraps a middleware connection & adds some helpful functions. - constants.py various constants used - errors.py contains various exceptions that can be rais...
from wysteria.client import Client, TlsConfig from wysteria import errors from wysteria.constants import FACET_COLLECTION from wysteria.constants import FACET_ITEM_TYPE from wysteria.constants import FACET_ITEM_VARIANT __all__ = [ "Client", "TlsConfig", "errors", "FACET_COLLECTION", "FACET_ITEM_TY...
<commit_before>from wysteria.client import Client, TlsConfig from wysteria import errors from wysteria.constants import FACET_COLLECTION from wysteria.constants import FACET_ITEM_TYPE from wysteria.constants import FACET_ITEM_VARIANT __all__ = [ "Client", "TlsConfig", "errors", "FACET_COLLECTION", ...
990ae22e95705bf4131c6a8326408a8fb2648433
zerodb/crypto/ecc.py
zerodb/crypto/ecc.py
import six import hashlib import ecdsa # We can use pyelliptic (uses OpenSSL) but this is more cross-patform # We use curve standard for Bitcoin by default CURVE = ecdsa.SECP256k1 class SigningKey(ecdsa.SigningKey, object): def get_pubkey(self): return b'\x04' + self.get_verifying_key().to_string() ...
import six import hashlib import ecdsa # We can use pyelliptic (uses OpenSSL) but this is more cross-platform # We use curve standard for Bitcoin by default CURVE = ecdsa.SECP256k1 class SigningKey(ecdsa.SigningKey, object): def get_pubkey(self): return b'\x04' + self.get_verifying_key().to_string() ...
Fix a typo: patform -> platform
Fix a typo: patform -> platform
Python
agpl-3.0
zerodb/zerodb,zerodb/zerodb,zero-db/zerodb,zero-db/zerodb
import six import hashlib import ecdsa # We can use pyelliptic (uses OpenSSL) but this is more cross-patform # We use curve standard for Bitcoin by default CURVE = ecdsa.SECP256k1 class SigningKey(ecdsa.SigningKey, object): def get_pubkey(self): return b'\x04' + self.get_verifying_key().to_string() ...
import six import hashlib import ecdsa # We can use pyelliptic (uses OpenSSL) but this is more cross-platform # We use curve standard for Bitcoin by default CURVE = ecdsa.SECP256k1 class SigningKey(ecdsa.SigningKey, object): def get_pubkey(self): return b'\x04' + self.get_verifying_key().to_string() ...
<commit_before>import six import hashlib import ecdsa # We can use pyelliptic (uses OpenSSL) but this is more cross-patform # We use curve standard for Bitcoin by default CURVE = ecdsa.SECP256k1 class SigningKey(ecdsa.SigningKey, object): def get_pubkey(self): return b'\x04' + self.get_verifying_key().t...
import six import hashlib import ecdsa # We can use pyelliptic (uses OpenSSL) but this is more cross-platform # We use curve standard for Bitcoin by default CURVE = ecdsa.SECP256k1 class SigningKey(ecdsa.SigningKey, object): def get_pubkey(self): return b'\x04' + self.get_verifying_key().to_string() ...
import six import hashlib import ecdsa # We can use pyelliptic (uses OpenSSL) but this is more cross-patform # We use curve standard for Bitcoin by default CURVE = ecdsa.SECP256k1 class SigningKey(ecdsa.SigningKey, object): def get_pubkey(self): return b'\x04' + self.get_verifying_key().to_string() ...
<commit_before>import six import hashlib import ecdsa # We can use pyelliptic (uses OpenSSL) but this is more cross-patform # We use curve standard for Bitcoin by default CURVE = ecdsa.SECP256k1 class SigningKey(ecdsa.SigningKey, object): def get_pubkey(self): return b'\x04' + self.get_verifying_key().t...
869bafa9aadf45c2beb3e6f4e3d3751d2d6baf8f
subversion/bindings/swig/python/tests/core.py
subversion/bindings/swig/python/tests/core.py
import unittest, os import svn.core class SubversionCoreTestCase(unittest.TestCase): """Test cases for the basic SWIG Subversion core""" def test_SubversionException(self): self.assertEqual(svn.core.SubversionException().args, ()) self.assertEqual(svn.core.SubversionException('error message').args, ...
import unittest, os import svn.core class SubversionCoreTestCase(unittest.TestCase): """Test cases for the basic SWIG Subversion core""" def test_SubversionException(self): self.assertEqual(svn.core.SubversionException().args, ()) self.assertEqual(svn.core.SubversionException('error message').args, ...
Add a regression test for the bug fixed in r28485.
Add a regression test for the bug fixed in r28485. * subversion/bindings/swig/python/tests/core.py (SubversionCoreTestCase.test_SubversionException): Test explicit exception fields. git-svn-id: f8a4e5e023278da1e04e203c7fe051e3c4285d88@868579 13f79535-47bb-0310-9956-ffa450edef68
Python
apache-2.0
wbond/subversion,wbond/subversion,YueLinHo/Subversion,YueLinHo/Subversion,YueLinHo/Subversion,wbond/subversion,wbond/subversion,YueLinHo/Subversion,YueLinHo/Subversion,wbond/subversion,wbond/subversion,YueLinHo/Subversion,wbond/subversion,YueLinHo/Subversion,YueLinHo/Subversion
import unittest, os import svn.core class SubversionCoreTestCase(unittest.TestCase): """Test cases for the basic SWIG Subversion core""" def test_SubversionException(self): self.assertEqual(svn.core.SubversionException().args, ()) self.assertEqual(svn.core.SubversionException('error message').args, ...
import unittest, os import svn.core class SubversionCoreTestCase(unittest.TestCase): """Test cases for the basic SWIG Subversion core""" def test_SubversionException(self): self.assertEqual(svn.core.SubversionException().args, ()) self.assertEqual(svn.core.SubversionException('error message').args, ...
<commit_before>import unittest, os import svn.core class SubversionCoreTestCase(unittest.TestCase): """Test cases for the basic SWIG Subversion core""" def test_SubversionException(self): self.assertEqual(svn.core.SubversionException().args, ()) self.assertEqual(svn.core.SubversionException('error messag...
import unittest, os import svn.core class SubversionCoreTestCase(unittest.TestCase): """Test cases for the basic SWIG Subversion core""" def test_SubversionException(self): self.assertEqual(svn.core.SubversionException().args, ()) self.assertEqual(svn.core.SubversionException('error message').args, ...
import unittest, os import svn.core class SubversionCoreTestCase(unittest.TestCase): """Test cases for the basic SWIG Subversion core""" def test_SubversionException(self): self.assertEqual(svn.core.SubversionException().args, ()) self.assertEqual(svn.core.SubversionException('error message').args, ...
<commit_before>import unittest, os import svn.core class SubversionCoreTestCase(unittest.TestCase): """Test cases for the basic SWIG Subversion core""" def test_SubversionException(self): self.assertEqual(svn.core.SubversionException().args, ()) self.assertEqual(svn.core.SubversionException('error messag...
b1b02a65cded26e7b0a6ddf207def5522297f7a7
__openerp__.py
__openerp__.py
# -*- coding: utf-8 -*- ############################################################################## # ############################################################################## { 'name': u"Asset Streamline", 'version': u"0.1", 'author': u"XCG Consulting", 'category': u"Custom Module", 'descri...
# -*- coding: utf-8 -*- ############################################################################## # ############################################################################## { 'name': u"Asset Streamline", 'version': u"1.0", 'author': u"XCG Consulting", 'category': u"Custom Module", 'descri...
Add dependency for 'analytic_structure' and change version to 1.0
Add dependency for 'analytic_structure' and change version to 1.0
Python
agpl-3.0
xcgd/account_asset_streamline
# -*- coding: utf-8 -*- ############################################################################## # ############################################################################## { 'name': u"Asset Streamline", 'version': u"0.1", 'author': u"XCG Consulting", 'category': u"Custom Module", 'descri...
# -*- coding: utf-8 -*- ############################################################################## # ############################################################################## { 'name': u"Asset Streamline", 'version': u"1.0", 'author': u"XCG Consulting", 'category': u"Custom Module", 'descri...
<commit_before># -*- coding: utf-8 -*- ############################################################################## # ############################################################################## { 'name': u"Asset Streamline", 'version': u"0.1", 'author': u"XCG Consulting", 'category': u"Custom Modul...
# -*- coding: utf-8 -*- ############################################################################## # ############################################################################## { 'name': u"Asset Streamline", 'version': u"1.0", 'author': u"XCG Consulting", 'category': u"Custom Module", 'descri...
# -*- coding: utf-8 -*- ############################################################################## # ############################################################################## { 'name': u"Asset Streamline", 'version': u"0.1", 'author': u"XCG Consulting", 'category': u"Custom Module", 'descri...
<commit_before># -*- coding: utf-8 -*- ############################################################################## # ############################################################################## { 'name': u"Asset Streamline", 'version': u"0.1", 'author': u"XCG Consulting", 'category': u"Custom Modul...
0c60434dc573b5770b8061751771c773032a4f76
salt/output/__init__.py
salt/output/__init__.py
''' Used to manage the outputter system. This package is the modular system used for managing outputters. ''' # Import salt utils import salt.loader def display_output(data, out, opts=None): ''' Print the passed data using the desired output ''' get_printout(out, opts)(data) def get_printout(out, o...
''' Used to manage the outputter system. This package is the modular system used for managing outputters. ''' # Import salt utils import salt.loader STATIC = ( 'yaml_out', 'txt_out', 'raw_out', 'json_out', ) def display_output(data, out, opts=None): ''' Prin...
Handle output passthrou from the cli
Handle output passthrou from the cli
Python
apache-2.0
saltstack/salt,saltstack/salt,saltstack/salt,saltstack/salt,saltstack/salt
''' Used to manage the outputter system. This package is the modular system used for managing outputters. ''' # Import salt utils import salt.loader def display_output(data, out, opts=None): ''' Print the passed data using the desired output ''' get_printout(out, opts)(data) def get_printout(out, o...
''' Used to manage the outputter system. This package is the modular system used for managing outputters. ''' # Import salt utils import salt.loader STATIC = ( 'yaml_out', 'txt_out', 'raw_out', 'json_out', ) def display_output(data, out, opts=None): ''' Prin...
<commit_before>''' Used to manage the outputter system. This package is the modular system used for managing outputters. ''' # Import salt utils import salt.loader def display_output(data, out, opts=None): ''' Print the passed data using the desired output ''' get_printout(out, opts)(data) def get_...
''' Used to manage the outputter system. This package is the modular system used for managing outputters. ''' # Import salt utils import salt.loader STATIC = ( 'yaml_out', 'txt_out', 'raw_out', 'json_out', ) def display_output(data, out, opts=None): ''' Prin...
''' Used to manage the outputter system. This package is the modular system used for managing outputters. ''' # Import salt utils import salt.loader def display_output(data, out, opts=None): ''' Print the passed data using the desired output ''' get_printout(out, opts)(data) def get_printout(out, o...
<commit_before>''' Used to manage the outputter system. This package is the modular system used for managing outputters. ''' # Import salt utils import salt.loader def display_output(data, out, opts=None): ''' Print the passed data using the desired output ''' get_printout(out, opts)(data) def get_...
9c058304c9ad1ad8c9220bc9f098a9dcf80700b9
valohai_yaml/objs/pipelines/execution_node.py
valohai_yaml/objs/pipelines/execution_node.py
from .node import Node class ExecutionNode(Node): type = 'execution' def __init__(self, name, step, override=None): if override is None: override = {} self.name = name self.step = step self.override = override
from .node import Node class ExecutionNode(Node): type = 'execution' def __init__(self, name, step, override=None): if override is None: override = {} self.name = name self.step = step self.override = override def lint(self, lint_result, context): supe...
Add linting for pipeline step existence
Add linting for pipeline step existence
Python
mit
valohai/valohai-yaml
from .node import Node class ExecutionNode(Node): type = 'execution' def __init__(self, name, step, override=None): if override is None: override = {} self.name = name self.step = step self.override = override Add linting for pipeline step existence
from .node import Node class ExecutionNode(Node): type = 'execution' def __init__(self, name, step, override=None): if override is None: override = {} self.name = name self.step = step self.override = override def lint(self, lint_result, context): supe...
<commit_before>from .node import Node class ExecutionNode(Node): type = 'execution' def __init__(self, name, step, override=None): if override is None: override = {} self.name = name self.step = step self.override = override <commit_msg>Add linting for pipeline ste...
from .node import Node class ExecutionNode(Node): type = 'execution' def __init__(self, name, step, override=None): if override is None: override = {} self.name = name self.step = step self.override = override def lint(self, lint_result, context): supe...
from .node import Node class ExecutionNode(Node): type = 'execution' def __init__(self, name, step, override=None): if override is None: override = {} self.name = name self.step = step self.override = override Add linting for pipeline step existencefrom .node impor...
<commit_before>from .node import Node class ExecutionNode(Node): type = 'execution' def __init__(self, name, step, override=None): if override is None: override = {} self.name = name self.step = step self.override = override <commit_msg>Add linting for pipeline ste...
4db714570a9ce58a08c72aa1477e9e7a48ed650c
tests/util_tests.py
tests/util_tests.py
# -*- coding: utf-8 -*- from chai import Chai from arrow import util class UtilTests(Chai): def test_is_timestamp(self): timestamp_float = 1563047716.958061 timestamp_int = int(timestamp_float) self.assertTrue(util.is_timestamp(timestamp_int)) self.assertTrue(util.is_timestamp(ti...
# -*- coding: utf-8 -*- import time from chai import Chai from arrow import util class UtilTests(Chai): def test_is_timestamp(self): timestamp_float = time.time() timestamp_int = int(timestamp_float) self.assertTrue(util.is_timestamp(timestamp_int)) self.assertTrue(util.is_times...
Replace hard coded timestamp with time.time()
Replace hard coded timestamp with time.time()
Python
apache-2.0
crsmithdev/arrow
# -*- coding: utf-8 -*- from chai import Chai from arrow import util class UtilTests(Chai): def test_is_timestamp(self): timestamp_float = 1563047716.958061 timestamp_int = int(timestamp_float) self.assertTrue(util.is_timestamp(timestamp_int)) self.assertTrue(util.is_timestamp(ti...
# -*- coding: utf-8 -*- import time from chai import Chai from arrow import util class UtilTests(Chai): def test_is_timestamp(self): timestamp_float = time.time() timestamp_int = int(timestamp_float) self.assertTrue(util.is_timestamp(timestamp_int)) self.assertTrue(util.is_times...
<commit_before># -*- coding: utf-8 -*- from chai import Chai from arrow import util class UtilTests(Chai): def test_is_timestamp(self): timestamp_float = 1563047716.958061 timestamp_int = int(timestamp_float) self.assertTrue(util.is_timestamp(timestamp_int)) self.assertTrue(util....
# -*- coding: utf-8 -*- import time from chai import Chai from arrow import util class UtilTests(Chai): def test_is_timestamp(self): timestamp_float = time.time() timestamp_int = int(timestamp_float) self.assertTrue(util.is_timestamp(timestamp_int)) self.assertTrue(util.is_times...
# -*- coding: utf-8 -*- from chai import Chai from arrow import util class UtilTests(Chai): def test_is_timestamp(self): timestamp_float = 1563047716.958061 timestamp_int = int(timestamp_float) self.assertTrue(util.is_timestamp(timestamp_int)) self.assertTrue(util.is_timestamp(ti...
<commit_before># -*- coding: utf-8 -*- from chai import Chai from arrow import util class UtilTests(Chai): def test_is_timestamp(self): timestamp_float = 1563047716.958061 timestamp_int = int(timestamp_float) self.assertTrue(util.is_timestamp(timestamp_int)) self.assertTrue(util....
7a172a7fe98223fd20a4bb5d497aa17653b8a13b
dev_tools/coverage_runner.py
dev_tools/coverage_runner.py
"""Run tests under coverage's measurement system (Used in CI) """ import os import sys from os.path import join, realpath # Third Party modules import nose import coverage cov = coverage.coverage(branch=True) cov.start() result = nose.run(defaultTest=realpath(join(__file__, "..", "..", "py2c"))) cov.stop() cov.save...
"""Run tests under coverage's measurement system (Used in CI) """ import os import sys from os.path import join, realpath # Third Party modules import nose import coverage cov = coverage.coverage(branch=True) cov.start() success = nose.run(defaultTest=realpath(join(__file__, "..", "..", "py2c"))) cov.stop() cov.sav...
Correct the usage of nose.run.
[TRAVIS] Correct the usage of nose.run. nose.run returns whether the test run was sucessful or not.
Python
bsd-3-clause
pradyunsg/Py2C,pradyunsg/Py2C
"""Run tests under coverage's measurement system (Used in CI) """ import os import sys from os.path import join, realpath # Third Party modules import nose import coverage cov = coverage.coverage(branch=True) cov.start() result = nose.run(defaultTest=realpath(join(__file__, "..", "..", "py2c"))) cov.stop() cov.save...
"""Run tests under coverage's measurement system (Used in CI) """ import os import sys from os.path import join, realpath # Third Party modules import nose import coverage cov = coverage.coverage(branch=True) cov.start() success = nose.run(defaultTest=realpath(join(__file__, "..", "..", "py2c"))) cov.stop() cov.sav...
<commit_before>"""Run tests under coverage's measurement system (Used in CI) """ import os import sys from os.path import join, realpath # Third Party modules import nose import coverage cov = coverage.coverage(branch=True) cov.start() result = nose.run(defaultTest=realpath(join(__file__, "..", "..", "py2c"))) cov....
"""Run tests under coverage's measurement system (Used in CI) """ import os import sys from os.path import join, realpath # Third Party modules import nose import coverage cov = coverage.coverage(branch=True) cov.start() success = nose.run(defaultTest=realpath(join(__file__, "..", "..", "py2c"))) cov.stop() cov.sav...
"""Run tests under coverage's measurement system (Used in CI) """ import os import sys from os.path import join, realpath # Third Party modules import nose import coverage cov = coverage.coverage(branch=True) cov.start() result = nose.run(defaultTest=realpath(join(__file__, "..", "..", "py2c"))) cov.stop() cov.save...
<commit_before>"""Run tests under coverage's measurement system (Used in CI) """ import os import sys from os.path import join, realpath # Third Party modules import nose import coverage cov = coverage.coverage(branch=True) cov.start() result = nose.run(defaultTest=realpath(join(__file__, "..", "..", "py2c"))) cov....
bd0800d46126d963f1ae107924a632752bc94173
indra/sources/bel/__init__.py
indra/sources/bel/__init__.py
from .api import process_ndex_neighborhood from .api import process_belrdf from .api import process_belscript from .api import process_pybel_graph from .api import process_json_file from .api import process_pybel_neighborhood
from .api import process_ndex_neighborhood, process_belrdf, \ process_belscript, process_pybel_graph, process_json_file, \ process_pybel_neighborhood, process_cbn_jgif_file
Add all endpoints to BEL API
Add all endpoints to BEL API
Python
bsd-2-clause
johnbachman/indra,sorgerlab/indra,bgyori/indra,bgyori/indra,johnbachman/indra,sorgerlab/indra,johnbachman/belpy,bgyori/indra,sorgerlab/belpy,sorgerlab/belpy,johnbachman/belpy,johnbachman/belpy,sorgerlab/belpy,johnbachman/indra,sorgerlab/indra
from .api import process_ndex_neighborhood from .api import process_belrdf from .api import process_belscript from .api import process_pybel_graph from .api import process_json_file from .api import process_pybel_neighborhood Add all endpoints to BEL API
from .api import process_ndex_neighborhood, process_belrdf, \ process_belscript, process_pybel_graph, process_json_file, \ process_pybel_neighborhood, process_cbn_jgif_file
<commit_before>from .api import process_ndex_neighborhood from .api import process_belrdf from .api import process_belscript from .api import process_pybel_graph from .api import process_json_file from .api import process_pybel_neighborhood <commit_msg>Add all endpoints to BEL API<commit_after>
from .api import process_ndex_neighborhood, process_belrdf, \ process_belscript, process_pybel_graph, process_json_file, \ process_pybel_neighborhood, process_cbn_jgif_file
from .api import process_ndex_neighborhood from .api import process_belrdf from .api import process_belscript from .api import process_pybel_graph from .api import process_json_file from .api import process_pybel_neighborhood Add all endpoints to BEL APIfrom .api import process_ndex_neighborhood, process_belrdf, \ ...
<commit_before>from .api import process_ndex_neighborhood from .api import process_belrdf from .api import process_belscript from .api import process_pybel_graph from .api import process_json_file from .api import process_pybel_neighborhood <commit_msg>Add all endpoints to BEL API<commit_after>from .api import process_...
bcbe4f9d91ef386b5a09d99e9c0c22b4dfcdc09b
dmf_device_ui/__init__.py
dmf_device_ui/__init__.py
# -*- coding: utf-8 -*- import gtk import uuid def gtk_wait(wait_duration_s): gtk.main_iteration_do() def generate_plugin_name(prefix='plugin-'): ''' Generate unique plugin name. ''' return prefix + str(uuid.uuid4()).split('-')[0]
# -*- coding: utf-8 -*- from pygtkhelpers.utils import refresh_gui import uuid def gtk_wait(wait_duration_s): refresh_gui() def generate_plugin_name(prefix='plugin-'): ''' Generate unique plugin name. ''' return prefix + str(uuid.uuid4()).split('-')[0]
Use pygtkhelpers refresh_gui in gtk_wait
Use pygtkhelpers refresh_gui in gtk_wait
Python
lgpl-2.1
wheeler-microfluidics/dmf-device-ui
# -*- coding: utf-8 -*- import gtk import uuid def gtk_wait(wait_duration_s): gtk.main_iteration_do() def generate_plugin_name(prefix='plugin-'): ''' Generate unique plugin name. ''' return prefix + str(uuid.uuid4()).split('-')[0] Use pygtkhelpers refresh_gui in gtk_wait
# -*- coding: utf-8 -*- from pygtkhelpers.utils import refresh_gui import uuid def gtk_wait(wait_duration_s): refresh_gui() def generate_plugin_name(prefix='plugin-'): ''' Generate unique plugin name. ''' return prefix + str(uuid.uuid4()).split('-')[0]
<commit_before># -*- coding: utf-8 -*- import gtk import uuid def gtk_wait(wait_duration_s): gtk.main_iteration_do() def generate_plugin_name(prefix='plugin-'): ''' Generate unique plugin name. ''' return prefix + str(uuid.uuid4()).split('-')[0] <commit_msg>Use pygtkhelpers refresh_gui in gtk_wa...
# -*- coding: utf-8 -*- from pygtkhelpers.utils import refresh_gui import uuid def gtk_wait(wait_duration_s): refresh_gui() def generate_plugin_name(prefix='plugin-'): ''' Generate unique plugin name. ''' return prefix + str(uuid.uuid4()).split('-')[0]
# -*- coding: utf-8 -*- import gtk import uuid def gtk_wait(wait_duration_s): gtk.main_iteration_do() def generate_plugin_name(prefix='plugin-'): ''' Generate unique plugin name. ''' return prefix + str(uuid.uuid4()).split('-')[0] Use pygtkhelpers refresh_gui in gtk_wait# -*- coding: utf-8 -*- f...
<commit_before># -*- coding: utf-8 -*- import gtk import uuid def gtk_wait(wait_duration_s): gtk.main_iteration_do() def generate_plugin_name(prefix='plugin-'): ''' Generate unique plugin name. ''' return prefix + str(uuid.uuid4()).split('-')[0] <commit_msg>Use pygtkhelpers refresh_gui in gtk_wa...
30be8d71fee8f7429d6b4d48a8168133062e3315
text_test/regex_utils_test.py
text_test/regex_utils_test.py
# coding=utf-8 import unittest from text import regex_utils class RegexUtilsTest(unittest.TestCase): def test_check_line(self): pass def test_parse_line(self): pass if __name__ == '__main__': # import sys;sys.argv = ['', 'Test.testName'] unittest.main()
# coding=utf-8 import unittest from text import regex_utils class RegexUtilsTest(unittest.TestCase): def test_check_line(self): self.assertTrue(regex_utils.check_line('.*(\d+.\d+.\d+.\d+)', 'MyIP is 192.168.199.4')) self.assertTrue(regex_utils.check_line('Test (Data|Case) For (py-text|py-task)', ...
Update regex_utils unit test case
Update regex_utils unit test case
Python
apache-2.0
PinaeOS/py-text,interhui/py-text
# coding=utf-8 import unittest from text import regex_utils class RegexUtilsTest(unittest.TestCase): def test_check_line(self): pass def test_parse_line(self): pass if __name__ == '__main__': # import sys;sys.argv = ['', 'Test.testName'] unittest.main() Update regex_util...
# coding=utf-8 import unittest from text import regex_utils class RegexUtilsTest(unittest.TestCase): def test_check_line(self): self.assertTrue(regex_utils.check_line('.*(\d+.\d+.\d+.\d+)', 'MyIP is 192.168.199.4')) self.assertTrue(regex_utils.check_line('Test (Data|Case) For (py-text|py-task)', ...
<commit_before># coding=utf-8 import unittest from text import regex_utils class RegexUtilsTest(unittest.TestCase): def test_check_line(self): pass def test_parse_line(self): pass if __name__ == '__main__': # import sys;sys.argv = ['', 'Test.testName'] unittest.main() <c...
# coding=utf-8 import unittest from text import regex_utils class RegexUtilsTest(unittest.TestCase): def test_check_line(self): self.assertTrue(regex_utils.check_line('.*(\d+.\d+.\d+.\d+)', 'MyIP is 192.168.199.4')) self.assertTrue(regex_utils.check_line('Test (Data|Case) For (py-text|py-task)', ...
# coding=utf-8 import unittest from text import regex_utils class RegexUtilsTest(unittest.TestCase): def test_check_line(self): pass def test_parse_line(self): pass if __name__ == '__main__': # import sys;sys.argv = ['', 'Test.testName'] unittest.main() Update regex_util...
<commit_before># coding=utf-8 import unittest from text import regex_utils class RegexUtilsTest(unittest.TestCase): def test_check_line(self): pass def test_parse_line(self): pass if __name__ == '__main__': # import sys;sys.argv = ['', 'Test.testName'] unittest.main() <c...
3b73440a59b22bcbbaa16a2f8c2ff49b1f985b7f
examples/example3_components.py
examples/example3_components.py
import luigi import sciluigi as sl import time class T1(sl.Task): # Parameter text = luigi.Parameter() # I/O def out_data1(self): return sl.TargetInfo(self, self.text + '.txt') # TODO: Of course make the target spec into an object with "get target" method! # Implementation def run...
import luigi import sciluigi as sl import time class T1(sl.Task): # Parameter text = luigi.Parameter() # I/O def out_data1(self): return sl.TargetInfo(self, self.text + '.txt') # TODO: Of course make the target spec into an object with "get target" method! # Implementation def run...
Use new open() function on TargetInfo, in example3
Use new open() function on TargetInfo, in example3
Python
mit
samuell/sciluigi,pharmbio/sciluigi,pharmbio/sciluigi
import luigi import sciluigi as sl import time class T1(sl.Task): # Parameter text = luigi.Parameter() # I/O def out_data1(self): return sl.TargetInfo(self, self.text + '.txt') # TODO: Of course make the target spec into an object with "get target" method! # Implementation def run...
import luigi import sciluigi as sl import time class T1(sl.Task): # Parameter text = luigi.Parameter() # I/O def out_data1(self): return sl.TargetInfo(self, self.text + '.txt') # TODO: Of course make the target spec into an object with "get target" method! # Implementation def run...
<commit_before>import luigi import sciluigi as sl import time class T1(sl.Task): # Parameter text = luigi.Parameter() # I/O def out_data1(self): return sl.TargetInfo(self, self.text + '.txt') # TODO: Of course make the target spec into an object with "get target" method! # Implementati...
import luigi import sciluigi as sl import time class T1(sl.Task): # Parameter text = luigi.Parameter() # I/O def out_data1(self): return sl.TargetInfo(self, self.text + '.txt') # TODO: Of course make the target spec into an object with "get target" method! # Implementation def run...
import luigi import sciluigi as sl import time class T1(sl.Task): # Parameter text = luigi.Parameter() # I/O def out_data1(self): return sl.TargetInfo(self, self.text + '.txt') # TODO: Of course make the target spec into an object with "get target" method! # Implementation def run...
<commit_before>import luigi import sciluigi as sl import time class T1(sl.Task): # Parameter text = luigi.Parameter() # I/O def out_data1(self): return sl.TargetInfo(self, self.text + '.txt') # TODO: Of course make the target spec into an object with "get target" method! # Implementati...
47088dd1ed69207e6e74af98c1f6a4124493ed0c
forum/forms.py
forum/forms.py
from django.forms import ModelForm,Textarea,TextInput from .models import Post class PostForm(ModelForm): class Meta: model = Post fields = ('subject','body') widgets = { 'subject': TextInput(attrs={'autofocus':'autofocus'}), 'body': Textarea( ...
from django.forms import ModelForm,Textarea,TextInput from .models import Post class PostForm(ModelForm): class Meta: model = Post fields = ('subject','body') widgets = { 'subject': TextInput(attrs={'autofocus':'autofocus'}), 'body': Textarea( ...
Use Octicons in Markdown editor
Use Octicons in Markdown editor
Python
mit
Kromey/fbxnano,Kromey/fbxnano,Kromey/akwriters,Kromey/akwriters,Kromey/akwriters,Kromey/fbxnano,Kromey/fbxnano,Kromey/akwriters
from django.forms import ModelForm,Textarea,TextInput from .models import Post class PostForm(ModelForm): class Meta: model = Post fields = ('subject','body') widgets = { 'subject': TextInput(attrs={'autofocus':'autofocus'}), 'body': Textarea( ...
from django.forms import ModelForm,Textarea,TextInput from .models import Post class PostForm(ModelForm): class Meta: model = Post fields = ('subject','body') widgets = { 'subject': TextInput(attrs={'autofocus':'autofocus'}), 'body': Textarea( ...
<commit_before>from django.forms import ModelForm,Textarea,TextInput from .models import Post class PostForm(ModelForm): class Meta: model = Post fields = ('subject','body') widgets = { 'subject': TextInput(attrs={'autofocus':'autofocus'}), 'body': Textare...
from django.forms import ModelForm,Textarea,TextInput from .models import Post class PostForm(ModelForm): class Meta: model = Post fields = ('subject','body') widgets = { 'subject': TextInput(attrs={'autofocus':'autofocus'}), 'body': Textarea( ...
from django.forms import ModelForm,Textarea,TextInput from .models import Post class PostForm(ModelForm): class Meta: model = Post fields = ('subject','body') widgets = { 'subject': TextInput(attrs={'autofocus':'autofocus'}), 'body': Textarea( ...
<commit_before>from django.forms import ModelForm,Textarea,TextInput from .models import Post class PostForm(ModelForm): class Meta: model = Post fields = ('subject','body') widgets = { 'subject': TextInput(attrs={'autofocus':'autofocus'}), 'body': Textare...
37a8277bc53e5fe03c94d1bdaacb4087585fd36e
application.py
application.py
from remedy.radremedy import create_app application, manager = create_app('remedy.config.ProductionConfig') application.debug = True if __name__ == '__main__': manager.run()
#!/usr/bin/env python from remedy.radremedy import create_app application, manager = create_app('remedy.config.ProductionConfig') application.debug = True if __name__ == '__main__': manager.run()
Make it easier to run
Make it easier to run
Python
mpl-2.0
radioprotector/radremedy,AllieDeford/radremedy,AllieDeford/radremedy,radioprotector/radremedy,radremedy/radremedy,radremedy/radremedy,radioprotector/radremedy,radioprotector/radremedy,radremedy/radremedy,radremedy/radremedy,AllieDeford/radremedy
from remedy.radremedy import create_app application, manager = create_app('remedy.config.ProductionConfig') application.debug = True if __name__ == '__main__': manager.run() Make it easier to run
#!/usr/bin/env python from remedy.radremedy import create_app application, manager = create_app('remedy.config.ProductionConfig') application.debug = True if __name__ == '__main__': manager.run()
<commit_before> from remedy.radremedy import create_app application, manager = create_app('remedy.config.ProductionConfig') application.debug = True if __name__ == '__main__': manager.run() <commit_msg>Make it easier to run<commit_after>
#!/usr/bin/env python from remedy.radremedy import create_app application, manager = create_app('remedy.config.ProductionConfig') application.debug = True if __name__ == '__main__': manager.run()
from remedy.radremedy import create_app application, manager = create_app('remedy.config.ProductionConfig') application.debug = True if __name__ == '__main__': manager.run() Make it easier to run#!/usr/bin/env python from remedy.radremedy import create_app application, manager = create_app('remedy.config.Prod...
<commit_before> from remedy.radremedy import create_app application, manager = create_app('remedy.config.ProductionConfig') application.debug = True if __name__ == '__main__': manager.run() <commit_msg>Make it easier to run<commit_after>#!/usr/bin/env python from remedy.radremedy import create_app application,...
aa242ab8451887fe8a4ddfa223d0e11c8c3a472f
lilkv/columnfamily.py
lilkv/columnfamily.py
# -*- coding: utf-8 -*- """ lilkv.columnfamily This module implements the client-facing aspect of the `lilkv` app. All requests are handled through this interface. """ class ColumnFamily(object): """Column Family objects store information about all rows. daily_purchases_cf = ColumnFamily("daily...
# -*- coding: utf-8 -*- """ lilkv.columnfamily This module implements the client-facing aspect of the `lilkv` app. All requests are handled through this interface. """ class ColumnFamily(object): """Column Family objects store information about all rows. daily_purchases_cf = ColumnFamily("daily...
Define inserts and deletes on CFs.
Define inserts and deletes on CFs.
Python
mit
pgorla/lil-kv
# -*- coding: utf-8 -*- """ lilkv.columnfamily This module implements the client-facing aspect of the `lilkv` app. All requests are handled through this interface. """ class ColumnFamily(object): """Column Family objects store information about all rows. daily_purchases_cf = ColumnFamily("daily...
# -*- coding: utf-8 -*- """ lilkv.columnfamily This module implements the client-facing aspect of the `lilkv` app. All requests are handled through this interface. """ class ColumnFamily(object): """Column Family objects store information about all rows. daily_purchases_cf = ColumnFamily("daily...
<commit_before># -*- coding: utf-8 -*- """ lilkv.columnfamily This module implements the client-facing aspect of the `lilkv` app. All requests are handled through this interface. """ class ColumnFamily(object): """Column Family objects store information about all rows. daily_purchases_cf = Colu...
# -*- coding: utf-8 -*- """ lilkv.columnfamily This module implements the client-facing aspect of the `lilkv` app. All requests are handled through this interface. """ class ColumnFamily(object): """Column Family objects store information about all rows. daily_purchases_cf = ColumnFamily("daily...
# -*- coding: utf-8 -*- """ lilkv.columnfamily This module implements the client-facing aspect of the `lilkv` app. All requests are handled through this interface. """ class ColumnFamily(object): """Column Family objects store information about all rows. daily_purchases_cf = ColumnFamily("daily...
<commit_before># -*- coding: utf-8 -*- """ lilkv.columnfamily This module implements the client-facing aspect of the `lilkv` app. All requests are handled through this interface. """ class ColumnFamily(object): """Column Family objects store information about all rows. daily_purchases_cf = Colu...
b52523b78b7ebc5358cb3dc9aa257cc5b3fbbb72
blog/models.py
blog/models.py
from django.db import models from django.utils import timezone class Post(models.Model): title = models.CharField(max_length=200) author = models.CharField(max_length=100) tags = models.CharField(max_length=200) pub_date = models.DateTimeField(blank=True, null=True) text = models.TextField() d...
from django.db import models from django.utils import timezone class Post(models.Model): title = models.CharField(max_length=200) pub_date = models.DateTimeField(blank=True, null=True) text = models.TextField() def __str__(self): return self.title
Remove tags and fixed .gitignore
Remove tags and fixed .gitignore
Python
mit
DLance96/django-blog,DLance96/django-blog,DLance96/django-blog
from django.db import models from django.utils import timezone class Post(models.Model): title = models.CharField(max_length=200) author = models.CharField(max_length=100) tags = models.CharField(max_length=200) pub_date = models.DateTimeField(blank=True, null=True) text = models.TextField() d...
from django.db import models from django.utils import timezone class Post(models.Model): title = models.CharField(max_length=200) pub_date = models.DateTimeField(blank=True, null=True) text = models.TextField() def __str__(self): return self.title
<commit_before>from django.db import models from django.utils import timezone class Post(models.Model): title = models.CharField(max_length=200) author = models.CharField(max_length=100) tags = models.CharField(max_length=200) pub_date = models.DateTimeField(blank=True, null=True) text = models.Tex...
from django.db import models from django.utils import timezone class Post(models.Model): title = models.CharField(max_length=200) pub_date = models.DateTimeField(blank=True, null=True) text = models.TextField() def __str__(self): return self.title
from django.db import models from django.utils import timezone class Post(models.Model): title = models.CharField(max_length=200) author = models.CharField(max_length=100) tags = models.CharField(max_length=200) pub_date = models.DateTimeField(blank=True, null=True) text = models.TextField() d...
<commit_before>from django.db import models from django.utils import timezone class Post(models.Model): title = models.CharField(max_length=200) author = models.CharField(max_length=100) tags = models.CharField(max_length=200) pub_date = models.DateTimeField(blank=True, null=True) text = models.Tex...
1bd74c601a7e198461095b44a268eb4ee50c913d
wheelcms_project/settings/base/settings_logging.py
wheelcms_project/settings/base/settings_logging.py
# A sample logging configuration. The only tangible logging # performed by this configuration is to send an email to # the site admins on every HTTP 500 error. # See http://docs.djangoproject.com/en/dev/topics/logging for # more details on how to customize your logging configuration. LOGGING = { 'version': 1, '...
# A sample logging configuration. The only tangible logging # performed by this configuration is to send an email to # the site admins on every HTTP 500 error. # See http://docs.djangoproject.com/en/dev/topics/logging for # more details on how to customize your logging configuration. LOGGING = { 'version': 1, '...
Fix django 1.5 warning - provide debug filter
Fix django 1.5 warning - provide debug filter
Python
bsd-2-clause
wheelcms/wheelcms_project
# A sample logging configuration. The only tangible logging # performed by this configuration is to send an email to # the site admins on every HTTP 500 error. # See http://docs.djangoproject.com/en/dev/topics/logging for # more details on how to customize your logging configuration. LOGGING = { 'version': 1, '...
# A sample logging configuration. The only tangible logging # performed by this configuration is to send an email to # the site admins on every HTTP 500 error. # See http://docs.djangoproject.com/en/dev/topics/logging for # more details on how to customize your logging configuration. LOGGING = { 'version': 1, '...
<commit_before># A sample logging configuration. The only tangible logging # performed by this configuration is to send an email to # the site admins on every HTTP 500 error. # See http://docs.djangoproject.com/en/dev/topics/logging for # more details on how to customize your logging configuration. LOGGING = { 'ver...
# A sample logging configuration. The only tangible logging # performed by this configuration is to send an email to # the site admins on every HTTP 500 error. # See http://docs.djangoproject.com/en/dev/topics/logging for # more details on how to customize your logging configuration. LOGGING = { 'version': 1, '...
# A sample logging configuration. The only tangible logging # performed by this configuration is to send an email to # the site admins on every HTTP 500 error. # See http://docs.djangoproject.com/en/dev/topics/logging for # more details on how to customize your logging configuration. LOGGING = { 'version': 1, '...
<commit_before># A sample logging configuration. The only tangible logging # performed by this configuration is to send an email to # the site admins on every HTTP 500 error. # See http://docs.djangoproject.com/en/dev/topics/logging for # more details on how to customize your logging configuration. LOGGING = { 'ver...
12c57e52d3f107ce9723f33e7f35ef752bb8f3bc
axelrod/tests/unit/test_deterministic_cache.py
axelrod/tests/unit/test_deterministic_cache.py
import unittest class TestDeterministicCache(unittest.TestCase): def test_init(self): pass def test_setitem(self): pass def test_save(self): pass def test_load(self): pass
import unittest from axelrod import DeterministicCache, TitForTat, Defector class TestDeterministicCache(unittest.TestCase): @classmethod def setUpClass(cls): cls.test_key1 = (TitForTat, Defector) cls.test_value1 = [('C', 'D'), ('D', 'D'), ('D', 'D')] def test_basic_init(self): c...
Add content for basic tests
Add content for basic tests
Python
mit
ranjinidas/Axelrod,marcharper/Axelrod,ranjinidas/Axelrod,marcharper/Axelrod
import unittest class TestDeterministicCache(unittest.TestCase): def test_init(self): pass def test_setitem(self): pass def test_save(self): pass def test_load(self): pass Add content for basic tests
import unittest from axelrod import DeterministicCache, TitForTat, Defector class TestDeterministicCache(unittest.TestCase): @classmethod def setUpClass(cls): cls.test_key1 = (TitForTat, Defector) cls.test_value1 = [('C', 'D'), ('D', 'D'), ('D', 'D')] def test_basic_init(self): c...
<commit_before>import unittest class TestDeterministicCache(unittest.TestCase): def test_init(self): pass def test_setitem(self): pass def test_save(self): pass def test_load(self): pass <commit_msg>Add content for basic tests<commit_after>
import unittest from axelrod import DeterministicCache, TitForTat, Defector class TestDeterministicCache(unittest.TestCase): @classmethod def setUpClass(cls): cls.test_key1 = (TitForTat, Defector) cls.test_value1 = [('C', 'D'), ('D', 'D'), ('D', 'D')] def test_basic_init(self): c...
import unittest class TestDeterministicCache(unittest.TestCase): def test_init(self): pass def test_setitem(self): pass def test_save(self): pass def test_load(self): pass Add content for basic testsimport unittest from axelrod import DeterministicCache, TitForTat, ...
<commit_before>import unittest class TestDeterministicCache(unittest.TestCase): def test_init(self): pass def test_setitem(self): pass def test_save(self): pass def test_load(self): pass <commit_msg>Add content for basic tests<commit_after>import unittest from axelr...
44a4df24e65420a37638b895ddc59147bae2502e
clock.py
clock.py
from apscheduler.schedulers.blocking import BlockingScheduler sched = BlockingScheduler() @sched.scheduled_job('cron', hour="*/3", minute=0) def updater(): """ Run our update command every three hours. """ # Set env import os os.environ.setdefault("DJANGO_SETTINGS_MODULE", "project.settings")...
from apscheduler.schedulers.blocking import BlockingScheduler sched = BlockingScheduler() @sched.scheduled_job('cron', hour="10", minute=0) def updater(): """ Run our update command every three hours. """ # Set env import os os.environ.setdefault("DJANGO_SETTINGS_MODULE", "project.settings") ...
Reduce how often this runs
Reduce how often this runs
Python
mit
california-civic-data-coalition/django-calaccess-downloads-website,california-civic-data-coalition/django-calaccess-downloads-website,california-civic-data-coalition/django-calaccess-downloads-website
from apscheduler.schedulers.blocking import BlockingScheduler sched = BlockingScheduler() @sched.scheduled_job('cron', hour="*/3", minute=0) def updater(): """ Run our update command every three hours. """ # Set env import os os.environ.setdefault("DJANGO_SETTINGS_MODULE", "project.settings")...
from apscheduler.schedulers.blocking import BlockingScheduler sched = BlockingScheduler() @sched.scheduled_job('cron', hour="10", minute=0) def updater(): """ Run our update command every three hours. """ # Set env import os os.environ.setdefault("DJANGO_SETTINGS_MODULE", "project.settings") ...
<commit_before>from apscheduler.schedulers.blocking import BlockingScheduler sched = BlockingScheduler() @sched.scheduled_job('cron', hour="*/3", minute=0) def updater(): """ Run our update command every three hours. """ # Set env import os os.environ.setdefault("DJANGO_SETTINGS_MODULE", "pro...
from apscheduler.schedulers.blocking import BlockingScheduler sched = BlockingScheduler() @sched.scheduled_job('cron', hour="10", minute=0) def updater(): """ Run our update command every three hours. """ # Set env import os os.environ.setdefault("DJANGO_SETTINGS_MODULE", "project.settings") ...
from apscheduler.schedulers.blocking import BlockingScheduler sched = BlockingScheduler() @sched.scheduled_job('cron', hour="*/3", minute=0) def updater(): """ Run our update command every three hours. """ # Set env import os os.environ.setdefault("DJANGO_SETTINGS_MODULE", "project.settings")...
<commit_before>from apscheduler.schedulers.blocking import BlockingScheduler sched = BlockingScheduler() @sched.scheduled_job('cron', hour="*/3", minute=0) def updater(): """ Run our update command every three hours. """ # Set env import os os.environ.setdefault("DJANGO_SETTINGS_MODULE", "pro...
63fe76240a819a0211aab566c1cd36b31c49c5d9
freepacktbook/pushover.py
freepacktbook/pushover.py
import json import requests class PushoverNotification(object): def __init__(self, pushover_user, pushover_token): self.pushover_api = 'https://api.pushover.net/1/messages.json' self.pushover_user = pushover_user self.pushover_token = pushover_token def get_image_content(self, image_u...
import json import requests class PushoverNotification(object): def __init__(self, pushover_user, pushover_token): self.pushover_api = 'https://api.pushover.net/1/messages.json' self.pushover_user = pushover_user self.pushover_token = pushover_token def get_image_content(self, image_u...
Fix syntax error and reuse variable
Fix syntax error and reuse variable
Python
mit
bogdal/freepacktbook
import json import requests class PushoverNotification(object): def __init__(self, pushover_user, pushover_token): self.pushover_api = 'https://api.pushover.net/1/messages.json' self.pushover_user = pushover_user self.pushover_token = pushover_token def get_image_content(self, image_u...
import json import requests class PushoverNotification(object): def __init__(self, pushover_user, pushover_token): self.pushover_api = 'https://api.pushover.net/1/messages.json' self.pushover_user = pushover_user self.pushover_token = pushover_token def get_image_content(self, image_u...
<commit_before>import json import requests class PushoverNotification(object): def __init__(self, pushover_user, pushover_token): self.pushover_api = 'https://api.pushover.net/1/messages.json' self.pushover_user = pushover_user self.pushover_token = pushover_token def get_image_conten...
import json import requests class PushoverNotification(object): def __init__(self, pushover_user, pushover_token): self.pushover_api = 'https://api.pushover.net/1/messages.json' self.pushover_user = pushover_user self.pushover_token = pushover_token def get_image_content(self, image_u...
import json import requests class PushoverNotification(object): def __init__(self, pushover_user, pushover_token): self.pushover_api = 'https://api.pushover.net/1/messages.json' self.pushover_user = pushover_user self.pushover_token = pushover_token def get_image_content(self, image_u...
<commit_before>import json import requests class PushoverNotification(object): def __init__(self, pushover_user, pushover_token): self.pushover_api = 'https://api.pushover.net/1/messages.json' self.pushover_user = pushover_user self.pushover_token = pushover_token def get_image_conten...
8404ced0a54df6ab4be3f6d10a4d1201d2105f09
fusesoc/build/__init__.py
fusesoc/build/__init__.py
from fusesoc.build.quartus import Quartus from fusesoc.build.ise import Ise def BackendFactory(system): if system.backend_name == 'quartus': return Quartus(system) elif system.backend_name == 'ise': return Ise(system) else: raise Exception("Backend not found")
from fusesoc.build.quartus import Quartus from fusesoc.build.ise import Ise def BackendFactory(system): if system.backend_name == 'quartus': return Quartus(system) elif system.backend_name == 'ise': return Ise(system) else: raise RuntimeError('Backend "{}" not found'.format(systaem....
Improve error handling for unknown backends
Improve error handling for unknown backends
Python
bsd-2-clause
olofk/fusesoc,lowRISC/fusesoc,olofk/fusesoc,lowRISC/fusesoc
from fusesoc.build.quartus import Quartus from fusesoc.build.ise import Ise def BackendFactory(system): if system.backend_name == 'quartus': return Quartus(system) elif system.backend_name == 'ise': return Ise(system) else: raise Exception("Backend not found") Improve error handling...
from fusesoc.build.quartus import Quartus from fusesoc.build.ise import Ise def BackendFactory(system): if system.backend_name == 'quartus': return Quartus(system) elif system.backend_name == 'ise': return Ise(system) else: raise RuntimeError('Backend "{}" not found'.format(systaem....
<commit_before>from fusesoc.build.quartus import Quartus from fusesoc.build.ise import Ise def BackendFactory(system): if system.backend_name == 'quartus': return Quartus(system) elif system.backend_name == 'ise': return Ise(system) else: raise Exception("Backend not found") <commit...
from fusesoc.build.quartus import Quartus from fusesoc.build.ise import Ise def BackendFactory(system): if system.backend_name == 'quartus': return Quartus(system) elif system.backend_name == 'ise': return Ise(system) else: raise RuntimeError('Backend "{}" not found'.format(systaem....
from fusesoc.build.quartus import Quartus from fusesoc.build.ise import Ise def BackendFactory(system): if system.backend_name == 'quartus': return Quartus(system) elif system.backend_name == 'ise': return Ise(system) else: raise Exception("Backend not found") Improve error handling...
<commit_before>from fusesoc.build.quartus import Quartus from fusesoc.build.ise import Ise def BackendFactory(system): if system.backend_name == 'quartus': return Quartus(system) elif system.backend_name == 'ise': return Ise(system) else: raise Exception("Backend not found") <commit...
8f094e1c3d4a64942cadf5603ce5b23706381fac
nubes/cmd/__init__.py
nubes/cmd/__init__.py
import openstack def main(): print("Hello Clouds!")
import argparse from nubes import dispatcher def main(): parser = argparse.ArgumentParser(description='Universal IaaS CLI') parser.add_argument('connector', help='IaaS Name') parser.add_argument('resource', help='Resource to perform action') parser.add_argument('action', help='Action to perform on re...
Make crude CLI commands work
Make crude CLI commands work This is mainly as an example to show what it can look like.
Python
apache-2.0
omninubes/nubes
import openstack def main(): print("Hello Clouds!") Make crude CLI commands work This is mainly as an example to show what it can look like.
import argparse from nubes import dispatcher def main(): parser = argparse.ArgumentParser(description='Universal IaaS CLI') parser.add_argument('connector', help='IaaS Name') parser.add_argument('resource', help='Resource to perform action') parser.add_argument('action', help='Action to perform on re...
<commit_before>import openstack def main(): print("Hello Clouds!") <commit_msg>Make crude CLI commands work This is mainly as an example to show what it can look like.<commit_after>
import argparse from nubes import dispatcher def main(): parser = argparse.ArgumentParser(description='Universal IaaS CLI') parser.add_argument('connector', help='IaaS Name') parser.add_argument('resource', help='Resource to perform action') parser.add_argument('action', help='Action to perform on re...
import openstack def main(): print("Hello Clouds!") Make crude CLI commands work This is mainly as an example to show what it can look like.import argparse from nubes import dispatcher def main(): parser = argparse.ArgumentParser(description='Universal IaaS CLI') parser.add_argument('connector', help=...
<commit_before>import openstack def main(): print("Hello Clouds!") <commit_msg>Make crude CLI commands work This is mainly as an example to show what it can look like.<commit_after>import argparse from nubes import dispatcher def main(): parser = argparse.ArgumentParser(description='Universal IaaS CLI') ...
15a9d8b9e361462532ed286abce4ee445b9ec74a
analytics/rejections.py
analytics/rejections.py
# -*- encoding: utf-8 """ I get a bunch of requests that are uninteresting for some reason -- maybe somebody trying to find a PHP admin page, or crawling for vulnerable WordPress instances. Any such request can immediately be rejected as uninteresting for my analytics. """ from urllib.parse import urlparse BAD_PATH...
# -*- encoding: utf-8 """ I get a bunch of requests that are uninteresting for some reason -- maybe somebody trying to find a PHP admin page, or crawling for vulnerable WordPress instances. Any such request can immediately be rejected as uninteresting for my analytics. """ from urllib.parse import urlparse BAD_PATH...
Add more to the list of bad paths
Add more to the list of bad paths
Python
mit
alexwlchan/alexwlchan.net,alexwlchan/alexwlchan.net,alexwlchan/alexwlchan.net,alexwlchan/alexwlchan.net,alexwlchan/alexwlchan.net
# -*- encoding: utf-8 """ I get a bunch of requests that are uninteresting for some reason -- maybe somebody trying to find a PHP admin page, or crawling for vulnerable WordPress instances. Any such request can immediately be rejected as uninteresting for my analytics. """ from urllib.parse import urlparse BAD_PATH...
# -*- encoding: utf-8 """ I get a bunch of requests that are uninteresting for some reason -- maybe somebody trying to find a PHP admin page, or crawling for vulnerable WordPress instances. Any such request can immediately be rejected as uninteresting for my analytics. """ from urllib.parse import urlparse BAD_PATH...
<commit_before># -*- encoding: utf-8 """ I get a bunch of requests that are uninteresting for some reason -- maybe somebody trying to find a PHP admin page, or crawling for vulnerable WordPress instances. Any such request can immediately be rejected as uninteresting for my analytics. """ from urllib.parse import urlp...
# -*- encoding: utf-8 """ I get a bunch of requests that are uninteresting for some reason -- maybe somebody trying to find a PHP admin page, or crawling for vulnerable WordPress instances. Any such request can immediately be rejected as uninteresting for my analytics. """ from urllib.parse import urlparse BAD_PATH...
# -*- encoding: utf-8 """ I get a bunch of requests that are uninteresting for some reason -- maybe somebody trying to find a PHP admin page, or crawling for vulnerable WordPress instances. Any such request can immediately be rejected as uninteresting for my analytics. """ from urllib.parse import urlparse BAD_PATH...
<commit_before># -*- encoding: utf-8 """ I get a bunch of requests that are uninteresting for some reason -- maybe somebody trying to find a PHP admin page, or crawling for vulnerable WordPress instances. Any such request can immediately be rejected as uninteresting for my analytics. """ from urllib.parse import urlp...
9f6b664c4b0f45828ef8d8a77cdae30bba6ee3a8
buildPy2app.py
buildPy2app.py
""" This is a setup.py script generated by py2applet Usage: python setup.py py2app """ from setuptools import setup from glob import glob import syncplay APP = ['syncplayClient.py'] DATA_FILES = [ ('resources', glob('resources/*.png') + glob('resources/*.rtf') + glob('resources/*.lua')), ] OPTIONS = { 'icon...
""" This is a setup.py script generated by py2applet Usage: python setup.py py2app """ from setuptools import setup from glob import glob import syncplay APP = ['syncplayClient.py'] DATA_FILES = [ ('resources', glob('resources/*.png') + glob('resources/*.rtf') + glob('resources/*.lua')), ] OPTIONS = { 'icon...
Update py2app script for Qt 5.11
Update py2app script for Qt 5.11
Python
apache-2.0
Syncplay/syncplay,NeverDecaf/syncplay,alby128/syncplay,Syncplay/syncplay,NeverDecaf/syncplay,alby128/syncplay
""" This is a setup.py script generated by py2applet Usage: python setup.py py2app """ from setuptools import setup from glob import glob import syncplay APP = ['syncplayClient.py'] DATA_FILES = [ ('resources', glob('resources/*.png') + glob('resources/*.rtf') + glob('resources/*.lua')), ] OPTIONS = { 'icon...
""" This is a setup.py script generated by py2applet Usage: python setup.py py2app """ from setuptools import setup from glob import glob import syncplay APP = ['syncplayClient.py'] DATA_FILES = [ ('resources', glob('resources/*.png') + glob('resources/*.rtf') + glob('resources/*.lua')), ] OPTIONS = { 'icon...
<commit_before>""" This is a setup.py script generated by py2applet Usage: python setup.py py2app """ from setuptools import setup from glob import glob import syncplay APP = ['syncplayClient.py'] DATA_FILES = [ ('resources', glob('resources/*.png') + glob('resources/*.rtf') + glob('resources/*.lua')), ] OPT...
""" This is a setup.py script generated by py2applet Usage: python setup.py py2app """ from setuptools import setup from glob import glob import syncplay APP = ['syncplayClient.py'] DATA_FILES = [ ('resources', glob('resources/*.png') + glob('resources/*.rtf') + glob('resources/*.lua')), ] OPTIONS = { 'icon...
""" This is a setup.py script generated by py2applet Usage: python setup.py py2app """ from setuptools import setup from glob import glob import syncplay APP = ['syncplayClient.py'] DATA_FILES = [ ('resources', glob('resources/*.png') + glob('resources/*.rtf') + glob('resources/*.lua')), ] OPTIONS = { 'icon...
<commit_before>""" This is a setup.py script generated by py2applet Usage: python setup.py py2app """ from setuptools import setup from glob import glob import syncplay APP = ['syncplayClient.py'] DATA_FILES = [ ('resources', glob('resources/*.png') + glob('resources/*.rtf') + glob('resources/*.lua')), ] OPT...
8f0befc2bd6e42c544e30630a82fdcec291dfe1f
judge/telerik_academy_auth.py
judge/telerik_academy_auth.py
from django.contrib.auth.models import User from dmoj import settings import json import requests from judge.models import Profile, Language class RemoteUserBackend (object): def get_login_url(self, api_key, username, password): return 'https://telerikacademy.com/Api/Users/CheckUserLogin?apiKey=%s&use...
from django.contrib.auth.models import User from dmoj import settings import json import requests from judge.models import Profile, Language class RemoteUserBackend (object): def get_login_url(self, api_key, username, password): return 'https://telerikacademy.com/Api/Users/CheckUserLogin?apiKey=%s&use...
Use username provided by telerik academy auth API
Use username provided by telerik academy auth API
Python
agpl-3.0
Minkov/site,Minkov/site,Minkov/site,Minkov/site
from django.contrib.auth.models import User from dmoj import settings import json import requests from judge.models import Profile, Language class RemoteUserBackend (object): def get_login_url(self, api_key, username, password): return 'https://telerikacademy.com/Api/Users/CheckUserLogin?apiKey=%s&use...
from django.contrib.auth.models import User from dmoj import settings import json import requests from judge.models import Profile, Language class RemoteUserBackend (object): def get_login_url(self, api_key, username, password): return 'https://telerikacademy.com/Api/Users/CheckUserLogin?apiKey=%s&use...
<commit_before>from django.contrib.auth.models import User from dmoj import settings import json import requests from judge.models import Profile, Language class RemoteUserBackend (object): def get_login_url(self, api_key, username, password): return 'https://telerikacademy.com/Api/Users/CheckUserLogi...
from django.contrib.auth.models import User from dmoj import settings import json import requests from judge.models import Profile, Language class RemoteUserBackend (object): def get_login_url(self, api_key, username, password): return 'https://telerikacademy.com/Api/Users/CheckUserLogin?apiKey=%s&use...
from django.contrib.auth.models import User from dmoj import settings import json import requests from judge.models import Profile, Language class RemoteUserBackend (object): def get_login_url(self, api_key, username, password): return 'https://telerikacademy.com/Api/Users/CheckUserLogin?apiKey=%s&use...
<commit_before>from django.contrib.auth.models import User from dmoj import settings import json import requests from judge.models import Profile, Language class RemoteUserBackend (object): def get_login_url(self, api_key, username, password): return 'https://telerikacademy.com/Api/Users/CheckUserLogi...