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
85ff425513c27191309c49bd78b2b94c59603349
examples/monitor.py
examples/monitor.py
#! /usr/bin/env python import dbus from dbus.mainloop.glib import DBusGMainLoop DBusGMainLoop(set_as_default=True) bus = dbus.SessionBus() bus.start_service_by_name("com.intel.Mojito") mojito = bus.get_object("com.intel.Mojito", "/com/intel/Mojito") mojito = dbus.Interface(mojito, "com.intel.Mojito") print mojito....
#! /usr/bin/env python import dbus, gobject from dbus.mainloop.glib import DBusGMainLoop DBusGMainLoop(set_as_default=True) bus = dbus.SessionBus() bus.start_service_by_name("com.intel.Mojito") mojito = bus.get_object("com.intel.Mojito", "/com/intel/Mojito") mojito = dbus.Interface(mojito, "com.intel.Mojito") path...
Create a view and start it
Create a view and start it
Python
lgpl-2.1
lcp/mojito,lcp/libsocialweb,GNOME/libsocialweb,GNOME/libsocialweb,lcp/mojito,ThomasBollmeier/libsocialweb-flickr-oauth,ThomasBollmeier/libsocialweb-flickr-oauth,lcp/libsocialweb,GNOME/libsocialweb,lcp/mojito,ThomasBollmeier/libsocialweb-flickr-oauth,lcp/libsocialweb
#! /usr/bin/env python import dbus from dbus.mainloop.glib import DBusGMainLoop DBusGMainLoop(set_as_default=True) bus = dbus.SessionBus() bus.start_service_by_name("com.intel.Mojito") mojito = bus.get_object("com.intel.Mojito", "/com/intel/Mojito") mojito = dbus.Interface(mojito, "com.intel.Mojito") print mojito....
#! /usr/bin/env python import dbus, gobject from dbus.mainloop.glib import DBusGMainLoop DBusGMainLoop(set_as_default=True) bus = dbus.SessionBus() bus.start_service_by_name("com.intel.Mojito") mojito = bus.get_object("com.intel.Mojito", "/com/intel/Mojito") mojito = dbus.Interface(mojito, "com.intel.Mojito") path...
<commit_before>#! /usr/bin/env python import dbus from dbus.mainloop.glib import DBusGMainLoop DBusGMainLoop(set_as_default=True) bus = dbus.SessionBus() bus.start_service_by_name("com.intel.Mojito") mojito = bus.get_object("com.intel.Mojito", "/com/intel/Mojito") mojito = dbus.Interface(mojito, "com.intel.Mojito")...
#! /usr/bin/env python import dbus, gobject from dbus.mainloop.glib import DBusGMainLoop DBusGMainLoop(set_as_default=True) bus = dbus.SessionBus() bus.start_service_by_name("com.intel.Mojito") mojito = bus.get_object("com.intel.Mojito", "/com/intel/Mojito") mojito = dbus.Interface(mojito, "com.intel.Mojito") path...
#! /usr/bin/env python import dbus from dbus.mainloop.glib import DBusGMainLoop DBusGMainLoop(set_as_default=True) bus = dbus.SessionBus() bus.start_service_by_name("com.intel.Mojito") mojito = bus.get_object("com.intel.Mojito", "/com/intel/Mojito") mojito = dbus.Interface(mojito, "com.intel.Mojito") print mojito....
<commit_before>#! /usr/bin/env python import dbus from dbus.mainloop.glib import DBusGMainLoop DBusGMainLoop(set_as_default=True) bus = dbus.SessionBus() bus.start_service_by_name("com.intel.Mojito") mojito = bus.get_object("com.intel.Mojito", "/com/intel/Mojito") mojito = dbus.Interface(mojito, "com.intel.Mojito")...
cc3a0f230c2f64fd2e4d974c536e9d2e99d89992
tilezilla/errors.py
tilezilla/errors.py
""" Errors generated by this module """ class ConfigException(Exception): pass class FillValueException(Exception): """ All of a tile is "fill" values """ pass
""" Errors generated by this module """ class ConfigException(Exception): pass class FillValueException(Exception): """ All of a tile is "fill" values """ pass class ProductNotFoundException(Exception): pass
Add exception for empty db search return
Add exception for empty db search return
Python
bsd-3-clause
ceholden/tilezilla,ceholden/landsat_tile,ceholden/landsat_tiles,ceholden/landsat_tile,ceholden/landsat_tiles
""" Errors generated by this module """ class ConfigException(Exception): pass class FillValueException(Exception): """ All of a tile is "fill" values """ pass Add exception for empty db search return
""" Errors generated by this module """ class ConfigException(Exception): pass class FillValueException(Exception): """ All of a tile is "fill" values """ pass class ProductNotFoundException(Exception): pass
<commit_before>""" Errors generated by this module """ class ConfigException(Exception): pass class FillValueException(Exception): """ All of a tile is "fill" values """ pass <commit_msg>Add exception for empty db search return<commit_after>
""" Errors generated by this module """ class ConfigException(Exception): pass class FillValueException(Exception): """ All of a tile is "fill" values """ pass class ProductNotFoundException(Exception): pass
""" Errors generated by this module """ class ConfigException(Exception): pass class FillValueException(Exception): """ All of a tile is "fill" values """ pass Add exception for empty db search return""" Errors generated by this module """ class ConfigException(Exception): pass class FillVal...
<commit_before>""" Errors generated by this module """ class ConfigException(Exception): pass class FillValueException(Exception): """ All of a tile is "fill" values """ pass <commit_msg>Add exception for empty db search return<commit_after>""" Errors generated by this module """ class ConfigExcep...
1592aa20fb41fed607ac48fd6ac1038f4bb6c665
pylib/cqlshlib/__init__.py
pylib/cqlshlib/__init__.py
# Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not u...
# Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not u...
Add extension handler for "scylla_encryption_options"
cqlsh: Add extension handler for "scylla_encryption_options" Refs #731 Scylla encryption options are not stored with "normal" options. Because these are 100% intertwined with drivers, and adding stuff there breaks things. Instead they are extensions. The python driver allows adding extension handlers to print info a...
Python
apache-2.0
scylladb/scylla-tools-java,scylladb/scylla-tools-java,scylladb/scylla-tools-java,scylladb/scylla-tools-java
# Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not u...
# Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not u...
<commit_before># Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License")...
# Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not u...
# Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not u...
<commit_before># Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License")...
79404e483462fd71aed1150e91657becd8a5aaf8
clifford/test/test_multivector_inverse.py
clifford/test/test_multivector_inverse.py
import numpy as np import pytest import clifford as cf class TestClosedForm: @pytest.mark.parametrize('p, q', [ (p, total_dims - p) for total_dims in [1, 2, 3, 4, 5] for p in range(total_dims + 1) ]) def test_hitzer_inverse(self, p, q): Ntests = 100 layout, blades...
import numpy as np import pytest import clifford as cf class TestClosedForm: @pytest.mark.parametrize('p, q', [ (p, total_dims - p) for total_dims in [1, 2, 3, 4, 5] for p in range(total_dims + 1) ]) def test_hitzer_inverse(self, p, q): Ntests = 100 layout, blades...
Swap hitzer inverse test to use np.testing
Swap hitzer inverse test to use np.testing
Python
bsd-3-clause
arsenovic/clifford,arsenovic/clifford
import numpy as np import pytest import clifford as cf class TestClosedForm: @pytest.mark.parametrize('p, q', [ (p, total_dims - p) for total_dims in [1, 2, 3, 4, 5] for p in range(total_dims + 1) ]) def test_hitzer_inverse(self, p, q): Ntests = 100 layout, blades...
import numpy as np import pytest import clifford as cf class TestClosedForm: @pytest.mark.parametrize('p, q', [ (p, total_dims - p) for total_dims in [1, 2, 3, 4, 5] for p in range(total_dims + 1) ]) def test_hitzer_inverse(self, p, q): Ntests = 100 layout, blades...
<commit_before>import numpy as np import pytest import clifford as cf class TestClosedForm: @pytest.mark.parametrize('p, q', [ (p, total_dims - p) for total_dims in [1, 2, 3, 4, 5] for p in range(total_dims + 1) ]) def test_hitzer_inverse(self, p, q): Ntests = 100 ...
import numpy as np import pytest import clifford as cf class TestClosedForm: @pytest.mark.parametrize('p, q', [ (p, total_dims - p) for total_dims in [1, 2, 3, 4, 5] for p in range(total_dims + 1) ]) def test_hitzer_inverse(self, p, q): Ntests = 100 layout, blades...
import numpy as np import pytest import clifford as cf class TestClosedForm: @pytest.mark.parametrize('p, q', [ (p, total_dims - p) for total_dims in [1, 2, 3, 4, 5] for p in range(total_dims + 1) ]) def test_hitzer_inverse(self, p, q): Ntests = 100 layout, blades...
<commit_before>import numpy as np import pytest import clifford as cf class TestClosedForm: @pytest.mark.parametrize('p, q', [ (p, total_dims - p) for total_dims in [1, 2, 3, 4, 5] for p in range(total_dims + 1) ]) def test_hitzer_inverse(self, p, q): Ntests = 100 ...
ba8509a34104ff6aab5e97a6bed842b245ec4b64
examples/pi-montecarlo/pi_distarray.py
examples/pi-montecarlo/pi_distarray.py
# encoding: utf-8 # --------------------------------------------------------------------------- # Copyright (C) 2008-2014, IPython Development Team and Enthought, Inc. # Distributed under the terms of the BSD License. See COPYING.rst. # --------------------------------------------------------------------------- """...
# encoding: utf-8 # --------------------------------------------------------------------------- # Copyright (C) 2008-2014, IPython Development Team and Enthought, Inc. # Distributed under the terms of the BSD License. See COPYING.rst. # --------------------------------------------------------------------------- """...
Update pi-montecarlo example to use `sum` again.
Update pi-montecarlo example to use `sum` again.
Python
bsd-3-clause
RaoUmer/distarray,enthought/distarray,enthought/distarray,RaoUmer/distarray
# encoding: utf-8 # --------------------------------------------------------------------------- # Copyright (C) 2008-2014, IPython Development Team and Enthought, Inc. # Distributed under the terms of the BSD License. See COPYING.rst. # --------------------------------------------------------------------------- """...
# encoding: utf-8 # --------------------------------------------------------------------------- # Copyright (C) 2008-2014, IPython Development Team and Enthought, Inc. # Distributed under the terms of the BSD License. See COPYING.rst. # --------------------------------------------------------------------------- """...
<commit_before># encoding: utf-8 # --------------------------------------------------------------------------- # Copyright (C) 2008-2014, IPython Development Team and Enthought, Inc. # Distributed under the terms of the BSD License. See COPYING.rst. # -----------------------------------------------------------------...
# encoding: utf-8 # --------------------------------------------------------------------------- # Copyright (C) 2008-2014, IPython Development Team and Enthought, Inc. # Distributed under the terms of the BSD License. See COPYING.rst. # --------------------------------------------------------------------------- """...
# encoding: utf-8 # --------------------------------------------------------------------------- # Copyright (C) 2008-2014, IPython Development Team and Enthought, Inc. # Distributed under the terms of the BSD License. See COPYING.rst. # --------------------------------------------------------------------------- """...
<commit_before># encoding: utf-8 # --------------------------------------------------------------------------- # Copyright (C) 2008-2014, IPython Development Team and Enthought, Inc. # Distributed under the terms of the BSD License. See COPYING.rst. # -----------------------------------------------------------------...
bba6c1f65010c208909d4f342b1d776c46c040c8
Lib/importlib/test/__main__.py
Lib/importlib/test/__main__.py
import os.path from test.support import run_unittest import unittest def test_main(): start_dir = os.path.dirname(__file__) top_dir = os.path.dirname(os.path.dirname(start_dir)) test_loader = unittest.TestLoader() run_unittest(test_loader.discover(start_dir, top_level_dir=top_dir)) if __name__ == '_...
import importlib from importlib.test.import_ import util import os.path from test.support import run_unittest import sys import unittest def test_main(): start_dir = os.path.dirname(__file__) top_dir = os.path.dirname(os.path.dirname(start_dir)) test_loader = unittest.TestLoader() if '--builtin' in sy...
Add support for a --builtin argument to importlib.test to trigger running import-specific tests with __import__ instead of importlib.
Add support for a --builtin argument to importlib.test to trigger running import-specific tests with __import__ instead of importlib.
Python
mit
sk-/python2.7-type-annotator,sk-/python2.7-type-annotator,sk-/python2.7-type-annotator
import os.path from test.support import run_unittest import unittest def test_main(): start_dir = os.path.dirname(__file__) top_dir = os.path.dirname(os.path.dirname(start_dir)) test_loader = unittest.TestLoader() run_unittest(test_loader.discover(start_dir, top_level_dir=top_dir)) if __name__ == '_...
import importlib from importlib.test.import_ import util import os.path from test.support import run_unittest import sys import unittest def test_main(): start_dir = os.path.dirname(__file__) top_dir = os.path.dirname(os.path.dirname(start_dir)) test_loader = unittest.TestLoader() if '--builtin' in sy...
<commit_before>import os.path from test.support import run_unittest import unittest def test_main(): start_dir = os.path.dirname(__file__) top_dir = os.path.dirname(os.path.dirname(start_dir)) test_loader = unittest.TestLoader() run_unittest(test_loader.discover(start_dir, top_level_dir=top_dir)) if...
import importlib from importlib.test.import_ import util import os.path from test.support import run_unittest import sys import unittest def test_main(): start_dir = os.path.dirname(__file__) top_dir = os.path.dirname(os.path.dirname(start_dir)) test_loader = unittest.TestLoader() if '--builtin' in sy...
import os.path from test.support import run_unittest import unittest def test_main(): start_dir = os.path.dirname(__file__) top_dir = os.path.dirname(os.path.dirname(start_dir)) test_loader = unittest.TestLoader() run_unittest(test_loader.discover(start_dir, top_level_dir=top_dir)) if __name__ == '_...
<commit_before>import os.path from test.support import run_unittest import unittest def test_main(): start_dir = os.path.dirname(__file__) top_dir = os.path.dirname(os.path.dirname(start_dir)) test_loader = unittest.TestLoader() run_unittest(test_loader.discover(start_dir, top_level_dir=top_dir)) if...
8b7c5b7001ac005849fb31d83415db3a6517feb7
reddit_adzerk/adzerkads.py
reddit_adzerk/adzerkads.py
from pylons import c, g from r2.lib.pages import Ads as BaseAds class Ads(BaseAds): def __init__(self): BaseAds.__init__(self) adzerk_test_srs = g.live_config.get("adzerk_test_srs") if adzerk_test_srs and c.site.name in adzerk_test_srs: self.ad_url = g.config["adzerk_url"]
from pylons import c, g from r2.lib.pages import Ads as BaseAds class Ads(BaseAds): def __init__(self): BaseAds.__init__(self) adzerk_test_srs = g.live_config.get("adzerk_test_srs") if adzerk_test_srs and c.site.name in adzerk_test_srs: self.ad_url = g.config["adzerk_url"] ...
Set the frame id to what aderk expects.
Set the frame id to what aderk expects. (See a corresponding change to ads.html in reddit)
Python
bsd-3-clause
madbook/reddit-plugin-adzerk,madbook/reddit-plugin-adzerk,madbook/reddit-plugin-adzerk
from pylons import c, g from r2.lib.pages import Ads as BaseAds class Ads(BaseAds): def __init__(self): BaseAds.__init__(self) adzerk_test_srs = g.live_config.get("adzerk_test_srs") if adzerk_test_srs and c.site.name in adzerk_test_srs: self.ad_url = g.config["adzerk_url"] Set...
from pylons import c, g from r2.lib.pages import Ads as BaseAds class Ads(BaseAds): def __init__(self): BaseAds.__init__(self) adzerk_test_srs = g.live_config.get("adzerk_test_srs") if adzerk_test_srs and c.site.name in adzerk_test_srs: self.ad_url = g.config["adzerk_url"] ...
<commit_before>from pylons import c, g from r2.lib.pages import Ads as BaseAds class Ads(BaseAds): def __init__(self): BaseAds.__init__(self) adzerk_test_srs = g.live_config.get("adzerk_test_srs") if adzerk_test_srs and c.site.name in adzerk_test_srs: self.ad_url = g.config["a...
from pylons import c, g from r2.lib.pages import Ads as BaseAds class Ads(BaseAds): def __init__(self): BaseAds.__init__(self) adzerk_test_srs = g.live_config.get("adzerk_test_srs") if adzerk_test_srs and c.site.name in adzerk_test_srs: self.ad_url = g.config["adzerk_url"] ...
from pylons import c, g from r2.lib.pages import Ads as BaseAds class Ads(BaseAds): def __init__(self): BaseAds.__init__(self) adzerk_test_srs = g.live_config.get("adzerk_test_srs") if adzerk_test_srs and c.site.name in adzerk_test_srs: self.ad_url = g.config["adzerk_url"] Set...
<commit_before>from pylons import c, g from r2.lib.pages import Ads as BaseAds class Ads(BaseAds): def __init__(self): BaseAds.__init__(self) adzerk_test_srs = g.live_config.get("adzerk_test_srs") if adzerk_test_srs and c.site.name in adzerk_test_srs: self.ad_url = g.config["a...
7df717a48fb74ddd3b9ade644fb805020a20e91c
axiom/test/historic/test_processor1to2.py
axiom/test/historic/test_processor1to2.py
from axiom.item import Item from axiom.attributes import text from axiom.batch import processor from axiom.iaxiom import IScheduler from axiom.test.historic.stubloader import StubbedTest from axiom.test.historic.stub_processor1to2 import DummyProcessor class ProcessorUpgradeTest(StubbedTest): def setUp(self): ...
from twisted.internet.defer import Deferred from axiom.test.historic.stubloader import StubbedTest from axiom.test.historic.stub_processor1to2 import DummyProcessor class ProcessorUpgradeTest(StubbedTest): def setUp(self): # Ick, we need to catch the run event of DummyProcessor, and I can't # thi...
Fix an intermittent axiom test failure that occurs only in certain environments.
Fix an intermittent axiom test failure that occurs only in certain environments. Fixes #2857 Author: glyph Reviewer: exarkun, mithrandi This change fixes `axiom.test.historic.test_processor1to2.ProcessorUpgradeTest.test_pollingRemoval` to wait until its processor has actually been run before making any assertions.
Python
mit
twisted/axiom,hawkowl/axiom
from axiom.item import Item from axiom.attributes import text from axiom.batch import processor from axiom.iaxiom import IScheduler from axiom.test.historic.stubloader import StubbedTest from axiom.test.historic.stub_processor1to2 import DummyProcessor class ProcessorUpgradeTest(StubbedTest): def setUp(self): ...
from twisted.internet.defer import Deferred from axiom.test.historic.stubloader import StubbedTest from axiom.test.historic.stub_processor1to2 import DummyProcessor class ProcessorUpgradeTest(StubbedTest): def setUp(self): # Ick, we need to catch the run event of DummyProcessor, and I can't # thi...
<commit_before> from axiom.item import Item from axiom.attributes import text from axiom.batch import processor from axiom.iaxiom import IScheduler from axiom.test.historic.stubloader import StubbedTest from axiom.test.historic.stub_processor1to2 import DummyProcessor class ProcessorUpgradeTest(StubbedTest): de...
from twisted.internet.defer import Deferred from axiom.test.historic.stubloader import StubbedTest from axiom.test.historic.stub_processor1to2 import DummyProcessor class ProcessorUpgradeTest(StubbedTest): def setUp(self): # Ick, we need to catch the run event of DummyProcessor, and I can't # thi...
from axiom.item import Item from axiom.attributes import text from axiom.batch import processor from axiom.iaxiom import IScheduler from axiom.test.historic.stubloader import StubbedTest from axiom.test.historic.stub_processor1to2 import DummyProcessor class ProcessorUpgradeTest(StubbedTest): def setUp(self): ...
<commit_before> from axiom.item import Item from axiom.attributes import text from axiom.batch import processor from axiom.iaxiom import IScheduler from axiom.test.historic.stubloader import StubbedTest from axiom.test.historic.stub_processor1to2 import DummyProcessor class ProcessorUpgradeTest(StubbedTest): de...
a7692bc810d1a30c9d0fa91bf1689651bd34d8c6
moniek/accounting/views.py
moniek/accounting/views.py
from django.http import HttpResponse def home(request): return HttpResponse("Hi")
from django.http import HttpResponse from django.template import RequestContext from django.shortcuts import render_to_response def home(request): return render_to_response('accounting/home.html', {}, RequestContext(request)) def accounts(request): return HttpResponse("Hi")
Create home and accounts stub view
Create home and accounts stub view Signed-off-by: Bas Westerbaan <[email protected]>
Python
agpl-3.0
bwesterb/moniek,bwesterb/moniek
from django.http import HttpResponse def home(request): return HttpResponse("Hi") Create home and accounts stub view Signed-off-by: Bas Westerbaan <[email protected]>
from django.http import HttpResponse from django.template import RequestContext from django.shortcuts import render_to_response def home(request): return render_to_response('accounting/home.html', {}, RequestContext(request)) def accounts(request): return HttpResponse("Hi")
<commit_before>from django.http import HttpResponse def home(request): return HttpResponse("Hi") <commit_msg>Create home and accounts stub view Signed-off-by: Bas Westerbaan <[email protected]><commit_after>
from django.http import HttpResponse from django.template import RequestContext from django.shortcuts import render_to_response def home(request): return render_to_response('accounting/home.html', {}, RequestContext(request)) def accounts(request): return HttpResponse("Hi")
from django.http import HttpResponse def home(request): return HttpResponse("Hi") Create home and accounts stub view Signed-off-by: Bas Westerbaan <[email protected]>from django.http import HttpResponse from django.template import RequestContext from django.shortcuts import ren...
<commit_before>from django.http import HttpResponse def home(request): return HttpResponse("Hi") <commit_msg>Create home and accounts stub view Signed-off-by: Bas Westerbaan <[email protected]><commit_after>from django.http import HttpResponse from django.template import Reques...
1c736a5f48b2deb9732c65a5dec7ea47e542f6f4
thinc/neural/_classes/resnet.py
thinc/neural/_classes/resnet.py
from .model import Model from ...api import layerize from .affine import Affine class Residual(Model): def __init__(self, layer): Model.__init__(self) self._layers.append(layer) self.on_data_hooks.append(on_data) def __call__(self, X): return X + self._layers[0](X) def be...
from .model import Model from ...api import layerize from .affine import Affine class Residual(Model): def __init__(self, layer): Model.__init__(self) self._layers.append(layer) self.on_data_hooks.append(on_data) def __call__(self, X): Y = self._layers[0](X) if isinsta...
Make residual connections work for list-valued inputs
Make residual connections work for list-valued inputs
Python
mit
spacy-io/thinc,spacy-io/thinc,explosion/thinc,explosion/thinc,spacy-io/thinc,explosion/thinc,explosion/thinc
from .model import Model from ...api import layerize from .affine import Affine class Residual(Model): def __init__(self, layer): Model.__init__(self) self._layers.append(layer) self.on_data_hooks.append(on_data) def __call__(self, X): return X + self._layers[0](X) def be...
from .model import Model from ...api import layerize from .affine import Affine class Residual(Model): def __init__(self, layer): Model.__init__(self) self._layers.append(layer) self.on_data_hooks.append(on_data) def __call__(self, X): Y = self._layers[0](X) if isinsta...
<commit_before>from .model import Model from ...api import layerize from .affine import Affine class Residual(Model): def __init__(self, layer): Model.__init__(self) self._layers.append(layer) self.on_data_hooks.append(on_data) def __call__(self, X): return X + self._layers[0]...
from .model import Model from ...api import layerize from .affine import Affine class Residual(Model): def __init__(self, layer): Model.__init__(self) self._layers.append(layer) self.on_data_hooks.append(on_data) def __call__(self, X): Y = self._layers[0](X) if isinsta...
from .model import Model from ...api import layerize from .affine import Affine class Residual(Model): def __init__(self, layer): Model.__init__(self) self._layers.append(layer) self.on_data_hooks.append(on_data) def __call__(self, X): return X + self._layers[0](X) def be...
<commit_before>from .model import Model from ...api import layerize from .affine import Affine class Residual(Model): def __init__(self, layer): Model.__init__(self) self._layers.append(layer) self.on_data_hooks.append(on_data) def __call__(self, X): return X + self._layers[0]...
db24629b7cc34f9a137c6bc5569dc7a39245fa52
thinglang/compiler/sentinels.py
thinglang/compiler/sentinels.py
from thinglang.compiler.opcodes import MEMBERS, METHODS, FRAME_SIZE, ARGUMENTS from thinglang.compiler.opcodes import Opcode class SentinelThingDefinition(Opcode): """ Signifies the start of thing definition """ ARGS = MEMBERS, METHODS class SentinelMethodDefinition(Opcode): """ Signifies a ...
from thinglang.compiler.opcodes import MEMBERS, METHODS, FRAME_SIZE, ARGUMENTS from thinglang.compiler.opcodes import Opcode class SentinelImportTableEntry(Opcode): """ Signifies an import table entry """ class SentinelImportTableEnd(Opcode): """ Signifies the end of the import table """ c...
Add serialization sentintels for import table
Add serialization sentintels for import table
Python
mit
ytanay/thinglang,ytanay/thinglang,ytanay/thinglang,ytanay/thinglang
from thinglang.compiler.opcodes import MEMBERS, METHODS, FRAME_SIZE, ARGUMENTS from thinglang.compiler.opcodes import Opcode class SentinelThingDefinition(Opcode): """ Signifies the start of thing definition """ ARGS = MEMBERS, METHODS class SentinelMethodDefinition(Opcode): """ Signifies a ...
from thinglang.compiler.opcodes import MEMBERS, METHODS, FRAME_SIZE, ARGUMENTS from thinglang.compiler.opcodes import Opcode class SentinelImportTableEntry(Opcode): """ Signifies an import table entry """ class SentinelImportTableEnd(Opcode): """ Signifies the end of the import table """ c...
<commit_before>from thinglang.compiler.opcodes import MEMBERS, METHODS, FRAME_SIZE, ARGUMENTS from thinglang.compiler.opcodes import Opcode class SentinelThingDefinition(Opcode): """ Signifies the start of thing definition """ ARGS = MEMBERS, METHODS class SentinelMethodDefinition(Opcode): """ ...
from thinglang.compiler.opcodes import MEMBERS, METHODS, FRAME_SIZE, ARGUMENTS from thinglang.compiler.opcodes import Opcode class SentinelImportTableEntry(Opcode): """ Signifies an import table entry """ class SentinelImportTableEnd(Opcode): """ Signifies the end of the import table """ c...
from thinglang.compiler.opcodes import MEMBERS, METHODS, FRAME_SIZE, ARGUMENTS from thinglang.compiler.opcodes import Opcode class SentinelThingDefinition(Opcode): """ Signifies the start of thing definition """ ARGS = MEMBERS, METHODS class SentinelMethodDefinition(Opcode): """ Signifies a ...
<commit_before>from thinglang.compiler.opcodes import MEMBERS, METHODS, FRAME_SIZE, ARGUMENTS from thinglang.compiler.opcodes import Opcode class SentinelThingDefinition(Opcode): """ Signifies the start of thing definition """ ARGS = MEMBERS, METHODS class SentinelMethodDefinition(Opcode): """ ...
b3adfb4913638151307b0f04d87afc01dec78e84
tob-api/api/indy/claimParser.py
tob-api/api/indy/claimParser.py
import json import logging class ClaimParser(object): """ Parses a generic claim. """ def __init__(self, claim: str) -> None: self.__logger = logging.getLogger(__name__) self.__orgData = claim self.__parse() def __parse(self): self.__logger.debug("Parsing claim ...") ...
import json import logging class ClaimParser(object): """ Parses a generic claim. """ def __init__(self, claim: str) -> None: self.__logger = logging.getLogger(__name__) self.__orgData = claim self.__parse() def __parse(self): self.__logger.debug("Parsing claim ...") ...
Fix error when saving the claim to the wallet.
Fix error when saving the claim to the wallet.
Python
apache-2.0
WadeBarnes/TheOrgBook,swcurran/TheOrgBook,swcurran/TheOrgBook,WadeBarnes/TheOrgBook,WadeBarnes/TheOrgBook,swcurran/TheOrgBook,WadeBarnes/TheOrgBook,swcurran/TheOrgBook,swcurran/TheOrgBook,WadeBarnes/TheOrgBook
import json import logging class ClaimParser(object): """ Parses a generic claim. """ def __init__(self, claim: str) -> None: self.__logger = logging.getLogger(__name__) self.__orgData = claim self.__parse() def __parse(self): self.__logger.debug("Parsing claim ...") ...
import json import logging class ClaimParser(object): """ Parses a generic claim. """ def __init__(self, claim: str) -> None: self.__logger = logging.getLogger(__name__) self.__orgData = claim self.__parse() def __parse(self): self.__logger.debug("Parsing claim ...") ...
<commit_before>import json import logging class ClaimParser(object): """ Parses a generic claim. """ def __init__(self, claim: str) -> None: self.__logger = logging.getLogger(__name__) self.__orgData = claim self.__parse() def __parse(self): self.__logger.debug("Parsing cla...
import json import logging class ClaimParser(object): """ Parses a generic claim. """ def __init__(self, claim: str) -> None: self.__logger = logging.getLogger(__name__) self.__orgData = claim self.__parse() def __parse(self): self.__logger.debug("Parsing claim ...") ...
import json import logging class ClaimParser(object): """ Parses a generic claim. """ def __init__(self, claim: str) -> None: self.__logger = logging.getLogger(__name__) self.__orgData = claim self.__parse() def __parse(self): self.__logger.debug("Parsing claim ...") ...
<commit_before>import json import logging class ClaimParser(object): """ Parses a generic claim. """ def __init__(self, claim: str) -> None: self.__logger = logging.getLogger(__name__) self.__orgData = claim self.__parse() def __parse(self): self.__logger.debug("Parsing cla...
57461a7ebd35544c506e6b5021ff11c3b6dd943e
normandy/studies/models.py
normandy/studies/models.py
from django.db import models from django.template.loader import render_to_string from normandy.recipes.models import Recipe class Extension(models.Model): name = models.CharField(max_length=255) xpi = models.FileField(upload_to='extensions') @property def recipes_used_by(self): """Set of ena...
from django.db import models from django.template.loader import render_to_string from normandy.recipes.models import Recipe class Extension(models.Model): name = models.CharField(max_length=255) xpi = models.FileField(upload_to='extensions') class Meta: ordering = ('-id',) @property def...
Add ordering to Extension model
Add ordering to Extension model
Python
mpl-2.0
mozilla/normandy,mozilla/normandy,mozilla/normandy,mozilla/normandy
from django.db import models from django.template.loader import render_to_string from normandy.recipes.models import Recipe class Extension(models.Model): name = models.CharField(max_length=255) xpi = models.FileField(upload_to='extensions') @property def recipes_used_by(self): """Set of ena...
from django.db import models from django.template.loader import render_to_string from normandy.recipes.models import Recipe class Extension(models.Model): name = models.CharField(max_length=255) xpi = models.FileField(upload_to='extensions') class Meta: ordering = ('-id',) @property def...
<commit_before>from django.db import models from django.template.loader import render_to_string from normandy.recipes.models import Recipe class Extension(models.Model): name = models.CharField(max_length=255) xpi = models.FileField(upload_to='extensions') @property def recipes_used_by(self): ...
from django.db import models from django.template.loader import render_to_string from normandy.recipes.models import Recipe class Extension(models.Model): name = models.CharField(max_length=255) xpi = models.FileField(upload_to='extensions') class Meta: ordering = ('-id',) @property def...
from django.db import models from django.template.loader import render_to_string from normandy.recipes.models import Recipe class Extension(models.Model): name = models.CharField(max_length=255) xpi = models.FileField(upload_to='extensions') @property def recipes_used_by(self): """Set of ena...
<commit_before>from django.db import models from django.template.loader import render_to_string from normandy.recipes.models import Recipe class Extension(models.Model): name = models.CharField(max_length=255) xpi = models.FileField(upload_to='extensions') @property def recipes_used_by(self): ...
948f57469bc9e8144d6fceb49b5e2cf1d5858eeb
ores/wsgi/preprocessors.py
ores/wsgi/preprocessors.py
from functools import wraps from flask import current_app, request def minifiable(f): @wraps(f) def wrapped_f(*args, **kwargs): format_ = request.args.get('format') if format_ == 'json': current_app.config['JSONIFY_PRETTYPRINT_REGULAR'] = False return f(*args, **kwargs) ...
from functools import wraps from flask import current_app, request def minifiable(f): @wraps(f) def wrapped_f(*args, **kwargs): current_app.config['JSONIFY_PRETTYPRINT_REGULAR'] = \ request.args.get('format') != 'json' return f(*args, **kwargs) return wrapped_f
Set minify to False as well as sometimes setting it to True.
Set minify to False as well as sometimes setting it to True.
Python
mit
wiki-ai/ores,he7d3r/ores,he7d3r/ores,wiki-ai/ores,wiki-ai/ores,he7d3r/ores
from functools import wraps from flask import current_app, request def minifiable(f): @wraps(f) def wrapped_f(*args, **kwargs): format_ = request.args.get('format') if format_ == 'json': current_app.config['JSONIFY_PRETTYPRINT_REGULAR'] = False return f(*args, **kwargs) ...
from functools import wraps from flask import current_app, request def minifiable(f): @wraps(f) def wrapped_f(*args, **kwargs): current_app.config['JSONIFY_PRETTYPRINT_REGULAR'] = \ request.args.get('format') != 'json' return f(*args, **kwargs) return wrapped_f
<commit_before>from functools import wraps from flask import current_app, request def minifiable(f): @wraps(f) def wrapped_f(*args, **kwargs): format_ = request.args.get('format') if format_ == 'json': current_app.config['JSONIFY_PRETTYPRINT_REGULAR'] = False return f(*ar...
from functools import wraps from flask import current_app, request def minifiable(f): @wraps(f) def wrapped_f(*args, **kwargs): current_app.config['JSONIFY_PRETTYPRINT_REGULAR'] = \ request.args.get('format') != 'json' return f(*args, **kwargs) return wrapped_f
from functools import wraps from flask import current_app, request def minifiable(f): @wraps(f) def wrapped_f(*args, **kwargs): format_ = request.args.get('format') if format_ == 'json': current_app.config['JSONIFY_PRETTYPRINT_REGULAR'] = False return f(*args, **kwargs) ...
<commit_before>from functools import wraps from flask import current_app, request def minifiable(f): @wraps(f) def wrapped_f(*args, **kwargs): format_ = request.args.get('format') if format_ == 'json': current_app.config['JSONIFY_PRETTYPRINT_REGULAR'] = False return f(*ar...
8a577edcc723ad30cc1b84c00435474e980353d3
gaphor/diagram/profiles/extension.py
gaphor/diagram/profiles/extension.py
""" ExtensionItem -- Graphical representation of an association. """ # TODO: for Extension.postload(): in some cases where the association ends # are connected to the same Class, the head_end property is connected to the # tail end and visa versa. from gaphor import UML from gaphor.diagram.diagramline import NamedLin...
""" ExtensionItem -- Graphical representation of an association. """ # TODO: for Extension.postload(): in some cases where the association ends # are connected to the same Class, the head_end property is connected to the # tail end and visa versa. from gaphor import UML from gaphor.UML.modelfactory import stereotypes...
Convert Extension item to new line style
Convert Extension item to new line style
Python
lgpl-2.1
amolenaar/gaphor,amolenaar/gaphor
""" ExtensionItem -- Graphical representation of an association. """ # TODO: for Extension.postload(): in some cases where the association ends # are connected to the same Class, the head_end property is connected to the # tail end and visa versa. from gaphor import UML from gaphor.diagram.diagramline import NamedLin...
""" ExtensionItem -- Graphical representation of an association. """ # TODO: for Extension.postload(): in some cases where the association ends # are connected to the same Class, the head_end property is connected to the # tail end and visa versa. from gaphor import UML from gaphor.UML.modelfactory import stereotypes...
<commit_before>""" ExtensionItem -- Graphical representation of an association. """ # TODO: for Extension.postload(): in some cases where the association ends # are connected to the same Class, the head_end property is connected to the # tail end and visa versa. from gaphor import UML from gaphor.diagram.diagramline ...
""" ExtensionItem -- Graphical representation of an association. """ # TODO: for Extension.postload(): in some cases where the association ends # are connected to the same Class, the head_end property is connected to the # tail end and visa versa. from gaphor import UML from gaphor.UML.modelfactory import stereotypes...
""" ExtensionItem -- Graphical representation of an association. """ # TODO: for Extension.postload(): in some cases where the association ends # are connected to the same Class, the head_end property is connected to the # tail end and visa versa. from gaphor import UML from gaphor.diagram.diagramline import NamedLin...
<commit_before>""" ExtensionItem -- Graphical representation of an association. """ # TODO: for Extension.postload(): in some cases where the association ends # are connected to the same Class, the head_end property is connected to the # tail end and visa versa. from gaphor import UML from gaphor.diagram.diagramline ...
26f0b938bb8619f3ec705ff247c4d671613883fa
django/santropolFeast/member/factories.py
django/santropolFeast/member/factories.py
# coding=utf-8 import factory import datetime import random from django.contrib.auth.models import User from member.models import Member, Address, Contact, Client, PAYMENT_TYPE from member.models import DELIVERY_TYPE, GENDER_CHOICES class AddressFactory (factory.DjangoModelFactory): class Meta: model = A...
# coding=utf-8 import factory import datetime import random from django.contrib.auth.models import User from member.models import Member, Address, Contact, Client, PAYMENT_TYPE, Route from member.models import DELIVERY_TYPE, GENDER_CHOICES class AddressFactory (factory.DjangoModelFactory): class Meta: mo...
Add a random <Route> to a generated <Client>
Add a random <Route> to a generated <Client> Issue #214
Python
agpl-3.0
savoirfairelinux/sous-chef,savoirfairelinux/sous-chef,madmath/sous-chef,savoirfairelinux/santropol-feast,madmath/sous-chef,madmath/sous-chef,savoirfairelinux/sous-chef,savoirfairelinux/santropol-feast,savoirfairelinux/santropol-feast
# coding=utf-8 import factory import datetime import random from django.contrib.auth.models import User from member.models import Member, Address, Contact, Client, PAYMENT_TYPE from member.models import DELIVERY_TYPE, GENDER_CHOICES class AddressFactory (factory.DjangoModelFactory): class Meta: model = A...
# coding=utf-8 import factory import datetime import random from django.contrib.auth.models import User from member.models import Member, Address, Contact, Client, PAYMENT_TYPE, Route from member.models import DELIVERY_TYPE, GENDER_CHOICES class AddressFactory (factory.DjangoModelFactory): class Meta: mo...
<commit_before># coding=utf-8 import factory import datetime import random from django.contrib.auth.models import User from member.models import Member, Address, Contact, Client, PAYMENT_TYPE from member.models import DELIVERY_TYPE, GENDER_CHOICES class AddressFactory (factory.DjangoModelFactory): class Meta: ...
# coding=utf-8 import factory import datetime import random from django.contrib.auth.models import User from member.models import Member, Address, Contact, Client, PAYMENT_TYPE, Route from member.models import DELIVERY_TYPE, GENDER_CHOICES class AddressFactory (factory.DjangoModelFactory): class Meta: mo...
# coding=utf-8 import factory import datetime import random from django.contrib.auth.models import User from member.models import Member, Address, Contact, Client, PAYMENT_TYPE from member.models import DELIVERY_TYPE, GENDER_CHOICES class AddressFactory (factory.DjangoModelFactory): class Meta: model = A...
<commit_before># coding=utf-8 import factory import datetime import random from django.contrib.auth.models import User from member.models import Member, Address, Contact, Client, PAYMENT_TYPE from member.models import DELIVERY_TYPE, GENDER_CHOICES class AddressFactory (factory.DjangoModelFactory): class Meta: ...
7a3863355c36347c691d35166932e83a3f0352ea
examples/rmg/minimal_sensitivity/input.py
examples/rmg/minimal_sensitivity/input.py
# Data sources database( thermoLibraries = ['primaryThermoLibrary'], reactionLibraries = [], seedMechanisms = [], kineticsDepositories = ['training'], kineticsFamilies = ['!Intra_Disproportionation','!Substitution_O'], kineticsEstimator = 'rate rules', ) # List of species species( label='et...
# Data sources database( thermoLibraries = ['primaryThermoLibrary'], reactionLibraries = [], seedMechanisms = [], kineticsDepositories = ['training'], kineticsFamilies = ['!Intra_Disproportionation','!Substitution_O'], kineticsEstimator = 'rate rules', ) # Constraints on generated species gener...
Update RMG example minimal_sensitivity with multiplicity label
Update RMG example minimal_sensitivity with multiplicity label
Python
mit
nyee/RMG-Py,nyee/RMG-Py,enochd/RMG-Py,comocheng/RMG-Py,pierrelb/RMG-Py,chatelak/RMG-Py,chatelak/RMG-Py,comocheng/RMG-Py,pierrelb/RMG-Py,enochd/RMG-Py,nickvandewiele/RMG-Py,nickvandewiele/RMG-Py
# Data sources database( thermoLibraries = ['primaryThermoLibrary'], reactionLibraries = [], seedMechanisms = [], kineticsDepositories = ['training'], kineticsFamilies = ['!Intra_Disproportionation','!Substitution_O'], kineticsEstimator = 'rate rules', ) # List of species species( label='et...
# Data sources database( thermoLibraries = ['primaryThermoLibrary'], reactionLibraries = [], seedMechanisms = [], kineticsDepositories = ['training'], kineticsFamilies = ['!Intra_Disproportionation','!Substitution_O'], kineticsEstimator = 'rate rules', ) # Constraints on generated species gener...
<commit_before># Data sources database( thermoLibraries = ['primaryThermoLibrary'], reactionLibraries = [], seedMechanisms = [], kineticsDepositories = ['training'], kineticsFamilies = ['!Intra_Disproportionation','!Substitution_O'], kineticsEstimator = 'rate rules', ) # List of species species...
# Data sources database( thermoLibraries = ['primaryThermoLibrary'], reactionLibraries = [], seedMechanisms = [], kineticsDepositories = ['training'], kineticsFamilies = ['!Intra_Disproportionation','!Substitution_O'], kineticsEstimator = 'rate rules', ) # Constraints on generated species gener...
# Data sources database( thermoLibraries = ['primaryThermoLibrary'], reactionLibraries = [], seedMechanisms = [], kineticsDepositories = ['training'], kineticsFamilies = ['!Intra_Disproportionation','!Substitution_O'], kineticsEstimator = 'rate rules', ) # List of species species( label='et...
<commit_before># Data sources database( thermoLibraries = ['primaryThermoLibrary'], reactionLibraries = [], seedMechanisms = [], kineticsDepositories = ['training'], kineticsFamilies = ['!Intra_Disproportionation','!Substitution_O'], kineticsEstimator = 'rate rules', ) # List of species species...
7539a5445d24193395eed5dc658a4e69d8782736
buffpy/tests/test_profile.py
buffpy/tests/test_profile.py
from nose.tools import eq_ from mock import MagicMock, patch from buffpy.models.profile import Profile, PATHS mocked_response = { 'name': 'me', 'service': 'twiter', 'id': 1 } def test_profile_schedules_getter(): ''' Test schedules gettering from buffer api ''' mocked_api = MagicMock() mocked_api.g...
from unittest.mock import MagicMock, patch from buffpy.models.profile import Profile, PATHS mocked_response = { "name": "me", "service": "twiter", "id": 1 } def test_profile_schedules_getter(): """ Should retrieve profiles from buffer's API. """ mocked_api = MagicMock() mocked_api.get.retu...
Migrate profile tests to pytest
Migrate profile tests to pytest
Python
mit
vtemian/buffpy
from nose.tools import eq_ from mock import MagicMock, patch from buffpy.models.profile import Profile, PATHS mocked_response = { 'name': 'me', 'service': 'twiter', 'id': 1 } def test_profile_schedules_getter(): ''' Test schedules gettering from buffer api ''' mocked_api = MagicMock() mocked_api.g...
from unittest.mock import MagicMock, patch from buffpy.models.profile import Profile, PATHS mocked_response = { "name": "me", "service": "twiter", "id": 1 } def test_profile_schedules_getter(): """ Should retrieve profiles from buffer's API. """ mocked_api = MagicMock() mocked_api.get.retu...
<commit_before>from nose.tools import eq_ from mock import MagicMock, patch from buffpy.models.profile import Profile, PATHS mocked_response = { 'name': 'me', 'service': 'twiter', 'id': 1 } def test_profile_schedules_getter(): ''' Test schedules gettering from buffer api ''' mocked_api = MagicMock()...
from unittest.mock import MagicMock, patch from buffpy.models.profile import Profile, PATHS mocked_response = { "name": "me", "service": "twiter", "id": 1 } def test_profile_schedules_getter(): """ Should retrieve profiles from buffer's API. """ mocked_api = MagicMock() mocked_api.get.retu...
from nose.tools import eq_ from mock import MagicMock, patch from buffpy.models.profile import Profile, PATHS mocked_response = { 'name': 'me', 'service': 'twiter', 'id': 1 } def test_profile_schedules_getter(): ''' Test schedules gettering from buffer api ''' mocked_api = MagicMock() mocked_api.g...
<commit_before>from nose.tools import eq_ from mock import MagicMock, patch from buffpy.models.profile import Profile, PATHS mocked_response = { 'name': 'me', 'service': 'twiter', 'id': 1 } def test_profile_schedules_getter(): ''' Test schedules gettering from buffer api ''' mocked_api = MagicMock()...
b656869588d0dab127856bafbd1988f7ba09c48b
server/crashmanager/cron.py
server/crashmanager/cron.py
import os import shutil from tempfile import mkstemp from django.core.management import call_command from celeryconf import app SIGNATURES_ZIP = os.path.realpath(os.path.join(os.path.dirname(__file__), os.pardir, 'files', 'signatures.zip')) @app.task def bug_update_status(): call_command('bug_update_status') @...
import os import shutil from tempfile import mkstemp from django.core.management import call_command from celeryconf import app SIGNATURES_ZIP = os.path.realpath(os.path.join(os.path.dirname(__file__), os.pardir, 'files', 'signatures.zip')) @app.task def bug_update_status(): call_command('bug_update_status') @...
Set file permissions to readable in export_signatures
Set file permissions to readable in export_signatures
Python
mpl-2.0
MozillaSecurity/FuzzManager,MozillaSecurity/FuzzManager,MozillaSecurity/FuzzManager,MozillaSecurity/FuzzManager
import os import shutil from tempfile import mkstemp from django.core.management import call_command from celeryconf import app SIGNATURES_ZIP = os.path.realpath(os.path.join(os.path.dirname(__file__), os.pardir, 'files', 'signatures.zip')) @app.task def bug_update_status(): call_command('bug_update_status') @...
import os import shutil from tempfile import mkstemp from django.core.management import call_command from celeryconf import app SIGNATURES_ZIP = os.path.realpath(os.path.join(os.path.dirname(__file__), os.pardir, 'files', 'signatures.zip')) @app.task def bug_update_status(): call_command('bug_update_status') @...
<commit_before>import os import shutil from tempfile import mkstemp from django.core.management import call_command from celeryconf import app SIGNATURES_ZIP = os.path.realpath(os.path.join(os.path.dirname(__file__), os.pardir, 'files', 'signatures.zip')) @app.task def bug_update_status(): call_command('bug_upd...
import os import shutil from tempfile import mkstemp from django.core.management import call_command from celeryconf import app SIGNATURES_ZIP = os.path.realpath(os.path.join(os.path.dirname(__file__), os.pardir, 'files', 'signatures.zip')) @app.task def bug_update_status(): call_command('bug_update_status') @...
import os import shutil from tempfile import mkstemp from django.core.management import call_command from celeryconf import app SIGNATURES_ZIP = os.path.realpath(os.path.join(os.path.dirname(__file__), os.pardir, 'files', 'signatures.zip')) @app.task def bug_update_status(): call_command('bug_update_status') @...
<commit_before>import os import shutil from tempfile import mkstemp from django.core.management import call_command from celeryconf import app SIGNATURES_ZIP = os.path.realpath(os.path.join(os.path.dirname(__file__), os.pardir, 'files', 'signatures.zip')) @app.task def bug_update_status(): call_command('bug_upd...
c383e06d51d4e59d400ab6fd62eff2359ab4e728
python/the_birthday_bar.py
python/the_birthday_bar.py
#!/bin/python3 import itertools import collections def sliding_window(n, seq): """ Copied from toolz https://toolz.readthedocs.io/en/latest/_modules/toolz/itertoolz.html#sliding_window A sequence of overlapping subsequences >>> list(sliding_window(2, [1, 2, 3, 4])) [(1, 2), (2, 3), (3, 4)] ...
#!/bin/python3 import itertools import collections def sliding_window(n, seq): """ Copied from toolz https://toolz.readthedocs.io/en/latest/_modules/toolz/itertoolz.html#sliding_window A sequence of overlapping subsequences >>> list(sliding_window(2, [1, 2, 3, 4])) [(1, 2), (2, 3), (3, 4)] ...
Refactor to use map and filter
Refactor to use map and filter
Python
mit
rootulp/hackerrank,rootulp/hackerrank,rootulp/hackerrank,rootulp/hackerrank,rootulp/hackerrank,rootulp/hackerrank
#!/bin/python3 import itertools import collections def sliding_window(n, seq): """ Copied from toolz https://toolz.readthedocs.io/en/latest/_modules/toolz/itertoolz.html#sliding_window A sequence of overlapping subsequences >>> list(sliding_window(2, [1, 2, 3, 4])) [(1, 2), (2, 3), (3, 4)] ...
#!/bin/python3 import itertools import collections def sliding_window(n, seq): """ Copied from toolz https://toolz.readthedocs.io/en/latest/_modules/toolz/itertoolz.html#sliding_window A sequence of overlapping subsequences >>> list(sliding_window(2, [1, 2, 3, 4])) [(1, 2), (2, 3), (3, 4)] ...
<commit_before>#!/bin/python3 import itertools import collections def sliding_window(n, seq): """ Copied from toolz https://toolz.readthedocs.io/en/latest/_modules/toolz/itertoolz.html#sliding_window A sequence of overlapping subsequences >>> list(sliding_window(2, [1, 2, 3, 4])) [(1, 2), (2...
#!/bin/python3 import itertools import collections def sliding_window(n, seq): """ Copied from toolz https://toolz.readthedocs.io/en/latest/_modules/toolz/itertoolz.html#sliding_window A sequence of overlapping subsequences >>> list(sliding_window(2, [1, 2, 3, 4])) [(1, 2), (2, 3), (3, 4)] ...
#!/bin/python3 import itertools import collections def sliding_window(n, seq): """ Copied from toolz https://toolz.readthedocs.io/en/latest/_modules/toolz/itertoolz.html#sliding_window A sequence of overlapping subsequences >>> list(sliding_window(2, [1, 2, 3, 4])) [(1, 2), (2, 3), (3, 4)] ...
<commit_before>#!/bin/python3 import itertools import collections def sliding_window(n, seq): """ Copied from toolz https://toolz.readthedocs.io/en/latest/_modules/toolz/itertoolz.html#sliding_window A sequence of overlapping subsequences >>> list(sliding_window(2, [1, 2, 3, 4])) [(1, 2), (2...
ccab0ca5d1eba65d1ad6d1c3e4fe35b0cf883e0e
src/card.py
src/card.py
class Card: """ A wrapper around a Scryfall json card object. """ def __init__(self, cardData): self._data = cardData def __getattr__(self, attr): """ A hack that makes all attributes inaccessible, and instead returns the stored json values """ if at...
class Card: """ A wrapper around a Scryfall json card object. """ def __init__(self, cardData): self._data = cardData def __getattr__(self, attr): """ A hack that makes all attributes inaccessible, and instead returns the stored json values """ if at...
Change the default __getattr_ value
Change the default __getattr_ value
Python
mit
theneosloth/Bolas
class Card: """ A wrapper around a Scryfall json card object. """ def __init__(self, cardData): self._data = cardData def __getattr__(self, attr): """ A hack that makes all attributes inaccessible, and instead returns the stored json values """ if at...
class Card: """ A wrapper around a Scryfall json card object. """ def __init__(self, cardData): self._data = cardData def __getattr__(self, attr): """ A hack that makes all attributes inaccessible, and instead returns the stored json values """ if at...
<commit_before>class Card: """ A wrapper around a Scryfall json card object. """ def __init__(self, cardData): self._data = cardData def __getattr__(self, attr): """ A hack that makes all attributes inaccessible, and instead returns the stored json values ""...
class Card: """ A wrapper around a Scryfall json card object. """ def __init__(self, cardData): self._data = cardData def __getattr__(self, attr): """ A hack that makes all attributes inaccessible, and instead returns the stored json values """ if at...
class Card: """ A wrapper around a Scryfall json card object. """ def __init__(self, cardData): self._data = cardData def __getattr__(self, attr): """ A hack that makes all attributes inaccessible, and instead returns the stored json values """ if at...
<commit_before>class Card: """ A wrapper around a Scryfall json card object. """ def __init__(self, cardData): self._data = cardData def __getattr__(self, attr): """ A hack that makes all attributes inaccessible, and instead returns the stored json values ""...
0d65c7a3afdbc610cd7ada4e5604eda54f5305b6
calicoctl/calico_ctl/__init__.py
calicoctl/calico_ctl/__init__.py
__version__ = "0.16.1-dev" __libnetwork_plugin_version__ = "v0.7.0-dev" __libcalico_version__ = "v0.11.0-dev" __felix_version__ = "1.3.0a6-dev"
__version__ = "0.17.0-dev" __libnetwork_plugin_version__ = "v0.8.0-dev" __libcalico_version__ = "v0.12.0-dev" __felix_version__ = "1.3.0-dev"
Update docs to version v0.17.0
Update docs to version v0.17.0
Python
apache-2.0
TrimBiggs/calico-containers,projectcalico/calico-docker,TrimBiggs/calico-containers,projectcalico/calico-containers,insequent/calico-docker,projectcalico/calico-containers,insequent/calico-docker,Metaswitch/calico-docker,quater/calico-containers,caseydavenport/calico-containers,quater/calico-containers,caseydavenport/c...
__version__ = "0.16.1-dev" __libnetwork_plugin_version__ = "v0.7.0-dev" __libcalico_version__ = "v0.11.0-dev" __felix_version__ = "1.3.0a6-dev" Update docs to version v0.17.0
__version__ = "0.17.0-dev" __libnetwork_plugin_version__ = "v0.8.0-dev" __libcalico_version__ = "v0.12.0-dev" __felix_version__ = "1.3.0-dev"
<commit_before>__version__ = "0.16.1-dev" __libnetwork_plugin_version__ = "v0.7.0-dev" __libcalico_version__ = "v0.11.0-dev" __felix_version__ = "1.3.0a6-dev" <commit_msg>Update docs to version v0.17.0<commit_after>
__version__ = "0.17.0-dev" __libnetwork_plugin_version__ = "v0.8.0-dev" __libcalico_version__ = "v0.12.0-dev" __felix_version__ = "1.3.0-dev"
__version__ = "0.16.1-dev" __libnetwork_plugin_version__ = "v0.7.0-dev" __libcalico_version__ = "v0.11.0-dev" __felix_version__ = "1.3.0a6-dev" Update docs to version v0.17.0__version__ = "0.17.0-dev" __libnetwork_plugin_version__ = "v0.8.0-dev" __libcalico_version__ = "v0.12.0-dev" __felix_version__ = "1.3.0-dev"
<commit_before>__version__ = "0.16.1-dev" __libnetwork_plugin_version__ = "v0.7.0-dev" __libcalico_version__ = "v0.11.0-dev" __felix_version__ = "1.3.0a6-dev" <commit_msg>Update docs to version v0.17.0<commit_after>__version__ = "0.17.0-dev" __libnetwork_plugin_version__ = "v0.8.0-dev" __libcalico_version__ = "v0.12.0-...
8086ecd7d96dd4da4e90c583fd6300b9f87e3ef2
src/main.py
src/main.py
import board import score_board from os.path import expanduser SCORE_FILE_PATH = expanduser('~/.config/my2048/scores.conf') KEY_MOVE_MAP = { 'a': board.Move.LEFT, 'w': board.Move.UP, 's': board.Move.DOWN, 'd': board.Move.RIGHT, } def print_score_board(score_board): for i in score_board.get_scores(): pr...
import board import score_board from os.path import expanduser SCORE_FILE_PATH = expanduser('~/.config/my2048/scores.conf') KEY_MOVE_MAP = { 'a': board.Move.LEFT, 'w': board.Move.UP, 's': board.Move.DOWN, 'd': board.Move.RIGHT, } def print_score_board(score_board): for i in score_board.get_scores(): pr...
Change the use of score_board object due to our change in score_board.py
Change the use of score_board object due to our change in score_board.py
Python
mit
serenafr/My2048
import board import score_board from os.path import expanduser SCORE_FILE_PATH = expanduser('~/.config/my2048/scores.conf') KEY_MOVE_MAP = { 'a': board.Move.LEFT, 'w': board.Move.UP, 's': board.Move.DOWN, 'd': board.Move.RIGHT, } def print_score_board(score_board): for i in score_board.get_scores(): pr...
import board import score_board from os.path import expanduser SCORE_FILE_PATH = expanduser('~/.config/my2048/scores.conf') KEY_MOVE_MAP = { 'a': board.Move.LEFT, 'w': board.Move.UP, 's': board.Move.DOWN, 'd': board.Move.RIGHT, } def print_score_board(score_board): for i in score_board.get_scores(): pr...
<commit_before>import board import score_board from os.path import expanduser SCORE_FILE_PATH = expanduser('~/.config/my2048/scores.conf') KEY_MOVE_MAP = { 'a': board.Move.LEFT, 'w': board.Move.UP, 's': board.Move.DOWN, 'd': board.Move.RIGHT, } def print_score_board(score_board): for i in score_board.get_s...
import board import score_board from os.path import expanduser SCORE_FILE_PATH = expanduser('~/.config/my2048/scores.conf') KEY_MOVE_MAP = { 'a': board.Move.LEFT, 'w': board.Move.UP, 's': board.Move.DOWN, 'd': board.Move.RIGHT, } def print_score_board(score_board): for i in score_board.get_scores(): pr...
import board import score_board from os.path import expanduser SCORE_FILE_PATH = expanduser('~/.config/my2048/scores.conf') KEY_MOVE_MAP = { 'a': board.Move.LEFT, 'w': board.Move.UP, 's': board.Move.DOWN, 'd': board.Move.RIGHT, } def print_score_board(score_board): for i in score_board.get_scores(): pr...
<commit_before>import board import score_board from os.path import expanduser SCORE_FILE_PATH = expanduser('~/.config/my2048/scores.conf') KEY_MOVE_MAP = { 'a': board.Move.LEFT, 'w': board.Move.UP, 's': board.Move.DOWN, 'd': board.Move.RIGHT, } def print_score_board(score_board): for i in score_board.get_s...
dc0f76c676ec142fa6381fa4d6ac45e6f6127edf
common/util/update_wf_lib.py
common/util/update_wf_lib.py
#update waveforms in target sequence from current ChanParams settings. #Warning: this updates all channels, beware of possible conflicts import argparse import sys, os parser = argparse.ArgumentParser() parser.add_argument('pyqlabpath', help='path to PyQLab directory') parser.add_argument('seqPath', help='path of seque...
#update waveforms in target sequence from current ChanParams settings. #Warning: this updates all channels, beware of possible conflicts import argparse import sys, os parser = argparse.ArgumentParser() parser.add_argument('pyqlabpath', help='path to PyQLab directory') parser.add_argument('seqPath', help='path of seque...
Choose the pulses to update depending on library
Choose the pulses to update depending on library
Python
apache-2.0
BBN-Q/Qlab,BBN-Q/Qlab,BBN-Q/Qlab,BBN-Q/Qlab
#update waveforms in target sequence from current ChanParams settings. #Warning: this updates all channels, beware of possible conflicts import argparse import sys, os parser = argparse.ArgumentParser() parser.add_argument('pyqlabpath', help='path to PyQLab directory') parser.add_argument('seqPath', help='path of seque...
#update waveforms in target sequence from current ChanParams settings. #Warning: this updates all channels, beware of possible conflicts import argparse import sys, os parser = argparse.ArgumentParser() parser.add_argument('pyqlabpath', help='path to PyQLab directory') parser.add_argument('seqPath', help='path of seque...
<commit_before>#update waveforms in target sequence from current ChanParams settings. #Warning: this updates all channels, beware of possible conflicts import argparse import sys, os parser = argparse.ArgumentParser() parser.add_argument('pyqlabpath', help='path to PyQLab directory') parser.add_argument('seqPath', help...
#update waveforms in target sequence from current ChanParams settings. #Warning: this updates all channels, beware of possible conflicts import argparse import sys, os parser = argparse.ArgumentParser() parser.add_argument('pyqlabpath', help='path to PyQLab directory') parser.add_argument('seqPath', help='path of seque...
#update waveforms in target sequence from current ChanParams settings. #Warning: this updates all channels, beware of possible conflicts import argparse import sys, os parser = argparse.ArgumentParser() parser.add_argument('pyqlabpath', help='path to PyQLab directory') parser.add_argument('seqPath', help='path of seque...
<commit_before>#update waveforms in target sequence from current ChanParams settings. #Warning: this updates all channels, beware of possible conflicts import argparse import sys, os parser = argparse.ArgumentParser() parser.add_argument('pyqlabpath', help='path to PyQLab directory') parser.add_argument('seqPath', help...
ba8d5c6ac809899265d13e366d66592efa12ca34
imgfilter/filters/blurred_context.py
imgfilter/filters/blurred_context.py
import cv2 import numpy import tempfile import subprocess from .. import get_data from whole_blur import is_blurred as whole_blur def run_object_extraction(image_path): temp1 = tempfile.mkstemp(suffix=".jpg")[1] temp2 = tempfile.mkstemp(suffix=".jpg")[1] subprocess.call([get_data("object_extraction/extra...
import cv2 import numpy import tempfile import subprocess from .. import get_data from whole_blur import is_blurred as whole_blur def run_object_extraction(image_path): temp1 = tempfile.mkstemp(suffix=".jpg")[1] temp2 = tempfile.mkstemp(suffix=".jpg")[1] subprocess.call([get_data("object_extraction/extra...
Fix bug in blurred context recognition
Fix bug in blurred context recognition
Python
mit
vismantic-ohtuprojekti/qualipy,vismantic-ohtuprojekti/image-filtering-suite
import cv2 import numpy import tempfile import subprocess from .. import get_data from whole_blur import is_blurred as whole_blur def run_object_extraction(image_path): temp1 = tempfile.mkstemp(suffix=".jpg")[1] temp2 = tempfile.mkstemp(suffix=".jpg")[1] subprocess.call([get_data("object_extraction/extra...
import cv2 import numpy import tempfile import subprocess from .. import get_data from whole_blur import is_blurred as whole_blur def run_object_extraction(image_path): temp1 = tempfile.mkstemp(suffix=".jpg")[1] temp2 = tempfile.mkstemp(suffix=".jpg")[1] subprocess.call([get_data("object_extraction/extra...
<commit_before>import cv2 import numpy import tempfile import subprocess from .. import get_data from whole_blur import is_blurred as whole_blur def run_object_extraction(image_path): temp1 = tempfile.mkstemp(suffix=".jpg")[1] temp2 = tempfile.mkstemp(suffix=".jpg")[1] subprocess.call([get_data("object_e...
import cv2 import numpy import tempfile import subprocess from .. import get_data from whole_blur import is_blurred as whole_blur def run_object_extraction(image_path): temp1 = tempfile.mkstemp(suffix=".jpg")[1] temp2 = tempfile.mkstemp(suffix=".jpg")[1] subprocess.call([get_data("object_extraction/extra...
import cv2 import numpy import tempfile import subprocess from .. import get_data from whole_blur import is_blurred as whole_blur def run_object_extraction(image_path): temp1 = tempfile.mkstemp(suffix=".jpg")[1] temp2 = tempfile.mkstemp(suffix=".jpg")[1] subprocess.call([get_data("object_extraction/extra...
<commit_before>import cv2 import numpy import tempfile import subprocess from .. import get_data from whole_blur import is_blurred as whole_blur def run_object_extraction(image_path): temp1 = tempfile.mkstemp(suffix=".jpg")[1] temp2 = tempfile.mkstemp(suffix=".jpg")[1] subprocess.call([get_data("object_e...
e88c62f6e02cd84807d0b56468a0e0c21d2d4967
imgur_downloader/directory_helper.py
imgur_downloader/directory_helper.py
import os import logging logger = logging.getLogger(__name__) def setup_download_dir(directory_name): """ A helper function to create the download directory if it down not exist or is a file :param directory_name: Name of the directory to create :return: The absolute pathname of the directory just cr...
import os import logging from configuration import settings logger = logging.getLogger(__name__) def setup_download_dir(directory_name): """ A helper function to create the download directory if it down not exist or is a file :param directory_name: Name of the directory to create :return: The absolu...
Raise an exception if File exist where download directory should be.
Raise an exception if File exist where download directory should be.
Python
mit
odty101/ImgurDownloader
import os import logging logger = logging.getLogger(__name__) def setup_download_dir(directory_name): """ A helper function to create the download directory if it down not exist or is a file :param directory_name: Name of the directory to create :return: The absolute pathname of the directory just cr...
import os import logging from configuration import settings logger = logging.getLogger(__name__) def setup_download_dir(directory_name): """ A helper function to create the download directory if it down not exist or is a file :param directory_name: Name of the directory to create :return: The absolu...
<commit_before>import os import logging logger = logging.getLogger(__name__) def setup_download_dir(directory_name): """ A helper function to create the download directory if it down not exist or is a file :param directory_name: Name of the directory to create :return: The absolute pathname of the di...
import os import logging from configuration import settings logger = logging.getLogger(__name__) def setup_download_dir(directory_name): """ A helper function to create the download directory if it down not exist or is a file :param directory_name: Name of the directory to create :return: The absolu...
import os import logging logger = logging.getLogger(__name__) def setup_download_dir(directory_name): """ A helper function to create the download directory if it down not exist or is a file :param directory_name: Name of the directory to create :return: The absolute pathname of the directory just cr...
<commit_before>import os import logging logger = logging.getLogger(__name__) def setup_download_dir(directory_name): """ A helper function to create the download directory if it down not exist or is a file :param directory_name: Name of the directory to create :return: The absolute pathname of the di...
b542dd8466aa4b1c1373d320d860dbb92132c962
lib/ansible/runner/connection/__init__.py
lib/ansible/runner/connection/__init__.py
# (c) 2012, Michael DeHaan <[email protected]> # # This file is part of Ansible # # Ansible is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any lat...
# (c) 2012, Michael DeHaan <[email protected]> # # This file is part of Ansible # # Ansible is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any lat...
Fix import in ssh connection
Fix import in ssh connection
Python
mit
thaim/ansible,thaim/ansible
# (c) 2012, Michael DeHaan <[email protected]> # # This file is part of Ansible # # Ansible is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any lat...
# (c) 2012, Michael DeHaan <[email protected]> # # This file is part of Ansible # # Ansible is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any lat...
<commit_before># (c) 2012, Michael DeHaan <[email protected]> # # This file is part of Ansible # # Ansible is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your ...
# (c) 2012, Michael DeHaan <[email protected]> # # This file is part of Ansible # # Ansible is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any lat...
# (c) 2012, Michael DeHaan <[email protected]> # # This file is part of Ansible # # Ansible is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any lat...
<commit_before># (c) 2012, Michael DeHaan <[email protected]> # # This file is part of Ansible # # Ansible is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your ...
3326cbd7d14611671fe307aca30950aafb675f1e
tests/journey/test_chamber_of_deputies_official_missions_dataset.py
tests/journey/test_chamber_of_deputies_official_missions_dataset.py
import os from datetime import date from unittest import main, TestCase import numpy as np from serenata_toolbox.chamber_of_deputies.official_missions_dataset import OfficialMissionsDataset class TestOfficialMissionsDataset(TestCase): def setUp(self): self.subject = OfficialMissionsDataset() def te...
import os from datetime import date from unittest import main, TestCase import numpy as np from serenata_toolbox.chamber_of_deputies.official_missions_dataset import OfficialMissionsDataset class TestOfficialMissionsDataset(TestCase): def setUp(self): self.subject = OfficialMissionsDataset() def te...
Update testes (Chamber of Deputies changed real world data)
Update testes (Chamber of Deputies changed real world data)
Python
mit
datasciencebr/serenata-toolbox
import os from datetime import date from unittest import main, TestCase import numpy as np from serenata_toolbox.chamber_of_deputies.official_missions_dataset import OfficialMissionsDataset class TestOfficialMissionsDataset(TestCase): def setUp(self): self.subject = OfficialMissionsDataset() def te...
import os from datetime import date from unittest import main, TestCase import numpy as np from serenata_toolbox.chamber_of_deputies.official_missions_dataset import OfficialMissionsDataset class TestOfficialMissionsDataset(TestCase): def setUp(self): self.subject = OfficialMissionsDataset() def te...
<commit_before>import os from datetime import date from unittest import main, TestCase import numpy as np from serenata_toolbox.chamber_of_deputies.official_missions_dataset import OfficialMissionsDataset class TestOfficialMissionsDataset(TestCase): def setUp(self): self.subject = OfficialMissionsDatase...
import os from datetime import date from unittest import main, TestCase import numpy as np from serenata_toolbox.chamber_of_deputies.official_missions_dataset import OfficialMissionsDataset class TestOfficialMissionsDataset(TestCase): def setUp(self): self.subject = OfficialMissionsDataset() def te...
import os from datetime import date from unittest import main, TestCase import numpy as np from serenata_toolbox.chamber_of_deputies.official_missions_dataset import OfficialMissionsDataset class TestOfficialMissionsDataset(TestCase): def setUp(self): self.subject = OfficialMissionsDataset() def te...
<commit_before>import os from datetime import date from unittest import main, TestCase import numpy as np from serenata_toolbox.chamber_of_deputies.official_missions_dataset import OfficialMissionsDataset class TestOfficialMissionsDataset(TestCase): def setUp(self): self.subject = OfficialMissionsDatase...
3c6a64c7a5a7b652d8bd79bbe2a10fcf7e287d8c
Lib/fontbakery/specifications/ufo_sources_test.py
Lib/fontbakery/specifications/ufo_sources_test.py
# -*- coding: utf-8 -*- from __future__ import (absolute_import, division, print_function, unicode_literals) import defcon import pytest from fontbakery.checkrunner import (DEBUG, ENDCHECK, ERROR, FAIL, INFO, PASS, SKIP, WARN) check_statuses = (ERROR, FAIL,...
# -*- coding: utf-8 -*- from __future__ import (absolute_import, division, print_function, unicode_literals) import defcon import pytest from fontbakery.checkrunner import (DEBUG, ENDCHECK, ERROR, FAIL, INFO, PASS, SKIP, WARN) check_statuses = (ERROR, FAIL,...
Test both failure and success of check for required fields
Test both failure and success of check for required fields
Python
apache-2.0
moyogo/fontbakery,moyogo/fontbakery,googlefonts/fontbakery,moyogo/fontbakery,graphicore/fontbakery,googlefonts/fontbakery,graphicore/fontbakery,graphicore/fontbakery,googlefonts/fontbakery
# -*- coding: utf-8 -*- from __future__ import (absolute_import, division, print_function, unicode_literals) import defcon import pytest from fontbakery.checkrunner import (DEBUG, ENDCHECK, ERROR, FAIL, INFO, PASS, SKIP, WARN) check_statuses = (ERROR, FAIL,...
# -*- coding: utf-8 -*- from __future__ import (absolute_import, division, print_function, unicode_literals) import defcon import pytest from fontbakery.checkrunner import (DEBUG, ENDCHECK, ERROR, FAIL, INFO, PASS, SKIP, WARN) check_statuses = (ERROR, FAIL,...
<commit_before># -*- coding: utf-8 -*- from __future__ import (absolute_import, division, print_function, unicode_literals) import defcon import pytest from fontbakery.checkrunner import (DEBUG, ENDCHECK, ERROR, FAIL, INFO, PASS, SKIP, WARN) check_statuses ...
# -*- coding: utf-8 -*- from __future__ import (absolute_import, division, print_function, unicode_literals) import defcon import pytest from fontbakery.checkrunner import (DEBUG, ENDCHECK, ERROR, FAIL, INFO, PASS, SKIP, WARN) check_statuses = (ERROR, FAIL,...
# -*- coding: utf-8 -*- from __future__ import (absolute_import, division, print_function, unicode_literals) import defcon import pytest from fontbakery.checkrunner import (DEBUG, ENDCHECK, ERROR, FAIL, INFO, PASS, SKIP, WARN) check_statuses = (ERROR, FAIL,...
<commit_before># -*- coding: utf-8 -*- from __future__ import (absolute_import, division, print_function, unicode_literals) import defcon import pytest from fontbakery.checkrunner import (DEBUG, ENDCHECK, ERROR, FAIL, INFO, PASS, SKIP, WARN) check_statuses ...
67da90d339f7cfcef8d6033dbbabed4386a1e6b7
examples/downloader.py
examples/downloader.py
#!/usr/bin/python """ A flask web application that downloads a page in the background. """ import logging from flask import Flask, session, escape from crochet import setup, run_in_reactor, retrieve_result, TimeoutError # Can be called multiple times with no ill-effect: setup() app = Flask(__name__) @run_in_reacto...
#!/usr/bin/python """ A flask web application that downloads a page in the background. """ import logging from flask import Flask, session, escape from crochet import setup, run_in_reactor, retrieve_result, TimeoutError # Can be called multiple times with no ill-effect: setup() app = Flask(__name__) @run_in_reacto...
Remove another reference to DeferredResult.
Remove another reference to DeferredResult.
Python
mit
itamarst/crochet,wrmsr/crochet,rolando/crochet
#!/usr/bin/python """ A flask web application that downloads a page in the background. """ import logging from flask import Flask, session, escape from crochet import setup, run_in_reactor, retrieve_result, TimeoutError # Can be called multiple times with no ill-effect: setup() app = Flask(__name__) @run_in_reacto...
#!/usr/bin/python """ A flask web application that downloads a page in the background. """ import logging from flask import Flask, session, escape from crochet import setup, run_in_reactor, retrieve_result, TimeoutError # Can be called multiple times with no ill-effect: setup() app = Flask(__name__) @run_in_reacto...
<commit_before>#!/usr/bin/python """ A flask web application that downloads a page in the background. """ import logging from flask import Flask, session, escape from crochet import setup, run_in_reactor, retrieve_result, TimeoutError # Can be called multiple times with no ill-effect: setup() app = Flask(__name__) ...
#!/usr/bin/python """ A flask web application that downloads a page in the background. """ import logging from flask import Flask, session, escape from crochet import setup, run_in_reactor, retrieve_result, TimeoutError # Can be called multiple times with no ill-effect: setup() app = Flask(__name__) @run_in_reacto...
#!/usr/bin/python """ A flask web application that downloads a page in the background. """ import logging from flask import Flask, session, escape from crochet import setup, run_in_reactor, retrieve_result, TimeoutError # Can be called multiple times with no ill-effect: setup() app = Flask(__name__) @run_in_reacto...
<commit_before>#!/usr/bin/python """ A flask web application that downloads a page in the background. """ import logging from flask import Flask, session, escape from crochet import setup, run_in_reactor, retrieve_result, TimeoutError # Can be called multiple times with no ill-effect: setup() app = Flask(__name__) ...
3e397e79f49fc02bf78d3adaaaa90a65cf5caa67
{{cookiecutter.repo_name}}/tests/test_{{cookiecutter.repo_name}}.py
{{cookiecutter.repo_name}}/tests/test_{{cookiecutter.repo_name}}.py
# -*- coding: utf-8 -*- import pytest def test_app_title(app): """Simply tests if the default app title meets the expectations. Args: app (:class:`{{cookiecutter.app_class_name}}`): Default app instance Raises: AssertionError: If the title does not match """ assert app.title == '{{c...
# -*- coding: utf-8 -*- import pytest def test_app_title(app): """Simply tests if the default app title meets the expectations. Args: app (:class:`{{cookiecutter.app_class_name}}`): Default app instance Raises: AssertionError: If the title does not match """ assert app.title == '{{c...
Remove the carousel fixture for the sake of simplicity
Remove the carousel fixture for the sake of simplicity
Python
mit
hackebrot/cookiedozer,hackebrot/cookiedozer
# -*- coding: utf-8 -*- import pytest def test_app_title(app): """Simply tests if the default app title meets the expectations. Args: app (:class:`{{cookiecutter.app_class_name}}`): Default app instance Raises: AssertionError: If the title does not match """ assert app.title == '{{c...
# -*- coding: utf-8 -*- import pytest def test_app_title(app): """Simply tests if the default app title meets the expectations. Args: app (:class:`{{cookiecutter.app_class_name}}`): Default app instance Raises: AssertionError: If the title does not match """ assert app.title == '{{c...
<commit_before># -*- coding: utf-8 -*- import pytest def test_app_title(app): """Simply tests if the default app title meets the expectations. Args: app (:class:`{{cookiecutter.app_class_name}}`): Default app instance Raises: AssertionError: If the title does not match """ assert ap...
# -*- coding: utf-8 -*- import pytest def test_app_title(app): """Simply tests if the default app title meets the expectations. Args: app (:class:`{{cookiecutter.app_class_name}}`): Default app instance Raises: AssertionError: If the title does not match """ assert app.title == '{{c...
# -*- coding: utf-8 -*- import pytest def test_app_title(app): """Simply tests if the default app title meets the expectations. Args: app (:class:`{{cookiecutter.app_class_name}}`): Default app instance Raises: AssertionError: If the title does not match """ assert app.title == '{{c...
<commit_before># -*- coding: utf-8 -*- import pytest def test_app_title(app): """Simply tests if the default app title meets the expectations. Args: app (:class:`{{cookiecutter.app_class_name}}`): Default app instance Raises: AssertionError: If the title does not match """ assert ap...
f5cd0de26f430f33fa91bfd21bc96914fe9c56b8
troposphere/cloudwatch.py
troposphere/cloudwatch.py
# Copyright (c) 2013, Mark Peek <[email protected]> # All rights reserved. # # See LICENSE file for full license. from . import AWSObject, AWSProperty from .validators import integer, positive_integer, boolean class MetricDimension(AWSProperty): props = { 'Name': (basestring, True), 'Value': (basestri...
# Copyright (c) 2013, Mark Peek <[email protected]> # All rights reserved. # # See LICENSE file for full license. from . import AWSObject, AWSProperty, Ref from .validators import integer, positive_integer, boolean class MetricDimension(AWSProperty): props = { 'Name': (basestring, True), 'Value': (bas...
Allow Ref's in addition to basestrings
Allow Ref's in addition to basestrings
Python
bsd-2-clause
jantman/troposphere,Yipit/troposphere,unravelin/troposphere,xxxVxxx/troposphere,alonsodomin/troposphere,Hons/troposphere,inetCatapult/troposphere,ptoraskar/troposphere,johnctitus/troposphere,cryptickp/troposphere,DualSpark/troposphere,dmm92/troposphere,7digital/troposphere,nicolaka/troposphere,ikben/troposphere,WeAreCl...
# Copyright (c) 2013, Mark Peek <[email protected]> # All rights reserved. # # See LICENSE file for full license. from . import AWSObject, AWSProperty from .validators import integer, positive_integer, boolean class MetricDimension(AWSProperty): props = { 'Name': (basestring, True), 'Value': (basestri...
# Copyright (c) 2013, Mark Peek <[email protected]> # All rights reserved. # # See LICENSE file for full license. from . import AWSObject, AWSProperty, Ref from .validators import integer, positive_integer, boolean class MetricDimension(AWSProperty): props = { 'Name': (basestring, True), 'Value': (bas...
<commit_before># Copyright (c) 2013, Mark Peek <[email protected]> # All rights reserved. # # See LICENSE file for full license. from . import AWSObject, AWSProperty from .validators import integer, positive_integer, boolean class MetricDimension(AWSProperty): props = { 'Name': (basestring, True), 'Va...
# Copyright (c) 2013, Mark Peek <[email protected]> # All rights reserved. # # See LICENSE file for full license. from . import AWSObject, AWSProperty, Ref from .validators import integer, positive_integer, boolean class MetricDimension(AWSProperty): props = { 'Name': (basestring, True), 'Value': (bas...
# Copyright (c) 2013, Mark Peek <[email protected]> # All rights reserved. # # See LICENSE file for full license. from . import AWSObject, AWSProperty from .validators import integer, positive_integer, boolean class MetricDimension(AWSProperty): props = { 'Name': (basestring, True), 'Value': (basestri...
<commit_before># Copyright (c) 2013, Mark Peek <[email protected]> # All rights reserved. # # See LICENSE file for full license. from . import AWSObject, AWSProperty from .validators import integer, positive_integer, boolean class MetricDimension(AWSProperty): props = { 'Name': (basestring, True), 'Va...
2a99d8e3877162a3e06b324b84cb92ae26661d53
packs/linux/actions/get_open_ports.py
packs/linux/actions/get_open_ports.py
import nmap from st2actions.runners.pythonrunner import Action class PortScanner(Action): def run(self, host): result = [] port_details = {} ps = nmap.PortScanner() scan_res = ps.scan(host, arguments='--min-parallelism 100 -sT -sU -sZ') for target_host in ps.all_hosts(): if target_host in ...
import nmap from st2actions.runners.pythonrunner import Action """ Note: This action requires nmap binary to be available and needs to run as root. """ class PortScanner(Action): def run(self, host): result = [] port_details = {} ps = nmap.PortScanner() scan_res = ps.scan(host, arguments='--min-pa...
Add a note about root and nmap binary dependency.
Add a note about root and nmap binary dependency.
Python
apache-2.0
armab/st2contrib,StackStorm/st2contrib,lmEshoo/st2contrib,tonybaloney/st2contrib,armab/st2contrib,pearsontechnology/st2contrib,pidah/st2contrib,jtopjian/st2contrib,dennybaa/st2contrib,pinterb/st2contrib,pinterb/st2contrib,meirwah/st2contrib,pearsontechnology/st2contrib,armab/st2contrib,tonybaloney/st2contrib,StackStorm...
import nmap from st2actions.runners.pythonrunner import Action class PortScanner(Action): def run(self, host): result = [] port_details = {} ps = nmap.PortScanner() scan_res = ps.scan(host, arguments='--min-parallelism 100 -sT -sU -sZ') for target_host in ps.all_hosts(): if target_host in ...
import nmap from st2actions.runners.pythonrunner import Action """ Note: This action requires nmap binary to be available and needs to run as root. """ class PortScanner(Action): def run(self, host): result = [] port_details = {} ps = nmap.PortScanner() scan_res = ps.scan(host, arguments='--min-pa...
<commit_before>import nmap from st2actions.runners.pythonrunner import Action class PortScanner(Action): def run(self, host): result = [] port_details = {} ps = nmap.PortScanner() scan_res = ps.scan(host, arguments='--min-parallelism 100 -sT -sU -sZ') for target_host in ps.all_hosts(): if ...
import nmap from st2actions.runners.pythonrunner import Action """ Note: This action requires nmap binary to be available and needs to run as root. """ class PortScanner(Action): def run(self, host): result = [] port_details = {} ps = nmap.PortScanner() scan_res = ps.scan(host, arguments='--min-pa...
import nmap from st2actions.runners.pythonrunner import Action class PortScanner(Action): def run(self, host): result = [] port_details = {} ps = nmap.PortScanner() scan_res = ps.scan(host, arguments='--min-parallelism 100 -sT -sU -sZ') for target_host in ps.all_hosts(): if target_host in ...
<commit_before>import nmap from st2actions.runners.pythonrunner import Action class PortScanner(Action): def run(self, host): result = [] port_details = {} ps = nmap.PortScanner() scan_res = ps.scan(host, arguments='--min-parallelism 100 -sT -sU -sZ') for target_host in ps.all_hosts(): if ...
3b7452b6ffc52a4bc21128ddb9b04a6839286fe0
cpm_data/wagtail_hooks.py
cpm_data/wagtail_hooks.py
from wagtail.contrib.modeladmin.options import ModelAdmin, modeladmin_register from cpm_data.models import JuryMember class MyPageModelAdmin(ModelAdmin): model = JuryMember menu_label = 'Jury' menu_order = 200 # will put in 3rd place (000 being 1st, 100 2nd) list_display = ('name', 'country') sea...
from wagtail.contrib.modeladmin.options import ModelAdmin, modeladmin_register from cpm_data.models import JuryMember, Partner, Season class SeasonModelAdmin(ModelAdmin): model = Season menu_label = 'Seasons' menu_icon = 'date' menu_order = 200 list_display = ('name_en', 'name_be', 'name_ru') ...
Add modeladmin classes for Season, JuryMember, Partner models
Add modeladmin classes for Season, JuryMember, Partner models
Python
unlicense
nott/next.filmfest.by,nott/next.filmfest.by,kinaklub/next.filmfest.by,nott/next.filmfest.by,nott/next.filmfest.by,kinaklub/next.filmfest.by,kinaklub/next.filmfest.by,kinaklub/next.filmfest.by
from wagtail.contrib.modeladmin.options import ModelAdmin, modeladmin_register from cpm_data.models import JuryMember class MyPageModelAdmin(ModelAdmin): model = JuryMember menu_label = 'Jury' menu_order = 200 # will put in 3rd place (000 being 1st, 100 2nd) list_display = ('name', 'country') sea...
from wagtail.contrib.modeladmin.options import ModelAdmin, modeladmin_register from cpm_data.models import JuryMember, Partner, Season class SeasonModelAdmin(ModelAdmin): model = Season menu_label = 'Seasons' menu_icon = 'date' menu_order = 200 list_display = ('name_en', 'name_be', 'name_ru') ...
<commit_before>from wagtail.contrib.modeladmin.options import ModelAdmin, modeladmin_register from cpm_data.models import JuryMember class MyPageModelAdmin(ModelAdmin): model = JuryMember menu_label = 'Jury' menu_order = 200 # will put in 3rd place (000 being 1st, 100 2nd) list_display = ('name', 'co...
from wagtail.contrib.modeladmin.options import ModelAdmin, modeladmin_register from cpm_data.models import JuryMember, Partner, Season class SeasonModelAdmin(ModelAdmin): model = Season menu_label = 'Seasons' menu_icon = 'date' menu_order = 200 list_display = ('name_en', 'name_be', 'name_ru') ...
from wagtail.contrib.modeladmin.options import ModelAdmin, modeladmin_register from cpm_data.models import JuryMember class MyPageModelAdmin(ModelAdmin): model = JuryMember menu_label = 'Jury' menu_order = 200 # will put in 3rd place (000 being 1st, 100 2nd) list_display = ('name', 'country') sea...
<commit_before>from wagtail.contrib.modeladmin.options import ModelAdmin, modeladmin_register from cpm_data.models import JuryMember class MyPageModelAdmin(ModelAdmin): model = JuryMember menu_label = 'Jury' menu_order = 200 # will put in 3rd place (000 being 1st, 100 2nd) list_display = ('name', 'co...
2bfe8077d12a60450da10d53322d39d052bc6e0d
bud_get/cli.py
bud_get/cli.py
""" CLI interface. """ import argparse import bud_get def main(): parser = argparse.ArgumentParser() parser.add_argument("infile", help = "the input data file") parser.add_argument("outfile", help = "the output file") args = parser.parse_args() in_path = args.infile out_path = args.outfile ...
""" CLI interface. """ import argparse import bud_get from pkg_resources import get_distribution def main(): VERSION = get_distribution('bud-get').version parser = argparse.ArgumentParser() parser.add_argument("infile", help = "the input data file") parser.add_argument("outfile", help = "the output fi...
Print version in command line.
Print version in command line.
Python
unlicense
doggan/bud-get
""" CLI interface. """ import argparse import bud_get def main(): parser = argparse.ArgumentParser() parser.add_argument("infile", help = "the input data file") parser.add_argument("outfile", help = "the output file") args = parser.parse_args() in_path = args.infile out_path = args.outfile ...
""" CLI interface. """ import argparse import bud_get from pkg_resources import get_distribution def main(): VERSION = get_distribution('bud-get').version parser = argparse.ArgumentParser() parser.add_argument("infile", help = "the input data file") parser.add_argument("outfile", help = "the output fi...
<commit_before>""" CLI interface. """ import argparse import bud_get def main(): parser = argparse.ArgumentParser() parser.add_argument("infile", help = "the input data file") parser.add_argument("outfile", help = "the output file") args = parser.parse_args() in_path = args.infile out_path = a...
""" CLI interface. """ import argparse import bud_get from pkg_resources import get_distribution def main(): VERSION = get_distribution('bud-get').version parser = argparse.ArgumentParser() parser.add_argument("infile", help = "the input data file") parser.add_argument("outfile", help = "the output fi...
""" CLI interface. """ import argparse import bud_get def main(): parser = argparse.ArgumentParser() parser.add_argument("infile", help = "the input data file") parser.add_argument("outfile", help = "the output file") args = parser.parse_args() in_path = args.infile out_path = args.outfile ...
<commit_before>""" CLI interface. """ import argparse import bud_get def main(): parser = argparse.ArgumentParser() parser.add_argument("infile", help = "the input data file") parser.add_argument("outfile", help = "the output file") args = parser.parse_args() in_path = args.infile out_path = a...
dc512b896ca7311c0c04dc11b5283dc0ffb4f1e1
seating_charts/management/commands/sync_students.py
seating_charts/management/commands/sync_students.py
#!/usr/bin/python import logging from datetime import date from django.core.management.base import BaseCommand, CommandError from django.db import transaction from validate_email import validate_email from academics.models import Enrollment, AcademicYear from seating_charts.models import SeatingStudent logger = lo...
#!/usr/bin/python import logging from datetime import date from django.core.management.base import BaseCommand, CommandError from django.db import transaction from validate_email import validate_email from academics.models import Enrollment, AcademicYear from seating_charts.models import SeatingStudent logger = lo...
Remove extra seating students during sync
Remove extra seating students during sync
Python
mit
rectory-school/rectory-apps,rectory-school/rectory-apps,rectory-school/rectory-apps,rectory-school/rectory-apps,rectory-school/rectory-apps
#!/usr/bin/python import logging from datetime import date from django.core.management.base import BaseCommand, CommandError from django.db import transaction from validate_email import validate_email from academics.models import Enrollment, AcademicYear from seating_charts.models import SeatingStudent logger = lo...
#!/usr/bin/python import logging from datetime import date from django.core.management.base import BaseCommand, CommandError from django.db import transaction from validate_email import validate_email from academics.models import Enrollment, AcademicYear from seating_charts.models import SeatingStudent logger = lo...
<commit_before>#!/usr/bin/python import logging from datetime import date from django.core.management.base import BaseCommand, CommandError from django.db import transaction from validate_email import validate_email from academics.models import Enrollment, AcademicYear from seating_charts.models import SeatingStude...
#!/usr/bin/python import logging from datetime import date from django.core.management.base import BaseCommand, CommandError from django.db import transaction from validate_email import validate_email from academics.models import Enrollment, AcademicYear from seating_charts.models import SeatingStudent logger = lo...
#!/usr/bin/python import logging from datetime import date from django.core.management.base import BaseCommand, CommandError from django.db import transaction from validate_email import validate_email from academics.models import Enrollment, AcademicYear from seating_charts.models import SeatingStudent logger = lo...
<commit_before>#!/usr/bin/python import logging from datetime import date from django.core.management.base import BaseCommand, CommandError from django.db import transaction from validate_email import validate_email from academics.models import Enrollment, AcademicYear from seating_charts.models import SeatingStude...
e1f499afc2e6e5e4f2033e2cb1cad39bc7d6862e
examples/Mode7-Transform/Sin.py
examples/Mode7-Transform/Sin.py
#!/usr/local/bin/python import sys import math import struct steps = 256 try: fname = sys.argv[1] f = open(fname, 'wb') for x in range(0, steps): sine = int(127.5 * math.sin(math.radians(float(x) * (360.0 / float(steps))))) f.write(struct.pack('b', sine)) f.close() except Exception a...
#!/usr/bin/python import sys import math import struct steps = 256 try: fname = sys.argv[1] f = open(fname, 'wb') for x in range(0, steps): sine = int(127.5 * math.sin(math.radians(float(x) * (360.0 / float(steps))))) f.write(struct.pack('b', sine)) f.close() except Exception as e: ...
Use /usr/bin/python for sine table script
Use /usr/bin/python for sine table script
Python
mit
Optiroc/libSFX,Optiroc/libSFX,kylophone/libSFX
#!/usr/local/bin/python import sys import math import struct steps = 256 try: fname = sys.argv[1] f = open(fname, 'wb') for x in range(0, steps): sine = int(127.5 * math.sin(math.radians(float(x) * (360.0 / float(steps))))) f.write(struct.pack('b', sine)) f.close() except Exception a...
#!/usr/bin/python import sys import math import struct steps = 256 try: fname = sys.argv[1] f = open(fname, 'wb') for x in range(0, steps): sine = int(127.5 * math.sin(math.radians(float(x) * (360.0 / float(steps))))) f.write(struct.pack('b', sine)) f.close() except Exception as e: ...
<commit_before>#!/usr/local/bin/python import sys import math import struct steps = 256 try: fname = sys.argv[1] f = open(fname, 'wb') for x in range(0, steps): sine = int(127.5 * math.sin(math.radians(float(x) * (360.0 / float(steps))))) f.write(struct.pack('b', sine)) f.close() exc...
#!/usr/bin/python import sys import math import struct steps = 256 try: fname = sys.argv[1] f = open(fname, 'wb') for x in range(0, steps): sine = int(127.5 * math.sin(math.radians(float(x) * (360.0 / float(steps))))) f.write(struct.pack('b', sine)) f.close() except Exception as e: ...
#!/usr/local/bin/python import sys import math import struct steps = 256 try: fname = sys.argv[1] f = open(fname, 'wb') for x in range(0, steps): sine = int(127.5 * math.sin(math.radians(float(x) * (360.0 / float(steps))))) f.write(struct.pack('b', sine)) f.close() except Exception a...
<commit_before>#!/usr/local/bin/python import sys import math import struct steps = 256 try: fname = sys.argv[1] f = open(fname, 'wb') for x in range(0, steps): sine = int(127.5 * math.sin(math.radians(float(x) * (360.0 / float(steps))))) f.write(struct.pack('b', sine)) f.close() exc...
9e9f71fd8a8fa9a78263c2adf260343c489eb602
GitChat.py
GitChat.py
#!/usr/bin/env python """ A simple echo client """ from login import LoginController def main(): login = LoginController() print login.USERNAME # import socket # host = '' # port = 65535 # size = 1024 # s = socket.socket(socket.AF_INET, socket.SOCK_STREAM) # s.connect((host,port)) # while 1: # inp = r...
#!/usr/bin/env python """ A simple echo client """ from login import LoginController def main(): checkDirectory() login = LoginController() print login.USERNAME #method to check if directory is a git repo def checkDirectory(): try: open('.git/config') except IOError: raise SystemExit('Not a git repo')...
Check directory is git repo
Check directory is git repo
Python
apache-2.0
shubhodeep9/GitChat,shubhodeep9/GitChat
#!/usr/bin/env python """ A simple echo client """ from login import LoginController def main(): login = LoginController() print login.USERNAME # import socket # host = '' # port = 65535 # size = 1024 # s = socket.socket(socket.AF_INET, socket.SOCK_STREAM) # s.connect((host,port)) # while 1: # inp = r...
#!/usr/bin/env python """ A simple echo client """ from login import LoginController def main(): checkDirectory() login = LoginController() print login.USERNAME #method to check if directory is a git repo def checkDirectory(): try: open('.git/config') except IOError: raise SystemExit('Not a git repo')...
<commit_before>#!/usr/bin/env python """ A simple echo client """ from login import LoginController def main(): login = LoginController() print login.USERNAME # import socket # host = '' # port = 65535 # size = 1024 # s = socket.socket(socket.AF_INET, socket.SOCK_STREAM) # s.connect((host,port)) # whil...
#!/usr/bin/env python """ A simple echo client """ from login import LoginController def main(): checkDirectory() login = LoginController() print login.USERNAME #method to check if directory is a git repo def checkDirectory(): try: open('.git/config') except IOError: raise SystemExit('Not a git repo')...
#!/usr/bin/env python """ A simple echo client """ from login import LoginController def main(): login = LoginController() print login.USERNAME # import socket # host = '' # port = 65535 # size = 1024 # s = socket.socket(socket.AF_INET, socket.SOCK_STREAM) # s.connect((host,port)) # while 1: # inp = r...
<commit_before>#!/usr/bin/env python """ A simple echo client """ from login import LoginController def main(): login = LoginController() print login.USERNAME # import socket # host = '' # port = 65535 # size = 1024 # s = socket.socket(socket.AF_INET, socket.SOCK_STREAM) # s.connect((host,port)) # whil...
18f3cd10d07467eb9770ffe52b3d5b007f6967fe
cupy/array_api/_typing.py
cupy/array_api/_typing.py
""" This file defines the types for type annotations. These names aren't part of the module namespace, but they are used in the annotations in the function signatures. The functions in the module are only valid for inputs that match the given type annotations. """ from cupy.cuda import Device as _Device __all__ = [...
""" This file defines the types for type annotations. These names aren't part of the module namespace, but they are used in the annotations in the function signatures. The functions in the module are only valid for inputs that match the given type annotations. """ from cupy.cuda import Device as _Device __all__ = [...
Add a missing subscription slot to `NestedSequence`
MAINT: Add a missing subscription slot to `NestedSequence`
Python
mit
cupy/cupy,cupy/cupy,cupy/cupy,cupy/cupy
""" This file defines the types for type annotations. These names aren't part of the module namespace, but they are used in the annotations in the function signatures. The functions in the module are only valid for inputs that match the given type annotations. """ from cupy.cuda import Device as _Device __all__ = [...
""" This file defines the types for type annotations. These names aren't part of the module namespace, but they are used in the annotations in the function signatures. The functions in the module are only valid for inputs that match the given type annotations. """ from cupy.cuda import Device as _Device __all__ = [...
<commit_before>""" This file defines the types for type annotations. These names aren't part of the module namespace, but they are used in the annotations in the function signatures. The functions in the module are only valid for inputs that match the given type annotations. """ from cupy.cuda import Device as _Devic...
""" This file defines the types for type annotations. These names aren't part of the module namespace, but they are used in the annotations in the function signatures. The functions in the module are only valid for inputs that match the given type annotations. """ from cupy.cuda import Device as _Device __all__ = [...
""" This file defines the types for type annotations. These names aren't part of the module namespace, but they are used in the annotations in the function signatures. The functions in the module are only valid for inputs that match the given type annotations. """ from cupy.cuda import Device as _Device __all__ = [...
<commit_before>""" This file defines the types for type annotations. These names aren't part of the module namespace, but they are used in the annotations in the function signatures. The functions in the module are only valid for inputs that match the given type annotations. """ from cupy.cuda import Device as _Devic...
2f8fc66174b96f5ca45e4d656d9c1545d6d88720
ixprofile_client/__init__.py
ixprofile_client/__init__.py
""" A django-socialauth based client for the IX Profile server """ try: # Django 1.7+ from django.apps import AppConfig except ImportError: # Stub for old Django AppConfig = object from django.conf import settings SOCIAL_AUTH_PIPELINE = ( 'social.pipeline.social_auth.social_details', 'social....
""" A django-socialauth based client for the IX Profile server """ try: # Django 1.7+ from django.apps import AppConfig except ImportError: # Stub for old Django AppConfig = object from django.conf import settings SOCIAL_AUTH_PIPELINE = ( 'social_core.pipeline.social_auth.social_details', 'so...
Update social pipeline to social_core
Update social pipeline to social_core
Python
mit
infoxchange/ixprofile-client,infoxchange/ixprofile-client
""" A django-socialauth based client for the IX Profile server """ try: # Django 1.7+ from django.apps import AppConfig except ImportError: # Stub for old Django AppConfig = object from django.conf import settings SOCIAL_AUTH_PIPELINE = ( 'social.pipeline.social_auth.social_details', 'social....
""" A django-socialauth based client for the IX Profile server """ try: # Django 1.7+ from django.apps import AppConfig except ImportError: # Stub for old Django AppConfig = object from django.conf import settings SOCIAL_AUTH_PIPELINE = ( 'social_core.pipeline.social_auth.social_details', 'so...
<commit_before>""" A django-socialauth based client for the IX Profile server """ try: # Django 1.7+ from django.apps import AppConfig except ImportError: # Stub for old Django AppConfig = object from django.conf import settings SOCIAL_AUTH_PIPELINE = ( 'social.pipeline.social_auth.social_details...
""" A django-socialauth based client for the IX Profile server """ try: # Django 1.7+ from django.apps import AppConfig except ImportError: # Stub for old Django AppConfig = object from django.conf import settings SOCIAL_AUTH_PIPELINE = ( 'social_core.pipeline.social_auth.social_details', 'so...
""" A django-socialauth based client for the IX Profile server """ try: # Django 1.7+ from django.apps import AppConfig except ImportError: # Stub for old Django AppConfig = object from django.conf import settings SOCIAL_AUTH_PIPELINE = ( 'social.pipeline.social_auth.social_details', 'social....
<commit_before>""" A django-socialauth based client for the IX Profile server """ try: # Django 1.7+ from django.apps import AppConfig except ImportError: # Stub for old Django AppConfig = object from django.conf import settings SOCIAL_AUTH_PIPELINE = ( 'social.pipeline.social_auth.social_details...
4d6d22cd8244f7d6479eb2256c6d7822cad1ed0b
bibliopixel/main/main.py
bibliopixel/main/main.py
import argparse, os, sys from .. import log from .. project.importer import import_symbol from .. project.preset_library import PresetLibrary __all__ = ['main'] COMMANDS = ('all_pixel', 'devices', 'demo', 'run', 'set', 'show') MODULES = {c: import_symbol('.' + c, 'bibliopixel.main') for c in COMMANDS} PRESET_LIBRARY_...
import argparse, os, sys from .. import log from .. project.importer import import_symbol from .. project.preset_library import PresetLibrary __all__ = ['main'] COMMANDS = ('all_pixel', 'devices', 'demo', 'run') # 'set', 'show') MODULES = {c: import_symbol('.' + c, 'bibliopixel.main') for c in COMMANDS} PRESET_LIBRA...
Disable and run and help commands; don't read settings.
Disable and run and help commands; don't read settings.
Python
mit
rec/BiblioPixel,rec/BiblioPixel,ManiacalLabs/BiblioPixel,ManiacalLabs/BiblioPixel,rec/BiblioPixel,rec/BiblioPixel,ManiacalLabs/BiblioPixel,ManiacalLabs/BiblioPixel
import argparse, os, sys from .. import log from .. project.importer import import_symbol from .. project.preset_library import PresetLibrary __all__ = ['main'] COMMANDS = ('all_pixel', 'devices', 'demo', 'run', 'set', 'show') MODULES = {c: import_symbol('.' + c, 'bibliopixel.main') for c in COMMANDS} PRESET_LIBRARY_...
import argparse, os, sys from .. import log from .. project.importer import import_symbol from .. project.preset_library import PresetLibrary __all__ = ['main'] COMMANDS = ('all_pixel', 'devices', 'demo', 'run') # 'set', 'show') MODULES = {c: import_symbol('.' + c, 'bibliopixel.main') for c in COMMANDS} PRESET_LIBRA...
<commit_before>import argparse, os, sys from .. import log from .. project.importer import import_symbol from .. project.preset_library import PresetLibrary __all__ = ['main'] COMMANDS = ('all_pixel', 'devices', 'demo', 'run', 'set', 'show') MODULES = {c: import_symbol('.' + c, 'bibliopixel.main') for c in COMMANDS} ...
import argparse, os, sys from .. import log from .. project.importer import import_symbol from .. project.preset_library import PresetLibrary __all__ = ['main'] COMMANDS = ('all_pixel', 'devices', 'demo', 'run') # 'set', 'show') MODULES = {c: import_symbol('.' + c, 'bibliopixel.main') for c in COMMANDS} PRESET_LIBRA...
import argparse, os, sys from .. import log from .. project.importer import import_symbol from .. project.preset_library import PresetLibrary __all__ = ['main'] COMMANDS = ('all_pixel', 'devices', 'demo', 'run', 'set', 'show') MODULES = {c: import_symbol('.' + c, 'bibliopixel.main') for c in COMMANDS} PRESET_LIBRARY_...
<commit_before>import argparse, os, sys from .. import log from .. project.importer import import_symbol from .. project.preset_library import PresetLibrary __all__ = ['main'] COMMANDS = ('all_pixel', 'devices', 'demo', 'run', 'set', 'show') MODULES = {c: import_symbol('.' + c, 'bibliopixel.main') for c in COMMANDS} ...
62f6ac310f23ee529110529a3071f3c34f100fbb
examples/protocol/netstrings.py
examples/protocol/netstrings.py
grammar = """ digit = anything:x ?(x.isdigit()) nonzeroDigit = anything:x ?(x != '0' and x.isdigit()) digits = <'0' | nonzeroDigit digit*>:i -> int(i) netstring = digits:length ':' <anything{length}>:string ',' -> string initial = netstring:string -> receiver.netstringReceived(string) """ class NetstringSender(obj...
grammar = """ nonzeroDigit = digit:x ?(x != '0') digits = <'0' | nonzeroDigit digit*>:i -> int(i) netstring = digits:length ':' <anything{length}>:string ',' -> string initial = netstring:string -> receiver.netstringReceived(string) """ class NetstringSender(object): def __init__(self, transport): self...
Update the netstring code with newfound knowledge.
Update the netstring code with newfound knowledge.
Python
mit
rbtcollins/parsley,rbtcollins/parsley,python-parsley/parsley,python-parsley/parsley
grammar = """ digit = anything:x ?(x.isdigit()) nonzeroDigit = anything:x ?(x != '0' and x.isdigit()) digits = <'0' | nonzeroDigit digit*>:i -> int(i) netstring = digits:length ':' <anything{length}>:string ',' -> string initial = netstring:string -> receiver.netstringReceived(string) """ class NetstringSender(obj...
grammar = """ nonzeroDigit = digit:x ?(x != '0') digits = <'0' | nonzeroDigit digit*>:i -> int(i) netstring = digits:length ':' <anything{length}>:string ',' -> string initial = netstring:string -> receiver.netstringReceived(string) """ class NetstringSender(object): def __init__(self, transport): self...
<commit_before>grammar = """ digit = anything:x ?(x.isdigit()) nonzeroDigit = anything:x ?(x != '0' and x.isdigit()) digits = <'0' | nonzeroDigit digit*>:i -> int(i) netstring = digits:length ':' <anything{length}>:string ',' -> string initial = netstring:string -> receiver.netstringReceived(string) """ class Nets...
grammar = """ nonzeroDigit = digit:x ?(x != '0') digits = <'0' | nonzeroDigit digit*>:i -> int(i) netstring = digits:length ':' <anything{length}>:string ',' -> string initial = netstring:string -> receiver.netstringReceived(string) """ class NetstringSender(object): def __init__(self, transport): self...
grammar = """ digit = anything:x ?(x.isdigit()) nonzeroDigit = anything:x ?(x != '0' and x.isdigit()) digits = <'0' | nonzeroDigit digit*>:i -> int(i) netstring = digits:length ':' <anything{length}>:string ',' -> string initial = netstring:string -> receiver.netstringReceived(string) """ class NetstringSender(obj...
<commit_before>grammar = """ digit = anything:x ?(x.isdigit()) nonzeroDigit = anything:x ?(x != '0' and x.isdigit()) digits = <'0' | nonzeroDigit digit*>:i -> int(i) netstring = digits:length ':' <anything{length}>:string ',' -> string initial = netstring:string -> receiver.netstringReceived(string) """ class Nets...
12b181b585a54301c92103aa6ee979b628b76b59
examples/crontabReader.py
examples/crontabReader.py
from cron_descriptor import Options, ExpressionDescriptor import re class CrontabReader(object): """ Simple example reading /etc/contab """ rex = re.compile("^(\S{1,3}\s+\S{1,3}\s+\S{1,3}\s+\S{1,3}\s+\S{1,3}).+$") def __init__(self, cronfile): """Initialize CrontabReader Args: ...
import re try: from cron_descriptor import Options, ExpressionDescriptor except ImportError: print('!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!') print('\033[1mFailed to import cron_descriptor, maybe ? "pip install cron-descriptor ?"\033[0m') print('!!!!!!!!!...
Add import error message to example
Add import error message to example
Python
mit
Salamek/cron-descriptor,Salamek/cron-descriptor
from cron_descriptor import Options, ExpressionDescriptor import re class CrontabReader(object): """ Simple example reading /etc/contab """ rex = re.compile("^(\S{1,3}\s+\S{1,3}\s+\S{1,3}\s+\S{1,3}\s+\S{1,3}).+$") def __init__(self, cronfile): """Initialize CrontabReader Args: ...
import re try: from cron_descriptor import Options, ExpressionDescriptor except ImportError: print('!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!') print('\033[1mFailed to import cron_descriptor, maybe ? "pip install cron-descriptor ?"\033[0m') print('!!!!!!!!!...
<commit_before>from cron_descriptor import Options, ExpressionDescriptor import re class CrontabReader(object): """ Simple example reading /etc/contab """ rex = re.compile("^(\S{1,3}\s+\S{1,3}\s+\S{1,3}\s+\S{1,3}\s+\S{1,3}).+$") def __init__(self, cronfile): """Initialize CrontabReader ...
import re try: from cron_descriptor import Options, ExpressionDescriptor except ImportError: print('!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!') print('\033[1mFailed to import cron_descriptor, maybe ? "pip install cron-descriptor ?"\033[0m') print('!!!!!!!!!...
from cron_descriptor import Options, ExpressionDescriptor import re class CrontabReader(object): """ Simple example reading /etc/contab """ rex = re.compile("^(\S{1,3}\s+\S{1,3}\s+\S{1,3}\s+\S{1,3}\s+\S{1,3}).+$") def __init__(self, cronfile): """Initialize CrontabReader Args: ...
<commit_before>from cron_descriptor import Options, ExpressionDescriptor import re class CrontabReader(object): """ Simple example reading /etc/contab """ rex = re.compile("^(\S{1,3}\s+\S{1,3}\s+\S{1,3}\s+\S{1,3}\s+\S{1,3}).+$") def __init__(self, cronfile): """Initialize CrontabReader ...
d82f569e5ea66020791325a31c4e0625ed1ee3a0
captura/views.py
captura/views.py
from django.contrib.auth.decorators import user_passes_test, login_required from django.shortcuts import render from perfiles_usuario.utils import is_capturista from estudios_socioeconomicos.models import Estudio @login_required @user_passes_test(is_capturista) def capturista_dashboard(request): """View to render...
from django.contrib.auth.decorators import user_passes_test, login_required from django.shortcuts import render from perfiles_usuario.utils import is_capturista from estudios_socioeconomicos.models import Estudio @login_required #@user_passes_test(is_capturista) def capturista_dashboard(request): """View to rende...
Add userid to query to get socio-economic studies
Add userid to query to get socio-economic studies
Python
mit
erikiado/jp2_online,erikiado/jp2_online,erikiado/jp2_online
from django.contrib.auth.decorators import user_passes_test, login_required from django.shortcuts import render from perfiles_usuario.utils import is_capturista from estudios_socioeconomicos.models import Estudio @login_required @user_passes_test(is_capturista) def capturista_dashboard(request): """View to render...
from django.contrib.auth.decorators import user_passes_test, login_required from django.shortcuts import render from perfiles_usuario.utils import is_capturista from estudios_socioeconomicos.models import Estudio @login_required #@user_passes_test(is_capturista) def capturista_dashboard(request): """View to rende...
<commit_before>from django.contrib.auth.decorators import user_passes_test, login_required from django.shortcuts import render from perfiles_usuario.utils import is_capturista from estudios_socioeconomicos.models import Estudio @login_required @user_passes_test(is_capturista) def capturista_dashboard(request): ""...
from django.contrib.auth.decorators import user_passes_test, login_required from django.shortcuts import render from perfiles_usuario.utils import is_capturista from estudios_socioeconomicos.models import Estudio @login_required #@user_passes_test(is_capturista) def capturista_dashboard(request): """View to rende...
from django.contrib.auth.decorators import user_passes_test, login_required from django.shortcuts import render from perfiles_usuario.utils import is_capturista from estudios_socioeconomicos.models import Estudio @login_required @user_passes_test(is_capturista) def capturista_dashboard(request): """View to render...
<commit_before>from django.contrib.auth.decorators import user_passes_test, login_required from django.shortcuts import render from perfiles_usuario.utils import is_capturista from estudios_socioeconomicos.models import Estudio @login_required @user_passes_test(is_capturista) def capturista_dashboard(request): ""...
229b92a2d83fc937da20aa4ea5325be5b587f1bc
docweb/tests/__init__.py
docweb/tests/__init__.py
import unittest from django.test import TestCase class AccessTests(TestCase): """ Simple tests that check that basic pages can be accessed and they contain something sensible. """ def test_docstring_index(self): response = self.client.get('/docs/') self.failUnless('All docstri...
import unittest from django.test import TestCase class AccessTests(TestCase): """ Simple tests that check that basic pages can be accessed and they contain something sensible. """ def test_docstring_index(self): response = self.client.get('/docs/') self.failUnless('All docstri...
Make Django to find the pydoc-tool.py script tests
Make Django to find the pydoc-tool.py script tests
Python
bsd-3-clause
pv/pydocweb,pv/pydocweb
import unittest from django.test import TestCase class AccessTests(TestCase): """ Simple tests that check that basic pages can be accessed and they contain something sensible. """ def test_docstring_index(self): response = self.client.get('/docs/') self.failUnless('All docstri...
import unittest from django.test import TestCase class AccessTests(TestCase): """ Simple tests that check that basic pages can be accessed and they contain something sensible. """ def test_docstring_index(self): response = self.client.get('/docs/') self.failUnless('All docstri...
<commit_before>import unittest from django.test import TestCase class AccessTests(TestCase): """ Simple tests that check that basic pages can be accessed and they contain something sensible. """ def test_docstring_index(self): response = self.client.get('/docs/') self.failUnle...
import unittest from django.test import TestCase class AccessTests(TestCase): """ Simple tests that check that basic pages can be accessed and they contain something sensible. """ def test_docstring_index(self): response = self.client.get('/docs/') self.failUnless('All docstri...
import unittest from django.test import TestCase class AccessTests(TestCase): """ Simple tests that check that basic pages can be accessed and they contain something sensible. """ def test_docstring_index(self): response = self.client.get('/docs/') self.failUnless('All docstri...
<commit_before>import unittest from django.test import TestCase class AccessTests(TestCase): """ Simple tests that check that basic pages can be accessed and they contain something sensible. """ def test_docstring_index(self): response = self.client.get('/docs/') self.failUnle...
0b8cf8f8942c59432ead113dd7c0e55360946c16
masters/master.chromium.linux/master_site_config.py
masters/master.chromium.linux/master_site_config.py
# Copyright (c) 2012 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """ActiveMaster definition.""" import socket class ChromiumLinux(object): project_name = 'Chromium Linux' master_port = 8087 slave_port = 8187 ...
# Copyright (c) 2012 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """ActiveMaster definition.""" import socket class ChromiumLinux(object): project_name = 'Chromium Linux' master_port = 8087 slave_port = 8187 ...
Switch chromium.linux slaves to buildbot 0.8.
Switch chromium.linux slaves to buildbot 0.8. Review URL: https://chromiumcodereview.appspot.com/10912181 git-svn-id: 239fca9b83025a0b6f823aeeca02ba5be3d9fd76@155812 0039d316-1c4b-4281-b951-d872f2087c98
Python
bsd-3-clause
eunchong/build,eunchong/build,eunchong/build,eunchong/build
# Copyright (c) 2012 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """ActiveMaster definition.""" import socket class ChromiumLinux(object): project_name = 'Chromium Linux' master_port = 8087 slave_port = 8187 ...
# Copyright (c) 2012 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """ActiveMaster definition.""" import socket class ChromiumLinux(object): project_name = 'Chromium Linux' master_port = 8087 slave_port = 8187 ...
<commit_before># Copyright (c) 2012 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """ActiveMaster definition.""" import socket class ChromiumLinux(object): project_name = 'Chromium Linux' master_port = 8087 slave...
# Copyright (c) 2012 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """ActiveMaster definition.""" import socket class ChromiumLinux(object): project_name = 'Chromium Linux' master_port = 8087 slave_port = 8187 ...
# Copyright (c) 2012 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """ActiveMaster definition.""" import socket class ChromiumLinux(object): project_name = 'Chromium Linux' master_port = 8087 slave_port = 8187 ...
<commit_before># Copyright (c) 2012 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """ActiveMaster definition.""" import socket class ChromiumLinux(object): project_name = 'Chromium Linux' master_port = 8087 slave...
3035521c5a8e04b8eeb6874d8769dd5859747d53
devpi_builder/cli.py
devpi_builder/cli.py
# coding=utf-8 """ Command line interface for brandon """ import argparse from devpi_builder import requirements, wheeler, devpi def main(args=None): parser = argparse.ArgumentParser(description='Create wheels for all given project versions and upload them to the given index.') parser.add_argument('require...
# coding=utf-8 """ Command line interface for brandon """ import argparse import logging from devpi_builder import requirements, wheeler, devpi logging.basicConfig() logger = logging.getLogger(__name__) def main(args=None): parser = argparse.ArgumentParser(description='Create wheels for all given project vers...
Use a logger instead of printing to stdout
Use a logger instead of printing to stdout
Python
bsd-3-clause
tylerdave/devpi-builder
# coding=utf-8 """ Command line interface for brandon """ import argparse from devpi_builder import requirements, wheeler, devpi def main(args=None): parser = argparse.ArgumentParser(description='Create wheels for all given project versions and upload them to the given index.') parser.add_argument('require...
# coding=utf-8 """ Command line interface for brandon """ import argparse import logging from devpi_builder import requirements, wheeler, devpi logging.basicConfig() logger = logging.getLogger(__name__) def main(args=None): parser = argparse.ArgumentParser(description='Create wheels for all given project vers...
<commit_before># coding=utf-8 """ Command line interface for brandon """ import argparse from devpi_builder import requirements, wheeler, devpi def main(args=None): parser = argparse.ArgumentParser(description='Create wheels for all given project versions and upload them to the given index.') parser.add_ar...
# coding=utf-8 """ Command line interface for brandon """ import argparse import logging from devpi_builder import requirements, wheeler, devpi logging.basicConfig() logger = logging.getLogger(__name__) def main(args=None): parser = argparse.ArgumentParser(description='Create wheels for all given project vers...
# coding=utf-8 """ Command line interface for brandon """ import argparse from devpi_builder import requirements, wheeler, devpi def main(args=None): parser = argparse.ArgumentParser(description='Create wheels for all given project versions and upload them to the given index.') parser.add_argument('require...
<commit_before># coding=utf-8 """ Command line interface for brandon """ import argparse from devpi_builder import requirements, wheeler, devpi def main(args=None): parser = argparse.ArgumentParser(description='Create wheels for all given project versions and upload them to the given index.') parser.add_ar...
f11e56076e10d2c7e1db529751c53c1c5dc2074f
cihai/_compat.py
cihai/_compat.py
# -*- coding: utf8 -*- # flake8: NOQA import sys PY2 = sys.version_info[0] == 2 if PY2: unichr = unichr text_type = unicode string_types = (str, unicode) integer_types = (int, long) from urllib import urlretrieve from cStringIO import StringIO as BytesIO from StringIO import StringIO ...
# -*- coding: utf8 -*- # flake8: NOQA import sys PY2 = sys.version_info[0] == 2 if PY2: unichr = unichr text_type = unicode string_types = (str, unicode) integer_types = (int, long) from urllib import urlretrieve from cStringIO import StringIO as BytesIO from StringIO import StringIO ...
Revert "Port with_metaclass from flask"
Revert "Port with_metaclass from flask" This reverts commit db23ed0d62789ca995d2dceefd0a1468348c488b.
Python
mit
cihai/cihai,cihai/cihai-python,cihai/cihai
# -*- coding: utf8 -*- # flake8: NOQA import sys PY2 = sys.version_info[0] == 2 if PY2: unichr = unichr text_type = unicode string_types = (str, unicode) integer_types = (int, long) from urllib import urlretrieve from cStringIO import StringIO as BytesIO from StringIO import StringIO ...
# -*- coding: utf8 -*- # flake8: NOQA import sys PY2 = sys.version_info[0] == 2 if PY2: unichr = unichr text_type = unicode string_types = (str, unicode) integer_types = (int, long) from urllib import urlretrieve from cStringIO import StringIO as BytesIO from StringIO import StringIO ...
<commit_before># -*- coding: utf8 -*- # flake8: NOQA import sys PY2 = sys.version_info[0] == 2 if PY2: unichr = unichr text_type = unicode string_types = (str, unicode) integer_types = (int, long) from urllib import urlretrieve from cStringIO import StringIO as BytesIO from StringIO impor...
# -*- coding: utf8 -*- # flake8: NOQA import sys PY2 = sys.version_info[0] == 2 if PY2: unichr = unichr text_type = unicode string_types = (str, unicode) integer_types = (int, long) from urllib import urlretrieve from cStringIO import StringIO as BytesIO from StringIO import StringIO ...
# -*- coding: utf8 -*- # flake8: NOQA import sys PY2 = sys.version_info[0] == 2 if PY2: unichr = unichr text_type = unicode string_types = (str, unicode) integer_types = (int, long) from urllib import urlretrieve from cStringIO import StringIO as BytesIO from StringIO import StringIO ...
<commit_before># -*- coding: utf8 -*- # flake8: NOQA import sys PY2 = sys.version_info[0] == 2 if PY2: unichr = unichr text_type = unicode string_types = (str, unicode) integer_types = (int, long) from urllib import urlretrieve from cStringIO import StringIO as BytesIO from StringIO impor...
7ccc4567071edfa9bc35c38105061ef5a02c7875
vagrant/fabfile/hadoop.py
vagrant/fabfile/hadoop.py
from fabric.api import * from inventory import runs_on @task @runs_on('hadoop_master') def start_hdfs(): with cd('$HADOOP_HOME'): run('sbin/start-dfs.sh') @task @runs_on('hadoop_master') def stop_hdfs(): with cd('$HADOOP_HOME'): run('sbin/stop-dfs.sh') @task @runs_on('hadoop_master') def form...
from fabric.api import * from inventory import runs_on @task @runs_on('hadoop_master') def start_hdfs(): with cd('$HADOOP_HOME'): run('sbin/start-dfs.sh') @task @runs_on('hadoop_master') def stop_hdfs(): with cd('$HADOOP_HOME'): run('sbin/stop-dfs.sh') @task @runs_on('hadoop_master') def form...
Add safeguard against namenode formatting
[vagrant] Add safeguard against namenode formatting
Python
mit
terrai/rastercube,terrai/rastercube,terrai/rastercube
from fabric.api import * from inventory import runs_on @task @runs_on('hadoop_master') def start_hdfs(): with cd('$HADOOP_HOME'): run('sbin/start-dfs.sh') @task @runs_on('hadoop_master') def stop_hdfs(): with cd('$HADOOP_HOME'): run('sbin/stop-dfs.sh') @task @runs_on('hadoop_master') def form...
from fabric.api import * from inventory import runs_on @task @runs_on('hadoop_master') def start_hdfs(): with cd('$HADOOP_HOME'): run('sbin/start-dfs.sh') @task @runs_on('hadoop_master') def stop_hdfs(): with cd('$HADOOP_HOME'): run('sbin/stop-dfs.sh') @task @runs_on('hadoop_master') def form...
<commit_before>from fabric.api import * from inventory import runs_on @task @runs_on('hadoop_master') def start_hdfs(): with cd('$HADOOP_HOME'): run('sbin/start-dfs.sh') @task @runs_on('hadoop_master') def stop_hdfs(): with cd('$HADOOP_HOME'): run('sbin/stop-dfs.sh') @task @runs_on('hadoop_ma...
from fabric.api import * from inventory import runs_on @task @runs_on('hadoop_master') def start_hdfs(): with cd('$HADOOP_HOME'): run('sbin/start-dfs.sh') @task @runs_on('hadoop_master') def stop_hdfs(): with cd('$HADOOP_HOME'): run('sbin/stop-dfs.sh') @task @runs_on('hadoop_master') def form...
from fabric.api import * from inventory import runs_on @task @runs_on('hadoop_master') def start_hdfs(): with cd('$HADOOP_HOME'): run('sbin/start-dfs.sh') @task @runs_on('hadoop_master') def stop_hdfs(): with cd('$HADOOP_HOME'): run('sbin/stop-dfs.sh') @task @runs_on('hadoop_master') def form...
<commit_before>from fabric.api import * from inventory import runs_on @task @runs_on('hadoop_master') def start_hdfs(): with cd('$HADOOP_HOME'): run('sbin/start-dfs.sh') @task @runs_on('hadoop_master') def stop_hdfs(): with cd('$HADOOP_HOME'): run('sbin/stop-dfs.sh') @task @runs_on('hadoop_ma...
1d739dea9cbd91605319412637b32730a250014e
entropy/backends/base.py
entropy/backends/base.py
# Copyright (C) 2013 Yahoo! 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 (C) 2013 Yahoo! 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...
Add some abstract methods to backend
Add some abstract methods to backend Added some methods in base.py that should probably be defined in every backend Change-Id: I6f99994b82c2f17083d83b4723f3b4d61fc80160
Python
apache-2.0
stackforge/entropy,stackforge/entropy,stackforge/entropy
# Copyright (C) 2013 Yahoo! 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 (C) 2013 Yahoo! 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 (C) 2013 Yahoo! 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 (C) 2013 Yahoo! 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 (C) 2013 Yahoo! 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 (C) 2013 Yahoo! 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...
3136b2525ad0716c6b6f7fa60f78f5f6d776ee55
linter.py
linter.py
# # linter.py # Linter for SublimeLinter3, a code checking framework for Sublime Text 3 # # Written by Jack Brewer # Copyright (c) 2015 Jack Brewer # # License: MIT """Exports the Stylint plugin class.""" from SublimeLinter.lint import NodeLinter, util class Stylint(NodeLinter): """Provides an interface to sty...
# # linter.py # Linter for SublimeLinter3, a code checking framework for Sublime Text 3 # # Written by Jack Brewer # Copyright (c) 2015 Jack Brewer # # License: MIT """Exports the Stylint plugin class.""" from SublimeLinter.lint import NodeLinter, util class Stylint(NodeLinter): """Provides an interface to sty...
Remove vue from selectors and just use embedded html
Remove vue from selectors and just use embedded html
Python
mit
jackbrewer/SublimeLinter-contrib-stylint
# # linter.py # Linter for SublimeLinter3, a code checking framework for Sublime Text 3 # # Written by Jack Brewer # Copyright (c) 2015 Jack Brewer # # License: MIT """Exports the Stylint plugin class.""" from SublimeLinter.lint import NodeLinter, util class Stylint(NodeLinter): """Provides an interface to sty...
# # linter.py # Linter for SublimeLinter3, a code checking framework for Sublime Text 3 # # Written by Jack Brewer # Copyright (c) 2015 Jack Brewer # # License: MIT """Exports the Stylint plugin class.""" from SublimeLinter.lint import NodeLinter, util class Stylint(NodeLinter): """Provides an interface to sty...
<commit_before># # linter.py # Linter for SublimeLinter3, a code checking framework for Sublime Text 3 # # Written by Jack Brewer # Copyright (c) 2015 Jack Brewer # # License: MIT """Exports the Stylint plugin class.""" from SublimeLinter.lint import NodeLinter, util class Stylint(NodeLinter): """Provides an i...
# # linter.py # Linter for SublimeLinter3, a code checking framework for Sublime Text 3 # # Written by Jack Brewer # Copyright (c) 2015 Jack Brewer # # License: MIT """Exports the Stylint plugin class.""" from SublimeLinter.lint import NodeLinter, util class Stylint(NodeLinter): """Provides an interface to sty...
# # linter.py # Linter for SublimeLinter3, a code checking framework for Sublime Text 3 # # Written by Jack Brewer # Copyright (c) 2015 Jack Brewer # # License: MIT """Exports the Stylint plugin class.""" from SublimeLinter.lint import NodeLinter, util class Stylint(NodeLinter): """Provides an interface to sty...
<commit_before># # linter.py # Linter for SublimeLinter3, a code checking framework for Sublime Text 3 # # Written by Jack Brewer # Copyright (c) 2015 Jack Brewer # # License: MIT """Exports the Stylint plugin class.""" from SublimeLinter.lint import NodeLinter, util class Stylint(NodeLinter): """Provides an i...
0c71164f6c9a2229b8e99eb2dd38981407d8dfe7
measurement/migrations/0003_auto_20141013_1137.py
measurement/migrations/0003_auto_20141013_1137.py
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations class Migration(migrations.Migration): dependencies = [ ('measurement', '0002_auto_20141008_1605'), ] operations = [ migrations.AlterField( model_name='measurement', ...
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations class Migration(migrations.Migration): dependencies = [ ('measurement', '0002_auto_20141008_1605'), ] operations = [ migrations.AlterField( model_name='measurement', ...
Patch a migration to work with postgres
Patch a migration to work with postgres
Python
mit
sigurdsa/angelika-api
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations class Migration(migrations.Migration): dependencies = [ ('measurement', '0002_auto_20141008_1605'), ] operations = [ migrations.AlterField( model_name='measurement', ...
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations class Migration(migrations.Migration): dependencies = [ ('measurement', '0002_auto_20141008_1605'), ] operations = [ migrations.AlterField( model_name='measurement', ...
<commit_before># -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations class Migration(migrations.Migration): dependencies = [ ('measurement', '0002_auto_20141008_1605'), ] operations = [ migrations.AlterField( model_name='mea...
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations class Migration(migrations.Migration): dependencies = [ ('measurement', '0002_auto_20141008_1605'), ] operations = [ migrations.AlterField( model_name='measurement', ...
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations class Migration(migrations.Migration): dependencies = [ ('measurement', '0002_auto_20141008_1605'), ] operations = [ migrations.AlterField( model_name='measurement', ...
<commit_before># -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations class Migration(migrations.Migration): dependencies = [ ('measurement', '0002_auto_20141008_1605'), ] operations = [ migrations.AlterField( model_name='mea...
6e0d583e0c3eea7ca9e7a37567cfc7535d8f406b
django_prices_openexchangerates/tasks.py
django_prices_openexchangerates/tasks.py
from __future__ import division from __future__ import unicode_literals from decimal import Decimal import requests from django.conf import settings from django.core.exceptions import ImproperlyConfigured from .models import ConversionRate BASE_URL = r'http://openexchangerates.org/api' ENDPOINT_LATEST = BASE_URL + ...
from __future__ import division from __future__ import unicode_literals from decimal import Decimal import requests from django.conf import settings from django.core.exceptions import ImproperlyConfigured from .models import ConversionRate BASE_URL = r'http://openexchangerates.org/api' ENDPOINT_LATEST = BASE_URL + ...
Make rates parsing more readable
Make rates parsing more readable
Python
bsd-3-clause
artursmet/django-prices-openexchangerates,mirumee/django-prices-openexchangerates
from __future__ import division from __future__ import unicode_literals from decimal import Decimal import requests from django.conf import settings from django.core.exceptions import ImproperlyConfigured from .models import ConversionRate BASE_URL = r'http://openexchangerates.org/api' ENDPOINT_LATEST = BASE_URL + ...
from __future__ import division from __future__ import unicode_literals from decimal import Decimal import requests from django.conf import settings from django.core.exceptions import ImproperlyConfigured from .models import ConversionRate BASE_URL = r'http://openexchangerates.org/api' ENDPOINT_LATEST = BASE_URL + ...
<commit_before>from __future__ import division from __future__ import unicode_literals from decimal import Decimal import requests from django.conf import settings from django.core.exceptions import ImproperlyConfigured from .models import ConversionRate BASE_URL = r'http://openexchangerates.org/api' ENDPOINT_LATES...
from __future__ import division from __future__ import unicode_literals from decimal import Decimal import requests from django.conf import settings from django.core.exceptions import ImproperlyConfigured from .models import ConversionRate BASE_URL = r'http://openexchangerates.org/api' ENDPOINT_LATEST = BASE_URL + ...
from __future__ import division from __future__ import unicode_literals from decimal import Decimal import requests from django.conf import settings from django.core.exceptions import ImproperlyConfigured from .models import ConversionRate BASE_URL = r'http://openexchangerates.org/api' ENDPOINT_LATEST = BASE_URL + ...
<commit_before>from __future__ import division from __future__ import unicode_literals from decimal import Decimal import requests from django.conf import settings from django.core.exceptions import ImproperlyConfigured from .models import ConversionRate BASE_URL = r'http://openexchangerates.org/api' ENDPOINT_LATES...
60087afcf8f0130fb9cd6e154a9fb7290c0fde2e
tools/test.py
tools/test.py
#!/usr/bin/env python # Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file # for details. All rights reserved. Use of this source code is governed by a # BSD-style license that can be found in the LICENSE file. import os import string import subprocess import sys import utils def Main(): a...
#!/usr/bin/env python # Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file # for details. All rights reserved. Use of this source code is governed by a # BSD-style license that can be found in the LICENSE file. import os import string import subprocess import sys import utils def Main(): a...
Add third_party/android_tools/sdk/platform-tools to PATH if available
Add third_party/android_tools/sdk/platform-tools to PATH if available [email protected] Review URL: https://codereview.chromium.org/1938973002 .
Python
bsd-3-clause
dart-archive/dart-sdk,dart-lang/sdk,dart-archive/dart-sdk,dart-lang/sdk,dart-lang/sdk,dart-archive/dart-sdk,dartino/dart-sdk,dart-lang/sdk,dart-lang/sdk,dart-archive/dart-sdk,dart-archive/dart-sdk,dartino/dart-sdk,dartino/dart-sdk,dartino/dart-sdk,dartino/dart-sdk,dartino/dart-sdk,dart-lang/sdk,dartino/dart-sdk,dart-ar...
#!/usr/bin/env python # Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file # for details. All rights reserved. Use of this source code is governed by a # BSD-style license that can be found in the LICENSE file. import os import string import subprocess import sys import utils def Main(): a...
#!/usr/bin/env python # Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file # for details. All rights reserved. Use of this source code is governed by a # BSD-style license that can be found in the LICENSE file. import os import string import subprocess import sys import utils def Main(): a...
<commit_before>#!/usr/bin/env python # Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file # for details. All rights reserved. Use of this source code is governed by a # BSD-style license that can be found in the LICENSE file. import os import string import subprocess import sys import utils ...
#!/usr/bin/env python # Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file # for details. All rights reserved. Use of this source code is governed by a # BSD-style license that can be found in the LICENSE file. import os import string import subprocess import sys import utils def Main(): a...
#!/usr/bin/env python # Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file # for details. All rights reserved. Use of this source code is governed by a # BSD-style license that can be found in the LICENSE file. import os import string import subprocess import sys import utils def Main(): a...
<commit_before>#!/usr/bin/env python # Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file # for details. All rights reserved. Use of this source code is governed by a # BSD-style license that can be found in the LICENSE file. import os import string import subprocess import sys import utils ...
6687d8bbfbda55110145d5398a07672e71735f7b
ecal_users.py
ecal_users.py
from google.appengine.ext import db import random import string def make_address(): """ Returns a random alphanumeric string of 10 digits. Since there are 57 choices per digit (we exclude '0', 'O', 'l', 'I' and '1' for readability), this gives: 57 ** 10 = 3.62033331 x 10 ** 17 possible result...
from google.appengine.ext import db import random import string def make_address(): """ Returns a random alphanumeric string of 8 digits. Since there are 57 choices per digit (we exclude '0', 'O', 'l', 'I' and '1' for readability), this gives: 57 ** 8 = 1.11429157 x 10 ** 14 possible results....
Use 8 characters for email address rather than 10.
Use 8 characters for email address rather than 10.
Python
mit
eentzel/myeventbot,eentzel/myeventbot,eentzel/myeventbot,eentzel/myeventbot,eentzel/myeventbot
from google.appengine.ext import db import random import string def make_address(): """ Returns a random alphanumeric string of 10 digits. Since there are 57 choices per digit (we exclude '0', 'O', 'l', 'I' and '1' for readability), this gives: 57 ** 10 = 3.62033331 x 10 ** 17 possible result...
from google.appengine.ext import db import random import string def make_address(): """ Returns a random alphanumeric string of 8 digits. Since there are 57 choices per digit (we exclude '0', 'O', 'l', 'I' and '1' for readability), this gives: 57 ** 8 = 1.11429157 x 10 ** 14 possible results....
<commit_before>from google.appengine.ext import db import random import string def make_address(): """ Returns a random alphanumeric string of 10 digits. Since there are 57 choices per digit (we exclude '0', 'O', 'l', 'I' and '1' for readability), this gives: 57 ** 10 = 3.62033331 x 10 ** 17 ...
from google.appengine.ext import db import random import string def make_address(): """ Returns a random alphanumeric string of 8 digits. Since there are 57 choices per digit (we exclude '0', 'O', 'l', 'I' and '1' for readability), this gives: 57 ** 8 = 1.11429157 x 10 ** 14 possible results....
from google.appengine.ext import db import random import string def make_address(): """ Returns a random alphanumeric string of 10 digits. Since there are 57 choices per digit (we exclude '0', 'O', 'l', 'I' and '1' for readability), this gives: 57 ** 10 = 3.62033331 x 10 ** 17 possible result...
<commit_before>from google.appengine.ext import db import random import string def make_address(): """ Returns a random alphanumeric string of 10 digits. Since there are 57 choices per digit (we exclude '0', 'O', 'l', 'I' and '1' for readability), this gives: 57 ** 10 = 3.62033331 x 10 ** 17 ...
e466da4f26d8cbac45476e8c00e009e004cd4baa
fluent_blogs/templatetags/fluent_blogs_comments_tags.py
fluent_blogs/templatetags/fluent_blogs_comments_tags.py
""" A simple wrapper library, that makes sure that the template ``fluent_blogs/entry_detail/comments.html`` can still be rendered when ``django.contrib.comments`` is not included in the site. This way, project authors can easily use an online commenting system (such as DISQUS or Facebook comments) instead. """ # Expo...
""" A simple wrapper library, that makes sure that the template ``fluent_blogs/entry_detail/comments.html`` can still be rendered when ``django.contrib.comments`` is not included in the site. This way, project authors can easily use an online commenting system (such as DISQUS or Facebook comments) instead. """ from dj...
Support django-contrib-comments instead of django.contrib.comments for Django 1.8
Support django-contrib-comments instead of django.contrib.comments for Django 1.8
Python
apache-2.0
edoburu/django-fluent-blogs,edoburu/django-fluent-blogs
""" A simple wrapper library, that makes sure that the template ``fluent_blogs/entry_detail/comments.html`` can still be rendered when ``django.contrib.comments`` is not included in the site. This way, project authors can easily use an online commenting system (such as DISQUS or Facebook comments) instead. """ # Expo...
""" A simple wrapper library, that makes sure that the template ``fluent_blogs/entry_detail/comments.html`` can still be rendered when ``django.contrib.comments`` is not included in the site. This way, project authors can easily use an online commenting system (such as DISQUS or Facebook comments) instead. """ from dj...
<commit_before>""" A simple wrapper library, that makes sure that the template ``fluent_blogs/entry_detail/comments.html`` can still be rendered when ``django.contrib.comments`` is not included in the site. This way, project authors can easily use an online commenting system (such as DISQUS or Facebook comments) inste...
""" A simple wrapper library, that makes sure that the template ``fluent_blogs/entry_detail/comments.html`` can still be rendered when ``django.contrib.comments`` is not included in the site. This way, project authors can easily use an online commenting system (such as DISQUS or Facebook comments) instead. """ from dj...
""" A simple wrapper library, that makes sure that the template ``fluent_blogs/entry_detail/comments.html`` can still be rendered when ``django.contrib.comments`` is not included in the site. This way, project authors can easily use an online commenting system (such as DISQUS or Facebook comments) instead. """ # Expo...
<commit_before>""" A simple wrapper library, that makes sure that the template ``fluent_blogs/entry_detail/comments.html`` can still be rendered when ``django.contrib.comments`` is not included in the site. This way, project authors can easily use an online commenting system (such as DISQUS or Facebook comments) inste...
ecb1550f2cd02568e81b92ca360c0783df0e5bd7
zbzapp/extras/ocr/vars.py
zbzapp/extras/ocr/vars.py
#!/usr/bin/env python ''' Author : Bhavyanshu Parasher Email : [email protected] Description : This file contains all the main functions for the GUI. ''' try: from easygui import * except ImportError: raise ImportError,"The easygui module is required to run this program" import sys try: import Image ...
#!/usr/bin/env python ''' Author : Bhavyanshu Parasher Email : [email protected] Description : This file contains all the main functions for the GUI. ''' try: from easygui import * except ImportError: raise ImportError,"The easygui module is required to run this program" import sys try: import Image ...
Support currently removed for gifs because of bugs
Support currently removed for gifs because of bugs
Python
apache-2.0
bhavyanshu/zBzQuiz,bhavyanshu/zBzQuiz,bhavyanshu/zBzQuiz
#!/usr/bin/env python ''' Author : Bhavyanshu Parasher Email : [email protected] Description : This file contains all the main functions for the GUI. ''' try: from easygui import * except ImportError: raise ImportError,"The easygui module is required to run this program" import sys try: import Image ...
#!/usr/bin/env python ''' Author : Bhavyanshu Parasher Email : [email protected] Description : This file contains all the main functions for the GUI. ''' try: from easygui import * except ImportError: raise ImportError,"The easygui module is required to run this program" import sys try: import Image ...
<commit_before>#!/usr/bin/env python ''' Author : Bhavyanshu Parasher Email : [email protected] Description : This file contains all the main functions for the GUI. ''' try: from easygui import * except ImportError: raise ImportError,"The easygui module is required to run this program" import sys try: ...
#!/usr/bin/env python ''' Author : Bhavyanshu Parasher Email : [email protected] Description : This file contains all the main functions for the GUI. ''' try: from easygui import * except ImportError: raise ImportError,"The easygui module is required to run this program" import sys try: import Image ...
#!/usr/bin/env python ''' Author : Bhavyanshu Parasher Email : [email protected] Description : This file contains all the main functions for the GUI. ''' try: from easygui import * except ImportError: raise ImportError,"The easygui module is required to run this program" import sys try: import Image ...
<commit_before>#!/usr/bin/env python ''' Author : Bhavyanshu Parasher Email : [email protected] Description : This file contains all the main functions for the GUI. ''' try: from easygui import * except ImportError: raise ImportError,"The easygui module is required to run this program" import sys try: ...
ae3d8fd826647c8d853247b069726a26f4ae462d
exterminal.py
exterminal.py
import sublime, sublime_plugin import os def wrapped_exec(self, *args, **kwargs): settings = sublime.load_settings("SublimeExterminal.sublime-settings") if settings.get('enabled') and kwargs.get('use_exterminal', True): wrapper = settings.get('exec_wrapper') try: she...
import sublime, sublime_plugin import os def wrapped_exec(self, *args, **kwargs): settings = sublime.load_settings("SublimeExterminal.sublime-settings") if settings.get('enabled') and kwargs.get('use_exterminal', True): wrapper = settings.get('exec_wrapper') try: she...
Fix dangling default in kwargs 'shell_cmd'
Fix dangling default in kwargs 'shell_cmd'
Python
mit
jemc/SublimeExterminal,jemc/SublimeExterminal
import sublime, sublime_plugin import os def wrapped_exec(self, *args, **kwargs): settings = sublime.load_settings("SublimeExterminal.sublime-settings") if settings.get('enabled') and kwargs.get('use_exterminal', True): wrapper = settings.get('exec_wrapper') try: she...
import sublime, sublime_plugin import os def wrapped_exec(self, *args, **kwargs): settings = sublime.load_settings("SublimeExterminal.sublime-settings") if settings.get('enabled') and kwargs.get('use_exterminal', True): wrapper = settings.get('exec_wrapper') try: she...
<commit_before>import sublime, sublime_plugin import os def wrapped_exec(self, *args, **kwargs): settings = sublime.load_settings("SublimeExterminal.sublime-settings") if settings.get('enabled') and kwargs.get('use_exterminal', True): wrapper = settings.get('exec_wrapper') try: ...
import sublime, sublime_plugin import os def wrapped_exec(self, *args, **kwargs): settings = sublime.load_settings("SublimeExterminal.sublime-settings") if settings.get('enabled') and kwargs.get('use_exterminal', True): wrapper = settings.get('exec_wrapper') try: she...
import sublime, sublime_plugin import os def wrapped_exec(self, *args, **kwargs): settings = sublime.load_settings("SublimeExterminal.sublime-settings") if settings.get('enabled') and kwargs.get('use_exterminal', True): wrapper = settings.get('exec_wrapper') try: she...
<commit_before>import sublime, sublime_plugin import os def wrapped_exec(self, *args, **kwargs): settings = sublime.load_settings("SublimeExterminal.sublime-settings") if settings.get('enabled') and kwargs.get('use_exterminal', True): wrapper = settings.get('exec_wrapper') try: ...
beb9528c4a1a8cba1b432c285135b7d1d18453dc
heltour/tournament/templatetags/tournament_extras.py
heltour/tournament/templatetags/tournament_extras.py
from django import template from django.core.urlresolvers import reverse register = template.Library() @register.simple_tag def leagueurl(name, league_tag=None, season_id=None, *args, **kwargs): if season_id is not None and season_id != '': name = "by_season:" + name args = [season_id] + list(args...
from django import template from django.core.urlresolvers import reverse register = template.Library() @register.simple_tag def leagueurl(name, league_tag=None, season_id=None, *args, **kwargs): if season_id is not None and season_id != '': name = "by_season:" + name args = [season_id] + list(args...
Add comment to resultclass tag
Add comment to resultclass tag
Python
mit
cyanfish/heltour,cyanfish/heltour,cyanfish/heltour,cyanfish/heltour
from django import template from django.core.urlresolvers import reverse register = template.Library() @register.simple_tag def leagueurl(name, league_tag=None, season_id=None, *args, **kwargs): if season_id is not None and season_id != '': name = "by_season:" + name args = [season_id] + list(args...
from django import template from django.core.urlresolvers import reverse register = template.Library() @register.simple_tag def leagueurl(name, league_tag=None, season_id=None, *args, **kwargs): if season_id is not None and season_id != '': name = "by_season:" + name args = [season_id] + list(args...
<commit_before>from django import template from django.core.urlresolvers import reverse register = template.Library() @register.simple_tag def leagueurl(name, league_tag=None, season_id=None, *args, **kwargs): if season_id is not None and season_id != '': name = "by_season:" + name args = [season_...
from django import template from django.core.urlresolvers import reverse register = template.Library() @register.simple_tag def leagueurl(name, league_tag=None, season_id=None, *args, **kwargs): if season_id is not None and season_id != '': name = "by_season:" + name args = [season_id] + list(args...
from django import template from django.core.urlresolvers import reverse register = template.Library() @register.simple_tag def leagueurl(name, league_tag=None, season_id=None, *args, **kwargs): if season_id is not None and season_id != '': name = "by_season:" + name args = [season_id] + list(args...
<commit_before>from django import template from django.core.urlresolvers import reverse register = template.Library() @register.simple_tag def leagueurl(name, league_tag=None, season_id=None, *args, **kwargs): if season_id is not None and season_id != '': name = "by_season:" + name args = [season_...
8748854969f8cab9f416a05b4565734b2632df77
statscache_plugins/releng/plugins/cloud_images_upload_base.py
statscache_plugins/releng/plugins/cloud_images_upload_base.py
import statscache.plugins class Plugin(statscache.plugins.BasePlugin): name = "releng, cloud images upload base" summary = "Build logs for successful upload of cloud images" description = """ Latest build logs for successful upload of cloud images """ def handle(self, session, timestamp, messa...
import statscache.plugins class Plugin(statscache.plugins.BasePlugin): name = "releng, cloud images upload base" summary = "Build logs for successful upload of cloud images" description = """ Latest build logs for successful upload of cloud images """ topics = [ 'org.fedoraproject.prod...
Move fedmsg topics listened to by a plugin to a class variable.
Move fedmsg topics listened to by a plugin to a class variable.
Python
lgpl-2.1
yazman/statscache_plugins
import statscache.plugins class Plugin(statscache.plugins.BasePlugin): name = "releng, cloud images upload base" summary = "Build logs for successful upload of cloud images" description = """ Latest build logs for successful upload of cloud images """ def handle(self, session, timestamp, messa...
import statscache.plugins class Plugin(statscache.plugins.BasePlugin): name = "releng, cloud images upload base" summary = "Build logs for successful upload of cloud images" description = """ Latest build logs for successful upload of cloud images """ topics = [ 'org.fedoraproject.prod...
<commit_before>import statscache.plugins class Plugin(statscache.plugins.BasePlugin): name = "releng, cloud images upload base" summary = "Build logs for successful upload of cloud images" description = """ Latest build logs for successful upload of cloud images """ def handle(self, session, t...
import statscache.plugins class Plugin(statscache.plugins.BasePlugin): name = "releng, cloud images upload base" summary = "Build logs for successful upload of cloud images" description = """ Latest build logs for successful upload of cloud images """ topics = [ 'org.fedoraproject.prod...
import statscache.plugins class Plugin(statscache.plugins.BasePlugin): name = "releng, cloud images upload base" summary = "Build logs for successful upload of cloud images" description = """ Latest build logs for successful upload of cloud images """ def handle(self, session, timestamp, messa...
<commit_before>import statscache.plugins class Plugin(statscache.plugins.BasePlugin): name = "releng, cloud images upload base" summary = "Build logs for successful upload of cloud images" description = """ Latest build logs for successful upload of cloud images """ def handle(self, session, t...
ec13c2591a18386f08ade69874a77ce8f561e8a1
application.py
application.py
from transporter import create_app application = create_app(__name__) if __name__ == '__main__': application.run(host='0.0.0.0', debug=True)
import os from transporter import create_app application = create_app(__name__) if __name__ == '__main__': host = os.environ.get('HOST', '0.0.0.0') port = int(os.environ.get('PORT', 8002)) debug = bool(os.environ.get('DEBUG', False)) application.run(host, port=port, debug=debug)
Read in some environment variables
Read in some environment variables
Python
mit
suminb/transporter,suminb/transporter
from transporter import create_app application = create_app(__name__) if __name__ == '__main__': application.run(host='0.0.0.0', debug=True) Read in some environment variables
import os from transporter import create_app application = create_app(__name__) if __name__ == '__main__': host = os.environ.get('HOST', '0.0.0.0') port = int(os.environ.get('PORT', 8002)) debug = bool(os.environ.get('DEBUG', False)) application.run(host, port=port, debug=debug)
<commit_before>from transporter import create_app application = create_app(__name__) if __name__ == '__main__': application.run(host='0.0.0.0', debug=True) <commit_msg>Read in some environment variables<commit_after>
import os from transporter import create_app application = create_app(__name__) if __name__ == '__main__': host = os.environ.get('HOST', '0.0.0.0') port = int(os.environ.get('PORT', 8002)) debug = bool(os.environ.get('DEBUG', False)) application.run(host, port=port, debug=debug)
from transporter import create_app application = create_app(__name__) if __name__ == '__main__': application.run(host='0.0.0.0', debug=True) Read in some environment variablesimport os from transporter import create_app application = create_app(__name__) if __name__ == '__main__': host = os.environ.get...
<commit_before>from transporter import create_app application = create_app(__name__) if __name__ == '__main__': application.run(host='0.0.0.0', debug=True) <commit_msg>Read in some environment variables<commit_after>import os from transporter import create_app application = create_app(__name__) if __name__...
6b603840b8abd0b63e13c8ccbffa40e8abc453b5
movies.py
movies.py
import pandas as pd directory = 'ml-1m/' unames = ['user_id', 'gender', 'age', 'occupation', 'zip'] users = pd.read_table(directory + 'users.dat', sep='::', header=None, names=unames, engine='python') rnames = ['user_id', 'movie_id', 'rating', 'timestamp'] ratings = pd.read_table(directory + 'users.dat', sep='::', h...
import pandas as pd directory = 'ml-1m/' unames = ['user_id', 'gender', 'age', 'occupation', 'zip'] users = pd.read_table(directory + 'users.dat', sep='::', header=None, names=unames, engine='python') rnames = ['user_id', 'movie_id', 'rating', 'timestamp'] ratings = pd.read_table(directory + 'ratings.dat', sep='::',...
Read and print all data files.
Read and print all data files.
Python
mit
m1key/data-science-sandbox
import pandas as pd directory = 'ml-1m/' unames = ['user_id', 'gender', 'age', 'occupation', 'zip'] users = pd.read_table(directory + 'users.dat', sep='::', header=None, names=unames, engine='python') rnames = ['user_id', 'movie_id', 'rating', 'timestamp'] ratings = pd.read_table(directory + 'users.dat', sep='::', h...
import pandas as pd directory = 'ml-1m/' unames = ['user_id', 'gender', 'age', 'occupation', 'zip'] users = pd.read_table(directory + 'users.dat', sep='::', header=None, names=unames, engine='python') rnames = ['user_id', 'movie_id', 'rating', 'timestamp'] ratings = pd.read_table(directory + 'ratings.dat', sep='::',...
<commit_before>import pandas as pd directory = 'ml-1m/' unames = ['user_id', 'gender', 'age', 'occupation', 'zip'] users = pd.read_table(directory + 'users.dat', sep='::', header=None, names=unames, engine='python') rnames = ['user_id', 'movie_id', 'rating', 'timestamp'] ratings = pd.read_table(directory + 'users.da...
import pandas as pd directory = 'ml-1m/' unames = ['user_id', 'gender', 'age', 'occupation', 'zip'] users = pd.read_table(directory + 'users.dat', sep='::', header=None, names=unames, engine='python') rnames = ['user_id', 'movie_id', 'rating', 'timestamp'] ratings = pd.read_table(directory + 'ratings.dat', sep='::',...
import pandas as pd directory = 'ml-1m/' unames = ['user_id', 'gender', 'age', 'occupation', 'zip'] users = pd.read_table(directory + 'users.dat', sep='::', header=None, names=unames, engine='python') rnames = ['user_id', 'movie_id', 'rating', 'timestamp'] ratings = pd.read_table(directory + 'users.dat', sep='::', h...
<commit_before>import pandas as pd directory = 'ml-1m/' unames = ['user_id', 'gender', 'age', 'occupation', 'zip'] users = pd.read_table(directory + 'users.dat', sep='::', header=None, names=unames, engine='python') rnames = ['user_id', 'movie_id', 'rating', 'timestamp'] ratings = pd.read_table(directory + 'users.da...
4c2d33c50108aa1e2f5b8d12f6e45184d496fea2
apel/db/__init__.py
apel/db/__init__.py
''' Copyright 2011 Will Rogers 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 wr...
''' Copyright 2011 Will Rogers 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 wr...
Update cloud summary message header version num
Update cloud summary message header version num
Python
apache-2.0
stfc/apel,apel/apel,apel/apel,tofu-rocketry/apel,stfc/apel,tofu-rocketry/apel
''' Copyright 2011 Will Rogers 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 wr...
''' Copyright 2011 Will Rogers 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 wr...
<commit_before>''' Copyright 2011 Will Rogers Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or ...
''' Copyright 2011 Will Rogers 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 wr...
''' Copyright 2011 Will Rogers 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 wr...
<commit_before>''' Copyright 2011 Will Rogers 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 ...
f3c04e95bc40d5a85fe2f560df68315384ef763e
picoCTF-web/daemons/cache_stats.py
picoCTF-web/daemons/cache_stats.py
#!/usr/bin/env python3 import api import api.group import api.stats def run(): """Run the stat caching daemon.""" with api.create_app().app_context(): def cache(f, *args, **kwargs): result = f(reset_cache=True, *args, **kwargs) return result print("Caching registrati...
#!/usr/bin/env python3 import api import api.group from api.stats import (get_all_team_scores, get_group_scores, get_problem_solves, get_registration_count, get_top_teams_score_progressions) def run(): """Run the stat caching daemon.""" with api.create_app().app...
Update stats daemon to update ZSets and memoization as necessary
Update stats daemon to update ZSets and memoization as necessary
Python
mit
royragsdale/picoCTF,picoCTF/picoCTF,picoCTF/picoCTF,picoCTF/picoCTF,royragsdale/picoCTF,picoCTF/picoCTF,royragsdale/picoCTF,royragsdale/picoCTF,picoCTF/picoCTF,picoCTF/picoCTF,royragsdale/picoCTF,royragsdale/picoCTF,royragsdale/picoCTF
#!/usr/bin/env python3 import api import api.group import api.stats def run(): """Run the stat caching daemon.""" with api.create_app().app_context(): def cache(f, *args, **kwargs): result = f(reset_cache=True, *args, **kwargs) return result print("Caching registrati...
#!/usr/bin/env python3 import api import api.group from api.stats import (get_all_team_scores, get_group_scores, get_problem_solves, get_registration_count, get_top_teams_score_progressions) def run(): """Run the stat caching daemon.""" with api.create_app().app...
<commit_before>#!/usr/bin/env python3 import api import api.group import api.stats def run(): """Run the stat caching daemon.""" with api.create_app().app_context(): def cache(f, *args, **kwargs): result = f(reset_cache=True, *args, **kwargs) return result print("Cac...
#!/usr/bin/env python3 import api import api.group from api.stats import (get_all_team_scores, get_group_scores, get_problem_solves, get_registration_count, get_top_teams_score_progressions) def run(): """Run the stat caching daemon.""" with api.create_app().app...
#!/usr/bin/env python3 import api import api.group import api.stats def run(): """Run the stat caching daemon.""" with api.create_app().app_context(): def cache(f, *args, **kwargs): result = f(reset_cache=True, *args, **kwargs) return result print("Caching registrati...
<commit_before>#!/usr/bin/env python3 import api import api.group import api.stats def run(): """Run the stat caching daemon.""" with api.create_app().app_context(): def cache(f, *args, **kwargs): result = f(reset_cache=True, *args, **kwargs) return result print("Cac...
9406ed1d55151bb47760947c54c2bd29fcc1d3a3
knowledge_repo/converters/md.py
knowledge_repo/converters/md.py
from ..constants import MD from ..converter import KnowledgePostConverter from knowledge_repo.utils.files import read_text class MdConverter(KnowledgePostConverter): _registry_keys = [MD] def from_file(self, filename): self.kp_write(read_text(filename))
from ..constants import MD from ..converter import KnowledgePostConverter from knowledge_repo.utils.files import read_text class MdConverter(KnowledgePostConverter): _registry_keys = [MD] def from_file(self, filename): self.kp_write(read_text(filename))
Fix a lint required empty lines issue
Fix a lint required empty lines issue
Python
apache-2.0
airbnb/knowledge-repo,airbnb/knowledge-repo,airbnb/knowledge-repo,airbnb/knowledge-repo,airbnb/knowledge-repo
from ..constants import MD from ..converter import KnowledgePostConverter from knowledge_repo.utils.files import read_text class MdConverter(KnowledgePostConverter): _registry_keys = [MD] def from_file(self, filename): self.kp_write(read_text(filename)) Fix a lint required empty lines issue
from ..constants import MD from ..converter import KnowledgePostConverter from knowledge_repo.utils.files import read_text class MdConverter(KnowledgePostConverter): _registry_keys = [MD] def from_file(self, filename): self.kp_write(read_text(filename))
<commit_before>from ..constants import MD from ..converter import KnowledgePostConverter from knowledge_repo.utils.files import read_text class MdConverter(KnowledgePostConverter): _registry_keys = [MD] def from_file(self, filename): self.kp_write(read_text(filename)) <commit_msg>Fix a lint required e...
from ..constants import MD from ..converter import KnowledgePostConverter from knowledge_repo.utils.files import read_text class MdConverter(KnowledgePostConverter): _registry_keys = [MD] def from_file(self, filename): self.kp_write(read_text(filename))
from ..constants import MD from ..converter import KnowledgePostConverter from knowledge_repo.utils.files import read_text class MdConverter(KnowledgePostConverter): _registry_keys = [MD] def from_file(self, filename): self.kp_write(read_text(filename)) Fix a lint required empty lines issuefrom ..cons...
<commit_before>from ..constants import MD from ..converter import KnowledgePostConverter from knowledge_repo.utils.files import read_text class MdConverter(KnowledgePostConverter): _registry_keys = [MD] def from_file(self, filename): self.kp_write(read_text(filename)) <commit_msg>Fix a lint required e...
07cc3a2af6feb62a9ac07704d4468e875286f664
ibmcnx/doc/DataSources.py
ibmcnx/doc/DataSources.py
###### # Check ExId (GUID) by Email through JDBC # # Author: Christoph Stoettner # Mail: [email protected] # Documentation: http://scripting101.stoeps.de # # Version: 2.0 # Date: 2014-06-04 # # License: Apache 2.0 # # Check ExId of a User in all Connections Appli...
###### # Check ExId (GUID) by Email through JDBC # # Author: Christoph Stoettner # Mail: [email protected] # Documentation: http://scripting101.stoeps.de # # Version: 2.0 # Date: 2014-06-04 # # License: Apache 2.0 # # Check ExId of a User in all Connections Appli...
Create documentation of DataSource Settings
: Create documentation of DataSource Settings Task-Url:
Python
apache-2.0
stoeps13/ibmcnx2,stoeps13/ibmcnx2
###### # Check ExId (GUID) by Email through JDBC # # Author: Christoph Stoettner # Mail: [email protected] # Documentation: http://scripting101.stoeps.de # # Version: 2.0 # Date: 2014-06-04 # # License: Apache 2.0 # # Check ExId of a User in all Connections Appli...
###### # Check ExId (GUID) by Email through JDBC # # Author: Christoph Stoettner # Mail: [email protected] # Documentation: http://scripting101.stoeps.de # # Version: 2.0 # Date: 2014-06-04 # # License: Apache 2.0 # # Check ExId of a User in all Connections Appli...
<commit_before>###### # Check ExId (GUID) by Email through JDBC # # Author: Christoph Stoettner # Mail: [email protected] # Documentation: http://scripting101.stoeps.de # # Version: 2.0 # Date: 2014-06-04 # # License: Apache 2.0 # # Check ExId of a User in all Co...
###### # Check ExId (GUID) by Email through JDBC # # Author: Christoph Stoettner # Mail: [email protected] # Documentation: http://scripting101.stoeps.de # # Version: 2.0 # Date: 2014-06-04 # # License: Apache 2.0 # # Check ExId of a User in all Connections Appli...
###### # Check ExId (GUID) by Email through JDBC # # Author: Christoph Stoettner # Mail: [email protected] # Documentation: http://scripting101.stoeps.de # # Version: 2.0 # Date: 2014-06-04 # # License: Apache 2.0 # # Check ExId of a User in all Connections Appli...
<commit_before>###### # Check ExId (GUID) by Email through JDBC # # Author: Christoph Stoettner # Mail: [email protected] # Documentation: http://scripting101.stoeps.de # # Version: 2.0 # Date: 2014-06-04 # # License: Apache 2.0 # # Check ExId of a User in all Co...
981b5f27bc819056a9bc888c29f21b4fd9a0bded
server/app.py
server/app.py
#!/usr/bin/env python3 from command import Command from database import DatabaseSQLite from client import Client from server import Server class App: def run(self, testname, database): server = ServerLoader.load(testname) server.run(DatabaseSQLite(args.database)) def parseCommandLine(): parser = argparse....
#!/usr/bin/env python3 import argparse import logging from command import Command from database import DatabaseSQLite from client import Client from server import Server from serverLoader import ServerLoader class App: server = None def __init__(self, testname, database): self.server = ServerLoader().load(t...
Add command line args to App
Add command line args to App
Python
mit
CaminsTECH/owncloud-test
#!/usr/bin/env python3 from command import Command from database import DatabaseSQLite from client import Client from server import Server class App: def run(self, testname, database): server = ServerLoader.load(testname) server.run(DatabaseSQLite(args.database)) def parseCommandLine(): parser = argparse....
#!/usr/bin/env python3 import argparse import logging from command import Command from database import DatabaseSQLite from client import Client from server import Server from serverLoader import ServerLoader class App: server = None def __init__(self, testname, database): self.server = ServerLoader().load(t...
<commit_before>#!/usr/bin/env python3 from command import Command from database import DatabaseSQLite from client import Client from server import Server class App: def run(self, testname, database): server = ServerLoader.load(testname) server.run(DatabaseSQLite(args.database)) def parseCommandLine(): par...
#!/usr/bin/env python3 import argparse import logging from command import Command from database import DatabaseSQLite from client import Client from server import Server from serverLoader import ServerLoader class App: server = None def __init__(self, testname, database): self.server = ServerLoader().load(t...
#!/usr/bin/env python3 from command import Command from database import DatabaseSQLite from client import Client from server import Server class App: def run(self, testname, database): server = ServerLoader.load(testname) server.run(DatabaseSQLite(args.database)) def parseCommandLine(): parser = argparse....
<commit_before>#!/usr/bin/env python3 from command import Command from database import DatabaseSQLite from client import Client from server import Server class App: def run(self, testname, database): server = ServerLoader.load(testname) server.run(DatabaseSQLite(args.database)) def parseCommandLine(): par...
15519437a0197582c4b321b9e55544320a759c28
src/lib/sd2/workspace.py
src/lib/sd2/workspace.py
#!/usr/bin/env python ############################################################################# # Copyright (c) 2017 SiteWare Corp. All right reserved ############################################################################# from . import myhosts class Workspace(object): def __init__(self, node): ...
#!/usr/bin/env python ############################################################################# # Copyright (c) 2017 SiteWare Corp. All right reserved ############################################################################# from . import myhosts class Workspace(object): def __init__(self, node): ...
Add containers in hosts so we can rsync into containers
Add containers in hosts so we can rsync into containers
Python
apache-2.0
gae123/sd2,gae123/sd2
#!/usr/bin/env python ############################################################################# # Copyright (c) 2017 SiteWare Corp. All right reserved ############################################################################# from . import myhosts class Workspace(object): def __init__(self, node): ...
#!/usr/bin/env python ############################################################################# # Copyright (c) 2017 SiteWare Corp. All right reserved ############################################################################# from . import myhosts class Workspace(object): def __init__(self, node): ...
<commit_before>#!/usr/bin/env python ############################################################################# # Copyright (c) 2017 SiteWare Corp. All right reserved ############################################################################# from . import myhosts class Workspace(object): def __init__(self, ...
#!/usr/bin/env python ############################################################################# # Copyright (c) 2017 SiteWare Corp. All right reserved ############################################################################# from . import myhosts class Workspace(object): def __init__(self, node): ...
#!/usr/bin/env python ############################################################################# # Copyright (c) 2017 SiteWare Corp. All right reserved ############################################################################# from . import myhosts class Workspace(object): def __init__(self, node): ...
<commit_before>#!/usr/bin/env python ############################################################################# # Copyright (c) 2017 SiteWare Corp. All right reserved ############################################################################# from . import myhosts class Workspace(object): def __init__(self, ...
accca78e7d9dab841d4850f74795099d63854707
masters/master.client.v8.ports/master_site_config.py
masters/master.client.v8.ports/master_site_config.py
# Copyright 2016 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """ActiveMaster definition.""" from config_bootstrap import Master class V8Ports(Master.Master3): base_app_url = 'https://v8-status.appspot.com' tree_s...
# Copyright 2016 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """ActiveMaster definition.""" from config_bootstrap import Master class V8Ports(Master.Master3): base_app_url = 'https://v8-status.appspot.com' tree_s...
Add buildbucket integration to v8.ports
V8: Add buildbucket integration to v8.ports BUG=595708 [email protected], [email protected] Review URL: https://codereview.chromium.org/1810113002 git-svn-id: 239fca9b83025a0b6f823aeeca02ba5be3d9fd76@299357 0039d316-1c4b-4281-b951-d872f2087c98
Python
bsd-3-clause
eunchong/build,eunchong/build,eunchong/build,eunchong/build
# Copyright 2016 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """ActiveMaster definition.""" from config_bootstrap import Master class V8Ports(Master.Master3): base_app_url = 'https://v8-status.appspot.com' tree_s...
# Copyright 2016 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """ActiveMaster definition.""" from config_bootstrap import Master class V8Ports(Master.Master3): base_app_url = 'https://v8-status.appspot.com' tree_s...
<commit_before># Copyright 2016 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """ActiveMaster definition.""" from config_bootstrap import Master class V8Ports(Master.Master3): base_app_url = 'https://v8-status.appspo...
# Copyright 2016 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """ActiveMaster definition.""" from config_bootstrap import Master class V8Ports(Master.Master3): base_app_url = 'https://v8-status.appspot.com' tree_s...
# Copyright 2016 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """ActiveMaster definition.""" from config_bootstrap import Master class V8Ports(Master.Master3): base_app_url = 'https://v8-status.appspot.com' tree_s...
<commit_before># Copyright 2016 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """ActiveMaster definition.""" from config_bootstrap import Master class V8Ports(Master.Master3): base_app_url = 'https://v8-status.appspo...
cd16b97f9e004d4b04fa06789a90fd560a1888be
libcrowds_data/view.py
libcrowds_data/view.py
# -*- coding: utf8 -*- """Views modules for libcrowds-data.""" from flask import render_template from pybossa.core import project_repo @blueprint.route('/') def index(): """Return the Data page.""" projects = project_repo.get_all() title = "Data" description = """Download open datasets of all crowdso...
# -*- coding: utf8 -*- """Views modules for libcrowds-data.""" from flask import render_template from pybossa.core import project_repo @blueprint.route('/') def index(): """Return the Data page.""" projects = project_repo.get_all() title = "Data" description = """Download open datasets of all crowdso...
Fix route for index page
Fix route for index page
Python
bsd-3-clause
LibCrowds/libcrowds-data,LibCrowds/libcrowds-data
# -*- coding: utf8 -*- """Views modules for libcrowds-data.""" from flask import render_template from pybossa.core import project_repo @blueprint.route('/') def index(): """Return the Data page.""" projects = project_repo.get_all() title = "Data" description = """Download open datasets of all crowdso...
# -*- coding: utf8 -*- """Views modules for libcrowds-data.""" from flask import render_template from pybossa.core import project_repo @blueprint.route('/') def index(): """Return the Data page.""" projects = project_repo.get_all() title = "Data" description = """Download open datasets of all crowdso...
<commit_before># -*- coding: utf8 -*- """Views modules for libcrowds-data.""" from flask import render_template from pybossa.core import project_repo @blueprint.route('/') def index(): """Return the Data page.""" projects = project_repo.get_all() title = "Data" description = """Download open datasets...
# -*- coding: utf8 -*- """Views modules for libcrowds-data.""" from flask import render_template from pybossa.core import project_repo @blueprint.route('/') def index(): """Return the Data page.""" projects = project_repo.get_all() title = "Data" description = """Download open datasets of all crowdso...
# -*- coding: utf8 -*- """Views modules for libcrowds-data.""" from flask import render_template from pybossa.core import project_repo @blueprint.route('/') def index(): """Return the Data page.""" projects = project_repo.get_all() title = "Data" description = """Download open datasets of all crowdso...
<commit_before># -*- coding: utf8 -*- """Views modules for libcrowds-data.""" from flask import render_template from pybossa.core import project_repo @blueprint.route('/') def index(): """Return the Data page.""" projects = project_repo.get_all() title = "Data" description = """Download open datasets...
85220f2830d355245803965ee57886e5c1268833
tests/unit/test_twitter.py
tests/unit/test_twitter.py
from unfurl import Unfurl import unittest class TestTwitter(unittest.TestCase): def test_twitter(self): """ Test a tyipcal and a unique Discord url """ # unit test for a unique Discord url. test = Unfurl() test.add_to_queue(data_type='url', key=None, value='h...
from unfurl import Unfurl import unittest class TestTwitter(unittest.TestCase): def test_twitter(self): """ Test a typical and a unique Twitter url """ test = Unfurl() test.add_to_queue( data_type='url', key=None, value='https://twitter.com/_RyanBenson/status/109...
Update Twitter test to be more robust
Update Twitter test to be more robust
Python
apache-2.0
obsidianforensics/unfurl,obsidianforensics/unfurl
from unfurl import Unfurl import unittest class TestTwitter(unittest.TestCase): def test_twitter(self): """ Test a tyipcal and a unique Discord url """ # unit test for a unique Discord url. test = Unfurl() test.add_to_queue(data_type='url', key=None, value='h...
from unfurl import Unfurl import unittest class TestTwitter(unittest.TestCase): def test_twitter(self): """ Test a typical and a unique Twitter url """ test = Unfurl() test.add_to_queue( data_type='url', key=None, value='https://twitter.com/_RyanBenson/status/109...
<commit_before>from unfurl import Unfurl import unittest class TestTwitter(unittest.TestCase): def test_twitter(self): """ Test a tyipcal and a unique Discord url """ # unit test for a unique Discord url. test = Unfurl() test.add_to_queue(data_type='url', key=None, ...
from unfurl import Unfurl import unittest class TestTwitter(unittest.TestCase): def test_twitter(self): """ Test a typical and a unique Twitter url """ test = Unfurl() test.add_to_queue( data_type='url', key=None, value='https://twitter.com/_RyanBenson/status/109...
from unfurl import Unfurl import unittest class TestTwitter(unittest.TestCase): def test_twitter(self): """ Test a tyipcal and a unique Discord url """ # unit test for a unique Discord url. test = Unfurl() test.add_to_queue(data_type='url', key=None, value='h...
<commit_before>from unfurl import Unfurl import unittest class TestTwitter(unittest.TestCase): def test_twitter(self): """ Test a tyipcal and a unique Discord url """ # unit test for a unique Discord url. test = Unfurl() test.add_to_queue(data_type='url', key=None, ...
db6d354d3fd877ef41cffc1fe909c8e89d5f9e79
invoke/parser/__init__.py
invoke/parser/__init__.py
from .context import Context from .argument import Argument # Mostly for importing via invoke.parser.<x> class Parser(object): def __init__(self, initial, contexts=()): # TODO: what should contexts be? name-based dict? self.initial = initial self.contexts = contexts def parse_argv(sel...
from .context import Context from .argument import Argument # Mostly for importing via invoke.parser.<x> from ..util import debug class Parser(object): def __init__(self, initial, contexts=()): # TODO: what should contexts be? name-based dict? self.initial = initial self.contexts = context...
Make debug logging even more convenient.
Make debug logging even more convenient. I'm sure we'll remove the globals() usage eventually.
Python
bsd-2-clause
pyinvoke/invoke,frol/invoke,mkusz/invoke,pfmoore/invoke,mattrobenolt/invoke,mattrobenolt/invoke,kejbaly2/invoke,kejbaly2/invoke,tyewang/invoke,mkusz/invoke,sophacles/invoke,singingwolfboy/invoke,pyinvoke/invoke,pfmoore/invoke,alex/invoke,frol/invoke
from .context import Context from .argument import Argument # Mostly for importing via invoke.parser.<x> class Parser(object): def __init__(self, initial, contexts=()): # TODO: what should contexts be? name-based dict? self.initial = initial self.contexts = contexts def parse_argv(sel...
from .context import Context from .argument import Argument # Mostly for importing via invoke.parser.<x> from ..util import debug class Parser(object): def __init__(self, initial, contexts=()): # TODO: what should contexts be? name-based dict? self.initial = initial self.contexts = context...
<commit_before>from .context import Context from .argument import Argument # Mostly for importing via invoke.parser.<x> class Parser(object): def __init__(self, initial, contexts=()): # TODO: what should contexts be? name-based dict? self.initial = initial self.contexts = contexts def...
from .context import Context from .argument import Argument # Mostly for importing via invoke.parser.<x> from ..util import debug class Parser(object): def __init__(self, initial, contexts=()): # TODO: what should contexts be? name-based dict? self.initial = initial self.contexts = context...
from .context import Context from .argument import Argument # Mostly for importing via invoke.parser.<x> class Parser(object): def __init__(self, initial, contexts=()): # TODO: what should contexts be? name-based dict? self.initial = initial self.contexts = contexts def parse_argv(sel...
<commit_before>from .context import Context from .argument import Argument # Mostly for importing via invoke.parser.<x> class Parser(object): def __init__(self, initial, contexts=()): # TODO: what should contexts be? name-based dict? self.initial = initial self.contexts = contexts def...
7ad2ecc4eea6ed143043d57867ce27bc47ea2c6e
cleanup.py
cleanup.py
#!/usr/bin/env python from collections import defaultdict import subprocess import os KEEP_LAST_VERSIONS = os.environ.get('KEEP_LAST_VERSIONS', 4) def find_obsolete_images(images): for image_name, versions in images.items(): if len(versions) > KEEP_LAST_VERSIONS: obsolete_versions = sorted(ve...
#!/usr/bin/env python from collections import defaultdict import subprocess import os KEEP_LAST_VERSIONS = os.environ.get('KEEP_LAST_VERSIONS', 4) def find_obsolete_images(images): for image_name, versions in images.items(): if len(versions) > KEEP_LAST_VERSIONS: obsolete_versions = sorted(ve...
Add version for removing image
Add version for removing image
Python
mit
dreipol/cleanup-deis-images,dreipol/cleanup-deis-images
#!/usr/bin/env python from collections import defaultdict import subprocess import os KEEP_LAST_VERSIONS = os.environ.get('KEEP_LAST_VERSIONS', 4) def find_obsolete_images(images): for image_name, versions in images.items(): if len(versions) > KEEP_LAST_VERSIONS: obsolete_versions = sorted(ve...
#!/usr/bin/env python from collections import defaultdict import subprocess import os KEEP_LAST_VERSIONS = os.environ.get('KEEP_LAST_VERSIONS', 4) def find_obsolete_images(images): for image_name, versions in images.items(): if len(versions) > KEEP_LAST_VERSIONS: obsolete_versions = sorted(ve...
<commit_before>#!/usr/bin/env python from collections import defaultdict import subprocess import os KEEP_LAST_VERSIONS = os.environ.get('KEEP_LAST_VERSIONS', 4) def find_obsolete_images(images): for image_name, versions in images.items(): if len(versions) > KEEP_LAST_VERSIONS: obsolete_versi...
#!/usr/bin/env python from collections import defaultdict import subprocess import os KEEP_LAST_VERSIONS = os.environ.get('KEEP_LAST_VERSIONS', 4) def find_obsolete_images(images): for image_name, versions in images.items(): if len(versions) > KEEP_LAST_VERSIONS: obsolete_versions = sorted(ve...
#!/usr/bin/env python from collections import defaultdict import subprocess import os KEEP_LAST_VERSIONS = os.environ.get('KEEP_LAST_VERSIONS', 4) def find_obsolete_images(images): for image_name, versions in images.items(): if len(versions) > KEEP_LAST_VERSIONS: obsolete_versions = sorted(ve...
<commit_before>#!/usr/bin/env python from collections import defaultdict import subprocess import os KEEP_LAST_VERSIONS = os.environ.get('KEEP_LAST_VERSIONS', 4) def find_obsolete_images(images): for image_name, versions in images.items(): if len(versions) > KEEP_LAST_VERSIONS: obsolete_versi...
9fe639db9cf671073057fc983a03c8d10b8752d3
genes/docker/main.py
genes/docker/main.py
from genes import apt import platform class Config: OS = platform.system() (DIST, _, CODE) = platform.linux_distribution() REPO = DIST.lower() + '-' + CODE def main(): if Config.OS == 'Linux': if Config.DIST == 'Ubuntu' or Config.DIST == 'Debian': apt.recv_key('58118E89F3A912897C07...
from genes import apt import platform class Config: OS = platform.system() (DIST, _, CODE) = platform.linux_distribution() REPO = DIST.lower() + '-' + CODE def main(): if Config.OS == 'Linux': if Config.DIST == 'Ubuntu' or Config.DIST == 'Debian': apt.recv_key('58118E89F3A912897C07...
Add todos and stubs for osx
Add todos and stubs for osx
Python
mit
hatchery/genepool,hatchery/Genepool2
from genes import apt import platform class Config: OS = platform.system() (DIST, _, CODE) = platform.linux_distribution() REPO = DIST.lower() + '-' + CODE def main(): if Config.OS == 'Linux': if Config.DIST == 'Ubuntu' or Config.DIST == 'Debian': apt.recv_key('58118E89F3A912897C07...
from genes import apt import platform class Config: OS = platform.system() (DIST, _, CODE) = platform.linux_distribution() REPO = DIST.lower() + '-' + CODE def main(): if Config.OS == 'Linux': if Config.DIST == 'Ubuntu' or Config.DIST == 'Debian': apt.recv_key('58118E89F3A912897C07...
<commit_before>from genes import apt import platform class Config: OS = platform.system() (DIST, _, CODE) = platform.linux_distribution() REPO = DIST.lower() + '-' + CODE def main(): if Config.OS == 'Linux': if Config.DIST == 'Ubuntu' or Config.DIST == 'Debian': apt.recv_key('58118...
from genes import apt import platform class Config: OS = platform.system() (DIST, _, CODE) = platform.linux_distribution() REPO = DIST.lower() + '-' + CODE def main(): if Config.OS == 'Linux': if Config.DIST == 'Ubuntu' or Config.DIST == 'Debian': apt.recv_key('58118E89F3A912897C07...
from genes import apt import platform class Config: OS = platform.system() (DIST, _, CODE) = platform.linux_distribution() REPO = DIST.lower() + '-' + CODE def main(): if Config.OS == 'Linux': if Config.DIST == 'Ubuntu' or Config.DIST == 'Debian': apt.recv_key('58118E89F3A912897C07...
<commit_before>from genes import apt import platform class Config: OS = platform.system() (DIST, _, CODE) = platform.linux_distribution() REPO = DIST.lower() + '-' + CODE def main(): if Config.OS == 'Linux': if Config.DIST == 'Ubuntu' or Config.DIST == 'Debian': apt.recv_key('58118...
2baab2e945af8c797d8b8804139fc56f366ea83d
ibmcnx/doc/DataSources.py
ibmcnx/doc/DataSources.py
###### # Check ExId (GUID) by Email through JDBC # # Author: Christoph Stoettner # Mail: [email protected] # Documentation: http://scripting101.stoeps.de # # Version: 2.0 # Date: 2014-06-04 # # License: Apache 2.0 # # Check ExId of a User in all Connections Appli...
###### # Check ExId (GUID) by Email through JDBC # # Author: Christoph Stoettner # Mail: [email protected] # Documentation: http://scripting101.stoeps.de # # Version: 2.0 # Date: 2014-06-04 # # License: Apache 2.0 # # Check ExId of a User in all Connections Appli...
Create documentation of DataSource Settings
8: Create documentation of DataSource Settings Task-Url: http://github.com/stoeps13/ibmcnx2/issues/issue/8
Python
apache-2.0
stoeps13/ibmcnx2,stoeps13/ibmcnx2
###### # Check ExId (GUID) by Email through JDBC # # Author: Christoph Stoettner # Mail: [email protected] # Documentation: http://scripting101.stoeps.de # # Version: 2.0 # Date: 2014-06-04 # # License: Apache 2.0 # # Check ExId of a User in all Connections Appli...
###### # Check ExId (GUID) by Email through JDBC # # Author: Christoph Stoettner # Mail: [email protected] # Documentation: http://scripting101.stoeps.de # # Version: 2.0 # Date: 2014-06-04 # # License: Apache 2.0 # # Check ExId of a User in all Connections Appli...
<commit_before>###### # Check ExId (GUID) by Email through JDBC # # Author: Christoph Stoettner # Mail: [email protected] # Documentation: http://scripting101.stoeps.de # # Version: 2.0 # Date: 2014-06-04 # # License: Apache 2.0 # # Check ExId of a User in all Co...
###### # Check ExId (GUID) by Email through JDBC # # Author: Christoph Stoettner # Mail: [email protected] # Documentation: http://scripting101.stoeps.de # # Version: 2.0 # Date: 2014-06-04 # # License: Apache 2.0 # # Check ExId of a User in all Connections Appli...
###### # Check ExId (GUID) by Email through JDBC # # Author: Christoph Stoettner # Mail: [email protected] # Documentation: http://scripting101.stoeps.de # # Version: 2.0 # Date: 2014-06-04 # # License: Apache 2.0 # # Check ExId of a User in all Connections Appli...
<commit_before>###### # Check ExId (GUID) by Email through JDBC # # Author: Christoph Stoettner # Mail: [email protected] # Documentation: http://scripting101.stoeps.de # # Version: 2.0 # Date: 2014-06-04 # # License: Apache 2.0 # # Check ExId of a User in all Co...
ce703cbe3040770ee105fb0d953f85eebb92bdc9
us_ignite/sections/templatetags/sections_tags.py
us_ignite/sections/templatetags/sections_tags.py
from django import template from django.template.loader import render_to_string from us_ignite.sections.models import Sponsor register = template.Library() class RenderingNode(template.Node): def __init__(self, template_name): self.template_name = template_name def render(self, context): ...
from django import template from django.template.loader import render_to_string from us_ignite.sections.models import Sponsor register = template.Library() class RenderingNode(template.Node): def __init__(self, template_name): self.template_name = template_name def render(self, context): ...
Make sure the ``context`` is not overriden.
Bugfix: Make sure the ``context`` is not overriden. The variable name for the string template context was removing the actual ``context`` of the tempalte where the tag was embeded.
Python
bsd-3-clause
us-ignite/us_ignite,us-ignite/us_ignite,us-ignite/us_ignite,us-ignite/us_ignite,us-ignite/us_ignite
from django import template from django.template.loader import render_to_string from us_ignite.sections.models import Sponsor register = template.Library() class RenderingNode(template.Node): def __init__(self, template_name): self.template_name = template_name def render(self, context): ...
from django import template from django.template.loader import render_to_string from us_ignite.sections.models import Sponsor register = template.Library() class RenderingNode(template.Node): def __init__(self, template_name): self.template_name = template_name def render(self, context): ...
<commit_before>from django import template from django.template.loader import render_to_string from us_ignite.sections.models import Sponsor register = template.Library() class RenderingNode(template.Node): def __init__(self, template_name): self.template_name = template_name def render(self, con...
from django import template from django.template.loader import render_to_string from us_ignite.sections.models import Sponsor register = template.Library() class RenderingNode(template.Node): def __init__(self, template_name): self.template_name = template_name def render(self, context): ...
from django import template from django.template.loader import render_to_string from us_ignite.sections.models import Sponsor register = template.Library() class RenderingNode(template.Node): def __init__(self, template_name): self.template_name = template_name def render(self, context): ...
<commit_before>from django import template from django.template.loader import render_to_string from us_ignite.sections.models import Sponsor register = template.Library() class RenderingNode(template.Node): def __init__(self, template_name): self.template_name = template_name def render(self, con...
f952a963dee28759e9ed4846eec5966d401c71e7
goodreads/scraper.py
goodreads/scraper.py
import requests from bs4 import BeautifulSoup class GoodReads(object): def __init__(self): print "Starting..." def get_quotes(self, url): r = requests.get(url) soup = BeautifulSoup(r.text, "lxml") quotes = [quote.text.strip().split("\n")[0] for quote in soup.findAll('div', {'cl...
import requests from bs4 import BeautifulSoup class GoodReads(object): def __init__(self): print "Starting..." def get_quotes(self, url): r = requests.get(url) soup = BeautifulSoup(r.text, "lxml") quotes = [quote.text.strip().split("\n")[0] for quote in soup.findAll('div', {'c...
Allow user to get popular or new quotes
Allow user to get popular or new quotes
Python
mit
chankeypathak/goodreads-quotes
import requests from bs4 import BeautifulSoup class GoodReads(object): def __init__(self): print "Starting..." def get_quotes(self, url): r = requests.get(url) soup = BeautifulSoup(r.text, "lxml") quotes = [quote.text.strip().split("\n")[0] for quote in soup.findAll('div', {'cl...
import requests from bs4 import BeautifulSoup class GoodReads(object): def __init__(self): print "Starting..." def get_quotes(self, url): r = requests.get(url) soup = BeautifulSoup(r.text, "lxml") quotes = [quote.text.strip().split("\n")[0] for quote in soup.findAll('div', {'c...
<commit_before>import requests from bs4 import BeautifulSoup class GoodReads(object): def __init__(self): print "Starting..." def get_quotes(self, url): r = requests.get(url) soup = BeautifulSoup(r.text, "lxml") quotes = [quote.text.strip().split("\n")[0] for quote in soup.find...
import requests from bs4 import BeautifulSoup class GoodReads(object): def __init__(self): print "Starting..." def get_quotes(self, url): r = requests.get(url) soup = BeautifulSoup(r.text, "lxml") quotes = [quote.text.strip().split("\n")[0] for quote in soup.findAll('div', {'c...
import requests from bs4 import BeautifulSoup class GoodReads(object): def __init__(self): print "Starting..." def get_quotes(self, url): r = requests.get(url) soup = BeautifulSoup(r.text, "lxml") quotes = [quote.text.strip().split("\n")[0] for quote in soup.findAll('div', {'cl...
<commit_before>import requests from bs4 import BeautifulSoup class GoodReads(object): def __init__(self): print "Starting..." def get_quotes(self, url): r = requests.get(url) soup = BeautifulSoup(r.text, "lxml") quotes = [quote.text.strip().split("\n")[0] for quote in soup.find...
238427e684e6cb6f8c8cc6c80c8d24a51e908e24
bika/lims/upgrade/to3031.py
bika/lims/upgrade/to3031.py
from Products.CMFPlone.utils import _createObjectByType from zExceptions import BadRequest def upgrade(tool): portal = aq_parent(aq_inner(tool)) setup = portal.portal_setup setup.runImportStepFromProfile('profile-bika.lims:default', 'controlpanel') try: _createObjectByType("SubGroups", portal...
from Acquisition import aq_parent, aq_inner from Products.CMFCore.utils import getToolByName from Products.CMFPlone.utils import _createObjectByType from zExceptions import BadRequest def upgrade(tool): portal = aq_parent(aq_inner(tool)) at = getToolByName(portal, 'archetype_tool') at.setCatalogsByType('S...
Include catalog setup in 3031 upgrade
Include catalog setup in 3031 upgrade
Python
agpl-3.0
veroc/Bika-LIMS,anneline/Bika-LIMS,labsanmartin/Bika-LIMS,rockfruit/bika.lims,veroc/Bika-LIMS,anneline/Bika-LIMS,veroc/Bika-LIMS,anneline/Bika-LIMS,DeBortoliWines/Bika-LIMS,rockfruit/bika.lims,labsanmartin/Bika-LIMS,labsanmartin/Bika-LIMS,DeBortoliWines/Bika-LIMS,DeBortoliWines/Bika-LIMS
from Products.CMFPlone.utils import _createObjectByType from zExceptions import BadRequest def upgrade(tool): portal = aq_parent(aq_inner(tool)) setup = portal.portal_setup setup.runImportStepFromProfile('profile-bika.lims:default', 'controlpanel') try: _createObjectByType("SubGroups", portal...
from Acquisition import aq_parent, aq_inner from Products.CMFCore.utils import getToolByName from Products.CMFPlone.utils import _createObjectByType from zExceptions import BadRequest def upgrade(tool): portal = aq_parent(aq_inner(tool)) at = getToolByName(portal, 'archetype_tool') at.setCatalogsByType('S...
<commit_before>from Products.CMFPlone.utils import _createObjectByType from zExceptions import BadRequest def upgrade(tool): portal = aq_parent(aq_inner(tool)) setup = portal.portal_setup setup.runImportStepFromProfile('profile-bika.lims:default', 'controlpanel') try: _createObjectByType("Sub...
from Acquisition import aq_parent, aq_inner from Products.CMFCore.utils import getToolByName from Products.CMFPlone.utils import _createObjectByType from zExceptions import BadRequest def upgrade(tool): portal = aq_parent(aq_inner(tool)) at = getToolByName(portal, 'archetype_tool') at.setCatalogsByType('S...
from Products.CMFPlone.utils import _createObjectByType from zExceptions import BadRequest def upgrade(tool): portal = aq_parent(aq_inner(tool)) setup = portal.portal_setup setup.runImportStepFromProfile('profile-bika.lims:default', 'controlpanel') try: _createObjectByType("SubGroups", portal...
<commit_before>from Products.CMFPlone.utils import _createObjectByType from zExceptions import BadRequest def upgrade(tool): portal = aq_parent(aq_inner(tool)) setup = portal.portal_setup setup.runImportStepFromProfile('profile-bika.lims:default', 'controlpanel') try: _createObjectByType("Sub...
2e1516ee89fb0af69733bab259cbb38a3f8a614c
latexbuild/latex_parse.py
latexbuild/latex_parse.py
"""Latex parsing functionality This module provides functions to parse latex text """ import re ###################################################################### # Latex escape regex constants ###################################################################### ESCAPE_CHARS = [r'\&', '%', r'\$', '#', '_', r'\...
"""Latex parsing functionality This module provides functions to parse latex text """ import re ###################################################################### # Latex escape regex constants ###################################################################### # Organize all latex escape characters in one l...
Update latex parser to better-handle edge cases
Update latex parser to better-handle edge cases
Python
mit
pappasam/latexbuild
"""Latex parsing functionality This module provides functions to parse latex text """ import re ###################################################################### # Latex escape regex constants ###################################################################### ESCAPE_CHARS = [r'\&', '%', r'\$', '#', '_', r'\...
"""Latex parsing functionality This module provides functions to parse latex text """ import re ###################################################################### # Latex escape regex constants ###################################################################### # Organize all latex escape characters in one l...
<commit_before>"""Latex parsing functionality This module provides functions to parse latex text """ import re ###################################################################### # Latex escape regex constants ###################################################################### ESCAPE_CHARS = [r'\&', '%', r'\$'...
"""Latex parsing functionality This module provides functions to parse latex text """ import re ###################################################################### # Latex escape regex constants ###################################################################### # Organize all latex escape characters in one l...
"""Latex parsing functionality This module provides functions to parse latex text """ import re ###################################################################### # Latex escape regex constants ###################################################################### ESCAPE_CHARS = [r'\&', '%', r'\$', '#', '_', r'\...
<commit_before>"""Latex parsing functionality This module provides functions to parse latex text """ import re ###################################################################### # Latex escape regex constants ###################################################################### ESCAPE_CHARS = [r'\&', '%', r'\$'...
f4b92c2212ce2533860764fccdb5ff05df8b8059
die_bag.py
die_bag.py
import random class die_bag():#Class for rolling die/dices def __init__(self): self.data = [] def die(self, x, y = 1):#Roll a die and returns result result = [] for i in range(y): result.append(random.randint(1, x)) return result print result def take_input_die(self):#Take input from user ...
import random """In this module, die or dices are rolled""" def die(x, y = 1): """Function for rolling a die or several dice, returns an array with results of dice rolls. Parameter x is number of eyes on a die. Parameter y = 1 is the times to a die is rolled. """ result = [] for i in ...
Remove test functions and, clean code in preperation for posting a pull request
Remove test functions and, clean code in preperation for posting a pull request
Python
mit
Eanilsen/RPGHelper
import random class die_bag():#Class for rolling die/dices def __init__(self): self.data = [] def die(self, x, y = 1):#Roll a die and returns result result = [] for i in range(y): result.append(random.randint(1, x)) return result print result def take_input_die(self):#Take input from user ...
import random """In this module, die or dices are rolled""" def die(x, y = 1): """Function for rolling a die or several dice, returns an array with results of dice rolls. Parameter x is number of eyes on a die. Parameter y = 1 is the times to a die is rolled. """ result = [] for i in ...
<commit_before>import random class die_bag():#Class for rolling die/dices def __init__(self): self.data = [] def die(self, x, y = 1):#Roll a die and returns result result = [] for i in range(y): result.append(random.randint(1, x)) return result print result def take_input_die(self):#Take in...
import random """In this module, die or dices are rolled""" def die(x, y = 1): """Function for rolling a die or several dice, returns an array with results of dice rolls. Parameter x is number of eyes on a die. Parameter y = 1 is the times to a die is rolled. """ result = [] for i in ...
import random class die_bag():#Class for rolling die/dices def __init__(self): self.data = [] def die(self, x, y = 1):#Roll a die and returns result result = [] for i in range(y): result.append(random.randint(1, x)) return result print result def take_input_die(self):#Take input from user ...
<commit_before>import random class die_bag():#Class for rolling die/dices def __init__(self): self.data = [] def die(self, x, y = 1):#Roll a die and returns result result = [] for i in range(y): result.append(random.randint(1, x)) return result print result def take_input_die(self):#Take in...
fe9f2b7e76088afb6f4d905c0c4188df88b81516
pollirio/modules/__init__.py
pollirio/modules/__init__.py
# -*- coding: utf-8 -*- from functools import wraps from pollirio import commands def old_expose(cmd): def inner(fn): def wrapped(*args, **kwargs): commands[cmd] = fn fn(*args) return wraps(fn)(wrapped) return inner def expose(cmd, args=None): def decorator(fn): ...
# -*- coding: utf-8 -*- from functools import wraps from pollirio import commands def old_expose(cmd): def inner(fn): def wrapped(*args, **kwargs): commands[cmd] = fn fn(*args) return wraps(fn)(wrapped) return inner def expose(cmd, args=None): def decorator(fn): ...
Disable bts plugin for general usage
Disable bts plugin for general usage
Python
mit
dpaleino/pollirio,dpaleino/pollirio
# -*- coding: utf-8 -*- from functools import wraps from pollirio import commands def old_expose(cmd): def inner(fn): def wrapped(*args, **kwargs): commands[cmd] = fn fn(*args) return wraps(fn)(wrapped) return inner def expose(cmd, args=None): def decorator(fn): ...
# -*- coding: utf-8 -*- from functools import wraps from pollirio import commands def old_expose(cmd): def inner(fn): def wrapped(*args, **kwargs): commands[cmd] = fn fn(*args) return wraps(fn)(wrapped) return inner def expose(cmd, args=None): def decorator(fn): ...
<commit_before># -*- coding: utf-8 -*- from functools import wraps from pollirio import commands def old_expose(cmd): def inner(fn): def wrapped(*args, **kwargs): commands[cmd] = fn fn(*args) return wraps(fn)(wrapped) return inner def expose(cmd, args=None): def de...
# -*- coding: utf-8 -*- from functools import wraps from pollirio import commands def old_expose(cmd): def inner(fn): def wrapped(*args, **kwargs): commands[cmd] = fn fn(*args) return wraps(fn)(wrapped) return inner def expose(cmd, args=None): def decorator(fn): ...
# -*- coding: utf-8 -*- from functools import wraps from pollirio import commands def old_expose(cmd): def inner(fn): def wrapped(*args, **kwargs): commands[cmd] = fn fn(*args) return wraps(fn)(wrapped) return inner def expose(cmd, args=None): def decorator(fn): ...
<commit_before># -*- coding: utf-8 -*- from functools import wraps from pollirio import commands def old_expose(cmd): def inner(fn): def wrapped(*args, **kwargs): commands[cmd] = fn fn(*args) return wraps(fn)(wrapped) return inner def expose(cmd, args=None): def de...
7e823c7e46e21adb296decb45a0a2799ffc4fbe9
djconnectwise/__init__.py
djconnectwise/__init__.py
# -*- coding: utf-8 -*- VERSION = (0, 3, 7, 'alpha') # pragma: no cover if VERSION[-1] != "final": __version__ = '.'.join(map(str, VERSION)) else: # pragma: no cover __version__ = '.'.join(map(str, VERSION[:-1])) default_app_config = 'djconnectwise.apps.DjangoConnectwiseConfig'
# -*- coding: utf-8 -*- VERSION = (0, 3, 8, 'final') # pragma: no cover if VERSION[-1] != "final": __version__ = '.'.join(map(str, VERSION)) else: # pragma: no cover __version__ = '.'.join(map(str, VERSION[:-1])) default_app_config = 'djconnectwise.apps.DjangoConnectwiseConfig'
Change to 0.3.8, not alpha
Change to 0.3.8, not alpha
Python
mit
KerkhoffTechnologies/django-connectwise,KerkhoffTechnologies/django-connectwise
# -*- coding: utf-8 -*- VERSION = (0, 3, 7, 'alpha') # pragma: no cover if VERSION[-1] != "final": __version__ = '.'.join(map(str, VERSION)) else: # pragma: no cover __version__ = '.'.join(map(str, VERSION[:-1])) default_app_config = 'djconnectwise.apps.DjangoConnectwiseConfig' Change to 0.3.8, not alpha
# -*- coding: utf-8 -*- VERSION = (0, 3, 8, 'final') # pragma: no cover if VERSION[-1] != "final": __version__ = '.'.join(map(str, VERSION)) else: # pragma: no cover __version__ = '.'.join(map(str, VERSION[:-1])) default_app_config = 'djconnectwise.apps.DjangoConnectwiseConfig'
<commit_before># -*- coding: utf-8 -*- VERSION = (0, 3, 7, 'alpha') # pragma: no cover if VERSION[-1] != "final": __version__ = '.'.join(map(str, VERSION)) else: # pragma: no cover __version__ = '.'.join(map(str, VERSION[:-1])) default_app_config = 'djconnectwise.apps.DjangoConnectwiseConfig' <commit_msg>...
# -*- coding: utf-8 -*- VERSION = (0, 3, 8, 'final') # pragma: no cover if VERSION[-1] != "final": __version__ = '.'.join(map(str, VERSION)) else: # pragma: no cover __version__ = '.'.join(map(str, VERSION[:-1])) default_app_config = 'djconnectwise.apps.DjangoConnectwiseConfig'
# -*- coding: utf-8 -*- VERSION = (0, 3, 7, 'alpha') # pragma: no cover if VERSION[-1] != "final": __version__ = '.'.join(map(str, VERSION)) else: # pragma: no cover __version__ = '.'.join(map(str, VERSION[:-1])) default_app_config = 'djconnectwise.apps.DjangoConnectwiseConfig' Change to 0.3.8, not alpha#...
<commit_before># -*- coding: utf-8 -*- VERSION = (0, 3, 7, 'alpha') # pragma: no cover if VERSION[-1] != "final": __version__ = '.'.join(map(str, VERSION)) else: # pragma: no cover __version__ = '.'.join(map(str, VERSION[:-1])) default_app_config = 'djconnectwise.apps.DjangoConnectwiseConfig' <commit_msg>...
7c690e65fd1fe0a139eaca8df7799acf0f696ea5
mqtt/tests/test_client.py
mqtt/tests/test_client.py
import time from django.test import TestCase from django.contrib.auth.models import User from django.conf import settings from rest_framework.renderers import JSONRenderer from rest_framework.parsers import JSONParser from io import BytesIO import json from login.models import Profile, AmbulancePermission, HospitalP...
import time from django.test import TestCase from django.contrib.auth.models import User from django.conf import settings from rest_framework.renderers import JSONRenderer from rest_framework.parsers import JSONParser from io import BytesIO import json from login.models import Profile, AmbulancePermission, HospitalP...
Add more time to mqtt.test.client
Add more time to mqtt.test.client
Python
bsd-3-clause
EMSTrack/WebServerAndClient,EMSTrack/WebServerAndClient,EMSTrack/WebServerAndClient
import time from django.test import TestCase from django.contrib.auth.models import User from django.conf import settings from rest_framework.renderers import JSONRenderer from rest_framework.parsers import JSONParser from io import BytesIO import json from login.models import Profile, AmbulancePermission, HospitalP...
import time from django.test import TestCase from django.contrib.auth.models import User from django.conf import settings from rest_framework.renderers import JSONRenderer from rest_framework.parsers import JSONParser from io import BytesIO import json from login.models import Profile, AmbulancePermission, HospitalP...
<commit_before>import time from django.test import TestCase from django.contrib.auth.models import User from django.conf import settings from rest_framework.renderers import JSONRenderer from rest_framework.parsers import JSONParser from io import BytesIO import json from login.models import Profile, AmbulancePermis...
import time from django.test import TestCase from django.contrib.auth.models import User from django.conf import settings from rest_framework.renderers import JSONRenderer from rest_framework.parsers import JSONParser from io import BytesIO import json from login.models import Profile, AmbulancePermission, HospitalP...
import time from django.test import TestCase from django.contrib.auth.models import User from django.conf import settings from rest_framework.renderers import JSONRenderer from rest_framework.parsers import JSONParser from io import BytesIO import json from login.models import Profile, AmbulancePermission, HospitalP...
<commit_before>import time from django.test import TestCase from django.contrib.auth.models import User from django.conf import settings from rest_framework.renderers import JSONRenderer from rest_framework.parsers import JSONParser from io import BytesIO import json from login.models import Profile, AmbulancePermis...
fa108e8393632bad1a9dfc0e730bbd23fa6042c1
mysql_fuzzycount/admin.py
mysql_fuzzycount/admin.py
from django.contrib import admin from mysql_fuzzycount.queryset import FuzzyCountQuerySet class FuzzyCountModelAdminMixin(object): def queryset(self, request): qs = super(FuzzyCountModelAdminMixin, self).queryset(request) return qs._clone(klass=FuzzyCountQuerySet) class FuzzyCountModelAdmin(Fu...
from django.contrib import admin from mysql_fuzzycount.queryset import FuzzyCountQuerySet class FuzzyCountModelAdminMixin(object): def get_queryset(self, request): qs = super(FuzzyCountModelAdminMixin, self).get_queryset(request) return qs._clone(klass=FuzzyCountQuerySet) class FuzzyCountModel...
Update for newer versions of Django
Update for newer versions of Django
Python
mit
educreations/django-mysql-fuzzycount
from django.contrib import admin from mysql_fuzzycount.queryset import FuzzyCountQuerySet class FuzzyCountModelAdminMixin(object): def queryset(self, request): qs = super(FuzzyCountModelAdminMixin, self).queryset(request) return qs._clone(klass=FuzzyCountQuerySet) class FuzzyCountModelAdmin(Fu...
from django.contrib import admin from mysql_fuzzycount.queryset import FuzzyCountQuerySet class FuzzyCountModelAdminMixin(object): def get_queryset(self, request): qs = super(FuzzyCountModelAdminMixin, self).get_queryset(request) return qs._clone(klass=FuzzyCountQuerySet) class FuzzyCountModel...
<commit_before>from django.contrib import admin from mysql_fuzzycount.queryset import FuzzyCountQuerySet class FuzzyCountModelAdminMixin(object): def queryset(self, request): qs = super(FuzzyCountModelAdminMixin, self).queryset(request) return qs._clone(klass=FuzzyCountQuerySet) class FuzzyCou...
from django.contrib import admin from mysql_fuzzycount.queryset import FuzzyCountQuerySet class FuzzyCountModelAdminMixin(object): def get_queryset(self, request): qs = super(FuzzyCountModelAdminMixin, self).get_queryset(request) return qs._clone(klass=FuzzyCountQuerySet) class FuzzyCountModel...
from django.contrib import admin from mysql_fuzzycount.queryset import FuzzyCountQuerySet class FuzzyCountModelAdminMixin(object): def queryset(self, request): qs = super(FuzzyCountModelAdminMixin, self).queryset(request) return qs._clone(klass=FuzzyCountQuerySet) class FuzzyCountModelAdmin(Fu...
<commit_before>from django.contrib import admin from mysql_fuzzycount.queryset import FuzzyCountQuerySet class FuzzyCountModelAdminMixin(object): def queryset(self, request): qs = super(FuzzyCountModelAdminMixin, self).queryset(request) return qs._clone(klass=FuzzyCountQuerySet) class FuzzyCou...
3c60a46d9cb89dbf1e2e4a05766d91d837173089
encryptit/tests/openpgp_message/test_packet_location.py
encryptit/tests/openpgp_message/test_packet_location.py
import json from nose.tools import assert_equal from encryptit.openpgp_message import PacketLocation from encryptit.dump_json import OpenPGPJsonEncoder PACKET_LOCATION = PacketLocation( header_start=10, body_start=12, body_length=8) def test_packet_location_header_length_field(): assert_equal(2, PA...
import json from nose.tools import assert_equal from encryptit.openpgp_message import PacketLocation from encryptit.dump_json import OpenPGPJsonEncoder PACKET_LOCATION = PacketLocation( header_start=10, body_start=12, body_length=8) def test_packet_location_header_length_field(): assert_equal(2, PA...
Test for incorrect serialisation of PacketLocation
Test for incorrect serialisation of PacketLocation Although the `serialize` method is returning the right thing, when we serialize it with the `OpenPGPJsonEncoder`, it's being serialized as a JSON array. Test to capture that behaviour.
Python
agpl-3.0
paulfurley/encryptit,paulfurley/encryptit
import json from nose.tools import assert_equal from encryptit.openpgp_message import PacketLocation from encryptit.dump_json import OpenPGPJsonEncoder PACKET_LOCATION = PacketLocation( header_start=10, body_start=12, body_length=8) def test_packet_location_header_length_field(): assert_equal(2, PA...
import json from nose.tools import assert_equal from encryptit.openpgp_message import PacketLocation from encryptit.dump_json import OpenPGPJsonEncoder PACKET_LOCATION = PacketLocation( header_start=10, body_start=12, body_length=8) def test_packet_location_header_length_field(): assert_equal(2, PA...
<commit_before>import json from nose.tools import assert_equal from encryptit.openpgp_message import PacketLocation from encryptit.dump_json import OpenPGPJsonEncoder PACKET_LOCATION = PacketLocation( header_start=10, body_start=12, body_length=8) def test_packet_location_header_length_field(): ass...
import json from nose.tools import assert_equal from encryptit.openpgp_message import PacketLocation from encryptit.dump_json import OpenPGPJsonEncoder PACKET_LOCATION = PacketLocation( header_start=10, body_start=12, body_length=8) def test_packet_location_header_length_field(): assert_equal(2, PA...
import json from nose.tools import assert_equal from encryptit.openpgp_message import PacketLocation from encryptit.dump_json import OpenPGPJsonEncoder PACKET_LOCATION = PacketLocation( header_start=10, body_start=12, body_length=8) def test_packet_location_header_length_field(): assert_equal(2, PA...
<commit_before>import json from nose.tools import assert_equal from encryptit.openpgp_message import PacketLocation from encryptit.dump_json import OpenPGPJsonEncoder PACKET_LOCATION = PacketLocation( header_start=10, body_start=12, body_length=8) def test_packet_location_header_length_field(): ass...
f165cb38e57315fcbe4049128a436c4ef743ef4b
lib/bx/misc/bgzf_tests.py
lib/bx/misc/bgzf_tests.py
import bx.misc.bgzf def test_bgzf(): f = bx.misc.bgzf.BGZFFile( "../test_data/bgzf_tests/test.txt.gz" ) print f.read( 10 ) print f.seek( 0 ) print f.read( 10 ) test_bgzf()
import bx.misc.bgzf def test_bgzf(): f = bx.misc.bgzf.BGZFFile( "test_data/bgzf_tests/test.txt.gz" ) assert f.read( 10 ) == "begin 644 " print f.seek( 0 ) assert f.read( 10 ) == "begin 644 "
Make BGZF test a real unittest
Make BGZF test a real unittest
Python
mit
bxlab/bx-python,bxlab/bx-python,bxlab/bx-python
import bx.misc.bgzf def test_bgzf(): f = bx.misc.bgzf.BGZFFile( "../test_data/bgzf_tests/test.txt.gz" ) print f.read( 10 ) print f.seek( 0 ) print f.read( 10 ) test_bgzf()Make BGZF test a real unittest
import bx.misc.bgzf def test_bgzf(): f = bx.misc.bgzf.BGZFFile( "test_data/bgzf_tests/test.txt.gz" ) assert f.read( 10 ) == "begin 644 " print f.seek( 0 ) assert f.read( 10 ) == "begin 644 "
<commit_before>import bx.misc.bgzf def test_bgzf(): f = bx.misc.bgzf.BGZFFile( "../test_data/bgzf_tests/test.txt.gz" ) print f.read( 10 ) print f.seek( 0 ) print f.read( 10 ) test_bgzf()<commit_msg>Make BGZF test a real unittest<commit_after>
import bx.misc.bgzf def test_bgzf(): f = bx.misc.bgzf.BGZFFile( "test_data/bgzf_tests/test.txt.gz" ) assert f.read( 10 ) == "begin 644 " print f.seek( 0 ) assert f.read( 10 ) == "begin 644 "
import bx.misc.bgzf def test_bgzf(): f = bx.misc.bgzf.BGZFFile( "../test_data/bgzf_tests/test.txt.gz" ) print f.read( 10 ) print f.seek( 0 ) print f.read( 10 ) test_bgzf()Make BGZF test a real unittestimport bx.misc.bgzf def test_bgzf(): f = bx.misc.bgzf.BGZFFile( "test_data/bgzf_tests/test.t...
<commit_before>import bx.misc.bgzf def test_bgzf(): f = bx.misc.bgzf.BGZFFile( "../test_data/bgzf_tests/test.txt.gz" ) print f.read( 10 ) print f.seek( 0 ) print f.read( 10 ) test_bgzf()<commit_msg>Make BGZF test a real unittest<commit_after>import bx.misc.bgzf def test_bgzf(): f = bx.misc.bg...
46fad55c9a707caeb28663d7560d93d5e4563b72
keteparaha/__init__.py
keteparaha/__init__.py
# -*- coding: utf-8 -*- """A collection of tools to help when functional testing It contains utilities that assist with tasks like running a browser in a headless environment, or checking that emails have been sent, or a file has been uploaded to a server, or common testing flow control like retrying or ignoring certa...
# -*- coding: utf-8 -*- """A collection of tools to help when functional testing It contains utilities that assist with tasks like running a browser in a headless environment, or checking that emails have been sent, or a file has been uploaded to a server, or common testing flow control like retrying or ignoring certa...
Add more detail to module docstring
Add more detail to module docstring
Python
mit
aychedee/keteparaha,tomdottom/keteparaha
# -*- coding: utf-8 -*- """A collection of tools to help when functional testing It contains utilities that assist with tasks like running a browser in a headless environment, or checking that emails have been sent, or a file has been uploaded to a server, or common testing flow control like retrying or ignoring certa...
# -*- coding: utf-8 -*- """A collection of tools to help when functional testing It contains utilities that assist with tasks like running a browser in a headless environment, or checking that emails have been sent, or a file has been uploaded to a server, or common testing flow control like retrying or ignoring certa...
<commit_before># -*- coding: utf-8 -*- """A collection of tools to help when functional testing It contains utilities that assist with tasks like running a browser in a headless environment, or checking that emails have been sent, or a file has been uploaded to a server, or common testing flow control like retrying or...
# -*- coding: utf-8 -*- """A collection of tools to help when functional testing It contains utilities that assist with tasks like running a browser in a headless environment, or checking that emails have been sent, or a file has been uploaded to a server, or common testing flow control like retrying or ignoring certa...
# -*- coding: utf-8 -*- """A collection of tools to help when functional testing It contains utilities that assist with tasks like running a browser in a headless environment, or checking that emails have been sent, or a file has been uploaded to a server, or common testing flow control like retrying or ignoring certa...
<commit_before># -*- coding: utf-8 -*- """A collection of tools to help when functional testing It contains utilities that assist with tasks like running a browser in a headless environment, or checking that emails have been sent, or a file has been uploaded to a server, or common testing flow control like retrying or...
c705fcf1771466ac2445a8058334c27cd1040e81
docs/examples/compute/azure_arm/instantiate.py
docs/examples/compute/azure_arm/instantiate.py
from libcloud.compute.types import Provider from libcloud.compute.providers import get_driver cls = get_driver(Provider.AZURE_ARM) driver = cls(tenant_id='tenant_id', subscription_id='subscription_id', key='application_id', secret='password')
from libcloud.compute.types import Provider from libcloud.compute.providers import get_driver cls = get_driver(Provider.AZURE_ARM) driver = cls(tenant_id='tenant_id', subscription_id='subscription_id', key='application_id', secret='password')
Fix lint in example script
Fix lint in example script
Python
apache-2.0
Scalr/libcloud,illfelder/libcloud,pquentin/libcloud,apache/libcloud,pquentin/libcloud,andrewsomething/libcloud,samuelchong/libcloud,vongazman/libcloud,illfelder/libcloud,erjohnso/libcloud,SecurityCompass/libcloud,watermelo/libcloud,ByteInternet/libcloud,illfelder/libcloud,apache/libcloud,vongazman/libcloud,erjohnso/lib...
from libcloud.compute.types import Provider from libcloud.compute.providers import get_driver cls = get_driver(Provider.AZURE_ARM) driver = cls(tenant_id='tenant_id', subscription_id='subscription_id', key='application_id', secret='password') Fix lint in example script
from libcloud.compute.types import Provider from libcloud.compute.providers import get_driver cls = get_driver(Provider.AZURE_ARM) driver = cls(tenant_id='tenant_id', subscription_id='subscription_id', key='application_id', secret='password')
<commit_before>from libcloud.compute.types import Provider from libcloud.compute.providers import get_driver cls = get_driver(Provider.AZURE_ARM) driver = cls(tenant_id='tenant_id', subscription_id='subscription_id', key='application_id', secret='password') <commit_msg>Fix lint in example script<commit_after>
from libcloud.compute.types import Provider from libcloud.compute.providers import get_driver cls = get_driver(Provider.AZURE_ARM) driver = cls(tenant_id='tenant_id', subscription_id='subscription_id', key='application_id', secret='password')
from libcloud.compute.types import Provider from libcloud.compute.providers import get_driver cls = get_driver(Provider.AZURE_ARM) driver = cls(tenant_id='tenant_id', subscription_id='subscription_id', key='application_id', secret='password') Fix lint in example scriptfrom libcloud.compute.types import Provider from l...
<commit_before>from libcloud.compute.types import Provider from libcloud.compute.providers import get_driver cls = get_driver(Provider.AZURE_ARM) driver = cls(tenant_id='tenant_id', subscription_id='subscription_id', key='application_id', secret='password') <commit_msg>Fix lint in example script<commit_after>from libc...
cfb9838349a076e8fa3afe9a69db74581b13d296
labsys/auth/decorators.py
labsys/auth/decorators.py
from functools import wraps from flask import abort, current_app from flask_login import current_user from labsys.auth.models import Permission def permission_required(permission): def decorator(f): @wraps(f) def decorated_function(*args, **kwargs): if not current_user.can(permission) ...
from functools import wraps from flask import abort, current_app from flask_login import current_user from labsys.auth.models import Permission def permission_required(permission): def decorator(f): @wraps(f) def decorated_function(*args, **kwargs): if not current_user.can(permission):...
Remove test condition for permissions
:bug: Remove test condition for permissions Otherwise I would not be able to test them properly
Python
mit
gems-uff/labsys,gems-uff/labsys,gems-uff/labsys
from functools import wraps from flask import abort, current_app from flask_login import current_user from labsys.auth.models import Permission def permission_required(permission): def decorator(f): @wraps(f) def decorated_function(*args, **kwargs): if not current_user.can(permission) ...
from functools import wraps from flask import abort, current_app from flask_login import current_user from labsys.auth.models import Permission def permission_required(permission): def decorator(f): @wraps(f) def decorated_function(*args, **kwargs): if not current_user.can(permission):...
<commit_before>from functools import wraps from flask import abort, current_app from flask_login import current_user from labsys.auth.models import Permission def permission_required(permission): def decorator(f): @wraps(f) def decorated_function(*args, **kwargs): if not current_user.c...
from functools import wraps from flask import abort, current_app from flask_login import current_user from labsys.auth.models import Permission def permission_required(permission): def decorator(f): @wraps(f) def decorated_function(*args, **kwargs): if not current_user.can(permission):...
from functools import wraps from flask import abort, current_app from flask_login import current_user from labsys.auth.models import Permission def permission_required(permission): def decorator(f): @wraps(f) def decorated_function(*args, **kwargs): if not current_user.can(permission) ...
<commit_before>from functools import wraps from flask import abort, current_app from flask_login import current_user from labsys.auth.models import Permission def permission_required(permission): def decorator(f): @wraps(f) def decorated_function(*args, **kwargs): if not current_user.c...
e120aafad13138abb5d98bbad12c0d8bdc532b30
lglass/web/application.py
lglass/web/application.py
# coding: utf-8 import bottle from lglass.web.helpers import render_template, with_config app = bottle.Bottle() def index_handler(): return render_template("index.html") @with_config def robots_txt_handler(config): if config["robots.txt"] is not None: return bottle.static_file(config["robots.txt"]) bottle.abo...
# coding: utf-8 import bottle from lglass.web.helpers import render_template, with_config app = bottle.Bottle() def index_handler(): return render_template("index.html") @with_config def robots_txt_handler(config): if config["robots.txt"] is not None: return open(config["robots.txt"]) bottle.abort(404, "File ...
Replace static_file by open call
Replace static_file by open call
Python
mit
fritz0705/lglass
# coding: utf-8 import bottle from lglass.web.helpers import render_template, with_config app = bottle.Bottle() def index_handler(): return render_template("index.html") @with_config def robots_txt_handler(config): if config["robots.txt"] is not None: return bottle.static_file(config["robots.txt"]) bottle.abo...
# coding: utf-8 import bottle from lglass.web.helpers import render_template, with_config app = bottle.Bottle() def index_handler(): return render_template("index.html") @with_config def robots_txt_handler(config): if config["robots.txt"] is not None: return open(config["robots.txt"]) bottle.abort(404, "File ...
<commit_before># coding: utf-8 import bottle from lglass.web.helpers import render_template, with_config app = bottle.Bottle() def index_handler(): return render_template("index.html") @with_config def robots_txt_handler(config): if config["robots.txt"] is not None: return bottle.static_file(config["robots.txt...
# coding: utf-8 import bottle from lglass.web.helpers import render_template, with_config app = bottle.Bottle() def index_handler(): return render_template("index.html") @with_config def robots_txt_handler(config): if config["robots.txt"] is not None: return open(config["robots.txt"]) bottle.abort(404, "File ...
# coding: utf-8 import bottle from lglass.web.helpers import render_template, with_config app = bottle.Bottle() def index_handler(): return render_template("index.html") @with_config def robots_txt_handler(config): if config["robots.txt"] is not None: return bottle.static_file(config["robots.txt"]) bottle.abo...
<commit_before># coding: utf-8 import bottle from lglass.web.helpers import render_template, with_config app = bottle.Bottle() def index_handler(): return render_template("index.html") @with_config def robots_txt_handler(config): if config["robots.txt"] is not None: return bottle.static_file(config["robots.txt...
3209c35a068a14c713175257ee26f7b2c61b9845
test_package/conanfile.py
test_package/conanfile.py
from conans import ConanFile, CMake import os class MyTestConan(ConanFile): settings = "os", "compiler", "build_type", "arch" requires = "OpenCV/3.2.0-1@ohhi/stable" generators = "cmake", "txt" def imports(self): self.copy("*.dll", dst="bin", src="bin") def build(self): cmake = ...
from conans import ConanFile, CMake import os class MyTestConan(ConanFile): settings = "os", "compiler", "build_type", "arch" requires = "OpenCV/3.2.0-2@ohhi/stable" generators = "cmake", "txt" def imports(self): self.copy("*.dll", dst="bin", src="bin") def build(self): cmake = ...
Update test_package version number to match the package
Update test_package version number to match the package
Python
mit
ohhi/conan-opencv,ohhi/conan-opencv
from conans import ConanFile, CMake import os class MyTestConan(ConanFile): settings = "os", "compiler", "build_type", "arch" requires = "OpenCV/3.2.0-1@ohhi/stable" generators = "cmake", "txt" def imports(self): self.copy("*.dll", dst="bin", src="bin") def build(self): cmake = ...
from conans import ConanFile, CMake import os class MyTestConan(ConanFile): settings = "os", "compiler", "build_type", "arch" requires = "OpenCV/3.2.0-2@ohhi/stable" generators = "cmake", "txt" def imports(self): self.copy("*.dll", dst="bin", src="bin") def build(self): cmake = ...
<commit_before>from conans import ConanFile, CMake import os class MyTestConan(ConanFile): settings = "os", "compiler", "build_type", "arch" requires = "OpenCV/3.2.0-1@ohhi/stable" generators = "cmake", "txt" def imports(self): self.copy("*.dll", dst="bin", src="bin") def build(self): ...
from conans import ConanFile, CMake import os class MyTestConan(ConanFile): settings = "os", "compiler", "build_type", "arch" requires = "OpenCV/3.2.0-2@ohhi/stable" generators = "cmake", "txt" def imports(self): self.copy("*.dll", dst="bin", src="bin") def build(self): cmake = ...
from conans import ConanFile, CMake import os class MyTestConan(ConanFile): settings = "os", "compiler", "build_type", "arch" requires = "OpenCV/3.2.0-1@ohhi/stable" generators = "cmake", "txt" def imports(self): self.copy("*.dll", dst="bin", src="bin") def build(self): cmake = ...
<commit_before>from conans import ConanFile, CMake import os class MyTestConan(ConanFile): settings = "os", "compiler", "build_type", "arch" requires = "OpenCV/3.2.0-1@ohhi/stable" generators = "cmake", "txt" def imports(self): self.copy("*.dll", dst="bin", src="bin") def build(self): ...
c32b1ac940aee449fb3a73fe9c04837618eb7ad1
python/servo/packages.py
python/servo/packages.py
# 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 https://mozilla.org/MPL/2.0/. WINDOWS_MSVC = { "cmake": "3.14.3", "llvm": "8.0.1", "moztools": "3.2", "ninja": "1.7.1", "nuget": ...
# 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 https://mozilla.org/MPL/2.0/. WINDOWS_MSVC = { "cmake": "3.14.3", "llvm": "9.0.0", "moztools": "3.2", "ninja": "1.7.1", "nuget": ...
Upgrade clang to 9.0 on Windows.
Upgrade clang to 9.0 on Windows.
Python
mpl-2.0
KiChjang/servo,splav/servo,KiChjang/servo,KiChjang/servo,KiChjang/servo,KiChjang/servo,KiChjang/servo,splav/servo,splav/servo,KiChjang/servo,splav/servo,splav/servo,splav/servo,splav/servo,KiChjang/servo,KiChjang/servo,KiChjang/servo,splav/servo,splav/servo,splav/servo
# 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 https://mozilla.org/MPL/2.0/. WINDOWS_MSVC = { "cmake": "3.14.3", "llvm": "8.0.1", "moztools": "3.2", "ninja": "1.7.1", "nuget": ...
# 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 https://mozilla.org/MPL/2.0/. WINDOWS_MSVC = { "cmake": "3.14.3", "llvm": "9.0.0", "moztools": "3.2", "ninja": "1.7.1", "nuget": ...
<commit_before># 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 https://mozilla.org/MPL/2.0/. WINDOWS_MSVC = { "cmake": "3.14.3", "llvm": "8.0.1", "moztools": "3.2", "ninja": "1.7.1"...
# 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 https://mozilla.org/MPL/2.0/. WINDOWS_MSVC = { "cmake": "3.14.3", "llvm": "9.0.0", "moztools": "3.2", "ninja": "1.7.1", "nuget": ...
# 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 https://mozilla.org/MPL/2.0/. WINDOWS_MSVC = { "cmake": "3.14.3", "llvm": "8.0.1", "moztools": "3.2", "ninja": "1.7.1", "nuget": ...
<commit_before># 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 https://mozilla.org/MPL/2.0/. WINDOWS_MSVC = { "cmake": "3.14.3", "llvm": "8.0.1", "moztools": "3.2", "ninja": "1.7.1"...
2b21871f3a06d296066b8409741212537b458fa3
tests/offline/__init__.py
tests/offline/__init__.py
# coding: utf-8 from __future__ import unicode_literals, print_function import os import pytest from codecs import open from contextlib import contextmanager from requests import Response def make_requests_get_mock(filename): def mockreturn(*args, **kwargs): response = Response() with open(os.pa...
# coding: utf-8 # Python modules from __future__ import unicode_literals, print_function import os from codecs import open from contextlib import contextmanager # Third-party modules import pytest # Project modules from requests import Response from tests import request_is_valid def make_requests_get_mock(filename...
Use context manager for the offline tests
Use context manager for the offline tests
Python
mit
alexandriagroup/fnapy,alexandriagroup/fnapy
# coding: utf-8 from __future__ import unicode_literals, print_function import os import pytest from codecs import open from contextlib import contextmanager from requests import Response def make_requests_get_mock(filename): def mockreturn(*args, **kwargs): response = Response() with open(os.pa...
# coding: utf-8 # Python modules from __future__ import unicode_literals, print_function import os from codecs import open from contextlib import contextmanager # Third-party modules import pytest # Project modules from requests import Response from tests import request_is_valid def make_requests_get_mock(filename...
<commit_before># coding: utf-8 from __future__ import unicode_literals, print_function import os import pytest from codecs import open from contextlib import contextmanager from requests import Response def make_requests_get_mock(filename): def mockreturn(*args, **kwargs): response = Response() ...
# coding: utf-8 # Python modules from __future__ import unicode_literals, print_function import os from codecs import open from contextlib import contextmanager # Third-party modules import pytest # Project modules from requests import Response from tests import request_is_valid def make_requests_get_mock(filename...
# coding: utf-8 from __future__ import unicode_literals, print_function import os import pytest from codecs import open from contextlib import contextmanager from requests import Response def make_requests_get_mock(filename): def mockreturn(*args, **kwargs): response = Response() with open(os.pa...
<commit_before># coding: utf-8 from __future__ import unicode_literals, print_function import os import pytest from codecs import open from contextlib import contextmanager from requests import Response def make_requests_get_mock(filename): def mockreturn(*args, **kwargs): response = Response() ...
d64492c85182a992597729999f1e4483977b87d6
cisco_olt_client/command.py
cisco_olt_client/command.py
import collections class Command: def __init__(self, cmd, args=None): ''' Single command and it's output representation >>> c = Command('/remote-eq/status/show', ['--onuID=23', '--port=pon.7']) >>> c.compile() '/remote-eq/status/show --onuID=23 --port=pon.7' :par...
import shlex import collections def arg2tuple(arg): ''' Parse command line argument into name, value tuple ''' name, value = arg.split('=', 1) if name.startswith('--'): name = name[2:] # try to normalize string that's quoted _value = shlex.split(value) # other length than 1 m...
Add function for parsing cli arguments
Add function for parsing cli arguments
Python
mit
Vnet-as/cisco-olt-client
import collections class Command: def __init__(self, cmd, args=None): ''' Single command and it's output representation >>> c = Command('/remote-eq/status/show', ['--onuID=23', '--port=pon.7']) >>> c.compile() '/remote-eq/status/show --onuID=23 --port=pon.7' :par...
import shlex import collections def arg2tuple(arg): ''' Parse command line argument into name, value tuple ''' name, value = arg.split('=', 1) if name.startswith('--'): name = name[2:] # try to normalize string that's quoted _value = shlex.split(value) # other length than 1 m...
<commit_before>import collections class Command: def __init__(self, cmd, args=None): ''' Single command and it's output representation >>> c = Command('/remote-eq/status/show', ['--onuID=23', '--port=pon.7']) >>> c.compile() '/remote-eq/status/show --onuID=23 --port=pon.7...
import shlex import collections def arg2tuple(arg): ''' Parse command line argument into name, value tuple ''' name, value = arg.split('=', 1) if name.startswith('--'): name = name[2:] # try to normalize string that's quoted _value = shlex.split(value) # other length than 1 m...
import collections class Command: def __init__(self, cmd, args=None): ''' Single command and it's output representation >>> c = Command('/remote-eq/status/show', ['--onuID=23', '--port=pon.7']) >>> c.compile() '/remote-eq/status/show --onuID=23 --port=pon.7' :par...
<commit_before>import collections class Command: def __init__(self, cmd, args=None): ''' Single command and it's output representation >>> c = Command('/remote-eq/status/show', ['--onuID=23', '--port=pon.7']) >>> c.compile() '/remote-eq/status/show --onuID=23 --port=pon.7...
8d3e79d268ae16e9774c60332c47b11038407050
vagrant/roles/db/molecule/default/tests/test_default.py
vagrant/roles/db/molecule/default/tests/test_default.py
import os import testinfra.utils.ansible_runner testinfra_hosts = testinfra.utils.ansible_runner.AnsibleRunner( os.environ['MOLECULE_INVENTORY_FILE']).get_hosts('all') # check if MongoDB is enabled and running def test_mongo_running_and_enabled(host): mongo = host.service("mongod") assert mongo.is_runnin...
import os import testinfra.utils.ansible_runner testinfra_hosts = testinfra.utils.ansible_runner.AnsibleRunner( os.environ['MOLECULE_INVENTORY_FILE']).get_hosts('all') # check if MongoDB is listen concrete host and port def test_mongo_host_port(host): socket = host.socket("tcp://127.0.0.1:27017") assert ...
Add 'testinfra' test method 'test_mongo_host_port'
Add 'testinfra' test method 'test_mongo_host_port'
Python
mit
DmitriySh/infra,DmitriySh/infra,DmitriySh/infra
import os import testinfra.utils.ansible_runner testinfra_hosts = testinfra.utils.ansible_runner.AnsibleRunner( os.environ['MOLECULE_INVENTORY_FILE']).get_hosts('all') # check if MongoDB is enabled and running def test_mongo_running_and_enabled(host): mongo = host.service("mongod") assert mongo.is_runnin...
import os import testinfra.utils.ansible_runner testinfra_hosts = testinfra.utils.ansible_runner.AnsibleRunner( os.environ['MOLECULE_INVENTORY_FILE']).get_hosts('all') # check if MongoDB is listen concrete host and port def test_mongo_host_port(host): socket = host.socket("tcp://127.0.0.1:27017") assert ...
<commit_before>import os import testinfra.utils.ansible_runner testinfra_hosts = testinfra.utils.ansible_runner.AnsibleRunner( os.environ['MOLECULE_INVENTORY_FILE']).get_hosts('all') # check if MongoDB is enabled and running def test_mongo_running_and_enabled(host): mongo = host.service("mongod") assert ...
import os import testinfra.utils.ansible_runner testinfra_hosts = testinfra.utils.ansible_runner.AnsibleRunner( os.environ['MOLECULE_INVENTORY_FILE']).get_hosts('all') # check if MongoDB is listen concrete host and port def test_mongo_host_port(host): socket = host.socket("tcp://127.0.0.1:27017") assert ...
import os import testinfra.utils.ansible_runner testinfra_hosts = testinfra.utils.ansible_runner.AnsibleRunner( os.environ['MOLECULE_INVENTORY_FILE']).get_hosts('all') # check if MongoDB is enabled and running def test_mongo_running_and_enabled(host): mongo = host.service("mongod") assert mongo.is_runnin...
<commit_before>import os import testinfra.utils.ansible_runner testinfra_hosts = testinfra.utils.ansible_runner.AnsibleRunner( os.environ['MOLECULE_INVENTORY_FILE']).get_hosts('all') # check if MongoDB is enabled and running def test_mongo_running_and_enabled(host): mongo = host.service("mongod") assert ...
8c1f303d4cc04c95170dea268ab836a23d626064
thezombies/management/commands/crawl_agency_datasets.py
thezombies/management/commands/crawl_agency_datasets.py
from django.core.management.base import BaseCommand from thezombies.tasks.main import crawl_agency_datasets class Command(BaseCommand): """Start a task that crawl the datasets from an agency data catalog. This command will exit, but the task will run in the background""" args = '<agency_id ...>' def hand...
from django.core.management.base import BaseCommand from thezombies.models import Agency from thezombies.tasks.main import crawl_agency_datasets class Command(BaseCommand): """Start a task that crawl the datasets from an agency data catalog. This command will exit, but the task will run in the background""" a...
Add message for when command is not supplied any arguments.
Add message for when command is not supplied any arguments.
Python
bsd-3-clause
sunlightlabs/thezombies,sunlightlabs/thezombies,sunlightlabs/thezombies,sunlightlabs/thezombies
from django.core.management.base import BaseCommand from thezombies.tasks.main import crawl_agency_datasets class Command(BaseCommand): """Start a task that crawl the datasets from an agency data catalog. This command will exit, but the task will run in the background""" args = '<agency_id ...>' def hand...
from django.core.management.base import BaseCommand from thezombies.models import Agency from thezombies.tasks.main import crawl_agency_datasets class Command(BaseCommand): """Start a task that crawl the datasets from an agency data catalog. This command will exit, but the task will run in the background""" a...
<commit_before>from django.core.management.base import BaseCommand from thezombies.tasks.main import crawl_agency_datasets class Command(BaseCommand): """Start a task that crawl the datasets from an agency data catalog. This command will exit, but the task will run in the background""" args = '<agency_id ...>...
from django.core.management.base import BaseCommand from thezombies.models import Agency from thezombies.tasks.main import crawl_agency_datasets class Command(BaseCommand): """Start a task that crawl the datasets from an agency data catalog. This command will exit, but the task will run in the background""" a...
from django.core.management.base import BaseCommand from thezombies.tasks.main import crawl_agency_datasets class Command(BaseCommand): """Start a task that crawl the datasets from an agency data catalog. This command will exit, but the task will run in the background""" args = '<agency_id ...>' def hand...
<commit_before>from django.core.management.base import BaseCommand from thezombies.tasks.main import crawl_agency_datasets class Command(BaseCommand): """Start a task that crawl the datasets from an agency data catalog. This command will exit, but the task will run in the background""" args = '<agency_id ...>...
5ea20ad3bd4ca2a3384229e76559be9758b59ab1
tests/scan.py
tests/scan.py
# Copyright 2020 Google LLC # # 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 # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, ...
# Copyright 2020 Google LLC # # 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 # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, ...
Return different values for carry and output.
Return different values for carry and output.
Python
apache-2.0
google/objax,google/objax
# Copyright 2020 Google LLC # # 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 # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, ...
# Copyright 2020 Google LLC # # 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 # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, ...
<commit_before># Copyright 2020 Google LLC # # 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 # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed ...
# Copyright 2020 Google LLC # # 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 # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, ...
# Copyright 2020 Google LLC # # 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 # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, ...
<commit_before># Copyright 2020 Google LLC # # 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 # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed ...
22ef8a836a765b98fbc05bda5254ee9e5b6bf11b
udata/core/jobs/models.py
udata/core/jobs/models.py
# -*- coding: utf-8 -*- from __future__ import unicode_literals from celerybeatmongo.models import PeriodicTask as BasePeriodicTask, PERIODS from udata.i18n import lazy_gettext as _ from udata.models import db __all__ = ('PeriodicTask', 'PERIODS') class PeriodicTask(BasePeriodicTask): last_run_id = db.StringF...
# -*- coding: utf-8 -*- from __future__ import unicode_literals from celerybeatmongo.models import PeriodicTask as BasePeriodicTask, PERIODS from udata.i18n import lazy_gettext as _ from udata.models import db __all__ = ('PeriodicTask', 'PERIODS') CRON = '{minute} {hour} {day_of_month} {month_of_year} {day_of_week...
Fix periodic tasks model display
Fix periodic tasks model display
Python
agpl-3.0
opendatateam/udata,davidbgk/udata,etalab/udata,opendatateam/udata,opendatateam/udata,etalab/udata,davidbgk/udata,etalab/udata,davidbgk/udata
# -*- coding: utf-8 -*- from __future__ import unicode_literals from celerybeatmongo.models import PeriodicTask as BasePeriodicTask, PERIODS from udata.i18n import lazy_gettext as _ from udata.models import db __all__ = ('PeriodicTask', 'PERIODS') class PeriodicTask(BasePeriodicTask): last_run_id = db.StringF...
# -*- coding: utf-8 -*- from __future__ import unicode_literals from celerybeatmongo.models import PeriodicTask as BasePeriodicTask, PERIODS from udata.i18n import lazy_gettext as _ from udata.models import db __all__ = ('PeriodicTask', 'PERIODS') CRON = '{minute} {hour} {day_of_month} {month_of_year} {day_of_week...
<commit_before># -*- coding: utf-8 -*- from __future__ import unicode_literals from celerybeatmongo.models import PeriodicTask as BasePeriodicTask, PERIODS from udata.i18n import lazy_gettext as _ from udata.models import db __all__ = ('PeriodicTask', 'PERIODS') class PeriodicTask(BasePeriodicTask): last_run_...
# -*- coding: utf-8 -*- from __future__ import unicode_literals from celerybeatmongo.models import PeriodicTask as BasePeriodicTask, PERIODS from udata.i18n import lazy_gettext as _ from udata.models import db __all__ = ('PeriodicTask', 'PERIODS') CRON = '{minute} {hour} {day_of_month} {month_of_year} {day_of_week...
# -*- coding: utf-8 -*- from __future__ import unicode_literals from celerybeatmongo.models import PeriodicTask as BasePeriodicTask, PERIODS from udata.i18n import lazy_gettext as _ from udata.models import db __all__ = ('PeriodicTask', 'PERIODS') class PeriodicTask(BasePeriodicTask): last_run_id = db.StringF...
<commit_before># -*- coding: utf-8 -*- from __future__ import unicode_literals from celerybeatmongo.models import PeriodicTask as BasePeriodicTask, PERIODS from udata.i18n import lazy_gettext as _ from udata.models import db __all__ = ('PeriodicTask', 'PERIODS') class PeriodicTask(BasePeriodicTask): last_run_...
20699a38f8ab28fa605abbe110d0bfdb2b571662
workers/exec/examples/dummy_worker.py
workers/exec/examples/dummy_worker.py
#!/usr/bin/env python from __future__ import print_function import socket import time import sys DEFAULT_IP = '127.0.0.1' DEFAULT_PORT = 8125 if __name__ == '__main__': s = socket.socket(socket.AF_INET, socket.SOCK_DGRAM) for i in xrange(1, 3000): s.sendto("dummy.counter1:{0}|c\n".format(i), (DEFAULT...
#!/usr/bin/env python from __future__ import print_function import socket import time import sys DEFAULT_IP = '127.0.0.1' DEFAULT_PORT = 8125 if __name__ == '__main__': s = socket.socket(socket.AF_INET, socket.SOCK_DGRAM) for i in xrange(1, 3000): s.sendto("dummy.counter1:{0}|c\n".format(i), (DEFAULT...
Add flush for dummy exec worker
Add flush for dummy exec worker
Python
bsd-3-clause
timofey-barmin/mzbench,timofey-barmin/mzbench,timofey-barmin/mzbench,machinezone/mzbench,timofey-barmin/mzbench,timofey-barmin/mzbench,machinezone/mzbench,machinezone/mzbench,machinezone/mzbench,machinezone/mzbench
#!/usr/bin/env python from __future__ import print_function import socket import time import sys DEFAULT_IP = '127.0.0.1' DEFAULT_PORT = 8125 if __name__ == '__main__': s = socket.socket(socket.AF_INET, socket.SOCK_DGRAM) for i in xrange(1, 3000): s.sendto("dummy.counter1:{0}|c\n".format(i), (DEFAULT...
#!/usr/bin/env python from __future__ import print_function import socket import time import sys DEFAULT_IP = '127.0.0.1' DEFAULT_PORT = 8125 if __name__ == '__main__': s = socket.socket(socket.AF_INET, socket.SOCK_DGRAM) for i in xrange(1, 3000): s.sendto("dummy.counter1:{0}|c\n".format(i), (DEFAULT...
<commit_before>#!/usr/bin/env python from __future__ import print_function import socket import time import sys DEFAULT_IP = '127.0.0.1' DEFAULT_PORT = 8125 if __name__ == '__main__': s = socket.socket(socket.AF_INET, socket.SOCK_DGRAM) for i in xrange(1, 3000): s.sendto("dummy.counter1:{0}|c\n".form...
#!/usr/bin/env python from __future__ import print_function import socket import time import sys DEFAULT_IP = '127.0.0.1' DEFAULT_PORT = 8125 if __name__ == '__main__': s = socket.socket(socket.AF_INET, socket.SOCK_DGRAM) for i in xrange(1, 3000): s.sendto("dummy.counter1:{0}|c\n".format(i), (DEFAULT...
#!/usr/bin/env python from __future__ import print_function import socket import time import sys DEFAULT_IP = '127.0.0.1' DEFAULT_PORT = 8125 if __name__ == '__main__': s = socket.socket(socket.AF_INET, socket.SOCK_DGRAM) for i in xrange(1, 3000): s.sendto("dummy.counter1:{0}|c\n".format(i), (DEFAULT...
<commit_before>#!/usr/bin/env python from __future__ import print_function import socket import time import sys DEFAULT_IP = '127.0.0.1' DEFAULT_PORT = 8125 if __name__ == '__main__': s = socket.socket(socket.AF_INET, socket.SOCK_DGRAM) for i in xrange(1, 3000): s.sendto("dummy.counter1:{0}|c\n".form...
2ec5f71d04ae17a1c0a457fba1b82f8c8e8891ab
sc2reader/listeners/utils.py
sc2reader/listeners/utils.py
from sc2reader import log_utils class ListenerBase(object): def __init__(self): self.logger = log_utils.get_logger(self.__class__) def accepts(self, event): return true
from sc2reader import log_utils class ListenerBase(object): def __init__(self): self.logger = log_utils.get_logger(self.__class__) def accepts(self, event): return true def setup(self, replay): pass
Add a default ListenerBase.setup implementation.
Add a default ListenerBase.setup implementation.
Python
mit
StoicLoofah/sc2reader,vlaufer/sc2reader,vlaufer/sc2reader,GraylinKim/sc2reader,ggtracker/sc2reader,ggtracker/sc2reader,GraylinKim/sc2reader,StoicLoofah/sc2reader
from sc2reader import log_utils class ListenerBase(object): def __init__(self): self.logger = log_utils.get_logger(self.__class__) def accepts(self, event): return trueAdd a default ListenerBase.setup implementation.
from sc2reader import log_utils class ListenerBase(object): def __init__(self): self.logger = log_utils.get_logger(self.__class__) def accepts(self, event): return true def setup(self, replay): pass
<commit_before>from sc2reader import log_utils class ListenerBase(object): def __init__(self): self.logger = log_utils.get_logger(self.__class__) def accepts(self, event): return true<commit_msg>Add a default ListenerBase.setup implementation.<commit_after>
from sc2reader import log_utils class ListenerBase(object): def __init__(self): self.logger = log_utils.get_logger(self.__class__) def accepts(self, event): return true def setup(self, replay): pass
from sc2reader import log_utils class ListenerBase(object): def __init__(self): self.logger = log_utils.get_logger(self.__class__) def accepts(self, event): return trueAdd a default ListenerBase.setup implementation.from sc2reader import log_utils class ListenerBase(object): def __init__(...
<commit_before>from sc2reader import log_utils class ListenerBase(object): def __init__(self): self.logger = log_utils.get_logger(self.__class__) def accepts(self, event): return true<commit_msg>Add a default ListenerBase.setup implementation.<commit_after>from sc2reader import log_utils clas...