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
b81ace397887cb6d0fc7db21d623667223adbfbf
python/frequency_queries.py
python/frequency_queries.py
#!/bin/python3 import math import os import random import re import sys from collections import Counter # Complete the freqQuery function below. def freqQuery(queries): output = [] occurences = Counter() frequencies = Counter() for operation, value in queries: if (operation == 1): frequencies[occur...
#!/bin/python3 import math import os import random import re import sys from collections import Counter # Complete the freqQuery function below. def freqQuery(queries): output = [] array = [] occurences = Counter() frequencies = Counter() for operation, value in queries: if (operation == 1): freq...
Fix bug with negative counts
Fix bug with negative counts
Python
mit
rootulp/hackerrank,rootulp/hackerrank,rootulp/hackerrank,rootulp/hackerrank,rootulp/hackerrank,rootulp/hackerrank
#!/bin/python3 import math import os import random import re import sys from collections import Counter # Complete the freqQuery function below. def freqQuery(queries): output = [] occurences = Counter() frequencies = Counter() for operation, value in queries: if (operation == 1): frequencies[occur...
#!/bin/python3 import math import os import random import re import sys from collections import Counter # Complete the freqQuery function below. def freqQuery(queries): output = [] array = [] occurences = Counter() frequencies = Counter() for operation, value in queries: if (operation == 1): freq...
<commit_before>#!/bin/python3 import math import os import random import re import sys from collections import Counter # Complete the freqQuery function below. def freqQuery(queries): output = [] occurences = Counter() frequencies = Counter() for operation, value in queries: if (operation == 1): fr...
#!/bin/python3 import math import os import random import re import sys from collections import Counter # Complete the freqQuery function below. def freqQuery(queries): output = [] array = [] occurences = Counter() frequencies = Counter() for operation, value in queries: if (operation == 1): freq...
#!/bin/python3 import math import os import random import re import sys from collections import Counter # Complete the freqQuery function below. def freqQuery(queries): output = [] occurences = Counter() frequencies = Counter() for operation, value in queries: if (operation == 1): frequencies[occur...
<commit_before>#!/bin/python3 import math import os import random import re import sys from collections import Counter # Complete the freqQuery function below. def freqQuery(queries): output = [] occurences = Counter() frequencies = Counter() for operation, value in queries: if (operation == 1): fr...
8b731102036583099bda475ec1a857b19ff18f80
minimal.py
minimal.py
import sys from django.conf import settings from django.conf.urls import url from django.core.management import execute_from_command_line from django.http import HttpResponse settings.configure( DEBUG=True, ROOT_URLCONF=sys.modules[__name__], ) def index(request): return HttpResponse('<h1>A minimal Djan...
import sys from django.conf import settings from django.urls import path from django.core.management import execute_from_command_line from django.http import HttpResponse settings.configure( DEBUG=True, ROOT_URLCONF=sys.modules[__name__], ) def index(request): return HttpResponse('<h1>A minimal Django r...
Update `urlpatterns` for 4.0 removal of `django.conf.urls.url()`
Update `urlpatterns` for 4.0 removal of `django.conf.urls.url()`
Python
mit
rnevius/minimal-django
import sys from django.conf import settings from django.conf.urls import url from django.core.management import execute_from_command_line from django.http import HttpResponse settings.configure( DEBUG=True, ROOT_URLCONF=sys.modules[__name__], ) def index(request): return HttpResponse('<h1>A minimal Djan...
import sys from django.conf import settings from django.urls import path from django.core.management import execute_from_command_line from django.http import HttpResponse settings.configure( DEBUG=True, ROOT_URLCONF=sys.modules[__name__], ) def index(request): return HttpResponse('<h1>A minimal Django r...
<commit_before>import sys from django.conf import settings from django.conf.urls import url from django.core.management import execute_from_command_line from django.http import HttpResponse settings.configure( DEBUG=True, ROOT_URLCONF=sys.modules[__name__], ) def index(request): return HttpResponse('<h1...
import sys from django.conf import settings from django.urls import path from django.core.management import execute_from_command_line from django.http import HttpResponse settings.configure( DEBUG=True, ROOT_URLCONF=sys.modules[__name__], ) def index(request): return HttpResponse('<h1>A minimal Django r...
import sys from django.conf import settings from django.conf.urls import url from django.core.management import execute_from_command_line from django.http import HttpResponse settings.configure( DEBUG=True, ROOT_URLCONF=sys.modules[__name__], ) def index(request): return HttpResponse('<h1>A minimal Djan...
<commit_before>import sys from django.conf import settings from django.conf.urls import url from django.core.management import execute_from_command_line from django.http import HttpResponse settings.configure( DEBUG=True, ROOT_URLCONF=sys.modules[__name__], ) def index(request): return HttpResponse('<h1...
fdc0bb75271b90a31072f79b95283e1156d50181
waffle/decorators.py
waffle/decorators.py
from functools import wraps from django.http import Http404 from django.utils.decorators import available_attrs from waffle import is_active def waffle(flag_name): def decorator(view): if flag_name.startswith('!'): active = is_active(request, flag_name[1:]) else: active =...
from functools import wraps from django.http import Http404 from django.utils.decorators import available_attrs from waffle import is_active def waffle(flag_name): def decorator(view): @wraps(view, assigned=available_attrs(view)) def _wrapped_view(request, *args, **kwargs): if flag_n...
Make the decorator actually work again.
Make the decorator actually work again.
Python
bsd-3-clause
isotoma/django-waffle,TwigWorld/django-waffle,rlr/django-waffle,webus/django-waffle,groovecoder/django-waffle,JeLoueMonCampingCar/django-waffle,crccheck/django-waffle,safarijv/django-waffle,paulcwatts/django-waffle,JeLoueMonCampingCar/django-waffle,11craft/django-waffle,festicket/django-waffle,styleseat/django-waffle,m...
from functools import wraps from django.http import Http404 from django.utils.decorators import available_attrs from waffle import is_active def waffle(flag_name): def decorator(view): if flag_name.startswith('!'): active = is_active(request, flag_name[1:]) else: active =...
from functools import wraps from django.http import Http404 from django.utils.decorators import available_attrs from waffle import is_active def waffle(flag_name): def decorator(view): @wraps(view, assigned=available_attrs(view)) def _wrapped_view(request, *args, **kwargs): if flag_n...
<commit_before>from functools import wraps from django.http import Http404 from django.utils.decorators import available_attrs from waffle import is_active def waffle(flag_name): def decorator(view): if flag_name.startswith('!'): active = is_active(request, flag_name[1:]) else: ...
from functools import wraps from django.http import Http404 from django.utils.decorators import available_attrs from waffle import is_active def waffle(flag_name): def decorator(view): @wraps(view, assigned=available_attrs(view)) def _wrapped_view(request, *args, **kwargs): if flag_n...
from functools import wraps from django.http import Http404 from django.utils.decorators import available_attrs from waffle import is_active def waffle(flag_name): def decorator(view): if flag_name.startswith('!'): active = is_active(request, flag_name[1:]) else: active =...
<commit_before>from functools import wraps from django.http import Http404 from django.utils.decorators import available_attrs from waffle import is_active def waffle(flag_name): def decorator(view): if flag_name.startswith('!'): active = is_active(request, flag_name[1:]) else: ...
6c578b67753e7a3fd646e5d91259b50c0b39bec6
tests/test_add_target.py
tests/test_add_target.py
""" Tests for helper function for adding a target to a Vuforia database. """ import io from vws import VWS class TestSuccess: """ Tests for successfully adding a target. """ def test_add_target( self, client: VWS, high_quality_image: io.BytesIO, ) -> None: """ ...
""" Tests for helper function for adding a target to a Vuforia database. """ import io from mock_vws import MockVWS from vws import VWS class TestSuccess: """ Tests for successfully adding a target. """ def test_add_target( self, client: VWS, high_quality_image: io.BytesIO,...
Add test for custom base URL
Add test for custom base URL
Python
mit
adamtheturtle/vws-python,adamtheturtle/vws-python
""" Tests for helper function for adding a target to a Vuforia database. """ import io from vws import VWS class TestSuccess: """ Tests for successfully adding a target. """ def test_add_target( self, client: VWS, high_quality_image: io.BytesIO, ) -> None: """ ...
""" Tests for helper function for adding a target to a Vuforia database. """ import io from mock_vws import MockVWS from vws import VWS class TestSuccess: """ Tests for successfully adding a target. """ def test_add_target( self, client: VWS, high_quality_image: io.BytesIO,...
<commit_before>""" Tests for helper function for adding a target to a Vuforia database. """ import io from vws import VWS class TestSuccess: """ Tests for successfully adding a target. """ def test_add_target( self, client: VWS, high_quality_image: io.BytesIO, ) -> None:...
""" Tests for helper function for adding a target to a Vuforia database. """ import io from mock_vws import MockVWS from vws import VWS class TestSuccess: """ Tests for successfully adding a target. """ def test_add_target( self, client: VWS, high_quality_image: io.BytesIO,...
""" Tests for helper function for adding a target to a Vuforia database. """ import io from vws import VWS class TestSuccess: """ Tests for successfully adding a target. """ def test_add_target( self, client: VWS, high_quality_image: io.BytesIO, ) -> None: """ ...
<commit_before>""" Tests for helper function for adding a target to a Vuforia database. """ import io from vws import VWS class TestSuccess: """ Tests for successfully adding a target. """ def test_add_target( self, client: VWS, high_quality_image: io.BytesIO, ) -> None:...
b6711f27146279ee419143b560cf32d3b3dfc80c
tools/conan/conanfile.py
tools/conan/conanfile.py
from conans import ConanFile, CMake, tools class VarconfConan(ConanFile): name = "varconf" version = "1.0.3" license = "GPL-2.0+" author = "Erik Ogenvik <[email protected]>" homepage = "https://www.worldforge.org" url = "https://github.com/worldforge/varconf" description = "Configuration li...
from conans import ConanFile, CMake, tools class VarconfConan(ConanFile): name = "varconf" version = "1.0.3" license = "GPL-2.0+" author = "Erik Ogenvik <[email protected]>" homepage = "https://www.worldforge.org" url = "https://github.com/worldforge/varconf" description = "Configuration li...
Include binaries when importing (for Windows).
Include binaries when importing (for Windows).
Python
lgpl-2.1
worldforge/varconf,worldforge/varconf,worldforge/varconf,worldforge/varconf
from conans import ConanFile, CMake, tools class VarconfConan(ConanFile): name = "varconf" version = "1.0.3" license = "GPL-2.0+" author = "Erik Ogenvik <[email protected]>" homepage = "https://www.worldforge.org" url = "https://github.com/worldforge/varconf" description = "Configuration li...
from conans import ConanFile, CMake, tools class VarconfConan(ConanFile): name = "varconf" version = "1.0.3" license = "GPL-2.0+" author = "Erik Ogenvik <[email protected]>" homepage = "https://www.worldforge.org" url = "https://github.com/worldforge/varconf" description = "Configuration li...
<commit_before>from conans import ConanFile, CMake, tools class VarconfConan(ConanFile): name = "varconf" version = "1.0.3" license = "GPL-2.0+" author = "Erik Ogenvik <[email protected]>" homepage = "https://www.worldforge.org" url = "https://github.com/worldforge/varconf" description = "C...
from conans import ConanFile, CMake, tools class VarconfConan(ConanFile): name = "varconf" version = "1.0.3" license = "GPL-2.0+" author = "Erik Ogenvik <[email protected]>" homepage = "https://www.worldforge.org" url = "https://github.com/worldforge/varconf" description = "Configuration li...
from conans import ConanFile, CMake, tools class VarconfConan(ConanFile): name = "varconf" version = "1.0.3" license = "GPL-2.0+" author = "Erik Ogenvik <[email protected]>" homepage = "https://www.worldforge.org" url = "https://github.com/worldforge/varconf" description = "Configuration li...
<commit_before>from conans import ConanFile, CMake, tools class VarconfConan(ConanFile): name = "varconf" version = "1.0.3" license = "GPL-2.0+" author = "Erik Ogenvik <[email protected]>" homepage = "https://www.worldforge.org" url = "https://github.com/worldforge/varconf" description = "C...
4307fa24a27a2c623836a7518e3aceb4546abcf6
scholrroles/behaviour.py
scholrroles/behaviour.py
from collections import defaultdict from .utils import get_value_from_accessor class RoleBehaviour(object): ids = [] object_accessors = {} def __init__(self, user, request): self.user = user self.request = request def has_role(self): return False def has_role_for(self, ob...
from collections import defaultdict from .utils import get_value_from_accessor class RoleBehaviour(object): ids = [] object_accessors = {} def __init__(self, user, request): self.user = user self.request = request def has_role(self): return False def has_role_for(self, ob...
Validate Model function to allow permission
Validate Model function to allow permission
Python
bsd-3-clause
Scholr/scholr-roles
from collections import defaultdict from .utils import get_value_from_accessor class RoleBehaviour(object): ids = [] object_accessors = {} def __init__(self, user, request): self.user = user self.request = request def has_role(self): return False def has_role_for(self, ob...
from collections import defaultdict from .utils import get_value_from_accessor class RoleBehaviour(object): ids = [] object_accessors = {} def __init__(self, user, request): self.user = user self.request = request def has_role(self): return False def has_role_for(self, ob...
<commit_before>from collections import defaultdict from .utils import get_value_from_accessor class RoleBehaviour(object): ids = [] object_accessors = {} def __init__(self, user, request): self.user = user self.request = request def has_role(self): return False def has_ro...
from collections import defaultdict from .utils import get_value_from_accessor class RoleBehaviour(object): ids = [] object_accessors = {} def __init__(self, user, request): self.user = user self.request = request def has_role(self): return False def has_role_for(self, ob...
from collections import defaultdict from .utils import get_value_from_accessor class RoleBehaviour(object): ids = [] object_accessors = {} def __init__(self, user, request): self.user = user self.request = request def has_role(self): return False def has_role_for(self, ob...
<commit_before>from collections import defaultdict from .utils import get_value_from_accessor class RoleBehaviour(object): ids = [] object_accessors = {} def __init__(self, user, request): self.user = user self.request = request def has_role(self): return False def has_ro...
bdd842f55f3a234fefee4cd2a701fa23e07c3789
scikits/umfpack/setup.py
scikits/umfpack/setup.py
#!/usr/bin/env python # 05.12.2005, c from __future__ import division, print_function, absolute_import def configuration(parent_package='',top_path=None): from numpy.distutils.misc_util import Configuration from numpy.distutils.system_info import get_info, dict_append config = Configuration('umfpack', par...
#!/usr/bin/env python # 05.12.2005, c from __future__ import division, print_function, absolute_import import sys def configuration(parent_package='',top_path=None): from numpy.distutils.misc_util import Configuration from numpy.distutils.system_info import get_info, dict_append config = Configuration('um...
Add handling for building scikit-umfpack on the Mac, which doesn't have the librt file added to the umfpack dependencies.
Add handling for building scikit-umfpack on the Mac, which doesn't have the librt file added to the umfpack dependencies.
Python
bsd-3-clause
scikit-umfpack/scikit-umfpack,scikit-umfpack/scikit-umfpack,rc/scikit-umfpack-rc,rc/scikit-umfpack,rc/scikit-umfpack,rc/scikit-umfpack-rc
#!/usr/bin/env python # 05.12.2005, c from __future__ import division, print_function, absolute_import def configuration(parent_package='',top_path=None): from numpy.distutils.misc_util import Configuration from numpy.distutils.system_info import get_info, dict_append config = Configuration('umfpack', par...
#!/usr/bin/env python # 05.12.2005, c from __future__ import division, print_function, absolute_import import sys def configuration(parent_package='',top_path=None): from numpy.distutils.misc_util import Configuration from numpy.distutils.system_info import get_info, dict_append config = Configuration('um...
<commit_before>#!/usr/bin/env python # 05.12.2005, c from __future__ import division, print_function, absolute_import def configuration(parent_package='',top_path=None): from numpy.distutils.misc_util import Configuration from numpy.distutils.system_info import get_info, dict_append config = Configuration...
#!/usr/bin/env python # 05.12.2005, c from __future__ import division, print_function, absolute_import import sys def configuration(parent_package='',top_path=None): from numpy.distutils.misc_util import Configuration from numpy.distutils.system_info import get_info, dict_append config = Configuration('um...
#!/usr/bin/env python # 05.12.2005, c from __future__ import division, print_function, absolute_import def configuration(parent_package='',top_path=None): from numpy.distutils.misc_util import Configuration from numpy.distutils.system_info import get_info, dict_append config = Configuration('umfpack', par...
<commit_before>#!/usr/bin/env python # 05.12.2005, c from __future__ import division, print_function, absolute_import def configuration(parent_package='',top_path=None): from numpy.distutils.misc_util import Configuration from numpy.distutils.system_info import get_info, dict_append config = Configuration...
6c4a2d6f80d7ee5f9c06c3d678bb86661c94a793
tools/np_suppressions.py
tools/np_suppressions.py
suppressions = [ [ ".*/multiarray/mapping\.", "PyArray_MapIterReset" ], # PyArray_Std trivially forwards to and appears to be superceded by # __New_PyArray_Std, which is exercised by the test framework. [ ".*/multiarray/calculation\.", "PyArray_Std" ], # PyCapsule_Check is declared in a header, an...
suppressions = [ # This one cannot be covered by any Python language test because there is # no code pathway to it. But it is part of the C API, so must not be # excised from the code. [ r".*/multiarray/mapping\.", "PyArray_MapIterReset" ], # PyArray_Std trivially forwards to and appears to be sup...
Add documentation on one assertion, convert RE's to raw strings.
Add documentation on one assertion, convert RE's to raw strings.
Python
bsd-3-clause
numpy/numpy-refactor,numpy/numpy-refactor,numpy/numpy-refactor,numpy/numpy-refactor,numpy/numpy-refactor
suppressions = [ [ ".*/multiarray/mapping\.", "PyArray_MapIterReset" ], # PyArray_Std trivially forwards to and appears to be superceded by # __New_PyArray_Std, which is exercised by the test framework. [ ".*/multiarray/calculation\.", "PyArray_Std" ], # PyCapsule_Check is declared in a header, an...
suppressions = [ # This one cannot be covered by any Python language test because there is # no code pathway to it. But it is part of the C API, so must not be # excised from the code. [ r".*/multiarray/mapping\.", "PyArray_MapIterReset" ], # PyArray_Std trivially forwards to and appears to be sup...
<commit_before>suppressions = [ [ ".*/multiarray/mapping\.", "PyArray_MapIterReset" ], # PyArray_Std trivially forwards to and appears to be superceded by # __New_PyArray_Std, which is exercised by the test framework. [ ".*/multiarray/calculation\.", "PyArray_Std" ], # PyCapsule_Check is declared ...
suppressions = [ # This one cannot be covered by any Python language test because there is # no code pathway to it. But it is part of the C API, so must not be # excised from the code. [ r".*/multiarray/mapping\.", "PyArray_MapIterReset" ], # PyArray_Std trivially forwards to and appears to be sup...
suppressions = [ [ ".*/multiarray/mapping\.", "PyArray_MapIterReset" ], # PyArray_Std trivially forwards to and appears to be superceded by # __New_PyArray_Std, which is exercised by the test framework. [ ".*/multiarray/calculation\.", "PyArray_Std" ], # PyCapsule_Check is declared in a header, an...
<commit_before>suppressions = [ [ ".*/multiarray/mapping\.", "PyArray_MapIterReset" ], # PyArray_Std trivially forwards to and appears to be superceded by # __New_PyArray_Std, which is exercised by the test framework. [ ".*/multiarray/calculation\.", "PyArray_Std" ], # PyCapsule_Check is declared ...
dcba8b90b84506a7325f8e576d10ccb8d2e9a415
setuptools/py24compat.py
setuptools/py24compat.py
""" Forward-compatibility support for Python 2.4 and earlier """ # from jaraco.compat 1.2 try: from functools import wraps except ImportError: def wraps(func): "Just return the function unwrapped" return lambda x: x
""" Forward-compatibility support for Python 2.4 and earlier """ # from jaraco.compat 1.2 try: from functools import wraps except ImportError: def wraps(func): "Just return the function unwrapped" return lambda x: x try: import hashlib except ImportError: from setuptools._backport imp...
Add a shim for python 2.4 compatability with hashlib
Add a shim for python 2.4 compatability with hashlib --HG-- extra : rebase_source : 5f573e600aadbe9c95561ee28c05cee02c7db559
Python
mit
pypa/setuptools,pypa/setuptools,pypa/setuptools
""" Forward-compatibility support for Python 2.4 and earlier """ # from jaraco.compat 1.2 try: from functools import wraps except ImportError: def wraps(func): "Just return the function unwrapped" return lambda x: x Add a shim for python 2.4 compatability with hashlib --HG-- extra : rebase_sou...
""" Forward-compatibility support for Python 2.4 and earlier """ # from jaraco.compat 1.2 try: from functools import wraps except ImportError: def wraps(func): "Just return the function unwrapped" return lambda x: x try: import hashlib except ImportError: from setuptools._backport imp...
<commit_before>""" Forward-compatibility support for Python 2.4 and earlier """ # from jaraco.compat 1.2 try: from functools import wraps except ImportError: def wraps(func): "Just return the function unwrapped" return lambda x: x <commit_msg>Add a shim for python 2.4 compatability with hashlib...
""" Forward-compatibility support for Python 2.4 and earlier """ # from jaraco.compat 1.2 try: from functools import wraps except ImportError: def wraps(func): "Just return the function unwrapped" return lambda x: x try: import hashlib except ImportError: from setuptools._backport imp...
""" Forward-compatibility support for Python 2.4 and earlier """ # from jaraco.compat 1.2 try: from functools import wraps except ImportError: def wraps(func): "Just return the function unwrapped" return lambda x: x Add a shim for python 2.4 compatability with hashlib --HG-- extra : rebase_sou...
<commit_before>""" Forward-compatibility support for Python 2.4 and earlier """ # from jaraco.compat 1.2 try: from functools import wraps except ImportError: def wraps(func): "Just return the function unwrapped" return lambda x: x <commit_msg>Add a shim for python 2.4 compatability with hashlib...
03977d24d5862373a881b7098bc78adc30fe8256
make_src_bem.py
make_src_bem.py
from __future__ import print_function import mne from my_settings import * subject = sys.argv[1] # make source space src = mne.setup_source_space(subject, spacing='oct6', subjects_dir=subjects_dir, add_dist=False, overwrite=True) # save source space mne.writ...
from __future__ import print_function import mne import subprocess from my_settings import * subject = sys.argv[1] cmd = "/usr/local/common/meeg-cfin/configurations/bin/submit_to_isis" # make source space src = mne.setup_source_space(subject, spacing='oct6', subjects_dir=subjects_dir, ...
Change to make BEM solution from mne-C
Change to make BEM solution from mne-C
Python
bsd-3-clause
MadsJensen/RP_scripts,MadsJensen/RP_scripts,MadsJensen/RP_scripts
from __future__ import print_function import mne from my_settings import * subject = sys.argv[1] # make source space src = mne.setup_source_space(subject, spacing='oct6', subjects_dir=subjects_dir, add_dist=False, overwrite=True) # save source space mne.writ...
from __future__ import print_function import mne import subprocess from my_settings import * subject = sys.argv[1] cmd = "/usr/local/common/meeg-cfin/configurations/bin/submit_to_isis" # make source space src = mne.setup_source_space(subject, spacing='oct6', subjects_dir=subjects_dir, ...
<commit_before>from __future__ import print_function import mne from my_settings import * subject = sys.argv[1] # make source space src = mne.setup_source_space(subject, spacing='oct6', subjects_dir=subjects_dir, add_dist=False, overwrite=True) # save source...
from __future__ import print_function import mne import subprocess from my_settings import * subject = sys.argv[1] cmd = "/usr/local/common/meeg-cfin/configurations/bin/submit_to_isis" # make source space src = mne.setup_source_space(subject, spacing='oct6', subjects_dir=subjects_dir, ...
from __future__ import print_function import mne from my_settings import * subject = sys.argv[1] # make source space src = mne.setup_source_space(subject, spacing='oct6', subjects_dir=subjects_dir, add_dist=False, overwrite=True) # save source space mne.writ...
<commit_before>from __future__ import print_function import mne from my_settings import * subject = sys.argv[1] # make source space src = mne.setup_source_space(subject, spacing='oct6', subjects_dir=subjects_dir, add_dist=False, overwrite=True) # save source...
27c614b30eda339ca0c61f35e498be6456f2280f
scoring/__init__.py
scoring/__init__.py
import numpy as np from sklearn.cross_validation import cross_val_score from sklearn.externals import joblib as pickle class scorer(object): def __init__(self, model, descriptor_generator, model_opts = {}, desc_opts = {}): self.model = model() self.descriptor_generator = descriptor_generator(**desc...
import numpy as np from sklearn.cross_validation import cross_val_score from sklearn.externals import joblib as pickle class scorer(object): def __init__(self, model_instance, descriptor_generator_instance): self.model = model_instance self.descriptor_generator = descriptor_generator_instance ...
Make scorer accept instances of model and desc. gen.
Make scorer accept instances of model and desc. gen.
Python
bsd-3-clause
mwojcikowski/opendrugdiscovery
import numpy as np from sklearn.cross_validation import cross_val_score from sklearn.externals import joblib as pickle class scorer(object): def __init__(self, model, descriptor_generator, model_opts = {}, desc_opts = {}): self.model = model() self.descriptor_generator = descriptor_generator(**desc...
import numpy as np from sklearn.cross_validation import cross_val_score from sklearn.externals import joblib as pickle class scorer(object): def __init__(self, model_instance, descriptor_generator_instance): self.model = model_instance self.descriptor_generator = descriptor_generator_instance ...
<commit_before>import numpy as np from sklearn.cross_validation import cross_val_score from sklearn.externals import joblib as pickle class scorer(object): def __init__(self, model, descriptor_generator, model_opts = {}, desc_opts = {}): self.model = model() self.descriptor_generator = descriptor_g...
import numpy as np from sklearn.cross_validation import cross_val_score from sklearn.externals import joblib as pickle class scorer(object): def __init__(self, model_instance, descriptor_generator_instance): self.model = model_instance self.descriptor_generator = descriptor_generator_instance ...
import numpy as np from sklearn.cross_validation import cross_val_score from sklearn.externals import joblib as pickle class scorer(object): def __init__(self, model, descriptor_generator, model_opts = {}, desc_opts = {}): self.model = model() self.descriptor_generator = descriptor_generator(**desc...
<commit_before>import numpy as np from sklearn.cross_validation import cross_val_score from sklearn.externals import joblib as pickle class scorer(object): def __init__(self, model, descriptor_generator, model_opts = {}, desc_opts = {}): self.model = model() self.descriptor_generator = descriptor_g...
c9b6cec70b2162b98d836f8100bc039f19fe23cb
googleapiclient/__init__.py
googleapiclient/__init__.py
# Copyright 2014 Google Inc. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or ...
# Copyright 2014 Google Inc. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or ...
Bump version number to 1.4.1
Bump version number to 1.4.1
Python
apache-2.0
googleapis/google-api-python-client,googleapis/google-api-python-client
# Copyright 2014 Google Inc. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or ...
# Copyright 2014 Google Inc. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or ...
<commit_before># Copyright 2014 Google Inc. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by app...
# Copyright 2014 Google Inc. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or ...
# Copyright 2014 Google Inc. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or ...
<commit_before># Copyright 2014 Google Inc. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by app...
3963037eb008d077e439029a33b60516cde399c6
massa/config.py
massa/config.py
# -*- coding: utf-8 -*- import logging class Production(object): DEBUG = False TESTING = False SECRET_KEY = '##CHANGEME##' SQLALCHEMY_DATABASE_URI = 'postgresql://massa:secret@localhost/massa' SQLALCHEMY_ECHO = False class Development(Production): DEBUG = True LOGGER_LEVEL = logging.DEB...
# -*- coding: utf-8 -*- class Production(object): DEBUG = False TESTING = False SECRET_KEY = '##CHANGEME##' SQLALCHEMY_DATABASE_URI = 'postgresql://massa:secret@localhost/massa' SQLALCHEMY_ECHO = False class Development(Production): DEBUG = True LOGGER_LEVEL = 10
Define logging level with a numeric value.
Define logging level with a numeric value.
Python
mit
jaapverloop/massa
# -*- coding: utf-8 -*- import logging class Production(object): DEBUG = False TESTING = False SECRET_KEY = '##CHANGEME##' SQLALCHEMY_DATABASE_URI = 'postgresql://massa:secret@localhost/massa' SQLALCHEMY_ECHO = False class Development(Production): DEBUG = True LOGGER_LEVEL = logging.DEB...
# -*- coding: utf-8 -*- class Production(object): DEBUG = False TESTING = False SECRET_KEY = '##CHANGEME##' SQLALCHEMY_DATABASE_URI = 'postgresql://massa:secret@localhost/massa' SQLALCHEMY_ECHO = False class Development(Production): DEBUG = True LOGGER_LEVEL = 10
<commit_before># -*- coding: utf-8 -*- import logging class Production(object): DEBUG = False TESTING = False SECRET_KEY = '##CHANGEME##' SQLALCHEMY_DATABASE_URI = 'postgresql://massa:secret@localhost/massa' SQLALCHEMY_ECHO = False class Development(Production): DEBUG = True LOGGER_LEVE...
# -*- coding: utf-8 -*- class Production(object): DEBUG = False TESTING = False SECRET_KEY = '##CHANGEME##' SQLALCHEMY_DATABASE_URI = 'postgresql://massa:secret@localhost/massa' SQLALCHEMY_ECHO = False class Development(Production): DEBUG = True LOGGER_LEVEL = 10
# -*- coding: utf-8 -*- import logging class Production(object): DEBUG = False TESTING = False SECRET_KEY = '##CHANGEME##' SQLALCHEMY_DATABASE_URI = 'postgresql://massa:secret@localhost/massa' SQLALCHEMY_ECHO = False class Development(Production): DEBUG = True LOGGER_LEVEL = logging.DEB...
<commit_before># -*- coding: utf-8 -*- import logging class Production(object): DEBUG = False TESTING = False SECRET_KEY = '##CHANGEME##' SQLALCHEMY_DATABASE_URI = 'postgresql://massa:secret@localhost/massa' SQLALCHEMY_ECHO = False class Development(Production): DEBUG = True LOGGER_LEVE...
b5477239d7b1ee9e73265b023355e8e83826ec49
scrapy_rss/items.py
scrapy_rss/items.py
# -*- coding: utf-8 -*- import scrapy from scrapy.item import BaseItem from scrapy_rss.elements import * from scrapy_rss import meta import six @six.add_metaclass(meta.ItemMeta) class RssItem: title = TitleElement() link = LinkElement() description = DescriptionElement() author = AuthorElement() ...
# -*- coding: utf-8 -*- import scrapy from scrapy.item import BaseItem from scrapy_rss.elements import * from scrapy_rss import meta import six @six.add_metaclass(meta.ItemMeta) class RssItem(BaseItem): title = TitleElement() link = LinkElement() description = DescriptionElement() author = AuthorElem...
Fix RssItem when each scraped item is instance of RssItem
Fix RssItem when each scraped item is instance of RssItem
Python
bsd-3-clause
woxcab/scrapy_rss
# -*- coding: utf-8 -*- import scrapy from scrapy.item import BaseItem from scrapy_rss.elements import * from scrapy_rss import meta import six @six.add_metaclass(meta.ItemMeta) class RssItem: title = TitleElement() link = LinkElement() description = DescriptionElement() author = AuthorElement() ...
# -*- coding: utf-8 -*- import scrapy from scrapy.item import BaseItem from scrapy_rss.elements import * from scrapy_rss import meta import six @six.add_metaclass(meta.ItemMeta) class RssItem(BaseItem): title = TitleElement() link = LinkElement() description = DescriptionElement() author = AuthorElem...
<commit_before># -*- coding: utf-8 -*- import scrapy from scrapy.item import BaseItem from scrapy_rss.elements import * from scrapy_rss import meta import six @six.add_metaclass(meta.ItemMeta) class RssItem: title = TitleElement() link = LinkElement() description = DescriptionElement() author = Autho...
# -*- coding: utf-8 -*- import scrapy from scrapy.item import BaseItem from scrapy_rss.elements import * from scrapy_rss import meta import six @six.add_metaclass(meta.ItemMeta) class RssItem(BaseItem): title = TitleElement() link = LinkElement() description = DescriptionElement() author = AuthorElem...
# -*- coding: utf-8 -*- import scrapy from scrapy.item import BaseItem from scrapy_rss.elements import * from scrapy_rss import meta import six @six.add_metaclass(meta.ItemMeta) class RssItem: title = TitleElement() link = LinkElement() description = DescriptionElement() author = AuthorElement() ...
<commit_before># -*- coding: utf-8 -*- import scrapy from scrapy.item import BaseItem from scrapy_rss.elements import * from scrapy_rss import meta import six @six.add_metaclass(meta.ItemMeta) class RssItem: title = TitleElement() link = LinkElement() description = DescriptionElement() author = Autho...
c3937702d8d9fa4ef7661a555876ad69654f88fd
scenarios/passtr/bob_cfg.py
scenarios/passtr/bob_cfg.py
from lib.test_config import AUTH_CREDS as AUTH_CREDS_orig class AUTH_CREDS(AUTH_CREDS_orig): enalgs = ('SHA-256-sess', 'SHA-256', 'MD5-sess', 'MD5', None) realm = 'VoIPTests.NET' def __init__(self): AUTH_CREDS_orig.__init__(self, 'mightyuser', 's3cr3tpAssw0Rd')
Enable all auth algorithms that might be emitted by the alice.
Enable all auth algorithms that might be emitted by the alice.
Python
bsd-2-clause
sippy/voiptests,sippy/voiptests
Enable all auth algorithms that might be emitted by the alice.
from lib.test_config import AUTH_CREDS as AUTH_CREDS_orig class AUTH_CREDS(AUTH_CREDS_orig): enalgs = ('SHA-256-sess', 'SHA-256', 'MD5-sess', 'MD5', None) realm = 'VoIPTests.NET' def __init__(self): AUTH_CREDS_orig.__init__(self, 'mightyuser', 's3cr3tpAssw0Rd')
<commit_before><commit_msg>Enable all auth algorithms that might be emitted by the alice.<commit_after>
from lib.test_config import AUTH_CREDS as AUTH_CREDS_orig class AUTH_CREDS(AUTH_CREDS_orig): enalgs = ('SHA-256-sess', 'SHA-256', 'MD5-sess', 'MD5', None) realm = 'VoIPTests.NET' def __init__(self): AUTH_CREDS_orig.__init__(self, 'mightyuser', 's3cr3tpAssw0Rd')
Enable all auth algorithms that might be emitted by the alice.from lib.test_config import AUTH_CREDS as AUTH_CREDS_orig class AUTH_CREDS(AUTH_CREDS_orig): enalgs = ('SHA-256-sess', 'SHA-256', 'MD5-sess', 'MD5', None) realm = 'VoIPTests.NET' def __init__(self): AUTH_CREDS_orig.__init__(self, 'might...
<commit_before><commit_msg>Enable all auth algorithms that might be emitted by the alice.<commit_after>from lib.test_config import AUTH_CREDS as AUTH_CREDS_orig class AUTH_CREDS(AUTH_CREDS_orig): enalgs = ('SHA-256-sess', 'SHA-256', 'MD5-sess', 'MD5', None) realm = 'VoIPTests.NET' def __init__(self): ...
ee69971832120f4492e8f41abfbcb9c87e398d6a
DeepFried2/utils.py
DeepFried2/utils.py
import theano as _th import numpy as _np def create_param(shape, init, fan=None, name=None, type=_th.config.floatX): return _th.shared(init(shape, fan).astype(type), name=name) def create_param_and_grad(shape, init, fan=None, name=None, type=_th.config.floatX): val = init(shape, fan).astype(type) param ...
import theano as _th import numpy as _np def create_param(shape, init, fan=None, name=None, type=_th.config.floatX): return _th.shared(init(shape, fan).astype(type), name=name) def create_param_and_grad(shape, init, fan=None, name=None, type=_th.config.floatX): val = init(shape, fan).astype(type) param ...
Add utility to save/load parameters, i.e. models.
Add utility to save/load parameters, i.e. models. Also adds a utility to compute the number of parameters, because that's always interesting and often reported in papers.
Python
mit
yobibyte/DeepFried2,lucasb-eyer/DeepFried2,elPistolero/DeepFried2,Pandoro/DeepFried2
import theano as _th import numpy as _np def create_param(shape, init, fan=None, name=None, type=_th.config.floatX): return _th.shared(init(shape, fan).astype(type), name=name) def create_param_and_grad(shape, init, fan=None, name=None, type=_th.config.floatX): val = init(shape, fan).astype(type) param ...
import theano as _th import numpy as _np def create_param(shape, init, fan=None, name=None, type=_th.config.floatX): return _th.shared(init(shape, fan).astype(type), name=name) def create_param_and_grad(shape, init, fan=None, name=None, type=_th.config.floatX): val = init(shape, fan).astype(type) param ...
<commit_before>import theano as _th import numpy as _np def create_param(shape, init, fan=None, name=None, type=_th.config.floatX): return _th.shared(init(shape, fan).astype(type), name=name) def create_param_and_grad(shape, init, fan=None, name=None, type=_th.config.floatX): val = init(shape, fan).astype(t...
import theano as _th import numpy as _np def create_param(shape, init, fan=None, name=None, type=_th.config.floatX): return _th.shared(init(shape, fan).astype(type), name=name) def create_param_and_grad(shape, init, fan=None, name=None, type=_th.config.floatX): val = init(shape, fan).astype(type) param ...
import theano as _th import numpy as _np def create_param(shape, init, fan=None, name=None, type=_th.config.floatX): return _th.shared(init(shape, fan).astype(type), name=name) def create_param_and_grad(shape, init, fan=None, name=None, type=_th.config.floatX): val = init(shape, fan).astype(type) param ...
<commit_before>import theano as _th import numpy as _np def create_param(shape, init, fan=None, name=None, type=_th.config.floatX): return _th.shared(init(shape, fan).astype(type), name=name) def create_param_and_grad(shape, init, fan=None, name=None, type=_th.config.floatX): val = init(shape, fan).astype(t...
29e4dc4b11f691a8aaf4b987e6a9e74214f19365
journal.py
journal.py
# -*- coding: utf-8 -*- from flask import Flask import os import psycopg2 from contextlib import closing DB_SCHEMA = """ DROP TABLE IF EXISTS entries; CREATE TABLE entries ( id serial PRIMARY KEY, title VARCHAR (127) NOT NULL, text TEXT NOT NULL, created TIMESTAMP NOT NULL ) """ app = Flask(__name__) ...
# -*- coding: utf-8 -*- from flask import Flask from flask import g import os import psycopg2 from contextlib import closing DB_SCHEMA = """ DROP TABLE IF EXISTS entries; CREATE TABLE entries ( id serial PRIMARY KEY, title VARCHAR (127) NOT NULL, text TEXT NOT NULL, created TIMESTAMP NOT NULL ) """ ap...
Add flask.g and connection/teardown operators.
Add flask.g and connection/teardown operators.
Python
mit
lfritts/learning_journal,lfritts/learning_journal
# -*- coding: utf-8 -*- from flask import Flask import os import psycopg2 from contextlib import closing DB_SCHEMA = """ DROP TABLE IF EXISTS entries; CREATE TABLE entries ( id serial PRIMARY KEY, title VARCHAR (127) NOT NULL, text TEXT NOT NULL, created TIMESTAMP NOT NULL ) """ app = Flask(__name__) ...
# -*- coding: utf-8 -*- from flask import Flask from flask import g import os import psycopg2 from contextlib import closing DB_SCHEMA = """ DROP TABLE IF EXISTS entries; CREATE TABLE entries ( id serial PRIMARY KEY, title VARCHAR (127) NOT NULL, text TEXT NOT NULL, created TIMESTAMP NOT NULL ) """ ap...
<commit_before># -*- coding: utf-8 -*- from flask import Flask import os import psycopg2 from contextlib import closing DB_SCHEMA = """ DROP TABLE IF EXISTS entries; CREATE TABLE entries ( id serial PRIMARY KEY, title VARCHAR (127) NOT NULL, text TEXT NOT NULL, created TIMESTAMP NOT NULL ) """ app = F...
# -*- coding: utf-8 -*- from flask import Flask from flask import g import os import psycopg2 from contextlib import closing DB_SCHEMA = """ DROP TABLE IF EXISTS entries; CREATE TABLE entries ( id serial PRIMARY KEY, title VARCHAR (127) NOT NULL, text TEXT NOT NULL, created TIMESTAMP NOT NULL ) """ ap...
# -*- coding: utf-8 -*- from flask import Flask import os import psycopg2 from contextlib import closing DB_SCHEMA = """ DROP TABLE IF EXISTS entries; CREATE TABLE entries ( id serial PRIMARY KEY, title VARCHAR (127) NOT NULL, text TEXT NOT NULL, created TIMESTAMP NOT NULL ) """ app = Flask(__name__) ...
<commit_before># -*- coding: utf-8 -*- from flask import Flask import os import psycopg2 from contextlib import closing DB_SCHEMA = """ DROP TABLE IF EXISTS entries; CREATE TABLE entries ( id serial PRIMARY KEY, title VARCHAR (127) NOT NULL, text TEXT NOT NULL, created TIMESTAMP NOT NULL ) """ app = F...
9e7e61256eb2ca2b4f4f19ce5b926709a593a28b
vispy/app/tests/test_interactive.py
vispy/app/tests/test_interactive.py
from nose.tools import assert_equal, assert_true, assert_false, assert_raises from vispy.testing import assert_in, run_tests_if_main from vispy.app import set_interactive from vispy.ext.ipy_inputhook import inputhook_manager # Expect the inputhook_manager to set boolean `_in_event_loop` # on instances of this class ...
from nose.tools import assert_equal, assert_true, assert_false from vispy.testing import assert_in, run_tests_if_main from vispy.app import set_interactive from vispy.ext.ipy_inputhook import inputhook_manager # Expect the inputhook_manager to set boolean `_in_event_loop` # on instances of this class when enabled. c...
Fix for flake8 checks on new test file.
Fix for flake8 checks on new test file.
Python
bsd-3-clause
jay3sh/vispy,ghisvail/vispy,hronoses/vispy,kkuunnddaannkk/vispy,michaelaye/vispy,dchilds7/Deysha-Star-Formation,sh4wn/vispy,QuLogic/vispy,srinathv/vispy,sh4wn/vispy,QuLogic/vispy,julienr/vispy,kkuunnddaannkk/vispy,drufat/vispy,Eric89GXL/vispy,jay3sh/vispy,jdreaver/vispy,RebeccaWPerry/vispy,RebeccaWPerry/vispy,jay3sh/vi...
from nose.tools import assert_equal, assert_true, assert_false, assert_raises from vispy.testing import assert_in, run_tests_if_main from vispy.app import set_interactive from vispy.ext.ipy_inputhook import inputhook_manager # Expect the inputhook_manager to set boolean `_in_event_loop` # on instances of this class ...
from nose.tools import assert_equal, assert_true, assert_false from vispy.testing import assert_in, run_tests_if_main from vispy.app import set_interactive from vispy.ext.ipy_inputhook import inputhook_manager # Expect the inputhook_manager to set boolean `_in_event_loop` # on instances of this class when enabled. c...
<commit_before>from nose.tools import assert_equal, assert_true, assert_false, assert_raises from vispy.testing import assert_in, run_tests_if_main from vispy.app import set_interactive from vispy.ext.ipy_inputhook import inputhook_manager # Expect the inputhook_manager to set boolean `_in_event_loop` # on instances...
from nose.tools import assert_equal, assert_true, assert_false from vispy.testing import assert_in, run_tests_if_main from vispy.app import set_interactive from vispy.ext.ipy_inputhook import inputhook_manager # Expect the inputhook_manager to set boolean `_in_event_loop` # on instances of this class when enabled. c...
from nose.tools import assert_equal, assert_true, assert_false, assert_raises from vispy.testing import assert_in, run_tests_if_main from vispy.app import set_interactive from vispy.ext.ipy_inputhook import inputhook_manager # Expect the inputhook_manager to set boolean `_in_event_loop` # on instances of this class ...
<commit_before>from nose.tools import assert_equal, assert_true, assert_false, assert_raises from vispy.testing import assert_in, run_tests_if_main from vispy.app import set_interactive from vispy.ext.ipy_inputhook import inputhook_manager # Expect the inputhook_manager to set boolean `_in_event_loop` # on instances...
efc0f438e894fa21ce32665ec26c19751ec2ce10
ureport_project/wsgi_app.py
ureport_project/wsgi_app.py
# wsgi_app.py import sys, os filedir = os.path.dirname(__file__) sys.path.append(os.path.join(filedir)) #print sys.path os.environ["CELERY_LOADER"] = "django" os.environ['DJANGO_SETTINGS_MODULE'] = 'settings' import sys print sys.path from django.core.handlers.wsgi import WSGIHandler application = WSGIHandler()
# wsgi_app.py import sys, os filedir = os.path.dirname(__file__) sys.path.append(os.path.join(filedir)) #print sys.path os.environ["CELERY_LOADER"] = "django" os.environ['DJANGO_SETTINGS_MODULE'] = 'settings' import sys print sys.path from django.core.handlers.wsgi import WSGIHandler from linesman.middleware import...
Apply linesman profiler to the wsgi app
Apply linesman profiler to the wsgi app I fully expect this commit to be backed out when we get the profiling stuff sorted out, but thankfully, this profiler can be disabled for a live site. check out http://<site>/__profiler__ after installing linesman, and running the uwsgi server
Python
bsd-3-clause
unicefuganda/ureport,unicefuganda/ureport,unicefuganda/ureport,mbanje/ureport_uganda,mbanje/ureport_uganda
# wsgi_app.py import sys, os filedir = os.path.dirname(__file__) sys.path.append(os.path.join(filedir)) #print sys.path os.environ["CELERY_LOADER"] = "django" os.environ['DJANGO_SETTINGS_MODULE'] = 'settings' import sys print sys.path from django.core.handlers.wsgi import WSGIHandler application = WSGIHandler() Ap...
# wsgi_app.py import sys, os filedir = os.path.dirname(__file__) sys.path.append(os.path.join(filedir)) #print sys.path os.environ["CELERY_LOADER"] = "django" os.environ['DJANGO_SETTINGS_MODULE'] = 'settings' import sys print sys.path from django.core.handlers.wsgi import WSGIHandler from linesman.middleware import...
<commit_before># wsgi_app.py import sys, os filedir = os.path.dirname(__file__) sys.path.append(os.path.join(filedir)) #print sys.path os.environ["CELERY_LOADER"] = "django" os.environ['DJANGO_SETTINGS_MODULE'] = 'settings' import sys print sys.path from django.core.handlers.wsgi import WSGIHandler application = W...
# wsgi_app.py import sys, os filedir = os.path.dirname(__file__) sys.path.append(os.path.join(filedir)) #print sys.path os.environ["CELERY_LOADER"] = "django" os.environ['DJANGO_SETTINGS_MODULE'] = 'settings' import sys print sys.path from django.core.handlers.wsgi import WSGIHandler from linesman.middleware import...
# wsgi_app.py import sys, os filedir = os.path.dirname(__file__) sys.path.append(os.path.join(filedir)) #print sys.path os.environ["CELERY_LOADER"] = "django" os.environ['DJANGO_SETTINGS_MODULE'] = 'settings' import sys print sys.path from django.core.handlers.wsgi import WSGIHandler application = WSGIHandler() Ap...
<commit_before># wsgi_app.py import sys, os filedir = os.path.dirname(__file__) sys.path.append(os.path.join(filedir)) #print sys.path os.environ["CELERY_LOADER"] = "django" os.environ['DJANGO_SETTINGS_MODULE'] = 'settings' import sys print sys.path from django.core.handlers.wsgi import WSGIHandler application = W...
5ba9888d267d663fb0ab0dfbfd9346dc20f4c0c1
test/test_turtle_serialize.py
test/test_turtle_serialize.py
import rdflib from rdflib.py3compat import b def testTurtleFinalDot(): """ https://github.com/RDFLib/rdflib/issues/282 """ g = rdflib.Graph() u = rdflib.URIRef("http://ex.org/bob.") g.bind("ns", "http://ex.org/") g.add( (u, u, u) ) s=g.serialize(format='turtle') assert b("ns:bob."...
from rdflib import Graph, URIRef, BNode, RDF, Literal from rdflib.collection import Collection from rdflib.py3compat import b def testTurtleFinalDot(): """ https://github.com/RDFLib/rdflib/issues/282 """ g = Graph() u = URIRef("http://ex.org/bob.") g.bind("ns", "http://ex.org/") g.add( (...
Test boolean list serialization in Turtle
Test boolean list serialization in Turtle
Python
bsd-3-clause
RDFLib/rdflib,ssssam/rdflib,armandobs14/rdflib,yingerj/rdflib,RDFLib/rdflib,ssssam/rdflib,ssssam/rdflib,avorio/rdflib,marma/rdflib,marma/rdflib,RDFLib/rdflib,ssssam/rdflib,dbs/rdflib,armandobs14/rdflib,dbs/rdflib,dbs/rdflib,marma/rdflib,avorio/rdflib,marma/rdflib,yingerj/rdflib,RDFLib/rdflib,yingerj/rdflib,dbs/rdflib,a...
import rdflib from rdflib.py3compat import b def testTurtleFinalDot(): """ https://github.com/RDFLib/rdflib/issues/282 """ g = rdflib.Graph() u = rdflib.URIRef("http://ex.org/bob.") g.bind("ns", "http://ex.org/") g.add( (u, u, u) ) s=g.serialize(format='turtle') assert b("ns:bob."...
from rdflib import Graph, URIRef, BNode, RDF, Literal from rdflib.collection import Collection from rdflib.py3compat import b def testTurtleFinalDot(): """ https://github.com/RDFLib/rdflib/issues/282 """ g = Graph() u = URIRef("http://ex.org/bob.") g.bind("ns", "http://ex.org/") g.add( (...
<commit_before>import rdflib from rdflib.py3compat import b def testTurtleFinalDot(): """ https://github.com/RDFLib/rdflib/issues/282 """ g = rdflib.Graph() u = rdflib.URIRef("http://ex.org/bob.") g.bind("ns", "http://ex.org/") g.add( (u, u, u) ) s=g.serialize(format='turtle') ass...
from rdflib import Graph, URIRef, BNode, RDF, Literal from rdflib.collection import Collection from rdflib.py3compat import b def testTurtleFinalDot(): """ https://github.com/RDFLib/rdflib/issues/282 """ g = Graph() u = URIRef("http://ex.org/bob.") g.bind("ns", "http://ex.org/") g.add( (...
import rdflib from rdflib.py3compat import b def testTurtleFinalDot(): """ https://github.com/RDFLib/rdflib/issues/282 """ g = rdflib.Graph() u = rdflib.URIRef("http://ex.org/bob.") g.bind("ns", "http://ex.org/") g.add( (u, u, u) ) s=g.serialize(format='turtle') assert b("ns:bob."...
<commit_before>import rdflib from rdflib.py3compat import b def testTurtleFinalDot(): """ https://github.com/RDFLib/rdflib/issues/282 """ g = rdflib.Graph() u = rdflib.URIRef("http://ex.org/bob.") g.bind("ns", "http://ex.org/") g.add( (u, u, u) ) s=g.serialize(format='turtle') ass...
8126ca21bcf8da551906eff348c92cb71fe79e6e
readthedocs/doc_builder/base.py
readthedocs/doc_builder/base.py
import os def restoring_chdir(fn): def decorator(*args, **kw): try: path = os.getcwd() return fn(*args, **kw) finally: os.chdir(path) return decorator class BaseBuilder(object): """ The Base for all Builders. Defines the API for subclasses. """...
import os from functools import wraps def restoring_chdir(fn): @wraps(fn) def decorator(*args, **kw): try: path = os.getcwd() return fn(*args, **kw) finally: os.chdir(path) return decorator class BaseBuilder(object): """ The Base for all Builder...
Call wraps on the restoring_chdir decorator.
Call wraps on the restoring_chdir decorator.
Python
mit
alex/readthedocs.org,safwanrahman/readthedocs.org,royalwang/readthedocs.org,VishvajitP/readthedocs.org,safwanrahman/readthedocs.org,alex/readthedocs.org,tddv/readthedocs.org,dirn/readthedocs.org,takluyver/readthedocs.org,nikolas/readthedocs.org,LukasBoersma/readthedocs.org,mhils/readthedocs.org,royalwang/readthedocs.or...
import os def restoring_chdir(fn): def decorator(*args, **kw): try: path = os.getcwd() return fn(*args, **kw) finally: os.chdir(path) return decorator class BaseBuilder(object): """ The Base for all Builders. Defines the API for subclasses. """...
import os from functools import wraps def restoring_chdir(fn): @wraps(fn) def decorator(*args, **kw): try: path = os.getcwd() return fn(*args, **kw) finally: os.chdir(path) return decorator class BaseBuilder(object): """ The Base for all Builder...
<commit_before>import os def restoring_chdir(fn): def decorator(*args, **kw): try: path = os.getcwd() return fn(*args, **kw) finally: os.chdir(path) return decorator class BaseBuilder(object): """ The Base for all Builders. Defines the API for subc...
import os from functools import wraps def restoring_chdir(fn): @wraps(fn) def decorator(*args, **kw): try: path = os.getcwd() return fn(*args, **kw) finally: os.chdir(path) return decorator class BaseBuilder(object): """ The Base for all Builder...
import os def restoring_chdir(fn): def decorator(*args, **kw): try: path = os.getcwd() return fn(*args, **kw) finally: os.chdir(path) return decorator class BaseBuilder(object): """ The Base for all Builders. Defines the API for subclasses. """...
<commit_before>import os def restoring_chdir(fn): def decorator(*args, **kw): try: path = os.getcwd() return fn(*args, **kw) finally: os.chdir(path) return decorator class BaseBuilder(object): """ The Base for all Builders. Defines the API for subc...
e229d8f731b8b34294127702b1333eefec6f95bc
server/main.py
server/main.py
from flask import Flask import yaml app = Flask(__name__) @app.route("/") def hello(): return "Hello World!" if __name__ == '__main__': # read and return a yaml file (called 'config.yaml' by default) and give it # back as a dictionary with open( 'config.yaml' ) as f: config =...
from flask import Flask import yaml import sql import psycopg2 app = Flask(__name__) @app.route("/") def hello(): return "Hello World!" if __name__ == '__main__': # read and return a yaml file (called 'config.yaml' by default) and give it # back as a dictionary with open( 'config.ya...
Add SQL imports to python
Add SQL imports to python
Python
mit
aradler/Card-lockout,aradler/Card-lockout,aradler/Card-lockout
from flask import Flask import yaml app = Flask(__name__) @app.route("/") def hello(): return "Hello World!" if __name__ == '__main__': # read and return a yaml file (called 'config.yaml' by default) and give it # back as a dictionary with open( 'config.yaml' ) as f: config =...
from flask import Flask import yaml import sql import psycopg2 app = Flask(__name__) @app.route("/") def hello(): return "Hello World!" if __name__ == '__main__': # read and return a yaml file (called 'config.yaml' by default) and give it # back as a dictionary with open( 'config.ya...
<commit_before>from flask import Flask import yaml app = Flask(__name__) @app.route("/") def hello(): return "Hello World!" if __name__ == '__main__': # read and return a yaml file (called 'config.yaml' by default) and give it # back as a dictionary with open( 'config.yaml' ) as f: ...
from flask import Flask import yaml import sql import psycopg2 app = Flask(__name__) @app.route("/") def hello(): return "Hello World!" if __name__ == '__main__': # read and return a yaml file (called 'config.yaml' by default) and give it # back as a dictionary with open( 'config.ya...
from flask import Flask import yaml app = Flask(__name__) @app.route("/") def hello(): return "Hello World!" if __name__ == '__main__': # read and return a yaml file (called 'config.yaml' by default) and give it # back as a dictionary with open( 'config.yaml' ) as f: config =...
<commit_before>from flask import Flask import yaml app = Flask(__name__) @app.route("/") def hello(): return "Hello World!" if __name__ == '__main__': # read and return a yaml file (called 'config.yaml' by default) and give it # back as a dictionary with open( 'config.yaml' ) as f: ...
9428a6181cd33b5847dd1a348a651a4c794092ab
salt/modules/logmod.py
salt/modules/logmod.py
""" On-demand logging ================= .. versionadded:: 2017.7.0 The sole purpose of this module is logging messages in the (proxy) minion. It comes very handy when debugging complex Jinja templates, for example: .. code-block:: jinja {%- for var in range(10) %} {%- do salt.log.info(var) -%} {%- end...
""" On-demand logging ================= .. versionadded:: 2017.7.0 The sole purpose of this module is logging messages in the (proxy) minion. It comes very handy when debugging complex Jinja templates, for example: .. code-block:: jinja {%- for var in range(10) %} {%- do salt["log.info"](var) -%} {%- ...
Update jinja example to recommended syntax
Update jinja example to recommended syntax
Python
apache-2.0
saltstack/salt,saltstack/salt,saltstack/salt,saltstack/salt,saltstack/salt
""" On-demand logging ================= .. versionadded:: 2017.7.0 The sole purpose of this module is logging messages in the (proxy) minion. It comes very handy when debugging complex Jinja templates, for example: .. code-block:: jinja {%- for var in range(10) %} {%- do salt.log.info(var) -%} {%- end...
""" On-demand logging ================= .. versionadded:: 2017.7.0 The sole purpose of this module is logging messages in the (proxy) minion. It comes very handy when debugging complex Jinja templates, for example: .. code-block:: jinja {%- for var in range(10) %} {%- do salt["log.info"](var) -%} {%- ...
<commit_before>""" On-demand logging ================= .. versionadded:: 2017.7.0 The sole purpose of this module is logging messages in the (proxy) minion. It comes very handy when debugging complex Jinja templates, for example: .. code-block:: jinja {%- for var in range(10) %} {%- do salt.log.info(var) ...
""" On-demand logging ================= .. versionadded:: 2017.7.0 The sole purpose of this module is logging messages in the (proxy) minion. It comes very handy when debugging complex Jinja templates, for example: .. code-block:: jinja {%- for var in range(10) %} {%- do salt["log.info"](var) -%} {%- ...
""" On-demand logging ================= .. versionadded:: 2017.7.0 The sole purpose of this module is logging messages in the (proxy) minion. It comes very handy when debugging complex Jinja templates, for example: .. code-block:: jinja {%- for var in range(10) %} {%- do salt.log.info(var) -%} {%- end...
<commit_before>""" On-demand logging ================= .. versionadded:: 2017.7.0 The sole purpose of this module is logging messages in the (proxy) minion. It comes very handy when debugging complex Jinja templates, for example: .. code-block:: jinja {%- for var in range(10) %} {%- do salt.log.info(var) ...
76bf8966a25932822fca1c94586fccfa096ee02b
tests/misc/test_base_model.py
tests/misc/test_base_model.py
# -*- coding: UTF-8 -*- from tests.base import ApiDBTestCase class BaseModelTestCase(ApiDBTestCase): def test_repr(self): self.generate_fixture_project_status() self.generate_fixture_project() self.assertEqual(str(self.project), "<Project Cosmos Landromat>") self.project.name = u"...
# -*- coding: UTF-8 -*- from tests.base import ApiDBTestCase class BaseModelTestCase(ApiDBTestCase): def test_repr(self): self.generate_fixture_project_status() self.generate_fixture_project() self.assertEqual(str(self.project), "<Project %s>" % self.project.id) def test_query(self):...
Change base model string representation
Change base model string representation
Python
agpl-3.0
cgwire/zou
# -*- coding: UTF-8 -*- from tests.base import ApiDBTestCase class BaseModelTestCase(ApiDBTestCase): def test_repr(self): self.generate_fixture_project_status() self.generate_fixture_project() self.assertEqual(str(self.project), "<Project Cosmos Landromat>") self.project.name = u"...
# -*- coding: UTF-8 -*- from tests.base import ApiDBTestCase class BaseModelTestCase(ApiDBTestCase): def test_repr(self): self.generate_fixture_project_status() self.generate_fixture_project() self.assertEqual(str(self.project), "<Project %s>" % self.project.id) def test_query(self):...
<commit_before># -*- coding: UTF-8 -*- from tests.base import ApiDBTestCase class BaseModelTestCase(ApiDBTestCase): def test_repr(self): self.generate_fixture_project_status() self.generate_fixture_project() self.assertEqual(str(self.project), "<Project Cosmos Landromat>") self.pr...
# -*- coding: UTF-8 -*- from tests.base import ApiDBTestCase class BaseModelTestCase(ApiDBTestCase): def test_repr(self): self.generate_fixture_project_status() self.generate_fixture_project() self.assertEqual(str(self.project), "<Project %s>" % self.project.id) def test_query(self):...
# -*- coding: UTF-8 -*- from tests.base import ApiDBTestCase class BaseModelTestCase(ApiDBTestCase): def test_repr(self): self.generate_fixture_project_status() self.generate_fixture_project() self.assertEqual(str(self.project), "<Project Cosmos Landromat>") self.project.name = u"...
<commit_before># -*- coding: UTF-8 -*- from tests.base import ApiDBTestCase class BaseModelTestCase(ApiDBTestCase): def test_repr(self): self.generate_fixture_project_status() self.generate_fixture_project() self.assertEqual(str(self.project), "<Project Cosmos Landromat>") self.pr...
c908edadadb866292a612103d2854bef4673efab
shinken/__init__.py
shinken/__init__.py
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Copyright (C) 2009-2012: # Gabes Jean, [email protected] # Gerhard Lausser, [email protected] # Gregory Starck, [email protected] # Hartmut Goebel, [email protected] # # This file is part of Shinken. # # Shinken is free software: you can r...
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Copyright (C) 2009-2012: # Gabes Jean, [email protected] # Gerhard Lausser, [email protected] # Gregory Starck, [email protected] # Hartmut Goebel, [email protected] # # This file is part of Shinken. # # Shinken is free software: you can r...
Remove superfluous import of shinken.objects in shinken/_init__.py.
Remove superfluous import of shinken.objects in shinken/_init__.py. Every script or test-case importing shinken has all the objects loaded, even if they are not required by the script or test-case at all. Also see <http://sourceforge.net/mailarchive/message.php?msg_id=29553474>.
Python
agpl-3.0
naparuba/shinken,claneys/shinken,naparuba/shinken,tal-nino/shinken,mohierf/shinken,titilambert/alignak,lets-software/shinken,KerkhoffTechnologies/shinken,Simage/shinken,mohierf/shinken,gst/alignak,lets-software/shinken,Aimage/shinken,Aimage/shinken,geektophe/shinken,Aimage/shinken,staute/shinken_package,savoirfairelinu...
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Copyright (C) 2009-2012: # Gabes Jean, [email protected] # Gerhard Lausser, [email protected] # Gregory Starck, [email protected] # Hartmut Goebel, [email protected] # # This file is part of Shinken. # # Shinken is free software: you can r...
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Copyright (C) 2009-2012: # Gabes Jean, [email protected] # Gerhard Lausser, [email protected] # Gregory Starck, [email protected] # Hartmut Goebel, [email protected] # # This file is part of Shinken. # # Shinken is free software: you can r...
<commit_before>#!/usr/bin/env python # -*- coding: utf-8 -*- # # Copyright (C) 2009-2012: # Gabes Jean, [email protected] # Gerhard Lausser, [email protected] # Gregory Starck, [email protected] # Hartmut Goebel, [email protected] # # This file is part of Shinken. # # Shinken is free soft...
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Copyright (C) 2009-2012: # Gabes Jean, [email protected] # Gerhard Lausser, [email protected] # Gregory Starck, [email protected] # Hartmut Goebel, [email protected] # # This file is part of Shinken. # # Shinken is free software: you can r...
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Copyright (C) 2009-2012: # Gabes Jean, [email protected] # Gerhard Lausser, [email protected] # Gregory Starck, [email protected] # Hartmut Goebel, [email protected] # # This file is part of Shinken. # # Shinken is free software: you can r...
<commit_before>#!/usr/bin/env python # -*- coding: utf-8 -*- # # Copyright (C) 2009-2012: # Gabes Jean, [email protected] # Gerhard Lausser, [email protected] # Gregory Starck, [email protected] # Hartmut Goebel, [email protected] # # This file is part of Shinken. # # Shinken is free soft...
3153d1d25e8b6c25729880abca4da9a79f8036ff
editorsnotes/main/admin_views.py
editorsnotes/main/admin_views.py
from django.shortcuts import render_to_response, get_object_or_404 from django.http import HttpResponseRedirect from django.template import RequestContext from django.contrib.auth.models import User, Group from django.contrib import messages from models import Project from forms import ProjectUserFormSet def project_r...
from django.shortcuts import render_to_response, get_object_or_404 from django.http import HttpResponseRedirect from django.template import RequestContext from django.contrib.auth.models import User, Group from django.contrib import messages from models import Project from forms import ProjectUserFormSet def project_r...
Check if user can edit project roster
Check if user can edit project roster
Python
agpl-3.0
editorsnotes/editorsnotes,editorsnotes/editorsnotes
from django.shortcuts import render_to_response, get_object_or_404 from django.http import HttpResponseRedirect from django.template import RequestContext from django.contrib.auth.models import User, Group from django.contrib import messages from models import Project from forms import ProjectUserFormSet def project_r...
from django.shortcuts import render_to_response, get_object_or_404 from django.http import HttpResponseRedirect from django.template import RequestContext from django.contrib.auth.models import User, Group from django.contrib import messages from models import Project from forms import ProjectUserFormSet def project_r...
<commit_before>from django.shortcuts import render_to_response, get_object_or_404 from django.http import HttpResponseRedirect from django.template import RequestContext from django.contrib.auth.models import User, Group from django.contrib import messages from models import Project from forms import ProjectUserFormSet...
from django.shortcuts import render_to_response, get_object_or_404 from django.http import HttpResponseRedirect from django.template import RequestContext from django.contrib.auth.models import User, Group from django.contrib import messages from models import Project from forms import ProjectUserFormSet def project_r...
from django.shortcuts import render_to_response, get_object_or_404 from django.http import HttpResponseRedirect from django.template import RequestContext from django.contrib.auth.models import User, Group from django.contrib import messages from models import Project from forms import ProjectUserFormSet def project_r...
<commit_before>from django.shortcuts import render_to_response, get_object_or_404 from django.http import HttpResponseRedirect from django.template import RequestContext from django.contrib.auth.models import User, Group from django.contrib import messages from models import Project from forms import ProjectUserFormSet...
85f759a9446cf988cc859d3b74d11e6b224bbd16
request/managers.py
request/managers.py
from datetime import timedelta, datetime from django.db import models from django.contrib.auth.models import User class RequestManager(models.Manager): def active_users(self, **options): """ Returns a list of active users. Any arguments passed to this method will be given t...
from datetime import timedelta, datetime from django.db import models from django.contrib.auth.models import User class RequestManager(models.Manager): def active_users(self, **options): """ Returns a list of active users. Any arguments passed to this method will be given t...
Use a list comprehension and set() to make the active_users query simpler and faster.
Use a list comprehension and set() to make the active_users query simpler and faster.
Python
bsd-2-clause
kylef/django-request,gnublade/django-request,Derecho/django-request,kylef/django-request,gnublade/django-request,gnublade/django-request,kylef/django-request
from datetime import timedelta, datetime from django.db import models from django.contrib.auth.models import User class RequestManager(models.Manager): def active_users(self, **options): """ Returns a list of active users. Any arguments passed to this method will be given t...
from datetime import timedelta, datetime from django.db import models from django.contrib.auth.models import User class RequestManager(models.Manager): def active_users(self, **options): """ Returns a list of active users. Any arguments passed to this method will be given t...
<commit_before>from datetime import timedelta, datetime from django.db import models from django.contrib.auth.models import User class RequestManager(models.Manager): def active_users(self, **options): """ Returns a list of active users. Any arguments passed to this method will be ...
from datetime import timedelta, datetime from django.db import models from django.contrib.auth.models import User class RequestManager(models.Manager): def active_users(self, **options): """ Returns a list of active users. Any arguments passed to this method will be given t...
from datetime import timedelta, datetime from django.db import models from django.contrib.auth.models import User class RequestManager(models.Manager): def active_users(self, **options): """ Returns a list of active users. Any arguments passed to this method will be given t...
<commit_before>from datetime import timedelta, datetime from django.db import models from django.contrib.auth.models import User class RequestManager(models.Manager): def active_users(self, **options): """ Returns a list of active users. Any arguments passed to this method will be ...
cad9194d64786acadb49174f8797295f1bf0bcca
website/celery_worker.py
website/celery_worker.py
from app import celery from app import create_app app = create_app(config_override={'BDB_READONLY': True}) celery
from app import celery from app import create_app app = create_app(config_override={'HDB_READONLY': True}) celery
Update config variable name of HDB in celery worker
Update config variable name of HDB in celery worker
Python
lgpl-2.1
reimandlab/Visualisation-Framework-for-Genome-Mutations,reimandlab/Visualistion-Framework-for-Genome-Mutations,reimandlab/Visualisation-Framework-for-Genome-Mutations,reimandlab/Visualisation-Framework-for-Genome-Mutations,reimandlab/Visualisation-Framework-for-Genome-Mutations,reimandlab/Visualistion-Framework-for-Gen...
from app import celery from app import create_app app = create_app(config_override={'BDB_READONLY': True}) celery Update config variable name of HDB in celery worker
from app import celery from app import create_app app = create_app(config_override={'HDB_READONLY': True}) celery
<commit_before>from app import celery from app import create_app app = create_app(config_override={'BDB_READONLY': True}) celery <commit_msg>Update config variable name of HDB in celery worker<commit_after>
from app import celery from app import create_app app = create_app(config_override={'HDB_READONLY': True}) celery
from app import celery from app import create_app app = create_app(config_override={'BDB_READONLY': True}) celery Update config variable name of HDB in celery workerfrom app import celery from app import create_app app = create_app(config_override={'HDB_READONLY': True}) celery
<commit_before>from app import celery from app import create_app app = create_app(config_override={'BDB_READONLY': True}) celery <commit_msg>Update config variable name of HDB in celery worker<commit_after>from app import celery from app import create_app app = create_app(config_override={'HDB_READONLY': True}) celer...
11583cfca501164c5c08af70f66d430cd180dbc5
examples/basic_nest/make_nest.py
examples/basic_nest/make_nest.py
#!/usr/bin/env python import collections import os import os.path import sys from nestly import nestly wd = os.getcwd() input_dir = os.path.join(wd, 'inputs') ctl = collections.OrderedDict() ctl['strategy'] = nestly.repeat_iterable(('exhaustive', 'approximate')) ctl['run_count'] = nestly.repeat_iterable([10**(i + 1...
#!/usr/bin/env python import glob import os import os.path from nestly import Nest wd = os.getcwd() input_dir = os.path.join(wd, 'inputs') nest = Nest() nest.add_level('strategy', ('exhaustive', 'approximate')) nest.add_level('run_count', [10**i for i in xrange(3)]) nest.add_level('input_file', glob.glob(os.path.joi...
Update basic_nest for new API
Update basic_nest for new API
Python
mit
fhcrc/nestly
#!/usr/bin/env python import collections import os import os.path import sys from nestly import nestly wd = os.getcwd() input_dir = os.path.join(wd, 'inputs') ctl = collections.OrderedDict() ctl['strategy'] = nestly.repeat_iterable(('exhaustive', 'approximate')) ctl['run_count'] = nestly.repeat_iterable([10**(i + 1...
#!/usr/bin/env python import glob import os import os.path from nestly import Nest wd = os.getcwd() input_dir = os.path.join(wd, 'inputs') nest = Nest() nest.add_level('strategy', ('exhaustive', 'approximate')) nest.add_level('run_count', [10**i for i in xrange(3)]) nest.add_level('input_file', glob.glob(os.path.joi...
<commit_before>#!/usr/bin/env python import collections import os import os.path import sys from nestly import nestly wd = os.getcwd() input_dir = os.path.join(wd, 'inputs') ctl = collections.OrderedDict() ctl['strategy'] = nestly.repeat_iterable(('exhaustive', 'approximate')) ctl['run_count'] = nestly.repeat_itera...
#!/usr/bin/env python import glob import os import os.path from nestly import Nest wd = os.getcwd() input_dir = os.path.join(wd, 'inputs') nest = Nest() nest.add_level('strategy', ('exhaustive', 'approximate')) nest.add_level('run_count', [10**i for i in xrange(3)]) nest.add_level('input_file', glob.glob(os.path.joi...
#!/usr/bin/env python import collections import os import os.path import sys from nestly import nestly wd = os.getcwd() input_dir = os.path.join(wd, 'inputs') ctl = collections.OrderedDict() ctl['strategy'] = nestly.repeat_iterable(('exhaustive', 'approximate')) ctl['run_count'] = nestly.repeat_iterable([10**(i + 1...
<commit_before>#!/usr/bin/env python import collections import os import os.path import sys from nestly import nestly wd = os.getcwd() input_dir = os.path.join(wd, 'inputs') ctl = collections.OrderedDict() ctl['strategy'] = nestly.repeat_iterable(('exhaustive', 'approximate')) ctl['run_count'] = nestly.repeat_itera...
978b41a29eda295974ed5cf1a7cd5b79b148f479
coverage/execfile.py
coverage/execfile.py
"""Execute files of Python code.""" import imp, os, sys def run_python_file(filename, args): """Run a python source file as if it were the main program on the python command line. `filename` is the path to the file to execute, must be a .py file. `args` is the argument array to present as sys.arg...
"""Execute files of Python code.""" import imp, os, sys def run_python_file(filename, args): """Run a python source file as if it were the main program on the python command line. `filename` is the path to the file to execute, must be a .py file. `args` is the argument array to present as sys.arg...
Move the open outside the try, since the finally is only needed once the file is successfully opened.
Move the open outside the try, since the finally is only needed once the file is successfully opened.
Python
apache-2.0
7WebPages/coveragepy,blueyed/coveragepy,blueyed/coveragepy,jayhetee/coveragepy,blueyed/coveragepy,hugovk/coveragepy,larsbutler/coveragepy,jayhetee/coveragepy,jayhetee/coveragepy,larsbutler/coveragepy,nedbat/coveragepy,hugovk/coveragepy,larsbutler/coveragepy,nedbat/coveragepy,7WebPages/coveragepy,7WebPages/coveragepy,ne...
"""Execute files of Python code.""" import imp, os, sys def run_python_file(filename, args): """Run a python source file as if it were the main program on the python command line. `filename` is the path to the file to execute, must be a .py file. `args` is the argument array to present as sys.arg...
"""Execute files of Python code.""" import imp, os, sys def run_python_file(filename, args): """Run a python source file as if it were the main program on the python command line. `filename` is the path to the file to execute, must be a .py file. `args` is the argument array to present as sys.arg...
<commit_before>"""Execute files of Python code.""" import imp, os, sys def run_python_file(filename, args): """Run a python source file as if it were the main program on the python command line. `filename` is the path to the file to execute, must be a .py file. `args` is the argument array to pre...
"""Execute files of Python code.""" import imp, os, sys def run_python_file(filename, args): """Run a python source file as if it were the main program on the python command line. `filename` is the path to the file to execute, must be a .py file. `args` is the argument array to present as sys.arg...
"""Execute files of Python code.""" import imp, os, sys def run_python_file(filename, args): """Run a python source file as if it were the main program on the python command line. `filename` is the path to the file to execute, must be a .py file. `args` is the argument array to present as sys.arg...
<commit_before>"""Execute files of Python code.""" import imp, os, sys def run_python_file(filename, args): """Run a python source file as if it were the main program on the python command line. `filename` is the path to the file to execute, must be a .py file. `args` is the argument array to pre...
84d3738d2eb8a24dcb66cb329994f88bd55128c0
tests/test_utils.py
tests/test_utils.py
import pytest def test_scrub_doi(): from vdm.utils import scrub_doi d = 'http://dx.doi.org/10.1234' scrubbed = scrub_doi(d) assert(scrubbed == '10.1234') d = '10.123 4' assert( scrub_doi(d) == '10.1234' ) d = '<p>10.1234</p>' assert( scrub_doi(d) == '10.1234' ...
import pytest def test_scrub_doi(): from vdm.utils import scrub_doi d = 'http://dx.doi.org/10.1234' scrubbed = scrub_doi(d) assert(scrubbed == '10.1234') d = '10.123 4' assert( scrub_doi(d) == '10.1234' ) d = '<p>10.1234</p>' assert( scrub_doi(d) == '10.1234' ...
Add utils tests. Rework pull.
Add utils tests. Rework pull.
Python
mit
Brown-University-Library/vivo-data-management,Brown-University-Library/vivo-data-management
import pytest def test_scrub_doi(): from vdm.utils import scrub_doi d = 'http://dx.doi.org/10.1234' scrubbed = scrub_doi(d) assert(scrubbed == '10.1234') d = '10.123 4' assert( scrub_doi(d) == '10.1234' ) d = '<p>10.1234</p>' assert( scrub_doi(d) == '10.1234' ...
import pytest def test_scrub_doi(): from vdm.utils import scrub_doi d = 'http://dx.doi.org/10.1234' scrubbed = scrub_doi(d) assert(scrubbed == '10.1234') d = '10.123 4' assert( scrub_doi(d) == '10.1234' ) d = '<p>10.1234</p>' assert( scrub_doi(d) == '10.1234' ...
<commit_before> import pytest def test_scrub_doi(): from vdm.utils import scrub_doi d = 'http://dx.doi.org/10.1234' scrubbed = scrub_doi(d) assert(scrubbed == '10.1234') d = '10.123 4' assert( scrub_doi(d) == '10.1234' ) d = '<p>10.1234</p>' assert( scrub_doi(d) ...
import pytest def test_scrub_doi(): from vdm.utils import scrub_doi d = 'http://dx.doi.org/10.1234' scrubbed = scrub_doi(d) assert(scrubbed == '10.1234') d = '10.123 4' assert( scrub_doi(d) == '10.1234' ) d = '<p>10.1234</p>' assert( scrub_doi(d) == '10.1234' ...
import pytest def test_scrub_doi(): from vdm.utils import scrub_doi d = 'http://dx.doi.org/10.1234' scrubbed = scrub_doi(d) assert(scrubbed == '10.1234') d = '10.123 4' assert( scrub_doi(d) == '10.1234' ) d = '<p>10.1234</p>' assert( scrub_doi(d) == '10.1234' ...
<commit_before> import pytest def test_scrub_doi(): from vdm.utils import scrub_doi d = 'http://dx.doi.org/10.1234' scrubbed = scrub_doi(d) assert(scrubbed == '10.1234') d = '10.123 4' assert( scrub_doi(d) == '10.1234' ) d = '<p>10.1234</p>' assert( scrub_doi(d) ...
c34840a7ac20d22e650be09a515cee9dbfcf6043
tests/test_views.py
tests/test_views.py
from django.http import HttpResponse from djproxy.views import HttpProxy DOWNSTREAM_INJECTION = lambda x: x class LocalProxy(HttpProxy): base_url = "http://sitebuilder.qa.yola.net/en/ide/Yola/Yola.session.jsp" class SBProxy(HttpProxy): base_url = "http://sitebuilder.qa.yola.net/en/APIController" def ind...
from django.http import HttpResponse from djproxy.views import HttpProxy class LocalProxy(HttpProxy): base_url = "http://localhost:8000/some/content/" def index(request): return HttpResponse('Some content!', status=200) class BadTestProxy(HttpProxy): pass class GoodTestProxy(HttpProxy): base_ur...
Remove accidentally committed test code
Remove accidentally committed test code
Python
mit
thomasw/djproxy
from django.http import HttpResponse from djproxy.views import HttpProxy DOWNSTREAM_INJECTION = lambda x: x class LocalProxy(HttpProxy): base_url = "http://sitebuilder.qa.yola.net/en/ide/Yola/Yola.session.jsp" class SBProxy(HttpProxy): base_url = "http://sitebuilder.qa.yola.net/en/APIController" def ind...
from django.http import HttpResponse from djproxy.views import HttpProxy class LocalProxy(HttpProxy): base_url = "http://localhost:8000/some/content/" def index(request): return HttpResponse('Some content!', status=200) class BadTestProxy(HttpProxy): pass class GoodTestProxy(HttpProxy): base_ur...
<commit_before>from django.http import HttpResponse from djproxy.views import HttpProxy DOWNSTREAM_INJECTION = lambda x: x class LocalProxy(HttpProxy): base_url = "http://sitebuilder.qa.yola.net/en/ide/Yola/Yola.session.jsp" class SBProxy(HttpProxy): base_url = "http://sitebuilder.qa.yola.net/en/APIContro...
from django.http import HttpResponse from djproxy.views import HttpProxy class LocalProxy(HttpProxy): base_url = "http://localhost:8000/some/content/" def index(request): return HttpResponse('Some content!', status=200) class BadTestProxy(HttpProxy): pass class GoodTestProxy(HttpProxy): base_ur...
from django.http import HttpResponse from djproxy.views import HttpProxy DOWNSTREAM_INJECTION = lambda x: x class LocalProxy(HttpProxy): base_url = "http://sitebuilder.qa.yola.net/en/ide/Yola/Yola.session.jsp" class SBProxy(HttpProxy): base_url = "http://sitebuilder.qa.yola.net/en/APIController" def ind...
<commit_before>from django.http import HttpResponse from djproxy.views import HttpProxy DOWNSTREAM_INJECTION = lambda x: x class LocalProxy(HttpProxy): base_url = "http://sitebuilder.qa.yola.net/en/ide/Yola/Yola.session.jsp" class SBProxy(HttpProxy): base_url = "http://sitebuilder.qa.yola.net/en/APIContro...
2351100234180afc6f6510140e9f989051fb6511
PyFVCOM/__init__.py
PyFVCOM/__init__.py
""" The FVCOM Python toolbox (PyFVCOM) """ __version__ = '2.0.0' __author__ = 'Pierre Cazenave' __credits__ = ['Pierre Cazenave'] __license__ = 'MIT' __maintainer__ = 'Pierre Cazenave' __email__ = '[email protected]' import inspect from warnings import warn # Import everything! from PyFVCOM import buoy from PyFVCOM im...
""" The FVCOM Python toolbox (PyFVCOM) """ __version__ = '2.0.0' __author__ = 'Pierre Cazenave' __credits__ = ['Pierre Cazenave'] __license__ = 'MIT' __maintainer__ = 'Pierre Cazenave' __email__ = '[email protected]' import inspect from warnings import warn # Import everything! from PyFVCOM import buoy from PyFVCOM im...
Fix module name to import.
Fix module name to import.
Python
mit
pwcazenave/PyFVCOM
""" The FVCOM Python toolbox (PyFVCOM) """ __version__ = '2.0.0' __author__ = 'Pierre Cazenave' __credits__ = ['Pierre Cazenave'] __license__ = 'MIT' __maintainer__ = 'Pierre Cazenave' __email__ = '[email protected]' import inspect from warnings import warn # Import everything! from PyFVCOM import buoy from PyFVCOM im...
""" The FVCOM Python toolbox (PyFVCOM) """ __version__ = '2.0.0' __author__ = 'Pierre Cazenave' __credits__ = ['Pierre Cazenave'] __license__ = 'MIT' __maintainer__ = 'Pierre Cazenave' __email__ = '[email protected]' import inspect from warnings import warn # Import everything! from PyFVCOM import buoy from PyFVCOM im...
<commit_before>""" The FVCOM Python toolbox (PyFVCOM) """ __version__ = '2.0.0' __author__ = 'Pierre Cazenave' __credits__ = ['Pierre Cazenave'] __license__ = 'MIT' __maintainer__ = 'Pierre Cazenave' __email__ = '[email protected]' import inspect from warnings import warn # Import everything! from PyFVCOM import buoy ...
""" The FVCOM Python toolbox (PyFVCOM) """ __version__ = '2.0.0' __author__ = 'Pierre Cazenave' __credits__ = ['Pierre Cazenave'] __license__ = 'MIT' __maintainer__ = 'Pierre Cazenave' __email__ = '[email protected]' import inspect from warnings import warn # Import everything! from PyFVCOM import buoy from PyFVCOM im...
""" The FVCOM Python toolbox (PyFVCOM) """ __version__ = '2.0.0' __author__ = 'Pierre Cazenave' __credits__ = ['Pierre Cazenave'] __license__ = 'MIT' __maintainer__ = 'Pierre Cazenave' __email__ = '[email protected]' import inspect from warnings import warn # Import everything! from PyFVCOM import buoy from PyFVCOM im...
<commit_before>""" The FVCOM Python toolbox (PyFVCOM) """ __version__ = '2.0.0' __author__ = 'Pierre Cazenave' __credits__ = ['Pierre Cazenave'] __license__ = 'MIT' __maintainer__ = 'Pierre Cazenave' __email__ = '[email protected]' import inspect from warnings import warn # Import everything! from PyFVCOM import buoy ...
ab418734f432691ec4a927be32364ee85baab35c
__init__.py
__init__.py
import inspect import python2.httplib2 as httplib2 globals().update(inspect.getmembers(httplib2))
import inspect import sys if sys.version_info[0] == 2: from .python2 import httplib2 else: from .python3 import httplib2 globals().update(inspect.getmembers(httplib2))
Use python version dependent import
Use python version dependent import Change-Id: Iae6bc0cc8d526162b91d0c18cf1fba1461aa9f98
Python
mit
wikimedia/pywikibot-externals-httplib2,wikimedia/pywikibot-externals-httplib2,jayvdb/httplib2,jayvdb/httplib2
import inspect import python2.httplib2 as httplib2 globals().update(inspect.getmembers(httplib2)) Use python version dependent import Change-Id: Iae6bc0cc8d526162b91d0c18cf1fba1461aa9f98
import inspect import sys if sys.version_info[0] == 2: from .python2 import httplib2 else: from .python3 import httplib2 globals().update(inspect.getmembers(httplib2))
<commit_before>import inspect import python2.httplib2 as httplib2 globals().update(inspect.getmembers(httplib2)) <commit_msg>Use python version dependent import Change-Id: Iae6bc0cc8d526162b91d0c18cf1fba1461aa9f98<commit_after>
import inspect import sys if sys.version_info[0] == 2: from .python2 import httplib2 else: from .python3 import httplib2 globals().update(inspect.getmembers(httplib2))
import inspect import python2.httplib2 as httplib2 globals().update(inspect.getmembers(httplib2)) Use python version dependent import Change-Id: Iae6bc0cc8d526162b91d0c18cf1fba1461aa9f98import inspect import sys if sys.version_info[0] == 2: from .python2 import httplib2 else: from .python3 import httplib2 glob...
<commit_before>import inspect import python2.httplib2 as httplib2 globals().update(inspect.getmembers(httplib2)) <commit_msg>Use python version dependent import Change-Id: Iae6bc0cc8d526162b91d0c18cf1fba1461aa9f98<commit_after>import inspect import sys if sys.version_info[0] == 2: from .python2 import httplib2 els...
9ab7efa44a8e7267b2902b6e23ff61381d31692c
profile_collection/startup/85-robot.py
profile_collection/startup/85-robot.py
from ophyd import Device, EpicsSignal, EpicsSignalRO from ophyd import Component as C class Robot(Device): robot_sample_number = C(EpicsSignal, 'ID:Tgt-SP') robot_load_cmd = C(EpicsSignal, 'Cmd:Load-Cmd.PROC') robot_unload_cmd = C(EpicsSignal, 'Cmd:Unload-Cmd.PROC') robot_execute_cmd = C(EpicsSignal, ...
from ophyd import Device, EpicsSignal, EpicsSignalRO from ophyd import Component as C from ophyd.utils import set_and_wait class Robot(Device): sample_number = C(EpicsSignal, 'ID:Tgt-SP') load_cmd = C(EpicsSignal, 'Cmd:Load-Cmd.PROC') unload_cmd = C(EpicsSignal, 'Cmd:Unload-Cmd.PROC') execute_cmd = C(E...
Add sample loading logic to Robot.
WIP: Add sample loading logic to Robot.
Python
bsd-2-clause
NSLS-II-XPD/ipython_ophyd,NSLS-II-XPD/ipython_ophyd
from ophyd import Device, EpicsSignal, EpicsSignalRO from ophyd import Component as C class Robot(Device): robot_sample_number = C(EpicsSignal, 'ID:Tgt-SP') robot_load_cmd = C(EpicsSignal, 'Cmd:Load-Cmd.PROC') robot_unload_cmd = C(EpicsSignal, 'Cmd:Unload-Cmd.PROC') robot_execute_cmd = C(EpicsSignal, ...
from ophyd import Device, EpicsSignal, EpicsSignalRO from ophyd import Component as C from ophyd.utils import set_and_wait class Robot(Device): sample_number = C(EpicsSignal, 'ID:Tgt-SP') load_cmd = C(EpicsSignal, 'Cmd:Load-Cmd.PROC') unload_cmd = C(EpicsSignal, 'Cmd:Unload-Cmd.PROC') execute_cmd = C(E...
<commit_before>from ophyd import Device, EpicsSignal, EpicsSignalRO from ophyd import Component as C class Robot(Device): robot_sample_number = C(EpicsSignal, 'ID:Tgt-SP') robot_load_cmd = C(EpicsSignal, 'Cmd:Load-Cmd.PROC') robot_unload_cmd = C(EpicsSignal, 'Cmd:Unload-Cmd.PROC') robot_execute_cmd = ...
from ophyd import Device, EpicsSignal, EpicsSignalRO from ophyd import Component as C from ophyd.utils import set_and_wait class Robot(Device): sample_number = C(EpicsSignal, 'ID:Tgt-SP') load_cmd = C(EpicsSignal, 'Cmd:Load-Cmd.PROC') unload_cmd = C(EpicsSignal, 'Cmd:Unload-Cmd.PROC') execute_cmd = C(E...
from ophyd import Device, EpicsSignal, EpicsSignalRO from ophyd import Component as C class Robot(Device): robot_sample_number = C(EpicsSignal, 'ID:Tgt-SP') robot_load_cmd = C(EpicsSignal, 'Cmd:Load-Cmd.PROC') robot_unload_cmd = C(EpicsSignal, 'Cmd:Unload-Cmd.PROC') robot_execute_cmd = C(EpicsSignal, ...
<commit_before>from ophyd import Device, EpicsSignal, EpicsSignalRO from ophyd import Component as C class Robot(Device): robot_sample_number = C(EpicsSignal, 'ID:Tgt-SP') robot_load_cmd = C(EpicsSignal, 'Cmd:Load-Cmd.PROC') robot_unload_cmd = C(EpicsSignal, 'Cmd:Unload-Cmd.PROC') robot_execute_cmd = ...
2c6f5cfb2e90e815d74dca11c395e25875d475be
corehq/ex-submodules/phonelog/tasks.py
corehq/ex-submodules/phonelog/tasks.py
from datetime import datetime, timedelta from celery.schedules import crontab from celery.task import periodic_task from django.conf import settings from phonelog.models import DeviceReportEntry, UserErrorEntry, ForceCloseEntry, UserEntry @periodic_task(run_every=crontab(minute=0, hour=0), queue=getattr(settings, 'CE...
from datetime import datetime, timedelta from celery.schedules import crontab from celery.task import periodic_task from django.conf import settings from django.db import connection from phonelog.models import UserErrorEntry, ForceCloseEntry, UserEntry @periodic_task(run_every=crontab(minute=0, hour=0), queue=getattr...
Drop table for device report logs.
Drop table for device report logs.
Python
bsd-3-clause
dimagi/commcare-hq,dimagi/commcare-hq,dimagi/commcare-hq,dimagi/commcare-hq,dimagi/commcare-hq
from datetime import datetime, timedelta from celery.schedules import crontab from celery.task import periodic_task from django.conf import settings from phonelog.models import DeviceReportEntry, UserErrorEntry, ForceCloseEntry, UserEntry @periodic_task(run_every=crontab(minute=0, hour=0), queue=getattr(settings, 'CE...
from datetime import datetime, timedelta from celery.schedules import crontab from celery.task import periodic_task from django.conf import settings from django.db import connection from phonelog.models import UserErrorEntry, ForceCloseEntry, UserEntry @periodic_task(run_every=crontab(minute=0, hour=0), queue=getattr...
<commit_before>from datetime import datetime, timedelta from celery.schedules import crontab from celery.task import periodic_task from django.conf import settings from phonelog.models import DeviceReportEntry, UserErrorEntry, ForceCloseEntry, UserEntry @periodic_task(run_every=crontab(minute=0, hour=0), queue=getatt...
from datetime import datetime, timedelta from celery.schedules import crontab from celery.task import periodic_task from django.conf import settings from django.db import connection from phonelog.models import UserErrorEntry, ForceCloseEntry, UserEntry @periodic_task(run_every=crontab(minute=0, hour=0), queue=getattr...
from datetime import datetime, timedelta from celery.schedules import crontab from celery.task import periodic_task from django.conf import settings from phonelog.models import DeviceReportEntry, UserErrorEntry, ForceCloseEntry, UserEntry @periodic_task(run_every=crontab(minute=0, hour=0), queue=getattr(settings, 'CE...
<commit_before>from datetime import datetime, timedelta from celery.schedules import crontab from celery.task import periodic_task from django.conf import settings from phonelog.models import DeviceReportEntry, UserErrorEntry, ForceCloseEntry, UserEntry @periodic_task(run_every=crontab(minute=0, hour=0), queue=getatt...
02c18a46935d58ac08a340e5011fb345ffb7f83a
h2o-py/tests/testdir_algos/gbm/pyunit_cup98_01GBM_medium.py
h2o-py/tests/testdir_algos/gbm/pyunit_cup98_01GBM_medium.py
import sys sys.path.insert(1, "../../../") import h2o def cupMediumGBM(ip,port): # Connect to h2o h2o.init(ip,port) train = h2o.import_frame(path=h2o.locate("bigdata/laptop/usecases/cup98LRN_z.csv")) test = h2o.import_frame(path=h2o.locate("bigdata/laptop/usecases/cup98VAL_z.csv")) train["TARGET_B"] = trai...
import sys sys.path.insert(1, "../../../") import h2o def cupMediumGBM(ip,port): # Connect to h2o h2o.init(ip,port) train = h2o.import_frame(path=h2o.locate("bigdata/laptop/usecases/cup98LRN_z.csv")) test = h2o.import_frame(path=h2o.locate("bigdata/laptop/usecases/cup98VAL_z.csv")) train["TARGET_B"] = trai...
Update test for new column naming rules. Remove '' as a name and call column 'C1'
Update test for new column naming rules. Remove '' as a name and call column 'C1'
Python
apache-2.0
bospetersen/h2o-3,spennihana/h2o-3,mrgloom/h2o-3,michalkurka/h2o-3,spennihana/h2o-3,PawarPawan/h2o-v3,jangorecki/h2o-3,junwucs/h2o-3,printedheart/h2o-3,kyoren/https-github.com-h2oai-h2o-3,michalkurka/h2o-3,michalkurka/h2o-3,datachand/h2o-3,ChristosChristofidis/h2o-3,bospetersen/h2o-3,brightchen/h2o-3,jangorecki/h2o-3,m...
import sys sys.path.insert(1, "../../../") import h2o def cupMediumGBM(ip,port): # Connect to h2o h2o.init(ip,port) train = h2o.import_frame(path=h2o.locate("bigdata/laptop/usecases/cup98LRN_z.csv")) test = h2o.import_frame(path=h2o.locate("bigdata/laptop/usecases/cup98VAL_z.csv")) train["TARGET_B"] = trai...
import sys sys.path.insert(1, "../../../") import h2o def cupMediumGBM(ip,port): # Connect to h2o h2o.init(ip,port) train = h2o.import_frame(path=h2o.locate("bigdata/laptop/usecases/cup98LRN_z.csv")) test = h2o.import_frame(path=h2o.locate("bigdata/laptop/usecases/cup98VAL_z.csv")) train["TARGET_B"] = trai...
<commit_before>import sys sys.path.insert(1, "../../../") import h2o def cupMediumGBM(ip,port): # Connect to h2o h2o.init(ip,port) train = h2o.import_frame(path=h2o.locate("bigdata/laptop/usecases/cup98LRN_z.csv")) test = h2o.import_frame(path=h2o.locate("bigdata/laptop/usecases/cup98VAL_z.csv")) train["TA...
import sys sys.path.insert(1, "../../../") import h2o def cupMediumGBM(ip,port): # Connect to h2o h2o.init(ip,port) train = h2o.import_frame(path=h2o.locate("bigdata/laptop/usecases/cup98LRN_z.csv")) test = h2o.import_frame(path=h2o.locate("bigdata/laptop/usecases/cup98VAL_z.csv")) train["TARGET_B"] = trai...
import sys sys.path.insert(1, "../../../") import h2o def cupMediumGBM(ip,port): # Connect to h2o h2o.init(ip,port) train = h2o.import_frame(path=h2o.locate("bigdata/laptop/usecases/cup98LRN_z.csv")) test = h2o.import_frame(path=h2o.locate("bigdata/laptop/usecases/cup98VAL_z.csv")) train["TARGET_B"] = trai...
<commit_before>import sys sys.path.insert(1, "../../../") import h2o def cupMediumGBM(ip,port): # Connect to h2o h2o.init(ip,port) train = h2o.import_frame(path=h2o.locate("bigdata/laptop/usecases/cup98LRN_z.csv")) test = h2o.import_frame(path=h2o.locate("bigdata/laptop/usecases/cup98VAL_z.csv")) train["TA...
5025bff2ca9a4f31a371ecbd9255b1fb92b9cc4d
kafka_influxdb/encoder/echo_encoder.py
kafka_influxdb/encoder/echo_encoder.py
class Encoder(object): @staticmethod def encode(msg): """ Don't change the message at all :param msg: """ return msg
try: # Test for mypy support (requires Python 3) from typing import Text except: pass class Encoder(object): @staticmethod def encode(msg): # type: (bytes) -> List[bytes] """ Don't change the message at all :param msg: """ return [msg]
Return a list of messages in echo encoder and add mypy type hints
Return a list of messages in echo encoder and add mypy type hints
Python
apache-2.0
mre/kafka-influxdb,mre/kafka-influxdb
class Encoder(object): @staticmethod def encode(msg): """ Don't change the message at all :param msg: """ return msg Return a list of messages in echo encoder and add mypy type hints
try: # Test for mypy support (requires Python 3) from typing import Text except: pass class Encoder(object): @staticmethod def encode(msg): # type: (bytes) -> List[bytes] """ Don't change the message at all :param msg: """ return [msg]
<commit_before>class Encoder(object): @staticmethod def encode(msg): """ Don't change the message at all :param msg: """ return msg <commit_msg>Return a list of messages in echo encoder and add mypy type hints<commit_after>
try: # Test for mypy support (requires Python 3) from typing import Text except: pass class Encoder(object): @staticmethod def encode(msg): # type: (bytes) -> List[bytes] """ Don't change the message at all :param msg: """ return [msg]
class Encoder(object): @staticmethod def encode(msg): """ Don't change the message at all :param msg: """ return msg Return a list of messages in echo encoder and add mypy type hintstry: # Test for mypy support (requires Python 3) from typing import Text except: ...
<commit_before>class Encoder(object): @staticmethod def encode(msg): """ Don't change the message at all :param msg: """ return msg <commit_msg>Return a list of messages in echo encoder and add mypy type hints<commit_after>try: # Test for mypy support (requires Python...
2722a59aad0775f1bcd1e81232ff445b9012a2ae
ssim/compat.py
ssim/compat.py
"""Compatibility routines.""" from __future__ import absolute_import import sys try: import Image # pylint: disable=import-error,unused-import except ImportError: from PIL import Image # pylint: disable=unused-import try: import ImageOps # pylint: disable=import-error,unused-import except ImportError...
"""Compatibility routines.""" from __future__ import absolute_import import sys try: import Image # pylint: disable=import-error,unused-import except ImportError: from PIL import Image # pylint: disable=unused-import try: import ImageOps # pylint: disable=import-error,unused-import except ImportError...
Add pylint to disable redefined variable.
Add pylint to disable redefined variable.
Python
mit
jterrace/pyssim
"""Compatibility routines.""" from __future__ import absolute_import import sys try: import Image # pylint: disable=import-error,unused-import except ImportError: from PIL import Image # pylint: disable=unused-import try: import ImageOps # pylint: disable=import-error,unused-import except ImportError...
"""Compatibility routines.""" from __future__ import absolute_import import sys try: import Image # pylint: disable=import-error,unused-import except ImportError: from PIL import Image # pylint: disable=unused-import try: import ImageOps # pylint: disable=import-error,unused-import except ImportError...
<commit_before>"""Compatibility routines.""" from __future__ import absolute_import import sys try: import Image # pylint: disable=import-error,unused-import except ImportError: from PIL import Image # pylint: disable=unused-import try: import ImageOps # pylint: disable=import-error,unused-import exc...
"""Compatibility routines.""" from __future__ import absolute_import import sys try: import Image # pylint: disable=import-error,unused-import except ImportError: from PIL import Image # pylint: disable=unused-import try: import ImageOps # pylint: disable=import-error,unused-import except ImportError...
"""Compatibility routines.""" from __future__ import absolute_import import sys try: import Image # pylint: disable=import-error,unused-import except ImportError: from PIL import Image # pylint: disable=unused-import try: import ImageOps # pylint: disable=import-error,unused-import except ImportError...
<commit_before>"""Compatibility routines.""" from __future__ import absolute_import import sys try: import Image # pylint: disable=import-error,unused-import except ImportError: from PIL import Image # pylint: disable=unused-import try: import ImageOps # pylint: disable=import-error,unused-import exc...
659659270ef067baf0edea5de5bb10fdab532eaa
run-tests.py
run-tests.py
#!/usr/bin/env python from __future__ import print_function from optparse import OptionParser from subprocess import Popen import os import sys def run_command(cmdline): proc = Popen(cmdline, shell=True) proc.communicate() return proc.returncode def main(): parser = OptionParser() parser.add_o...
#!/usr/bin/env python from __future__ import print_function from optparse import OptionParser from subprocess import Popen import os import sys def run_command(cmdline): proc = Popen(cmdline, shell=True) proc.communicate() return proc.returncode def main(): parser = OptionParser() parser.add_o...
Remove SALADIR from environment if present
tests: Remove SALADIR from environment if present
Python
mit
akheron/sala,akheron/sala
#!/usr/bin/env python from __future__ import print_function from optparse import OptionParser from subprocess import Popen import os import sys def run_command(cmdline): proc = Popen(cmdline, shell=True) proc.communicate() return proc.returncode def main(): parser = OptionParser() parser.add_o...
#!/usr/bin/env python from __future__ import print_function from optparse import OptionParser from subprocess import Popen import os import sys def run_command(cmdline): proc = Popen(cmdline, shell=True) proc.communicate() return proc.returncode def main(): parser = OptionParser() parser.add_o...
<commit_before>#!/usr/bin/env python from __future__ import print_function from optparse import OptionParser from subprocess import Popen import os import sys def run_command(cmdline): proc = Popen(cmdline, shell=True) proc.communicate() return proc.returncode def main(): parser = OptionParser() ...
#!/usr/bin/env python from __future__ import print_function from optparse import OptionParser from subprocess import Popen import os import sys def run_command(cmdline): proc = Popen(cmdline, shell=True) proc.communicate() return proc.returncode def main(): parser = OptionParser() parser.add_o...
#!/usr/bin/env python from __future__ import print_function from optparse import OptionParser from subprocess import Popen import os import sys def run_command(cmdline): proc = Popen(cmdline, shell=True) proc.communicate() return proc.returncode def main(): parser = OptionParser() parser.add_o...
<commit_before>#!/usr/bin/env python from __future__ import print_function from optparse import OptionParser from subprocess import Popen import os import sys def run_command(cmdline): proc = Popen(cmdline, shell=True) proc.communicate() return proc.returncode def main(): parser = OptionParser() ...
431720194c20dde7b19236d2302c0f9910fd7ea4
pseudorandom.py
pseudorandom.py
import os from flask import Flask, render_template from names import get_full_name app = Flask(__name__) @app.route("/") def index(): return render_template('index.html', name=get_full_name()) if __name__ == "__main__": port = int(os.environ.get('PORT', 5000)) app.run(host='0.0.0.0', port=port)
import os from flask import Flask, render_template, request from names import get_full_name app = Flask(__name__) @app.route("/") def index(): if request.headers.get('User-Agent', '')[:4].lower() == 'curl': return u"{0}\n".format(get_full_name()) else: return render_template('index.html', na...
Send just plaintext name if curl is used
Send just plaintext name if curl is used
Python
mit
treyhunner/pseudorandom.name,treyhunner/pseudorandom.name
import os from flask import Flask, render_template from names import get_full_name app = Flask(__name__) @app.route("/") def index(): return render_template('index.html', name=get_full_name()) if __name__ == "__main__": port = int(os.environ.get('PORT', 5000)) app.run(host='0.0.0.0', port=port) Send j...
import os from flask import Flask, render_template, request from names import get_full_name app = Flask(__name__) @app.route("/") def index(): if request.headers.get('User-Agent', '')[:4].lower() == 'curl': return u"{0}\n".format(get_full_name()) else: return render_template('index.html', na...
<commit_before>import os from flask import Flask, render_template from names import get_full_name app = Flask(__name__) @app.route("/") def index(): return render_template('index.html', name=get_full_name()) if __name__ == "__main__": port = int(os.environ.get('PORT', 5000)) app.run(host='0.0.0.0', po...
import os from flask import Flask, render_template, request from names import get_full_name app = Flask(__name__) @app.route("/") def index(): if request.headers.get('User-Agent', '')[:4].lower() == 'curl': return u"{0}\n".format(get_full_name()) else: return render_template('index.html', na...
import os from flask import Flask, render_template from names import get_full_name app = Flask(__name__) @app.route("/") def index(): return render_template('index.html', name=get_full_name()) if __name__ == "__main__": port = int(os.environ.get('PORT', 5000)) app.run(host='0.0.0.0', port=port) Send j...
<commit_before>import os from flask import Flask, render_template from names import get_full_name app = Flask(__name__) @app.route("/") def index(): return render_template('index.html', name=get_full_name()) if __name__ == "__main__": port = int(os.environ.get('PORT', 5000)) app.run(host='0.0.0.0', po...
411ae98889d3611151a6f94d661b86b1bbc5e026
apis/Google.Cloud.Speech.V1/synth.py
apis/Google.Cloud.Speech.V1/synth.py
import os from synthtool import shell from pathlib import Path # Parent of the script is the API-specific directory # Parent of the API-specific directory is the apis directory # Parent of the apis directory is the repo root root = Path(__file__).parent.parent.parent package = Path(__file__).parent.name shell.run( ...
import sys from synthtool import shell from pathlib import Path # Parent of the script is the API-specific directory # Parent of the API-specific directory is the apis directory # Parent of the apis directory is the repo root root = Path(__file__).parent.parent.parent package = Path(__file__).parent.name bash = '/bin...
Use the right bash command based on platform
Use the right bash command based on platform
Python
apache-2.0
googleapis/google-cloud-dotnet,jskeet/google-cloud-dotnet,jskeet/google-cloud-dotnet,jskeet/google-cloud-dotnet,googleapis/google-cloud-dotnet,jskeet/google-cloud-dotnet,jskeet/gcloud-dotnet,googleapis/google-cloud-dotnet,jskeet/google-cloud-dotnet
import os from synthtool import shell from pathlib import Path # Parent of the script is the API-specific directory # Parent of the API-specific directory is the apis directory # Parent of the apis directory is the repo root root = Path(__file__).parent.parent.parent package = Path(__file__).parent.name shell.run( ...
import sys from synthtool import shell from pathlib import Path # Parent of the script is the API-specific directory # Parent of the API-specific directory is the apis directory # Parent of the apis directory is the repo root root = Path(__file__).parent.parent.parent package = Path(__file__).parent.name bash = '/bin...
<commit_before>import os from synthtool import shell from pathlib import Path # Parent of the script is the API-specific directory # Parent of the API-specific directory is the apis directory # Parent of the apis directory is the repo root root = Path(__file__).parent.parent.parent package = Path(__file__).parent.name...
import sys from synthtool import shell from pathlib import Path # Parent of the script is the API-specific directory # Parent of the API-specific directory is the apis directory # Parent of the apis directory is the repo root root = Path(__file__).parent.parent.parent package = Path(__file__).parent.name bash = '/bin...
import os from synthtool import shell from pathlib import Path # Parent of the script is the API-specific directory # Parent of the API-specific directory is the apis directory # Parent of the apis directory is the repo root root = Path(__file__).parent.parent.parent package = Path(__file__).parent.name shell.run( ...
<commit_before>import os from synthtool import shell from pathlib import Path # Parent of the script is the API-specific directory # Parent of the API-specific directory is the apis directory # Parent of the apis directory is the repo root root = Path(__file__).parent.parent.parent package = Path(__file__).parent.name...
a1f26386bec0c4d39bce77d0fd3975ae4b0930d0
apps/package/tests/test_handlers.py
apps/package/tests/test_handlers.py
from django.test import TestCase class TestRepoHandlers(TestCase): def test_repo_registry(self): from package.handlers import get_repo, supported_repos g = get_repo("github") self.assertEqual(g.title, "Github") self.assertEqual(g.url, "https://github.com") self.assertTrue("...
from django.test import TestCase class TestRepoHandlers(TestCase): def test_repo_registry(self): from package.handlers import get_repo, supported_repos g = get_repo("github") self.assertEqual(g.title, "Github") self.assertEqual(g.url, "https://github.com") self.assertTrue("...
Test what get_repo() does for unsupported repos
Test what get_repo() does for unsupported repos
Python
mit
nanuxbe/djangopackages,nanuxbe/djangopackages,pydanny/djangopackages,QLGu/djangopackages,miketheman/opencomparison,benracine/opencomparison,QLGu/djangopackages,cartwheelweb/packaginator,miketheman/opencomparison,audreyr/opencomparison,benracine/opencomparison,audreyr/opencomparison,QLGu/djangopackages,cartwheelweb/pack...
from django.test import TestCase class TestRepoHandlers(TestCase): def test_repo_registry(self): from package.handlers import get_repo, supported_repos g = get_repo("github") self.assertEqual(g.title, "Github") self.assertEqual(g.url, "https://github.com") self.assertTrue("...
from django.test import TestCase class TestRepoHandlers(TestCase): def test_repo_registry(self): from package.handlers import get_repo, supported_repos g = get_repo("github") self.assertEqual(g.title, "Github") self.assertEqual(g.url, "https://github.com") self.assertTrue("...
<commit_before>from django.test import TestCase class TestRepoHandlers(TestCase): def test_repo_registry(self): from package.handlers import get_repo, supported_repos g = get_repo("github") self.assertEqual(g.title, "Github") self.assertEqual(g.url, "https://github.com") se...
from django.test import TestCase class TestRepoHandlers(TestCase): def test_repo_registry(self): from package.handlers import get_repo, supported_repos g = get_repo("github") self.assertEqual(g.title, "Github") self.assertEqual(g.url, "https://github.com") self.assertTrue("...
from django.test import TestCase class TestRepoHandlers(TestCase): def test_repo_registry(self): from package.handlers import get_repo, supported_repos g = get_repo("github") self.assertEqual(g.title, "Github") self.assertEqual(g.url, "https://github.com") self.assertTrue("...
<commit_before>from django.test import TestCase class TestRepoHandlers(TestCase): def test_repo_registry(self): from package.handlers import get_repo, supported_repos g = get_repo("github") self.assertEqual(g.title, "Github") self.assertEqual(g.url, "https://github.com") se...
ab91d525abb5bb1ef476f3aac2c034e50f85617a
src/apps/contacts/mixins.py
src/apps/contacts/mixins.py
from apps.contacts.models import BaseContact class ContactMixin(object): """ Would be used for adding contacts functionality to models with contact data. """ def get_contacts(self, is_primary=False): """ Returns dict with all contacts. Example: >> obj.get_contacts() ...
from apps.contacts.models import BaseContact class ContactMixin(object): """ Would be used for adding contacts functionality to models with contact data. """ def get_contacts(self, is_primary=False): """ Returns dict with all contacts. Example: >> obj.get_contacts() ...
Fix description for contact mixin
Fix description for contact mixin
Python
mit
wis-software/office-manager
from apps.contacts.models import BaseContact class ContactMixin(object): """ Would be used for adding contacts functionality to models with contact data. """ def get_contacts(self, is_primary=False): """ Returns dict with all contacts. Example: >> obj.get_contacts() ...
from apps.contacts.models import BaseContact class ContactMixin(object): """ Would be used for adding contacts functionality to models with contact data. """ def get_contacts(self, is_primary=False): """ Returns dict with all contacts. Example: >> obj.get_contacts() ...
<commit_before>from apps.contacts.models import BaseContact class ContactMixin(object): """ Would be used for adding contacts functionality to models with contact data. """ def get_contacts(self, is_primary=False): """ Returns dict with all contacts. Example: >> obj.ge...
from apps.contacts.models import BaseContact class ContactMixin(object): """ Would be used for adding contacts functionality to models with contact data. """ def get_contacts(self, is_primary=False): """ Returns dict with all contacts. Example: >> obj.get_contacts() ...
from apps.contacts.models import BaseContact class ContactMixin(object): """ Would be used for adding contacts functionality to models with contact data. """ def get_contacts(self, is_primary=False): """ Returns dict with all contacts. Example: >> obj.get_contacts() ...
<commit_before>from apps.contacts.models import BaseContact class ContactMixin(object): """ Would be used for adding contacts functionality to models with contact data. """ def get_contacts(self, is_primary=False): """ Returns dict with all contacts. Example: >> obj.ge...
51d09e2552c31e74b85c2e6bd12bcbab7e1b2047
pygs/test/stress_utils.py
pygs/test/stress_utils.py
import os import sys def get_mem_usage(): """returns percentage and vsz mem usage of this script""" pid = os.getpid() psout = os.popen( "ps -p %s u"%pid ).read() parsed_psout = psout.split("\n")[1].split() return float(parsed_psout[3]), int( parsed_psout[4] )
import os import sys def get_mem_usage(): """returns percentage and vsz mem usage of this script""" pid = os.getpid() psout = os.popen( "ps u -p %s"%pid ).read() parsed_psout = psout.split("\n")[1].split() return float(parsed_psout[3]), int( parsed_psout[4] )
Make ps shell-out Mac and debian compliant.
Make ps shell-out Mac and debian compliant.
Python
bsd-3-clause
jeriksson/graphserver,jeriksson/graphserver,graphserver/graphserver,bmander/graphserver,brendannee/Bikesy-Backend,brendannee/Bikesy-Backend,brendannee/Bikesy-Backend,jeriksson/graphserver,jeriksson/graphserver,bmander/graphserver,jeriksson/graphserver,graphserver/graphserver,brendannee/Bikesy-Backend,brendannee/Bikesy-...
import os import sys def get_mem_usage(): """returns percentage and vsz mem usage of this script""" pid = os.getpid() psout = os.popen( "ps -p %s u"%pid ).read() parsed_psout = psout.split("\n")[1].split() return float(parsed_psout[3]), int( parsed_psout[4] )Make ps shell-out Mac and debi...
import os import sys def get_mem_usage(): """returns percentage and vsz mem usage of this script""" pid = os.getpid() psout = os.popen( "ps u -p %s"%pid ).read() parsed_psout = psout.split("\n")[1].split() return float(parsed_psout[3]), int( parsed_psout[4] )
<commit_before>import os import sys def get_mem_usage(): """returns percentage and vsz mem usage of this script""" pid = os.getpid() psout = os.popen( "ps -p %s u"%pid ).read() parsed_psout = psout.split("\n")[1].split() return float(parsed_psout[3]), int( parsed_psout[4] )<commit_msg>Mak...
import os import sys def get_mem_usage(): """returns percentage and vsz mem usage of this script""" pid = os.getpid() psout = os.popen( "ps u -p %s"%pid ).read() parsed_psout = psout.split("\n")[1].split() return float(parsed_psout[3]), int( parsed_psout[4] )
import os import sys def get_mem_usage(): """returns percentage and vsz mem usage of this script""" pid = os.getpid() psout = os.popen( "ps -p %s u"%pid ).read() parsed_psout = psout.split("\n")[1].split() return float(parsed_psout[3]), int( parsed_psout[4] )Make ps shell-out Mac and debi...
<commit_before>import os import sys def get_mem_usage(): """returns percentage and vsz mem usage of this script""" pid = os.getpid() psout = os.popen( "ps -p %s u"%pid ).read() parsed_psout = psout.split("\n")[1].split() return float(parsed_psout[3]), int( parsed_psout[4] )<commit_msg>Mak...
b05eacfa7f2a3fb653ec4a9653780d211245bfb1
pyvac/helpers/calendar.py
pyvac/helpers/calendar.py
import logging import caldav from dateutil.relativedelta import relativedelta log = logging.getLogger(__file__) def addToCal(url, date_from, date_end, summary): """ Add entry in calendar to period date_from, date_end """ vcal_entry = """BEGIN:VCALENDAR VERSION:2.0 PRODID:Pyvac Calendar BEGIN:VEVENT SUMMARY:...
import logging import caldav from dateutil.relativedelta import relativedelta log = logging.getLogger(__file__) def addToCal(url, date_from, date_end, summary): """ Add entry in calendar to period date_from, date_end """ vcal_entry = """BEGIN:VCALENDAR VERSION:2.0 PRODID:Pyvac Calendar BEGIN:VEVENT SUMMARY:...
Use now 'oop' method from creating principal object, prevent 'path handling error' with baikal caldav server
Use now 'oop' method from creating principal object, prevent 'path handling error' with baikal caldav server
Python
bsd-3-clause
doyousoft/pyvac,sayoun/pyvac,doyousoft/pyvac,sayoun/pyvac,doyousoft/pyvac,sayoun/pyvac
import logging import caldav from dateutil.relativedelta import relativedelta log = logging.getLogger(__file__) def addToCal(url, date_from, date_end, summary): """ Add entry in calendar to period date_from, date_end """ vcal_entry = """BEGIN:VCALENDAR VERSION:2.0 PRODID:Pyvac Calendar BEGIN:VEVENT SUMMARY:...
import logging import caldav from dateutil.relativedelta import relativedelta log = logging.getLogger(__file__) def addToCal(url, date_from, date_end, summary): """ Add entry in calendar to period date_from, date_end """ vcal_entry = """BEGIN:VCALENDAR VERSION:2.0 PRODID:Pyvac Calendar BEGIN:VEVENT SUMMARY:...
<commit_before>import logging import caldav from dateutil.relativedelta import relativedelta log = logging.getLogger(__file__) def addToCal(url, date_from, date_end, summary): """ Add entry in calendar to period date_from, date_end """ vcal_entry = """BEGIN:VCALENDAR VERSION:2.0 PRODID:Pyvac Calendar BEGIN:...
import logging import caldav from dateutil.relativedelta import relativedelta log = logging.getLogger(__file__) def addToCal(url, date_from, date_end, summary): """ Add entry in calendar to period date_from, date_end """ vcal_entry = """BEGIN:VCALENDAR VERSION:2.0 PRODID:Pyvac Calendar BEGIN:VEVENT SUMMARY:...
import logging import caldav from dateutil.relativedelta import relativedelta log = logging.getLogger(__file__) def addToCal(url, date_from, date_end, summary): """ Add entry in calendar to period date_from, date_end """ vcal_entry = """BEGIN:VCALENDAR VERSION:2.0 PRODID:Pyvac Calendar BEGIN:VEVENT SUMMARY:...
<commit_before>import logging import caldav from dateutil.relativedelta import relativedelta log = logging.getLogger(__file__) def addToCal(url, date_from, date_end, summary): """ Add entry in calendar to period date_from, date_end """ vcal_entry = """BEGIN:VCALENDAR VERSION:2.0 PRODID:Pyvac Calendar BEGIN:...
548e54c0a3e5fe7115b6f92e449c53f5a08ba5de
tests/setup.py
tests/setup.py
import os import os.path def configuration(parent_package='',top_path=None): from numpy.distutils.misc_util import Configuration config = Configuration('tests',parent_package,top_path) config.add_subpackage('examples') return config if __name__ == '__main__': from numpy.distutils.core import setu...
import os import os.path def configuration(parent_package='',top_path=None): from numpy.distutils.misc_util import Configuration config = Configuration('numsconstests',parent_package,top_path) config.add_subpackage('examples') return config if __name__ == '__main__': from numpy.distutils.core imp...
Change the name for end-to-end numscons tests
Change the name for end-to-end numscons tests
Python
bsd-3-clause
cournape/numscons,cournape/numscons,cournape/numscons
import os import os.path def configuration(parent_package='',top_path=None): from numpy.distutils.misc_util import Configuration config = Configuration('tests',parent_package,top_path) config.add_subpackage('examples') return config if __name__ == '__main__': from numpy.distutils.core import setu...
import os import os.path def configuration(parent_package='',top_path=None): from numpy.distutils.misc_util import Configuration config = Configuration('numsconstests',parent_package,top_path) config.add_subpackage('examples') return config if __name__ == '__main__': from numpy.distutils.core imp...
<commit_before>import os import os.path def configuration(parent_package='',top_path=None): from numpy.distutils.misc_util import Configuration config = Configuration('tests',parent_package,top_path) config.add_subpackage('examples') return config if __name__ == '__main__': from numpy.distutils.c...
import os import os.path def configuration(parent_package='',top_path=None): from numpy.distutils.misc_util import Configuration config = Configuration('numsconstests',parent_package,top_path) config.add_subpackage('examples') return config if __name__ == '__main__': from numpy.distutils.core imp...
import os import os.path def configuration(parent_package='',top_path=None): from numpy.distutils.misc_util import Configuration config = Configuration('tests',parent_package,top_path) config.add_subpackage('examples') return config if __name__ == '__main__': from numpy.distutils.core import setu...
<commit_before>import os import os.path def configuration(parent_package='',top_path=None): from numpy.distutils.misc_util import Configuration config = Configuration('tests',parent_package,top_path) config.add_subpackage('examples') return config if __name__ == '__main__': from numpy.distutils.c...
d51d9cc67eca9566673e963e824dc335eb47a9af
recipy/utils.py
recipy/utils.py
import sys from .log import log_input, log_output def open(*args, **kwargs): """Built-in open replacement that logs input and output Workaround for issue #44. Patching `__builtins__['open']` is complicated, because many libraries use standard open internally, while we only want to log inputs and out...
import six from .log import log_input, log_output def open(*args, **kwargs): """Built-in open replacement that logs input and output Workaround for issue #44. Patching `__builtins__['open']` is complicated, because many libraries use standard open internally, while we only want to log inputs and out...
Use six instead of sys.version_info
Use six instead of sys.version_info
Python
apache-2.0
recipy/recipy,recipy/recipy
import sys from .log import log_input, log_output def open(*args, **kwargs): """Built-in open replacement that logs input and output Workaround for issue #44. Patching `__builtins__['open']` is complicated, because many libraries use standard open internally, while we only want to log inputs and out...
import six from .log import log_input, log_output def open(*args, **kwargs): """Built-in open replacement that logs input and output Workaround for issue #44. Patching `__builtins__['open']` is complicated, because many libraries use standard open internally, while we only want to log inputs and out...
<commit_before>import sys from .log import log_input, log_output def open(*args, **kwargs): """Built-in open replacement that logs input and output Workaround for issue #44. Patching `__builtins__['open']` is complicated, because many libraries use standard open internally, while we only want to log...
import six from .log import log_input, log_output def open(*args, **kwargs): """Built-in open replacement that logs input and output Workaround for issue #44. Patching `__builtins__['open']` is complicated, because many libraries use standard open internally, while we only want to log inputs and out...
import sys from .log import log_input, log_output def open(*args, **kwargs): """Built-in open replacement that logs input and output Workaround for issue #44. Patching `__builtins__['open']` is complicated, because many libraries use standard open internally, while we only want to log inputs and out...
<commit_before>import sys from .log import log_input, log_output def open(*args, **kwargs): """Built-in open replacement that logs input and output Workaround for issue #44. Patching `__builtins__['open']` is complicated, because many libraries use standard open internally, while we only want to log...
9e1cf6ecf8104b38c85a00e973873cbfa7d78236
bytecode.py
bytecode.py
class BytecodeBase: def __init__(self): # Eventually might want to add subclassed bytecodes here # Though __subclasses__ works quite well pass def execute(self, machine): pass class Push(BytecodeBase): def __init__(self, data): self.data = data def execute(sel...
class BytecodeBase: autoincrement = True # For jump def __init__(self): # Eventually might want to add subclassed bytecodes here # Though __subclasses__ works quite well pass def execute(self, machine): pass class Push(BytecodeBase): def __init__(self, data): ...
Add autoincrement for jump in the future
Add autoincrement for jump in the future
Python
bsd-3-clause
darbaga/simple_compiler
class BytecodeBase: def __init__(self): # Eventually might want to add subclassed bytecodes here # Though __subclasses__ works quite well pass def execute(self, machine): pass class Push(BytecodeBase): def __init__(self, data): self.data = data def execute(sel...
class BytecodeBase: autoincrement = True # For jump def __init__(self): # Eventually might want to add subclassed bytecodes here # Though __subclasses__ works quite well pass def execute(self, machine): pass class Push(BytecodeBase): def __init__(self, data): ...
<commit_before>class BytecodeBase: def __init__(self): # Eventually might want to add subclassed bytecodes here # Though __subclasses__ works quite well pass def execute(self, machine): pass class Push(BytecodeBase): def __init__(self, data): self.data = data ...
class BytecodeBase: autoincrement = True # For jump def __init__(self): # Eventually might want to add subclassed bytecodes here # Though __subclasses__ works quite well pass def execute(self, machine): pass class Push(BytecodeBase): def __init__(self, data): ...
class BytecodeBase: def __init__(self): # Eventually might want to add subclassed bytecodes here # Though __subclasses__ works quite well pass def execute(self, machine): pass class Push(BytecodeBase): def __init__(self, data): self.data = data def execute(sel...
<commit_before>class BytecodeBase: def __init__(self): # Eventually might want to add subclassed bytecodes here # Though __subclasses__ works quite well pass def execute(self, machine): pass class Push(BytecodeBase): def __init__(self, data): self.data = data ...
864653259bdcddf62f6d3c8f270099e99fbb8457
numba/cuda/tests/cudapy/test_userexc.py
numba/cuda/tests/cudapy/test_userexc.py
from __future__ import print_function, absolute_import, division from numba.cuda.testing import unittest, SerialMixin, skip_on_cudasim from numba import cuda, config class MyError(Exception): pass regex_pattern = ( r'In function [\'"]test_exc[\'"], file ([\.\/\\a-zA-Z_0-9]+), line \d+' ) class TestUserEx...
from __future__ import print_function, absolute_import, division from numba.cuda.testing import unittest, SerialMixin, skip_on_cudasim from numba import cuda, config class MyError(Exception): pass regex_pattern = ( r'In function [\'"]test_exc[\'"], file [\.\/\\\-a-zA-Z_0-9]+, line \d+' ) class TestUserEx...
Fix up regex for path matching
Fix up regex for path matching
Python
bsd-2-clause
stuartarchibald/numba,numba/numba,jriehl/numba,jriehl/numba,IntelLabs/numba,seibert/numba,seibert/numba,gmarkall/numba,stonebig/numba,cpcloud/numba,jriehl/numba,IntelLabs/numba,numba/numba,stonebig/numba,sklam/numba,jriehl/numba,seibert/numba,cpcloud/numba,sklam/numba,stuartarchibald/numba,numba/numba,sklam/numba,jrieh...
from __future__ import print_function, absolute_import, division from numba.cuda.testing import unittest, SerialMixin, skip_on_cudasim from numba import cuda, config class MyError(Exception): pass regex_pattern = ( r'In function [\'"]test_exc[\'"], file ([\.\/\\a-zA-Z_0-9]+), line \d+' ) class TestUserEx...
from __future__ import print_function, absolute_import, division from numba.cuda.testing import unittest, SerialMixin, skip_on_cudasim from numba import cuda, config class MyError(Exception): pass regex_pattern = ( r'In function [\'"]test_exc[\'"], file [\.\/\\\-a-zA-Z_0-9]+, line \d+' ) class TestUserEx...
<commit_before>from __future__ import print_function, absolute_import, division from numba.cuda.testing import unittest, SerialMixin, skip_on_cudasim from numba import cuda, config class MyError(Exception): pass regex_pattern = ( r'In function [\'"]test_exc[\'"], file ([\.\/\\a-zA-Z_0-9]+), line \d+' ) c...
from __future__ import print_function, absolute_import, division from numba.cuda.testing import unittest, SerialMixin, skip_on_cudasim from numba import cuda, config class MyError(Exception): pass regex_pattern = ( r'In function [\'"]test_exc[\'"], file [\.\/\\\-a-zA-Z_0-9]+, line \d+' ) class TestUserEx...
from __future__ import print_function, absolute_import, division from numba.cuda.testing import unittest, SerialMixin, skip_on_cudasim from numba import cuda, config class MyError(Exception): pass regex_pattern = ( r'In function [\'"]test_exc[\'"], file ([\.\/\\a-zA-Z_0-9]+), line \d+' ) class TestUserEx...
<commit_before>from __future__ import print_function, absolute_import, division from numba.cuda.testing import unittest, SerialMixin, skip_on_cudasim from numba import cuda, config class MyError(Exception): pass regex_pattern = ( r'In function [\'"]test_exc[\'"], file ([\.\/\\a-zA-Z_0-9]+), line \d+' ) c...
2034c8280800291227232435786441bfb0edace0
tests/cli.py
tests/cli.py
import os from spec import eq_ from invoke import run from _utils import support # Yea, it's not really object-oriented, but whatever :) class CLI(object): "Command-line interface" # Yo dogfood, I heard you like invoking def basic_invocation(self): os.chdir(support) result = run("invok...
import os from spec import eq_, skip from invoke import run from _utils import support # Yea, it's not really object-oriented, but whatever :) class CLI(object): "Command-line interface" # Yo dogfood, I heard you like invoking def basic_invocation(self): os.chdir(support) result = run(...
Add common CLI invocation test stubs.
Add common CLI invocation test stubs. Doesn't go into positional args.
Python
bsd-2-clause
frol/invoke,alex/invoke,mkusz/invoke,mattrobenolt/invoke,mattrobenolt/invoke,kejbaly2/invoke,kejbaly2/invoke,pyinvoke/invoke,pfmoore/invoke,sophacles/invoke,pfmoore/invoke,mkusz/invoke,tyewang/invoke,pyinvoke/invoke,singingwolfboy/invoke,frol/invoke
import os from spec import eq_ from invoke import run from _utils import support # Yea, it's not really object-oriented, but whatever :) class CLI(object): "Command-line interface" # Yo dogfood, I heard you like invoking def basic_invocation(self): os.chdir(support) result = run("invok...
import os from spec import eq_, skip from invoke import run from _utils import support # Yea, it's not really object-oriented, but whatever :) class CLI(object): "Command-line interface" # Yo dogfood, I heard you like invoking def basic_invocation(self): os.chdir(support) result = run(...
<commit_before>import os from spec import eq_ from invoke import run from _utils import support # Yea, it's not really object-oriented, but whatever :) class CLI(object): "Command-line interface" # Yo dogfood, I heard you like invoking def basic_invocation(self): os.chdir(support) resu...
import os from spec import eq_, skip from invoke import run from _utils import support # Yea, it's not really object-oriented, but whatever :) class CLI(object): "Command-line interface" # Yo dogfood, I heard you like invoking def basic_invocation(self): os.chdir(support) result = run(...
import os from spec import eq_ from invoke import run from _utils import support # Yea, it's not really object-oriented, but whatever :) class CLI(object): "Command-line interface" # Yo dogfood, I heard you like invoking def basic_invocation(self): os.chdir(support) result = run("invok...
<commit_before>import os from spec import eq_ from invoke import run from _utils import support # Yea, it's not really object-oriented, but whatever :) class CLI(object): "Command-line interface" # Yo dogfood, I heard you like invoking def basic_invocation(self): os.chdir(support) resu...
2e0286632b9120fe6a788db4483911513a39fe04
fabfile.py
fabfile.py
from fabric.api import * # noqa env.hosts = [ '104.131.30.135', ] env.user = "root" env.directory = "/home/django/api.freemusic.ninja" env.deploy_path = "/home/django/django_project" def deploy(): with cd(env.directory): run("git pull --rebase") sudo("pip3 install -r requirements.txt") ...
from fabric.api import * # noqa env.hosts = [ '104.131.30.135', ] env.user = "root" env.directory = "/home/django/api.freemusic.ninja" env.deploy_path = "/home/django/django_project" def deploy(): with cd(env.directory): run("git reset --hard origin/master") sudo("pip3 install -r requiremen...
Reset to upstream master instead of rebasing during deployment
Reset to upstream master instead of rebasing during deployment
Python
bsd-3-clause
FreeMusicNinja/api.freemusic.ninja
from fabric.api import * # noqa env.hosts = [ '104.131.30.135', ] env.user = "root" env.directory = "/home/django/api.freemusic.ninja" env.deploy_path = "/home/django/django_project" def deploy(): with cd(env.directory): run("git pull --rebase") sudo("pip3 install -r requirements.txt") ...
from fabric.api import * # noqa env.hosts = [ '104.131.30.135', ] env.user = "root" env.directory = "/home/django/api.freemusic.ninja" env.deploy_path = "/home/django/django_project" def deploy(): with cd(env.directory): run("git reset --hard origin/master") sudo("pip3 install -r requiremen...
<commit_before>from fabric.api import * # noqa env.hosts = [ '104.131.30.135', ] env.user = "root" env.directory = "/home/django/api.freemusic.ninja" env.deploy_path = "/home/django/django_project" def deploy(): with cd(env.directory): run("git pull --rebase") sudo("pip3 install -r requirem...
from fabric.api import * # noqa env.hosts = [ '104.131.30.135', ] env.user = "root" env.directory = "/home/django/api.freemusic.ninja" env.deploy_path = "/home/django/django_project" def deploy(): with cd(env.directory): run("git reset --hard origin/master") sudo("pip3 install -r requiremen...
from fabric.api import * # noqa env.hosts = [ '104.131.30.135', ] env.user = "root" env.directory = "/home/django/api.freemusic.ninja" env.deploy_path = "/home/django/django_project" def deploy(): with cd(env.directory): run("git pull --rebase") sudo("pip3 install -r requirements.txt") ...
<commit_before>from fabric.api import * # noqa env.hosts = [ '104.131.30.135', ] env.user = "root" env.directory = "/home/django/api.freemusic.ninja" env.deploy_path = "/home/django/django_project" def deploy(): with cd(env.directory): run("git pull --rebase") sudo("pip3 install -r requirem...
caf94786ca8c0bc9e3995da0a160c84921a3bfc6
fabfile.py
fabfile.py
from fabric.api import task, sudo, env, local from fabric.contrib.project import rsync_project from fabric.contrib.console import confirm @task def upload_docs(): target = "/var/www/paramiko.org" staging = "/tmp/paramiko_docs" sudo("mkdir -p %s" % staging) sudo("chown -R %s %s" % (env.user, staging)) ...
from fabric.api import task, sudo, env, local, hosts from fabric.contrib.project import rsync_project from fabric.contrib.console import confirm @task @hosts("paramiko.org") def upload_docs(): target = "/var/www/paramiko.org" staging = "/tmp/paramiko_docs" sudo("mkdir -p %s" % staging) sudo("chown -R ...
Update doc upload task w/ static hostname
Update doc upload task w/ static hostname
Python
lgpl-2.1
torkil/paramiko,redixin/paramiko,SebastianDeiss/paramiko,fvicente/paramiko,zpzgone/paramiko,mirrorcoder/paramiko,reaperhulk/paramiko,jaraco/paramiko,rcorrieri/paramiko,paramiko/paramiko,CptLemming/paramiko,anadigi/paramiko,digitalquacks/paramiko,ameily/paramiko,selboo/paramiko,remram44/paramiko,varunarya10/paramiko,dav...
from fabric.api import task, sudo, env, local from fabric.contrib.project import rsync_project from fabric.contrib.console import confirm @task def upload_docs(): target = "/var/www/paramiko.org" staging = "/tmp/paramiko_docs" sudo("mkdir -p %s" % staging) sudo("chown -R %s %s" % (env.user, staging)) ...
from fabric.api import task, sudo, env, local, hosts from fabric.contrib.project import rsync_project from fabric.contrib.console import confirm @task @hosts("paramiko.org") def upload_docs(): target = "/var/www/paramiko.org" staging = "/tmp/paramiko_docs" sudo("mkdir -p %s" % staging) sudo("chown -R ...
<commit_before>from fabric.api import task, sudo, env, local from fabric.contrib.project import rsync_project from fabric.contrib.console import confirm @task def upload_docs(): target = "/var/www/paramiko.org" staging = "/tmp/paramiko_docs" sudo("mkdir -p %s" % staging) sudo("chown -R %s %s" % (env.u...
from fabric.api import task, sudo, env, local, hosts from fabric.contrib.project import rsync_project from fabric.contrib.console import confirm @task @hosts("paramiko.org") def upload_docs(): target = "/var/www/paramiko.org" staging = "/tmp/paramiko_docs" sudo("mkdir -p %s" % staging) sudo("chown -R ...
from fabric.api import task, sudo, env, local from fabric.contrib.project import rsync_project from fabric.contrib.console import confirm @task def upload_docs(): target = "/var/www/paramiko.org" staging = "/tmp/paramiko_docs" sudo("mkdir -p %s" % staging) sudo("chown -R %s %s" % (env.user, staging)) ...
<commit_before>from fabric.api import task, sudo, env, local from fabric.contrib.project import rsync_project from fabric.contrib.console import confirm @task def upload_docs(): target = "/var/www/paramiko.org" staging = "/tmp/paramiko_docs" sudo("mkdir -p %s" % staging) sudo("chown -R %s %s" % (env.u...
06c8c91b05e0bf5f15271560df4101d90adfeb39
Lib/test/test_capi.py
Lib/test/test_capi.py
# Run the _testcapi module tests (tests for the Python/C API): by defn, # these are all functions _test exports whose name begins with 'test_'. import sys import test_support import _testcapi for name in dir(_testcapi): if name.startswith('test_'): test = getattr(_testcapi, name) if test_support....
# Run the _testcapi module tests (tests for the Python/C API): by defn, # these are all functions _testcapi exports whose name begins with 'test_'. import sys import test_support import _testcapi for name in dir(_testcapi): if name.startswith('test_'): test = getattr(_testcapi, name) if test_supp...
Fix typo in comment (the module is now called _testcapi, not _test).
Fix typo in comment (the module is now called _testcapi, not _test).
Python
mit
sk-/python2.7-type-annotator,sk-/python2.7-type-annotator,sk-/python2.7-type-annotator
# Run the _testcapi module tests (tests for the Python/C API): by defn, # these are all functions _test exports whose name begins with 'test_'. import sys import test_support import _testcapi for name in dir(_testcapi): if name.startswith('test_'): test = getattr(_testcapi, name) if test_support....
# Run the _testcapi module tests (tests for the Python/C API): by defn, # these are all functions _testcapi exports whose name begins with 'test_'. import sys import test_support import _testcapi for name in dir(_testcapi): if name.startswith('test_'): test = getattr(_testcapi, name) if test_supp...
<commit_before># Run the _testcapi module tests (tests for the Python/C API): by defn, # these are all functions _test exports whose name begins with 'test_'. import sys import test_support import _testcapi for name in dir(_testcapi): if name.startswith('test_'): test = getattr(_testcapi, name) i...
# Run the _testcapi module tests (tests for the Python/C API): by defn, # these are all functions _testcapi exports whose name begins with 'test_'. import sys import test_support import _testcapi for name in dir(_testcapi): if name.startswith('test_'): test = getattr(_testcapi, name) if test_supp...
# Run the _testcapi module tests (tests for the Python/C API): by defn, # these are all functions _test exports whose name begins with 'test_'. import sys import test_support import _testcapi for name in dir(_testcapi): if name.startswith('test_'): test = getattr(_testcapi, name) if test_support....
<commit_before># Run the _testcapi module tests (tests for the Python/C API): by defn, # these are all functions _test exports whose name begins with 'test_'. import sys import test_support import _testcapi for name in dir(_testcapi): if name.startswith('test_'): test = getattr(_testcapi, name) i...
b7cc9c5d2275a87849701e8a7307e26680bb740a
xvistaprof/reader.py
xvistaprof/reader.py
#!/usr/bin/env python # encoding: utf-8 """ Reader for XVISTA .prof tables. """ import numpy as np from astropy.table import Table from astropy.io import registry def xvista_table_reader(filename): dt = [('R', np.float), ('SB', np.float), ('SB_err', np.float), ('ELL', np.float), ('PA', np.float), ('EMA...
#!/usr/bin/env python # encoding: utf-8 """ Reader for XVISTA .prof tables. """ import numpy as np from astropy.table import Table from astropy.io import registry def xvista_table_reader(filename): dt = [('R', np.float), ('SB', np.float), ('SB_err', np.float), ('ELL', np.float), ('PA', np.float), ('EMA...
Update genfromtxt skip_header for numpy 1.10+
Update genfromtxt skip_header for numpy 1.10+
Python
bsd-2-clause
jonathansick/xvistaprof
#!/usr/bin/env python # encoding: utf-8 """ Reader for XVISTA .prof tables. """ import numpy as np from astropy.table import Table from astropy.io import registry def xvista_table_reader(filename): dt = [('R', np.float), ('SB', np.float), ('SB_err', np.float), ('ELL', np.float), ('PA', np.float), ('EMA...
#!/usr/bin/env python # encoding: utf-8 """ Reader for XVISTA .prof tables. """ import numpy as np from astropy.table import Table from astropy.io import registry def xvista_table_reader(filename): dt = [('R', np.float), ('SB', np.float), ('SB_err', np.float), ('ELL', np.float), ('PA', np.float), ('EMA...
<commit_before>#!/usr/bin/env python # encoding: utf-8 """ Reader for XVISTA .prof tables. """ import numpy as np from astropy.table import Table from astropy.io import registry def xvista_table_reader(filename): dt = [('R', np.float), ('SB', np.float), ('SB_err', np.float), ('ELL', np.float), ('PA', n...
#!/usr/bin/env python # encoding: utf-8 """ Reader for XVISTA .prof tables. """ import numpy as np from astropy.table import Table from astropy.io import registry def xvista_table_reader(filename): dt = [('R', np.float), ('SB', np.float), ('SB_err', np.float), ('ELL', np.float), ('PA', np.float), ('EMA...
#!/usr/bin/env python # encoding: utf-8 """ Reader for XVISTA .prof tables. """ import numpy as np from astropy.table import Table from astropy.io import registry def xvista_table_reader(filename): dt = [('R', np.float), ('SB', np.float), ('SB_err', np.float), ('ELL', np.float), ('PA', np.float), ('EMA...
<commit_before>#!/usr/bin/env python # encoding: utf-8 """ Reader for XVISTA .prof tables. """ import numpy as np from astropy.table import Table from astropy.io import registry def xvista_table_reader(filename): dt = [('R', np.float), ('SB', np.float), ('SB_err', np.float), ('ELL', np.float), ('PA', n...
e0b7b6ccdd947324ac72b48a28d6c68c7e980d96
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...
c6275896adb429fad7f8bebb74ce932739ecfb63
edx_shopify/views.py
edx_shopify/views.py
import copy, json from django.conf import settings from django.http import HttpResponse from django.views.decorators.csrf import csrf_exempt from django.views.decorators.http import require_POST from .utils import hmac_is_valid from .models import Order from .tasks import ProcessOrder @csrf_exempt @require_POST def ...
import copy, json from django.conf import settings from django.http import HttpResponse from django.views.decorators.csrf import csrf_exempt from django.views.decorators.http import require_POST from .utils import hmac_is_valid from .models import Order from .tasks import ProcessOrder @csrf_exempt @require_POST def ...
Use get_or_create correctly on Order
Use get_or_create correctly on Order
Python
agpl-3.0
hastexo/edx-shopify,fghaas/edx-shopify
import copy, json from django.conf import settings from django.http import HttpResponse from django.views.decorators.csrf import csrf_exempt from django.views.decorators.http import require_POST from .utils import hmac_is_valid from .models import Order from .tasks import ProcessOrder @csrf_exempt @require_POST def ...
import copy, json from django.conf import settings from django.http import HttpResponse from django.views.decorators.csrf import csrf_exempt from django.views.decorators.http import require_POST from .utils import hmac_is_valid from .models import Order from .tasks import ProcessOrder @csrf_exempt @require_POST def ...
<commit_before>import copy, json from django.conf import settings from django.http import HttpResponse from django.views.decorators.csrf import csrf_exempt from django.views.decorators.http import require_POST from .utils import hmac_is_valid from .models import Order from .tasks import ProcessOrder @csrf_exempt @re...
import copy, json from django.conf import settings from django.http import HttpResponse from django.views.decorators.csrf import csrf_exempt from django.views.decorators.http import require_POST from .utils import hmac_is_valid from .models import Order from .tasks import ProcessOrder @csrf_exempt @require_POST def ...
import copy, json from django.conf import settings from django.http import HttpResponse from django.views.decorators.csrf import csrf_exempt from django.views.decorators.http import require_POST from .utils import hmac_is_valid from .models import Order from .tasks import ProcessOrder @csrf_exempt @require_POST def ...
<commit_before>import copy, json from django.conf import settings from django.http import HttpResponse from django.views.decorators.csrf import csrf_exempt from django.views.decorators.http import require_POST from .utils import hmac_is_valid from .models import Order from .tasks import ProcessOrder @csrf_exempt @re...
cfdbe06da6e35f2cb166374cf249d51f18e1224e
pryvate/blueprints/packages/packages.py
pryvate/blueprints/packages/packages.py
"""Package blueprint.""" import os import magic from flask import Blueprint, current_app, make_response, render_template blueprint = Blueprint('packages', __name__, url_prefix='/packages') @blueprint.route('') def foo(): return 'ok' @blueprint.route('/<package_type>/<letter>/<name>/<version>', ...
"""Package blueprint.""" import os import magic from flask import Blueprint, current_app, make_response, render_template blueprint = Blueprint('packages', __name__, url_prefix='/packages') @blueprint.route('') def foo(): return 'ok' @blueprint.route('/<package_type>/<letter>/<name>/<version>', ...
Return a 404 if the package was not found
Return a 404 if the package was not found
Python
mit
Dinoshauer/pryvate,Dinoshauer/pryvate
"""Package blueprint.""" import os import magic from flask import Blueprint, current_app, make_response, render_template blueprint = Blueprint('packages', __name__, url_prefix='/packages') @blueprint.route('') def foo(): return 'ok' @blueprint.route('/<package_type>/<letter>/<name>/<version>', ...
"""Package blueprint.""" import os import magic from flask import Blueprint, current_app, make_response, render_template blueprint = Blueprint('packages', __name__, url_prefix='/packages') @blueprint.route('') def foo(): return 'ok' @blueprint.route('/<package_type>/<letter>/<name>/<version>', ...
<commit_before>"""Package blueprint.""" import os import magic from flask import Blueprint, current_app, make_response, render_template blueprint = Blueprint('packages', __name__, url_prefix='/packages') @blueprint.route('') def foo(): return 'ok' @blueprint.route('/<package_type>/<letter>/<name>/<version>', ...
"""Package blueprint.""" import os import magic from flask import Blueprint, current_app, make_response, render_template blueprint = Blueprint('packages', __name__, url_prefix='/packages') @blueprint.route('') def foo(): return 'ok' @blueprint.route('/<package_type>/<letter>/<name>/<version>', ...
"""Package blueprint.""" import os import magic from flask import Blueprint, current_app, make_response, render_template blueprint = Blueprint('packages', __name__, url_prefix='/packages') @blueprint.route('') def foo(): return 'ok' @blueprint.route('/<package_type>/<letter>/<name>/<version>', ...
<commit_before>"""Package blueprint.""" import os import magic from flask import Blueprint, current_app, make_response, render_template blueprint = Blueprint('packages', __name__, url_prefix='/packages') @blueprint.route('') def foo(): return 'ok' @blueprint.route('/<package_type>/<letter>/<name>/<version>', ...
e1b0222c8a3ed39bf76af10484a94aa4cfe5adc8
googlesearch/templatetags/search_tags.py
googlesearch/templatetags/search_tags.py
import math from django import template from ..conf import settings register = template.Library() @register.inclusion_tag('googlesearch/_pagination.html', takes_context=True) def show_pagination(context, pages_to_show=10): max_pages = int(math.ceil(context['total_results'] / setting...
import math from django import template from ..conf import settings register = template.Library() @register.inclusion_tag('googlesearch/_pagination.html', takes_context=True) def show_pagination(context, pages_to_show=10): max_pages = int(math.ceil(context['total_results'] / setting...
Remove last_page not needed anymore.
Remove last_page not needed anymore.
Python
mit
hzdg/django-google-search,hzdg/django-google-search
import math from django import template from ..conf import settings register = template.Library() @register.inclusion_tag('googlesearch/_pagination.html', takes_context=True) def show_pagination(context, pages_to_show=10): max_pages = int(math.ceil(context['total_results'] / setting...
import math from django import template from ..conf import settings register = template.Library() @register.inclusion_tag('googlesearch/_pagination.html', takes_context=True) def show_pagination(context, pages_to_show=10): max_pages = int(math.ceil(context['total_results'] / setting...
<commit_before>import math from django import template from ..conf import settings register = template.Library() @register.inclusion_tag('googlesearch/_pagination.html', takes_context=True) def show_pagination(context, pages_to_show=10): max_pages = int(math.ceil(context['total_results'] / ...
import math from django import template from ..conf import settings register = template.Library() @register.inclusion_tag('googlesearch/_pagination.html', takes_context=True) def show_pagination(context, pages_to_show=10): max_pages = int(math.ceil(context['total_results'] / setting...
import math from django import template from ..conf import settings register = template.Library() @register.inclusion_tag('googlesearch/_pagination.html', takes_context=True) def show_pagination(context, pages_to_show=10): max_pages = int(math.ceil(context['total_results'] / setting...
<commit_before>import math from django import template from ..conf import settings register = template.Library() @register.inclusion_tag('googlesearch/_pagination.html', takes_context=True) def show_pagination(context, pages_to_show=10): max_pages = int(math.ceil(context['total_results'] / ...
451a435ca051305517c79216d7ab9441939f4004
src/amr.py
src/amr.py
import dolfin as df def amr(mesh, m, DirichletBoundary, g, d): V = df.FunctionSpace(mesh, "CG", 1) # Define boundary condition bc = df.DirichletBC(V, g, DirichletBoundary()) # Define variational problem u = df.Function(V) v = df.TestFunction(V) E = df.grad(u) costheta = df.dot(m, E) ...
import dolfin as df def amr(mesh, m, DirichletBoundary, g, d, s0=1, alpha=1): V = df.FunctionSpace(mesh, "CG", 1) # Define boundary condition bc = df.DirichletBC(V, g, DirichletBoundary()) # Define variational problem u = df.Function(V) v = df.TestFunction(V) E = -df.grad(u) costheta ...
Add sigma0 and alpha AMR parameters to the function.
Add sigma0 and alpha AMR parameters to the function.
Python
bsd-2-clause
fangohr/fenics-anisotropic-magneto-resistance
import dolfin as df def amr(mesh, m, DirichletBoundary, g, d): V = df.FunctionSpace(mesh, "CG", 1) # Define boundary condition bc = df.DirichletBC(V, g, DirichletBoundary()) # Define variational problem u = df.Function(V) v = df.TestFunction(V) E = df.grad(u) costheta = df.dot(m, E) ...
import dolfin as df def amr(mesh, m, DirichletBoundary, g, d, s0=1, alpha=1): V = df.FunctionSpace(mesh, "CG", 1) # Define boundary condition bc = df.DirichletBC(V, g, DirichletBoundary()) # Define variational problem u = df.Function(V) v = df.TestFunction(V) E = -df.grad(u) costheta ...
<commit_before>import dolfin as df def amr(mesh, m, DirichletBoundary, g, d): V = df.FunctionSpace(mesh, "CG", 1) # Define boundary condition bc = df.DirichletBC(V, g, DirichletBoundary()) # Define variational problem u = df.Function(V) v = df.TestFunction(V) E = df.grad(u) costheta =...
import dolfin as df def amr(mesh, m, DirichletBoundary, g, d, s0=1, alpha=1): V = df.FunctionSpace(mesh, "CG", 1) # Define boundary condition bc = df.DirichletBC(V, g, DirichletBoundary()) # Define variational problem u = df.Function(V) v = df.TestFunction(V) E = -df.grad(u) costheta ...
import dolfin as df def amr(mesh, m, DirichletBoundary, g, d): V = df.FunctionSpace(mesh, "CG", 1) # Define boundary condition bc = df.DirichletBC(V, g, DirichletBoundary()) # Define variational problem u = df.Function(V) v = df.TestFunction(V) E = df.grad(u) costheta = df.dot(m, E) ...
<commit_before>import dolfin as df def amr(mesh, m, DirichletBoundary, g, d): V = df.FunctionSpace(mesh, "CG", 1) # Define boundary condition bc = df.DirichletBC(V, g, DirichletBoundary()) # Define variational problem u = df.Function(V) v = df.TestFunction(V) E = df.grad(u) costheta =...
704e1457480d6baa8db7fff245d733303f8a17f5
gpytorch/kernels/white_noise_kernel.py
gpytorch/kernels/white_noise_kernel.py
import torch from . import Kernel from gpytorch.lazy import DiagLazyVariable, ZeroLazyVariable class WhiteNoiseKernel(Kernel): def __init__(self, variances): super(WhiteNoiseKernel, self).__init__() self.register_buffer("variances", variances) def forward(self, x1, x2): if self.traini...
import torch from . import Kernel from gpytorch.lazy import DiagLazyVariable, ZeroLazyVariable class WhiteNoiseKernel(Kernel): def __init__(self, variances): super(WhiteNoiseKernel, self).__init__() self.register_buffer("variances", variances) def forward(self, x1, x2): if self.traini...
Fix ZeroLazyVariable size returned by white noise kernel
Fix ZeroLazyVariable size returned by white noise kernel
Python
mit
jrg365/gpytorch,jrg365/gpytorch,jrg365/gpytorch
import torch from . import Kernel from gpytorch.lazy import DiagLazyVariable, ZeroLazyVariable class WhiteNoiseKernel(Kernel): def __init__(self, variances): super(WhiteNoiseKernel, self).__init__() self.register_buffer("variances", variances) def forward(self, x1, x2): if self.traini...
import torch from . import Kernel from gpytorch.lazy import DiagLazyVariable, ZeroLazyVariable class WhiteNoiseKernel(Kernel): def __init__(self, variances): super(WhiteNoiseKernel, self).__init__() self.register_buffer("variances", variances) def forward(self, x1, x2): if self.traini...
<commit_before>import torch from . import Kernel from gpytorch.lazy import DiagLazyVariable, ZeroLazyVariable class WhiteNoiseKernel(Kernel): def __init__(self, variances): super(WhiteNoiseKernel, self).__init__() self.register_buffer("variances", variances) def forward(self, x1, x2): ...
import torch from . import Kernel from gpytorch.lazy import DiagLazyVariable, ZeroLazyVariable class WhiteNoiseKernel(Kernel): def __init__(self, variances): super(WhiteNoiseKernel, self).__init__() self.register_buffer("variances", variances) def forward(self, x1, x2): if self.traini...
import torch from . import Kernel from gpytorch.lazy import DiagLazyVariable, ZeroLazyVariable class WhiteNoiseKernel(Kernel): def __init__(self, variances): super(WhiteNoiseKernel, self).__init__() self.register_buffer("variances", variances) def forward(self, x1, x2): if self.traini...
<commit_before>import torch from . import Kernel from gpytorch.lazy import DiagLazyVariable, ZeroLazyVariable class WhiteNoiseKernel(Kernel): def __init__(self, variances): super(WhiteNoiseKernel, self).__init__() self.register_buffer("variances", variances) def forward(self, x1, x2): ...
9a2169e38374429db7792537e2c4c1a78281200d
src/application/models.py
src/application/models.py
""" models.py App Engine datastore models """ from google.appengine.ext import ndb class ExampleModel(ndb.Model): """Example Model""" example_name = ndb.StringProperty(required=True) example_description = ndb.TextProperty(required=True) added_by = ndb.UserProperty() timestamp = ndb.DateTimePro...
""" models.py App Engine datastore models """ from google.appengine.ext import ndb class SchoolModel(ndb.Model): """"Basic Model"""" name = ndb.StringProperty(required=True) place = ndb.StringProperty(required=True) added_by = ndb.UserProperty() timestamp = ndb.DateTimeProperty(auto_now_add=Tru...
Add Docstrings and fix basic model
Add Docstrings and fix basic model
Python
mit
shashisp/reWrite-SITA,shashisp/reWrite-SITA,shashisp/reWrite-SITA
""" models.py App Engine datastore models """ from google.appengine.ext import ndb class ExampleModel(ndb.Model): """Example Model""" example_name = ndb.StringProperty(required=True) example_description = ndb.TextProperty(required=True) added_by = ndb.UserProperty() timestamp = ndb.DateTimePro...
""" models.py App Engine datastore models """ from google.appengine.ext import ndb class SchoolModel(ndb.Model): """"Basic Model"""" name = ndb.StringProperty(required=True) place = ndb.StringProperty(required=True) added_by = ndb.UserProperty() timestamp = ndb.DateTimeProperty(auto_now_add=Tru...
<commit_before>""" models.py App Engine datastore models """ from google.appengine.ext import ndb class ExampleModel(ndb.Model): """Example Model""" example_name = ndb.StringProperty(required=True) example_description = ndb.TextProperty(required=True) added_by = ndb.UserProperty() timestamp = ...
""" models.py App Engine datastore models """ from google.appengine.ext import ndb class SchoolModel(ndb.Model): """"Basic Model"""" name = ndb.StringProperty(required=True) place = ndb.StringProperty(required=True) added_by = ndb.UserProperty() timestamp = ndb.DateTimeProperty(auto_now_add=Tru...
""" models.py App Engine datastore models """ from google.appengine.ext import ndb class ExampleModel(ndb.Model): """Example Model""" example_name = ndb.StringProperty(required=True) example_description = ndb.TextProperty(required=True) added_by = ndb.UserProperty() timestamp = ndb.DateTimePro...
<commit_before>""" models.py App Engine datastore models """ from google.appengine.ext import ndb class ExampleModel(ndb.Model): """Example Model""" example_name = ndb.StringProperty(required=True) example_description = ndb.TextProperty(required=True) added_by = ndb.UserProperty() timestamp = ...
08ae805a943be3cdd5e92c050512374180b9ae35
indra/sources/geneways/geneways_api.py
indra/sources/geneways/geneways_api.py
""" This module provides a simplified API for invoking the Geneways input processor , which converts extracted information collected with Geneways into INDRA statements. See publication: Rzhetsky, Andrey, Ivan Iossifov, Tomohiro Koike, Michael Krauthammer, Pauline Kra, Mitzi Morris, Hong Yu et al. "GeneWays: a system ...
""" This module provides a simplified API for invoking the Geneways input processor , which converts extracted information collected with Geneways into INDRA statements. See publication: Rzhetsky, Andrey, Ivan Iossifov, Tomohiro Koike, Michael Krauthammer, Pauline Kra, Mitzi Morris, Hong Yu et al. "GeneWays: a system ...
Update API to look at one folder and return processor
Update API to look at one folder and return processor
Python
bsd-2-clause
pvtodorov/indra,johnbachman/indra,sorgerlab/indra,johnbachman/indra,pvtodorov/indra,pvtodorov/indra,sorgerlab/belpy,johnbachman/belpy,johnbachman/indra,bgyori/indra,bgyori/indra,sorgerlab/belpy,sorgerlab/indra,johnbachman/belpy,sorgerlab/indra,pvtodorov/indra,sorgerlab/belpy,bgyori/indra,johnbachman/belpy
""" This module provides a simplified API for invoking the Geneways input processor , which converts extracted information collected with Geneways into INDRA statements. See publication: Rzhetsky, Andrey, Ivan Iossifov, Tomohiro Koike, Michael Krauthammer, Pauline Kra, Mitzi Morris, Hong Yu et al. "GeneWays: a system ...
""" This module provides a simplified API for invoking the Geneways input processor , which converts extracted information collected with Geneways into INDRA statements. See publication: Rzhetsky, Andrey, Ivan Iossifov, Tomohiro Koike, Michael Krauthammer, Pauline Kra, Mitzi Morris, Hong Yu et al. "GeneWays: a system ...
<commit_before>""" This module provides a simplified API for invoking the Geneways input processor , which converts extracted information collected with Geneways into INDRA statements. See publication: Rzhetsky, Andrey, Ivan Iossifov, Tomohiro Koike, Michael Krauthammer, Pauline Kra, Mitzi Morris, Hong Yu et al. "Gene...
""" This module provides a simplified API for invoking the Geneways input processor , which converts extracted information collected with Geneways into INDRA statements. See publication: Rzhetsky, Andrey, Ivan Iossifov, Tomohiro Koike, Michael Krauthammer, Pauline Kra, Mitzi Morris, Hong Yu et al. "GeneWays: a system ...
""" This module provides a simplified API for invoking the Geneways input processor , which converts extracted information collected with Geneways into INDRA statements. See publication: Rzhetsky, Andrey, Ivan Iossifov, Tomohiro Koike, Michael Krauthammer, Pauline Kra, Mitzi Morris, Hong Yu et al. "GeneWays: a system ...
<commit_before>""" This module provides a simplified API for invoking the Geneways input processor , which converts extracted information collected with Geneways into INDRA statements. See publication: Rzhetsky, Andrey, Ivan Iossifov, Tomohiro Koike, Michael Krauthammer, Pauline Kra, Mitzi Morris, Hong Yu et al. "Gene...
69aa0ec7c79139167e7a2adce1e0effac960755a
flaskrst/__init__.py
flaskrst/__init__.py
# -*- coding: utf-8 -*- """ flask-rstblog ~~~~~~~~~~~~~ :copyright: (c) 2011 by Christoph Heer. :license: BSD, see LICENSE for more details. """ from flask import Flask, url_for app = Flask("flaskrst") @app.context_processor def inject_navigation(): navigation = [] for item in app.config.get...
# -*- coding: utf-8 -*- """ flask-rstblog ~~~~~~~~~~~~~ :copyright: (c) 2011 by Christoph Heer. :license: BSD, see LICENSE for more details. """ from flask import Flask, url_for app = Flask("flaskrst") @app.context_processor def inject_navigation(): navigation = [] for item in app.config.get...
Rename navigation config key name to label and add support for links to external sites over the url key name
Rename navigation config key name to label and add support for links to external sites over the url key name
Python
bsd-3-clause
jarus/flask-rst
# -*- coding: utf-8 -*- """ flask-rstblog ~~~~~~~~~~~~~ :copyright: (c) 2011 by Christoph Heer. :license: BSD, see LICENSE for more details. """ from flask import Flask, url_for app = Flask("flaskrst") @app.context_processor def inject_navigation(): navigation = [] for item in app.config.get...
# -*- coding: utf-8 -*- """ flask-rstblog ~~~~~~~~~~~~~ :copyright: (c) 2011 by Christoph Heer. :license: BSD, see LICENSE for more details. """ from flask import Flask, url_for app = Flask("flaskrst") @app.context_processor def inject_navigation(): navigation = [] for item in app.config.get...
<commit_before># -*- coding: utf-8 -*- """ flask-rstblog ~~~~~~~~~~~~~ :copyright: (c) 2011 by Christoph Heer. :license: BSD, see LICENSE for more details. """ from flask import Flask, url_for app = Flask("flaskrst") @app.context_processor def inject_navigation(): navigation = [] for item in...
# -*- coding: utf-8 -*- """ flask-rstblog ~~~~~~~~~~~~~ :copyright: (c) 2011 by Christoph Heer. :license: BSD, see LICENSE for more details. """ from flask import Flask, url_for app = Flask("flaskrst") @app.context_processor def inject_navigation(): navigation = [] for item in app.config.get...
# -*- coding: utf-8 -*- """ flask-rstblog ~~~~~~~~~~~~~ :copyright: (c) 2011 by Christoph Heer. :license: BSD, see LICENSE for more details. """ from flask import Flask, url_for app = Flask("flaskrst") @app.context_processor def inject_navigation(): navigation = [] for item in app.config.get...
<commit_before># -*- coding: utf-8 -*- """ flask-rstblog ~~~~~~~~~~~~~ :copyright: (c) 2011 by Christoph Heer. :license: BSD, see LICENSE for more details. """ from flask import Flask, url_for app = Flask("flaskrst") @app.context_processor def inject_navigation(): navigation = [] for item in...
5c21f105057f8c5d10721b6de2c5cf698668fd3c
src/events/admin.py
src/events/admin.py
from django.contrib import admin from .models import SponsoredEvent @admin.register(SponsoredEvent) class SponsoredEventAdmin(admin.ModelAdmin): fields = [ 'host', 'title', 'slug', 'category', 'language', 'abstract', 'python_level', 'detailed_description', 'recording_policy', 'slide_link'...
from django.contrib import admin from .models import SponsoredEvent @admin.register(SponsoredEvent) class SponsoredEventAdmin(admin.ModelAdmin): fields = [ 'host', 'title', 'slug', 'category', 'language', 'abstract', 'python_level', 'detailed_description', 'recording_policy', 'slide_link'...
Make host field raw ID instead of select
Make host field raw ID instead of select
Python
mit
pycontw/pycontw2016,pycontw/pycontw2016,pycontw/pycontw2016,pycontw/pycontw2016
from django.contrib import admin from .models import SponsoredEvent @admin.register(SponsoredEvent) class SponsoredEventAdmin(admin.ModelAdmin): fields = [ 'host', 'title', 'slug', 'category', 'language', 'abstract', 'python_level', 'detailed_description', 'recording_policy', 'slide_link'...
from django.contrib import admin from .models import SponsoredEvent @admin.register(SponsoredEvent) class SponsoredEventAdmin(admin.ModelAdmin): fields = [ 'host', 'title', 'slug', 'category', 'language', 'abstract', 'python_level', 'detailed_description', 'recording_policy', 'slide_link'...
<commit_before>from django.contrib import admin from .models import SponsoredEvent @admin.register(SponsoredEvent) class SponsoredEventAdmin(admin.ModelAdmin): fields = [ 'host', 'title', 'slug', 'category', 'language', 'abstract', 'python_level', 'detailed_description', 'recording_policy...
from django.contrib import admin from .models import SponsoredEvent @admin.register(SponsoredEvent) class SponsoredEventAdmin(admin.ModelAdmin): fields = [ 'host', 'title', 'slug', 'category', 'language', 'abstract', 'python_level', 'detailed_description', 'recording_policy', 'slide_link'...
from django.contrib import admin from .models import SponsoredEvent @admin.register(SponsoredEvent) class SponsoredEventAdmin(admin.ModelAdmin): fields = [ 'host', 'title', 'slug', 'category', 'language', 'abstract', 'python_level', 'detailed_description', 'recording_policy', 'slide_link'...
<commit_before>from django.contrib import admin from .models import SponsoredEvent @admin.register(SponsoredEvent) class SponsoredEventAdmin(admin.ModelAdmin): fields = [ 'host', 'title', 'slug', 'category', 'language', 'abstract', 'python_level', 'detailed_description', 'recording_policy...
74e8bf6574ce3658e1b276479c3b6ebec36844a4
kuhn_poker/agents/kuhn_random_agent.py
kuhn_poker/agents/kuhn_random_agent.py
import random import sys import acpc_python_client as acpc class KuhnRandomAgent(acpc.Agent): def __init__(self): super().__init__() def on_game_start(self, game): pass def on_next_turn(self, game, match_state, is_acting_player): if not is_acting_player: return ...
import random import sys import acpc_python_client as acpc class KuhnRandomAgent(acpc.Agent): def __init__(self): super().__init__() def on_game_start(self, game): pass def on_next_turn(self, game, match_state, is_acting_player): if not is_acting_player: return ...
Remove unnecessary log from random agent
Remove unnecessary log from random agent
Python
mit
JakubPetriska/poker-cfr,JakubPetriska/poker-cfr
import random import sys import acpc_python_client as acpc class KuhnRandomAgent(acpc.Agent): def __init__(self): super().__init__() def on_game_start(self, game): pass def on_next_turn(self, game, match_state, is_acting_player): if not is_acting_player: return ...
import random import sys import acpc_python_client as acpc class KuhnRandomAgent(acpc.Agent): def __init__(self): super().__init__() def on_game_start(self, game): pass def on_next_turn(self, game, match_state, is_acting_player): if not is_acting_player: return ...
<commit_before>import random import sys import acpc_python_client as acpc class KuhnRandomAgent(acpc.Agent): def __init__(self): super().__init__() def on_game_start(self, game): pass def on_next_turn(self, game, match_state, is_acting_player): if not is_acting_player: ...
import random import sys import acpc_python_client as acpc class KuhnRandomAgent(acpc.Agent): def __init__(self): super().__init__() def on_game_start(self, game): pass def on_next_turn(self, game, match_state, is_acting_player): if not is_acting_player: return ...
import random import sys import acpc_python_client as acpc class KuhnRandomAgent(acpc.Agent): def __init__(self): super().__init__() def on_game_start(self, game): pass def on_next_turn(self, game, match_state, is_acting_player): if not is_acting_player: return ...
<commit_before>import random import sys import acpc_python_client as acpc class KuhnRandomAgent(acpc.Agent): def __init__(self): super().__init__() def on_game_start(self, game): pass def on_next_turn(self, game, match_state, is_acting_player): if not is_acting_player: ...
fe76abc03f7152f318712e1a233aad42f2e9870a
jsonfield/widgets.py
jsonfield/widgets.py
from django import forms from django.utils import simplejson as json import staticmedia class JSONWidget(forms.Textarea): def render(self, name, value, attrs=None): if value is None: value = "" if not isinstance(value, basestring): value = json.dumps(value, indent=2) ...
from django import forms from django.utils import simplejson as json from django.conf import settings class JSONWidget(forms.Textarea): def render(self, name, value, attrs=None): if value is None: value = "" if not isinstance(value, basestring): value = json.dumps(value, ind...
Use staticfiles instead of staticmedia
Use staticfiles instead of staticmedia
Python
bsd-3-clause
SideStudios/django-jsonfield,chrismeyersfsu/django-jsonfield
from django import forms from django.utils import simplejson as json import staticmedia class JSONWidget(forms.Textarea): def render(self, name, value, attrs=None): if value is None: value = "" if not isinstance(value, basestring): value = json.dumps(value, indent=2) ...
from django import forms from django.utils import simplejson as json from django.conf import settings class JSONWidget(forms.Textarea): def render(self, name, value, attrs=None): if value is None: value = "" if not isinstance(value, basestring): value = json.dumps(value, ind...
<commit_before>from django import forms from django.utils import simplejson as json import staticmedia class JSONWidget(forms.Textarea): def render(self, name, value, attrs=None): if value is None: value = "" if not isinstance(value, basestring): value = json.dumps(value, in...
from django import forms from django.utils import simplejson as json from django.conf import settings class JSONWidget(forms.Textarea): def render(self, name, value, attrs=None): if value is None: value = "" if not isinstance(value, basestring): value = json.dumps(value, ind...
from django import forms from django.utils import simplejson as json import staticmedia class JSONWidget(forms.Textarea): def render(self, name, value, attrs=None): if value is None: value = "" if not isinstance(value, basestring): value = json.dumps(value, indent=2) ...
<commit_before>from django import forms from django.utils import simplejson as json import staticmedia class JSONWidget(forms.Textarea): def render(self, name, value, attrs=None): if value is None: value = "" if not isinstance(value, basestring): value = json.dumps(value, in...
c13208dcc4fe1715db10d86e4dfd584c18f396fa
sympy/calculus/singularities.py
sympy/calculus/singularities.py
from sympy.solvers import solve from sympy.simplify import simplify def singularities(expr, sym): """ Finds singularities for a function. Currently supported functions are: - univariate real rational functions Examples ======== >>> from sympy.calculus.singularities import singularities ...
from sympy.solvers import solve from sympy.solvers.solveset import solveset from sympy.simplify import simplify def singularities(expr, sym): """ Finds singularities for a function. Currently supported functions are: - univariate real rational functions Examples ======== >>> from sympy.c...
Replace solve with solveset in sympy.calculus
Replace solve with solveset in sympy.calculus
Python
bsd-3-clause
skidzo/sympy,chaffra/sympy,pandeyadarsh/sympy,VaibhavAgarwalVA/sympy,abhiii5459/sympy,jbbskinny/sympy,aktech/sympy,lindsayad/sympy,kevalds51/sympy,Titan-C/sympy,hargup/sympy,yukoba/sympy,farhaanbukhsh/sympy,moble/sympy,emon10005/sympy,bukzor/sympy,sahmed95/sympy,mafiya69/sympy,kaushik94/sympy,VaibhavAgarwalVA/sympy,jbb...
from sympy.solvers import solve from sympy.simplify import simplify def singularities(expr, sym): """ Finds singularities for a function. Currently supported functions are: - univariate real rational functions Examples ======== >>> from sympy.calculus.singularities import singularities ...
from sympy.solvers import solve from sympy.solvers.solveset import solveset from sympy.simplify import simplify def singularities(expr, sym): """ Finds singularities for a function. Currently supported functions are: - univariate real rational functions Examples ======== >>> from sympy.c...
<commit_before>from sympy.solvers import solve from sympy.simplify import simplify def singularities(expr, sym): """ Finds singularities for a function. Currently supported functions are: - univariate real rational functions Examples ======== >>> from sympy.calculus.singularities import ...
from sympy.solvers import solve from sympy.solvers.solveset import solveset from sympy.simplify import simplify def singularities(expr, sym): """ Finds singularities for a function. Currently supported functions are: - univariate real rational functions Examples ======== >>> from sympy.c...
from sympy.solvers import solve from sympy.simplify import simplify def singularities(expr, sym): """ Finds singularities for a function. Currently supported functions are: - univariate real rational functions Examples ======== >>> from sympy.calculus.singularities import singularities ...
<commit_before>from sympy.solvers import solve from sympy.simplify import simplify def singularities(expr, sym): """ Finds singularities for a function. Currently supported functions are: - univariate real rational functions Examples ======== >>> from sympy.calculus.singularities import ...
b71f3c726aa6bde4ab0e2b471c5cb9064abfb3fa
apps/webdriver_testing/api_v2/test_user_resources.py
apps/webdriver_testing/api_v2/test_user_resources.py
from apps.webdriver_testing.webdriver_base import WebdriverTestCase from apps.webdriver_testing import data_helpers from apps.webdriver_testing.data_factories import UserFactory class WebdriverTestCaseSubtitlesUpload(WebdriverTestCase): """TestSuite for uploading subtitles via the api. """ def setUp(s...
from apps.webdriver_testing.webdriver_base import WebdriverTestCase from apps.webdriver_testing import data_helpers from apps.webdriver_testing.data_factories import UserFactory class WebdriverTestCaseSubtitlesUpload(WebdriverTestCase): """TestSuite for uploading subtitles via the api. """ def setUp(s...
Fix webdriver user creation bug
Fix webdriver user creation bug
Python
agpl-3.0
eloquence/unisubs,ofer43211/unisubs,eloquence/unisubs,eloquence/unisubs,pculture/unisubs,norayr/unisubs,pculture/unisubs,norayr/unisubs,wevoice/wesub,pculture/unisubs,ujdhesa/unisubs,ofer43211/unisubs,ujdhesa/unisubs,pculture/unisubs,ReachingOut/unisubs,ofer43211/unisubs,wevoice/wesub,ujdhesa/unisubs,wevoice/wesub,Reac...
from apps.webdriver_testing.webdriver_base import WebdriverTestCase from apps.webdriver_testing import data_helpers from apps.webdriver_testing.data_factories import UserFactory class WebdriverTestCaseSubtitlesUpload(WebdriverTestCase): """TestSuite for uploading subtitles via the api. """ def setUp(s...
from apps.webdriver_testing.webdriver_base import WebdriverTestCase from apps.webdriver_testing import data_helpers from apps.webdriver_testing.data_factories import UserFactory class WebdriverTestCaseSubtitlesUpload(WebdriverTestCase): """TestSuite for uploading subtitles via the api. """ def setUp(s...
<commit_before>from apps.webdriver_testing.webdriver_base import WebdriverTestCase from apps.webdriver_testing import data_helpers from apps.webdriver_testing.data_factories import UserFactory class WebdriverTestCaseSubtitlesUpload(WebdriverTestCase): """TestSuite for uploading subtitles via the api. """ ...
from apps.webdriver_testing.webdriver_base import WebdriverTestCase from apps.webdriver_testing import data_helpers from apps.webdriver_testing.data_factories import UserFactory class WebdriverTestCaseSubtitlesUpload(WebdriverTestCase): """TestSuite for uploading subtitles via the api. """ def setUp(s...
from apps.webdriver_testing.webdriver_base import WebdriverTestCase from apps.webdriver_testing import data_helpers from apps.webdriver_testing.data_factories import UserFactory class WebdriverTestCaseSubtitlesUpload(WebdriverTestCase): """TestSuite for uploading subtitles via the api. """ def setUp(s...
<commit_before>from apps.webdriver_testing.webdriver_base import WebdriverTestCase from apps.webdriver_testing import data_helpers from apps.webdriver_testing.data_factories import UserFactory class WebdriverTestCaseSubtitlesUpload(WebdriverTestCase): """TestSuite for uploading subtitles via the api. """ ...
fff33f238d840b89350d50e2349af8f60f298a2a
openprescribing/openprescribing/settings/test.py
openprescribing/openprescribing/settings/test.py
from __future__ import absolute_import import os from .local import * EMAIL_BACKEND = 'django.core.mail.backends.locmem.EmailBackend' if 'TRAVIS' not in os.environ: LOGGING = { 'version': 1, 'disable_existing_loggers': True, 'handlers': { 'file': { 'level': 'DE...
from __future__ import absolute_import import os from .base import * DEBUG = True TEMPLATES[0]['OPTIONS']['debug'] = DEBUG DATABASES = { 'default': { 'ENGINE': 'django.contrib.gis.db.backends.postgis', 'NAME': utils.get_env_setting('DB_NAME'), 'USER': utils.get_env_setting('DB_USER'), ...
Test settings which don't depend on local ones
Test settings which don't depend on local ones By overriding local settings we were cargo-culting things we didn't want. Prefer explicit settings (still using the `base.py` environment as a starting point)
Python
mit
annapowellsmith/openpresc,ebmdatalab/openprescribing,annapowellsmith/openpresc,ebmdatalab/openprescribing,ebmdatalab/openprescribing,ebmdatalab/openprescribing,annapowellsmith/openpresc,annapowellsmith/openpresc
from __future__ import absolute_import import os from .local import * EMAIL_BACKEND = 'django.core.mail.backends.locmem.EmailBackend' if 'TRAVIS' not in os.environ: LOGGING = { 'version': 1, 'disable_existing_loggers': True, 'handlers': { 'file': { 'level': 'DE...
from __future__ import absolute_import import os from .base import * DEBUG = True TEMPLATES[0]['OPTIONS']['debug'] = DEBUG DATABASES = { 'default': { 'ENGINE': 'django.contrib.gis.db.backends.postgis', 'NAME': utils.get_env_setting('DB_NAME'), 'USER': utils.get_env_setting('DB_USER'), ...
<commit_before>from __future__ import absolute_import import os from .local import * EMAIL_BACKEND = 'django.core.mail.backends.locmem.EmailBackend' if 'TRAVIS' not in os.environ: LOGGING = { 'version': 1, 'disable_existing_loggers': True, 'handlers': { 'file': { ...
from __future__ import absolute_import import os from .base import * DEBUG = True TEMPLATES[0]['OPTIONS']['debug'] = DEBUG DATABASES = { 'default': { 'ENGINE': 'django.contrib.gis.db.backends.postgis', 'NAME': utils.get_env_setting('DB_NAME'), 'USER': utils.get_env_setting('DB_USER'), ...
from __future__ import absolute_import import os from .local import * EMAIL_BACKEND = 'django.core.mail.backends.locmem.EmailBackend' if 'TRAVIS' not in os.environ: LOGGING = { 'version': 1, 'disable_existing_loggers': True, 'handlers': { 'file': { 'level': 'DE...
<commit_before>from __future__ import absolute_import import os from .local import * EMAIL_BACKEND = 'django.core.mail.backends.locmem.EmailBackend' if 'TRAVIS' not in os.environ: LOGGING = { 'version': 1, 'disable_existing_loggers': True, 'handlers': { 'file': { ...
236ad637e05ab8ff48b7c169dd54228e48470e1b
mediacloud/mediawords/util/test_sql.py
mediacloud/mediawords/util/test_sql.py
from mediawords.util.sql import * import time import datetime def test_get_sql_date_from_epoch(): assert get_sql_date_from_epoch(int(time.time())) == datetime.datetime.today().strftime('%Y-%m-%d %H:%M:%S') def test_sql_now(): assert sql_now() == datetime.datetime.today().strftime('%Y-%m-%d %H:%M:%S') def...
from mediawords.util.sql import * import time import datetime def test_get_sql_date_from_epoch(): assert get_sql_date_from_epoch(int(time.time())) == datetime.datetime.today().strftime('%Y-%m-%d %H:%M:%S') assert get_sql_date_from_epoch(0) == datetime.datetime.fromtimestamp(0).strftime('%Y-%m-%d %H:%M:%S') ...
Add some more unit tests for get_sql_date_from_epoch()
Add some more unit tests for get_sql_date_from_epoch()
Python
agpl-3.0
berkmancenter/mediacloud,berkmancenter/mediacloud,berkmancenter/mediacloud,berkmancenter/mediacloud,berkmancenter/mediacloud
from mediawords.util.sql import * import time import datetime def test_get_sql_date_from_epoch(): assert get_sql_date_from_epoch(int(time.time())) == datetime.datetime.today().strftime('%Y-%m-%d %H:%M:%S') def test_sql_now(): assert sql_now() == datetime.datetime.today().strftime('%Y-%m-%d %H:%M:%S') def...
from mediawords.util.sql import * import time import datetime def test_get_sql_date_from_epoch(): assert get_sql_date_from_epoch(int(time.time())) == datetime.datetime.today().strftime('%Y-%m-%d %H:%M:%S') assert get_sql_date_from_epoch(0) == datetime.datetime.fromtimestamp(0).strftime('%Y-%m-%d %H:%M:%S') ...
<commit_before>from mediawords.util.sql import * import time import datetime def test_get_sql_date_from_epoch(): assert get_sql_date_from_epoch(int(time.time())) == datetime.datetime.today().strftime('%Y-%m-%d %H:%M:%S') def test_sql_now(): assert sql_now() == datetime.datetime.today().strftime('%Y-%m-%d %...
from mediawords.util.sql import * import time import datetime def test_get_sql_date_from_epoch(): assert get_sql_date_from_epoch(int(time.time())) == datetime.datetime.today().strftime('%Y-%m-%d %H:%M:%S') assert get_sql_date_from_epoch(0) == datetime.datetime.fromtimestamp(0).strftime('%Y-%m-%d %H:%M:%S') ...
from mediawords.util.sql import * import time import datetime def test_get_sql_date_from_epoch(): assert get_sql_date_from_epoch(int(time.time())) == datetime.datetime.today().strftime('%Y-%m-%d %H:%M:%S') def test_sql_now(): assert sql_now() == datetime.datetime.today().strftime('%Y-%m-%d %H:%M:%S') def...
<commit_before>from mediawords.util.sql import * import time import datetime def test_get_sql_date_from_epoch(): assert get_sql_date_from_epoch(int(time.time())) == datetime.datetime.today().strftime('%Y-%m-%d %H:%M:%S') def test_sql_now(): assert sql_now() == datetime.datetime.today().strftime('%Y-%m-%d %...
d2991a6385be74debf71eb8404e362c6027e6d50
molecule/default/tests/test_default.py
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') def test_command(host): assert host.command('i3 --version').rc == 0 assert host.command('pactl --version').rc == 0 assert host.comma...
import os import testinfra.utils.ansible_runner testinfra_hosts = testinfra.utils.ansible_runner.AnsibleRunner( os.environ['MOLECULE_INVENTORY_FILE']).get_hosts('all') def test_command(host): assert host.command('i3 --version').rc == 0 assert host.command('pactl --version').rc == 0
Remove redundant xorg command test
Remove redundant xorg command test
Python
mit
nephelaiio/ansible-role-i3,nephelaiio/ansible-role-i3
import os import testinfra.utils.ansible_runner testinfra_hosts = testinfra.utils.ansible_runner.AnsibleRunner( os.environ['MOLECULE_INVENTORY_FILE']).get_hosts('all') def test_command(host): assert host.command('i3 --version').rc == 0 assert host.command('pactl --version').rc == 0 assert host.comma...
import os import testinfra.utils.ansible_runner testinfra_hosts = testinfra.utils.ansible_runner.AnsibleRunner( os.environ['MOLECULE_INVENTORY_FILE']).get_hosts('all') def test_command(host): assert host.command('i3 --version').rc == 0 assert host.command('pactl --version').rc == 0
<commit_before>import os import testinfra.utils.ansible_runner testinfra_hosts = testinfra.utils.ansible_runner.AnsibleRunner( os.environ['MOLECULE_INVENTORY_FILE']).get_hosts('all') def test_command(host): assert host.command('i3 --version').rc == 0 assert host.command('pactl --version').rc == 0 as...
import os import testinfra.utils.ansible_runner testinfra_hosts = testinfra.utils.ansible_runner.AnsibleRunner( os.environ['MOLECULE_INVENTORY_FILE']).get_hosts('all') def test_command(host): assert host.command('i3 --version').rc == 0 assert host.command('pactl --version').rc == 0
import os import testinfra.utils.ansible_runner testinfra_hosts = testinfra.utils.ansible_runner.AnsibleRunner( os.environ['MOLECULE_INVENTORY_FILE']).get_hosts('all') def test_command(host): assert host.command('i3 --version').rc == 0 assert host.command('pactl --version').rc == 0 assert host.comma...
<commit_before>import os import testinfra.utils.ansible_runner testinfra_hosts = testinfra.utils.ansible_runner.AnsibleRunner( os.environ['MOLECULE_INVENTORY_FILE']).get_hosts('all') def test_command(host): assert host.command('i3 --version').rc == 0 assert host.command('pactl --version').rc == 0 as...
50e62304276c1daa2d0ef03b094f4c444ff995e1
openassessment/workflow/serializers.py
openassessment/workflow/serializers.py
""" Serializers are created to ensure models do not have to be accessed outside the scope of the ORA2 APIs. """ from rest_framework import serializers from openassessment.workflow.models import AssessmentWorkflow, AssessmentWorkflowCancellation class AssessmentWorkflowSerializer(serializers.ModelSerializer): scor...
""" Serializers are created to ensure models do not have to be accessed outside the scope of the ORA2 APIs. """ from rest_framework import serializers from openassessment.workflow.models import AssessmentWorkflow, AssessmentWorkflowCancellation class AssessmentWorkflowSerializer(serializers.ModelSerializer): scor...
Fix display of page after score override.
Fix display of page after score override.
Python
agpl-3.0
Stanford-Online/edx-ora2,Stanford-Online/edx-ora2,Stanford-Online/edx-ora2,Stanford-Online/edx-ora2
""" Serializers are created to ensure models do not have to be accessed outside the scope of the ORA2 APIs. """ from rest_framework import serializers from openassessment.workflow.models import AssessmentWorkflow, AssessmentWorkflowCancellation class AssessmentWorkflowSerializer(serializers.ModelSerializer): scor...
""" Serializers are created to ensure models do not have to be accessed outside the scope of the ORA2 APIs. """ from rest_framework import serializers from openassessment.workflow.models import AssessmentWorkflow, AssessmentWorkflowCancellation class AssessmentWorkflowSerializer(serializers.ModelSerializer): scor...
<commit_before>""" Serializers are created to ensure models do not have to be accessed outside the scope of the ORA2 APIs. """ from rest_framework import serializers from openassessment.workflow.models import AssessmentWorkflow, AssessmentWorkflowCancellation class AssessmentWorkflowSerializer(serializers.ModelSerial...
""" Serializers are created to ensure models do not have to be accessed outside the scope of the ORA2 APIs. """ from rest_framework import serializers from openassessment.workflow.models import AssessmentWorkflow, AssessmentWorkflowCancellation class AssessmentWorkflowSerializer(serializers.ModelSerializer): scor...
""" Serializers are created to ensure models do not have to be accessed outside the scope of the ORA2 APIs. """ from rest_framework import serializers from openassessment.workflow.models import AssessmentWorkflow, AssessmentWorkflowCancellation class AssessmentWorkflowSerializer(serializers.ModelSerializer): scor...
<commit_before>""" Serializers are created to ensure models do not have to be accessed outside the scope of the ORA2 APIs. """ from rest_framework import serializers from openassessment.workflow.models import AssessmentWorkflow, AssessmentWorkflowCancellation class AssessmentWorkflowSerializer(serializers.ModelSerial...
325902c169424ec76307efa71a2e4885180e5cbb
tests/integration/shell/call.py
tests/integration/shell/call.py
# -*- coding: utf-8 -*- """ tests.integration.shell.call ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :copyright: © 2012 UfSoft.org - :email:`Pedro Algarvio ([email protected])` :license: Apache 2.0, see LICENSE for more details. """ import sys # Import salt libs from saltunittest import TestLoader, TextTestRunner i...
# -*- coding: utf-8 -*- """ tests.integration.shell.call ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :copyright: © 2012 UfSoft.org - :email:`Pedro Algarvio ([email protected])` :license: Apache 2.0, see LICENSE for more details. """ import sys # Import salt libs from saltunittest import TestLoader, TextTestRunner, ...
Test to make sure we're outputting kwargs on the user.delete documentation.
Test to make sure we're outputting kwargs on the user.delete documentation.
Python
apache-2.0
saltstack/salt,saltstack/salt,saltstack/salt,saltstack/salt,saltstack/salt
# -*- coding: utf-8 -*- """ tests.integration.shell.call ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :copyright: © 2012 UfSoft.org - :email:`Pedro Algarvio ([email protected])` :license: Apache 2.0, see LICENSE for more details. """ import sys # Import salt libs from saltunittest import TestLoader, TextTestRunner i...
# -*- coding: utf-8 -*- """ tests.integration.shell.call ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :copyright: © 2012 UfSoft.org - :email:`Pedro Algarvio ([email protected])` :license: Apache 2.0, see LICENSE for more details. """ import sys # Import salt libs from saltunittest import TestLoader, TextTestRunner, ...
<commit_before># -*- coding: utf-8 -*- """ tests.integration.shell.call ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :copyright: © 2012 UfSoft.org - :email:`Pedro Algarvio ([email protected])` :license: Apache 2.0, see LICENSE for more details. """ import sys # Import salt libs from saltunittest import TestLoader, T...
# -*- coding: utf-8 -*- """ tests.integration.shell.call ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :copyright: © 2012 UfSoft.org - :email:`Pedro Algarvio ([email protected])` :license: Apache 2.0, see LICENSE for more details. """ import sys # Import salt libs from saltunittest import TestLoader, TextTestRunner, ...
# -*- coding: utf-8 -*- """ tests.integration.shell.call ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :copyright: © 2012 UfSoft.org - :email:`Pedro Algarvio ([email protected])` :license: Apache 2.0, see LICENSE for more details. """ import sys # Import salt libs from saltunittest import TestLoader, TextTestRunner i...
<commit_before># -*- coding: utf-8 -*- """ tests.integration.shell.call ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :copyright: © 2012 UfSoft.org - :email:`Pedro Algarvio ([email protected])` :license: Apache 2.0, see LICENSE for more details. """ import sys # Import salt libs from saltunittest import TestLoader, T...
981bac39056584ec9c16e5a8d0f7a972d7365a3f
tests/test_module_dispatcher.py
tests/test_module_dispatcher.py
import pytest from conftest import (POSITIVE_HOST_PATTERNS, NEGATIVE_HOST_PATTERNS) @pytest.mark.parametrize("host_pattern, num_hosts", POSITIVE_HOST_PATTERNS) def test_len(host_pattern, num_hosts, hosts): assert len(getattr(hosts, host_pattern)) == num_hosts @pytest.mark.parametrize("host_pattern, num_hosts", ...
import pytest from conftest import (POSITIVE_HOST_PATTERNS, NEGATIVE_HOST_PATTERNS) @pytest.mark.parametrize("host_pattern, num_hosts", POSITIVE_HOST_PATTERNS) def test_len(host_pattern, num_hosts, hosts): assert len(getattr(hosts, host_pattern)) == num_hosts @pytest.mark.parametrize("host_pattern, num_hosts", ...
Use more prefered exc_info inspection technique
Use more prefered exc_info inspection technique
Python
mit
jlaska/pytest-ansible
import pytest from conftest import (POSITIVE_HOST_PATTERNS, NEGATIVE_HOST_PATTERNS) @pytest.mark.parametrize("host_pattern, num_hosts", POSITIVE_HOST_PATTERNS) def test_len(host_pattern, num_hosts, hosts): assert len(getattr(hosts, host_pattern)) == num_hosts @pytest.mark.parametrize("host_pattern, num_hosts", ...
import pytest from conftest import (POSITIVE_HOST_PATTERNS, NEGATIVE_HOST_PATTERNS) @pytest.mark.parametrize("host_pattern, num_hosts", POSITIVE_HOST_PATTERNS) def test_len(host_pattern, num_hosts, hosts): assert len(getattr(hosts, host_pattern)) == num_hosts @pytest.mark.parametrize("host_pattern, num_hosts", ...
<commit_before>import pytest from conftest import (POSITIVE_HOST_PATTERNS, NEGATIVE_HOST_PATTERNS) @pytest.mark.parametrize("host_pattern, num_hosts", POSITIVE_HOST_PATTERNS) def test_len(host_pattern, num_hosts, hosts): assert len(getattr(hosts, host_pattern)) == num_hosts @pytest.mark.parametrize("host_patter...
import pytest from conftest import (POSITIVE_HOST_PATTERNS, NEGATIVE_HOST_PATTERNS) @pytest.mark.parametrize("host_pattern, num_hosts", POSITIVE_HOST_PATTERNS) def test_len(host_pattern, num_hosts, hosts): assert len(getattr(hosts, host_pattern)) == num_hosts @pytest.mark.parametrize("host_pattern, num_hosts", ...
import pytest from conftest import (POSITIVE_HOST_PATTERNS, NEGATIVE_HOST_PATTERNS) @pytest.mark.parametrize("host_pattern, num_hosts", POSITIVE_HOST_PATTERNS) def test_len(host_pattern, num_hosts, hosts): assert len(getattr(hosts, host_pattern)) == num_hosts @pytest.mark.parametrize("host_pattern, num_hosts", ...
<commit_before>import pytest from conftest import (POSITIVE_HOST_PATTERNS, NEGATIVE_HOST_PATTERNS) @pytest.mark.parametrize("host_pattern, num_hosts", POSITIVE_HOST_PATTERNS) def test_len(host_pattern, num_hosts, hosts): assert len(getattr(hosts, host_pattern)) == num_hosts @pytest.mark.parametrize("host_patter...
9a1c34c7b3ff4de9dda7d8dbf6fb3234a40dc0b1
src/sas/sasview/__init__.py
src/sas/sasview/__init__.py
from distutils.version import StrictVersion __version__ = "5.0.5a1" StrictVersion(__version__) __DOI__ = "Zenodo, DOI:10.5281/zenodo.4467703" __release_date__ = "2021" __build__ = "GIT_COMMIT"
from distutils.version import StrictVersion __version__ = "5.0.5-alpha.1" StrictVersion(__version__) __DOI__ = "Zenodo, DOI:10.5281/zenodo.4467703" __release_date__ = "2021" __build__ = "GIT_COMMIT"
Revert the version string fix, so the proper fix can be merged without conflict
Revert the version string fix, so the proper fix can be merged without conflict
Python
bsd-3-clause
SasView/sasview,SasView/sasview,SasView/sasview,SasView/sasview,SasView/sasview,SasView/sasview
from distutils.version import StrictVersion __version__ = "5.0.5a1" StrictVersion(__version__) __DOI__ = "Zenodo, DOI:10.5281/zenodo.4467703" __release_date__ = "2021" __build__ = "GIT_COMMIT" Revert the version string fix, so the proper fix can be merged without conflict
from distutils.version import StrictVersion __version__ = "5.0.5-alpha.1" StrictVersion(__version__) __DOI__ = "Zenodo, DOI:10.5281/zenodo.4467703" __release_date__ = "2021" __build__ = "GIT_COMMIT"
<commit_before>from distutils.version import StrictVersion __version__ = "5.0.5a1" StrictVersion(__version__) __DOI__ = "Zenodo, DOI:10.5281/zenodo.4467703" __release_date__ = "2021" __build__ = "GIT_COMMIT" <commit_msg>Revert the version string fix, so the proper fix can be merged without conflict<commit_after>
from distutils.version import StrictVersion __version__ = "5.0.5-alpha.1" StrictVersion(__version__) __DOI__ = "Zenodo, DOI:10.5281/zenodo.4467703" __release_date__ = "2021" __build__ = "GIT_COMMIT"
from distutils.version import StrictVersion __version__ = "5.0.5a1" StrictVersion(__version__) __DOI__ = "Zenodo, DOI:10.5281/zenodo.4467703" __release_date__ = "2021" __build__ = "GIT_COMMIT" Revert the version string fix, so the proper fix can be merged without conflictfrom distutils.version import StrictVersion __ve...
<commit_before>from distutils.version import StrictVersion __version__ = "5.0.5a1" StrictVersion(__version__) __DOI__ = "Zenodo, DOI:10.5281/zenodo.4467703" __release_date__ = "2021" __build__ = "GIT_COMMIT" <commit_msg>Revert the version string fix, so the proper fix can be merged without conflict<commit_after>from di...
ba564c7e2cacc8609d52f03e501786be3c7c8f44
tests/config.py
tests/config.py
import sys sys.path.append("../ideascaly") from ideascaly.auth import AuthNonSSO from ideascaly.api import API import ConfigParser import unittest config = ConfigParser.ConfigParser() config.read('config') class IdeascalyTestCase(unittest.TestCase): def setUp(self): self.auth = create_auth() s...
import sys sys.path.append('../ideascaly') from ideascaly.auth import AuthNonSSO from ideascaly.api import API import unittest testing_community = 'fiveheads.ideascale.com' testing_token = '5b3326f8-50a5-419d-8f02-eef6a42fd61a' class IdeascalyTestCase(unittest.TestCase): def setUp(self): self.auth = c...
Change the way used to read the testing information
Change the way used to read the testing information
Python
mit
joausaga/ideascaly
import sys sys.path.append("../ideascaly") from ideascaly.auth import AuthNonSSO from ideascaly.api import API import ConfigParser import unittest config = ConfigParser.ConfigParser() config.read('config') class IdeascalyTestCase(unittest.TestCase): def setUp(self): self.auth = create_auth() s...
import sys sys.path.append('../ideascaly') from ideascaly.auth import AuthNonSSO from ideascaly.api import API import unittest testing_community = 'fiveheads.ideascale.com' testing_token = '5b3326f8-50a5-419d-8f02-eef6a42fd61a' class IdeascalyTestCase(unittest.TestCase): def setUp(self): self.auth = c...
<commit_before>import sys sys.path.append("../ideascaly") from ideascaly.auth import AuthNonSSO from ideascaly.api import API import ConfigParser import unittest config = ConfigParser.ConfigParser() config.read('config') class IdeascalyTestCase(unittest.TestCase): def setUp(self): self.auth = create_a...
import sys sys.path.append('../ideascaly') from ideascaly.auth import AuthNonSSO from ideascaly.api import API import unittest testing_community = 'fiveheads.ideascale.com' testing_token = '5b3326f8-50a5-419d-8f02-eef6a42fd61a' class IdeascalyTestCase(unittest.TestCase): def setUp(self): self.auth = c...
import sys sys.path.append("../ideascaly") from ideascaly.auth import AuthNonSSO from ideascaly.api import API import ConfigParser import unittest config = ConfigParser.ConfigParser() config.read('config') class IdeascalyTestCase(unittest.TestCase): def setUp(self): self.auth = create_auth() s...
<commit_before>import sys sys.path.append("../ideascaly") from ideascaly.auth import AuthNonSSO from ideascaly.api import API import ConfigParser import unittest config = ConfigParser.ConfigParser() config.read('config') class IdeascalyTestCase(unittest.TestCase): def setUp(self): self.auth = create_a...
d07109e07e4d9fab488dfbbcf56fdfe18baa56ab
lib/python/plow/test/test_static.py
lib/python/plow/test/test_static.py
import unittest import manifest import plow class StaticModuletests(unittest.TestCase): def testFindJobs(self): plow.findJobs() if __name__ == "__main__": suite = unittest.TestLoader().loadTestsFromTestCase(StaticModuletests) unittest.TextTestRunner(verbosity=2).run(suite)
import unittest import manifest import plow class StaticModuletests(unittest.TestCase): def testFindJobs(self): plow.getJobs() def testGetGroupedJobs(self): result = [ {"id": 1, "parent":0, "name": "High"}, {"id": 2, "parent":1, "name": "Foo"} ] for...
Set the column count value based on size of header list.
Set the column count value based on size of header list.
Python
apache-2.0
Br3nda/plow,Br3nda/plow,chadmv/plow,Br3nda/plow,chadmv/plow,chadmv/plow,Br3nda/plow,Br3nda/plow,chadmv/plow,chadmv/plow,chadmv/plow,chadmv/plow
import unittest import manifest import plow class StaticModuletests(unittest.TestCase): def testFindJobs(self): plow.findJobs() if __name__ == "__main__": suite = unittest.TestLoader().loadTestsFromTestCase(StaticModuletests) unittest.TextTestRunner(verbosity=2).run(suite) Set the column count ...
import unittest import manifest import plow class StaticModuletests(unittest.TestCase): def testFindJobs(self): plow.getJobs() def testGetGroupedJobs(self): result = [ {"id": 1, "parent":0, "name": "High"}, {"id": 2, "parent":1, "name": "Foo"} ] for...
<commit_before>import unittest import manifest import plow class StaticModuletests(unittest.TestCase): def testFindJobs(self): plow.findJobs() if __name__ == "__main__": suite = unittest.TestLoader().loadTestsFromTestCase(StaticModuletests) unittest.TextTestRunner(verbosity=2).run(suite) <commi...
import unittest import manifest import plow class StaticModuletests(unittest.TestCase): def testFindJobs(self): plow.getJobs() def testGetGroupedJobs(self): result = [ {"id": 1, "parent":0, "name": "High"}, {"id": 2, "parent":1, "name": "Foo"} ] for...
import unittest import manifest import plow class StaticModuletests(unittest.TestCase): def testFindJobs(self): plow.findJobs() if __name__ == "__main__": suite = unittest.TestLoader().loadTestsFromTestCase(StaticModuletests) unittest.TextTestRunner(verbosity=2).run(suite) Set the column count ...
<commit_before>import unittest import manifest import plow class StaticModuletests(unittest.TestCase): def testFindJobs(self): plow.findJobs() if __name__ == "__main__": suite = unittest.TestLoader().loadTestsFromTestCase(StaticModuletests) unittest.TextTestRunner(verbosity=2).run(suite) <commi...
189c7a7c982739cd7a3026e34a9969ea9278a12b
api/data/src/lib/middleware.py
api/data/src/lib/middleware.py
import os import re class SetBaseEnv(object): """ Figure out which port we are on if we are running and set it. So that the links will be correct. Not sure if we need this always... """ def __init__(self, get_response): self.get_response = get_response def __call__(self, request...
import os class SetBaseEnv(object): """ Figure out which port we are on if we are running and set it. So that the links will be correct. Not sure if we need this always... """ def __init__(self, get_response): self.get_response = get_response def __call__(self, request): ...
Fix so we can do :5000 queries from api container
Fix so we can do :5000 queries from api container
Python
mit
xeor/hohu,xeor/hohu,xeor/hohu,xeor/hohu
import os import re class SetBaseEnv(object): """ Figure out which port we are on if we are running and set it. So that the links will be correct. Not sure if we need this always... """ def __init__(self, get_response): self.get_response = get_response def __call__(self, request...
import os class SetBaseEnv(object): """ Figure out which port we are on if we are running and set it. So that the links will be correct. Not sure if we need this always... """ def __init__(self, get_response): self.get_response = get_response def __call__(self, request): ...
<commit_before>import os import re class SetBaseEnv(object): """ Figure out which port we are on if we are running and set it. So that the links will be correct. Not sure if we need this always... """ def __init__(self, get_response): self.get_response = get_response def __call_...
import os class SetBaseEnv(object): """ Figure out which port we are on if we are running and set it. So that the links will be correct. Not sure if we need this always... """ def __init__(self, get_response): self.get_response = get_response def __call__(self, request): ...
import os import re class SetBaseEnv(object): """ Figure out which port we are on if we are running and set it. So that the links will be correct. Not sure if we need this always... """ def __init__(self, get_response): self.get_response = get_response def __call__(self, request...
<commit_before>import os import re class SetBaseEnv(object): """ Figure out which port we are on if we are running and set it. So that the links will be correct. Not sure if we need this always... """ def __init__(self, get_response): self.get_response = get_response def __call_...
e0c70b2b20349b8f1c0f6df8cc641c3267a63a06
crypto.py
crypto.py
""" Sending a message: Encrypt your plaintext with encrypt_message Your id will serve as your public key Reading a message Use decrypt_message and validate contents """ from Crypto.PublicKey import RSA # Generates and writes byte string with object of RSA key object def create_key(): key = RSA.genera...
""" Sending a message: Encrypt your plaintext with encrypt_message Your id will serve as your public key Reading a message Use decrypt_message and validate contents """ from Crypto.PublicKey import RSA # Generates and writes byte string with object of RSA key object def create_key(): key = RSA.genera...
Use 'with ... as ...' for file opening. Standardize variable names.
Use 'with ... as ...' for file opening. Standardize variable names.
Python
mit
Tribler/decentral-market
""" Sending a message: Encrypt your plaintext with encrypt_message Your id will serve as your public key Reading a message Use decrypt_message and validate contents """ from Crypto.PublicKey import RSA # Generates and writes byte string with object of RSA key object def create_key(): key = RSA.genera...
""" Sending a message: Encrypt your plaintext with encrypt_message Your id will serve as your public key Reading a message Use decrypt_message and validate contents """ from Crypto.PublicKey import RSA # Generates and writes byte string with object of RSA key object def create_key(): key = RSA.genera...
<commit_before>""" Sending a message: Encrypt your plaintext with encrypt_message Your id will serve as your public key Reading a message Use decrypt_message and validate contents """ from Crypto.PublicKey import RSA # Generates and writes byte string with object of RSA key object def create_key(): k...
""" Sending a message: Encrypt your plaintext with encrypt_message Your id will serve as your public key Reading a message Use decrypt_message and validate contents """ from Crypto.PublicKey import RSA # Generates and writes byte string with object of RSA key object def create_key(): key = RSA.genera...
""" Sending a message: Encrypt your plaintext with encrypt_message Your id will serve as your public key Reading a message Use decrypt_message and validate contents """ from Crypto.PublicKey import RSA # Generates and writes byte string with object of RSA key object def create_key(): key = RSA.genera...
<commit_before>""" Sending a message: Encrypt your plaintext with encrypt_message Your id will serve as your public key Reading a message Use decrypt_message and validate contents """ from Crypto.PublicKey import RSA # Generates and writes byte string with object of RSA key object def create_key(): k...
ca0b10484ca92709be4b30b2aab7079a2f4a2fe1
tracker.py
tracker.py
import sys from tweepy.streaming import StreamListener from tweepy import OAuthHandler from tweepy import Stream import tweepy #Get Hashtag to track argTag = sys.argv[1] #Class for listening to all tweets class TweetListener(StreamListener): def on_status(self, status): print status.created_at #W...
import sys from tweepy.streaming import StreamListener from tweepy import OAuthHandler from tweepy import Stream import tweepy #Get String to track on argTag = sys.argv[1] #Class for listening to all tweets class TweetListener(StreamListener): def on_status(self, status): print status.created_at ...
Change comments to make sense
Change comments to make sense
Python
mit
tim-thompson/TweetTimeTracker
import sys from tweepy.streaming import StreamListener from tweepy import OAuthHandler from tweepy import Stream import tweepy #Get Hashtag to track argTag = sys.argv[1] #Class for listening to all tweets class TweetListener(StreamListener): def on_status(self, status): print status.created_at #W...
import sys from tweepy.streaming import StreamListener from tweepy import OAuthHandler from tweepy import Stream import tweepy #Get String to track on argTag = sys.argv[1] #Class for listening to all tweets class TweetListener(StreamListener): def on_status(self, status): print status.created_at ...
<commit_before>import sys from tweepy.streaming import StreamListener from tweepy import OAuthHandler from tweepy import Stream import tweepy #Get Hashtag to track argTag = sys.argv[1] #Class for listening to all tweets class TweetListener(StreamListener): def on_status(self, status): print status.created...
import sys from tweepy.streaming import StreamListener from tweepy import OAuthHandler from tweepy import Stream import tweepy #Get String to track on argTag = sys.argv[1] #Class for listening to all tweets class TweetListener(StreamListener): def on_status(self, status): print status.created_at ...
import sys from tweepy.streaming import StreamListener from tweepy import OAuthHandler from tweepy import Stream import tweepy #Get Hashtag to track argTag = sys.argv[1] #Class for listening to all tweets class TweetListener(StreamListener): def on_status(self, status): print status.created_at #W...
<commit_before>import sys from tweepy.streaming import StreamListener from tweepy import OAuthHandler from tweepy import Stream import tweepy #Get Hashtag to track argTag = sys.argv[1] #Class for listening to all tweets class TweetListener(StreamListener): def on_status(self, status): print status.created...
3b568b0343e1cbf9256caa181c672449faf01ddc
pavement.py
pavement.py
from paver.easy import * import paver.doctools from paver.setuputils import setup @task def dumpdb(): print "Downloading data from App Engine" sh("python2.5 ../../google_appengine/bulkloader.py --dump --app_id=zongo [email protected] --url=http://www.zongosound.com/remote_api --filename=data.csv"...
from paver.easy import * import paver.doctools from paver.setuputils import setup @task def dumpdb(): print "Downloading data from App Engine" sh("python2.5 ../../lib/google_appengine/bulkloader.py --dump --app_id=zongo [email protected] --url=http://www.zongosound.com/remote_api --filename=data....
Adjust path to GAE DSK
Adjust path to GAE DSK
Python
bsd-3-clause
amarandon/zongo-engine,amarandon/zongo-engine,amarandon/zongo-engine
from paver.easy import * import paver.doctools from paver.setuputils import setup @task def dumpdb(): print "Downloading data from App Engine" sh("python2.5 ../../google_appengine/bulkloader.py --dump --app_id=zongo [email protected] --url=http://www.zongosound.com/remote_api --filename=data.csv"...
from paver.easy import * import paver.doctools from paver.setuputils import setup @task def dumpdb(): print "Downloading data from App Engine" sh("python2.5 ../../lib/google_appengine/bulkloader.py --dump --app_id=zongo [email protected] --url=http://www.zongosound.com/remote_api --filename=data....
<commit_before>from paver.easy import * import paver.doctools from paver.setuputils import setup @task def dumpdb(): print "Downloading data from App Engine" sh("python2.5 ../../google_appengine/bulkloader.py --dump --app_id=zongo [email protected] --url=http://www.zongosound.com/remote_api --fil...
from paver.easy import * import paver.doctools from paver.setuputils import setup @task def dumpdb(): print "Downloading data from App Engine" sh("python2.5 ../../lib/google_appengine/bulkloader.py --dump --app_id=zongo [email protected] --url=http://www.zongosound.com/remote_api --filename=data....
from paver.easy import * import paver.doctools from paver.setuputils import setup @task def dumpdb(): print "Downloading data from App Engine" sh("python2.5 ../../google_appengine/bulkloader.py --dump --app_id=zongo [email protected] --url=http://www.zongosound.com/remote_api --filename=data.csv"...
<commit_before>from paver.easy import * import paver.doctools from paver.setuputils import setup @task def dumpdb(): print "Downloading data from App Engine" sh("python2.5 ../../google_appengine/bulkloader.py --dump --app_id=zongo [email protected] --url=http://www.zongosound.com/remote_api --fil...
f75e245f461e57cc868ee5452c88aea92b6681bf
chainer/functions/parameter.py
chainer/functions/parameter.py
import numpy from chainer import function class Parameter(function.Function): """Function that outputs its weight array. This is a parameterized function that takes no input and returns a variable holding a shallow copy of the parameter array. Args: array: Initial parameter array. """...
import numpy from chainer import function from chainer.utils import type_check class Parameter(function.Function): """Function that outputs its weight array. This is a parameterized function that takes no input and returns a variable holding a shallow copy of the parameter array. Args: arr...
Add typecheck to Parameter function
Add typecheck to Parameter function
Python
mit
t-abe/chainer,chainer/chainer,pfnet/chainer,jnishi/chainer,sou81821/chainer,ikasumi/chainer,tigerneil/chainer,delta2323/chainer,1986ks/chainer,chainer/chainer,yanweifu/chainer,ronekko/chainer,muupan/chainer,truongdq/chainer,chainer/chainer,muupan/chainer,okuta/chainer,jnishi/chainer,anaruse/chainer,hvy/chainer,cupy/cup...
import numpy from chainer import function class Parameter(function.Function): """Function that outputs its weight array. This is a parameterized function that takes no input and returns a variable holding a shallow copy of the parameter array. Args: array: Initial parameter array. """...
import numpy from chainer import function from chainer.utils import type_check class Parameter(function.Function): """Function that outputs its weight array. This is a parameterized function that takes no input and returns a variable holding a shallow copy of the parameter array. Args: arr...
<commit_before>import numpy from chainer import function class Parameter(function.Function): """Function that outputs its weight array. This is a parameterized function that takes no input and returns a variable holding a shallow copy of the parameter array. Args: array: Initial parameter ...
import numpy from chainer import function from chainer.utils import type_check class Parameter(function.Function): """Function that outputs its weight array. This is a parameterized function that takes no input and returns a variable holding a shallow copy of the parameter array. Args: arr...
import numpy from chainer import function class Parameter(function.Function): """Function that outputs its weight array. This is a parameterized function that takes no input and returns a variable holding a shallow copy of the parameter array. Args: array: Initial parameter array. """...
<commit_before>import numpy from chainer import function class Parameter(function.Function): """Function that outputs its weight array. This is a parameterized function that takes no input and returns a variable holding a shallow copy of the parameter array. Args: array: Initial parameter ...
3cf9473bdf1714460478b4cd36a54b09b2a57173
lib/feedeater/validate.py
lib/feedeater/validate.py
"""Validate GTFS""" import os import mzgtfs.feed import mzgtfs.validation import task class FeedEaterValidate(task.FeedEaterTask): def run(self): # Validate feeds self.log("===== Feed: %s ====="%self.feedid) feed = self.registry.feed(self.feedid) filename = self.filename or os.path.join(self.workdi...
"""Validate GTFS""" import os import mzgtfs.feed import mzgtfs.validation import task class FeedEaterValidate(task.FeedEaterTask): def __init__(self, *args, **kwargs): super(FeedEaterValidate, self).__init__(*args, **kwargs) self.feedvalidator = kwargs.get('feedvalidator') def parser(self): parser =...
Add --feedvaldiator option to validator
Add --feedvaldiator option to validator
Python
mit
transitland/transitland-datastore,transitland/transitland-datastore,transitland/transitland-datastore,brechtvdv/transitland-datastore,brechtvdv/transitland-datastore,brechtvdv/transitland-datastore
"""Validate GTFS""" import os import mzgtfs.feed import mzgtfs.validation import task class FeedEaterValidate(task.FeedEaterTask): def run(self): # Validate feeds self.log("===== Feed: %s ====="%self.feedid) feed = self.registry.feed(self.feedid) filename = self.filename or os.path.join(self.workdi...
"""Validate GTFS""" import os import mzgtfs.feed import mzgtfs.validation import task class FeedEaterValidate(task.FeedEaterTask): def __init__(self, *args, **kwargs): super(FeedEaterValidate, self).__init__(*args, **kwargs) self.feedvalidator = kwargs.get('feedvalidator') def parser(self): parser =...
<commit_before>"""Validate GTFS""" import os import mzgtfs.feed import mzgtfs.validation import task class FeedEaterValidate(task.FeedEaterTask): def run(self): # Validate feeds self.log("===== Feed: %s ====="%self.feedid) feed = self.registry.feed(self.feedid) filename = self.filename or os.path.j...
"""Validate GTFS""" import os import mzgtfs.feed import mzgtfs.validation import task class FeedEaterValidate(task.FeedEaterTask): def __init__(self, *args, **kwargs): super(FeedEaterValidate, self).__init__(*args, **kwargs) self.feedvalidator = kwargs.get('feedvalidator') def parser(self): parser =...
"""Validate GTFS""" import os import mzgtfs.feed import mzgtfs.validation import task class FeedEaterValidate(task.FeedEaterTask): def run(self): # Validate feeds self.log("===== Feed: %s ====="%self.feedid) feed = self.registry.feed(self.feedid) filename = self.filename or os.path.join(self.workdi...
<commit_before>"""Validate GTFS""" import os import mzgtfs.feed import mzgtfs.validation import task class FeedEaterValidate(task.FeedEaterTask): def run(self): # Validate feeds self.log("===== Feed: %s ====="%self.feedid) feed = self.registry.feed(self.feedid) filename = self.filename or os.path.j...
d1174017c6b282aa1d808b784ffde8a3d3190472
fabfile.py
fabfile.py
# -*- coding: utf-8 -*- """Generic Fabric-commands which should be usable without further configuration""" from fabric.api import * from os.path import dirname, split, abspath import os import sys import glob # Hacking our way into __init__.py of current package current_dir = dirname(abspath(__file__)) sys_path, pack...
# -*- coding: utf-8 -*- """Generic Fabric-commands which should be usable without further configuration""" from fabric.api import * from os.path import dirname, split, abspath import os import sys import glob # Hacking our way into __init__.py of current package current_dir = dirname(abspath(__file__)) sys_path, pack...
Allow running tasks even if roledefs.pickle is missing
Allow running tasks even if roledefs.pickle is missing Signed-off-by: Samuli Seppänen <[email protected]>
Python
bsd-2-clause
mattock/fabric,mattock/fabric
# -*- coding: utf-8 -*- """Generic Fabric-commands which should be usable without further configuration""" from fabric.api import * from os.path import dirname, split, abspath import os import sys import glob # Hacking our way into __init__.py of current package current_dir = dirname(abspath(__file__)) sys_path, pack...
# -*- coding: utf-8 -*- """Generic Fabric-commands which should be usable without further configuration""" from fabric.api import * from os.path import dirname, split, abspath import os import sys import glob # Hacking our way into __init__.py of current package current_dir = dirname(abspath(__file__)) sys_path, pack...
<commit_before># -*- coding: utf-8 -*- """Generic Fabric-commands which should be usable without further configuration""" from fabric.api import * from os.path import dirname, split, abspath import os import sys import glob # Hacking our way into __init__.py of current package current_dir = dirname(abspath(__file__))...
# -*- coding: utf-8 -*- """Generic Fabric-commands which should be usable without further configuration""" from fabric.api import * from os.path import dirname, split, abspath import os import sys import glob # Hacking our way into __init__.py of current package current_dir = dirname(abspath(__file__)) sys_path, pack...
# -*- coding: utf-8 -*- """Generic Fabric-commands which should be usable without further configuration""" from fabric.api import * from os.path import dirname, split, abspath import os import sys import glob # Hacking our way into __init__.py of current package current_dir = dirname(abspath(__file__)) sys_path, pack...
<commit_before># -*- coding: utf-8 -*- """Generic Fabric-commands which should be usable without further configuration""" from fabric.api import * from os.path import dirname, split, abspath import os import sys import glob # Hacking our way into __init__.py of current package current_dir = dirname(abspath(__file__))...
3f394e47841b2d9e49554b21c67b06a46f99f25c
celery_app.py
celery_app.py
# -*- encoding: utf-8 -*- import config import logging from celery.schedules import crontab from lazyblacksmith.app import create_app from lazyblacksmith.extension.celery_app import celery_app # disable / enable loggers we want logging.getLogger('pyswagger').setLevel(logging.ERROR) app = create_app(config) app.app...
# -*- encoding: utf-8 -*- import config import logging from celery.schedules import crontab from lazyblacksmith.app import create_app from lazyblacksmith.extension.celery_app import celery_app # disable / enable loggers we want logging.getLogger('pyswagger').setLevel(logging.ERROR) app = create_app(config) app.app...
Add corporation task in celery data
Add corporation task in celery data
Python
bsd-3-clause
Kyria/LazyBlacksmith,Kyria/LazyBlacksmith,Kyria/LazyBlacksmith,Kyria/LazyBlacksmith
# -*- encoding: utf-8 -*- import config import logging from celery.schedules import crontab from lazyblacksmith.app import create_app from lazyblacksmith.extension.celery_app import celery_app # disable / enable loggers we want logging.getLogger('pyswagger').setLevel(logging.ERROR) app = create_app(config) app.app...
# -*- encoding: utf-8 -*- import config import logging from celery.schedules import crontab from lazyblacksmith.app import create_app from lazyblacksmith.extension.celery_app import celery_app # disable / enable loggers we want logging.getLogger('pyswagger').setLevel(logging.ERROR) app = create_app(config) app.app...
<commit_before># -*- encoding: utf-8 -*- import config import logging from celery.schedules import crontab from lazyblacksmith.app import create_app from lazyblacksmith.extension.celery_app import celery_app # disable / enable loggers we want logging.getLogger('pyswagger').setLevel(logging.ERROR) app = create_app(...
# -*- encoding: utf-8 -*- import config import logging from celery.schedules import crontab from lazyblacksmith.app import create_app from lazyblacksmith.extension.celery_app import celery_app # disable / enable loggers we want logging.getLogger('pyswagger').setLevel(logging.ERROR) app = create_app(config) app.app...
# -*- encoding: utf-8 -*- import config import logging from celery.schedules import crontab from lazyblacksmith.app import create_app from lazyblacksmith.extension.celery_app import celery_app # disable / enable loggers we want logging.getLogger('pyswagger').setLevel(logging.ERROR) app = create_app(config) app.app...
<commit_before># -*- encoding: utf-8 -*- import config import logging from celery.schedules import crontab from lazyblacksmith.app import create_app from lazyblacksmith.extension.celery_app import celery_app # disable / enable loggers we want logging.getLogger('pyswagger').setLevel(logging.ERROR) app = create_app(...
35c47f00f914935bd886c0b28ef618f451abc3b3
local_settings_example.py
local_settings_example.py
DEBUG = True TEMPLATE_DEBUG = DEBUG ADMINS = ( # ('Your Name', '[email protected]'), ) DATABASES = { 'default': { 'ENGINE': 'django.db.backends.postgresql_psycopg2', 'NAME': '', 'USER': '', 'PASSWORD': '', 'HOST': '', } } TIME_ZONE = 'Europe/Paris' LANGUAGE_CO...
import os PROJECT_DIR = os.path.abspath(os.path.dirname(__file__)) DEBUG = True TEMPLATE_DEBUG = DEBUG ADMINS = ( # ('Your Name', '[email protected]'), ) DATABASES = { 'default': { 'ENGINE': 'django.db.backends.postgresql_psycopg2', 'NAME': '', 'USER': '', 'PASSWORD': '',...
Update settings example for tpl directories and other stuff
Update settings example for tpl directories and other stuff
Python
bsd-3-clause
RocknRoot/LIIT
DEBUG = True TEMPLATE_DEBUG = DEBUG ADMINS = ( # ('Your Name', '[email protected]'), ) DATABASES = { 'default': { 'ENGINE': 'django.db.backends.postgresql_psycopg2', 'NAME': '', 'USER': '', 'PASSWORD': '', 'HOST': '', } } TIME_ZONE = 'Europe/Paris' LANGUAGE_CO...
import os PROJECT_DIR = os.path.abspath(os.path.dirname(__file__)) DEBUG = True TEMPLATE_DEBUG = DEBUG ADMINS = ( # ('Your Name', '[email protected]'), ) DATABASES = { 'default': { 'ENGINE': 'django.db.backends.postgresql_psycopg2', 'NAME': '', 'USER': '', 'PASSWORD': '',...
<commit_before>DEBUG = True TEMPLATE_DEBUG = DEBUG ADMINS = ( # ('Your Name', '[email protected]'), ) DATABASES = { 'default': { 'ENGINE': 'django.db.backends.postgresql_psycopg2', 'NAME': '', 'USER': '', 'PASSWORD': '', 'HOST': '', } } TIME_ZONE = 'Europe/Par...
import os PROJECT_DIR = os.path.abspath(os.path.dirname(__file__)) DEBUG = True TEMPLATE_DEBUG = DEBUG ADMINS = ( # ('Your Name', '[email protected]'), ) DATABASES = { 'default': { 'ENGINE': 'django.db.backends.postgresql_psycopg2', 'NAME': '', 'USER': '', 'PASSWORD': '',...
DEBUG = True TEMPLATE_DEBUG = DEBUG ADMINS = ( # ('Your Name', '[email protected]'), ) DATABASES = { 'default': { 'ENGINE': 'django.db.backends.postgresql_psycopg2', 'NAME': '', 'USER': '', 'PASSWORD': '', 'HOST': '', } } TIME_ZONE = 'Europe/Paris' LANGUAGE_CO...
<commit_before>DEBUG = True TEMPLATE_DEBUG = DEBUG ADMINS = ( # ('Your Name', '[email protected]'), ) DATABASES = { 'default': { 'ENGINE': 'django.db.backends.postgresql_psycopg2', 'NAME': '', 'USER': '', 'PASSWORD': '', 'HOST': '', } } TIME_ZONE = 'Europe/Par...
9d94a753c4824df210753996edaa9f7910df5fa8
tests/test_sample_app.py
tests/test_sample_app.py
import pytest @pytest.fixture def app(): import sys sys.path.append('.') from sample_app import create_app return create_app() @pytest.fixture def client(app): return app.test_client() def test_index(client): client.get('/')
import pytest @pytest.fixture def app(): import sys sys.path.append('.') from sample_app import create_app return create_app() @pytest.fixture def client(app): return app.test_client() def test_index(client): resp = client.get('/') assert resp.status == 200
Check for status code of 200 in sample app.
Check for status code of 200 in sample app.
Python
apache-2.0
JingZhou0404/flask-bootstrap,scorpiovn/flask-bootstrap,suvorom/flask-bootstrap,BeardedSteve/flask-bootstrap,ser/flask-bootstrap,suvorom/flask-bootstrap,victorbjorklund/flask-bootstrap,BeardedSteve/flask-bootstrap,ser/flask-bootstrap,livepy/flask-bootstrap,victorbjorklund/flask-bootstrap,dingocuster/flask-bootstrap,Coxi...
import pytest @pytest.fixture def app(): import sys sys.path.append('.') from sample_app import create_app return create_app() @pytest.fixture def client(app): return app.test_client() def test_index(client): client.get('/') Check for status code of 200 in sample app.
import pytest @pytest.fixture def app(): import sys sys.path.append('.') from sample_app import create_app return create_app() @pytest.fixture def client(app): return app.test_client() def test_index(client): resp = client.get('/') assert resp.status == 200
<commit_before>import pytest @pytest.fixture def app(): import sys sys.path.append('.') from sample_app import create_app return create_app() @pytest.fixture def client(app): return app.test_client() def test_index(client): client.get('/') <commit_msg>Check for status code of 200 in samp...
import pytest @pytest.fixture def app(): import sys sys.path.append('.') from sample_app import create_app return create_app() @pytest.fixture def client(app): return app.test_client() def test_index(client): resp = client.get('/') assert resp.status == 200
import pytest @pytest.fixture def app(): import sys sys.path.append('.') from sample_app import create_app return create_app() @pytest.fixture def client(app): return app.test_client() def test_index(client): client.get('/') Check for status code of 200 in sample app.import pytest @pyt...
<commit_before>import pytest @pytest.fixture def app(): import sys sys.path.append('.') from sample_app import create_app return create_app() @pytest.fixture def client(app): return app.test_client() def test_index(client): client.get('/') <commit_msg>Check for status code of 200 in samp...
f48afc99a7e7aa076aa27b33deda824b5509bab2
test_qt_helpers_qt5.py
test_qt_helpers_qt5.py
from __future__ import absolute_import, division, print_function import os import sys import pytest from mock import MagicMock # At the moment it is not possible to have PyQt5 and PyQt4 installed # simultaneously because one requires the Qt4 libraries while the other # requires the Qt5 libraries class TestQT5(obj...
from __future__ import absolute_import, division, print_function import os import sys import pytest from mock import MagicMock # At the moment it is not possible to have PyQt5 and PyQt4 installed # simultaneously because one requires the Qt4 libraries while the other # requires the Qt5 libraries class TestQT5(obje...
Comment out problematic test for now
Comment out problematic test for now
Python
bsd-3-clause
glue-viz/qt-helpers
from __future__ import absolute_import, division, print_function import os import sys import pytest from mock import MagicMock # At the moment it is not possible to have PyQt5 and PyQt4 installed # simultaneously because one requires the Qt4 libraries while the other # requires the Qt5 libraries class TestQT5(obj...
from __future__ import absolute_import, division, print_function import os import sys import pytest from mock import MagicMock # At the moment it is not possible to have PyQt5 and PyQt4 installed # simultaneously because one requires the Qt4 libraries while the other # requires the Qt5 libraries class TestQT5(obje...
<commit_before>from __future__ import absolute_import, division, print_function import os import sys import pytest from mock import MagicMock # At the moment it is not possible to have PyQt5 and PyQt4 installed # simultaneously because one requires the Qt4 libraries while the other # requires the Qt5 libraries cl...
from __future__ import absolute_import, division, print_function import os import sys import pytest from mock import MagicMock # At the moment it is not possible to have PyQt5 and PyQt4 installed # simultaneously because one requires the Qt4 libraries while the other # requires the Qt5 libraries class TestQT5(obje...
from __future__ import absolute_import, division, print_function import os import sys import pytest from mock import MagicMock # At the moment it is not possible to have PyQt5 and PyQt4 installed # simultaneously because one requires the Qt4 libraries while the other # requires the Qt5 libraries class TestQT5(obj...
<commit_before>from __future__ import absolute_import, division, print_function import os import sys import pytest from mock import MagicMock # At the moment it is not possible to have PyQt5 and PyQt4 installed # simultaneously because one requires the Qt4 libraries while the other # requires the Qt5 libraries cl...
15fe43d0be3c665c09c898864bd2815b39fbc8a5
toolbox/config/common.py
toolbox/config/common.py
CURRENT_MIN_VERSION = 'v3.0' CURRENT_MAX_VERSION = 'v3.1' ACTIVE_REMOTE_BRANCHES = ['master', 'staging', 'demo'] DEFAULT_COMMAND_TIMEOUT = 60 * 60 CONTROLLER_PROTOCOL = 'controller' PROTOCOLS = {'udp', 'tcp', 'ssh', 'http', 'ws', CONTROLLER_PROTOCOL} CRP_TYPES = {'docker', 'gce', 'static'}
CURRENT_MIN_VERSION = 'v3.0' CURRENT_MAX_VERSION = 'v3.1' # Once the Next platform supports challenge versions this can be extended. ACTIVE_REMOTE_BRANCHES = ['master'] DEFAULT_COMMAND_TIMEOUT = 60 * 60 CONTROLLER_PROTOCOL = 'controller' PROTOCOLS = {'udp', 'tcp', 'ssh', 'http', 'ws', CONTROLLER_PROTOCOL} CRP_TYPES =...
Change v3 active branches to
Change v3 active branches to [master] Extend the list when it becomes relevant. The old platform shall use the legacy branch.
Python
apache-2.0
avatao-content/challenge-toolbox,avatao-content/challenge-toolbox,avatao-content/challenge-toolbox,avatao-content/challenge-toolbox,avatao-content/challenge-toolbox,avatao-content/challenge-toolbox,avatao-content/challenge-toolbox,avatao-content/challenge-toolbox,avatao-content/challenge-toolbox
CURRENT_MIN_VERSION = 'v3.0' CURRENT_MAX_VERSION = 'v3.1' ACTIVE_REMOTE_BRANCHES = ['master', 'staging', 'demo'] DEFAULT_COMMAND_TIMEOUT = 60 * 60 CONTROLLER_PROTOCOL = 'controller' PROTOCOLS = {'udp', 'tcp', 'ssh', 'http', 'ws', CONTROLLER_PROTOCOL} CRP_TYPES = {'docker', 'gce', 'static'} Change v3 active branches t...
CURRENT_MIN_VERSION = 'v3.0' CURRENT_MAX_VERSION = 'v3.1' # Once the Next platform supports challenge versions this can be extended. ACTIVE_REMOTE_BRANCHES = ['master'] DEFAULT_COMMAND_TIMEOUT = 60 * 60 CONTROLLER_PROTOCOL = 'controller' PROTOCOLS = {'udp', 'tcp', 'ssh', 'http', 'ws', CONTROLLER_PROTOCOL} CRP_TYPES =...
<commit_before>CURRENT_MIN_VERSION = 'v3.0' CURRENT_MAX_VERSION = 'v3.1' ACTIVE_REMOTE_BRANCHES = ['master', 'staging', 'demo'] DEFAULT_COMMAND_TIMEOUT = 60 * 60 CONTROLLER_PROTOCOL = 'controller' PROTOCOLS = {'udp', 'tcp', 'ssh', 'http', 'ws', CONTROLLER_PROTOCOL} CRP_TYPES = {'docker', 'gce', 'static'} <commit_msg>...
CURRENT_MIN_VERSION = 'v3.0' CURRENT_MAX_VERSION = 'v3.1' # Once the Next platform supports challenge versions this can be extended. ACTIVE_REMOTE_BRANCHES = ['master'] DEFAULT_COMMAND_TIMEOUT = 60 * 60 CONTROLLER_PROTOCOL = 'controller' PROTOCOLS = {'udp', 'tcp', 'ssh', 'http', 'ws', CONTROLLER_PROTOCOL} CRP_TYPES =...
CURRENT_MIN_VERSION = 'v3.0' CURRENT_MAX_VERSION = 'v3.1' ACTIVE_REMOTE_BRANCHES = ['master', 'staging', 'demo'] DEFAULT_COMMAND_TIMEOUT = 60 * 60 CONTROLLER_PROTOCOL = 'controller' PROTOCOLS = {'udp', 'tcp', 'ssh', 'http', 'ws', CONTROLLER_PROTOCOL} CRP_TYPES = {'docker', 'gce', 'static'} Change v3 active branches t...
<commit_before>CURRENT_MIN_VERSION = 'v3.0' CURRENT_MAX_VERSION = 'v3.1' ACTIVE_REMOTE_BRANCHES = ['master', 'staging', 'demo'] DEFAULT_COMMAND_TIMEOUT = 60 * 60 CONTROLLER_PROTOCOL = 'controller' PROTOCOLS = {'udp', 'tcp', 'ssh', 'http', 'ws', CONTROLLER_PROTOCOL} CRP_TYPES = {'docker', 'gce', 'static'} <commit_msg>...
c2060336b7d20a774ce9e5ae93960ad680836274
modoboa_radicale/forms.py
modoboa_radicale/forms.py
"""Radicale extension forms.""" from django import forms from django.utils.translation import ugettext_lazy from modoboa.lib import form_utils from modoboa.parameters import forms as param_forms class ParametersForm(param_forms.AdminParametersForm): """Global parameters.""" app = "modoboa_radicale" se...
"""Radicale extension forms.""" from django import forms from django.utils.translation import ugettext_lazy from modoboa.lib import form_utils from modoboa.parameters import forms as param_forms class ParametersForm(param_forms.AdminParametersForm): """Global parameters.""" app = "modoboa_radicale" se...
Change form field to URLField.
Change form field to URLField. see #31
Python
mit
modoboa/modoboa-radicale,modoboa/modoboa-radicale,modoboa/modoboa-radicale
"""Radicale extension forms.""" from django import forms from django.utils.translation import ugettext_lazy from modoboa.lib import form_utils from modoboa.parameters import forms as param_forms class ParametersForm(param_forms.AdminParametersForm): """Global parameters.""" app = "modoboa_radicale" se...
"""Radicale extension forms.""" from django import forms from django.utils.translation import ugettext_lazy from modoboa.lib import form_utils from modoboa.parameters import forms as param_forms class ParametersForm(param_forms.AdminParametersForm): """Global parameters.""" app = "modoboa_radicale" se...
<commit_before>"""Radicale extension forms.""" from django import forms from django.utils.translation import ugettext_lazy from modoboa.lib import form_utils from modoboa.parameters import forms as param_forms class ParametersForm(param_forms.AdminParametersForm): """Global parameters.""" app = "modoboa_ra...
"""Radicale extension forms.""" from django import forms from django.utils.translation import ugettext_lazy from modoboa.lib import form_utils from modoboa.parameters import forms as param_forms class ParametersForm(param_forms.AdminParametersForm): """Global parameters.""" app = "modoboa_radicale" se...
"""Radicale extension forms.""" from django import forms from django.utils.translation import ugettext_lazy from modoboa.lib import form_utils from modoboa.parameters import forms as param_forms class ParametersForm(param_forms.AdminParametersForm): """Global parameters.""" app = "modoboa_radicale" se...
<commit_before>"""Radicale extension forms.""" from django import forms from django.utils.translation import ugettext_lazy from modoboa.lib import form_utils from modoboa.parameters import forms as param_forms class ParametersForm(param_forms.AdminParametersForm): """Global parameters.""" app = "modoboa_ra...
6bcc15b6d018560ebc368efcfc2c2c7d435c7dcc
strictify-coqdep.py
strictify-coqdep.py
#!/usr/bin/env python2 import sys, subprocess import re if __name__ == '__main__': p = subprocess.Popen(sys.argv[1:], stderr=subprocess.PIPE) (stdout, stderr) = p.communicate() reg = re.compile(r'''Warning(: in file .*?,\s*required library .*? matches several files in path)''') if reg.search(stderr): ...
#!/usr/bin/env python3 import sys, subprocess import re if __name__ == '__main__': p = subprocess.Popen(sys.argv[1:], stderr=subprocess.PIPE) (stdout, stderr) = p.communicate() stderr = stderr.decode('utf-8') reg = re.compile(r'''Warning(: in file .*?,\s*required library .*? matches several files in pa...
Switch from python2 to python3
Switch from python2 to python3 Closes #6
Python
mit
JasonGross/coq-scripts,JasonGross/coq-scripts
#!/usr/bin/env python2 import sys, subprocess import re if __name__ == '__main__': p = subprocess.Popen(sys.argv[1:], stderr=subprocess.PIPE) (stdout, stderr) = p.communicate() reg = re.compile(r'''Warning(: in file .*?,\s*required library .*? matches several files in path)''') if reg.search(stderr): ...
#!/usr/bin/env python3 import sys, subprocess import re if __name__ == '__main__': p = subprocess.Popen(sys.argv[1:], stderr=subprocess.PIPE) (stdout, stderr) = p.communicate() stderr = stderr.decode('utf-8') reg = re.compile(r'''Warning(: in file .*?,\s*required library .*? matches several files in pa...
<commit_before>#!/usr/bin/env python2 import sys, subprocess import re if __name__ == '__main__': p = subprocess.Popen(sys.argv[1:], stderr=subprocess.PIPE) (stdout, stderr) = p.communicate() reg = re.compile(r'''Warning(: in file .*?,\s*required library .*? matches several files in path)''') if reg.se...
#!/usr/bin/env python3 import sys, subprocess import re if __name__ == '__main__': p = subprocess.Popen(sys.argv[1:], stderr=subprocess.PIPE) (stdout, stderr) = p.communicate() stderr = stderr.decode('utf-8') reg = re.compile(r'''Warning(: in file .*?,\s*required library .*? matches several files in pa...
#!/usr/bin/env python2 import sys, subprocess import re if __name__ == '__main__': p = subprocess.Popen(sys.argv[1:], stderr=subprocess.PIPE) (stdout, stderr) = p.communicate() reg = re.compile(r'''Warning(: in file .*?,\s*required library .*? matches several files in path)''') if reg.search(stderr): ...
<commit_before>#!/usr/bin/env python2 import sys, subprocess import re if __name__ == '__main__': p = subprocess.Popen(sys.argv[1:], stderr=subprocess.PIPE) (stdout, stderr) = p.communicate() reg = re.compile(r'''Warning(: in file .*?,\s*required library .*? matches several files in path)''') if reg.se...
0415bc9e4a174b7cebb634a449473131fe16b3b2
bulbs/content/management/commands/reindex_content.py
bulbs/content/management/commands/reindex_content.py
from django.core.management.base import NoArgsCommand from bulbs.content.models import Content class Command(NoArgsCommand): help = 'Runs Content.index on all content.' def handle(self, **options): num_processed = 0 content_count = Content.objects.all().count() chunk_size = 10 ...
from django.core.management.base import NoArgsCommand from bulbs.content.models import Content class Command(NoArgsCommand): help = 'Runs Content.index on all content.' def handle(self, **options): num_processed = 0 content_count = Content.objects.all().count() chunk_size = 10 ...
Add ordering to queryset in reindex admin command
Add ordering to queryset in reindex admin command
Python
mit
theonion/django-bulbs,theonion/django-bulbs,pombredanne/django-bulbs,theonion/django-bulbs,theonion/django-bulbs,pombredanne/django-bulbs,theonion/django-bulbs
from django.core.management.base import NoArgsCommand from bulbs.content.models import Content class Command(NoArgsCommand): help = 'Runs Content.index on all content.' def handle(self, **options): num_processed = 0 content_count = Content.objects.all().count() chunk_size = 10 ...
from django.core.management.base import NoArgsCommand from bulbs.content.models import Content class Command(NoArgsCommand): help = 'Runs Content.index on all content.' def handle(self, **options): num_processed = 0 content_count = Content.objects.all().count() chunk_size = 10 ...
<commit_before>from django.core.management.base import NoArgsCommand from bulbs.content.models import Content class Command(NoArgsCommand): help = 'Runs Content.index on all content.' def handle(self, **options): num_processed = 0 content_count = Content.objects.all().count() chunk_si...
from django.core.management.base import NoArgsCommand from bulbs.content.models import Content class Command(NoArgsCommand): help = 'Runs Content.index on all content.' def handle(self, **options): num_processed = 0 content_count = Content.objects.all().count() chunk_size = 10 ...
from django.core.management.base import NoArgsCommand from bulbs.content.models import Content class Command(NoArgsCommand): help = 'Runs Content.index on all content.' def handle(self, **options): num_processed = 0 content_count = Content.objects.all().count() chunk_size = 10 ...
<commit_before>from django.core.management.base import NoArgsCommand from bulbs.content.models import Content class Command(NoArgsCommand): help = 'Runs Content.index on all content.' def handle(self, **options): num_processed = 0 content_count = Content.objects.all().count() chunk_si...
8247d3c1b6a9720f14db1130e087293c57587b54
weather.py
weather.py
""" Implementation of the OpenWeatherMap API. """ __author__ = '[email protected] (Ajay Roopakalu)' OPEN_WEATHER_MAP_URL = 'api.openweathermap.org/data/2.5' WEATHER_URL = '/weather' import requests import log logging = log.Log(__name__) def GetCurrentExternalTemperature(appid, latitude, longitude): params = { ...
""" Implementation of the OpenWeatherMap API. """ __author__ = '[email protected] (Ajay Roopakalu)' OPEN_WEATHER_MAP_URL = 'http://api.openweathermap.org/data/2.5' WEATHER_URL = '/weather' import requests import log logging = log.Log(__name__) def GetCurrentExternalTemperature(appid, latitude, longitude): param...
Fix URL scheme for OpenWeatherMap.
Fix URL scheme for OpenWeatherMap.
Python
mit
jrupac/nest-wfh
""" Implementation of the OpenWeatherMap API. """ __author__ = '[email protected] (Ajay Roopakalu)' OPEN_WEATHER_MAP_URL = 'api.openweathermap.org/data/2.5' WEATHER_URL = '/weather' import requests import log logging = log.Log(__name__) def GetCurrentExternalTemperature(appid, latitude, longitude): params = { ...
""" Implementation of the OpenWeatherMap API. """ __author__ = '[email protected] (Ajay Roopakalu)' OPEN_WEATHER_MAP_URL = 'http://api.openweathermap.org/data/2.5' WEATHER_URL = '/weather' import requests import log logging = log.Log(__name__) def GetCurrentExternalTemperature(appid, latitude, longitude): param...
<commit_before>""" Implementation of the OpenWeatherMap API. """ __author__ = '[email protected] (Ajay Roopakalu)' OPEN_WEATHER_MAP_URL = 'api.openweathermap.org/data/2.5' WEATHER_URL = '/weather' import requests import log logging = log.Log(__name__) def GetCurrentExternalTemperature(appid, latitude, longitude):...
""" Implementation of the OpenWeatherMap API. """ __author__ = '[email protected] (Ajay Roopakalu)' OPEN_WEATHER_MAP_URL = 'http://api.openweathermap.org/data/2.5' WEATHER_URL = '/weather' import requests import log logging = log.Log(__name__) def GetCurrentExternalTemperature(appid, latitude, longitude): param...
""" Implementation of the OpenWeatherMap API. """ __author__ = '[email protected] (Ajay Roopakalu)' OPEN_WEATHER_MAP_URL = 'api.openweathermap.org/data/2.5' WEATHER_URL = '/weather' import requests import log logging = log.Log(__name__) def GetCurrentExternalTemperature(appid, latitude, longitude): params = { ...
<commit_before>""" Implementation of the OpenWeatherMap API. """ __author__ = '[email protected] (Ajay Roopakalu)' OPEN_WEATHER_MAP_URL = 'api.openweathermap.org/data/2.5' WEATHER_URL = '/weather' import requests import log logging = log.Log(__name__) def GetCurrentExternalTemperature(appid, latitude, longitude):...
a9a55f87abc0a26d41e3fa3091f2f2efad7a2543
autoencoder/encode.py
autoencoder/encode.py
import numpy as np from .network import autoencoder, get_encoder from .io import read_records, load_model def encode(input_file, output_file, log_dir): X = read_records(input_file) size = X.shape[1] model = load_model(log_dir) encoder = get_encoder(model) predictions = encoder.predict(X) np....
import numpy as np from .network import autoencoder, get_encoder from .io import read_records, load_model def encode(input_file, output_file, log_dir): X = read_records(input_file) size = X.shape[1] model = load_model(log_dir) assert model.input_shape[1] == size, \ 'Input size of data and...
Check input dimensions of pretrained model and input file
Check input dimensions of pretrained model and input file
Python
apache-2.0
theislab/dca,theislab/dca,theislab/dca
import numpy as np from .network import autoencoder, get_encoder from .io import read_records, load_model def encode(input_file, output_file, log_dir): X = read_records(input_file) size = X.shape[1] model = load_model(log_dir) encoder = get_encoder(model) predictions = encoder.predict(X) np....
import numpy as np from .network import autoencoder, get_encoder from .io import read_records, load_model def encode(input_file, output_file, log_dir): X = read_records(input_file) size = X.shape[1] model = load_model(log_dir) assert model.input_shape[1] == size, \ 'Input size of data and...
<commit_before>import numpy as np from .network import autoencoder, get_encoder from .io import read_records, load_model def encode(input_file, output_file, log_dir): X = read_records(input_file) size = X.shape[1] model = load_model(log_dir) encoder = get_encoder(model) predictions = encoder.pre...
import numpy as np from .network import autoencoder, get_encoder from .io import read_records, load_model def encode(input_file, output_file, log_dir): X = read_records(input_file) size = X.shape[1] model = load_model(log_dir) assert model.input_shape[1] == size, \ 'Input size of data and...
import numpy as np from .network import autoencoder, get_encoder from .io import read_records, load_model def encode(input_file, output_file, log_dir): X = read_records(input_file) size = X.shape[1] model = load_model(log_dir) encoder = get_encoder(model) predictions = encoder.predict(X) np....
<commit_before>import numpy as np from .network import autoencoder, get_encoder from .io import read_records, load_model def encode(input_file, output_file, log_dir): X = read_records(input_file) size = X.shape[1] model = load_model(log_dir) encoder = get_encoder(model) predictions = encoder.pre...
68d7b3995c49abd8f7096f9498bdbddf6b696d81
back_office/models.py
back_office/models.py
from django.db import models from django.utils.translation import ugettext as _ from Django.contrib.auth.models import User FEMALE = 'F' MALE = 'M' class Teacher(models.Model): """ halaqat teachers informations """ GENDET_CHOICES = ( (MALE, _('Male')), (FEMALE, _('Female')), ) ...
from django.db import models from django.utils.translation import ugettext as _ from Django.contrib.auth.models import User FEMALE = 'F' MALE = 'M' class Teacher(models.Model): """ halaqat teachers informations """ GENDET_CHOICES = ( (MALE, _('Male')), (FEMALE, _('Female')), ) ...
Add enabled field to teacher model
Add enabled field to teacher model
Python
mit
EmadMokhtar/halaqat,EmadMokhtar/halaqat,EmadMokhtar/halaqat
from django.db import models from django.utils.translation import ugettext as _ from Django.contrib.auth.models import User FEMALE = 'F' MALE = 'M' class Teacher(models.Model): """ halaqat teachers informations """ GENDET_CHOICES = ( (MALE, _('Male')), (FEMALE, _('Female')), ) ...
from django.db import models from django.utils.translation import ugettext as _ from Django.contrib.auth.models import User FEMALE = 'F' MALE = 'M' class Teacher(models.Model): """ halaqat teachers informations """ GENDET_CHOICES = ( (MALE, _('Male')), (FEMALE, _('Female')), ) ...
<commit_before>from django.db import models from django.utils.translation import ugettext as _ from Django.contrib.auth.models import User FEMALE = 'F' MALE = 'M' class Teacher(models.Model): """ halaqat teachers informations """ GENDET_CHOICES = ( (MALE, _('Male')), (FEMALE, _('Femal...
from django.db import models from django.utils.translation import ugettext as _ from Django.contrib.auth.models import User FEMALE = 'F' MALE = 'M' class Teacher(models.Model): """ halaqat teachers informations """ GENDET_CHOICES = ( (MALE, _('Male')), (FEMALE, _('Female')), ) ...
from django.db import models from django.utils.translation import ugettext as _ from Django.contrib.auth.models import User FEMALE = 'F' MALE = 'M' class Teacher(models.Model): """ halaqat teachers informations """ GENDET_CHOICES = ( (MALE, _('Male')), (FEMALE, _('Female')), ) ...
<commit_before>from django.db import models from django.utils.translation import ugettext as _ from Django.contrib.auth.models import User FEMALE = 'F' MALE = 'M' class Teacher(models.Model): """ halaqat teachers informations """ GENDET_CHOICES = ( (MALE, _('Male')), (FEMALE, _('Femal...
7bdd06f568856c010a4eacb1e70c262fa4c3388c
bin/trigger_upload.py
bin/trigger_upload.py
#!/bin/env python # -*- coding: utf8 -*- """ Triggers an upload process with the specified raw.xz URL. Useful for manually triggering Fedimg jobs. """ import logging import logging.config import multiprocessing.pool import sys import fedmsg import fedmsg.config import fedimg import fedimg.services from fedimg.s...
#!/bin/env python # -*- coding: utf8 -*- """ Triggers an upload process with the specified raw.xz URL. """ import logging import logging.config import multiprocessing.pool import sys import fedmsg import fedmsg.config import fedimg import fedimg.services from fedimg.services.ec2 import EC2Service, EC2ServiceExceptio...
Fix the manual upload trigger script
scripts: Fix the manual upload trigger script Signed-off-by: Sayan Chowdhury <[email protected]>
Python
agpl-3.0
fedora-infra/fedimg,fedora-infra/fedimg
#!/bin/env python # -*- coding: utf8 -*- """ Triggers an upload process with the specified raw.xz URL. Useful for manually triggering Fedimg jobs. """ import logging import logging.config import multiprocessing.pool import sys import fedmsg import fedmsg.config import fedimg import fedimg.services from fedimg.s...
#!/bin/env python # -*- coding: utf8 -*- """ Triggers an upload process with the specified raw.xz URL. """ import logging import logging.config import multiprocessing.pool import sys import fedmsg import fedmsg.config import fedimg import fedimg.services from fedimg.services.ec2 import EC2Service, EC2ServiceExceptio...
<commit_before>#!/bin/env python # -*- coding: utf8 -*- """ Triggers an upload process with the specified raw.xz URL. Useful for manually triggering Fedimg jobs. """ import logging import logging.config import multiprocessing.pool import sys import fedmsg import fedmsg.config import fedimg import fedimg.service...
#!/bin/env python # -*- coding: utf8 -*- """ Triggers an upload process with the specified raw.xz URL. """ import logging import logging.config import multiprocessing.pool import sys import fedmsg import fedmsg.config import fedimg import fedimg.services from fedimg.services.ec2 import EC2Service, EC2ServiceExceptio...
#!/bin/env python # -*- coding: utf8 -*- """ Triggers an upload process with the specified raw.xz URL. Useful for manually triggering Fedimg jobs. """ import logging import logging.config import multiprocessing.pool import sys import fedmsg import fedmsg.config import fedimg import fedimg.services from fedimg.s...
<commit_before>#!/bin/env python # -*- coding: utf8 -*- """ Triggers an upload process with the specified raw.xz URL. Useful for manually triggering Fedimg jobs. """ import logging import logging.config import multiprocessing.pool import sys import fedmsg import fedmsg.config import fedimg import fedimg.service...
b503a6e893d71b96b3737e567dde16f110db5fc7
src/prepare_turk_batch.py
src/prepare_turk_batch.py
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ """ import os import sys import csv import json import html def do_command(args): assert os.path.exists(args.input) writer = csv.writer(args.output) writer.writerow(["document"]) for fname in os.listdir(args.input): if not fname.endswith('.j...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ """ import os import sys import csv import json import html def do_command(args): assert os.path.exists(args.input) writer = csv.writer(args.output) writer.writerow(["document"]) for i, fname in enumerate(os.listdir(args.input)): if not fnam...
Prepare data with the new fiields and prompts
Prepare data with the new fiields and prompts
Python
mit
arunchaganty/briefly,arunchaganty/briefly,arunchaganty/briefly,arunchaganty/briefly
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ """ import os import sys import csv import json import html def do_command(args): assert os.path.exists(args.input) writer = csv.writer(args.output) writer.writerow(["document"]) for fname in os.listdir(args.input): if not fname.endswith('.j...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ """ import os import sys import csv import json import html def do_command(args): assert os.path.exists(args.input) writer = csv.writer(args.output) writer.writerow(["document"]) for i, fname in enumerate(os.listdir(args.input)): if not fnam...
<commit_before>#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ """ import os import sys import csv import json import html def do_command(args): assert os.path.exists(args.input) writer = csv.writer(args.output) writer.writerow(["document"]) for fname in os.listdir(args.input): if not fna...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ """ import os import sys import csv import json import html def do_command(args): assert os.path.exists(args.input) writer = csv.writer(args.output) writer.writerow(["document"]) for i, fname in enumerate(os.listdir(args.input)): if not fnam...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ """ import os import sys import csv import json import html def do_command(args): assert os.path.exists(args.input) writer = csv.writer(args.output) writer.writerow(["document"]) for fname in os.listdir(args.input): if not fname.endswith('.j...
<commit_before>#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ """ import os import sys import csv import json import html def do_command(args): assert os.path.exists(args.input) writer = csv.writer(args.output) writer.writerow(["document"]) for fname in os.listdir(args.input): if not fna...
dfb79b9f148663617048a3c2a310b2a66a1c7103
marxbot.py
marxbot.py
from errbot import BotPlugin, botcmd, webhook class MarxBot(BotPlugin): """Your daily dose of Marx""" min_err_version = '1.6.0' @botcmd(split_args_with=None) def marx(self, message, args): return "what a guy"
from errbot import BotPlugin, botcmd, webhook import pytumblr class MarxBot(BotPlugin): """Your daily dose of Marx""" min_err_version = '1.6.0' tumblr_client = None def activate(self): super().activate() if self.config is None or self.config["consumer_key"] == "" or self.config["consu...
Use the Tumblr API to get Marx quotes
Use the Tumblr API to get Marx quotes
Python
mit
AbigailBuccaneer/err-dailymarx
from errbot import BotPlugin, botcmd, webhook class MarxBot(BotPlugin): """Your daily dose of Marx""" min_err_version = '1.6.0' @botcmd(split_args_with=None) def marx(self, message, args): return "what a guy" Use the Tumblr API to get Marx quotes
from errbot import BotPlugin, botcmd, webhook import pytumblr class MarxBot(BotPlugin): """Your daily dose of Marx""" min_err_version = '1.6.0' tumblr_client = None def activate(self): super().activate() if self.config is None or self.config["consumer_key"] == "" or self.config["consu...
<commit_before>from errbot import BotPlugin, botcmd, webhook class MarxBot(BotPlugin): """Your daily dose of Marx""" min_err_version = '1.6.0' @botcmd(split_args_with=None) def marx(self, message, args): return "what a guy" <commit_msg>Use the Tumblr API to get Marx quotes<commit_after>
from errbot import BotPlugin, botcmd, webhook import pytumblr class MarxBot(BotPlugin): """Your daily dose of Marx""" min_err_version = '1.6.0' tumblr_client = None def activate(self): super().activate() if self.config is None or self.config["consumer_key"] == "" or self.config["consu...
from errbot import BotPlugin, botcmd, webhook class MarxBot(BotPlugin): """Your daily dose of Marx""" min_err_version = '1.6.0' @botcmd(split_args_with=None) def marx(self, message, args): return "what a guy" Use the Tumblr API to get Marx quotesfrom errbot import BotPlugin, botcmd, webhook i...
<commit_before>from errbot import BotPlugin, botcmd, webhook class MarxBot(BotPlugin): """Your daily dose of Marx""" min_err_version = '1.6.0' @botcmd(split_args_with=None) def marx(self, message, args): return "what a guy" <commit_msg>Use the Tumblr API to get Marx quotes<commit_after>from e...
19354bd82a89383d795cdada8d6af78e8f12eed8
src/server/test_client.py
src/server/test_client.py
#!/usr/bin/env python # Echo client program import socket import sys from RemoteFunctionCaller import * from SocketNetworker import SocketNetworker HOST = 'localhost' # The remote host PORT = 8553 # The same port as used by the server s = None for res in socket.getaddrinfo(HOST, PORT, socket.AF_UNSPEC, so...
#!/usr/bin/env python # Echo client program import socket import sys from RemoteFunctionCaller import * from SocketNetworker import SocketNetworker HOST = 'localhost' # The remote host PORT = 8553 # The same port as used by the server s = None for res in socket.getaddrinfo(HOST, PORT, socket.AF_UNSPEC, so...
Update call method in test client
Update call method in test client
Python
mit
cnlohr/bridgesim,cnlohr/bridgesim,cnlohr/bridgesim,cnlohr/bridgesim
#!/usr/bin/env python # Echo client program import socket import sys from RemoteFunctionCaller import * from SocketNetworker import SocketNetworker HOST = 'localhost' # The remote host PORT = 8553 # The same port as used by the server s = None for res in socket.getaddrinfo(HOST, PORT, socket.AF_UNSPEC, so...
#!/usr/bin/env python # Echo client program import socket import sys from RemoteFunctionCaller import * from SocketNetworker import SocketNetworker HOST = 'localhost' # The remote host PORT = 8553 # The same port as used by the server s = None for res in socket.getaddrinfo(HOST, PORT, socket.AF_UNSPEC, so...
<commit_before>#!/usr/bin/env python # Echo client program import socket import sys from RemoteFunctionCaller import * from SocketNetworker import SocketNetworker HOST = 'localhost' # The remote host PORT = 8553 # The same port as used by the server s = None for res in socket.getaddrinfo(HOST, PORT, socke...
#!/usr/bin/env python # Echo client program import socket import sys from RemoteFunctionCaller import * from SocketNetworker import SocketNetworker HOST = 'localhost' # The remote host PORT = 8553 # The same port as used by the server s = None for res in socket.getaddrinfo(HOST, PORT, socket.AF_UNSPEC, so...
#!/usr/bin/env python # Echo client program import socket import sys from RemoteFunctionCaller import * from SocketNetworker import SocketNetworker HOST = 'localhost' # The remote host PORT = 8553 # The same port as used by the server s = None for res in socket.getaddrinfo(HOST, PORT, socket.AF_UNSPEC, so...
<commit_before>#!/usr/bin/env python # Echo client program import socket import sys from RemoteFunctionCaller import * from SocketNetworker import SocketNetworker HOST = 'localhost' # The remote host PORT = 8553 # The same port as used by the server s = None for res in socket.getaddrinfo(HOST, PORT, socke...