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
a6d05f3c1a33381a07d459c1fdff93bc4ba30594
pidman/pid/migrations/0002_pid_sequence_initial_value.py
pidman/pid/migrations/0002_pid_sequence_initial_value.py
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations, models from pidman.pid.noid import decode_noid from pidman.pid import models as pid_models def pid_sequence_lastvalue(apps, schema_editor): # if the database has existing pids, update the sequence last value # s...
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations, models from pidman.pid.noid import decode_noid, encode_noid from pidman.pid import models as pid_models def pid_sequence_lastvalue(apps, schema_editor): # if the database has existing pids, update the sequence last ...
Fix max noid detection when setting pid sequence
Fix max noid detection when setting pid sequence
Python
apache-2.0
emory-libraries/pidman,emory-libraries/pidman
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations, models from pidman.pid.noid import decode_noid from pidman.pid import models as pid_models def pid_sequence_lastvalue(apps, schema_editor): # if the database has existing pids, update the sequence last value # s...
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations, models from pidman.pid.noid import decode_noid, encode_noid from pidman.pid import models as pid_models def pid_sequence_lastvalue(apps, schema_editor): # if the database has existing pids, update the sequence last ...
<commit_before># -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations, models from pidman.pid.noid import decode_noid from pidman.pid import models as pid_models def pid_sequence_lastvalue(apps, schema_editor): # if the database has existing pids, update the sequence las...
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations, models from pidman.pid.noid import decode_noid, encode_noid from pidman.pid import models as pid_models def pid_sequence_lastvalue(apps, schema_editor): # if the database has existing pids, update the sequence last ...
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations, models from pidman.pid.noid import decode_noid from pidman.pid import models as pid_models def pid_sequence_lastvalue(apps, schema_editor): # if the database has existing pids, update the sequence last value # s...
<commit_before># -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations, models from pidman.pid.noid import decode_noid from pidman.pid import models as pid_models def pid_sequence_lastvalue(apps, schema_editor): # if the database has existing pids, update the sequence las...
eedb22b1be419130ffc4a349c3ec4b83879b44bd
client/demo_assignments/hw1_tests.py
client/demo_assignments/hw1_tests.py
"""Tests for hw1 demo assignment.""" TEST_INFO = { 'assignment': 'hw1', 'imports': ['from hw1 import *'], } TESTS = [ # Test square { 'name': ('Q1', 'q1', '1'), 'suites': [ [ ['square(4)', '16'], ['square(-5)', '25'], ], ...
"""Tests for hw1 demo assignment.""" assignment = { 'name': 'hw1', 'imports': ['from hw1 import *'], 'version': '1.0', # Specify tests that should not be locked 'no_lock': { }, 'tests': [ # Test square { # The first name is the "official" name. 'name': ['Q1', 'q1', '1'], # No ...
Make proposed testing format with demo assignment
Make proposed testing format with demo assignment
Python
apache-2.0
jordonwii/ok,jackzhao-mj/ok,jackzhao-mj/ok,Cal-CS-61A-Staff/ok,jordonwii/ok,Cal-CS-61A-Staff/ok,jackzhao-mj/ok,Cal-CS-61A-Staff/ok,jordonwii/ok,Cal-CS-61A-Staff/ok,Cal-CS-61A-Staff/ok,jordonwii/ok,jackzhao-mj/ok
"""Tests for hw1 demo assignment.""" TEST_INFO = { 'assignment': 'hw1', 'imports': ['from hw1 import *'], } TESTS = [ # Test square { 'name': ('Q1', 'q1', '1'), 'suites': [ [ ['square(4)', '16'], ['square(-5)', '25'], ], ...
"""Tests for hw1 demo assignment.""" assignment = { 'name': 'hw1', 'imports': ['from hw1 import *'], 'version': '1.0', # Specify tests that should not be locked 'no_lock': { }, 'tests': [ # Test square { # The first name is the "official" name. 'name': ['Q1', 'q1', '1'], # No ...
<commit_before>"""Tests for hw1 demo assignment.""" TEST_INFO = { 'assignment': 'hw1', 'imports': ['from hw1 import *'], } TESTS = [ # Test square { 'name': ('Q1', 'q1', '1'), 'suites': [ [ ['square(4)', '16'], ['square(-5)', '25'], ...
"""Tests for hw1 demo assignment.""" assignment = { 'name': 'hw1', 'imports': ['from hw1 import *'], 'version': '1.0', # Specify tests that should not be locked 'no_lock': { }, 'tests': [ # Test square { # The first name is the "official" name. 'name': ['Q1', 'q1', '1'], # No ...
"""Tests for hw1 demo assignment.""" TEST_INFO = { 'assignment': 'hw1', 'imports': ['from hw1 import *'], } TESTS = [ # Test square { 'name': ('Q1', 'q1', '1'), 'suites': [ [ ['square(4)', '16'], ['square(-5)', '25'], ], ...
<commit_before>"""Tests for hw1 demo assignment.""" TEST_INFO = { 'assignment': 'hw1', 'imports': ['from hw1 import *'], } TESTS = [ # Test square { 'name': ('Q1', 'q1', '1'), 'suites': [ [ ['square(4)', '16'], ['square(-5)', '25'], ...
7d6c5ead9f754606d732db8566311c4d3e6fe54f
tests.py
tests.py
"""Tests runner for modoboa_admin.""" import unittest from modoboa.lib.test_utils import TestRunnerMixin class TestRunner(TestRunnerMixin, unittest.TestCase): """The tests runner.""" extension = "modoboa_admin_limits"
"""Tests runner for modoboa_admin.""" import unittest from modoboa.lib.test_utils import TestRunnerMixin class TestRunner(TestRunnerMixin, unittest.TestCase): """The tests runner.""" extension = "modoboa_admin_limits" dependencies = [ "modoboa_admin" ]
Make sure to activate modoboa_admin.
Make sure to activate modoboa_admin.
Python
mit
disko/modoboa-admin-limits,disko/modoboa-admin-limits
"""Tests runner for modoboa_admin.""" import unittest from modoboa.lib.test_utils import TestRunnerMixin class TestRunner(TestRunnerMixin, unittest.TestCase): """The tests runner.""" extension = "modoboa_admin_limits" Make sure to activate modoboa_admin.
"""Tests runner for modoboa_admin.""" import unittest from modoboa.lib.test_utils import TestRunnerMixin class TestRunner(TestRunnerMixin, unittest.TestCase): """The tests runner.""" extension = "modoboa_admin_limits" dependencies = [ "modoboa_admin" ]
<commit_before>"""Tests runner for modoboa_admin.""" import unittest from modoboa.lib.test_utils import TestRunnerMixin class TestRunner(TestRunnerMixin, unittest.TestCase): """The tests runner.""" extension = "modoboa_admin_limits" <commit_msg>Make sure to activate modoboa_admin.<commit_after>
"""Tests runner for modoboa_admin.""" import unittest from modoboa.lib.test_utils import TestRunnerMixin class TestRunner(TestRunnerMixin, unittest.TestCase): """The tests runner.""" extension = "modoboa_admin_limits" dependencies = [ "modoboa_admin" ]
"""Tests runner for modoboa_admin.""" import unittest from modoboa.lib.test_utils import TestRunnerMixin class TestRunner(TestRunnerMixin, unittest.TestCase): """The tests runner.""" extension = "modoboa_admin_limits" Make sure to activate modoboa_admin."""Tests runner for modoboa_admin.""" import unitte...
<commit_before>"""Tests runner for modoboa_admin.""" import unittest from modoboa.lib.test_utils import TestRunnerMixin class TestRunner(TestRunnerMixin, unittest.TestCase): """The tests runner.""" extension = "modoboa_admin_limits" <commit_msg>Make sure to activate modoboa_admin.<commit_after>"""Tests ru...
f5f7eb086aff7cdc61bbfa850b638db5b7e0d211
tests/test_order.py
tests/test_order.py
# -*- coding: utf-8 -*- """Functional tests using WebTest. See: http://webtest.readthedocs.org/ TESTS MUST START WITH "test" """ from flask import url_for class TestBreakTheOrder: """ Breaking the order """ def test_order_is_not_not_found(self, testapp): """ There actually is an order.....
# -*- coding: utf-8 -*- """Functional tests using WebTest. See: http://webtest.readthedocs.org/ TESTS MUST START WITH "test" """ from flask import url_for class TestBreakTheOrder: """ Breaking the order """ def test_order_gives_401_without_login(self, testapp): """ There actually is a...
Update test order to check for 401.
Update test order to check for 401.
Python
bsd-3-clause
robin-lee/store,tankca/store,tankca/store,William93/store,boomcan90/store,tankca/store,William93/store,William93/store,robin-lee/store,boomcan90/store,robin-lee/store,boomcan90/store
# -*- coding: utf-8 -*- """Functional tests using WebTest. See: http://webtest.readthedocs.org/ TESTS MUST START WITH "test" """ from flask import url_for class TestBreakTheOrder: """ Breaking the order """ def test_order_is_not_not_found(self, testapp): """ There actually is an order.....
# -*- coding: utf-8 -*- """Functional tests using WebTest. See: http://webtest.readthedocs.org/ TESTS MUST START WITH "test" """ from flask import url_for class TestBreakTheOrder: """ Breaking the order """ def test_order_gives_401_without_login(self, testapp): """ There actually is a...
<commit_before># -*- coding: utf-8 -*- """Functional tests using WebTest. See: http://webtest.readthedocs.org/ TESTS MUST START WITH "test" """ from flask import url_for class TestBreakTheOrder: """ Breaking the order """ def test_order_is_not_not_found(self, testapp): """ There actuall...
# -*- coding: utf-8 -*- """Functional tests using WebTest. See: http://webtest.readthedocs.org/ TESTS MUST START WITH "test" """ from flask import url_for class TestBreakTheOrder: """ Breaking the order """ def test_order_gives_401_without_login(self, testapp): """ There actually is a...
# -*- coding: utf-8 -*- """Functional tests using WebTest. See: http://webtest.readthedocs.org/ TESTS MUST START WITH "test" """ from flask import url_for class TestBreakTheOrder: """ Breaking the order """ def test_order_is_not_not_found(self, testapp): """ There actually is an order.....
<commit_before># -*- coding: utf-8 -*- """Functional tests using WebTest. See: http://webtest.readthedocs.org/ TESTS MUST START WITH "test" """ from flask import url_for class TestBreakTheOrder: """ Breaking the order """ def test_order_is_not_not_found(self, testapp): """ There actuall...
007d081dcf790c92dfa44328474d17fca9a6592c
apitestcase/testcase.py
apitestcase/testcase.py
import requests class TestCase(object): """ Add assetion methods for HTTP Requests to TestCase """ def assertRequest(self, method="GET", url="", status_code=200, contains=None, **kwargs): """ Asserts requests on a given endpoint """ if contains is None: ...
import requests class TestCase(object): """ Add assetion methods for HTTP Requests to TestCase """ def assertRequest(self, method="GET", url="", status_code=200, contains=None, **kwargs): """ Asserts requests on a given endpoint """ if contains is None: ...
Use requests' reponse.text per documentation
Use requests' reponse.text per documentation
Python
mit
bramwelt/apitestcase
import requests class TestCase(object): """ Add assetion methods for HTTP Requests to TestCase """ def assertRequest(self, method="GET", url="", status_code=200, contains=None, **kwargs): """ Asserts requests on a given endpoint """ if contains is None: ...
import requests class TestCase(object): """ Add assetion methods for HTTP Requests to TestCase """ def assertRequest(self, method="GET", url="", status_code=200, contains=None, **kwargs): """ Asserts requests on a given endpoint """ if contains is None: ...
<commit_before>import requests class TestCase(object): """ Add assetion methods for HTTP Requests to TestCase """ def assertRequest(self, method="GET", url="", status_code=200, contains=None, **kwargs): """ Asserts requests on a given endpoint """ if contai...
import requests class TestCase(object): """ Add assetion methods for HTTP Requests to TestCase """ def assertRequest(self, method="GET", url="", status_code=200, contains=None, **kwargs): """ Asserts requests on a given endpoint """ if contains is None: ...
import requests class TestCase(object): """ Add assetion methods for HTTP Requests to TestCase """ def assertRequest(self, method="GET", url="", status_code=200, contains=None, **kwargs): """ Asserts requests on a given endpoint """ if contains is None: ...
<commit_before>import requests class TestCase(object): """ Add assetion methods for HTTP Requests to TestCase """ def assertRequest(self, method="GET", url="", status_code=200, contains=None, **kwargs): """ Asserts requests on a given endpoint """ if contai...
f914e1a58d0817ab35eb884a9280d2d4d9a0f579
dsub/_dsub_version.py
dsub/_dsub_version.py
# Copyright 2017 Google Inc. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or a...
# Copyright 2017 Google Inc. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or a...
Update dsub version to 0.3.7
Update dsub version to 0.3.7 PiperOrigin-RevId: 292945859
Python
apache-2.0
DataBiosphere/dsub,DataBiosphere/dsub
# Copyright 2017 Google Inc. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or a...
# Copyright 2017 Google Inc. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or a...
<commit_before># Copyright 2017 Google Inc. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by appl...
# Copyright 2017 Google Inc. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or a...
# Copyright 2017 Google Inc. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or a...
<commit_before># Copyright 2017 Google Inc. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by appl...
7a057ba74a5914f8d7f8db3646feb5cb06a74cef
ml/pytorch/image_classification/image_classifier.py
ml/pytorch/image_classification/image_classifier.py
# %load_ext autoreload # %autoreload 2 import torch from torch import nn from torch.autograd import Variable def accuracy(preds, labels): return (preds==labels).mean() def n_correct(preds, labels): return (preds==labels).sum() class ImageClassifier(object): def __init__(self, net, n_classes): ""...
# %load_ext autoreload # %autoreload 2 import torch from torch import nn from torch.autograd import Variable def accuracy(preds, labels): return (preds==labels).mean() def n_correct(preds, labels): return (preds==labels).sum() class ImageClassifier(object): def __init__(self, net, n_classes): ""...
Add set_optimizer method to pytorch ImageClassifier class
FEAT: Add set_optimizer method to pytorch ImageClassifier class
Python
apache-2.0
ronrest/convenience_py,ronrest/convenience_py
# %load_ext autoreload # %autoreload 2 import torch from torch import nn from torch.autograd import Variable def accuracy(preds, labels): return (preds==labels).mean() def n_correct(preds, labels): return (preds==labels).sum() class ImageClassifier(object): def __init__(self, net, n_classes): ""...
# %load_ext autoreload # %autoreload 2 import torch from torch import nn from torch.autograd import Variable def accuracy(preds, labels): return (preds==labels).mean() def n_correct(preds, labels): return (preds==labels).sum() class ImageClassifier(object): def __init__(self, net, n_classes): ""...
<commit_before># %load_ext autoreload # %autoreload 2 import torch from torch import nn from torch.autograd import Variable def accuracy(preds, labels): return (preds==labels).mean() def n_correct(preds, labels): return (preds==labels).sum() class ImageClassifier(object): def __init__(self, net, n_class...
# %load_ext autoreload # %autoreload 2 import torch from torch import nn from torch.autograd import Variable def accuracy(preds, labels): return (preds==labels).mean() def n_correct(preds, labels): return (preds==labels).sum() class ImageClassifier(object): def __init__(self, net, n_classes): ""...
# %load_ext autoreload # %autoreload 2 import torch from torch import nn from torch.autograd import Variable def accuracy(preds, labels): return (preds==labels).mean() def n_correct(preds, labels): return (preds==labels).sum() class ImageClassifier(object): def __init__(self, net, n_classes): ""...
<commit_before># %load_ext autoreload # %autoreload 2 import torch from torch import nn from torch.autograd import Variable def accuracy(preds, labels): return (preds==labels).mean() def n_correct(preds, labels): return (preds==labels).sum() class ImageClassifier(object): def __init__(self, net, n_class...
d163644d3c2f0a9f5d08da753e0b97506f6ff6b3
rollbar/test/async_helper.py
rollbar/test/async_helper.py
import asyncio import inspect import sys from rollbar.contrib.asgi import ASGIApp def run(coro): if sys.version_info >= (3, 7): return asyncio.run(coro) assert inspect.iscoroutine(coro) loop = asyncio.new_event_loop() asyncio.set_event_loop(loop) try: return loop.run_until_compl...
import asyncio import inspect import sys from rollbar.contrib.asgi import ASGIApp def run(coro): if sys.version_info >= (3, 7): return asyncio.run(coro) assert inspect.iscoroutine(coro) loop = asyncio.new_event_loop() asyncio.set_event_loop(loop) try: return loop.run_until_compl...
Add wrapper for async receive event handler
Add wrapper for async receive event handler
Python
mit
rollbar/pyrollbar
import asyncio import inspect import sys from rollbar.contrib.asgi import ASGIApp def run(coro): if sys.version_info >= (3, 7): return asyncio.run(coro) assert inspect.iscoroutine(coro) loop = asyncio.new_event_loop() asyncio.set_event_loop(loop) try: return loop.run_until_compl...
import asyncio import inspect import sys from rollbar.contrib.asgi import ASGIApp def run(coro): if sys.version_info >= (3, 7): return asyncio.run(coro) assert inspect.iscoroutine(coro) loop = asyncio.new_event_loop() asyncio.set_event_loop(loop) try: return loop.run_until_compl...
<commit_before>import asyncio import inspect import sys from rollbar.contrib.asgi import ASGIApp def run(coro): if sys.version_info >= (3, 7): return asyncio.run(coro) assert inspect.iscoroutine(coro) loop = asyncio.new_event_loop() asyncio.set_event_loop(loop) try: return loop....
import asyncio import inspect import sys from rollbar.contrib.asgi import ASGIApp def run(coro): if sys.version_info >= (3, 7): return asyncio.run(coro) assert inspect.iscoroutine(coro) loop = asyncio.new_event_loop() asyncio.set_event_loop(loop) try: return loop.run_until_compl...
import asyncio import inspect import sys from rollbar.contrib.asgi import ASGIApp def run(coro): if sys.version_info >= (3, 7): return asyncio.run(coro) assert inspect.iscoroutine(coro) loop = asyncio.new_event_loop() asyncio.set_event_loop(loop) try: return loop.run_until_compl...
<commit_before>import asyncio import inspect import sys from rollbar.contrib.asgi import ASGIApp def run(coro): if sys.version_info >= (3, 7): return asyncio.run(coro) assert inspect.iscoroutine(coro) loop = asyncio.new_event_loop() asyncio.set_event_loop(loop) try: return loop....
4d19cc36e866c8e21a526cd228f170ffd177292b
run_ctest.py
run_ctest.py
#!/usr/bin/python # -*- coding: utf-8 -*- import platform import os import subprocess import sys if platform.system() == "Windows": import distutils.msvc9compiler as msvc if __name__ == "__main__": CITOOLS_PATH = os.path.join(os.getcwd(), "ci-tools") CMAKE_PATH = os.path.join(CITOOLS_PATH, "cmake") ...
#!/usr/bin/python # -*- coding: utf-8 -*- import platform import os import subprocess if __name__ == "__main__": CITOOLS_PATH = os.path.join(os.getcwd(), "ci-tools") CMAKE_PATH = os.path.join(CITOOLS_PATH, "cmake") if platform.system() == "Linux": os.environ["PATH"] = os.path.join(CMAKE_PATH, "bi...
Test travisci windows build workaround. (3)
Test travisci windows build workaround. (3)
Python
unlicense
h-s-c/ci-tools
#!/usr/bin/python # -*- coding: utf-8 -*- import platform import os import subprocess import sys if platform.system() == "Windows": import distutils.msvc9compiler as msvc if __name__ == "__main__": CITOOLS_PATH = os.path.join(os.getcwd(), "ci-tools") CMAKE_PATH = os.path.join(CITOOLS_PATH, "cmake") ...
#!/usr/bin/python # -*- coding: utf-8 -*- import platform import os import subprocess if __name__ == "__main__": CITOOLS_PATH = os.path.join(os.getcwd(), "ci-tools") CMAKE_PATH = os.path.join(CITOOLS_PATH, "cmake") if platform.system() == "Linux": os.environ["PATH"] = os.path.join(CMAKE_PATH, "bi...
<commit_before>#!/usr/bin/python # -*- coding: utf-8 -*- import platform import os import subprocess import sys if platform.system() == "Windows": import distutils.msvc9compiler as msvc if __name__ == "__main__": CITOOLS_PATH = os.path.join(os.getcwd(), "ci-tools") CMAKE_PATH = os.path.join(CITOOLS_PATH,...
#!/usr/bin/python # -*- coding: utf-8 -*- import platform import os import subprocess if __name__ == "__main__": CITOOLS_PATH = os.path.join(os.getcwd(), "ci-tools") CMAKE_PATH = os.path.join(CITOOLS_PATH, "cmake") if platform.system() == "Linux": os.environ["PATH"] = os.path.join(CMAKE_PATH, "bi...
#!/usr/bin/python # -*- coding: utf-8 -*- import platform import os import subprocess import sys if platform.system() == "Windows": import distutils.msvc9compiler as msvc if __name__ == "__main__": CITOOLS_PATH = os.path.join(os.getcwd(), "ci-tools") CMAKE_PATH = os.path.join(CITOOLS_PATH, "cmake") ...
<commit_before>#!/usr/bin/python # -*- coding: utf-8 -*- import platform import os import subprocess import sys if platform.system() == "Windows": import distutils.msvc9compiler as msvc if __name__ == "__main__": CITOOLS_PATH = os.path.join(os.getcwd(), "ci-tools") CMAKE_PATH = os.path.join(CITOOLS_PATH,...
ed7308df6fc324581482d7508394a34a35cbf65c
xorshift/__init__.py
xorshift/__init__.py
from operator import mul import xorshift.xorgen def _compute_n_elements(shape): if shape is None: shape = (1,) try: nelts = reduce(mul, shape) except TypeError: nelts = int(shape) shape = (shape, ) return nelts, shape class _Generator(object): def uniform(self, l...
from operator import mul import xorshift.xorgen def _compute_n_elements(shape): if shape is None: shape = (1,) try: nelts = reduce(mul, shape) except TypeError: nelts = int(shape) shape = (shape, ) return nelts, shape class _Generator(object): def uniform(self, l...
Add optional copy on return
Add optional copy on return
Python
mit
ihaque/xorshift,ihaque/xorshift
from operator import mul import xorshift.xorgen def _compute_n_elements(shape): if shape is None: shape = (1,) try: nelts = reduce(mul, shape) except TypeError: nelts = int(shape) shape = (shape, ) return nelts, shape class _Generator(object): def uniform(self, l...
from operator import mul import xorshift.xorgen def _compute_n_elements(shape): if shape is None: shape = (1,) try: nelts = reduce(mul, shape) except TypeError: nelts = int(shape) shape = (shape, ) return nelts, shape class _Generator(object): def uniform(self, l...
<commit_before>from operator import mul import xorshift.xorgen def _compute_n_elements(shape): if shape is None: shape = (1,) try: nelts = reduce(mul, shape) except TypeError: nelts = int(shape) shape = (shape, ) return nelts, shape class _Generator(object): def ...
from operator import mul import xorshift.xorgen def _compute_n_elements(shape): if shape is None: shape = (1,) try: nelts = reduce(mul, shape) except TypeError: nelts = int(shape) shape = (shape, ) return nelts, shape class _Generator(object): def uniform(self, l...
from operator import mul import xorshift.xorgen def _compute_n_elements(shape): if shape is None: shape = (1,) try: nelts = reduce(mul, shape) except TypeError: nelts = int(shape) shape = (shape, ) return nelts, shape class _Generator(object): def uniform(self, l...
<commit_before>from operator import mul import xorshift.xorgen def _compute_n_elements(shape): if shape is None: shape = (1,) try: nelts = reduce(mul, shape) except TypeError: nelts = int(shape) shape = (shape, ) return nelts, shape class _Generator(object): def ...
580dfb9de6d03ca7663e9d2708cd69e2cce7b2a6
falmer/content/serializers.py
falmer/content/serializers.py
from django.conf import settings from django.urls import reverse from rest_framework import serializers from falmer.content.models import StaffMemberSnippet from falmer.matte.models import MatteImage def generate_image_url(image, filter_spec): from wagtail.wagtailimages.views.serve import generate_signature ...
from django.conf import settings from django.urls import reverse from rest_framework import serializers from falmer.content.models import StaffMemberSnippet from falmer.matte.models import MatteImage def generate_image_url(image, filter_spec): from wagtail.wagtailimages.views.serve import generate_signature ...
Use name over path for s3 backend support
Use name over path for s3 backend support
Python
mit
sussexstudent/falmer,sussexstudent/falmer,sussexstudent/falmer,sussexstudent/falmer
from django.conf import settings from django.urls import reverse from rest_framework import serializers from falmer.content.models import StaffMemberSnippet from falmer.matte.models import MatteImage def generate_image_url(image, filter_spec): from wagtail.wagtailimages.views.serve import generate_signature ...
from django.conf import settings from django.urls import reverse from rest_framework import serializers from falmer.content.models import StaffMemberSnippet from falmer.matte.models import MatteImage def generate_image_url(image, filter_spec): from wagtail.wagtailimages.views.serve import generate_signature ...
<commit_before>from django.conf import settings from django.urls import reverse from rest_framework import serializers from falmer.content.models import StaffMemberSnippet from falmer.matte.models import MatteImage def generate_image_url(image, filter_spec): from wagtail.wagtailimages.views.serve import generat...
from django.conf import settings from django.urls import reverse from rest_framework import serializers from falmer.content.models import StaffMemberSnippet from falmer.matte.models import MatteImage def generate_image_url(image, filter_spec): from wagtail.wagtailimages.views.serve import generate_signature ...
from django.conf import settings from django.urls import reverse from rest_framework import serializers from falmer.content.models import StaffMemberSnippet from falmer.matte.models import MatteImage def generate_image_url(image, filter_spec): from wagtail.wagtailimages.views.serve import generate_signature ...
<commit_before>from django.conf import settings from django.urls import reverse from rest_framework import serializers from falmer.content.models import StaffMemberSnippet from falmer.matte.models import MatteImage def generate_image_url(image, filter_spec): from wagtail.wagtailimages.views.serve import generat...
f3974375e2c71c9c9bfba6fde356014a07e0b704
ee_plugin/ee_auth.py
ee_plugin/ee_auth.py
# -*- coding: utf-8 -*- """ Init and user authentication in Earth Engine """ import webbrowser from qgis.PyQt.QtWidgets import QInputDialog import ee def init(): try: ee.Initialize() except ee.ee_exception.EEException: authenticate() ee.Initialize() # retry initialization once the us...
# -*- coding: utf-8 -*- """ Init and user authentication in Earth Engine """ import webbrowser from qgis.PyQt.QtWidgets import QInputDialog import ee import logging # fix the warnings/errors messages from 'file_cache is unavailable when using oauth2client' # https://github.com/googleapis/google-api-python-client/issu...
Fix the warnings/errors messages from 'file_cache is unavailable when using oauth2client'
Fix the warnings/errors messages from 'file_cache is unavailable when using oauth2client'
Python
mit
gena/qgis-earthengine-plugin,gena/qgis-earthengine-plugin
# -*- coding: utf-8 -*- """ Init and user authentication in Earth Engine """ import webbrowser from qgis.PyQt.QtWidgets import QInputDialog import ee def init(): try: ee.Initialize() except ee.ee_exception.EEException: authenticate() ee.Initialize() # retry initialization once the us...
# -*- coding: utf-8 -*- """ Init and user authentication in Earth Engine """ import webbrowser from qgis.PyQt.QtWidgets import QInputDialog import ee import logging # fix the warnings/errors messages from 'file_cache is unavailable when using oauth2client' # https://github.com/googleapis/google-api-python-client/issu...
<commit_before># -*- coding: utf-8 -*- """ Init and user authentication in Earth Engine """ import webbrowser from qgis.PyQt.QtWidgets import QInputDialog import ee def init(): try: ee.Initialize() except ee.ee_exception.EEException: authenticate() ee.Initialize() # retry initializat...
# -*- coding: utf-8 -*- """ Init and user authentication in Earth Engine """ import webbrowser from qgis.PyQt.QtWidgets import QInputDialog import ee import logging # fix the warnings/errors messages from 'file_cache is unavailable when using oauth2client' # https://github.com/googleapis/google-api-python-client/issu...
# -*- coding: utf-8 -*- """ Init and user authentication in Earth Engine """ import webbrowser from qgis.PyQt.QtWidgets import QInputDialog import ee def init(): try: ee.Initialize() except ee.ee_exception.EEException: authenticate() ee.Initialize() # retry initialization once the us...
<commit_before># -*- coding: utf-8 -*- """ Init and user authentication in Earth Engine """ import webbrowser from qgis.PyQt.QtWidgets import QInputDialog import ee def init(): try: ee.Initialize() except ee.ee_exception.EEException: authenticate() ee.Initialize() # retry initializat...
34641c012d740d38e7ce8ef9619722177665da3f
fireplace/cards/tgt/shaman.py
fireplace/cards/tgt/shaman.py
from ..utils import * ## # Hero Powers # Lightning Jolt class AT_050t: play = Hit(TARGET, 2) ## # Minions # Tuskarr Totemic class AT_046: play = Summon(CONTROLLER, RandomTotem()) # Draenei Totemcarver class AT_047: play = Buff(SELF, "AT_047e") * Count(FRIENDLY_MINIONS + TOTEM) # Thunder Bluff Valiant class...
from ..utils import * ## # Minions # Tuskarr Totemic class AT_046: play = Summon(CONTROLLER, RandomTotem()) # Draenei Totemcarver class AT_047: play = Buff(SELF, "AT_047e") * Count(FRIENDLY_MINIONS + TOTEM) # Thunder Bluff Valiant class AT_049: inspire = Buff(FRIENDLY_MINIONS + TOTEM, "AT_049e") # The Mistc...
Fix Charged Hammer / Lightning Jolt
Fix Charged Hammer / Lightning Jolt
Python
agpl-3.0
liujimj/fireplace,Ragowit/fireplace,jleclanche/fireplace,NightKev/fireplace,Ragowit/fireplace,Meerkov/fireplace,oftc-ftw/fireplace,Meerkov/fireplace,smallnamespace/fireplace,amw2104/fireplace,beheh/fireplace,oftc-ftw/fireplace,liujimj/fireplace,smallnamespace/fireplace,amw2104/fireplace
from ..utils import * ## # Hero Powers # Lightning Jolt class AT_050t: play = Hit(TARGET, 2) ## # Minions # Tuskarr Totemic class AT_046: play = Summon(CONTROLLER, RandomTotem()) # Draenei Totemcarver class AT_047: play = Buff(SELF, "AT_047e") * Count(FRIENDLY_MINIONS + TOTEM) # Thunder Bluff Valiant class...
from ..utils import * ## # Minions # Tuskarr Totemic class AT_046: play = Summon(CONTROLLER, RandomTotem()) # Draenei Totemcarver class AT_047: play = Buff(SELF, "AT_047e") * Count(FRIENDLY_MINIONS + TOTEM) # Thunder Bluff Valiant class AT_049: inspire = Buff(FRIENDLY_MINIONS + TOTEM, "AT_049e") # The Mistc...
<commit_before>from ..utils import * ## # Hero Powers # Lightning Jolt class AT_050t: play = Hit(TARGET, 2) ## # Minions # Tuskarr Totemic class AT_046: play = Summon(CONTROLLER, RandomTotem()) # Draenei Totemcarver class AT_047: play = Buff(SELF, "AT_047e") * Count(FRIENDLY_MINIONS + TOTEM) # Thunder Bluf...
from ..utils import * ## # Minions # Tuskarr Totemic class AT_046: play = Summon(CONTROLLER, RandomTotem()) # Draenei Totemcarver class AT_047: play = Buff(SELF, "AT_047e") * Count(FRIENDLY_MINIONS + TOTEM) # Thunder Bluff Valiant class AT_049: inspire = Buff(FRIENDLY_MINIONS + TOTEM, "AT_049e") # The Mistc...
from ..utils import * ## # Hero Powers # Lightning Jolt class AT_050t: play = Hit(TARGET, 2) ## # Minions # Tuskarr Totemic class AT_046: play = Summon(CONTROLLER, RandomTotem()) # Draenei Totemcarver class AT_047: play = Buff(SELF, "AT_047e") * Count(FRIENDLY_MINIONS + TOTEM) # Thunder Bluff Valiant class...
<commit_before>from ..utils import * ## # Hero Powers # Lightning Jolt class AT_050t: play = Hit(TARGET, 2) ## # Minions # Tuskarr Totemic class AT_046: play = Summon(CONTROLLER, RandomTotem()) # Draenei Totemcarver class AT_047: play = Buff(SELF, "AT_047e") * Count(FRIENDLY_MINIONS + TOTEM) # Thunder Bluf...
f915000cf88a80beadc725ab10e48d2b14d1be23
enlighten/counter.py
enlighten/counter.py
# -*- coding: utf-8 -*- # Copyright 2017 - 2019 Avram Lubkin, All Rights Reserved # This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at http://mozilla.org/MPL/2.0/. """ **Enlighten counter submodule** ...
# -*- coding: utf-8 -*- # Copyright 2017 - 2019 Avram Lubkin, All Rights Reserved # This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at http://mozilla.org/MPL/2.0/. """ **Enlighten counter submodule** ...
Use get_manager() for Counter direct
Use get_manager() for Counter direct
Python
mpl-2.0
Rockhopper-Technologies/enlighten
# -*- coding: utf-8 -*- # Copyright 2017 - 2019 Avram Lubkin, All Rights Reserved # This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at http://mozilla.org/MPL/2.0/. """ **Enlighten counter submodule** ...
# -*- coding: utf-8 -*- # Copyright 2017 - 2019 Avram Lubkin, All Rights Reserved # This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at http://mozilla.org/MPL/2.0/. """ **Enlighten counter submodule** ...
<commit_before># -*- coding: utf-8 -*- # Copyright 2017 - 2019 Avram Lubkin, All Rights Reserved # This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at http://mozilla.org/MPL/2.0/. """ **Enlighten counte...
# -*- coding: utf-8 -*- # Copyright 2017 - 2019 Avram Lubkin, All Rights Reserved # This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at http://mozilla.org/MPL/2.0/. """ **Enlighten counter submodule** ...
# -*- coding: utf-8 -*- # Copyright 2017 - 2019 Avram Lubkin, All Rights Reserved # This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at http://mozilla.org/MPL/2.0/. """ **Enlighten counter submodule** ...
<commit_before># -*- coding: utf-8 -*- # Copyright 2017 - 2019 Avram Lubkin, All Rights Reserved # This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at http://mozilla.org/MPL/2.0/. """ **Enlighten counte...
da40ff6b02d158612883ac7e61faf48da85c7d90
saleor/core/models.py
saleor/core/models.py
from django.db import models from django.utils.translation import pgettext_lazy from django.utils.encoding import python_2_unicode_compatible @python_2_unicode_compatible class Setting(models.Model): INTEGER = 'i' STRING = 's' BOOLEAN = 'b' VALUE_TYPE_CHOICES = ( (INTEGER, pgettext_lazy('Setti...
from django.db import models from django.utils.translation import pgettext_lazy from django.utils.encoding import python_2_unicode_compatible INTEGER = 'i' STRING = 's' BOOLEAN = 'b' @python_2_unicode_compatible class Setting(models.Model): VALUE_TYPE_CHOICES = ( (INTEGER, pgettext_lazy('Settings', 'Int...
Move choices outside of model class
Move choices outside of model class
Python
bsd-3-clause
mociepka/saleor,HyperManTT/ECommerceSaleor,tfroehlich82/saleor,itbabu/saleor,HyperManTT/ECommerceSaleor,tfroehlich82/saleor,jreigel/saleor,itbabu/saleor,itbabu/saleor,UITools/saleor,UITools/saleor,car3oon/saleor,tfroehlich82/saleor,maferelo/saleor,HyperManTT/ECommerceSaleor,UITools/saleor,car3oon/saleor,UITools/saleor,...
from django.db import models from django.utils.translation import pgettext_lazy from django.utils.encoding import python_2_unicode_compatible @python_2_unicode_compatible class Setting(models.Model): INTEGER = 'i' STRING = 's' BOOLEAN = 'b' VALUE_TYPE_CHOICES = ( (INTEGER, pgettext_lazy('Setti...
from django.db import models from django.utils.translation import pgettext_lazy from django.utils.encoding import python_2_unicode_compatible INTEGER = 'i' STRING = 's' BOOLEAN = 'b' @python_2_unicode_compatible class Setting(models.Model): VALUE_TYPE_CHOICES = ( (INTEGER, pgettext_lazy('Settings', 'Int...
<commit_before>from django.db import models from django.utils.translation import pgettext_lazy from django.utils.encoding import python_2_unicode_compatible @python_2_unicode_compatible class Setting(models.Model): INTEGER = 'i' STRING = 's' BOOLEAN = 'b' VALUE_TYPE_CHOICES = ( (INTEGER, pgett...
from django.db import models from django.utils.translation import pgettext_lazy from django.utils.encoding import python_2_unicode_compatible INTEGER = 'i' STRING = 's' BOOLEAN = 'b' @python_2_unicode_compatible class Setting(models.Model): VALUE_TYPE_CHOICES = ( (INTEGER, pgettext_lazy('Settings', 'Int...
from django.db import models from django.utils.translation import pgettext_lazy from django.utils.encoding import python_2_unicode_compatible @python_2_unicode_compatible class Setting(models.Model): INTEGER = 'i' STRING = 's' BOOLEAN = 'b' VALUE_TYPE_CHOICES = ( (INTEGER, pgettext_lazy('Setti...
<commit_before>from django.db import models from django.utils.translation import pgettext_lazy from django.utils.encoding import python_2_unicode_compatible @python_2_unicode_compatible class Setting(models.Model): INTEGER = 'i' STRING = 's' BOOLEAN = 'b' VALUE_TYPE_CHOICES = ( (INTEGER, pgett...
e02f31032a2e3b3ff76432ae814e6e3fbeb7ae29
scripts/master/factory/dart/channels.py
scripts/master/factory/dart/channels.py
# Copyright 2013 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. class Channel(object): def __init__(self, name, branch, position, category_postfix, priority): self.branch = branch self.builder_postfix = '-' + na...
# Copyright 2013 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. class Channel(object): def __init__(self, name, branch, position, category_postfix, priority): self.branch = branch self.builder_postfix = '-' + na...
Use 1.0 branch for stable channel builders
Use 1.0 branch for stable channel builders TBR=ricow Review URL: https://codereview.chromium.org/69023002 git-svn-id: 239fca9b83025a0b6f823aeeca02ba5be3d9fd76@234222 0039d316-1c4b-4281-b951-d872f2087c98
Python
bsd-3-clause
eunchong/build,eunchong/build,eunchong/build,eunchong/build
# Copyright 2013 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. class Channel(object): def __init__(self, name, branch, position, category_postfix, priority): self.branch = branch self.builder_postfix = '-' + na...
# Copyright 2013 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. class Channel(object): def __init__(self, name, branch, position, category_postfix, priority): self.branch = branch self.builder_postfix = '-' + na...
<commit_before># Copyright 2013 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. class Channel(object): def __init__(self, name, branch, position, category_postfix, priority): self.branch = branch self.builder_pos...
# Copyright 2013 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. class Channel(object): def __init__(self, name, branch, position, category_postfix, priority): self.branch = branch self.builder_postfix = '-' + na...
# Copyright 2013 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. class Channel(object): def __init__(self, name, branch, position, category_postfix, priority): self.branch = branch self.builder_postfix = '-' + na...
<commit_before># Copyright 2013 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. class Channel(object): def __init__(self, name, branch, position, category_postfix, priority): self.branch = branch self.builder_pos...
0b4b124061b31a58582f4dc79d917fac1303ed1a
breadcrumbs/__init__.py
breadcrumbs/__init__.py
# -*- coding: utf-8 -*- __version__ = '1.1.3-p1' from .breadcrumbs import Breadcrumb
# -*- coding: utf-8 -*- __version__ = '1.1.4' from .breadcrumbs import Breadcrumb
Fix version in breadcrumbs module.
Fix version in breadcrumbs module.
Python
bsd-3-clause
chronossc/django-breadcrumbs,chronossc/django-breadcrumbs,chronossc/django-breadcrumbs
# -*- coding: utf-8 -*- __version__ = '1.1.3-p1' from .breadcrumbs import Breadcrumb Fix version in breadcrumbs module.
# -*- coding: utf-8 -*- __version__ = '1.1.4' from .breadcrumbs import Breadcrumb
<commit_before># -*- coding: utf-8 -*- __version__ = '1.1.3-p1' from .breadcrumbs import Breadcrumb <commit_msg>Fix version in breadcrumbs module.<commit_after>
# -*- coding: utf-8 -*- __version__ = '1.1.4' from .breadcrumbs import Breadcrumb
# -*- coding: utf-8 -*- __version__ = '1.1.3-p1' from .breadcrumbs import Breadcrumb Fix version in breadcrumbs module.# -*- coding: utf-8 -*- __version__ = '1.1.4' from .breadcrumbs import Breadcrumb
<commit_before># -*- coding: utf-8 -*- __version__ = '1.1.3-p1' from .breadcrumbs import Breadcrumb <commit_msg>Fix version in breadcrumbs module.<commit_after># -*- coding: utf-8 -*- __version__ = '1.1.4' from .breadcrumbs import Breadcrumb
5cf4603efb1d0fc8bd8ec44bf3aa19a292403cdf
beaver/redis_transport.py
beaver/redis_transport.py
import datetime import redis import time import urlparse import beaver.transport class RedisTransport(beaver.transport.Transport): def __init__(self, beaver_config, file_config, logger=None): super(RedisTransport, self).__init__(beaver_config, file_config, logger=logger) redis_url = beaver_conf...
import datetime import redis import time import urlparse import beaver.transport class RedisTransport(beaver.transport.Transport): def __init__(self, beaver_config, file_config, logger=None): super(RedisTransport, self).__init__(beaver_config, file_config, logger=logger) redis_url = beaver_conf...
Use redis pipelining when sending events
Use redis pipelining when sending events
Python
mit
python-beaver/python-beaver,rajmarndi/python-beaver,jlambert121/beaver,davidmoravek/python-beaver,Appdynamics/beaver,rajmarndi/python-beaver,Appdynamics/beaver,timstoop/python-beaver,davidmoravek/python-beaver,imacube/python-beaver,PierreF/beaver,timstoop/python-beaver,zuazo-forks/beaver,doghrim/python-beaver,Open-Part...
import datetime import redis import time import urlparse import beaver.transport class RedisTransport(beaver.transport.Transport): def __init__(self, beaver_config, file_config, logger=None): super(RedisTransport, self).__init__(beaver_config, file_config, logger=logger) redis_url = beaver_conf...
import datetime import redis import time import urlparse import beaver.transport class RedisTransport(beaver.transport.Transport): def __init__(self, beaver_config, file_config, logger=None): super(RedisTransport, self).__init__(beaver_config, file_config, logger=logger) redis_url = beaver_conf...
<commit_before>import datetime import redis import time import urlparse import beaver.transport class RedisTransport(beaver.transport.Transport): def __init__(self, beaver_config, file_config, logger=None): super(RedisTransport, self).__init__(beaver_config, file_config, logger=logger) redis_ur...
import datetime import redis import time import urlparse import beaver.transport class RedisTransport(beaver.transport.Transport): def __init__(self, beaver_config, file_config, logger=None): super(RedisTransport, self).__init__(beaver_config, file_config, logger=logger) redis_url = beaver_conf...
import datetime import redis import time import urlparse import beaver.transport class RedisTransport(beaver.transport.Transport): def __init__(self, beaver_config, file_config, logger=None): super(RedisTransport, self).__init__(beaver_config, file_config, logger=logger) redis_url = beaver_conf...
<commit_before>import datetime import redis import time import urlparse import beaver.transport class RedisTransport(beaver.transport.Transport): def __init__(self, beaver_config, file_config, logger=None): super(RedisTransport, self).__init__(beaver_config, file_config, logger=logger) redis_ur...
8cf8e1b5aa824d691850e0cb431e56744f699a92
bin/task_usage_analyze.py
bin/task_usage_analyze.py
#!/usr/bin/env python3 import os, sys sys.path.append(os.path.join(os.path.dirname(__file__), '..', 'lib')) import glob, json import matplotlib.pyplot as pp import support def main(index_path, min_length=0, max_length=100, report_each=1000000): support.figure() print('Loading the index from "{}"...'.format(...
#!/usr/bin/env python3 import os, sys sys.path.append(os.path.join(os.path.dirname(__file__), '..', 'lib')) import glob, json import matplotlib.pyplot as pp import support def main(index_path, min_length=0, max_length=100, report_each=1000000): support.figure() print('Loading the index from "{}"...'.format(...
Adjust the number of bins
Adjust the number of bins
Python
mit
learning-on-chip/google-cluster-prediction
#!/usr/bin/env python3 import os, sys sys.path.append(os.path.join(os.path.dirname(__file__), '..', 'lib')) import glob, json import matplotlib.pyplot as pp import support def main(index_path, min_length=0, max_length=100, report_each=1000000): support.figure() print('Loading the index from "{}"...'.format(...
#!/usr/bin/env python3 import os, sys sys.path.append(os.path.join(os.path.dirname(__file__), '..', 'lib')) import glob, json import matplotlib.pyplot as pp import support def main(index_path, min_length=0, max_length=100, report_each=1000000): support.figure() print('Loading the index from "{}"...'.format(...
<commit_before>#!/usr/bin/env python3 import os, sys sys.path.append(os.path.join(os.path.dirname(__file__), '..', 'lib')) import glob, json import matplotlib.pyplot as pp import support def main(index_path, min_length=0, max_length=100, report_each=1000000): support.figure() print('Loading the index from "...
#!/usr/bin/env python3 import os, sys sys.path.append(os.path.join(os.path.dirname(__file__), '..', 'lib')) import glob, json import matplotlib.pyplot as pp import support def main(index_path, min_length=0, max_length=100, report_each=1000000): support.figure() print('Loading the index from "{}"...'.format(...
#!/usr/bin/env python3 import os, sys sys.path.append(os.path.join(os.path.dirname(__file__), '..', 'lib')) import glob, json import matplotlib.pyplot as pp import support def main(index_path, min_length=0, max_length=100, report_each=1000000): support.figure() print('Loading the index from "{}"...'.format(...
<commit_before>#!/usr/bin/env python3 import os, sys sys.path.append(os.path.join(os.path.dirname(__file__), '..', 'lib')) import glob, json import matplotlib.pyplot as pp import support def main(index_path, min_length=0, max_length=100, report_each=1000000): support.figure() print('Loading the index from "...
72ec3088f6eafd20dce15d742dc9d93b4087cc50
build/extract_from_cab.py
build/extract_from_cab.py
#!/usr/bin/env python # Copyright (c) 2011 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. """Extracts a single file from a CAB archive.""" import os import subprocess import sys def main(): if len(sys.argv) != 4: ...
#!/usr/bin/env python # Copyright (c) 2011 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. """Extracts a single file from a CAB archive.""" import os import subprocess import sys def main(): if len(sys.argv) != 4: ...
Add automatic retry of cab extraction.
Add automatic retry of cab extraction. It fails occasionally with: One or more files could not be expanded. Delta Package Expander Returned 0x80070002 Expanding File ..\third_party\directxsdk\files\redist\jun2010_d3dx9_43_x86.cab Incomplete, Error Code=0x80070002 Error Description: The system cannot find the file spec...
Python
bsd-3-clause
axinging/chromium-crosswalk,anirudhSK/chromium,hgl888/chromium-crosswalk-efl,markYoungH/chromium.src,junmin-zhu/chromium-rivertrail,dushu1203/chromium.src,axinging/chromium-crosswalk,Jonekee/chromium.src,krieger-od/nwjs_chromium.src,mogoweb/chromium-crosswalk,Fireblend/chromium-crosswalk,dushu1203/chromium.src,fujunwei...
#!/usr/bin/env python # Copyright (c) 2011 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. """Extracts a single file from a CAB archive.""" import os import subprocess import sys def main(): if len(sys.argv) != 4: ...
#!/usr/bin/env python # Copyright (c) 2011 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. """Extracts a single file from a CAB archive.""" import os import subprocess import sys def main(): if len(sys.argv) != 4: ...
<commit_before>#!/usr/bin/env python # Copyright (c) 2011 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. """Extracts a single file from a CAB archive.""" import os import subprocess import sys def main(): if len(sys....
#!/usr/bin/env python # Copyright (c) 2011 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. """Extracts a single file from a CAB archive.""" import os import subprocess import sys def main(): if len(sys.argv) != 4: ...
#!/usr/bin/env python # Copyright (c) 2011 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. """Extracts a single file from a CAB archive.""" import os import subprocess import sys def main(): if len(sys.argv) != 4: ...
<commit_before>#!/usr/bin/env python # Copyright (c) 2011 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. """Extracts a single file from a CAB archive.""" import os import subprocess import sys def main(): if len(sys....
62b90eb97c9e32280f7f1a9c1127099f20440c11
byceps/config_defaults.py
byceps/config_defaults.py
""" byceps.config_defaults ~~~~~~~~~~~~~~~~~~~~~~ Default configuration values :Copyright: 2006-2019 Jochen Kupperschmidt :License: Modified BSD, see LICENSE for details. """ from datetime import timedelta from pytz import timezone # database connection SQLALCHEMY_ECHO = False # Disable Flask-SQLAlchemy's tracki...
""" byceps.config_defaults ~~~~~~~~~~~~~~~~~~~~~~ Default configuration values :Copyright: 2006-2019 Jochen Kupperschmidt :License: Modified BSD, see LICENSE for details. """ from datetime import timedelta from pytz import timezone # database connection SQLALCHEMY_ECHO = False # Disable Flask-SQLAlchemy's tracki...
Set required background color for RQ dashboard
Set required background color for RQ dashboard BYCEPS doesn't use ra dashboard's default settings, so they need to be set explicitly as necessary.
Python
bsd-3-clause
homeworkprod/byceps,homeworkprod/byceps,m-ober/byceps,m-ober/byceps,m-ober/byceps,homeworkprod/byceps
""" byceps.config_defaults ~~~~~~~~~~~~~~~~~~~~~~ Default configuration values :Copyright: 2006-2019 Jochen Kupperschmidt :License: Modified BSD, see LICENSE for details. """ from datetime import timedelta from pytz import timezone # database connection SQLALCHEMY_ECHO = False # Disable Flask-SQLAlchemy's tracki...
""" byceps.config_defaults ~~~~~~~~~~~~~~~~~~~~~~ Default configuration values :Copyright: 2006-2019 Jochen Kupperschmidt :License: Modified BSD, see LICENSE for details. """ from datetime import timedelta from pytz import timezone # database connection SQLALCHEMY_ECHO = False # Disable Flask-SQLAlchemy's tracki...
<commit_before>""" byceps.config_defaults ~~~~~~~~~~~~~~~~~~~~~~ Default configuration values :Copyright: 2006-2019 Jochen Kupperschmidt :License: Modified BSD, see LICENSE for details. """ from datetime import timedelta from pytz import timezone # database connection SQLALCHEMY_ECHO = False # Disable Flask-SQLA...
""" byceps.config_defaults ~~~~~~~~~~~~~~~~~~~~~~ Default configuration values :Copyright: 2006-2019 Jochen Kupperschmidt :License: Modified BSD, see LICENSE for details. """ from datetime import timedelta from pytz import timezone # database connection SQLALCHEMY_ECHO = False # Disable Flask-SQLAlchemy's tracki...
""" byceps.config_defaults ~~~~~~~~~~~~~~~~~~~~~~ Default configuration values :Copyright: 2006-2019 Jochen Kupperschmidt :License: Modified BSD, see LICENSE for details. """ from datetime import timedelta from pytz import timezone # database connection SQLALCHEMY_ECHO = False # Disable Flask-SQLAlchemy's tracki...
<commit_before>""" byceps.config_defaults ~~~~~~~~~~~~~~~~~~~~~~ Default configuration values :Copyright: 2006-2019 Jochen Kupperschmidt :License: Modified BSD, see LICENSE for details. """ from datetime import timedelta from pytz import timezone # database connection SQLALCHEMY_ECHO = False # Disable Flask-SQLA...
2f1bcd83bf9069e5fc599aa20e1ed533bebd5e67
Detect_Face_Sides.py
Detect_Face_Sides.py
import numpy as np def get_leftside_average(self): """Return Array of Left Most Points.""" width = self.size[0] height = self.size[1] left_most_points = [] for row in range(height): for column in range(width): if image.getpixel(row, column) > 200: left_most_point...
import numpy as np def get_leftside_average(self): """Return the value of the Average of the left_most_points.""" width = self.size[0] height = self.size[1] left_most_points = [] for row in range(height): for column in range(width): if image.getpixel(row, column) > 200: ...
Add get_rightside_face and Fix bug
Add get_rightside_face and Fix bug
Python
mit
anassinator/codejam-2014,anassinator/codejam
import numpy as np def get_leftside_average(self): """Return Array of Left Most Points.""" width = self.size[0] height = self.size[1] left_most_points = [] for row in range(height): for column in range(width): if image.getpixel(row, column) > 200: left_most_point...
import numpy as np def get_leftside_average(self): """Return the value of the Average of the left_most_points.""" width = self.size[0] height = self.size[1] left_most_points = [] for row in range(height): for column in range(width): if image.getpixel(row, column) > 200: ...
<commit_before>import numpy as np def get_leftside_average(self): """Return Array of Left Most Points.""" width = self.size[0] height = self.size[1] left_most_points = [] for row in range(height): for column in range(width): if image.getpixel(row, column) > 200: ...
import numpy as np def get_leftside_average(self): """Return the value of the Average of the left_most_points.""" width = self.size[0] height = self.size[1] left_most_points = [] for row in range(height): for column in range(width): if image.getpixel(row, column) > 200: ...
import numpy as np def get_leftside_average(self): """Return Array of Left Most Points.""" width = self.size[0] height = self.size[1] left_most_points = [] for row in range(height): for column in range(width): if image.getpixel(row, column) > 200: left_most_point...
<commit_before>import numpy as np def get_leftside_average(self): """Return Array of Left Most Points.""" width = self.size[0] height = self.size[1] left_most_points = [] for row in range(height): for column in range(width): if image.getpixel(row, column) > 200: ...
66b7715ada14051f2e54b061e09c896a6e7d3844
openahjo_activity_streams/server.py
openahjo_activity_streams/server.py
# Copyright (c) 2015 ThoughtWorks # # See the file LICENSE for copying permission. import os import flask from openahjo_activity_streams import convert import requests import logging import json OPENAHJO_URL = 'http://dev.hel.fi/paatokset/v1/agenda_item/?order_by=-last_modified_time' def create_app(remote_url=OPENA...
# Copyright (c) 2015 ThoughtWorks # # See the file LICENSE for copying permission. import flask from openahjo_activity_streams import convert import requests import logging import json OPENAHJO_URL = 'http://dev.hel.fi/paatokset/v1/agenda_item/?order_by=-last_modified_time' def create_app(remote_url=OPENAHJO_URL, c...
Revert "CW + AW | 225 | add instance path when building app"
Revert "CW + AW | 225 | add instance path when building app" This reverts commit 9aa8d2ec4f49dfe8261893de70887052cf134bd5.
Python
mit
d-cent/HelsinkiActivityStream,ThoughtWorksInc/HelsinkiActivityStream,d-cent/HelsinkiActivityStream,d-cent/HelsinkiActivityStream,ThoughtWorksInc/HelsinkiActivityStream,ThoughtWorksInc/HelsinkiActivityStream
# Copyright (c) 2015 ThoughtWorks # # See the file LICENSE for copying permission. import os import flask from openahjo_activity_streams import convert import requests import logging import json OPENAHJO_URL = 'http://dev.hel.fi/paatokset/v1/agenda_item/?order_by=-last_modified_time' def create_app(remote_url=OPENA...
# Copyright (c) 2015 ThoughtWorks # # See the file LICENSE for copying permission. import flask from openahjo_activity_streams import convert import requests import logging import json OPENAHJO_URL = 'http://dev.hel.fi/paatokset/v1/agenda_item/?order_by=-last_modified_time' def create_app(remote_url=OPENAHJO_URL, c...
<commit_before># Copyright (c) 2015 ThoughtWorks # # See the file LICENSE for copying permission. import os import flask from openahjo_activity_streams import convert import requests import logging import json OPENAHJO_URL = 'http://dev.hel.fi/paatokset/v1/agenda_item/?order_by=-last_modified_time' def create_app(r...
# Copyright (c) 2015 ThoughtWorks # # See the file LICENSE for copying permission. import flask from openahjo_activity_streams import convert import requests import logging import json OPENAHJO_URL = 'http://dev.hel.fi/paatokset/v1/agenda_item/?order_by=-last_modified_time' def create_app(remote_url=OPENAHJO_URL, c...
# Copyright (c) 2015 ThoughtWorks # # See the file LICENSE for copying permission. import os import flask from openahjo_activity_streams import convert import requests import logging import json OPENAHJO_URL = 'http://dev.hel.fi/paatokset/v1/agenda_item/?order_by=-last_modified_time' def create_app(remote_url=OPENA...
<commit_before># Copyright (c) 2015 ThoughtWorks # # See the file LICENSE for copying permission. import os import flask from openahjo_activity_streams import convert import requests import logging import json OPENAHJO_URL = 'http://dev.hel.fi/paatokset/v1/agenda_item/?order_by=-last_modified_time' def create_app(r...
02bf1d3c37904af6b9ab41e05c23ed7e5cebc0f7
kolibri/core/auth/migrations/0016_add_adhoclearnersgroup_collection_kind.py
kolibri/core/auth/migrations/0016_add_adhoclearnersgroup_collection_kind.py
# -*- coding: utf-8 -*- # Generated by Django 1.11.23 on 2019-12-04 04:59 from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [("kolibriauth", "0015_facilitydataset_registered")] operations = [ migrations.CreateModel...
# -*- coding: utf-8 -*- # Generated by Django 1.11.23 on 2019-12-04 04:59 from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [("kolibriauth", "0015_facilitydataset_registered")] operations = [ migrations.CreateModel...
Fix migration file for new collection kind name
Fix migration file for new collection kind name
Python
mit
indirectlylit/kolibri,mrpau/kolibri,indirectlylit/kolibri,learningequality/kolibri,indirectlylit/kolibri,indirectlylit/kolibri,learningequality/kolibri,mrpau/kolibri,learningequality/kolibri,mrpau/kolibri,mrpau/kolibri,learningequality/kolibri
# -*- coding: utf-8 -*- # Generated by Django 1.11.23 on 2019-12-04 04:59 from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [("kolibriauth", "0015_facilitydataset_registered")] operations = [ migrations.CreateModel...
# -*- coding: utf-8 -*- # Generated by Django 1.11.23 on 2019-12-04 04:59 from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [("kolibriauth", "0015_facilitydataset_registered")] operations = [ migrations.CreateModel...
<commit_before># -*- coding: utf-8 -*- # Generated by Django 1.11.23 on 2019-12-04 04:59 from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [("kolibriauth", "0015_facilitydataset_registered")] operations = [ migrati...
# -*- coding: utf-8 -*- # Generated by Django 1.11.23 on 2019-12-04 04:59 from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [("kolibriauth", "0015_facilitydataset_registered")] operations = [ migrations.CreateModel...
# -*- coding: utf-8 -*- # Generated by Django 1.11.23 on 2019-12-04 04:59 from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [("kolibriauth", "0015_facilitydataset_registered")] operations = [ migrations.CreateModel...
<commit_before># -*- coding: utf-8 -*- # Generated by Django 1.11.23 on 2019-12-04 04:59 from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [("kolibriauth", "0015_facilitydataset_registered")] operations = [ migrati...
638f6fb659792ec69b9df25391001241d12c39bd
src/python/grpcio_tests/tests_aio/unit/init_test.py
src/python/grpcio_tests/tests_aio/unit/init_test.py
# Copyright 2019 The gRPC Authors. # # 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...
# Copyright 2019 The gRPC Authors. # # 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...
Expand alternatives to import aio module
Expand alternatives to import aio module
Python
apache-2.0
donnadionne/grpc,nicolasnoble/grpc,jtattermusch/grpc,vjpai/grpc,stanley-cheung/grpc,donnadionne/grpc,donnadionne/grpc,donnadionne/grpc,ejona86/grpc,stanley-cheung/grpc,stanley-cheung/grpc,nicolasnoble/grpc,stanley-cheung/grpc,jtattermusch/grpc,stanley-cheung/grpc,ejona86/grpc,stanley-cheung/grpc,ctiller/grpc,vjpai/grpc...
# Copyright 2019 The gRPC Authors. # # 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...
# Copyright 2019 The gRPC Authors. # # 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...
<commit_before># Copyright 2019 The gRPC Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or a...
# Copyright 2019 The gRPC Authors. # # 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...
# Copyright 2019 The gRPC Authors. # # 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...
<commit_before># Copyright 2019 The gRPC Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or a...
c6d68c78ac9391138d2f433248e35dc6fdd1cf98
setup_egg.py
setup_egg.py
#!/usr/bin/env python # emacs: -*- mode: python; py-indent-offset: 4; indent-tabs-mode: nil -*- # vi: set ft=python sts=4 ts=4 sw=4 et: """Wrapper to run setup.py using setuptools.""" if __name__ == '__main__': exec('setup.py', dict(__name__='__main__', __file__='setup.py', # needed in s...
#!/usr/bin/env python # emacs: -*- mode: python; py-indent-offset: 4; indent-tabs-mode: nil -*- # vi: set ft=python sts=4 ts=4 sw=4 et: """Wrapper to run setup.py using setuptools.""" if __name__ == '__main__': with open('setup.py') as f: exec(f.read(), dict(__name__='__main__', ...
Update call to `exec` to read the file in and execute the code.
Update call to `exec` to read the file in and execute the code.
Python
bsd-3-clause
FrancoisRheaultUS/dipy,FrancoisRheaultUS/dipy
#!/usr/bin/env python # emacs: -*- mode: python; py-indent-offset: 4; indent-tabs-mode: nil -*- # vi: set ft=python sts=4 ts=4 sw=4 et: """Wrapper to run setup.py using setuptools.""" if __name__ == '__main__': exec('setup.py', dict(__name__='__main__', __file__='setup.py', # needed in s...
#!/usr/bin/env python # emacs: -*- mode: python; py-indent-offset: 4; indent-tabs-mode: nil -*- # vi: set ft=python sts=4 ts=4 sw=4 et: """Wrapper to run setup.py using setuptools.""" if __name__ == '__main__': with open('setup.py') as f: exec(f.read(), dict(__name__='__main__', ...
<commit_before>#!/usr/bin/env python # emacs: -*- mode: python; py-indent-offset: 4; indent-tabs-mode: nil -*- # vi: set ft=python sts=4 ts=4 sw=4 et: """Wrapper to run setup.py using setuptools.""" if __name__ == '__main__': exec('setup.py', dict(__name__='__main__', __file__='setup.py',...
#!/usr/bin/env python # emacs: -*- mode: python; py-indent-offset: 4; indent-tabs-mode: nil -*- # vi: set ft=python sts=4 ts=4 sw=4 et: """Wrapper to run setup.py using setuptools.""" if __name__ == '__main__': with open('setup.py') as f: exec(f.read(), dict(__name__='__main__', ...
#!/usr/bin/env python # emacs: -*- mode: python; py-indent-offset: 4; indent-tabs-mode: nil -*- # vi: set ft=python sts=4 ts=4 sw=4 et: """Wrapper to run setup.py using setuptools.""" if __name__ == '__main__': exec('setup.py', dict(__name__='__main__', __file__='setup.py', # needed in s...
<commit_before>#!/usr/bin/env python # emacs: -*- mode: python; py-indent-offset: 4; indent-tabs-mode: nil -*- # vi: set ft=python sts=4 ts=4 sw=4 et: """Wrapper to run setup.py using setuptools.""" if __name__ == '__main__': exec('setup.py', dict(__name__='__main__', __file__='setup.py',...
c140c1a6d32c2caaf9f0e5a87efd219b9573608a
shub/tool.py
shub/tool.py
import click, importlib from shub.utils import missing_modules def missingmod_cmd(modules): modlist = ", ".join(modules) @click.command(help="*DISABLED* - requires %s" % modlist) @click.pass_context def cmd(ctx): click.echo("Error: '%s' command requires %s" % (ctx.info_name, modlist)) c...
import click, importlib from shub.utils import missing_modules def missingmod_cmd(modules): modlist = ", ".join(modules) @click.command(help="*DISABLED* - requires %s" % modlist) @click.pass_context def cmd(ctx): click.echo("Error: '%s' command requires %s" % (ctx.info_name, modlist)) c...
Use hifens instead of underscore for command names
Use hifens instead of underscore for command names
Python
bsd-3-clause
scrapinghub/shub
import click, importlib from shub.utils import missing_modules def missingmod_cmd(modules): modlist = ", ".join(modules) @click.command(help="*DISABLED* - requires %s" % modlist) @click.pass_context def cmd(ctx): click.echo("Error: '%s' command requires %s" % (ctx.info_name, modlist)) c...
import click, importlib from shub.utils import missing_modules def missingmod_cmd(modules): modlist = ", ".join(modules) @click.command(help="*DISABLED* - requires %s" % modlist) @click.pass_context def cmd(ctx): click.echo("Error: '%s' command requires %s" % (ctx.info_name, modlist)) c...
<commit_before>import click, importlib from shub.utils import missing_modules def missingmod_cmd(modules): modlist = ", ".join(modules) @click.command(help="*DISABLED* - requires %s" % modlist) @click.pass_context def cmd(ctx): click.echo("Error: '%s' command requires %s" % (ctx.info_name, modl...
import click, importlib from shub.utils import missing_modules def missingmod_cmd(modules): modlist = ", ".join(modules) @click.command(help="*DISABLED* - requires %s" % modlist) @click.pass_context def cmd(ctx): click.echo("Error: '%s' command requires %s" % (ctx.info_name, modlist)) c...
import click, importlib from shub.utils import missing_modules def missingmod_cmd(modules): modlist = ", ".join(modules) @click.command(help="*DISABLED* - requires %s" % modlist) @click.pass_context def cmd(ctx): click.echo("Error: '%s' command requires %s" % (ctx.info_name, modlist)) c...
<commit_before>import click, importlib from shub.utils import missing_modules def missingmod_cmd(modules): modlist = ", ".join(modules) @click.command(help="*DISABLED* - requires %s" % modlist) @click.pass_context def cmd(ctx): click.echo("Error: '%s' command requires %s" % (ctx.info_name, modl...
d040311ba25eca9459f60336391002a1d661d448
sift/util.py
sift/util.py
import re from pattern import en # todo: use spacy tokenization def ngrams(text, n=1): for i in xrange(n): for n in en.ngrams(text, n=i+1): yield ' '.join(n) SENT_RE = re.compile('((?<!\w\.\w.)(?<![A-Z][a-z]\.)(?<=\.|[\?!])\s)|(\s*\n\s*)') def iter_sent_spans(text): last = 0 for m in S...
import re from pattern import en # todo: use spacy tokenization def ngrams(text, max_n=1, min_n=1): for i in xrange(min_n-1,max_n): for n in en.ngrams(text, n=i+1): yield ' '.join(n) SENT_RE = re.compile('((?<!\w\.\w.)(?<![A-Z][a-z]\.)(?<=\.|[\?!])\s)|(\s*\n\s*)') def iter_sent_spans(text): ...
Add min argument for n when generating ngrams
Add min argument for n when generating ngrams
Python
mit
wikilinks/sift,wikilinks/sift
import re from pattern import en # todo: use spacy tokenization def ngrams(text, n=1): for i in xrange(n): for n in en.ngrams(text, n=i+1): yield ' '.join(n) SENT_RE = re.compile('((?<!\w\.\w.)(?<![A-Z][a-z]\.)(?<=\.|[\?!])\s)|(\s*\n\s*)') def iter_sent_spans(text): last = 0 for m in S...
import re from pattern import en # todo: use spacy tokenization def ngrams(text, max_n=1, min_n=1): for i in xrange(min_n-1,max_n): for n in en.ngrams(text, n=i+1): yield ' '.join(n) SENT_RE = re.compile('((?<!\w\.\w.)(?<![A-Z][a-z]\.)(?<=\.|[\?!])\s)|(\s*\n\s*)') def iter_sent_spans(text): ...
<commit_before>import re from pattern import en # todo: use spacy tokenization def ngrams(text, n=1): for i in xrange(n): for n in en.ngrams(text, n=i+1): yield ' '.join(n) SENT_RE = re.compile('((?<!\w\.\w.)(?<![A-Z][a-z]\.)(?<=\.|[\?!])\s)|(\s*\n\s*)') def iter_sent_spans(text): last = 0...
import re from pattern import en # todo: use spacy tokenization def ngrams(text, max_n=1, min_n=1): for i in xrange(min_n-1,max_n): for n in en.ngrams(text, n=i+1): yield ' '.join(n) SENT_RE = re.compile('((?<!\w\.\w.)(?<![A-Z][a-z]\.)(?<=\.|[\?!])\s)|(\s*\n\s*)') def iter_sent_spans(text): ...
import re from pattern import en # todo: use spacy tokenization def ngrams(text, n=1): for i in xrange(n): for n in en.ngrams(text, n=i+1): yield ' '.join(n) SENT_RE = re.compile('((?<!\w\.\w.)(?<![A-Z][a-z]\.)(?<=\.|[\?!])\s)|(\s*\n\s*)') def iter_sent_spans(text): last = 0 for m in S...
<commit_before>import re from pattern import en # todo: use spacy tokenization def ngrams(text, n=1): for i in xrange(n): for n in en.ngrams(text, n=i+1): yield ' '.join(n) SENT_RE = re.compile('((?<!\w\.\w.)(?<![A-Z][a-z]\.)(?<=\.|[\?!])\s)|(\s*\n\s*)') def iter_sent_spans(text): last = 0...
a54127994b110e65423b9ef956ed3b26dfc10d2d
tyr/servers/zookeeper/server.py
tyr/servers/zookeeper/server.py
from tyr.servers.server import Server class ZookeeperServer(Server): SERVER_TYPE = 'zookeeper' CHEF_RUNLIST = ['role[RoleZookeeper]'] IAM_ROLE_POLICIES = [ 'allow-describe-instances', 'allow-describe-tags', 'allow-volume-control' ] def __init__(self, group=None, server_...
from tyr.servers.server import Server class ZookeeperServer(Server): SERVER_TYPE = 'zookeeper' CHEF_RUNLIST = ['role[RoleZookeeper]'] IAM_ROLE_POLICIES = [ 'allow-describe-instances', 'allow-describe-tags', 'allow-volume-control' ] def __init__(self, group=None, server_...
Add exhibitor_s3config option to Zookeeper creation
Add exhibitor_s3config option to Zookeeper creation
Python
unlicense
hudl/Tyr
from tyr.servers.server import Server class ZookeeperServer(Server): SERVER_TYPE = 'zookeeper' CHEF_RUNLIST = ['role[RoleZookeeper]'] IAM_ROLE_POLICIES = [ 'allow-describe-instances', 'allow-describe-tags', 'allow-volume-control' ] def __init__(self, group=None, server_...
from tyr.servers.server import Server class ZookeeperServer(Server): SERVER_TYPE = 'zookeeper' CHEF_RUNLIST = ['role[RoleZookeeper]'] IAM_ROLE_POLICIES = [ 'allow-describe-instances', 'allow-describe-tags', 'allow-volume-control' ] def __init__(self, group=None, server_...
<commit_before>from tyr.servers.server import Server class ZookeeperServer(Server): SERVER_TYPE = 'zookeeper' CHEF_RUNLIST = ['role[RoleZookeeper]'] IAM_ROLE_POLICIES = [ 'allow-describe-instances', 'allow-describe-tags', 'allow-volume-control' ] def __init__(self, grou...
from tyr.servers.server import Server class ZookeeperServer(Server): SERVER_TYPE = 'zookeeper' CHEF_RUNLIST = ['role[RoleZookeeper]'] IAM_ROLE_POLICIES = [ 'allow-describe-instances', 'allow-describe-tags', 'allow-volume-control' ] def __init__(self, group=None, server_...
from tyr.servers.server import Server class ZookeeperServer(Server): SERVER_TYPE = 'zookeeper' CHEF_RUNLIST = ['role[RoleZookeeper]'] IAM_ROLE_POLICIES = [ 'allow-describe-instances', 'allow-describe-tags', 'allow-volume-control' ] def __init__(self, group=None, server_...
<commit_before>from tyr.servers.server import Server class ZookeeperServer(Server): SERVER_TYPE = 'zookeeper' CHEF_RUNLIST = ['role[RoleZookeeper]'] IAM_ROLE_POLICIES = [ 'allow-describe-instances', 'allow-describe-tags', 'allow-volume-control' ] def __init__(self, grou...
8ba05402376dc2d368bae226f929b9a0b448a3c5
localized_fields/admin.py
localized_fields/admin.py
from django.contrib.admin import ModelAdmin from . import widgets from .fields import LocalizedField, LocalizedCharField, LocalizedTextField, \ LocalizedFileField FORMFIELD_FOR_LOCALIZED_FIELDS_DEFAULTS = { LocalizedField: {'widget': widgets.AdminLocalizedFieldWidget}, LocalizedCharField: {'widget': widg...
from . import widgets from .fields import LocalizedField, LocalizedCharField, LocalizedTextField, \ LocalizedFileField FORMFIELD_FOR_LOCALIZED_FIELDS_DEFAULTS = { LocalizedField: {'widget': widgets.AdminLocalizedFieldWidget}, LocalizedCharField: {'widget': widgets.AdminLocalizedCharFieldWidget}, Local...
Fix using LocalizedFieldsAdminMixin with inlines
Fix using LocalizedFieldsAdminMixin with inlines
Python
mit
SectorLabs/django-localized-fields,SectorLabs/django-localized-fields,SectorLabs/django-localized-fields
from django.contrib.admin import ModelAdmin from . import widgets from .fields import LocalizedField, LocalizedCharField, LocalizedTextField, \ LocalizedFileField FORMFIELD_FOR_LOCALIZED_FIELDS_DEFAULTS = { LocalizedField: {'widget': widgets.AdminLocalizedFieldWidget}, LocalizedCharField: {'widget': widg...
from . import widgets from .fields import LocalizedField, LocalizedCharField, LocalizedTextField, \ LocalizedFileField FORMFIELD_FOR_LOCALIZED_FIELDS_DEFAULTS = { LocalizedField: {'widget': widgets.AdminLocalizedFieldWidget}, LocalizedCharField: {'widget': widgets.AdminLocalizedCharFieldWidget}, Local...
<commit_before>from django.contrib.admin import ModelAdmin from . import widgets from .fields import LocalizedField, LocalizedCharField, LocalizedTextField, \ LocalizedFileField FORMFIELD_FOR_LOCALIZED_FIELDS_DEFAULTS = { LocalizedField: {'widget': widgets.AdminLocalizedFieldWidget}, LocalizedCharField: ...
from . import widgets from .fields import LocalizedField, LocalizedCharField, LocalizedTextField, \ LocalizedFileField FORMFIELD_FOR_LOCALIZED_FIELDS_DEFAULTS = { LocalizedField: {'widget': widgets.AdminLocalizedFieldWidget}, LocalizedCharField: {'widget': widgets.AdminLocalizedCharFieldWidget}, Local...
from django.contrib.admin import ModelAdmin from . import widgets from .fields import LocalizedField, LocalizedCharField, LocalizedTextField, \ LocalizedFileField FORMFIELD_FOR_LOCALIZED_FIELDS_DEFAULTS = { LocalizedField: {'widget': widgets.AdminLocalizedFieldWidget}, LocalizedCharField: {'widget': widg...
<commit_before>from django.contrib.admin import ModelAdmin from . import widgets from .fields import LocalizedField, LocalizedCharField, LocalizedTextField, \ LocalizedFileField FORMFIELD_FOR_LOCALIZED_FIELDS_DEFAULTS = { LocalizedField: {'widget': widgets.AdminLocalizedFieldWidget}, LocalizedCharField: ...
5eced1c1cb9253d73e3246dccb4c33e5ba154fd3
rcbi/rcbi/spiders/FlyduinoSpider.py
rcbi/rcbi/spiders/FlyduinoSpider.py
import scrapy from scrapy import log from scrapy.contrib.spiders import SitemapSpider, Rule from scrapy.contrib.linkextractors import LinkExtractor from rcbi.items import Part MANUFACTURERS = ["Rctimer", "RCTimer", "BaseCam", "Elgae", "ELGAE", "ArduFlyer", "Boscam", "T-Motor", "HQProp", "Suppo", "Flyduino", "SLS", "Fr...
import scrapy from scrapy import log from scrapy.spiders import CrawlSpider, Rule from scrapy.linkextractors import LinkExtractor from rcbi.items import Part MANUFACTURERS = ["Rctimer", "RCTimer", "BaseCam", "Elgae", "ELGAE", "ArduFlyer", "Boscam", "T-Motor", "HQProp", "Suppo", "Flyduino", "SLS", "Frsky"] CORRECT = {"...
Stop using the Flyduino sitemap.
Stop using the Flyduino sitemap.
Python
apache-2.0
rcbuild-info/scrape,rcbuild-info/scrape
import scrapy from scrapy import log from scrapy.contrib.spiders import SitemapSpider, Rule from scrapy.contrib.linkextractors import LinkExtractor from rcbi.items import Part MANUFACTURERS = ["Rctimer", "RCTimer", "BaseCam", "Elgae", "ELGAE", "ArduFlyer", "Boscam", "T-Motor", "HQProp", "Suppo", "Flyduino", "SLS", "Fr...
import scrapy from scrapy import log from scrapy.spiders import CrawlSpider, Rule from scrapy.linkextractors import LinkExtractor from rcbi.items import Part MANUFACTURERS = ["Rctimer", "RCTimer", "BaseCam", "Elgae", "ELGAE", "ArduFlyer", "Boscam", "T-Motor", "HQProp", "Suppo", "Flyduino", "SLS", "Frsky"] CORRECT = {"...
<commit_before>import scrapy from scrapy import log from scrapy.contrib.spiders import SitemapSpider, Rule from scrapy.contrib.linkextractors import LinkExtractor from rcbi.items import Part MANUFACTURERS = ["Rctimer", "RCTimer", "BaseCam", "Elgae", "ELGAE", "ArduFlyer", "Boscam", "T-Motor", "HQProp", "Suppo", "Flydui...
import scrapy from scrapy import log from scrapy.spiders import CrawlSpider, Rule from scrapy.linkextractors import LinkExtractor from rcbi.items import Part MANUFACTURERS = ["Rctimer", "RCTimer", "BaseCam", "Elgae", "ELGAE", "ArduFlyer", "Boscam", "T-Motor", "HQProp", "Suppo", "Flyduino", "SLS", "Frsky"] CORRECT = {"...
import scrapy from scrapy import log from scrapy.contrib.spiders import SitemapSpider, Rule from scrapy.contrib.linkextractors import LinkExtractor from rcbi.items import Part MANUFACTURERS = ["Rctimer", "RCTimer", "BaseCam", "Elgae", "ELGAE", "ArduFlyer", "Boscam", "T-Motor", "HQProp", "Suppo", "Flyduino", "SLS", "Fr...
<commit_before>import scrapy from scrapy import log from scrapy.contrib.spiders import SitemapSpider, Rule from scrapy.contrib.linkextractors import LinkExtractor from rcbi.items import Part MANUFACTURERS = ["Rctimer", "RCTimer", "BaseCam", "Elgae", "ELGAE", "ArduFlyer", "Boscam", "T-Motor", "HQProp", "Suppo", "Flydui...
adf71b59168c81240258a2b344e4bea1f6377e7b
etools/apps/uptime/forms/report_forms.py
etools/apps/uptime/forms/report_forms.py
from django import forms from bootstrap3_datetime.widgets import DateTimePicker class ChooseReportForm(forms.Form): date_from = forms.DateField( widget=DateTimePicker(options={"locale": "ru", "pickTime": False}), label='От даты:', ) date = forms.Dat...
from django import forms from bootstrap3_datetime.widgets import DateTimePicker class ChooseReportForm(forms.Form): date_from = forms.DateField( widget=DateTimePicker(options={"locale": "ru", "pickTime": False, "startDate": "1/...
Fix minimum date for uptime:reports
Fix minimum date for uptime:reports
Python
bsd-3-clause
Igelinmist/etools,Igelinmist/etools
from django import forms from bootstrap3_datetime.widgets import DateTimePicker class ChooseReportForm(forms.Form): date_from = forms.DateField( widget=DateTimePicker(options={"locale": "ru", "pickTime": False}), label='От даты:', ) date = forms.Dat...
from django import forms from bootstrap3_datetime.widgets import DateTimePicker class ChooseReportForm(forms.Form): date_from = forms.DateField( widget=DateTimePicker(options={"locale": "ru", "pickTime": False, "startDate": "1/...
<commit_before>from django import forms from bootstrap3_datetime.widgets import DateTimePicker class ChooseReportForm(forms.Form): date_from = forms.DateField( widget=DateTimePicker(options={"locale": "ru", "pickTime": False}), label='От даты:', ) d...
from django import forms from bootstrap3_datetime.widgets import DateTimePicker class ChooseReportForm(forms.Form): date_from = forms.DateField( widget=DateTimePicker(options={"locale": "ru", "pickTime": False, "startDate": "1/...
from django import forms from bootstrap3_datetime.widgets import DateTimePicker class ChooseReportForm(forms.Form): date_from = forms.DateField( widget=DateTimePicker(options={"locale": "ru", "pickTime": False}), label='От даты:', ) date = forms.Dat...
<commit_before>from django import forms from bootstrap3_datetime.widgets import DateTimePicker class ChooseReportForm(forms.Form): date_from = forms.DateField( widget=DateTimePicker(options={"locale": "ru", "pickTime": False}), label='От даты:', ) d...
1d03917856c193e41b4a1622f8297e88fec00ab2
damn/templatetags/damn.py
damn/templatetags/damn.py
from django import template from damn.processors import find_processor from damn.utils import AssetRegistry, DepNode register = template.Library() class AssetsNode(template.Node): def __init__(self, nodelist): self.nodelist = nodelist def render(self, context): context.render_context['AM...
from django import template from ..processors import find_processor, AssetRegistry register = template.Library() class AssetsNode(template.Node): def __init__(self, nodelist): self.nodelist = nodelist def render(self, context): context.render_context['AMN'] = AssetRegistry() con...
Fix simpletag -> simple_tag Fix imports
Fix simpletag -> simple_tag Fix imports
Python
bsd-2-clause
funkybob/django-amn
from django import template from damn.processors import find_processor from damn.utils import AssetRegistry, DepNode register = template.Library() class AssetsNode(template.Node): def __init__(self, nodelist): self.nodelist = nodelist def render(self, context): context.render_context['AM...
from django import template from ..processors import find_processor, AssetRegistry register = template.Library() class AssetsNode(template.Node): def __init__(self, nodelist): self.nodelist = nodelist def render(self, context): context.render_context['AMN'] = AssetRegistry() con...
<commit_before> from django import template from damn.processors import find_processor from damn.utils import AssetRegistry, DepNode register = template.Library() class AssetsNode(template.Node): def __init__(self, nodelist): self.nodelist = nodelist def render(self, context): context.ren...
from django import template from ..processors import find_processor, AssetRegistry register = template.Library() class AssetsNode(template.Node): def __init__(self, nodelist): self.nodelist = nodelist def render(self, context): context.render_context['AMN'] = AssetRegistry() con...
from django import template from damn.processors import find_processor from damn.utils import AssetRegistry, DepNode register = template.Library() class AssetsNode(template.Node): def __init__(self, nodelist): self.nodelist = nodelist def render(self, context): context.render_context['AM...
<commit_before> from django import template from damn.processors import find_processor from damn.utils import AssetRegistry, DepNode register = template.Library() class AssetsNode(template.Node): def __init__(self, nodelist): self.nodelist = nodelist def render(self, context): context.ren...
fe1b9ad1f65ac27c5bc3d02acaf473f001609e73
relayer/flask/__init__.py
relayer/flask/__init__.py
from typing import Any from flask import Flask from relayer import Relayer class FlaskRelayer(object): def __init__(self, app: Flask, logging_topic: str, kafka_hosts: str = None, **kwargs: str) -> None: if app: self.init_app( app, logging_topic, ...
from typing import Any from flask import Flask from relayer import Relayer class FlaskRelayer(object): def __init__(self, app: Flask = None, logging_topic: str = None, kafka_hosts: str = None, **kwargs: str) -> None: if app: self.init_app( app, logging_topic, ...
Use default arguments removed by mypy
Use default arguments removed by mypy
Python
mit
wizeline/relayer
from typing import Any from flask import Flask from relayer import Relayer class FlaskRelayer(object): def __init__(self, app: Flask, logging_topic: str, kafka_hosts: str = None, **kwargs: str) -> None: if app: self.init_app( app, logging_topic, ...
from typing import Any from flask import Flask from relayer import Relayer class FlaskRelayer(object): def __init__(self, app: Flask = None, logging_topic: str = None, kafka_hosts: str = None, **kwargs: str) -> None: if app: self.init_app( app, logging_topic, ...
<commit_before>from typing import Any from flask import Flask from relayer import Relayer class FlaskRelayer(object): def __init__(self, app: Flask, logging_topic: str, kafka_hosts: str = None, **kwargs: str) -> None: if app: self.init_app( app, logging_topic,...
from typing import Any from flask import Flask from relayer import Relayer class FlaskRelayer(object): def __init__(self, app: Flask = None, logging_topic: str = None, kafka_hosts: str = None, **kwargs: str) -> None: if app: self.init_app( app, logging_topic, ...
from typing import Any from flask import Flask from relayer import Relayer class FlaskRelayer(object): def __init__(self, app: Flask, logging_topic: str, kafka_hosts: str = None, **kwargs: str) -> None: if app: self.init_app( app, logging_topic, ...
<commit_before>from typing import Any from flask import Flask from relayer import Relayer class FlaskRelayer(object): def __init__(self, app: Flask, logging_topic: str, kafka_hosts: str = None, **kwargs: str) -> None: if app: self.init_app( app, logging_topic,...
d6a00b0cf70d778e4671ce8aa1c9b115410fcc33
studygroups/migrations/0034_create_facilitators_group.py
studygroups/migrations/0034_create_facilitators_group.py
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations def create_facilitators_group(apps, schema_editor): Group = apps.get_model("auth", "Group") group = Group(name="facilitators") group.save() class Migration(migrations.Migration): dependencies = ...
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations def create_facilitators_group(apps, schema_editor): Group = apps.get_model("auth", "Group") Group.objects.get_or_create(name="facilitators") class Migration(migrations.Migration): dependencies = [ ...
Change data migration to work even if facilitator group already exists
Change data migration to work even if facilitator group already exists
Python
mit
p2pu/learning-circles,p2pu/learning-circles,p2pu/learning-circles,p2pu/learning-circles
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations def create_facilitators_group(apps, schema_editor): Group = apps.get_model("auth", "Group") group = Group(name="facilitators") group.save() class Migration(migrations.Migration): dependencies = ...
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations def create_facilitators_group(apps, schema_editor): Group = apps.get_model("auth", "Group") Group.objects.get_or_create(name="facilitators") class Migration(migrations.Migration): dependencies = [ ...
<commit_before># -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations def create_facilitators_group(apps, schema_editor): Group = apps.get_model("auth", "Group") group = Group(name="facilitators") group.save() class Migration(migrations.Migration): ...
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations def create_facilitators_group(apps, schema_editor): Group = apps.get_model("auth", "Group") Group.objects.get_or_create(name="facilitators") class Migration(migrations.Migration): dependencies = [ ...
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations def create_facilitators_group(apps, schema_editor): Group = apps.get_model("auth", "Group") group = Group(name="facilitators") group.save() class Migration(migrations.Migration): dependencies = ...
<commit_before># -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations def create_facilitators_group(apps, schema_editor): Group = apps.get_model("auth", "Group") group = Group(name="facilitators") group.save() class Migration(migrations.Migration): ...
d8974bddff5c16d616fb846eb44ba90c77a18225
utils/needle_phy.py
utils/needle_phy.py
""" Simulation of Buffon's Needle Experiment. """ import math import numpy as np import numexpr as ne from utils import misc def run_trials(length, gap_width, trials): """ Runs the simulation a specified number of times. """ length = misc.validate_length(length) gap_width = misc.validate_width(...
""" Simulation of Buffon's Needle Experiment. """ import math import numpy as np import numexpr as ne from utils import misc def run_trials(length, gap_width, trials): """ Runs the simulation a specified number of times. """ length = misc.validate_length(length) gap_width = misc.validate_width(...
Add placeholder to return array full of zeroes.
Add placeholder to return array full of zeroes.
Python
mit
wei2912/bce-simulation,wei2912/bce-simulation,wei2912/bce-simulation,wei2912/bce-simulation
""" Simulation of Buffon's Needle Experiment. """ import math import numpy as np import numexpr as ne from utils import misc def run_trials(length, gap_width, trials): """ Runs the simulation a specified number of times. """ length = misc.validate_length(length) gap_width = misc.validate_width(...
""" Simulation of Buffon's Needle Experiment. """ import math import numpy as np import numexpr as ne from utils import misc def run_trials(length, gap_width, trials): """ Runs the simulation a specified number of times. """ length = misc.validate_length(length) gap_width = misc.validate_width(...
<commit_before>""" Simulation of Buffon's Needle Experiment. """ import math import numpy as np import numexpr as ne from utils import misc def run_trials(length, gap_width, trials): """ Runs the simulation a specified number of times. """ length = misc.validate_length(length) gap_width = misc....
""" Simulation of Buffon's Needle Experiment. """ import math import numpy as np import numexpr as ne from utils import misc def run_trials(length, gap_width, trials): """ Runs the simulation a specified number of times. """ length = misc.validate_length(length) gap_width = misc.validate_width(...
""" Simulation of Buffon's Needle Experiment. """ import math import numpy as np import numexpr as ne from utils import misc def run_trials(length, gap_width, trials): """ Runs the simulation a specified number of times. """ length = misc.validate_length(length) gap_width = misc.validate_width(...
<commit_before>""" Simulation of Buffon's Needle Experiment. """ import math import numpy as np import numexpr as ne from utils import misc def run_trials(length, gap_width, trials): """ Runs the simulation a specified number of times. """ length = misc.validate_length(length) gap_width = misc....
a137e8a92211d3d344a38b5c97d81073d66a1668
alembic/versions/17c1af634026_extract_publication_date.py
alembic/versions/17c1af634026_extract_publication_date.py
"""Populate the `publication_date` column. Revision ID: 17c1af634026 Revises: 3c4c29f0a791 Create Date: 2012-12-13 21:03:03.445346 """ # revision identifiers, used by Alembic. revision = '17c1af634026' down_revision = '3c4c29f0a791' import html5lib from dateutil.parser import parse as parse_date import pytips fro...
"""Populate the `publication_date` column. Revision ID: 17c1af634026 Revises: 3c4c29f0a791 Create Date: 2012-12-13 21:03:03.445346 """ # revision identifiers, used by Alembic. revision = '17c1af634026' down_revision = '3c4c29f0a791' import html5lib from dateutil.parser import parse as parse_date import pytips fro...
Use the utility module's extract_publication_date logic.
Use the utility module's extract_publication_date logic.
Python
isc
gthank/pytips,gthank/pytips,gthank/pytips,gthank/pytips
"""Populate the `publication_date` column. Revision ID: 17c1af634026 Revises: 3c4c29f0a791 Create Date: 2012-12-13 21:03:03.445346 """ # revision identifiers, used by Alembic. revision = '17c1af634026' down_revision = '3c4c29f0a791' import html5lib from dateutil.parser import parse as parse_date import pytips fro...
"""Populate the `publication_date` column. Revision ID: 17c1af634026 Revises: 3c4c29f0a791 Create Date: 2012-12-13 21:03:03.445346 """ # revision identifiers, used by Alembic. revision = '17c1af634026' down_revision = '3c4c29f0a791' import html5lib from dateutil.parser import parse as parse_date import pytips fro...
<commit_before>"""Populate the `publication_date` column. Revision ID: 17c1af634026 Revises: 3c4c29f0a791 Create Date: 2012-12-13 21:03:03.445346 """ # revision identifiers, used by Alembic. revision = '17c1af634026' down_revision = '3c4c29f0a791' import html5lib from dateutil.parser import parse as parse_date im...
"""Populate the `publication_date` column. Revision ID: 17c1af634026 Revises: 3c4c29f0a791 Create Date: 2012-12-13 21:03:03.445346 """ # revision identifiers, used by Alembic. revision = '17c1af634026' down_revision = '3c4c29f0a791' import html5lib from dateutil.parser import parse as parse_date import pytips fro...
"""Populate the `publication_date` column. Revision ID: 17c1af634026 Revises: 3c4c29f0a791 Create Date: 2012-12-13 21:03:03.445346 """ # revision identifiers, used by Alembic. revision = '17c1af634026' down_revision = '3c4c29f0a791' import html5lib from dateutil.parser import parse as parse_date import pytips fro...
<commit_before>"""Populate the `publication_date` column. Revision ID: 17c1af634026 Revises: 3c4c29f0a791 Create Date: 2012-12-13 21:03:03.445346 """ # revision identifiers, used by Alembic. revision = '17c1af634026' down_revision = '3c4c29f0a791' import html5lib from dateutil.parser import parse as parse_date im...
c76b6f4d5e4b6b24b12a712b062fe7ffe0aedda5
base/broadcast.py
base/broadcast.py
from abc import ABCMeta, abstractmethod import socket, json class Broadcast(metaclass=ABCMeta): """ An interface for defining a broadcast protocol. The 'propose' and 'decide' methods need to be defined """ BUFFER_SIZE = 1024 def __init__(self, peer_list): self.peers = peer_list ...
from abc import ABCMeta, abstractmethod import socket, json class Broadcast(metaclass=ABCMeta): """ An interface for defining a broadcast protocol. The 'propose' and 'decide' methods need to be defined """ BUFFER_SIZE = 1024 def __init__(self, peer_list): self.peers = peer_list ...
Extend Broadcast protocol abstraction with a Handler interface for message delivery
Extend Broadcast protocol abstraction with a Handler interface for message delivery
Python
mit
koevskinikola/ByzantineRandomizedConsensus
from abc import ABCMeta, abstractmethod import socket, json class Broadcast(metaclass=ABCMeta): """ An interface for defining a broadcast protocol. The 'propose' and 'decide' methods need to be defined """ BUFFER_SIZE = 1024 def __init__(self, peer_list): self.peers = peer_list ...
from abc import ABCMeta, abstractmethod import socket, json class Broadcast(metaclass=ABCMeta): """ An interface for defining a broadcast protocol. The 'propose' and 'decide' methods need to be defined """ BUFFER_SIZE = 1024 def __init__(self, peer_list): self.peers = peer_list ...
<commit_before>from abc import ABCMeta, abstractmethod import socket, json class Broadcast(metaclass=ABCMeta): """ An interface for defining a broadcast protocol. The 'propose' and 'decide' methods need to be defined """ BUFFER_SIZE = 1024 def __init__(self, peer_list): self.peers = ...
from abc import ABCMeta, abstractmethod import socket, json class Broadcast(metaclass=ABCMeta): """ An interface for defining a broadcast protocol. The 'propose' and 'decide' methods need to be defined """ BUFFER_SIZE = 1024 def __init__(self, peer_list): self.peers = peer_list ...
from abc import ABCMeta, abstractmethod import socket, json class Broadcast(metaclass=ABCMeta): """ An interface for defining a broadcast protocol. The 'propose' and 'decide' methods need to be defined """ BUFFER_SIZE = 1024 def __init__(self, peer_list): self.peers = peer_list ...
<commit_before>from abc import ABCMeta, abstractmethod import socket, json class Broadcast(metaclass=ABCMeta): """ An interface for defining a broadcast protocol. The 'propose' and 'decide' methods need to be defined """ BUFFER_SIZE = 1024 def __init__(self, peer_list): self.peers = ...
5f8da3c286bf734302ee493e00675b84836ba10e
src/server.py
src/server.py
#!/usr/bin/env python3 import socketserver from socketserver import BaseRequestHandler from socketserver import TCPServer HOST = '' PORT = 7777 class ConnectionHandler(BaseRequestHandler): def handle(self): self.data = self.request.recv(128).strip() print('{} wrote:\n{}'.format(self.client_addres...
#!/usr/bin/env python3 import socketserver from socketserver import BaseRequestHandler from socketserver import TCPServer from inv_kinematics import get_angles class ConnectionHandler(BaseRequestHandler): def handle(self): self.data = self.request.recv(128).strip().decode() print('Data from {}:\n...
Use other ports and show inv problem solutions
Use other ports and show inv problem solutions
Python
mit
saleone/bachelor-thesis
#!/usr/bin/env python3 import socketserver from socketserver import BaseRequestHandler from socketserver import TCPServer HOST = '' PORT = 7777 class ConnectionHandler(BaseRequestHandler): def handle(self): self.data = self.request.recv(128).strip() print('{} wrote:\n{}'.format(self.client_addres...
#!/usr/bin/env python3 import socketserver from socketserver import BaseRequestHandler from socketserver import TCPServer from inv_kinematics import get_angles class ConnectionHandler(BaseRequestHandler): def handle(self): self.data = self.request.recv(128).strip().decode() print('Data from {}:\n...
<commit_before>#!/usr/bin/env python3 import socketserver from socketserver import BaseRequestHandler from socketserver import TCPServer HOST = '' PORT = 7777 class ConnectionHandler(BaseRequestHandler): def handle(self): self.data = self.request.recv(128).strip() print('{} wrote:\n{}'.format(sel...
#!/usr/bin/env python3 import socketserver from socketserver import BaseRequestHandler from socketserver import TCPServer from inv_kinematics import get_angles class ConnectionHandler(BaseRequestHandler): def handle(self): self.data = self.request.recv(128).strip().decode() print('Data from {}:\n...
#!/usr/bin/env python3 import socketserver from socketserver import BaseRequestHandler from socketserver import TCPServer HOST = '' PORT = 7777 class ConnectionHandler(BaseRequestHandler): def handle(self): self.data = self.request.recv(128).strip() print('{} wrote:\n{}'.format(self.client_addres...
<commit_before>#!/usr/bin/env python3 import socketserver from socketserver import BaseRequestHandler from socketserver import TCPServer HOST = '' PORT = 7777 class ConnectionHandler(BaseRequestHandler): def handle(self): self.data = self.request.recv(128).strip() print('{} wrote:\n{}'.format(sel...
d307abc0c1e96d7c0e7e6c465ded275f796721d3
channels/hacks.py
channels/hacks.py
def monkeypatch_django(): """ Monkeypatches support for us into parts of Django. """ # Ensure that the staticfiles version of runserver bows down to us # This one is particularly horrible from django.contrib.staticfiles.management.commands.runserver import ( Command as StaticRunserverCom...
def monkeypatch_django(): """ Monkeypatches support for us into parts of Django. """ # Ensure that the staticfiles version of runserver bows down to us # This one is particularly horrible from django.contrib.staticfiles.management.commands.runserver import ( Command as StaticRunserverCom...
Fix Black linter mismatch with versions
Fix Black linter mismatch with versions
Python
bsd-3-clause
andrewgodwin/django-channels,django/channels,andrewgodwin/channels
def monkeypatch_django(): """ Monkeypatches support for us into parts of Django. """ # Ensure that the staticfiles version of runserver bows down to us # This one is particularly horrible from django.contrib.staticfiles.management.commands.runserver import ( Command as StaticRunserverCom...
def monkeypatch_django(): """ Monkeypatches support for us into parts of Django. """ # Ensure that the staticfiles version of runserver bows down to us # This one is particularly horrible from django.contrib.staticfiles.management.commands.runserver import ( Command as StaticRunserverCom...
<commit_before>def monkeypatch_django(): """ Monkeypatches support for us into parts of Django. """ # Ensure that the staticfiles version of runserver bows down to us # This one is particularly horrible from django.contrib.staticfiles.management.commands.runserver import ( Command as Sta...
def monkeypatch_django(): """ Monkeypatches support for us into parts of Django. """ # Ensure that the staticfiles version of runserver bows down to us # This one is particularly horrible from django.contrib.staticfiles.management.commands.runserver import ( Command as StaticRunserverCom...
def monkeypatch_django(): """ Monkeypatches support for us into parts of Django. """ # Ensure that the staticfiles version of runserver bows down to us # This one is particularly horrible from django.contrib.staticfiles.management.commands.runserver import ( Command as StaticRunserverCom...
<commit_before>def monkeypatch_django(): """ Monkeypatches support for us into parts of Django. """ # Ensure that the staticfiles version of runserver bows down to us # This one is particularly horrible from django.contrib.staticfiles.management.commands.runserver import ( Command as Sta...
4e5fa71790f7a69bf6bb472ee7ce48f4a801953c
test/util.py
test/util.py
""" Utilities used throughout the tests. """ from functools import wraps from mongoalchemy.session import Session DB_NAME = 'mongoalchemy-unit-test' def known_failure(fun): """ Wraps a test known to fail without causing an actual test failure. """ @wraps(fun) def wrapper(*args, **kwds): ...
""" Utilities used throughout the tests. """ from functools import wraps from mongoalchemy.session import Session DB_NAME = 'mongoalchemy-unit-test' """ Name of the database to use for testing. """ def known_failure(fun): """ Wraps a test known to fail without causing an actual test failure. """ ...
Allow get_session to pass through arguments, like `safe`.
Allow get_session to pass through arguments, like `safe`.
Python
mit
shakefu/MongoAlchemy,shakefu/MongoAlchemy,shakefu/MongoAlchemy
""" Utilities used throughout the tests. """ from functools import wraps from mongoalchemy.session import Session DB_NAME = 'mongoalchemy-unit-test' def known_failure(fun): """ Wraps a test known to fail without causing an actual test failure. """ @wraps(fun) def wrapper(*args, **kwds): ...
""" Utilities used throughout the tests. """ from functools import wraps from mongoalchemy.session import Session DB_NAME = 'mongoalchemy-unit-test' """ Name of the database to use for testing. """ def known_failure(fun): """ Wraps a test known to fail without causing an actual test failure. """ ...
<commit_before>""" Utilities used throughout the tests. """ from functools import wraps from mongoalchemy.session import Session DB_NAME = 'mongoalchemy-unit-test' def known_failure(fun): """ Wraps a test known to fail without causing an actual test failure. """ @wraps(fun) def wrapper(*args,...
""" Utilities used throughout the tests. """ from functools import wraps from mongoalchemy.session import Session DB_NAME = 'mongoalchemy-unit-test' """ Name of the database to use for testing. """ def known_failure(fun): """ Wraps a test known to fail without causing an actual test failure. """ ...
""" Utilities used throughout the tests. """ from functools import wraps from mongoalchemy.session import Session DB_NAME = 'mongoalchemy-unit-test' def known_failure(fun): """ Wraps a test known to fail without causing an actual test failure. """ @wraps(fun) def wrapper(*args, **kwds): ...
<commit_before>""" Utilities used throughout the tests. """ from functools import wraps from mongoalchemy.session import Session DB_NAME = 'mongoalchemy-unit-test' def known_failure(fun): """ Wraps a test known to fail without causing an actual test failure. """ @wraps(fun) def wrapper(*args,...
573f3fd726c7bf1495bfdfeb2201317abc2949e4
src/parser/menu_item.py
src/parser/menu_item.py
"""(c) All rights reserved. ECOLE POLYTECHNIQUE FEDERALE DE LAUSANNE, Switzerland, VPSI, 2017""" class MenuItem: """ To store menu item information """ def __init__(self, txt, target, hidden): """ Constructor txt - Menu link text target - Can be several things -- Referenc...
"""(c) All rights reserved. ECOLE POLYTECHNIQUE FEDERALE DE LAUSANNE, Switzerland, VPSI, 2017""" class MenuItem: """ To store menu item information """ def __init__(self, txt, target, hidden): """ Constructor txt - Menu link text target - Can be several things -- Referenc...
Remove previously added method because finally not used...
Remove previously added method because finally not used...
Python
mit
epfl-idevelop/jahia2wp,epfl-idevelop/jahia2wp,epfl-idevelop/jahia2wp,epfl-idevelop/jahia2wp
"""(c) All rights reserved. ECOLE POLYTECHNIQUE FEDERALE DE LAUSANNE, Switzerland, VPSI, 2017""" class MenuItem: """ To store menu item information """ def __init__(self, txt, target, hidden): """ Constructor txt - Menu link text target - Can be several things -- Referenc...
"""(c) All rights reserved. ECOLE POLYTECHNIQUE FEDERALE DE LAUSANNE, Switzerland, VPSI, 2017""" class MenuItem: """ To store menu item information """ def __init__(self, txt, target, hidden): """ Constructor txt - Menu link text target - Can be several things -- Referenc...
<commit_before>"""(c) All rights reserved. ECOLE POLYTECHNIQUE FEDERALE DE LAUSANNE, Switzerland, VPSI, 2017""" class MenuItem: """ To store menu item information """ def __init__(self, txt, target, hidden): """ Constructor txt - Menu link text target - Can be several things ...
"""(c) All rights reserved. ECOLE POLYTECHNIQUE FEDERALE DE LAUSANNE, Switzerland, VPSI, 2017""" class MenuItem: """ To store menu item information """ def __init__(self, txt, target, hidden): """ Constructor txt - Menu link text target - Can be several things -- Referenc...
"""(c) All rights reserved. ECOLE POLYTECHNIQUE FEDERALE DE LAUSANNE, Switzerland, VPSI, 2017""" class MenuItem: """ To store menu item information """ def __init__(self, txt, target, hidden): """ Constructor txt - Menu link text target - Can be several things -- Referenc...
<commit_before>"""(c) All rights reserved. ECOLE POLYTECHNIQUE FEDERALE DE LAUSANNE, Switzerland, VPSI, 2017""" class MenuItem: """ To store menu item information """ def __init__(self, txt, target, hidden): """ Constructor txt - Menu link text target - Can be several things ...
6397ca218be2fe1d8095a04b2c6623f2e1d1fd7b
autograder/controller/autograder.py
autograder/controller/autograder.py
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ This module is part of the Clemson ACM Auto Grader This module is contains the main method for the module """ import argparse from autograder.controller import setup, grade_project def main(): """ Main method for the autograder """ options = parse_a...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ This module is part of the Clemson ACM Auto Grader Copyright (c) 2016, Robert Underwood All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistribut...
Clean up of main module
Clean up of main module Moved two commands to the grade_project script. Added copyright statement.
Python
bsd-2-clause
robertu94/autograder,robertu94/autograder,robertu94/autograder
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ This module is part of the Clemson ACM Auto Grader This module is contains the main method for the module """ import argparse from autograder.controller import setup, grade_project def main(): """ Main method for the autograder """ options = parse_a...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ This module is part of the Clemson ACM Auto Grader Copyright (c) 2016, Robert Underwood All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistribut...
<commit_before>#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ This module is part of the Clemson ACM Auto Grader This module is contains the main method for the module """ import argparse from autograder.controller import setup, grade_project def main(): """ Main method for the autograder """ op...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ This module is part of the Clemson ACM Auto Grader Copyright (c) 2016, Robert Underwood All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistribut...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ This module is part of the Clemson ACM Auto Grader This module is contains the main method for the module """ import argparse from autograder.controller import setup, grade_project def main(): """ Main method for the autograder """ options = parse_a...
<commit_before>#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ This module is part of the Clemson ACM Auto Grader This module is contains the main method for the module """ import argparse from autograder.controller import setup, grade_project def main(): """ Main method for the autograder """ op...
5251534283d233d5f1e9cfc33f8de9cf18cd3ba1
server/lib/python/cartodb_services/cartodb_services/google/client_factory.py
server/lib/python/cartodb_services/cartodb_services/google/client_factory.py
#!/usr/local/bin/python # -*- coding: utf-8 -*- import googlemaps import base64 from exceptions import InvalidGoogleCredentials class GoogleMapsClientFactory(): clients = {} @classmethod def get(cls, client_id, client_secret, channel=None): cache_key = "{}:{}:{}".format(client_id, client_secret, ...
#!/usr/local/bin/python # -*- coding: utf-8 -*- import googlemaps import base64 from exceptions import InvalidGoogleCredentials class GoogleMapsClientFactory(): clients = {} @classmethod def get(cls, client_id, client_secret, channel=None): cache_key = "{}:{}:{}".format(client_id, client_secret,...
Allow using non-Premium keys for Google Maps client
Allow using non-Premium keys for Google Maps client
Python
bsd-3-clause
CartoDB/dataservices-api,CartoDB/geocoder-api,CartoDB/geocoder-api,CartoDB/dataservices-api,CartoDB/dataservices-api,CartoDB/dataservices-api,CartoDB/geocoder-api,CartoDB/geocoder-api
#!/usr/local/bin/python # -*- coding: utf-8 -*- import googlemaps import base64 from exceptions import InvalidGoogleCredentials class GoogleMapsClientFactory(): clients = {} @classmethod def get(cls, client_id, client_secret, channel=None): cache_key = "{}:{}:{}".format(client_id, client_secret, ...
#!/usr/local/bin/python # -*- coding: utf-8 -*- import googlemaps import base64 from exceptions import InvalidGoogleCredentials class GoogleMapsClientFactory(): clients = {} @classmethod def get(cls, client_id, client_secret, channel=None): cache_key = "{}:{}:{}".format(client_id, client_secret,...
<commit_before>#!/usr/local/bin/python # -*- coding: utf-8 -*- import googlemaps import base64 from exceptions import InvalidGoogleCredentials class GoogleMapsClientFactory(): clients = {} @classmethod def get(cls, client_id, client_secret, channel=None): cache_key = "{}:{}:{}".format(client_id, ...
#!/usr/local/bin/python # -*- coding: utf-8 -*- import googlemaps import base64 from exceptions import InvalidGoogleCredentials class GoogleMapsClientFactory(): clients = {} @classmethod def get(cls, client_id, client_secret, channel=None): cache_key = "{}:{}:{}".format(client_id, client_secret,...
#!/usr/local/bin/python # -*- coding: utf-8 -*- import googlemaps import base64 from exceptions import InvalidGoogleCredentials class GoogleMapsClientFactory(): clients = {} @classmethod def get(cls, client_id, client_secret, channel=None): cache_key = "{}:{}:{}".format(client_id, client_secret, ...
<commit_before>#!/usr/local/bin/python # -*- coding: utf-8 -*- import googlemaps import base64 from exceptions import InvalidGoogleCredentials class GoogleMapsClientFactory(): clients = {} @classmethod def get(cls, client_id, client_secret, channel=None): cache_key = "{}:{}:{}".format(client_id, ...
a4f99f9825fda7f40a8416c367c79dd2cfb8a35b
django_docutils/lib/settings.py
django_docutils/lib/settings.py
from django.conf import settings BASED_LIB_RST = getattr( settings, 'BASED_LIB_RST', { "font_awesome": { "url_patterns": { r'.*twitter.com.*': 'fab fa-twitter', } } }, )
from django.conf import settings BASED_LIB_RST = getattr(settings, 'BASED_LIB_RST', {}) INJECT_FONT_AWESOME = ( BASED_LIB_RST.get('font_awesome', {}).get('url_patterns') is not None )
Remove example setting from defaults, add INJECT_FONT_AWESOME
Remove example setting from defaults, add INJECT_FONT_AWESOME
Python
mit
tony/django-docutils,tony/django-docutils
from django.conf import settings BASED_LIB_RST = getattr( settings, 'BASED_LIB_RST', { "font_awesome": { "url_patterns": { r'.*twitter.com.*': 'fab fa-twitter', } } }, ) Remove example setting from defaults, add INJECT_FONT_AWESOME
from django.conf import settings BASED_LIB_RST = getattr(settings, 'BASED_LIB_RST', {}) INJECT_FONT_AWESOME = ( BASED_LIB_RST.get('font_awesome', {}).get('url_patterns') is not None )
<commit_before>from django.conf import settings BASED_LIB_RST = getattr( settings, 'BASED_LIB_RST', { "font_awesome": { "url_patterns": { r'.*twitter.com.*': 'fab fa-twitter', } } }, ) <commit_msg>Remove example setting from defaults, add INJECT_F...
from django.conf import settings BASED_LIB_RST = getattr(settings, 'BASED_LIB_RST', {}) INJECT_FONT_AWESOME = ( BASED_LIB_RST.get('font_awesome', {}).get('url_patterns') is not None )
from django.conf import settings BASED_LIB_RST = getattr( settings, 'BASED_LIB_RST', { "font_awesome": { "url_patterns": { r'.*twitter.com.*': 'fab fa-twitter', } } }, ) Remove example setting from defaults, add INJECT_FONT_AWESOMEfrom django.conf...
<commit_before>from django.conf import settings BASED_LIB_RST = getattr( settings, 'BASED_LIB_RST', { "font_awesome": { "url_patterns": { r'.*twitter.com.*': 'fab fa-twitter', } } }, ) <commit_msg>Remove example setting from defaults, add INJECT_F...
f6c36bbb5b5afec1a029213557b722e50dd6aaaa
test/test_run_script.py
test/test_run_script.py
def test_dummy(): assert True
import subprocess import pytest def test_filter(tmp_path): unit_test = tmp_path.joinpath('some_unit_test.sv') unit_test.write_text(''' module some_unit_test; import svunit_pkg::*; `include "svunit_defines.svh" string name = "some_ut"; svunit_testcase svunit_ut; function void build(); svunit_...
Add test for '--filter' option
Add test for '--filter' option The goal now is to make this test pass by implementing the necessary production code.
Python
apache-2.0
svunit/svunit,svunit/svunit,svunit/svunit
def test_dummy(): assert True Add test for '--filter' option The goal now is to make this test pass by implementing the necessary production code.
import subprocess import pytest def test_filter(tmp_path): unit_test = tmp_path.joinpath('some_unit_test.sv') unit_test.write_text(''' module some_unit_test; import svunit_pkg::*; `include "svunit_defines.svh" string name = "some_ut"; svunit_testcase svunit_ut; function void build(); svunit_...
<commit_before>def test_dummy(): assert True <commit_msg>Add test for '--filter' option The goal now is to make this test pass by implementing the necessary production code.<commit_after>
import subprocess import pytest def test_filter(tmp_path): unit_test = tmp_path.joinpath('some_unit_test.sv') unit_test.write_text(''' module some_unit_test; import svunit_pkg::*; `include "svunit_defines.svh" string name = "some_ut"; svunit_testcase svunit_ut; function void build(); svunit_...
def test_dummy(): assert True Add test for '--filter' option The goal now is to make this test pass by implementing the necessary production code.import subprocess import pytest def test_filter(tmp_path): unit_test = tmp_path.joinpath('some_unit_test.sv') unit_test.write_text(''' module some_unit_test; ...
<commit_before>def test_dummy(): assert True <commit_msg>Add test for '--filter' option The goal now is to make this test pass by implementing the necessary production code.<commit_after>import subprocess import pytest def test_filter(tmp_path): unit_test = tmp_path.joinpath('some_unit_test.sv') unit_te...
f2109a486b3459a3fbf4e5e7db92780f1765a5a8
test_app/urls.py
test_app/urls.py
from django.conf.urls.defaults import patterns, url, include from django.contrib import admin from django.http import HttpResponseNotFound, HttpResponseServerError from test_app import views from waffle.views import wafflejs handler404 = lambda r: HttpResponseNotFound() handler500 = lambda r: HttpResponseServerError...
from django.conf.urls.defaults import patterns, url, include from django.contrib import admin from django.http import HttpResponseNotFound, HttpResponseServerError from test_app import views handler404 = lambda r: HttpResponseNotFound() handler500 = lambda r: HttpResponseServerError() admin.autodiscover() urlpatte...
Use new URLs module in test_app.
Use new URLs module in test_app.
Python
bsd-3-clause
mark-adams/django-waffle,festicket/django-waffle,hwkns/django-waffle,JeLoueMonCampingCar/django-waffle,crccheck/django-waffle,ilanbm/django-waffle,mwaaas/django-waffle-session,11craft/django-waffle,VladimirFilonov/django-waffle,willkg/django-waffle,rodgomes/django-waffle,festicket/django-waffle,crccheck/django-waffle,r...
from django.conf.urls.defaults import patterns, url, include from django.contrib import admin from django.http import HttpResponseNotFound, HttpResponseServerError from test_app import views from waffle.views import wafflejs handler404 = lambda r: HttpResponseNotFound() handler500 = lambda r: HttpResponseServerError...
from django.conf.urls.defaults import patterns, url, include from django.contrib import admin from django.http import HttpResponseNotFound, HttpResponseServerError from test_app import views handler404 = lambda r: HttpResponseNotFound() handler500 = lambda r: HttpResponseServerError() admin.autodiscover() urlpatte...
<commit_before>from django.conf.urls.defaults import patterns, url, include from django.contrib import admin from django.http import HttpResponseNotFound, HttpResponseServerError from test_app import views from waffle.views import wafflejs handler404 = lambda r: HttpResponseNotFound() handler500 = lambda r: HttpResp...
from django.conf.urls.defaults import patterns, url, include from django.contrib import admin from django.http import HttpResponseNotFound, HttpResponseServerError from test_app import views handler404 = lambda r: HttpResponseNotFound() handler500 = lambda r: HttpResponseServerError() admin.autodiscover() urlpatte...
from django.conf.urls.defaults import patterns, url, include from django.contrib import admin from django.http import HttpResponseNotFound, HttpResponseServerError from test_app import views from waffle.views import wafflejs handler404 = lambda r: HttpResponseNotFound() handler500 = lambda r: HttpResponseServerError...
<commit_before>from django.conf.urls.defaults import patterns, url, include from django.contrib import admin from django.http import HttpResponseNotFound, HttpResponseServerError from test_app import views from waffle.views import wafflejs handler404 = lambda r: HttpResponseNotFound() handler500 = lambda r: HttpResp...
88d757fa5ccda207fb29502ca1c8c7b6bda6d785
tst/utils.py
tst/utils.py
from __future__ import print_function import sys import string import json from colors import * def is_posix_filename(name, extra_chars=""): CHARS = string.letters + string.digits + "._-" + extra_chars return all(c in CHARS for c in name) def cprint(color, msg, file=sys.stdout, end='\n'): if type(msg)...
from __future__ import print_function import sys import string import json from colors import * def is_posix_filename(name, extra_chars=""): CHARS = string.letters + string.digits + "._-" + extra_chars return all(c in CHARS for c in name) def cprint(color, msg, file=sys.stderr, end='\n'): if type(msg)...
Fix cprint: use stderr not stdout
Fix cprint: use stderr not stdout
Python
agpl-3.0
daltonserey/tst,daltonserey/tst
from __future__ import print_function import sys import string import json from colors import * def is_posix_filename(name, extra_chars=""): CHARS = string.letters + string.digits + "._-" + extra_chars return all(c in CHARS for c in name) def cprint(color, msg, file=sys.stdout, end='\n'): if type(msg)...
from __future__ import print_function import sys import string import json from colors import * def is_posix_filename(name, extra_chars=""): CHARS = string.letters + string.digits + "._-" + extra_chars return all(c in CHARS for c in name) def cprint(color, msg, file=sys.stderr, end='\n'): if type(msg)...
<commit_before>from __future__ import print_function import sys import string import json from colors import * def is_posix_filename(name, extra_chars=""): CHARS = string.letters + string.digits + "._-" + extra_chars return all(c in CHARS for c in name) def cprint(color, msg, file=sys.stdout, end='\n'): ...
from __future__ import print_function import sys import string import json from colors import * def is_posix_filename(name, extra_chars=""): CHARS = string.letters + string.digits + "._-" + extra_chars return all(c in CHARS for c in name) def cprint(color, msg, file=sys.stderr, end='\n'): if type(msg)...
from __future__ import print_function import sys import string import json from colors import * def is_posix_filename(name, extra_chars=""): CHARS = string.letters + string.digits + "._-" + extra_chars return all(c in CHARS for c in name) def cprint(color, msg, file=sys.stdout, end='\n'): if type(msg)...
<commit_before>from __future__ import print_function import sys import string import json from colors import * def is_posix_filename(name, extra_chars=""): CHARS = string.letters + string.digits + "._-" + extra_chars return all(c in CHARS for c in name) def cprint(color, msg, file=sys.stdout, end='\n'): ...
666b7b3597b857a3bfc99916354c6fc5bd15d68b
scripts/generate-user-email-list.py
scripts/generate-user-email-list.py
""" Usage: scripts/generate-user-email-list.py <data_api_url> <data_api_token> """ import csv import sys from docopt import docopt from dmutils.apiclient import DataAPIClient def generate_user_email_list(data_api_url, data_api_token): client = DataAPIClient(data_api_url, data_api_token) writer = csv.wr...
""" Usage: scripts/generate-user-email-list.py <data_api_url> <data_api_token> """ import csv import sys from docopt import docopt from dmutils.apiclient import DataAPIClient def generate_user_email_list(data_api_url, data_api_token): client = DataAPIClient(data_api_url, data_api_token) writer = csv.wr...
Fix typo in role check
Fix typo in role check
Python
mit
alphagov/digitalmarketplace-api,alphagov/digitalmarketplace-api,alphagov/digitalmarketplace-api
""" Usage: scripts/generate-user-email-list.py <data_api_url> <data_api_token> """ import csv import sys from docopt import docopt from dmutils.apiclient import DataAPIClient def generate_user_email_list(data_api_url, data_api_token): client = DataAPIClient(data_api_url, data_api_token) writer = csv.wr...
""" Usage: scripts/generate-user-email-list.py <data_api_url> <data_api_token> """ import csv import sys from docopt import docopt from dmutils.apiclient import DataAPIClient def generate_user_email_list(data_api_url, data_api_token): client = DataAPIClient(data_api_url, data_api_token) writer = csv.wr...
<commit_before>""" Usage: scripts/generate-user-email-list.py <data_api_url> <data_api_token> """ import csv import sys from docopt import docopt from dmutils.apiclient import DataAPIClient def generate_user_email_list(data_api_url, data_api_token): client = DataAPIClient(data_api_url, data_api_token) ...
""" Usage: scripts/generate-user-email-list.py <data_api_url> <data_api_token> """ import csv import sys from docopt import docopt from dmutils.apiclient import DataAPIClient def generate_user_email_list(data_api_url, data_api_token): client = DataAPIClient(data_api_url, data_api_token) writer = csv.wr...
""" Usage: scripts/generate-user-email-list.py <data_api_url> <data_api_token> """ import csv import sys from docopt import docopt from dmutils.apiclient import DataAPIClient def generate_user_email_list(data_api_url, data_api_token): client = DataAPIClient(data_api_url, data_api_token) writer = csv.wr...
<commit_before>""" Usage: scripts/generate-user-email-list.py <data_api_url> <data_api_token> """ import csv import sys from docopt import docopt from dmutils.apiclient import DataAPIClient def generate_user_email_list(data_api_url, data_api_token): client = DataAPIClient(data_api_url, data_api_token) ...
3bcec41a2dd9d5a43ce4d51379783d5f398f7571
Lib/scipy_version.py
Lib/scipy_version.py
major = 0 minor = 4 micro = 3 #try: # from __svn_version__ import version as svn_revision # scipy_version = '%(major)d.%(minor)d.%(micro)d_%(svn_revision)s'\ # % (locals ()) #except ImportError,msg: # svn_revision = 0 scipy_version = '%(major)d.%(minor)d.%(micro)d' % (locals ())
major = 0 minor = 4 micro = 3 scipy_version = '%(major)d.%(minor)d.%(micro)d' % (locals ()) import os svn_version_file = os.path.join(os.path.dirname(__file__), '__svn_version__.py') if os.path.isfile(svn_version_file): import imp svn = imp.load_module('scipy.__svn_version__',...
Fix the scipy version display.
Fix the scipy version display.
Python
bsd-3-clause
fernand/scipy,jonycgn/scipy,andyfaff/scipy,mgaitan/scipy,fernand/scipy,mortada/scipy,pschella/scipy,efiring/scipy,pbrod/scipy,mgaitan/scipy,nonhermitian/scipy,Shaswat27/scipy,mtrbean/scipy,futurulus/scipy,perimosocordiae/scipy,argriffing/scipy,behzadnouri/scipy,nmayorov/scipy,richardotis/scipy,ilayn/scipy,vhaasteren/sc...
major = 0 minor = 4 micro = 3 #try: # from __svn_version__ import version as svn_revision # scipy_version = '%(major)d.%(minor)d.%(micro)d_%(svn_revision)s'\ # % (locals ()) #except ImportError,msg: # svn_revision = 0 scipy_version = '%(major)d.%(minor)d.%(micro)d' % (locals ()) Fix the sc...
major = 0 minor = 4 micro = 3 scipy_version = '%(major)d.%(minor)d.%(micro)d' % (locals ()) import os svn_version_file = os.path.join(os.path.dirname(__file__), '__svn_version__.py') if os.path.isfile(svn_version_file): import imp svn = imp.load_module('scipy.__svn_version__',...
<commit_before>major = 0 minor = 4 micro = 3 #try: # from __svn_version__ import version as svn_revision # scipy_version = '%(major)d.%(minor)d.%(micro)d_%(svn_revision)s'\ # % (locals ()) #except ImportError,msg: # svn_revision = 0 scipy_version = '%(major)d.%(minor)d.%(micro)d' % (locals ...
major = 0 minor = 4 micro = 3 scipy_version = '%(major)d.%(minor)d.%(micro)d' % (locals ()) import os svn_version_file = os.path.join(os.path.dirname(__file__), '__svn_version__.py') if os.path.isfile(svn_version_file): import imp svn = imp.load_module('scipy.__svn_version__',...
major = 0 minor = 4 micro = 3 #try: # from __svn_version__ import version as svn_revision # scipy_version = '%(major)d.%(minor)d.%(micro)d_%(svn_revision)s'\ # % (locals ()) #except ImportError,msg: # svn_revision = 0 scipy_version = '%(major)d.%(minor)d.%(micro)d' % (locals ()) Fix the sc...
<commit_before>major = 0 minor = 4 micro = 3 #try: # from __svn_version__ import version as svn_revision # scipy_version = '%(major)d.%(minor)d.%(micro)d_%(svn_revision)s'\ # % (locals ()) #except ImportError,msg: # svn_revision = 0 scipy_version = '%(major)d.%(minor)d.%(micro)d' % (locals ...
e49fb537143cd0936b62ef53e294717d6ca4dc6f
tests/test_automaton.py
tests/test_automaton.py
#!/usr/bin/env python3 """Functions for testing the Automaton abstract base class.""" import nose.tools as nose from automata.base.automaton import Automaton def test_abstract_methods_not_implemented(): """Should raise NotImplementedError when calling abstract methods.""" with nose.assert_raises(NotImplemen...
#!/usr/bin/env python3 """Functions for testing the Automaton abstract base class.""" import nose.tools as nose from automata.base.automaton import Automaton def test_abstract_methods_not_implemented(): """Should raise NotImplementedError when calling abstract methods.""" abstract_methods = { '__ini...
Refactor abstract method test to reduce duplication
Refactor abstract method test to reduce duplication
Python
mit
caleb531/automata
#!/usr/bin/env python3 """Functions for testing the Automaton abstract base class.""" import nose.tools as nose from automata.base.automaton import Automaton def test_abstract_methods_not_implemented(): """Should raise NotImplementedError when calling abstract methods.""" with nose.assert_raises(NotImplemen...
#!/usr/bin/env python3 """Functions for testing the Automaton abstract base class.""" import nose.tools as nose from automata.base.automaton import Automaton def test_abstract_methods_not_implemented(): """Should raise NotImplementedError when calling abstract methods.""" abstract_methods = { '__ini...
<commit_before>#!/usr/bin/env python3 """Functions for testing the Automaton abstract base class.""" import nose.tools as nose from automata.base.automaton import Automaton def test_abstract_methods_not_implemented(): """Should raise NotImplementedError when calling abstract methods.""" with nose.assert_rai...
#!/usr/bin/env python3 """Functions for testing the Automaton abstract base class.""" import nose.tools as nose from automata.base.automaton import Automaton def test_abstract_methods_not_implemented(): """Should raise NotImplementedError when calling abstract methods.""" abstract_methods = { '__ini...
#!/usr/bin/env python3 """Functions for testing the Automaton abstract base class.""" import nose.tools as nose from automata.base.automaton import Automaton def test_abstract_methods_not_implemented(): """Should raise NotImplementedError when calling abstract methods.""" with nose.assert_raises(NotImplemen...
<commit_before>#!/usr/bin/env python3 """Functions for testing the Automaton abstract base class.""" import nose.tools as nose from automata.base.automaton import Automaton def test_abstract_methods_not_implemented(): """Should raise NotImplementedError when calling abstract methods.""" with nose.assert_rai...
d7e58494e1b35c315ede2b3019a18af0dd1744b4
stuff/urls.py
stuff/urls.py
import settings from django.conf.urls.defaults import * from django.contrib import admin admin.autodiscover() urlpatterns = patterns('', (r'^admin/(.*)', admin.site.root), (r'^publication/', include('stuff.publications.urls')), (r'^file/', include('stuff.files.urls')), (r'^photo/', include('stuff.pica...
import settings from django.conf.urls.defaults import * from django.contrib import admin admin.autodiscover() urlpatterns = patterns('', (r'^admin/(.*)', admin.site.root), (r'^publication/', include('stuff.publications.urls')), (r'^file/', include('stuff.files.urls')), (r'^photo/', include('stuff.pica...
Remove extra %s from media path
Remove extra %s from media path
Python
bsd-2-clause
anjos/website,anjos/website
import settings from django.conf.urls.defaults import * from django.contrib import admin admin.autodiscover() urlpatterns = patterns('', (r'^admin/(.*)', admin.site.root), (r'^publication/', include('stuff.publications.urls')), (r'^file/', include('stuff.files.urls')), (r'^photo/', include('stuff.pica...
import settings from django.conf.urls.defaults import * from django.contrib import admin admin.autodiscover() urlpatterns = patterns('', (r'^admin/(.*)', admin.site.root), (r'^publication/', include('stuff.publications.urls')), (r'^file/', include('stuff.files.urls')), (r'^photo/', include('stuff.pica...
<commit_before>import settings from django.conf.urls.defaults import * from django.contrib import admin admin.autodiscover() urlpatterns = patterns('', (r'^admin/(.*)', admin.site.root), (r'^publication/', include('stuff.publications.urls')), (r'^file/', include('stuff.files.urls')), (r'^photo/', incl...
import settings from django.conf.urls.defaults import * from django.contrib import admin admin.autodiscover() urlpatterns = patterns('', (r'^admin/(.*)', admin.site.root), (r'^publication/', include('stuff.publications.urls')), (r'^file/', include('stuff.files.urls')), (r'^photo/', include('stuff.pica...
import settings from django.conf.urls.defaults import * from django.contrib import admin admin.autodiscover() urlpatterns = patterns('', (r'^admin/(.*)', admin.site.root), (r'^publication/', include('stuff.publications.urls')), (r'^file/', include('stuff.files.urls')), (r'^photo/', include('stuff.pica...
<commit_before>import settings from django.conf.urls.defaults import * from django.contrib import admin admin.autodiscover() urlpatterns = patterns('', (r'^admin/(.*)', admin.site.root), (r'^publication/', include('stuff.publications.urls')), (r'^file/', include('stuff.files.urls')), (r'^photo/', incl...
174d9862242cecdf89c3fd398b93e805e49dea44
tinned_django/manage.py
tinned_django/manage.py
#!/usr/bin/env python """ Default manage.py for django-configurations """ import os import sys if __name__ == "__main__": os.environ.setdefault("DJANGO_SETTINGS_MODULE", "{{ project_name }}.settings") os.environ.setdefault("DJANGO_CONFIGURATION", "Development") from configurations.management import ex...
#!/usr/bin/env python """ Default manage.py for django-configurations """ import os import sys if __name__ == "__main__": os.environ.setdefault("DJANGO_SETTINGS_MODULE", "{{ project_name }}.settings") os.environ.setdefault("DJANGO_CONFIGURATION", "Development") if len(sys.argv) > 1 and sys.argv[1] == ...
Set up test environment when launching tests.
Set up test environment when launching tests.
Python
mit
futurecolors/tinned-django,futurecolors/tinned-django
#!/usr/bin/env python """ Default manage.py for django-configurations """ import os import sys if __name__ == "__main__": os.environ.setdefault("DJANGO_SETTINGS_MODULE", "{{ project_name }}.settings") os.environ.setdefault("DJANGO_CONFIGURATION", "Development") from configurations.management import ex...
#!/usr/bin/env python """ Default manage.py for django-configurations """ import os import sys if __name__ == "__main__": os.environ.setdefault("DJANGO_SETTINGS_MODULE", "{{ project_name }}.settings") os.environ.setdefault("DJANGO_CONFIGURATION", "Development") if len(sys.argv) > 1 and sys.argv[1] == ...
<commit_before>#!/usr/bin/env python """ Default manage.py for django-configurations """ import os import sys if __name__ == "__main__": os.environ.setdefault("DJANGO_SETTINGS_MODULE", "{{ project_name }}.settings") os.environ.setdefault("DJANGO_CONFIGURATION", "Development") from configurations.manag...
#!/usr/bin/env python """ Default manage.py for django-configurations """ import os import sys if __name__ == "__main__": os.environ.setdefault("DJANGO_SETTINGS_MODULE", "{{ project_name }}.settings") os.environ.setdefault("DJANGO_CONFIGURATION", "Development") if len(sys.argv) > 1 and sys.argv[1] == ...
#!/usr/bin/env python """ Default manage.py for django-configurations """ import os import sys if __name__ == "__main__": os.environ.setdefault("DJANGO_SETTINGS_MODULE", "{{ project_name }}.settings") os.environ.setdefault("DJANGO_CONFIGURATION", "Development") from configurations.management import ex...
<commit_before>#!/usr/bin/env python """ Default manage.py for django-configurations """ import os import sys if __name__ == "__main__": os.environ.setdefault("DJANGO_SETTINGS_MODULE", "{{ project_name }}.settings") os.environ.setdefault("DJANGO_CONFIGURATION", "Development") from configurations.manag...
fece65159abe5d581523108dc1fcd0be462a6f36
vanth/main.py
vanth/main.py
import logging import os import chryso.connection import sepiida.config import sepiida.log import vanth.config import vanth.server import vanth.tables LOGGER = logging.getLogger(__name__) def create_application(config): sepiida.log.setup_logging() engine = chryso.connection.Engine(config.db, vanth.tables) ...
import logging import os import chryso.connection import sepiida.config import sepiida.log import vanth.config import vanth.server import vanth.tables LOGGER = logging.getLogger(__name__) def create_application(config): sepiida.log.setup_logging() engine = chryso.connection.Engine(config.db, vanth.tables) ...
Make CORS debug logs go quiet
Make CORS debug logs go quiet Otherwise I'm just inundated with them and I'm rarely debugging CORS
Python
agpl-3.0
EliRibble/vanth,EliRibble/vanth,EliRibble/vanth,EliRibble/vanth
import logging import os import chryso.connection import sepiida.config import sepiida.log import vanth.config import vanth.server import vanth.tables LOGGER = logging.getLogger(__name__) def create_application(config): sepiida.log.setup_logging() engine = chryso.connection.Engine(config.db, vanth.tables) ...
import logging import os import chryso.connection import sepiida.config import sepiida.log import vanth.config import vanth.server import vanth.tables LOGGER = logging.getLogger(__name__) def create_application(config): sepiida.log.setup_logging() engine = chryso.connection.Engine(config.db, vanth.tables) ...
<commit_before>import logging import os import chryso.connection import sepiida.config import sepiida.log import vanth.config import vanth.server import vanth.tables LOGGER = logging.getLogger(__name__) def create_application(config): sepiida.log.setup_logging() engine = chryso.connection.Engine(config.db, ...
import logging import os import chryso.connection import sepiida.config import sepiida.log import vanth.config import vanth.server import vanth.tables LOGGER = logging.getLogger(__name__) def create_application(config): sepiida.log.setup_logging() engine = chryso.connection.Engine(config.db, vanth.tables) ...
import logging import os import chryso.connection import sepiida.config import sepiida.log import vanth.config import vanth.server import vanth.tables LOGGER = logging.getLogger(__name__) def create_application(config): sepiida.log.setup_logging() engine = chryso.connection.Engine(config.db, vanth.tables) ...
<commit_before>import logging import os import chryso.connection import sepiida.config import sepiida.log import vanth.config import vanth.server import vanth.tables LOGGER = logging.getLogger(__name__) def create_application(config): sepiida.log.setup_logging() engine = chryso.connection.Engine(config.db, ...
d924415639e4ac39faa68d3cfd1696dd9ca30ddc
views/base.py
views/base.py
from django.http import HttpResponseRedirect from django.shortcuts import render_to_response from django.template import RequestContext from feincms.models import Page def handler(request, path=None): if path is None: path = request.path page = Page.objects.page_for_path_or_404(path) if page.re...
from django.http import HttpResponseRedirect from django.shortcuts import render_to_response from django.template import RequestContext from django.utils import translation from feincms.models import Page def handler(request, path=None): if path is None: path = request.path page = Page.objects.page_...
Set the current language from the page
Set the current language from the page
Python
bsd-3-clause
nickburlett/feincms,michaelkuty/feincms,pjdelport/feincms,hgrimelid/feincms,nickburlett/feincms,joshuajonah/feincms,pjdelport/feincms,joshuajonah/feincms,matthiask/django-content-editor,matthiask/django-content-editor,hgrimelid/feincms,michaelkuty/feincms,michaelkuty/feincms,nickburlett/feincms,mjl/feincms,matthiask/dj...
from django.http import HttpResponseRedirect from django.shortcuts import render_to_response from django.template import RequestContext from feincms.models import Page def handler(request, path=None): if path is None: path = request.path page = Page.objects.page_for_path_or_404(path) if page.re...
from django.http import HttpResponseRedirect from django.shortcuts import render_to_response from django.template import RequestContext from django.utils import translation from feincms.models import Page def handler(request, path=None): if path is None: path = request.path page = Page.objects.page_...
<commit_before>from django.http import HttpResponseRedirect from django.shortcuts import render_to_response from django.template import RequestContext from feincms.models import Page def handler(request, path=None): if path is None: path = request.path page = Page.objects.page_for_path_or_404(path) ...
from django.http import HttpResponseRedirect from django.shortcuts import render_to_response from django.template import RequestContext from django.utils import translation from feincms.models import Page def handler(request, path=None): if path is None: path = request.path page = Page.objects.page_...
from django.http import HttpResponseRedirect from django.shortcuts import render_to_response from django.template import RequestContext from feincms.models import Page def handler(request, path=None): if path is None: path = request.path page = Page.objects.page_for_path_or_404(path) if page.re...
<commit_before>from django.http import HttpResponseRedirect from django.shortcuts import render_to_response from django.template import RequestContext from feincms.models import Page def handler(request, path=None): if path is None: path = request.path page = Page.objects.page_for_path_or_404(path) ...
fecb2f71aa6ded8fe22a926c5dfc4c46024c30b3
currencies/templatetags/currency.py
currencies/templatetags/currency.py
from django import template from django.template.defaultfilters import stringfilter from currencies.models import Currency from currencies.utils import calculate_price register = template.Library() @register.filter(name='currency') @stringfilter def set_currency(value, arg): return calculate_price(value, arg) ...
from django import template from django.template.defaultfilters import stringfilter from currencies.models import Currency from currencies.utils import calculate_price register = template.Library() @register.filter(name='currency') @stringfilter def set_currency(value, arg): return calculate_price(value, arg) ...
Use new-style exceptions in a TemplateSyntaxError
Use new-style exceptions in a TemplateSyntaxError
Python
bsd-3-clause
pathakamit88/django-currencies,mysociety/django-currencies,panosl/django-currencies,barseghyanartur/django-currencies,mysociety/django-currencies,panosl/django-currencies,racitup/django-currencies,marcosalcazar/django-currencies,marcosalcazar/django-currencies,pathakamit88/django-currencies,ydaniv/django-currencies,rac...
from django import template from django.template.defaultfilters import stringfilter from currencies.models import Currency from currencies.utils import calculate_price register = template.Library() @register.filter(name='currency') @stringfilter def set_currency(value, arg): return calculate_price(value, arg) ...
from django import template from django.template.defaultfilters import stringfilter from currencies.models import Currency from currencies.utils import calculate_price register = template.Library() @register.filter(name='currency') @stringfilter def set_currency(value, arg): return calculate_price(value, arg) ...
<commit_before>from django import template from django.template.defaultfilters import stringfilter from currencies.models import Currency from currencies.utils import calculate_price register = template.Library() @register.filter(name='currency') @stringfilter def set_currency(value, arg): return calculate_price...
from django import template from django.template.defaultfilters import stringfilter from currencies.models import Currency from currencies.utils import calculate_price register = template.Library() @register.filter(name='currency') @stringfilter def set_currency(value, arg): return calculate_price(value, arg) ...
from django import template from django.template.defaultfilters import stringfilter from currencies.models import Currency from currencies.utils import calculate_price register = template.Library() @register.filter(name='currency') @stringfilter def set_currency(value, arg): return calculate_price(value, arg) ...
<commit_before>from django import template from django.template.defaultfilters import stringfilter from currencies.models import Currency from currencies.utils import calculate_price register = template.Library() @register.filter(name='currency') @stringfilter def set_currency(value, arg): return calculate_price...
4ca25c413494d43b9ecebcebca0ea79b213992a3
test_suite.py
test_suite.py
import os os.environ['DJANGO_SETTINGS_MODULE'] = 'tests.settings' import django # noqa if django.__version__ >= (1, 7): django.setup() from django.core import management # noqa management.call_command('test', 'tests')
import os os.environ['DJANGO_SETTINGS_MODULE'] = 'tests.settings' import django # noqa if django.VERSION >= (1, 7): django.setup() from django.core import management # noqa management.call_command('test', 'tests')
Fix name of Django version attribute
Fix name of Django version attribute Signed-off-by: Byron Ruth <[email protected]>
Python
bsd-2-clause
bruth/django-preserialize,scottp-dpaw/django-preserialize
import os os.environ['DJANGO_SETTINGS_MODULE'] = 'tests.settings' import django # noqa if django.__version__ >= (1, 7): django.setup() from django.core import management # noqa management.call_command('test', 'tests') Fix name of Django version attribute Signed-off-by: Byron Ruth <e9d71f5ee7c92d6dc9e92ffda...
import os os.environ['DJANGO_SETTINGS_MODULE'] = 'tests.settings' import django # noqa if django.VERSION >= (1, 7): django.setup() from django.core import management # noqa management.call_command('test', 'tests')
<commit_before>import os os.environ['DJANGO_SETTINGS_MODULE'] = 'tests.settings' import django # noqa if django.__version__ >= (1, 7): django.setup() from django.core import management # noqa management.call_command('test', 'tests') <commit_msg>Fix name of Django version attribute Signed-off-by: Byron Ruth...
import os os.environ['DJANGO_SETTINGS_MODULE'] = 'tests.settings' import django # noqa if django.VERSION >= (1, 7): django.setup() from django.core import management # noqa management.call_command('test', 'tests')
import os os.environ['DJANGO_SETTINGS_MODULE'] = 'tests.settings' import django # noqa if django.__version__ >= (1, 7): django.setup() from django.core import management # noqa management.call_command('test', 'tests') Fix name of Django version attribute Signed-off-by: Byron Ruth <e9d71f5ee7c92d6dc9e92ffda...
<commit_before>import os os.environ['DJANGO_SETTINGS_MODULE'] = 'tests.settings' import django # noqa if django.__version__ >= (1, 7): django.setup() from django.core import management # noqa management.call_command('test', 'tests') <commit_msg>Fix name of Django version attribute Signed-off-by: Byron Ruth...
22e1ce2348264ac2774697e5c56523dbd1b85b14
bmi_tester/tests_pytest/conftest.py
bmi_tester/tests_pytest/conftest.py
import os import pytest from scripting.contexts import cd from . import Bmi, INPUT_FILE from .utils import all_grids, all_names, out_names, strictly_input_names @pytest.fixture(scope='module') def new_bmi(infile=None): try: with open('.ROOT_DIR', 'r') as fp: root_dir = fp.read() except I...
import os import pytest from scripting.contexts import cd from . import Bmi, INPUT_FILE from .utils import all_grids, all_names, out_names, strictly_input_names @pytest.fixture def new_bmi(infile=None): try: with open('.ROOT_DIR', 'r') as fp: root_dir = fp.read() except IOError: ...
Change new_bmi fixture scope to be function level.
Change new_bmi fixture scope to be function level.
Python
mit
csdms/bmi-tester
import os import pytest from scripting.contexts import cd from . import Bmi, INPUT_FILE from .utils import all_grids, all_names, out_names, strictly_input_names @pytest.fixture(scope='module') def new_bmi(infile=None): try: with open('.ROOT_DIR', 'r') as fp: root_dir = fp.read() except I...
import os import pytest from scripting.contexts import cd from . import Bmi, INPUT_FILE from .utils import all_grids, all_names, out_names, strictly_input_names @pytest.fixture def new_bmi(infile=None): try: with open('.ROOT_DIR', 'r') as fp: root_dir = fp.read() except IOError: ...
<commit_before>import os import pytest from scripting.contexts import cd from . import Bmi, INPUT_FILE from .utils import all_grids, all_names, out_names, strictly_input_names @pytest.fixture(scope='module') def new_bmi(infile=None): try: with open('.ROOT_DIR', 'r') as fp: root_dir = fp.read...
import os import pytest from scripting.contexts import cd from . import Bmi, INPUT_FILE from .utils import all_grids, all_names, out_names, strictly_input_names @pytest.fixture def new_bmi(infile=None): try: with open('.ROOT_DIR', 'r') as fp: root_dir = fp.read() except IOError: ...
import os import pytest from scripting.contexts import cd from . import Bmi, INPUT_FILE from .utils import all_grids, all_names, out_names, strictly_input_names @pytest.fixture(scope='module') def new_bmi(infile=None): try: with open('.ROOT_DIR', 'r') as fp: root_dir = fp.read() except I...
<commit_before>import os import pytest from scripting.contexts import cd from . import Bmi, INPUT_FILE from .utils import all_grids, all_names, out_names, strictly_input_names @pytest.fixture(scope='module') def new_bmi(infile=None): try: with open('.ROOT_DIR', 'r') as fp: root_dir = fp.read...
c0355c30b6c7fe18a240a52656639a27b86d8528
examples/web/basecontrollers.py
examples/web/basecontrollers.py
#!/usr/bin/env python from circuits.web import expose, Server from circuits.web.controllers import BaseController class Root(BaseController): @expose("index") def index(self): return "Hello World!" (Server(9000) + Root()).run()
#!/usr/bin/env python from circuits.web import expose, Server from circuits.web.controllers import BaseController class Root(BaseController): @expose("index") def index(self): return "Hello World!" (Server(8000) + Root()).run()
Change default port to 8000
examples/web/basecontroller: Change default port to 8000
Python
mit
eriol/circuits,treemo/circuits,treemo/circuits,eriol/circuits,eriol/circuits,treemo/circuits,nizox/circuits
#!/usr/bin/env python from circuits.web import expose, Server from circuits.web.controllers import BaseController class Root(BaseController): @expose("index") def index(self): return "Hello World!" (Server(9000) + Root()).run() examples/web/basecontroller: Change default port to 8000
#!/usr/bin/env python from circuits.web import expose, Server from circuits.web.controllers import BaseController class Root(BaseController): @expose("index") def index(self): return "Hello World!" (Server(8000) + Root()).run()
<commit_before>#!/usr/bin/env python from circuits.web import expose, Server from circuits.web.controllers import BaseController class Root(BaseController): @expose("index") def index(self): return "Hello World!" (Server(9000) + Root()).run() <commit_msg>examples/web/basecontroller: Change default p...
#!/usr/bin/env python from circuits.web import expose, Server from circuits.web.controllers import BaseController class Root(BaseController): @expose("index") def index(self): return "Hello World!" (Server(8000) + Root()).run()
#!/usr/bin/env python from circuits.web import expose, Server from circuits.web.controllers import BaseController class Root(BaseController): @expose("index") def index(self): return "Hello World!" (Server(9000) + Root()).run() examples/web/basecontroller: Change default port to 8000#!/usr/bin/env p...
<commit_before>#!/usr/bin/env python from circuits.web import expose, Server from circuits.web.controllers import BaseController class Root(BaseController): @expose("index") def index(self): return "Hello World!" (Server(9000) + Root()).run() <commit_msg>examples/web/basecontroller: Change default p...
96329106d5b35ec9071d7695a13176ccee8e8ef1
face_off/settings/production.py
face_off/settings/production.py
from .base import * import dj_database_url if os.environ.get('DEBUG') == 'False': DEBUG = False else: DEBUG = True try: from .local import * except ImportError: pass ADMINS = ADMINS + ( ) ALLOWED_HOSTS = ['*'] DATABASES = {'default': dj_database_url.config()} SOCIAL_AUTH_YAMMER_KEY = os.environ.g...
from .base import * import dj_database_url if os.environ.get('DEBUG') == 'False': DEBUG = False else: DEBUG = True try: from .local import * except ImportError: pass ADMINS = ADMINS + ( ) ALLOWED_HOSTS = ['*'] DATABASES = {'default': dj_database_url.config()} SOCIAL_AUTH_YAMMER_KEY = os.environ.g...
Add support for https redirect
Add support for https redirect
Python
cc0-1.0
excellalabs/face-off,m3brown/face_it,m3brown/face_it,excellalabs/face-off,m3brown/face_it,excellalabs/face-off,excellalabs/face-off,m3brown/face_it
from .base import * import dj_database_url if os.environ.get('DEBUG') == 'False': DEBUG = False else: DEBUG = True try: from .local import * except ImportError: pass ADMINS = ADMINS + ( ) ALLOWED_HOSTS = ['*'] DATABASES = {'default': dj_database_url.config()} SOCIAL_AUTH_YAMMER_KEY = os.environ.g...
from .base import * import dj_database_url if os.environ.get('DEBUG') == 'False': DEBUG = False else: DEBUG = True try: from .local import * except ImportError: pass ADMINS = ADMINS + ( ) ALLOWED_HOSTS = ['*'] DATABASES = {'default': dj_database_url.config()} SOCIAL_AUTH_YAMMER_KEY = os.environ.g...
<commit_before>from .base import * import dj_database_url if os.environ.get('DEBUG') == 'False': DEBUG = False else: DEBUG = True try: from .local import * except ImportError: pass ADMINS = ADMINS + ( ) ALLOWED_HOSTS = ['*'] DATABASES = {'default': dj_database_url.config()} SOCIAL_AUTH_YAMMER_KEY...
from .base import * import dj_database_url if os.environ.get('DEBUG') == 'False': DEBUG = False else: DEBUG = True try: from .local import * except ImportError: pass ADMINS = ADMINS + ( ) ALLOWED_HOSTS = ['*'] DATABASES = {'default': dj_database_url.config()} SOCIAL_AUTH_YAMMER_KEY = os.environ.g...
from .base import * import dj_database_url if os.environ.get('DEBUG') == 'False': DEBUG = False else: DEBUG = True try: from .local import * except ImportError: pass ADMINS = ADMINS + ( ) ALLOWED_HOSTS = ['*'] DATABASES = {'default': dj_database_url.config()} SOCIAL_AUTH_YAMMER_KEY = os.environ.g...
<commit_before>from .base import * import dj_database_url if os.environ.get('DEBUG') == 'False': DEBUG = False else: DEBUG = True try: from .local import * except ImportError: pass ADMINS = ADMINS + ( ) ALLOWED_HOSTS = ['*'] DATABASES = {'default': dj_database_url.config()} SOCIAL_AUTH_YAMMER_KEY...
a6cb8d3c2d79b609a6d5d0550af57aa2b9328f7f
mopidy_vkontakte/actor.py
mopidy_vkontakte/actor.py
from __future__ import unicode_literals import logging import pykka from mopidy.backends import base from .library import VKLibraryProvider from .playlists import VKPlaylistsProvider from .session import VKSession logger = logging.getLogger('mopidy.backends.vkontakte.actor') class VKBackend(pykka.ThreadingActor,...
from __future__ import unicode_literals import logging import pykka from mopidy.backends import base from .library import VKLibraryProvider from .playlists import VKPlaylistsProvider from .session import VKSession logger = logging.getLogger('mopidy.backends.vkontakte.actor') class VKBackend(pykka.ThreadingActor,...
Remove PlaybackProvider that does nothing
Remove PlaybackProvider that does nothing
Python
apache-2.0
sibuser/mopidy-vkontakte
from __future__ import unicode_literals import logging import pykka from mopidy.backends import base from .library import VKLibraryProvider from .playlists import VKPlaylistsProvider from .session import VKSession logger = logging.getLogger('mopidy.backends.vkontakte.actor') class VKBackend(pykka.ThreadingActor,...
from __future__ import unicode_literals import logging import pykka from mopidy.backends import base from .library import VKLibraryProvider from .playlists import VKPlaylistsProvider from .session import VKSession logger = logging.getLogger('mopidy.backends.vkontakte.actor') class VKBackend(pykka.ThreadingActor,...
<commit_before>from __future__ import unicode_literals import logging import pykka from mopidy.backends import base from .library import VKLibraryProvider from .playlists import VKPlaylistsProvider from .session import VKSession logger = logging.getLogger('mopidy.backends.vkontakte.actor') class VKBackend(pykka....
from __future__ import unicode_literals import logging import pykka from mopidy.backends import base from .library import VKLibraryProvider from .playlists import VKPlaylistsProvider from .session import VKSession logger = logging.getLogger('mopidy.backends.vkontakte.actor') class VKBackend(pykka.ThreadingActor,...
from __future__ import unicode_literals import logging import pykka from mopidy.backends import base from .library import VKLibraryProvider from .playlists import VKPlaylistsProvider from .session import VKSession logger = logging.getLogger('mopidy.backends.vkontakte.actor') class VKBackend(pykka.ThreadingActor,...
<commit_before>from __future__ import unicode_literals import logging import pykka from mopidy.backends import base from .library import VKLibraryProvider from .playlists import VKPlaylistsProvider from .session import VKSession logger = logging.getLogger('mopidy.backends.vkontakte.actor') class VKBackend(pykka....
fc762ed1183e5a6a97e0ed6d823227bf486c951e
ovp_organizations/serializers.py
ovp_organizations/serializers.py
from django.core.exceptions import ValidationError from ovp_core import validators as core_validators from ovp_core.serializers import GoogleAddressSerializer, GoogleAddressCityStateSerializer from ovp_organizations import models from rest_framework import serializers from rest_framework import permissions class Or...
from django.core.exceptions import ValidationError from ovp_core import validators as core_validators from ovp_core.serializers import GoogleAddressSerializer, GoogleAddressCityStateSerializer from ovp_organizations import models from rest_framework import serializers from rest_framework import permissions class Or...
Make address not required on OrganizationSerializer
Make address not required on OrganizationSerializer
Python
agpl-3.0
OpenVolunteeringPlatform/django-ovp-organizations,OpenVolunteeringPlatform/django-ovp-organizations
from django.core.exceptions import ValidationError from ovp_core import validators as core_validators from ovp_core.serializers import GoogleAddressSerializer, GoogleAddressCityStateSerializer from ovp_organizations import models from rest_framework import serializers from rest_framework import permissions class Or...
from django.core.exceptions import ValidationError from ovp_core import validators as core_validators from ovp_core.serializers import GoogleAddressSerializer, GoogleAddressCityStateSerializer from ovp_organizations import models from rest_framework import serializers from rest_framework import permissions class Or...
<commit_before>from django.core.exceptions import ValidationError from ovp_core import validators as core_validators from ovp_core.serializers import GoogleAddressSerializer, GoogleAddressCityStateSerializer from ovp_organizations import models from rest_framework import serializers from rest_framework import permis...
from django.core.exceptions import ValidationError from ovp_core import validators as core_validators from ovp_core.serializers import GoogleAddressSerializer, GoogleAddressCityStateSerializer from ovp_organizations import models from rest_framework import serializers from rest_framework import permissions class Or...
from django.core.exceptions import ValidationError from ovp_core import validators as core_validators from ovp_core.serializers import GoogleAddressSerializer, GoogleAddressCityStateSerializer from ovp_organizations import models from rest_framework import serializers from rest_framework import permissions class Or...
<commit_before>from django.core.exceptions import ValidationError from ovp_core import validators as core_validators from ovp_core.serializers import GoogleAddressSerializer, GoogleAddressCityStateSerializer from ovp_organizations import models from rest_framework import serializers from rest_framework import permis...
5d5098db8e5a3b60cbba77aa04035bc35e3f1726
db_logger.py
db_logger.py
import threading import time import accounts import args import config MAX_TEXT_LENGTH = 1024 enabled = bool(args.args['database']) if enabled: import MySQLdb connected = False conn = None cur = None db_lock = threading.RLock() def _connect(): global conn, cur, connected if not connected: conn ...
import threading import time import accounts import args import config import log as _log MAX_TEXT_LENGTH = 1024 enabled = bool(args.args['database']) if enabled: import MySQLdb connected = False conn = None cur = None db_lock = threading.RLock() def _connect(): global conn, cur, connected if not conne...
Write db errors to error.log
Write db errors to error.log
Python
mit
kalinochkind/vkbot,kalinochkind/vkbot,kalinochkind/vkbot
import threading import time import accounts import args import config MAX_TEXT_LENGTH = 1024 enabled = bool(args.args['database']) if enabled: import MySQLdb connected = False conn = None cur = None db_lock = threading.RLock() def _connect(): global conn, cur, connected if not connected: conn ...
import threading import time import accounts import args import config import log as _log MAX_TEXT_LENGTH = 1024 enabled = bool(args.args['database']) if enabled: import MySQLdb connected = False conn = None cur = None db_lock = threading.RLock() def _connect(): global conn, cur, connected if not conne...
<commit_before>import threading import time import accounts import args import config MAX_TEXT_LENGTH = 1024 enabled = bool(args.args['database']) if enabled: import MySQLdb connected = False conn = None cur = None db_lock = threading.RLock() def _connect(): global conn, cur, connected if not connected...
import threading import time import accounts import args import config import log as _log MAX_TEXT_LENGTH = 1024 enabled = bool(args.args['database']) if enabled: import MySQLdb connected = False conn = None cur = None db_lock = threading.RLock() def _connect(): global conn, cur, connected if not conne...
import threading import time import accounts import args import config MAX_TEXT_LENGTH = 1024 enabled = bool(args.args['database']) if enabled: import MySQLdb connected = False conn = None cur = None db_lock = threading.RLock() def _connect(): global conn, cur, connected if not connected: conn ...
<commit_before>import threading import time import accounts import args import config MAX_TEXT_LENGTH = 1024 enabled = bool(args.args['database']) if enabled: import MySQLdb connected = False conn = None cur = None db_lock = threading.RLock() def _connect(): global conn, cur, connected if not connected...
8f162be2d682ca00a5301f0ebecfbbd6038e657a
manage.py
manage.py
# -*- coding: utf-8 -*- #!/usr/bin/env python import os import sys if __name__ == "__main__": os.environ.setdefault("DJANGO_SETTINGS_MODULE", "schoolidolapi.settings") from django.core.management import execute_from_command_line execute_from_command_line(sys.argv)
#!/usr/bin/env python # -*- coding: utf-8 -*- import os import sys if __name__ == "__main__": os.environ.setdefault("DJANGO_SETTINGS_MODULE", "schoolidolapi.settings") from django.core.management import execute_from_command_line execute_from_command_line(sys.argv)
Fix shebang and coding comment lines order
Fix shebang and coding comment lines order
Python
apache-2.0
laurenor/SchoolIdolAPI,dburr/SchoolIdolAPI,dburr/SchoolIdolAPI,rdsathene/SchoolIdolAPI,rdsathene/SchoolIdolAPI,SchoolIdolTomodachi/SchoolIdolAPI,laurenor/SchoolIdolAPI,dburr/SchoolIdolAPI,laurenor/SchoolIdolAPI,rdsathene/SchoolIdolAPI,SchoolIdolTomodachi/SchoolIdolAPI,SchoolIdolTomodachi/SchoolIdolAPI
# -*- coding: utf-8 -*- #!/usr/bin/env python import os import sys if __name__ == "__main__": os.environ.setdefault("DJANGO_SETTINGS_MODULE", "schoolidolapi.settings") from django.core.management import execute_from_command_line execute_from_command_line(sys.argv) Fix shebang and coding comment lines ord...
#!/usr/bin/env python # -*- coding: utf-8 -*- import os import sys if __name__ == "__main__": os.environ.setdefault("DJANGO_SETTINGS_MODULE", "schoolidolapi.settings") from django.core.management import execute_from_command_line execute_from_command_line(sys.argv)
<commit_before># -*- coding: utf-8 -*- #!/usr/bin/env python import os import sys if __name__ == "__main__": os.environ.setdefault("DJANGO_SETTINGS_MODULE", "schoolidolapi.settings") from django.core.management import execute_from_command_line execute_from_command_line(sys.argv) <commit_msg>Fix shebang a...
#!/usr/bin/env python # -*- coding: utf-8 -*- import os import sys if __name__ == "__main__": os.environ.setdefault("DJANGO_SETTINGS_MODULE", "schoolidolapi.settings") from django.core.management import execute_from_command_line execute_from_command_line(sys.argv)
# -*- coding: utf-8 -*- #!/usr/bin/env python import os import sys if __name__ == "__main__": os.environ.setdefault("DJANGO_SETTINGS_MODULE", "schoolidolapi.settings") from django.core.management import execute_from_command_line execute_from_command_line(sys.argv) Fix shebang and coding comment lines ord...
<commit_before># -*- coding: utf-8 -*- #!/usr/bin/env python import os import sys if __name__ == "__main__": os.environ.setdefault("DJANGO_SETTINGS_MODULE", "schoolidolapi.settings") from django.core.management import execute_from_command_line execute_from_command_line(sys.argv) <commit_msg>Fix shebang a...
a817afa1580aeb59fcbe837893c9ec8c5e7e0667
anygit/clisetup.py
anygit/clisetup.py
import logging.config import os from paste.deploy import loadapp import sys DIR = os.path.abspath(os.path.dirname(__file__)) conf = os.path.join(DIR, '../conf/anygit.ini') application = loadapp('config:%s' % conf, relative_to='/') app = loadapp('config:%s' % conf,relative_to=os.getcwd()) logging.config.fileConfig(conf...
import logging.config import os from paste.deploy import loadapp import sys DIR = os.path.abspath(os.path.dirname(__file__)) conf = os.path.join(DIR, '../conf/anygit.ini') logging.config.fileConfig(conf) application = loadapp('config:%s' % conf, relative_to='/') app = loadapp('config:%s' % conf,relative_to=os.getcwd()...
Load the logging config right away so it actually works
Load the logging config right away so it actually works
Python
mit
ebroder/anygit,ebroder/anygit
import logging.config import os from paste.deploy import loadapp import sys DIR = os.path.abspath(os.path.dirname(__file__)) conf = os.path.join(DIR, '../conf/anygit.ini') application = loadapp('config:%s' % conf, relative_to='/') app = loadapp('config:%s' % conf,relative_to=os.getcwd()) logging.config.fileConfig(conf...
import logging.config import os from paste.deploy import loadapp import sys DIR = os.path.abspath(os.path.dirname(__file__)) conf = os.path.join(DIR, '../conf/anygit.ini') logging.config.fileConfig(conf) application = loadapp('config:%s' % conf, relative_to='/') app = loadapp('config:%s' % conf,relative_to=os.getcwd()...
<commit_before>import logging.config import os from paste.deploy import loadapp import sys DIR = os.path.abspath(os.path.dirname(__file__)) conf = os.path.join(DIR, '../conf/anygit.ini') application = loadapp('config:%s' % conf, relative_to='/') app = loadapp('config:%s' % conf,relative_to=os.getcwd()) logging.config....
import logging.config import os from paste.deploy import loadapp import sys DIR = os.path.abspath(os.path.dirname(__file__)) conf = os.path.join(DIR, '../conf/anygit.ini') logging.config.fileConfig(conf) application = loadapp('config:%s' % conf, relative_to='/') app = loadapp('config:%s' % conf,relative_to=os.getcwd()...
import logging.config import os from paste.deploy import loadapp import sys DIR = os.path.abspath(os.path.dirname(__file__)) conf = os.path.join(DIR, '../conf/anygit.ini') application = loadapp('config:%s' % conf, relative_to='/') app = loadapp('config:%s' % conf,relative_to=os.getcwd()) logging.config.fileConfig(conf...
<commit_before>import logging.config import os from paste.deploy import loadapp import sys DIR = os.path.abspath(os.path.dirname(__file__)) conf = os.path.join(DIR, '../conf/anygit.ini') application = loadapp('config:%s' % conf, relative_to='/') app = loadapp('config:%s' % conf,relative_to=os.getcwd()) logging.config....
8b33cfa3e7fc39446f634d6ab45585e589a3cc85
marrow/mongo/core/document.py
marrow/mongo/core/document.py
# encoding: utf-8 from collections import OrderedDict as odict, MutableMapping from itertools import chain from marrow.schema import Container, Attribute class Document(Container): __foreign__ = 'object'
# encoding: utf-8 from collections import OrderedDict as odict, MutableMapping from itertools import chain from marrow.schema import Container, Attribute from .util import py2, SENTINEL, adjust_attribute_sequence class Document(Container): __foreign__ = 'object' # Mapping Protocol def __getitem__(self, nam...
Make compatible with direct use by pymongo.
Make compatible with direct use by pymongo. I.e. for direct passing to collection.insert()
Python
mit
marrow/mongo,djdduty/mongo,djdduty/mongo
# encoding: utf-8 from collections import OrderedDict as odict, MutableMapping from itertools import chain from marrow.schema import Container, Attribute class Document(Container): __foreign__ = 'object' Make compatible with direct use by pymongo. I.e. for direct passing to collection.insert()
# encoding: utf-8 from collections import OrderedDict as odict, MutableMapping from itertools import chain from marrow.schema import Container, Attribute from .util import py2, SENTINEL, adjust_attribute_sequence class Document(Container): __foreign__ = 'object' # Mapping Protocol def __getitem__(self, nam...
<commit_before># encoding: utf-8 from collections import OrderedDict as odict, MutableMapping from itertools import chain from marrow.schema import Container, Attribute class Document(Container): __foreign__ = 'object' <commit_msg>Make compatible with direct use by pymongo. I.e. for direct passing to collection.i...
# encoding: utf-8 from collections import OrderedDict as odict, MutableMapping from itertools import chain from marrow.schema import Container, Attribute from .util import py2, SENTINEL, adjust_attribute_sequence class Document(Container): __foreign__ = 'object' # Mapping Protocol def __getitem__(self, nam...
# encoding: utf-8 from collections import OrderedDict as odict, MutableMapping from itertools import chain from marrow.schema import Container, Attribute class Document(Container): __foreign__ = 'object' Make compatible with direct use by pymongo. I.e. for direct passing to collection.insert()# encoding: utf-8 f...
<commit_before># encoding: utf-8 from collections import OrderedDict as odict, MutableMapping from itertools import chain from marrow.schema import Container, Attribute class Document(Container): __foreign__ = 'object' <commit_msg>Make compatible with direct use by pymongo. I.e. for direct passing to collection.i...
0166d699096aa506e37b6a2df8e51f94895c0b4f
fireplace/cards/wog/neutral_rare.py
fireplace/cards/wog/neutral_rare.py
from ..utils import * ## # Minions class OG_034: "Silithid Swarmer" update = (NUM_ATTACKS_THIS_TURN(FRIENDLY_HERO) == 0) & ( Refresh(SELF, {GameTag.CANT_ATTACK: True}) ) class OG_254: "Eater of Secrets" play = ( Buff(SELF, "OG_254e") * Count(ENEMY_SECRETS), Destroy(ENEMY_SECRETS) ) OG_254e = buff(+1, ...
from ..utils import * ## # Minions class OG_034: "Silithid Swarmer" update = (NUM_ATTACKS_THIS_TURN(FRIENDLY_HERO) == 0) & ( Refresh(SELF, {GameTag.CANT_ATTACK: True}) ) class OG_147: "Corrupted Healbot" deathrattle = Heal(ENEMY_HERO, 8) class OG_161: "Corrupted Seer" play = Hit(ALL_MINIONS - MURLOC, 2)...
Implement Corrupted Healbot, Corrupted Seer, and Midnight Drake
Implement Corrupted Healbot, Corrupted Seer, and Midnight Drake
Python
agpl-3.0
NightKev/fireplace,beheh/fireplace,jleclanche/fireplace
from ..utils import * ## # Minions class OG_034: "Silithid Swarmer" update = (NUM_ATTACKS_THIS_TURN(FRIENDLY_HERO) == 0) & ( Refresh(SELF, {GameTag.CANT_ATTACK: True}) ) class OG_254: "Eater of Secrets" play = ( Buff(SELF, "OG_254e") * Count(ENEMY_SECRETS), Destroy(ENEMY_SECRETS) ) OG_254e = buff(+1, ...
from ..utils import * ## # Minions class OG_034: "Silithid Swarmer" update = (NUM_ATTACKS_THIS_TURN(FRIENDLY_HERO) == 0) & ( Refresh(SELF, {GameTag.CANT_ATTACK: True}) ) class OG_147: "Corrupted Healbot" deathrattle = Heal(ENEMY_HERO, 8) class OG_161: "Corrupted Seer" play = Hit(ALL_MINIONS - MURLOC, 2)...
<commit_before>from ..utils import * ## # Minions class OG_034: "Silithid Swarmer" update = (NUM_ATTACKS_THIS_TURN(FRIENDLY_HERO) == 0) & ( Refresh(SELF, {GameTag.CANT_ATTACK: True}) ) class OG_254: "Eater of Secrets" play = ( Buff(SELF, "OG_254e") * Count(ENEMY_SECRETS), Destroy(ENEMY_SECRETS) ) OG_2...
from ..utils import * ## # Minions class OG_034: "Silithid Swarmer" update = (NUM_ATTACKS_THIS_TURN(FRIENDLY_HERO) == 0) & ( Refresh(SELF, {GameTag.CANT_ATTACK: True}) ) class OG_147: "Corrupted Healbot" deathrattle = Heal(ENEMY_HERO, 8) class OG_161: "Corrupted Seer" play = Hit(ALL_MINIONS - MURLOC, 2)...
from ..utils import * ## # Minions class OG_034: "Silithid Swarmer" update = (NUM_ATTACKS_THIS_TURN(FRIENDLY_HERO) == 0) & ( Refresh(SELF, {GameTag.CANT_ATTACK: True}) ) class OG_254: "Eater of Secrets" play = ( Buff(SELF, "OG_254e") * Count(ENEMY_SECRETS), Destroy(ENEMY_SECRETS) ) OG_254e = buff(+1, ...
<commit_before>from ..utils import * ## # Minions class OG_034: "Silithid Swarmer" update = (NUM_ATTACKS_THIS_TURN(FRIENDLY_HERO) == 0) & ( Refresh(SELF, {GameTag.CANT_ATTACK: True}) ) class OG_254: "Eater of Secrets" play = ( Buff(SELF, "OG_254e") * Count(ENEMY_SECRETS), Destroy(ENEMY_SECRETS) ) OG_2...
35111353ab8d8cae320b49520fe693114fed160f
bin/parsers/DeploysServiceLookup.py
bin/parsers/DeploysServiceLookup.py
if 'r2' in alert['resource'].lower(): alert['service'] = [ 'R2' ] elif 'content-api' in alert['resource'].lower(): alert['service'] = [ 'ContentAPI' ] elif 'flexible' in alert['resource'].lower(): alert['service'] = [ 'FlexibleContent' ] elif 'frontend' in alert['resource'].lower(): alert['service'] = ...
if alert['resource'].startswith('R1'): alert['service'] = [ 'R1' ] elif alert['resource'].startswith('R2'): alert['service'] = [ 'R2' ] elif 'content-api' in alert['resource'].lower(): alert['service'] = [ 'ContentAPI' ] elif alert['resource'].startswith('frontend'): alert['service'] = [ 'Frontend' ] e...
Add more service lookups for Deploys
Add more service lookups for Deploys
Python
apache-2.0
guardian/alerta,0312birdzhang/alerta,skob/alerta,mrkeng/alerta,guardian/alerta,mrkeng/alerta,guardian/alerta,0312birdzhang/alerta,mrkeng/alerta,0312birdzhang/alerta,skob/alerta,skob/alerta,mrkeng/alerta,guardian/alerta,skob/alerta
if 'r2' in alert['resource'].lower(): alert['service'] = [ 'R2' ] elif 'content-api' in alert['resource'].lower(): alert['service'] = [ 'ContentAPI' ] elif 'flexible' in alert['resource'].lower(): alert['service'] = [ 'FlexibleContent' ] elif 'frontend' in alert['resource'].lower(): alert['service'] = ...
if alert['resource'].startswith('R1'): alert['service'] = [ 'R1' ] elif alert['resource'].startswith('R2'): alert['service'] = [ 'R2' ] elif 'content-api' in alert['resource'].lower(): alert['service'] = [ 'ContentAPI' ] elif alert['resource'].startswith('frontend'): alert['service'] = [ 'Frontend' ] e...
<commit_before> if 'r2' in alert['resource'].lower(): alert['service'] = [ 'R2' ] elif 'content-api' in alert['resource'].lower(): alert['service'] = [ 'ContentAPI' ] elif 'flexible' in alert['resource'].lower(): alert['service'] = [ 'FlexibleContent' ] elif 'frontend' in alert['resource'].lower(): aler...
if alert['resource'].startswith('R1'): alert['service'] = [ 'R1' ] elif alert['resource'].startswith('R2'): alert['service'] = [ 'R2' ] elif 'content-api' in alert['resource'].lower(): alert['service'] = [ 'ContentAPI' ] elif alert['resource'].startswith('frontend'): alert['service'] = [ 'Frontend' ] e...
if 'r2' in alert['resource'].lower(): alert['service'] = [ 'R2' ] elif 'content-api' in alert['resource'].lower(): alert['service'] = [ 'ContentAPI' ] elif 'flexible' in alert['resource'].lower(): alert['service'] = [ 'FlexibleContent' ] elif 'frontend' in alert['resource'].lower(): alert['service'] = ...
<commit_before> if 'r2' in alert['resource'].lower(): alert['service'] = [ 'R2' ] elif 'content-api' in alert['resource'].lower(): alert['service'] = [ 'ContentAPI' ] elif 'flexible' in alert['resource'].lower(): alert['service'] = [ 'FlexibleContent' ] elif 'frontend' in alert['resource'].lower(): aler...
373e4628f248b9ce2cc9e5cb271dc2640208ff05
bluebottle/notifications/signals.py
bluebottle/notifications/signals.py
from django.core.exceptions import ValidationError from django.dispatch import receiver from django.forms.models import model_to_dict from django_fsm import pre_transition, post_transition @receiver(pre_transition) def validate_transition_form(sender, instance, name, method_kwargs, **kwargs): transition = method...
from django.core.exceptions import ValidationError from django.dispatch import receiver from django.forms.models import model_to_dict from django_fsm import pre_transition, post_transition @receiver(pre_transition) def validate_transition_form(sender, instance, name=None, method_kwargs=None, **kwargs): if not me...
Fix for weird signal we send ourselves
Fix for weird signal we send ourselves
Python
bsd-3-clause
onepercentclub/bluebottle,onepercentclub/bluebottle,onepercentclub/bluebottle,onepercentclub/bluebottle,onepercentclub/bluebottle
from django.core.exceptions import ValidationError from django.dispatch import receiver from django.forms.models import model_to_dict from django_fsm import pre_transition, post_transition @receiver(pre_transition) def validate_transition_form(sender, instance, name, method_kwargs, **kwargs): transition = method...
from django.core.exceptions import ValidationError from django.dispatch import receiver from django.forms.models import model_to_dict from django_fsm import pre_transition, post_transition @receiver(pre_transition) def validate_transition_form(sender, instance, name=None, method_kwargs=None, **kwargs): if not me...
<commit_before>from django.core.exceptions import ValidationError from django.dispatch import receiver from django.forms.models import model_to_dict from django_fsm import pre_transition, post_transition @receiver(pre_transition) def validate_transition_form(sender, instance, name, method_kwargs, **kwargs): tran...
from django.core.exceptions import ValidationError from django.dispatch import receiver from django.forms.models import model_to_dict from django_fsm import pre_transition, post_transition @receiver(pre_transition) def validate_transition_form(sender, instance, name=None, method_kwargs=None, **kwargs): if not me...
from django.core.exceptions import ValidationError from django.dispatch import receiver from django.forms.models import model_to_dict from django_fsm import pre_transition, post_transition @receiver(pre_transition) def validate_transition_form(sender, instance, name, method_kwargs, **kwargs): transition = method...
<commit_before>from django.core.exceptions import ValidationError from django.dispatch import receiver from django.forms.models import model_to_dict from django_fsm import pre_transition, post_transition @receiver(pre_transition) def validate_transition_form(sender, instance, name, method_kwargs, **kwargs): tran...
ef72ce81c2d51cf99e44041a871a82c512badb8c
people/serializers.py
people/serializers.py
from rest_framework import serializers from people.models import Customer from people.models import InternalUser class CustomerSerializer(serializers.ModelSerializer): class Meta: model = Customer fields = '__all__' class InternalUserSerializer(serializers.ModelSerializer): class Meta: ...
from rest_framework import serializers from people.models import Customer from people.models import InternalUser class CustomerSerializer(serializers.ModelSerializer): phone_number = serializers.IntegerField(validators=[lambda x: len(str(x)) == 10]) class Meta: model = Customer fields = '__al...
Make the phone number an int
Make the phone number an int
Python
apache-2.0
rameshgopalakrishnan/v_excel_inventory,rameshgopalakrishnan/v_excel_inventory,rameshgopalakrishnan/v_excel_inventory
from rest_framework import serializers from people.models import Customer from people.models import InternalUser class CustomerSerializer(serializers.ModelSerializer): class Meta: model = Customer fields = '__all__' class InternalUserSerializer(serializers.ModelSerializer): class Meta: ...
from rest_framework import serializers from people.models import Customer from people.models import InternalUser class CustomerSerializer(serializers.ModelSerializer): phone_number = serializers.IntegerField(validators=[lambda x: len(str(x)) == 10]) class Meta: model = Customer fields = '__al...
<commit_before>from rest_framework import serializers from people.models import Customer from people.models import InternalUser class CustomerSerializer(serializers.ModelSerializer): class Meta: model = Customer fields = '__all__' class InternalUserSerializer(serializers.ModelSerializer): c...
from rest_framework import serializers from people.models import Customer from people.models import InternalUser class CustomerSerializer(serializers.ModelSerializer): phone_number = serializers.IntegerField(validators=[lambda x: len(str(x)) == 10]) class Meta: model = Customer fields = '__al...
from rest_framework import serializers from people.models import Customer from people.models import InternalUser class CustomerSerializer(serializers.ModelSerializer): class Meta: model = Customer fields = '__all__' class InternalUserSerializer(serializers.ModelSerializer): class Meta: ...
<commit_before>from rest_framework import serializers from people.models import Customer from people.models import InternalUser class CustomerSerializer(serializers.ModelSerializer): class Meta: model = Customer fields = '__all__' class InternalUserSerializer(serializers.ModelSerializer): c...
9a4cf8d594708ef57e41113bad4c76f26f3adc13
apps/accounts/managers.py
apps/accounts/managers.py
""" Objects managers for the user accounts app. """ from django.db import models class UserProfileManager(models.Manager): """ Manager class for the ``UserProfile`` data model. """ def get_subscribers_for_newsletter(self): """ Return a queryset of all users accepting to receive the n...
""" Objects managers for the user accounts app. """ import datetime from django.db import models from django.utils import timezone from .settings import ONLINE_USER_TIME_WINDOW_SECONDS class UserProfileManager(models.Manager): """ Manager class for the ``UserProfile`` data model. """ def get_subsc...
Move the get_online_users and get_active_users methods to the manager class.
Move the get_online_users and get_active_users methods to the manager class.
Python
agpl-3.0
TamiaLab/carnetdumaker,TamiaLab/carnetdumaker,TamiaLab/carnetdumaker,TamiaLab/carnetdumaker
""" Objects managers for the user accounts app. """ from django.db import models class UserProfileManager(models.Manager): """ Manager class for the ``UserProfile`` data model. """ def get_subscribers_for_newsletter(self): """ Return a queryset of all users accepting to receive the n...
""" Objects managers for the user accounts app. """ import datetime from django.db import models from django.utils import timezone from .settings import ONLINE_USER_TIME_WINDOW_SECONDS class UserProfileManager(models.Manager): """ Manager class for the ``UserProfile`` data model. """ def get_subsc...
<commit_before>""" Objects managers for the user accounts app. """ from django.db import models class UserProfileManager(models.Manager): """ Manager class for the ``UserProfile`` data model. """ def get_subscribers_for_newsletter(self): """ Return a queryset of all users accepting t...
""" Objects managers for the user accounts app. """ import datetime from django.db import models from django.utils import timezone from .settings import ONLINE_USER_TIME_WINDOW_SECONDS class UserProfileManager(models.Manager): """ Manager class for the ``UserProfile`` data model. """ def get_subsc...
""" Objects managers for the user accounts app. """ from django.db import models class UserProfileManager(models.Manager): """ Manager class for the ``UserProfile`` data model. """ def get_subscribers_for_newsletter(self): """ Return a queryset of all users accepting to receive the n...
<commit_before>""" Objects managers for the user accounts app. """ from django.db import models class UserProfileManager(models.Manager): """ Manager class for the ``UserProfile`` data model. """ def get_subscribers_for_newsletter(self): """ Return a queryset of all users accepting t...
38d1631872d9987b8241a020934560e053aa23b0
api/middleware.py
api/middleware.py
class AddResponseHeader: def process_response(self, req, resp, resource): resp.set_header('Access-Control-Allow-Origin', 'http://localhost:8000') resp.set_header('Access-Control-Allow-Methods', 'GET, POST, PUT') resp.set_header('Access-Control-Allow-Headers', 'Content-Type') components = [A...
class AddResponseHeader: def process_response(self, req, resp, resource): resp.set_header('Access-Control-Allow-Origin', 'http://localhost:8000') resp.set_header('Access-Control-Allow-Methods', 'GET, POST, PUT, DELETE') resp.set_header('Access-Control-Allow-Headers', 'Content-Type') compone...
Add DELETE to CORS header
Add DELETE to CORS header
Python
mit
thepoly/Pipeline,thepoly/Pipeline,thepoly/Pipeline,thepoly/Pipeline,thepoly/Pipeline
class AddResponseHeader: def process_response(self, req, resp, resource): resp.set_header('Access-Control-Allow-Origin', 'http://localhost:8000') resp.set_header('Access-Control-Allow-Methods', 'GET, POST, PUT') resp.set_header('Access-Control-Allow-Headers', 'Content-Type') components = [A...
class AddResponseHeader: def process_response(self, req, resp, resource): resp.set_header('Access-Control-Allow-Origin', 'http://localhost:8000') resp.set_header('Access-Control-Allow-Methods', 'GET, POST, PUT, DELETE') resp.set_header('Access-Control-Allow-Headers', 'Content-Type') compone...
<commit_before>class AddResponseHeader: def process_response(self, req, resp, resource): resp.set_header('Access-Control-Allow-Origin', 'http://localhost:8000') resp.set_header('Access-Control-Allow-Methods', 'GET, POST, PUT') resp.set_header('Access-Control-Allow-Headers', 'Content-Type') ...
class AddResponseHeader: def process_response(self, req, resp, resource): resp.set_header('Access-Control-Allow-Origin', 'http://localhost:8000') resp.set_header('Access-Control-Allow-Methods', 'GET, POST, PUT, DELETE') resp.set_header('Access-Control-Allow-Headers', 'Content-Type') compone...
class AddResponseHeader: def process_response(self, req, resp, resource): resp.set_header('Access-Control-Allow-Origin', 'http://localhost:8000') resp.set_header('Access-Control-Allow-Methods', 'GET, POST, PUT') resp.set_header('Access-Control-Allow-Headers', 'Content-Type') components = [A...
<commit_before>class AddResponseHeader: def process_response(self, req, resp, resource): resp.set_header('Access-Control-Allow-Origin', 'http://localhost:8000') resp.set_header('Access-Control-Allow-Methods', 'GET, POST, PUT') resp.set_header('Access-Control-Allow-Headers', 'Content-Type') ...
83e7a59b0571560b387ef5f175e02d9f64f3cf7e
azulejo/azulejo.py
azulejo/azulejo.py
import gtk import keybinder import configuration import logging from azulejo_controller import AzulejoController from configuration import AzulejoConfiguration def dispatcher(dis_param): (func, azulejo_obj, param) = dis_param azulejo_obj.force_update() func(azulejo_obj, param) def run(...
import gtk import keybinder import configuration import logging from azulejo_controller import AzulejoController from configuration import AzulejoConfiguration def dispatcher(dis_param): (func, azulejo_obj, param) = dis_param azulejo_obj.force_update() func(azulejo_obj, param) def run(mai...
Make running gtk.main optional for testing
Make running gtk.main optional for testing
Python
mit
johnteslade/azulejo,johnteslade/azulejo
import gtk import keybinder import configuration import logging from azulejo_controller import AzulejoController from configuration import AzulejoConfiguration def dispatcher(dis_param): (func, azulejo_obj, param) = dis_param azulejo_obj.force_update() func(azulejo_obj, param) def run(...
import gtk import keybinder import configuration import logging from azulejo_controller import AzulejoController from configuration import AzulejoConfiguration def dispatcher(dis_param): (func, azulejo_obj, param) = dis_param azulejo_obj.force_update() func(azulejo_obj, param) def run(mai...
<commit_before>import gtk import keybinder import configuration import logging from azulejo_controller import AzulejoController from configuration import AzulejoConfiguration def dispatcher(dis_param): (func, azulejo_obj, param) = dis_param azulejo_obj.force_update() func(azulejo_obj, param) ...
import gtk import keybinder import configuration import logging from azulejo_controller import AzulejoController from configuration import AzulejoConfiguration def dispatcher(dis_param): (func, azulejo_obj, param) = dis_param azulejo_obj.force_update() func(azulejo_obj, param) def run(mai...
import gtk import keybinder import configuration import logging from azulejo_controller import AzulejoController from configuration import AzulejoConfiguration def dispatcher(dis_param): (func, azulejo_obj, param) = dis_param azulejo_obj.force_update() func(azulejo_obj, param) def run(...
<commit_before>import gtk import keybinder import configuration import logging from azulejo_controller import AzulejoController from configuration import AzulejoConfiguration def dispatcher(dis_param): (func, azulejo_obj, param) = dis_param azulejo_obj.force_update() func(azulejo_obj, param) ...
9ba70ea12ce1dd1bb6363a4f86703b5bfce34732
app/settings/prod.py
app/settings/prod.py
import dj_database_url from .default import * DEBUG = False SECRET_KEY = os.getenv('DJANGO_SECRET_KEY', None) ALLOWED_HOSTS = ['agendaodonto.herokuapp.com'] DATABASES = {'default': dj_database_url.config()} CORS_ORIGIN_WHITELIST = ( 'agendaodonto.com', 'backend.agendaodonto.com', ) DJOSER['DOMAIN'] = 'age...
import dj_database_url from .default import * DEBUG = False SECRET_KEY = os.getenv('DJANGO_SECRET_KEY', None) ALLOWED_HOSTS = [ 'backend.agendaodonto.com' ] DATABASES = {'default': dj_database_url.config()} CORS_ORIGIN_WHITELIST = ( 'agendaodonto.com', 'backend.agendaodonto.com', ) DJOSER['DOMAIN'] = ...
Update allowed hosts to the new domain
fix: Update allowed hosts to the new domain
Python
agpl-3.0
agendaodonto/server,agendaodonto/server
import dj_database_url from .default import * DEBUG = False SECRET_KEY = os.getenv('DJANGO_SECRET_KEY', None) ALLOWED_HOSTS = ['agendaodonto.herokuapp.com'] DATABASES = {'default': dj_database_url.config()} CORS_ORIGIN_WHITELIST = ( 'agendaodonto.com', 'backend.agendaodonto.com', ) DJOSER['DOMAIN'] = 'age...
import dj_database_url from .default import * DEBUG = False SECRET_KEY = os.getenv('DJANGO_SECRET_KEY', None) ALLOWED_HOSTS = [ 'backend.agendaodonto.com' ] DATABASES = {'default': dj_database_url.config()} CORS_ORIGIN_WHITELIST = ( 'agendaodonto.com', 'backend.agendaodonto.com', ) DJOSER['DOMAIN'] = ...
<commit_before>import dj_database_url from .default import * DEBUG = False SECRET_KEY = os.getenv('DJANGO_SECRET_KEY', None) ALLOWED_HOSTS = ['agendaodonto.herokuapp.com'] DATABASES = {'default': dj_database_url.config()} CORS_ORIGIN_WHITELIST = ( 'agendaodonto.com', 'backend.agendaodonto.com', ) DJOSER['...
import dj_database_url from .default import * DEBUG = False SECRET_KEY = os.getenv('DJANGO_SECRET_KEY', None) ALLOWED_HOSTS = [ 'backend.agendaodonto.com' ] DATABASES = {'default': dj_database_url.config()} CORS_ORIGIN_WHITELIST = ( 'agendaodonto.com', 'backend.agendaodonto.com', ) DJOSER['DOMAIN'] = ...
import dj_database_url from .default import * DEBUG = False SECRET_KEY = os.getenv('DJANGO_SECRET_KEY', None) ALLOWED_HOSTS = ['agendaodonto.herokuapp.com'] DATABASES = {'default': dj_database_url.config()} CORS_ORIGIN_WHITELIST = ( 'agendaodonto.com', 'backend.agendaodonto.com', ) DJOSER['DOMAIN'] = 'age...
<commit_before>import dj_database_url from .default import * DEBUG = False SECRET_KEY = os.getenv('DJANGO_SECRET_KEY', None) ALLOWED_HOSTS = ['agendaodonto.herokuapp.com'] DATABASES = {'default': dj_database_url.config()} CORS_ORIGIN_WHITELIST = ( 'agendaodonto.com', 'backend.agendaodonto.com', ) DJOSER['...
1a2cd182ec709e0f7c64626a4467abf98f2951c2
analyzer/darwin/modules/packages/bash.py
analyzer/darwin/modules/packages/bash.py
#!/usr/bin/env python # Copyright (C) 2015 Dmitry Rodionov # This file is part of my GSoC'15 project for Cuckoo Sandbox: # http://www.cuckoosandbox.org # This software may be modified and distributed under the terms # of the MIT license. See the LICENSE file for details. from lib.core.packages import Package class Ba...
#!/usr/bin/env python # Copyright (C) 2015 Dmitry Rodionov # This file is part of my GSoC'15 project for Cuckoo Sandbox: # http://www.cuckoosandbox.org # This software may be modified and distributed under the terms # of the MIT license. See the LICENSE file for details. from lib.core.packages import Package class Ba...
Add support for apicalls in Bash package
Add support for apicalls in Bash package
Python
mit
cuckoobox/cuckoo,rodionovd/cuckoo-osx-analyzer,cuckoobox/cuckoo,cuckoobox/cuckoo,rodionovd/cuckoo-osx-analyzer,cuckoobox/cuckoo,cuckoobox/cuckoo,rodionovd/cuckoo-osx-analyzer
#!/usr/bin/env python # Copyright (C) 2015 Dmitry Rodionov # This file is part of my GSoC'15 project for Cuckoo Sandbox: # http://www.cuckoosandbox.org # This software may be modified and distributed under the terms # of the MIT license. See the LICENSE file for details. from lib.core.packages import Package class Ba...
#!/usr/bin/env python # Copyright (C) 2015 Dmitry Rodionov # This file is part of my GSoC'15 project for Cuckoo Sandbox: # http://www.cuckoosandbox.org # This software may be modified and distributed under the terms # of the MIT license. See the LICENSE file for details. from lib.core.packages import Package class Ba...
<commit_before>#!/usr/bin/env python # Copyright (C) 2015 Dmitry Rodionov # This file is part of my GSoC'15 project for Cuckoo Sandbox: # http://www.cuckoosandbox.org # This software may be modified and distributed under the terms # of the MIT license. See the LICENSE file for details. from lib.core.packages import Pa...
#!/usr/bin/env python # Copyright (C) 2015 Dmitry Rodionov # This file is part of my GSoC'15 project for Cuckoo Sandbox: # http://www.cuckoosandbox.org # This software may be modified and distributed under the terms # of the MIT license. See the LICENSE file for details. from lib.core.packages import Package class Ba...
#!/usr/bin/env python # Copyright (C) 2015 Dmitry Rodionov # This file is part of my GSoC'15 project for Cuckoo Sandbox: # http://www.cuckoosandbox.org # This software may be modified and distributed under the terms # of the MIT license. See the LICENSE file for details. from lib.core.packages import Package class Ba...
<commit_before>#!/usr/bin/env python # Copyright (C) 2015 Dmitry Rodionov # This file is part of my GSoC'15 project for Cuckoo Sandbox: # http://www.cuckoosandbox.org # This software may be modified and distributed under the terms # of the MIT license. See the LICENSE file for details. from lib.core.packages import Pa...
2752af0f94ba477ac95b00a05243719d1a01c354
src/checker/pluginManager.py
src/checker/pluginManager.py
""" Plugin manager is Checker's main module. Plugin Manager is using Yapsy to find and load plugins from a directory and loads them via PluginRunner. """ from yapsy.PluginManager import PluginManager from pluginRunner import PluginRunner from configLoader import ConfigLoader from down import Scraper import lo...
""" Plugin manager is Checker's main module. Plugin Manager is using Yapsy to find and load plugins from a directory and loads them via PluginRunner. """ from yapsy.PluginManager import PluginManager from pluginRunner import PluginRunner from configLoader import ConfigLoader from down import Scraper import lo...
Fix typo - XML<->YAML configuration
Fix typo - XML<->YAML configuration
Python
mit
eghuro/crawlcheck
""" Plugin manager is Checker's main module. Plugin Manager is using Yapsy to find and load plugins from a directory and loads them via PluginRunner. """ from yapsy.PluginManager import PluginManager from pluginRunner import PluginRunner from configLoader import ConfigLoader from down import Scraper import lo...
""" Plugin manager is Checker's main module. Plugin Manager is using Yapsy to find and load plugins from a directory and loads them via PluginRunner. """ from yapsy.PluginManager import PluginManager from pluginRunner import PluginRunner from configLoader import ConfigLoader from down import Scraper import lo...
<commit_before>""" Plugin manager is Checker's main module. Plugin Manager is using Yapsy to find and load plugins from a directory and loads them via PluginRunner. """ from yapsy.PluginManager import PluginManager from pluginRunner import PluginRunner from configLoader import ConfigLoader from down import Scr...
""" Plugin manager is Checker's main module. Plugin Manager is using Yapsy to find and load plugins from a directory and loads them via PluginRunner. """ from yapsy.PluginManager import PluginManager from pluginRunner import PluginRunner from configLoader import ConfigLoader from down import Scraper import lo...
""" Plugin manager is Checker's main module. Plugin Manager is using Yapsy to find and load plugins from a directory and loads them via PluginRunner. """ from yapsy.PluginManager import PluginManager from pluginRunner import PluginRunner from configLoader import ConfigLoader from down import Scraper import lo...
<commit_before>""" Plugin manager is Checker's main module. Plugin Manager is using Yapsy to find and load plugins from a directory and loads them via PluginRunner. """ from yapsy.PluginManager import PluginManager from pluginRunner import PluginRunner from configLoader import ConfigLoader from down import Scr...
f9e5efe33c28cfe88fa67ccc883d4817552ea178
docs/conf.py
docs/conf.py
import os import taxii_services project = u'django-taxii-services' copyright = u'2014, The MITRE Corporation' version = taxii_services.__version__ release = version extensions = ['sphinx.ext.autodoc', 'sphinx.ext.viewcode'] templates_path = ['_templates'] source_suffix = '.rst' master_doc = 'index' rst_prolog = ""...
import os import taxii_services project = u'django-taxii-services' copyright = u'2014, The MITRE Corporation' version = taxii_services.__version__ release = version extensions = ['sphinx.ext.autodoc', 'sphinx.ext.viewcode'] templates_path = ['_templates'] source_suffix = '.rst' master_doc = 'index' rst_prolog = ""...
Fix zero-length field error when building docs in Python 2.6
Fix zero-length field error when building docs in Python 2.6
Python
bsd-3-clause
TAXIIProject/django-taxii-services
import os import taxii_services project = u'django-taxii-services' copyright = u'2014, The MITRE Corporation' version = taxii_services.__version__ release = version extensions = ['sphinx.ext.autodoc', 'sphinx.ext.viewcode'] templates_path = ['_templates'] source_suffix = '.rst' master_doc = 'index' rst_prolog = ""...
import os import taxii_services project = u'django-taxii-services' copyright = u'2014, The MITRE Corporation' version = taxii_services.__version__ release = version extensions = ['sphinx.ext.autodoc', 'sphinx.ext.viewcode'] templates_path = ['_templates'] source_suffix = '.rst' master_doc = 'index' rst_prolog = ""...
<commit_before>import os import taxii_services project = u'django-taxii-services' copyright = u'2014, The MITRE Corporation' version = taxii_services.__version__ release = version extensions = ['sphinx.ext.autodoc', 'sphinx.ext.viewcode'] templates_path = ['_templates'] source_suffix = '.rst' master_doc = 'index' ...
import os import taxii_services project = u'django-taxii-services' copyright = u'2014, The MITRE Corporation' version = taxii_services.__version__ release = version extensions = ['sphinx.ext.autodoc', 'sphinx.ext.viewcode'] templates_path = ['_templates'] source_suffix = '.rst' master_doc = 'index' rst_prolog = ""...
import os import taxii_services project = u'django-taxii-services' copyright = u'2014, The MITRE Corporation' version = taxii_services.__version__ release = version extensions = ['sphinx.ext.autodoc', 'sphinx.ext.viewcode'] templates_path = ['_templates'] source_suffix = '.rst' master_doc = 'index' rst_prolog = ""...
<commit_before>import os import taxii_services project = u'django-taxii-services' copyright = u'2014, The MITRE Corporation' version = taxii_services.__version__ release = version extensions = ['sphinx.ext.autodoc', 'sphinx.ext.viewcode'] templates_path = ['_templates'] source_suffix = '.rst' master_doc = 'index' ...
7bd491b74c800c31d51e4f80bcecb6b8f37efbd8
allaccess/__init__.py
allaccess/__init__.py
""" django-all-access is a reusable application for user registration and authentication from OAuth 1.0 and OAuth 2.0 providers such as Twitter and Facebook. """ __version__ = '0.9.0' default_app_config = 'allaccess.apps.AllAccessConfig' import logging class NullHandler(logging.Handler): "No-op logging hand...
""" django-all-access is a reusable application for user registration and authentication from OAuth 1.0 and OAuth 2.0 providers such as Twitter and Facebook. """ __version__ = '0.10.0.dev.0' default_app_config = 'allaccess.apps.AllAccessConfig' import logging class NullHandler(logging.Handler): "No-op loggi...
Change version for master status.
Change version for master status.
Python
bsd-2-clause
iXioN/django-all-access,mlavin/django-all-access,mlavin/django-all-access,iXioN/django-all-access
""" django-all-access is a reusable application for user registration and authentication from OAuth 1.0 and OAuth 2.0 providers such as Twitter and Facebook. """ __version__ = '0.9.0' default_app_config = 'allaccess.apps.AllAccessConfig' import logging class NullHandler(logging.Handler): "No-op logging hand...
""" django-all-access is a reusable application for user registration and authentication from OAuth 1.0 and OAuth 2.0 providers such as Twitter and Facebook. """ __version__ = '0.10.0.dev.0' default_app_config = 'allaccess.apps.AllAccessConfig' import logging class NullHandler(logging.Handler): "No-op loggi...
<commit_before>""" django-all-access is a reusable application for user registration and authentication from OAuth 1.0 and OAuth 2.0 providers such as Twitter and Facebook. """ __version__ = '0.9.0' default_app_config = 'allaccess.apps.AllAccessConfig' import logging class NullHandler(logging.Handler): "No-...
""" django-all-access is a reusable application for user registration and authentication from OAuth 1.0 and OAuth 2.0 providers such as Twitter and Facebook. """ __version__ = '0.10.0.dev.0' default_app_config = 'allaccess.apps.AllAccessConfig' import logging class NullHandler(logging.Handler): "No-op loggi...
""" django-all-access is a reusable application for user registration and authentication from OAuth 1.0 and OAuth 2.0 providers such as Twitter and Facebook. """ __version__ = '0.9.0' default_app_config = 'allaccess.apps.AllAccessConfig' import logging class NullHandler(logging.Handler): "No-op logging hand...
<commit_before>""" django-all-access is a reusable application for user registration and authentication from OAuth 1.0 and OAuth 2.0 providers such as Twitter and Facebook. """ __version__ = '0.9.0' default_app_config = 'allaccess.apps.AllAccessConfig' import logging class NullHandler(logging.Handler): "No-...
58811f1f6a4204a1c59d197daa9fb5fb7f6b25de
src/dynamic_graph/sot/dynamics/solver.py
src/dynamic_graph/sot/dynamics/solver.py
#!/usr/bin/env python # -*- coding: utf-8 -*- # Copyright 2011, Florent Lamiraux, Thomas Moulard, JRL, CNRS/AIST # # This file is part of dynamic-graph. # dynamic-graph is free software: you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public License # as published by the Free Softwa...
#!/usr/bin/env python # -*- coding: utf-8 -*- # Copyright 2011, Florent Lamiraux, Thomas Moulard, JRL, CNRS/AIST # # This file is part of dynamic-graph. # dynamic-graph is free software: you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public License # as published by the Free Softwa...
Add a proxy method push in Solver -> Solver.sot.push.
Add a proxy method push in Solver -> Solver.sot.push.
Python
bsd-2-clause
stack-of-tasks/sot-dynamic-pinocchio,stack-of-tasks/sot-dynamic-pinocchio,stack-of-tasks/sot-dynamic-pinocchio
#!/usr/bin/env python # -*- coding: utf-8 -*- # Copyright 2011, Florent Lamiraux, Thomas Moulard, JRL, CNRS/AIST # # This file is part of dynamic-graph. # dynamic-graph is free software: you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public License # as published by the Free Softwa...
#!/usr/bin/env python # -*- coding: utf-8 -*- # Copyright 2011, Florent Lamiraux, Thomas Moulard, JRL, CNRS/AIST # # This file is part of dynamic-graph. # dynamic-graph is free software: you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public License # as published by the Free Softwa...
<commit_before>#!/usr/bin/env python # -*- coding: utf-8 -*- # Copyright 2011, Florent Lamiraux, Thomas Moulard, JRL, CNRS/AIST # # This file is part of dynamic-graph. # dynamic-graph is free software: you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public License # as published by ...
#!/usr/bin/env python # -*- coding: utf-8 -*- # Copyright 2011, Florent Lamiraux, Thomas Moulard, JRL, CNRS/AIST # # This file is part of dynamic-graph. # dynamic-graph is free software: you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public License # as published by the Free Softwa...
#!/usr/bin/env python # -*- coding: utf-8 -*- # Copyright 2011, Florent Lamiraux, Thomas Moulard, JRL, CNRS/AIST # # This file is part of dynamic-graph. # dynamic-graph is free software: you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public License # as published by the Free Softwa...
<commit_before>#!/usr/bin/env python # -*- coding: utf-8 -*- # Copyright 2011, Florent Lamiraux, Thomas Moulard, JRL, CNRS/AIST # # This file is part of dynamic-graph. # dynamic-graph is free software: you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public License # as published by ...
84ee0b55021592235f590aa4cc52cc8b13800c32
drftutorial/catalog/views.py
drftutorial/catalog/views.py
from django.http import HttpResponse from rest_framework.views import APIView from rest_framework.response import Response from .models import Product from .serializers import ProductSerializer class ProductList(APIView): def get(self, request, format=None): products = Product.objects.all() serial...
from django.http import HttpResponse from rest_framework import generics from rest_framework.response import Response from .models import Product from .serializers import ProductSerializer class ProductList(generics.ListAPIView): queryset = Product.objects.all() serializer_class = ProductSerializer
Implement GET Product using ListAPIView
Implement GET Product using ListAPIView
Python
mit
andreagrandi/drf-tutorial
from django.http import HttpResponse from rest_framework.views import APIView from rest_framework.response import Response from .models import Product from .serializers import ProductSerializer class ProductList(APIView): def get(self, request, format=None): products = Product.objects.all() serial...
from django.http import HttpResponse from rest_framework import generics from rest_framework.response import Response from .models import Product from .serializers import ProductSerializer class ProductList(generics.ListAPIView): queryset = Product.objects.all() serializer_class = ProductSerializer
<commit_before>from django.http import HttpResponse from rest_framework.views import APIView from rest_framework.response import Response from .models import Product from .serializers import ProductSerializer class ProductList(APIView): def get(self, request, format=None): products = Product.objects.all()...
from django.http import HttpResponse from rest_framework import generics from rest_framework.response import Response from .models import Product from .serializers import ProductSerializer class ProductList(generics.ListAPIView): queryset = Product.objects.all() serializer_class = ProductSerializer
from django.http import HttpResponse from rest_framework.views import APIView from rest_framework.response import Response from .models import Product from .serializers import ProductSerializer class ProductList(APIView): def get(self, request, format=None): products = Product.objects.all() serial...
<commit_before>from django.http import HttpResponse from rest_framework.views import APIView from rest_framework.response import Response from .models import Product from .serializers import ProductSerializer class ProductList(APIView): def get(self, request, format=None): products = Product.objects.all()...
cf8671568bee0f3b631aba986fad2d846f2c587a
test/chtest/dev_proc_sys.py
test/chtest/dev_proc_sys.py
#!/usr/bin/env python3 import os.path import sys # File in /sys seem to vary between Linux systems. Thus, try a few candidates # and use the first one that exists. What we want is any file under /sys with # permissions root:root -rw-------. sys_file = None for f in ("/sys/devices/cpu/rdpmc", "/sys/kernel/mm...
#!/usr/bin/env python3 import os.path import sys # File in /sys seem to vary between Linux systems. Thus, try a few candidates # and use the first one that exists. What we want is any file under /sys with # permissions root:root -rw-------. sys_file = None for f in ("/sys/devices/cpu/rdpmc", "/sys/kernel/mm...
Add a further path inside /sys to test
Add a further path inside /sys to test On (at least) a Debian "stretch" system, the charliecloud image contains none of the tested paths inside /sys. This patch adds one that does exist there. Signed-off-by: Matthew Vernon <[email protected]>
Python
apache-2.0
hpc/charliecloud,hpc/charliecloud,hpc/charliecloud
#!/usr/bin/env python3 import os.path import sys # File in /sys seem to vary between Linux systems. Thus, try a few candidates # and use the first one that exists. What we want is any file under /sys with # permissions root:root -rw-------. sys_file = None for f in ("/sys/devices/cpu/rdpmc", "/sys/kernel/mm...
#!/usr/bin/env python3 import os.path import sys # File in /sys seem to vary between Linux systems. Thus, try a few candidates # and use the first one that exists. What we want is any file under /sys with # permissions root:root -rw-------. sys_file = None for f in ("/sys/devices/cpu/rdpmc", "/sys/kernel/mm...
<commit_before>#!/usr/bin/env python3 import os.path import sys # File in /sys seem to vary between Linux systems. Thus, try a few candidates # and use the first one that exists. What we want is any file under /sys with # permissions root:root -rw-------. sys_file = None for f in ("/sys/devices/cpu/rdpmc", ...
#!/usr/bin/env python3 import os.path import sys # File in /sys seem to vary between Linux systems. Thus, try a few candidates # and use the first one that exists. What we want is any file under /sys with # permissions root:root -rw-------. sys_file = None for f in ("/sys/devices/cpu/rdpmc", "/sys/kernel/mm...
#!/usr/bin/env python3 import os.path import sys # File in /sys seem to vary between Linux systems. Thus, try a few candidates # and use the first one that exists. What we want is any file under /sys with # permissions root:root -rw-------. sys_file = None for f in ("/sys/devices/cpu/rdpmc", "/sys/kernel/mm...
<commit_before>#!/usr/bin/env python3 import os.path import sys # File in /sys seem to vary between Linux systems. Thus, try a few candidates # and use the first one that exists. What we want is any file under /sys with # permissions root:root -rw-------. sys_file = None for f in ("/sys/devices/cpu/rdpmc", ...
9d6dcda52e2cde4ee4788008051a53f301335f70
Lib/test/test_smtpnet.py
Lib/test/test_smtpnet.py
#!/usr/bin/env python import unittest from test import test_support import smtplib test_support.requires("network") class SmtpSSLTest(unittest.TestCase): testServer = 'smtp.gmail.com' remotePort = 465 def test_connect(self): test_support.get_attribute(smtplib, 'SMTP_SSLX') server = smtpl...
#!/usr/bin/env python import unittest from test import test_support import smtplib test_support.requires("network") class SmtpSSLTest(unittest.TestCase): testServer = 'smtp.gmail.com' remotePort = 465 def test_connect(self): test_support.get_attribute(smtplib, 'SMTP_SSL') server = smtpli...
Fix spelling left over from testing.
Fix spelling left over from testing.
Python
mit
sk-/python2.7-type-annotator,sk-/python2.7-type-annotator,sk-/python2.7-type-annotator
#!/usr/bin/env python import unittest from test import test_support import smtplib test_support.requires("network") class SmtpSSLTest(unittest.TestCase): testServer = 'smtp.gmail.com' remotePort = 465 def test_connect(self): test_support.get_attribute(smtplib, 'SMTP_SSLX') server = smtpl...
#!/usr/bin/env python import unittest from test import test_support import smtplib test_support.requires("network") class SmtpSSLTest(unittest.TestCase): testServer = 'smtp.gmail.com' remotePort = 465 def test_connect(self): test_support.get_attribute(smtplib, 'SMTP_SSL') server = smtpli...
<commit_before>#!/usr/bin/env python import unittest from test import test_support import smtplib test_support.requires("network") class SmtpSSLTest(unittest.TestCase): testServer = 'smtp.gmail.com' remotePort = 465 def test_connect(self): test_support.get_attribute(smtplib, 'SMTP_SSLX') ...
#!/usr/bin/env python import unittest from test import test_support import smtplib test_support.requires("network") class SmtpSSLTest(unittest.TestCase): testServer = 'smtp.gmail.com' remotePort = 465 def test_connect(self): test_support.get_attribute(smtplib, 'SMTP_SSL') server = smtpli...
#!/usr/bin/env python import unittest from test import test_support import smtplib test_support.requires("network") class SmtpSSLTest(unittest.TestCase): testServer = 'smtp.gmail.com' remotePort = 465 def test_connect(self): test_support.get_attribute(smtplib, 'SMTP_SSLX') server = smtpl...
<commit_before>#!/usr/bin/env python import unittest from test import test_support import smtplib test_support.requires("network") class SmtpSSLTest(unittest.TestCase): testServer = 'smtp.gmail.com' remotePort = 465 def test_connect(self): test_support.get_attribute(smtplib, 'SMTP_SSLX') ...
607065281f31ef690a50cf011b6e142891bbd6ff
storage.py
storage.py
from datetime import datetime from tinydb import TinyDB, Query from tinydb_serialization import Serializer, SerializationMiddleware class DateTimeSerializer(Serializer): OBJ_CLASS = datetime # The class this serializer handles def encode(self, obj): return obj.strftime('%Y-%m-%dT%H:%M:%S') def d...
from datetime import datetime from tinydb import TinyDB, Query from tinydb_serialization import Serializer, SerializationMiddleware class DateTimeSerializer(Serializer): OBJ_CLASS = datetime # The class this serializer handles def encode(self, obj): return obj.strftime('%Y-%m-%dT%H:%M:%S') def d...
Fix users retrieval for daily meeting
Fix users retrieval for daily meeting
Python
mit
andreldm/slack-daily-meeting-bot,andreldm/slack-daily-meeting-bot
from datetime import datetime from tinydb import TinyDB, Query from tinydb_serialization import Serializer, SerializationMiddleware class DateTimeSerializer(Serializer): OBJ_CLASS = datetime # The class this serializer handles def encode(self, obj): return obj.strftime('%Y-%m-%dT%H:%M:%S') def d...
from datetime import datetime from tinydb import TinyDB, Query from tinydb_serialization import Serializer, SerializationMiddleware class DateTimeSerializer(Serializer): OBJ_CLASS = datetime # The class this serializer handles def encode(self, obj): return obj.strftime('%Y-%m-%dT%H:%M:%S') def d...
<commit_before>from datetime import datetime from tinydb import TinyDB, Query from tinydb_serialization import Serializer, SerializationMiddleware class DateTimeSerializer(Serializer): OBJ_CLASS = datetime # The class this serializer handles def encode(self, obj): return obj.strftime('%Y-%m-%dT%H:%M:...
from datetime import datetime from tinydb import TinyDB, Query from tinydb_serialization import Serializer, SerializationMiddleware class DateTimeSerializer(Serializer): OBJ_CLASS = datetime # The class this serializer handles def encode(self, obj): return obj.strftime('%Y-%m-%dT%H:%M:%S') def d...
from datetime import datetime from tinydb import TinyDB, Query from tinydb_serialization import Serializer, SerializationMiddleware class DateTimeSerializer(Serializer): OBJ_CLASS = datetime # The class this serializer handles def encode(self, obj): return obj.strftime('%Y-%m-%dT%H:%M:%S') def d...
<commit_before>from datetime import datetime from tinydb import TinyDB, Query from tinydb_serialization import Serializer, SerializationMiddleware class DateTimeSerializer(Serializer): OBJ_CLASS = datetime # The class this serializer handles def encode(self, obj): return obj.strftime('%Y-%m-%dT%H:%M:...
e7bc0b942ef3bdc85d6dbd360e3f012c1957d36f
src/aka.py
src/aka.py
#!/usr/bin/env python import json import os import sys def raw_aliases(): ''' Reads in the aliases file as a Python object ''' with open(os.environ['AKA_ALIASES'], 'r') as f: return json.loads(f.read()) def make_lookup(alias_object, current_path=[], current_command=[], result={}): ''' ...
#!/usr/bin/env python import json import os import sys def raw_aliases(): ''' Reads in the aliases file as a Python object ''' with open(os.environ['AKA_ALIASES'], 'r') as f: return json.loads(f.read()) def make_lookup(alias_object, current_path=[], current_command=[], result={}): ''' ...
Fix error, made command assume extras are params for now
Fix error, made command assume extras are params for now
Python
mit
mjgpy3/aka,mjgpy3/aka
#!/usr/bin/env python import json import os import sys def raw_aliases(): ''' Reads in the aliases file as a Python object ''' with open(os.environ['AKA_ALIASES'], 'r') as f: return json.loads(f.read()) def make_lookup(alias_object, current_path=[], current_command=[], result={}): ''' ...
#!/usr/bin/env python import json import os import sys def raw_aliases(): ''' Reads in the aliases file as a Python object ''' with open(os.environ['AKA_ALIASES'], 'r') as f: return json.loads(f.read()) def make_lookup(alias_object, current_path=[], current_command=[], result={}): ''' ...
<commit_before>#!/usr/bin/env python import json import os import sys def raw_aliases(): ''' Reads in the aliases file as a Python object ''' with open(os.environ['AKA_ALIASES'], 'r') as f: return json.loads(f.read()) def make_lookup(alias_object, current_path=[], current_command=[], result={...
#!/usr/bin/env python import json import os import sys def raw_aliases(): ''' Reads in the aliases file as a Python object ''' with open(os.environ['AKA_ALIASES'], 'r') as f: return json.loads(f.read()) def make_lookup(alias_object, current_path=[], current_command=[], result={}): ''' ...
#!/usr/bin/env python import json import os import sys def raw_aliases(): ''' Reads in the aliases file as a Python object ''' with open(os.environ['AKA_ALIASES'], 'r') as f: return json.loads(f.read()) def make_lookup(alias_object, current_path=[], current_command=[], result={}): ''' ...
<commit_before>#!/usr/bin/env python import json import os import sys def raw_aliases(): ''' Reads in the aliases file as a Python object ''' with open(os.environ['AKA_ALIASES'], 'r') as f: return json.loads(f.read()) def make_lookup(alias_object, current_path=[], current_command=[], result={...
900f6e03f03301b51db6fb5855e59c31915b0aa0
autotime/__init__.py
autotime/__init__.py
from __future__ import print_function try: from time import monotonic except ImportError: from monotonic import monotonic from IPython.core.magics.execution import _format_time as format_delta class LineWatcher(object): """Class that implements a basic timer. Notes ----- * Register the `st...
from __future__ import print_function try: from time import monotonic except ImportError: from monotonic import monotonic from IPython.core.magics.execution import _format_time as format_delta class LineWatcher(object): """Class that implements a basic timer. Notes ----- * Register the `st...
Fix printing 'time: 303 µs' on py2.7
Fix printing 'time: 303 µs' on py2.7
Python
apache-2.0
cpcloud/ipython-autotime
from __future__ import print_function try: from time import monotonic except ImportError: from monotonic import monotonic from IPython.core.magics.execution import _format_time as format_delta class LineWatcher(object): """Class that implements a basic timer. Notes ----- * Register the `st...
from __future__ import print_function try: from time import monotonic except ImportError: from monotonic import monotonic from IPython.core.magics.execution import _format_time as format_delta class LineWatcher(object): """Class that implements a basic timer. Notes ----- * Register the `st...
<commit_before>from __future__ import print_function try: from time import monotonic except ImportError: from monotonic import monotonic from IPython.core.magics.execution import _format_time as format_delta class LineWatcher(object): """Class that implements a basic timer. Notes ----- * R...
from __future__ import print_function try: from time import monotonic except ImportError: from monotonic import monotonic from IPython.core.magics.execution import _format_time as format_delta class LineWatcher(object): """Class that implements a basic timer. Notes ----- * Register the `st...
from __future__ import print_function try: from time import monotonic except ImportError: from monotonic import monotonic from IPython.core.magics.execution import _format_time as format_delta class LineWatcher(object): """Class that implements a basic timer. Notes ----- * Register the `st...
<commit_before>from __future__ import print_function try: from time import monotonic except ImportError: from monotonic import monotonic from IPython.core.magics.execution import _format_time as format_delta class LineWatcher(object): """Class that implements a basic timer. Notes ----- * R...
123f6a34d9d423f380254b70a5013c0df592d4b6
tests/run_coverage.py
tests/run_coverage.py
#!/usr/bin/env python """Script to collect coverage information on ofStateManager""" import os import sys import inspect import coverage import subprocess def main(): """Main function""" arguments = '' if len(sys.argv) > 1: arguments = ' '.join(sys.argv[1:]) testdir = os.path.abspath(os.path.dirname( inspec...
#!/usr/bin/env python """Script to collect coverage information on ofStateManager""" import os import sys import inspect import coverage import subprocess def main(): """Main function""" arguments = '' if len(sys.argv) > 1: arguments = ' '.join(sys.argv[1:]) testdir = os.path.abspath(os.path.dirname( inspec...
Replace coverage API calls by subprocess calls.
Replace coverage API calls by subprocess calls.
Python
mit
bilderbuchi/ofStateManager
#!/usr/bin/env python """Script to collect coverage information on ofStateManager""" import os import sys import inspect import coverage import subprocess def main(): """Main function""" arguments = '' if len(sys.argv) > 1: arguments = ' '.join(sys.argv[1:]) testdir = os.path.abspath(os.path.dirname( inspec...
#!/usr/bin/env python """Script to collect coverage information on ofStateManager""" import os import sys import inspect import coverage import subprocess def main(): """Main function""" arguments = '' if len(sys.argv) > 1: arguments = ' '.join(sys.argv[1:]) testdir = os.path.abspath(os.path.dirname( inspec...
<commit_before>#!/usr/bin/env python """Script to collect coverage information on ofStateManager""" import os import sys import inspect import coverage import subprocess def main(): """Main function""" arguments = '' if len(sys.argv) > 1: arguments = ' '.join(sys.argv[1:]) testdir = os.path.abspath(os.path.dir...
#!/usr/bin/env python """Script to collect coverage information on ofStateManager""" import os import sys import inspect import coverage import subprocess def main(): """Main function""" arguments = '' if len(sys.argv) > 1: arguments = ' '.join(sys.argv[1:]) testdir = os.path.abspath(os.path.dirname( inspec...
#!/usr/bin/env python """Script to collect coverage information on ofStateManager""" import os import sys import inspect import coverage import subprocess def main(): """Main function""" arguments = '' if len(sys.argv) > 1: arguments = ' '.join(sys.argv[1:]) testdir = os.path.abspath(os.path.dirname( inspec...
<commit_before>#!/usr/bin/env python """Script to collect coverage information on ofStateManager""" import os import sys import inspect import coverage import subprocess def main(): """Main function""" arguments = '' if len(sys.argv) > 1: arguments = ' '.join(sys.argv[1:]) testdir = os.path.abspath(os.path.dir...
3f87a8679a39f8422b013d157d1e93bdfd47d315
tests/test_checker.py
tests/test_checker.py
import pytest # TODO: Implement real tests! # # Right now this is just here as a stub so that we at least have some # test for Travis to go through. We want complete test coverage, # eventually. def test_checker(): assert True
import pytest from botbot import checker, problems # TODO: Implement real tests! # # Right now this is just here as a stub so that we at least have some # test for Travis to go through. We want complete test coverage, # eventually. def test_fastq_checker(): bad = checker.is_fastq("bad.fastq") good = checker....
Add basic test for fastq file checker
Add basic test for fastq file checker
Python
mit
jackstanek/BotBot,jackstanek/BotBot
import pytest # TODO: Implement real tests! # # Right now this is just here as a stub so that we at least have some # test for Travis to go through. We want complete test coverage, # eventually. def test_checker(): assert True Add basic test for fastq file checker
import pytest from botbot import checker, problems # TODO: Implement real tests! # # Right now this is just here as a stub so that we at least have some # test for Travis to go through. We want complete test coverage, # eventually. def test_fastq_checker(): bad = checker.is_fastq("bad.fastq") good = checker....
<commit_before>import pytest # TODO: Implement real tests! # # Right now this is just here as a stub so that we at least have some # test for Travis to go through. We want complete test coverage, # eventually. def test_checker(): assert True <commit_msg>Add basic test for fastq file checker<commit_after>
import pytest from botbot import checker, problems # TODO: Implement real tests! # # Right now this is just here as a stub so that we at least have some # test for Travis to go through. We want complete test coverage, # eventually. def test_fastq_checker(): bad = checker.is_fastq("bad.fastq") good = checker....
import pytest # TODO: Implement real tests! # # Right now this is just here as a stub so that we at least have some # test for Travis to go through. We want complete test coverage, # eventually. def test_checker(): assert True Add basic test for fastq file checkerimport pytest from botbot import checker, problem...
<commit_before>import pytest # TODO: Implement real tests! # # Right now this is just here as a stub so that we at least have some # test for Travis to go through. We want complete test coverage, # eventually. def test_checker(): assert True <commit_msg>Add basic test for fastq file checker<commit_after>import py...
3e0c64d89b937659dac23cb78b148717b49735ca
tests/testapp/urls.py
tests/testapp/urls.py
from django.urls import path from . import views urlpatterns = [ path('', views.ExampleFormView.as_view(), name='upload'), ]
try: from django.urls import path except ImportError: from django.conf.urls import url as path from . import views urlpatterns = [ path('', views.ExampleFormView.as_view(), name='upload'), ]
Fix test suite for Django 1.11
Fix test suite for Django 1.11
Python
mit
codingjoe/django-s3file,codingjoe/django-s3file,codingjoe/django-s3file
from django.urls import path from . import views urlpatterns = [ path('', views.ExampleFormView.as_view(), name='upload'), ] Fix test suite for Django 1.11
try: from django.urls import path except ImportError: from django.conf.urls import url as path from . import views urlpatterns = [ path('', views.ExampleFormView.as_view(), name='upload'), ]
<commit_before>from django.urls import path from . import views urlpatterns = [ path('', views.ExampleFormView.as_view(), name='upload'), ] <commit_msg>Fix test suite for Django 1.11<commit_after>
try: from django.urls import path except ImportError: from django.conf.urls import url as path from . import views urlpatterns = [ path('', views.ExampleFormView.as_view(), name='upload'), ]
from django.urls import path from . import views urlpatterns = [ path('', views.ExampleFormView.as_view(), name='upload'), ] Fix test suite for Django 1.11try: from django.urls import path except ImportError: from django.conf.urls import url as path from . import views urlpatterns = [ path('', views...
<commit_before>from django.urls import path from . import views urlpatterns = [ path('', views.ExampleFormView.as_view(), name='upload'), ] <commit_msg>Fix test suite for Django 1.11<commit_after>try: from django.urls import path except ImportError: from django.conf.urls import url as path from . import ...
2d57647d54e7a68f8a8139fc2b5a3168dde5195f
server.py
server.py
import recommender from flask import Flask, render_template, request app = Flask(__name__) @app.route('/') def index(): return render_template('template.html') @app.route('/graph') def my_link(): # here we want to get the value of user (i.e. ?user=some-value) seed = request.args.get('seed') nsfw = boo...
import recommender import os from flask import Flask, render_template, request app = Flask(__name__) @app.route('/') def index(): return render_template('template.html') @app.route('/graph') def my_link(): # here we want to get the value of user (i.e. ?user=some-value) seed = request.args.get('seed') ...
Set port by environment variable
Set port by environment variable
Python
mit
cdated/subredditor,cdated/reddit-crawler,cdated/subredditor,cdated/subredditor,cdated/subreddit-crawler,cdated/reddit-crawler,cdated/subreddit-crawler,cdated/subreddit-crawler,cdated/subreddit-crawler,cdated/subredditor
import recommender from flask import Flask, render_template, request app = Flask(__name__) @app.route('/') def index(): return render_template('template.html') @app.route('/graph') def my_link(): # here we want to get the value of user (i.e. ?user=some-value) seed = request.args.get('seed') nsfw = boo...
import recommender import os from flask import Flask, render_template, request app = Flask(__name__) @app.route('/') def index(): return render_template('template.html') @app.route('/graph') def my_link(): # here we want to get the value of user (i.e. ?user=some-value) seed = request.args.get('seed') ...
<commit_before>import recommender from flask import Flask, render_template, request app = Flask(__name__) @app.route('/') def index(): return render_template('template.html') @app.route('/graph') def my_link(): # here we want to get the value of user (i.e. ?user=some-value) seed = request.args.get('seed')...
import recommender import os from flask import Flask, render_template, request app = Flask(__name__) @app.route('/') def index(): return render_template('template.html') @app.route('/graph') def my_link(): # here we want to get the value of user (i.e. ?user=some-value) seed = request.args.get('seed') ...
import recommender from flask import Flask, render_template, request app = Flask(__name__) @app.route('/') def index(): return render_template('template.html') @app.route('/graph') def my_link(): # here we want to get the value of user (i.e. ?user=some-value) seed = request.args.get('seed') nsfw = boo...
<commit_before>import recommender from flask import Flask, render_template, request app = Flask(__name__) @app.route('/') def index(): return render_template('template.html') @app.route('/graph') def my_link(): # here we want to get the value of user (i.e. ?user=some-value) seed = request.args.get('seed')...
fa5d78df781143d7e0105ccb1a5da923b2ca0b60
server.py
server.py
"""This module runs the api server.""" import os from app import flask_app, db from app.models import User, BucketList, BucketListItem from flask.ext.script import Manager, Shell from flask.ext.migrate import Migrate, MigrateCommand from flask.ext.restful import Resource, Api from app.api_v1.resources import TestResour...
"""This module runs the api server.""" import os from app import flask_app, db from app.models import User, BucketList, BucketListItem from flask.ext.script import Manager, Shell from flask.ext.migrate import Migrate, MigrateCommand from flask.ext.restful import Resource, Api from app.api_v1.resources import TestResour...
Add BucketListApi resource to api.
[Feature] Add BucketListApi resource to api.
Python
mit
andela-akiura/bucketlist
"""This module runs the api server.""" import os from app import flask_app, db from app.models import User, BucketList, BucketListItem from flask.ext.script import Manager, Shell from flask.ext.migrate import Migrate, MigrateCommand from flask.ext.restful import Resource, Api from app.api_v1.resources import TestResour...
"""This module runs the api server.""" import os from app import flask_app, db from app.models import User, BucketList, BucketListItem from flask.ext.script import Manager, Shell from flask.ext.migrate import Migrate, MigrateCommand from flask.ext.restful import Resource, Api from app.api_v1.resources import TestResour...
<commit_before>"""This module runs the api server.""" import os from app import flask_app, db from app.models import User, BucketList, BucketListItem from flask.ext.script import Manager, Shell from flask.ext.migrate import Migrate, MigrateCommand from flask.ext.restful import Resource, Api from app.api_v1.resources im...
"""This module runs the api server.""" import os from app import flask_app, db from app.models import User, BucketList, BucketListItem from flask.ext.script import Manager, Shell from flask.ext.migrate import Migrate, MigrateCommand from flask.ext.restful import Resource, Api from app.api_v1.resources import TestResour...
"""This module runs the api server.""" import os from app import flask_app, db from app.models import User, BucketList, BucketListItem from flask.ext.script import Manager, Shell from flask.ext.migrate import Migrate, MigrateCommand from flask.ext.restful import Resource, Api from app.api_v1.resources import TestResour...
<commit_before>"""This module runs the api server.""" import os from app import flask_app, db from app.models import User, BucketList, BucketListItem from flask.ext.script import Manager, Shell from flask.ext.migrate import Migrate, MigrateCommand from flask.ext.restful import Resource, Api from app.api_v1.resources im...
099a0b045548d5a93707a9ef99bece2578ed50ea
user_voting/models.py
user_voting/models.py
from django.contrib.contenttypes import generic from django.contrib.contenttypes.models import ContentType from django.contrib.auth.models import User from django.db import models from user_voting.managers import VoteManager SCORES = ( (u'+1', +1), (u'-1', -1), (u'?', 0), ) class Vote(models.Model): ...
from django.contrib.contenttypes import generic from django.contrib.contenttypes.models import ContentType from django.contrib.auth.models import User from django.db import models from user_voting.managers import VoteManager SCORES = ( (u'+1', +1), (u'-1', -1), (u'?', 0), ) class Vote(models.Model): ...
Add date field for timestamps
user_voting: Add date field for timestamps
Python
agpl-3.0
kansanmuisti/kamu,kansanmuisti/kamu,kansanmuisti/kamu,kansanmuisti/kamu,kansanmuisti/kamu
from django.contrib.contenttypes import generic from django.contrib.contenttypes.models import ContentType from django.contrib.auth.models import User from django.db import models from user_voting.managers import VoteManager SCORES = ( (u'+1', +1), (u'-1', -1), (u'?', 0), ) class Vote(models.Model): ...
from django.contrib.contenttypes import generic from django.contrib.contenttypes.models import ContentType from django.contrib.auth.models import User from django.db import models from user_voting.managers import VoteManager SCORES = ( (u'+1', +1), (u'-1', -1), (u'?', 0), ) class Vote(models.Model): ...
<commit_before>from django.contrib.contenttypes import generic from django.contrib.contenttypes.models import ContentType from django.contrib.auth.models import User from django.db import models from user_voting.managers import VoteManager SCORES = ( (u'+1', +1), (u'-1', -1), (u'?', 0), ) class Vote(mo...
from django.contrib.contenttypes import generic from django.contrib.contenttypes.models import ContentType from django.contrib.auth.models import User from django.db import models from user_voting.managers import VoteManager SCORES = ( (u'+1', +1), (u'-1', -1), (u'?', 0), ) class Vote(models.Model): ...
from django.contrib.contenttypes import generic from django.contrib.contenttypes.models import ContentType from django.contrib.auth.models import User from django.db import models from user_voting.managers import VoteManager SCORES = ( (u'+1', +1), (u'-1', -1), (u'?', 0), ) class Vote(models.Model): ...
<commit_before>from django.contrib.contenttypes import generic from django.contrib.contenttypes.models import ContentType from django.contrib.auth.models import User from django.db import models from user_voting.managers import VoteManager SCORES = ( (u'+1', +1), (u'-1', -1), (u'?', 0), ) class Vote(mo...
4f1f78ece6466f6070e35a5057642af716e08612
apps/careers/admin.py
apps/careers/admin.py
from cms.admin import SearchMetaBaseAdmin from django.contrib import admin from .models import Career @admin.register(Career) class CareerAdmin(SearchMetaBaseAdmin): prepopulated_fields = {'slug': ('title',)} fieldsets = ( (None, { 'fields': ('page', 'title', 'slug', 'location', 'summary...
from cms.admin import SearchMetaBaseAdmin from django.contrib import admin from .models import Career @admin.register(Career) class CareerAdmin(SearchMetaBaseAdmin): prepopulated_fields = {'slug': ['title']} fieldsets = ( (None, { 'fields': ['page', 'title', 'slug', 'location', 'summary'...
Change tuples to lists where applicable
Change tuples to lists where applicable
Python
mit
onespacemedia/cms-jobs,onespacemedia/cms-jobs
from cms.admin import SearchMetaBaseAdmin from django.contrib import admin from .models import Career @admin.register(Career) class CareerAdmin(SearchMetaBaseAdmin): prepopulated_fields = {'slug': ('title',)} fieldsets = ( (None, { 'fields': ('page', 'title', 'slug', 'location', 'summary...
from cms.admin import SearchMetaBaseAdmin from django.contrib import admin from .models import Career @admin.register(Career) class CareerAdmin(SearchMetaBaseAdmin): prepopulated_fields = {'slug': ['title']} fieldsets = ( (None, { 'fields': ['page', 'title', 'slug', 'location', 'summary'...
<commit_before>from cms.admin import SearchMetaBaseAdmin from django.contrib import admin from .models import Career @admin.register(Career) class CareerAdmin(SearchMetaBaseAdmin): prepopulated_fields = {'slug': ('title',)} fieldsets = ( (None, { 'fields': ('page', 'title', 'slug', 'loca...
from cms.admin import SearchMetaBaseAdmin from django.contrib import admin from .models import Career @admin.register(Career) class CareerAdmin(SearchMetaBaseAdmin): prepopulated_fields = {'slug': ['title']} fieldsets = ( (None, { 'fields': ['page', 'title', 'slug', 'location', 'summary'...
from cms.admin import SearchMetaBaseAdmin from django.contrib import admin from .models import Career @admin.register(Career) class CareerAdmin(SearchMetaBaseAdmin): prepopulated_fields = {'slug': ('title',)} fieldsets = ( (None, { 'fields': ('page', 'title', 'slug', 'location', 'summary...
<commit_before>from cms.admin import SearchMetaBaseAdmin from django.contrib import admin from .models import Career @admin.register(Career) class CareerAdmin(SearchMetaBaseAdmin): prepopulated_fields = {'slug': ('title',)} fieldsets = ( (None, { 'fields': ('page', 'title', 'slug', 'loca...
d0f1114fdcee63d65c5dd74501b3e329a12f8e53
indra/sources/eidos/eidos_reader.py
indra/sources/eidos/eidos_reader.py
from indra.java_vm import autoclass, JavaException from .scala_utils import get_python_json class EidosReader(object): """Reader object keeping an instance of the Eidos reader as a singleton. This allows the Eidos reader to need initialization when the first piece of text is read, the subsequent readings ...
from indra.java_vm import autoclass, JavaException from .scala_utils import get_python_json class EidosReader(object): """Reader object keeping an instance of the Eidos reader as a singleton. This allows the Eidos reader to need initialization when the first piece of text is read, the subsequent readings ...
Make Eidos reader instantiate when first reading
Make Eidos reader instantiate when first reading
Python
bsd-2-clause
johnbachman/belpy,johnbachman/indra,sorgerlab/indra,johnbachman/indra,bgyori/indra,sorgerlab/belpy,bgyori/indra,sorgerlab/indra,sorgerlab/belpy,johnbachman/belpy,pvtodorov/indra,pvtodorov/indra,bgyori/indra,johnbachman/indra,johnbachman/belpy,sorgerlab/belpy,pvtodorov/indra,pvtodorov/indra,sorgerlab/indra
from indra.java_vm import autoclass, JavaException from .scala_utils import get_python_json class EidosReader(object): """Reader object keeping an instance of the Eidos reader as a singleton. This allows the Eidos reader to need initialization when the first piece of text is read, the subsequent readings ...
from indra.java_vm import autoclass, JavaException from .scala_utils import get_python_json class EidosReader(object): """Reader object keeping an instance of the Eidos reader as a singleton. This allows the Eidos reader to need initialization when the first piece of text is read, the subsequent readings ...
<commit_before>from indra.java_vm import autoclass, JavaException from .scala_utils import get_python_json class EidosReader(object): """Reader object keeping an instance of the Eidos reader as a singleton. This allows the Eidos reader to need initialization when the first piece of text is read, the subse...
from indra.java_vm import autoclass, JavaException from .scala_utils import get_python_json class EidosReader(object): """Reader object keeping an instance of the Eidos reader as a singleton. This allows the Eidos reader to need initialization when the first piece of text is read, the subsequent readings ...
from indra.java_vm import autoclass, JavaException from .scala_utils import get_python_json class EidosReader(object): """Reader object keeping an instance of the Eidos reader as a singleton. This allows the Eidos reader to need initialization when the first piece of text is read, the subsequent readings ...
<commit_before>from indra.java_vm import autoclass, JavaException from .scala_utils import get_python_json class EidosReader(object): """Reader object keeping an instance of the Eidos reader as a singleton. This allows the Eidos reader to need initialization when the first piece of text is read, the subse...
ca042edc7f9709f2217b669fb5a68e9aac3ab61c
cbv/management/commands/cbv_dumpversion.py
cbv/management/commands/cbv_dumpversion.py
from django.core.management import call_command from django.core.management.commands import LabelCommand class Command(LabelCommand): def handle_label(self, label, **options): # Because django will use the default manager of each model, we # monkeypatch the manager to filter by our label before ca...
import json from django.db.models.query import QuerySet from django.core.management import call_command from django.core.management.base import LabelCommand from django.core import serializers from cbv import models class Command(LabelCommand): """Dump the django cbv app data for a specific version.""" def h...
Allow dumpdata of specific version of cbv.
Allow dumpdata of specific version of cbv.
Python
bsd-2-clause
abhijo89/django-cbv-inspector,refreshoxford/django-cbv-inspector,abhijo89/django-cbv-inspector,refreshoxford/django-cbv-inspector,refreshoxford/django-cbv-inspector,abhijo89/django-cbv-inspector,abhijo89/django-cbv-inspector,refreshoxford/django-cbv-inspector
from django.core.management import call_command from django.core.management.commands import LabelCommand class Command(LabelCommand): def handle_label(self, label, **options): # Because django will use the default manager of each model, we # monkeypatch the manager to filter by our label before ca...
import json from django.db.models.query import QuerySet from django.core.management import call_command from django.core.management.base import LabelCommand from django.core import serializers from cbv import models class Command(LabelCommand): """Dump the django cbv app data for a specific version.""" def h...
<commit_before>from django.core.management import call_command from django.core.management.commands import LabelCommand class Command(LabelCommand): def handle_label(self, label, **options): # Because django will use the default manager of each model, we # monkeypatch the manager to filter by our ...
import json from django.db.models.query import QuerySet from django.core.management import call_command from django.core.management.base import LabelCommand from django.core import serializers from cbv import models class Command(LabelCommand): """Dump the django cbv app data for a specific version.""" def h...
from django.core.management import call_command from django.core.management.commands import LabelCommand class Command(LabelCommand): def handle_label(self, label, **options): # Because django will use the default manager of each model, we # monkeypatch the manager to filter by our label before ca...
<commit_before>from django.core.management import call_command from django.core.management.commands import LabelCommand class Command(LabelCommand): def handle_label(self, label, **options): # Because django will use the default manager of each model, we # monkeypatch the manager to filter by our ...
7d02bd555d7519d485d00e02136d26a6e4e7096e
nova/db/sqlalchemy/migrate_repo/versions/034_change_instance_id_in_migrations.py
nova/db/sqlalchemy/migrate_repo/versions/034_change_instance_id_in_migrations.py
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2011 OpenStack LLC. # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/...
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2011 OpenStack LLC. # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/...
Drop FK before dropping instance_id column.
Drop FK before dropping instance_id column.
Python
apache-2.0
sacharya/nova,jianghuaw/nova,leilihh/novaha,eneabio/nova,vladikr/nova_drafts,KarimAllah/nova,sileht/deb-openstack-nova,Stavitsky/nova,DirectXMan12/nova-hacking,akash1808/nova_test_latest,raildo/nova,gspilio/nova,tangfeixiong/nova,jianghuaw/nova,Juniper/nova,JioCloud/nova,zhimin711/nova,usc-isi/nova,orbitfp7/nova,Jianyu...
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2011 OpenStack LLC. # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/...
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2011 OpenStack LLC. # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/...
<commit_before># vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2011 OpenStack LLC. # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://...
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2011 OpenStack LLC. # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/...
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2011 OpenStack LLC. # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/...
<commit_before># vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2011 OpenStack LLC. # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://...
643f666468d3e378cc0b39e501c253e33c267f0f
tests/python/PyUnitTests.py
tests/python/PyUnitTests.py
#!/bin/sh PYTHONPATH="%builddir%":"%srcdir%":$PYTHONPATH \ python "%srcdir%"/tests/python/UnitTests.py
#!/bin/sh PYTHONPATH="%builddir%":"%srcdir%":$PYTHONPATH \ DYLD_LIBRARY_PATH="%builddir%/.libs":"%builddir%/gdtoa/.libs":$DYLD_LIBRARY_PATH \ python "%srcdir%"/tests/python/UnitTests.py
Set DYLD_LIBRARY_PATH to find locally built dynamic libraries.
Set DYLD_LIBRARY_PATH to find locally built dynamic libraries.
Python
bsd-3-clause
duncanmortimer/ledger,paulbdavis/ledger,duncanmortimer/ledger,duncanmortimer/ledger,afh/ledger,paulbdavis/ledger,duncanmortimer/ledger,duncanmortimer/ledger,afh/ledger,ledger/ledger,jwakely/ledger,ledger/ledger,jwakely/ledger,ledger/ledger,ledger/ledger,paulbdavis/ledger,jwakely/ledger,afh/ledger,paulbdavis/ledger,ledg...
#!/bin/sh PYTHONPATH="%builddir%":"%srcdir%":$PYTHONPATH \ python "%srcdir%"/tests/python/UnitTests.py Set DYLD_LIBRARY_PATH to find locally built dynamic libraries.
#!/bin/sh PYTHONPATH="%builddir%":"%srcdir%":$PYTHONPATH \ DYLD_LIBRARY_PATH="%builddir%/.libs":"%builddir%/gdtoa/.libs":$DYLD_LIBRARY_PATH \ python "%srcdir%"/tests/python/UnitTests.py
<commit_before>#!/bin/sh PYTHONPATH="%builddir%":"%srcdir%":$PYTHONPATH \ python "%srcdir%"/tests/python/UnitTests.py <commit_msg>Set DYLD_LIBRARY_PATH to find locally built dynamic libraries.<commit_after>
#!/bin/sh PYTHONPATH="%builddir%":"%srcdir%":$PYTHONPATH \ DYLD_LIBRARY_PATH="%builddir%/.libs":"%builddir%/gdtoa/.libs":$DYLD_LIBRARY_PATH \ python "%srcdir%"/tests/python/UnitTests.py
#!/bin/sh PYTHONPATH="%builddir%":"%srcdir%":$PYTHONPATH \ python "%srcdir%"/tests/python/UnitTests.py Set DYLD_LIBRARY_PATH to find locally built dynamic libraries.#!/bin/sh PYTHONPATH="%builddir%":"%srcdir%":$PYTHONPATH \ DYLD_LIBRARY_PATH="%builddir%/.libs":"%builddir%/gdtoa/.libs":$DYLD_LIBRARY_PATH \ pyt...
<commit_before>#!/bin/sh PYTHONPATH="%builddir%":"%srcdir%":$PYTHONPATH \ python "%srcdir%"/tests/python/UnitTests.py <commit_msg>Set DYLD_LIBRARY_PATH to find locally built dynamic libraries.<commit_after>#!/bin/sh PYTHONPATH="%builddir%":"%srcdir%":$PYTHONPATH \ DYLD_LIBRARY_PATH="%builddir%/.libs":"%builddir%/...
358bdb98ba4a17c75773c7b09853580f5e7dd4e7
tests/people_test.py
tests/people_test.py
def test_team_has_members(fx_people, fx_teams): assert fx_teams.clamp.members == { fx_people.clamp_member_1, fx_people.clamp_member_2, fx_people.clamp_member_3, fx_people.clamp_member_4 } def test_person_has_awards(fx_people, fx_awards): assert fx_people.peter_jackson.awa...
def test_team_has_members(fx_people, fx_teams): assert fx_teams.clamp.members == { fx_people.clamp_member_1, fx_people.clamp_member_2, fx_people.clamp_member_3, fx_people.clamp_member_4 } def test_person_has_awards(fx_people, fx_awards): assert fx_people.peter_jackson.awa...
Adjust test_person_made_works to keep consistency.
Adjust test_person_made_works to keep consistency.
Python
mit
item4/cliche,item4/cliche,clicheio/cliche,clicheio/cliche,clicheio/cliche
def test_team_has_members(fx_people, fx_teams): assert fx_teams.clamp.members == { fx_people.clamp_member_1, fx_people.clamp_member_2, fx_people.clamp_member_3, fx_people.clamp_member_4 } def test_person_has_awards(fx_people, fx_awards): assert fx_people.peter_jackson.awa...
def test_team_has_members(fx_people, fx_teams): assert fx_teams.clamp.members == { fx_people.clamp_member_1, fx_people.clamp_member_2, fx_people.clamp_member_3, fx_people.clamp_member_4 } def test_person_has_awards(fx_people, fx_awards): assert fx_people.peter_jackson.awa...
<commit_before> def test_team_has_members(fx_people, fx_teams): assert fx_teams.clamp.members == { fx_people.clamp_member_1, fx_people.clamp_member_2, fx_people.clamp_member_3, fx_people.clamp_member_4 } def test_person_has_awards(fx_people, fx_awards): assert fx_people.pe...
def test_team_has_members(fx_people, fx_teams): assert fx_teams.clamp.members == { fx_people.clamp_member_1, fx_people.clamp_member_2, fx_people.clamp_member_3, fx_people.clamp_member_4 } def test_person_has_awards(fx_people, fx_awards): assert fx_people.peter_jackson.awa...
def test_team_has_members(fx_people, fx_teams): assert fx_teams.clamp.members == { fx_people.clamp_member_1, fx_people.clamp_member_2, fx_people.clamp_member_3, fx_people.clamp_member_4 } def test_person_has_awards(fx_people, fx_awards): assert fx_people.peter_jackson.awa...
<commit_before> def test_team_has_members(fx_people, fx_teams): assert fx_teams.clamp.members == { fx_people.clamp_member_1, fx_people.clamp_member_2, fx_people.clamp_member_3, fx_people.clamp_member_4 } def test_person_has_awards(fx_people, fx_awards): assert fx_people.pe...
bc3b2db26181681e0a0da93721a950e000c2a367
app/errors.py
app/errors.py
import bugsnag from sanic.handlers import ErrorHandler from . import settings if settings.BUGSNAG_API_KEY: bugsnag.configure( api_key=settings.BUGSNAG_API_KEY, project_root="/app", release_state=settings.ENVIRONMENT, ) class BugsnagErrorHandler(ErrorHandler): def default(self, re...
import bugsnag from sanic.handlers import ErrorHandler from . import settings if settings.BUGSNAG_API_KEY: bugsnag.configure( api_key=settings.BUGSNAG_API_KEY, project_root="/app", release_state=settings.ENVIRONMENT, ) class BugsnagErrorHandler(ErrorHandler): def default(self, re...
Include URL of request in error reports
Include URL of request in error reports
Python
mit
jacebrowning/memegen,jacebrowning/memegen
import bugsnag from sanic.handlers import ErrorHandler from . import settings if settings.BUGSNAG_API_KEY: bugsnag.configure( api_key=settings.BUGSNAG_API_KEY, project_root="/app", release_state=settings.ENVIRONMENT, ) class BugsnagErrorHandler(ErrorHandler): def default(self, re...
import bugsnag from sanic.handlers import ErrorHandler from . import settings if settings.BUGSNAG_API_KEY: bugsnag.configure( api_key=settings.BUGSNAG_API_KEY, project_root="/app", release_state=settings.ENVIRONMENT, ) class BugsnagErrorHandler(ErrorHandler): def default(self, re...
<commit_before>import bugsnag from sanic.handlers import ErrorHandler from . import settings if settings.BUGSNAG_API_KEY: bugsnag.configure( api_key=settings.BUGSNAG_API_KEY, project_root="/app", release_state=settings.ENVIRONMENT, ) class BugsnagErrorHandler(ErrorHandler): def d...
import bugsnag from sanic.handlers import ErrorHandler from . import settings if settings.BUGSNAG_API_KEY: bugsnag.configure( api_key=settings.BUGSNAG_API_KEY, project_root="/app", release_state=settings.ENVIRONMENT, ) class BugsnagErrorHandler(ErrorHandler): def default(self, re...
import bugsnag from sanic.handlers import ErrorHandler from . import settings if settings.BUGSNAG_API_KEY: bugsnag.configure( api_key=settings.BUGSNAG_API_KEY, project_root="/app", release_state=settings.ENVIRONMENT, ) class BugsnagErrorHandler(ErrorHandler): def default(self, re...
<commit_before>import bugsnag from sanic.handlers import ErrorHandler from . import settings if settings.BUGSNAG_API_KEY: bugsnag.configure( api_key=settings.BUGSNAG_API_KEY, project_root="/app", release_state=settings.ENVIRONMENT, ) class BugsnagErrorHandler(ErrorHandler): def d...
faf451637dffe420f47932621a4035347c978c70
msmbuilder/example_datasets/base.py
msmbuilder/example_datasets/base.py
"""Base IO code for all datasets """ # Copyright (c) 2007 David Cournapeau <[email protected]> # 2010 Fabian Pedregosa <[email protected]> # 2010 Olivier Grisel <[email protected]> # License: BSD 3 clause # Adapted for msmbuilder from https://github.com/scikit-learn/scikit-learn/blob/master/sklearn/dat...
"""Base IO code for all datasets """ # Copyright (c) 2007 David Cournapeau <[email protected]> # 2010 Fabian Pedregosa <[email protected]> # 2010 Olivier Grisel <[email protected]> # License: BSD 3 clause # Adapted for msmbuilder from https://github.com/scikit-learn/scikit-learn/blob/master/sklearn/dat...
Fix for when msmb_data is not available
Fix for when msmb_data is not available
Python
lgpl-2.1
msmbuilder/msmbuilder,dr-nate/msmbuilder,msmbuilder/msmbuilder,rafwiewiora/msmbuilder,brookehus/msmbuilder,cxhernandez/msmbuilder,msmbuilder/msmbuilder,brookehus/msmbuilder,cxhernandez/msmbuilder,msultan/msmbuilder,Eigenstate/msmbuilder,peastman/msmbuilder,mpharrigan/mixtape,mpharrigan/mixtape,rafwiewiora/msmbuilder,pe...
"""Base IO code for all datasets """ # Copyright (c) 2007 David Cournapeau <[email protected]> # 2010 Fabian Pedregosa <[email protected]> # 2010 Olivier Grisel <[email protected]> # License: BSD 3 clause # Adapted for msmbuilder from https://github.com/scikit-learn/scikit-learn/blob/master/sklearn/dat...
"""Base IO code for all datasets """ # Copyright (c) 2007 David Cournapeau <[email protected]> # 2010 Fabian Pedregosa <[email protected]> # 2010 Olivier Grisel <[email protected]> # License: BSD 3 clause # Adapted for msmbuilder from https://github.com/scikit-learn/scikit-learn/blob/master/sklearn/dat...
<commit_before>"""Base IO code for all datasets """ # Copyright (c) 2007 David Cournapeau <[email protected]> # 2010 Fabian Pedregosa <[email protected]> # 2010 Olivier Grisel <[email protected]> # License: BSD 3 clause # Adapted for msmbuilder from https://github.com/scikit-learn/scikit-learn/blob/mas...
"""Base IO code for all datasets """ # Copyright (c) 2007 David Cournapeau <[email protected]> # 2010 Fabian Pedregosa <[email protected]> # 2010 Olivier Grisel <[email protected]> # License: BSD 3 clause # Adapted for msmbuilder from https://github.com/scikit-learn/scikit-learn/blob/master/sklearn/dat...
"""Base IO code for all datasets """ # Copyright (c) 2007 David Cournapeau <[email protected]> # 2010 Fabian Pedregosa <[email protected]> # 2010 Olivier Grisel <[email protected]> # License: BSD 3 clause # Adapted for msmbuilder from https://github.com/scikit-learn/scikit-learn/blob/master/sklearn/dat...
<commit_before>"""Base IO code for all datasets """ # Copyright (c) 2007 David Cournapeau <[email protected]> # 2010 Fabian Pedregosa <[email protected]> # 2010 Olivier Grisel <[email protected]> # License: BSD 3 clause # Adapted for msmbuilder from https://github.com/scikit-learn/scikit-learn/blob/mas...
c87bbd461794c8d18c9b9811e44306f02e3309d3
comics/comics/kalscartoon.py
comics/comics/kalscartoon.py
from dateutil.parser import parse from comics.aggregator.crawler import CrawlerBase, CrawlerResult from comics.meta.base import MetaBase class Meta(MetaBase): name = "KAL's Cartoon" language = 'en' url = 'http://www.economist.com' start_date = '2006-01-05' rights = 'Kevin Kallaugher' class Crawle...
import re from comics.aggregator.crawler import CrawlerBase, CrawlerResult from comics.meta.base import MetaBase class Meta(MetaBase): name = "KAL's Cartoon" language = 'en' url = 'http://www.economist.com' start_date = '2006-01-05' rights = 'Kevin Kallaugher' class Crawler(CrawlerBase): hist...
Switch to regexp based matching of date instead of dateutil
Switch to regexp based matching of date instead of dateutil
Python
agpl-3.0
datagutten/comics,klette/comics,jodal/comics,jodal/comics,jodal/comics,datagutten/comics,klette/comics,klette/comics,datagutten/comics,datagutten/comics,jodal/comics
from dateutil.parser import parse from comics.aggregator.crawler import CrawlerBase, CrawlerResult from comics.meta.base import MetaBase class Meta(MetaBase): name = "KAL's Cartoon" language = 'en' url = 'http://www.economist.com' start_date = '2006-01-05' rights = 'Kevin Kallaugher' class Crawle...
import re from comics.aggregator.crawler import CrawlerBase, CrawlerResult from comics.meta.base import MetaBase class Meta(MetaBase): name = "KAL's Cartoon" language = 'en' url = 'http://www.economist.com' start_date = '2006-01-05' rights = 'Kevin Kallaugher' class Crawler(CrawlerBase): hist...
<commit_before>from dateutil.parser import parse from comics.aggregator.crawler import CrawlerBase, CrawlerResult from comics.meta.base import MetaBase class Meta(MetaBase): name = "KAL's Cartoon" language = 'en' url = 'http://www.economist.com' start_date = '2006-01-05' rights = 'Kevin Kallaugher...
import re from comics.aggregator.crawler import CrawlerBase, CrawlerResult from comics.meta.base import MetaBase class Meta(MetaBase): name = "KAL's Cartoon" language = 'en' url = 'http://www.economist.com' start_date = '2006-01-05' rights = 'Kevin Kallaugher' class Crawler(CrawlerBase): hist...
from dateutil.parser import parse from comics.aggregator.crawler import CrawlerBase, CrawlerResult from comics.meta.base import MetaBase class Meta(MetaBase): name = "KAL's Cartoon" language = 'en' url = 'http://www.economist.com' start_date = '2006-01-05' rights = 'Kevin Kallaugher' class Crawle...
<commit_before>from dateutil.parser import parse from comics.aggregator.crawler import CrawlerBase, CrawlerResult from comics.meta.base import MetaBase class Meta(MetaBase): name = "KAL's Cartoon" language = 'en' url = 'http://www.economist.com' start_date = '2006-01-05' rights = 'Kevin Kallaugher...