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
4fb4603522c3693ef6ca1f7e258f9aaf3cccc7d1
all-domains/data-structures/linked-lists/print-the-elements-of-a-linked-list/solution.py
all-domains/data-structures/linked-lists/print-the-elements-of-a-linked-list/solution.py
# https://www.hackerrank.com/challenges/print-the-elements-of-a-linked-list # Python 2 """ Print elements of a linked list on console head input could be None as well for empty list Node is defined as class Node(object): def __init__(self, data=None, next_node=None): self.data = data self.next =...
Print all the elements of a linked list
Print all the elements of a linked list
Python
mit
arvinsim/hackerrank-solutions
Print all the elements of a linked list
# https://www.hackerrank.com/challenges/print-the-elements-of-a-linked-list # Python 2 """ Print elements of a linked list on console head input could be None as well for empty list Node is defined as class Node(object): def __init__(self, data=None, next_node=None): self.data = data self.next =...
<commit_before><commit_msg>Print all the elements of a linked list<commit_after>
# https://www.hackerrank.com/challenges/print-the-elements-of-a-linked-list # Python 2 """ Print elements of a linked list on console head input could be None as well for empty list Node is defined as class Node(object): def __init__(self, data=None, next_node=None): self.data = data self.next =...
Print all the elements of a linked list# https://www.hackerrank.com/challenges/print-the-elements-of-a-linked-list # Python 2 """ Print elements of a linked list on console head input could be None as well for empty list Node is defined as class Node(object): def __init__(self, data=None, next_node=None): ...
<commit_before><commit_msg>Print all the elements of a linked list<commit_after># https://www.hackerrank.com/challenges/print-the-elements-of-a-linked-list # Python 2 """ Print elements of a linked list on console head input could be None as well for empty list Node is defined as class Node(object): def __ini...
5bdc9a7834c67ac7e39c9674b328a68e42467efc
yggdrasil/yggdrasil_tests.py
yggdrasil/yggdrasil_tests.py
from unittest import TestCase from intent.igt.references import raw_tier, cleaned_tier, normalized_tier from intent.igt.rgxigt import Igt from yggdrasil.igt_operations import add_raw_tier, add_clean_tier, add_normal_tier class ConstructIGTTests(TestCase): def setUp(self): self.lines = [{'text':'This is ...
Move testcases here from INTENT.
Move testcases here from INTENT.
Python
mit
xigt/yggdrasil,xigt/yggdrasil,xigt/yggdrasil
Move testcases here from INTENT.
from unittest import TestCase from intent.igt.references import raw_tier, cleaned_tier, normalized_tier from intent.igt.rgxigt import Igt from yggdrasil.igt_operations import add_raw_tier, add_clean_tier, add_normal_tier class ConstructIGTTests(TestCase): def setUp(self): self.lines = [{'text':'This is ...
<commit_before><commit_msg>Move testcases here from INTENT.<commit_after>
from unittest import TestCase from intent.igt.references import raw_tier, cleaned_tier, normalized_tier from intent.igt.rgxigt import Igt from yggdrasil.igt_operations import add_raw_tier, add_clean_tier, add_normal_tier class ConstructIGTTests(TestCase): def setUp(self): self.lines = [{'text':'This is ...
Move testcases here from INTENT.from unittest import TestCase from intent.igt.references import raw_tier, cleaned_tier, normalized_tier from intent.igt.rgxigt import Igt from yggdrasil.igt_operations import add_raw_tier, add_clean_tier, add_normal_tier class ConstructIGTTests(TestCase): def setUp(self): ...
<commit_before><commit_msg>Move testcases here from INTENT.<commit_after>from unittest import TestCase from intent.igt.references import raw_tier, cleaned_tier, normalized_tier from intent.igt.rgxigt import Igt from yggdrasil.igt_operations import add_raw_tier, add_clean_tier, add_normal_tier class ConstructIGTTests...
e783c0381208326f79db411a39d008701d57ad89
librisxl-tools/scripts/normalize_jsonlines.py
librisxl-tools/scripts/normalize_jsonlines.py
#!/usr/bin/env python from __future__ import unicode_literals, print_function import unicodedata import json import sys for l in sys.stdin: l = json.loads(l) l = json.dumps(l, ensure_ascii=False) l = unicodedata.normalize('NFC', l) print(l.encode('utf-8'))
Add script for normalizing unicode in json line dumps
Add script for normalizing unicode in json line dumps
Python
apache-2.0
libris/librisxl,libris/librisxl,libris/librisxl
Add script for normalizing unicode in json line dumps
#!/usr/bin/env python from __future__ import unicode_literals, print_function import unicodedata import json import sys for l in sys.stdin: l = json.loads(l) l = json.dumps(l, ensure_ascii=False) l = unicodedata.normalize('NFC', l) print(l.encode('utf-8'))
<commit_before><commit_msg>Add script for normalizing unicode in json line dumps<commit_after>
#!/usr/bin/env python from __future__ import unicode_literals, print_function import unicodedata import json import sys for l in sys.stdin: l = json.loads(l) l = json.dumps(l, ensure_ascii=False) l = unicodedata.normalize('NFC', l) print(l.encode('utf-8'))
Add script for normalizing unicode in json line dumps#!/usr/bin/env python from __future__ import unicode_literals, print_function import unicodedata import json import sys for l in sys.stdin: l = json.loads(l) l = json.dumps(l, ensure_ascii=False) l = unicodedata.normalize('NFC', l) print(l.encode('utf...
<commit_before><commit_msg>Add script for normalizing unicode in json line dumps<commit_after>#!/usr/bin/env python from __future__ import unicode_literals, print_function import unicodedata import json import sys for l in sys.stdin: l = json.loads(l) l = json.dumps(l, ensure_ascii=False) l = unicodedata.no...
40f8190029cf1431a14cd74dfab515d7bb106dd4
pyscores/api_wrapper.py
pyscores/api_wrapper.py
import json import os import requests class APIWrapper(object): def __init__(self, base_url=None, auth_token=None): if base_url: self.base_url = base_url else: self.base_url = "http://api.football-data.org/v1" if auth_token: self.headers = { ...
Add the start of an api wrapper
Add the start of an api wrapper
Python
mit
conormag94/pyscores
Add the start of an api wrapper
import json import os import requests class APIWrapper(object): def __init__(self, base_url=None, auth_token=None): if base_url: self.base_url = base_url else: self.base_url = "http://api.football-data.org/v1" if auth_token: self.headers = { ...
<commit_before><commit_msg>Add the start of an api wrapper<commit_after>
import json import os import requests class APIWrapper(object): def __init__(self, base_url=None, auth_token=None): if base_url: self.base_url = base_url else: self.base_url = "http://api.football-data.org/v1" if auth_token: self.headers = { ...
Add the start of an api wrapperimport json import os import requests class APIWrapper(object): def __init__(self, base_url=None, auth_token=None): if base_url: self.base_url = base_url else: self.base_url = "http://api.football-data.org/v1" if auth_token: ...
<commit_before><commit_msg>Add the start of an api wrapper<commit_after>import json import os import requests class APIWrapper(object): def __init__(self, base_url=None, auth_token=None): if base_url: self.base_url = base_url else: self.base_url = "http://api.football-da...
822fdaa409322a41eb83797da76d021e97e34949
hassio_api/hassio/version.py
hassio_api/hassio/version.py
"""Bootstrap HassIO.""" import asyncio import json import logging import os from colorlog import ColoredFormatter from .const import ( FILE_HASSIO_VERSION, CONF_SUPERVISOR_TAG, CONF_SUPERVISOR_IMAGE, CONF_HOMEASSISTANT_TAG, CONF_HOMEASSISTANT_IMAGE) _LOGGER = logging.getLogger(__name__) class Version(Objec...
Update HassIO API -> new files
Update HassIO API -> new files
Python
bsd-3-clause
pvizeli/hassio,pvizeli/hassio
Update HassIO API -> new files
"""Bootstrap HassIO.""" import asyncio import json import logging import os from colorlog import ColoredFormatter from .const import ( FILE_HASSIO_VERSION, CONF_SUPERVISOR_TAG, CONF_SUPERVISOR_IMAGE, CONF_HOMEASSISTANT_TAG, CONF_HOMEASSISTANT_IMAGE) _LOGGER = logging.getLogger(__name__) class Version(Objec...
<commit_before><commit_msg>Update HassIO API -> new files<commit_after>
"""Bootstrap HassIO.""" import asyncio import json import logging import os from colorlog import ColoredFormatter from .const import ( FILE_HASSIO_VERSION, CONF_SUPERVISOR_TAG, CONF_SUPERVISOR_IMAGE, CONF_HOMEASSISTANT_TAG, CONF_HOMEASSISTANT_IMAGE) _LOGGER = logging.getLogger(__name__) class Version(Objec...
Update HassIO API -> new files"""Bootstrap HassIO.""" import asyncio import json import logging import os from colorlog import ColoredFormatter from .const import ( FILE_HASSIO_VERSION, CONF_SUPERVISOR_TAG, CONF_SUPERVISOR_IMAGE, CONF_HOMEASSISTANT_TAG, CONF_HOMEASSISTANT_IMAGE) _LOGGER = logging.getLogger(_...
<commit_before><commit_msg>Update HassIO API -> new files<commit_after>"""Bootstrap HassIO.""" import asyncio import json import logging import os from colorlog import ColoredFormatter from .const import ( FILE_HASSIO_VERSION, CONF_SUPERVISOR_TAG, CONF_SUPERVISOR_IMAGE, CONF_HOMEASSISTANT_TAG, CONF_HOMEASSIST...
b9349f7bfa19904dee140743ccf9f0198e958516
scripts/load_results.py
scripts/load_results.py
from random import randint from dakis.core.models import Experiment def load_results(exp_pk, func_cls, calls50, calls100, callsavg): tasks = Experiment.objects.get(pk=exp_pk).tasks.filter(func_cls=func_cls) l = sorted([randint(0, int(callsavg*2)) for i in range(tasks.count())]) for i in range(tasks.count(...
Implement script to add exp results from article
Implement script to add exp results from article
Python
agpl-3.0
niekas/dakis,niekas/dakis,niekas/dakis
Implement script to add exp results from article
from random import randint from dakis.core.models import Experiment def load_results(exp_pk, func_cls, calls50, calls100, callsavg): tasks = Experiment.objects.get(pk=exp_pk).tasks.filter(func_cls=func_cls) l = sorted([randint(0, int(callsavg*2)) for i in range(tasks.count())]) for i in range(tasks.count(...
<commit_before><commit_msg>Implement script to add exp results from article<commit_after>
from random import randint from dakis.core.models import Experiment def load_results(exp_pk, func_cls, calls50, calls100, callsavg): tasks = Experiment.objects.get(pk=exp_pk).tasks.filter(func_cls=func_cls) l = sorted([randint(0, int(callsavg*2)) for i in range(tasks.count())]) for i in range(tasks.count(...
Implement script to add exp results from articlefrom random import randint from dakis.core.models import Experiment def load_results(exp_pk, func_cls, calls50, calls100, callsavg): tasks = Experiment.objects.get(pk=exp_pk).tasks.filter(func_cls=func_cls) l = sorted([randint(0, int(callsavg*2)) for i in range(...
<commit_before><commit_msg>Implement script to add exp results from article<commit_after>from random import randint from dakis.core.models import Experiment def load_results(exp_pk, func_cls, calls50, calls100, callsavg): tasks = Experiment.objects.get(pk=exp_pk).tasks.filter(func_cls=func_cls) l = sorted([ra...
12f51ce0d5e6c67e15ba3d60c21523a28d29b964
polygraph/types/tests/test_type_map.py
polygraph/types/tests/test_type_map.py
from unittest import TestCase from polygraph.types.decorators import field from polygraph.types.object_type import ObjectType from polygraph.types.scalar import ID, Boolean, Float, Int, String from polygraph.types.schema import Schema from polygraph.types.type_builder import List, NonNull, Union class Person(ObjectT...
Add tests for the type map builder
Add tests for the type map builder
Python
mit
polygraph-python/polygraph
Add tests for the type map builder
from unittest import TestCase from polygraph.types.decorators import field from polygraph.types.object_type import ObjectType from polygraph.types.scalar import ID, Boolean, Float, Int, String from polygraph.types.schema import Schema from polygraph.types.type_builder import List, NonNull, Union class Person(ObjectT...
<commit_before><commit_msg>Add tests for the type map builder<commit_after>
from unittest import TestCase from polygraph.types.decorators import field from polygraph.types.object_type import ObjectType from polygraph.types.scalar import ID, Boolean, Float, Int, String from polygraph.types.schema import Schema from polygraph.types.type_builder import List, NonNull, Union class Person(ObjectT...
Add tests for the type map builderfrom unittest import TestCase from polygraph.types.decorators import field from polygraph.types.object_type import ObjectType from polygraph.types.scalar import ID, Boolean, Float, Int, String from polygraph.types.schema import Schema from polygraph.types.type_builder import List, Non...
<commit_before><commit_msg>Add tests for the type map builder<commit_after>from unittest import TestCase from polygraph.types.decorators import field from polygraph.types.object_type import ObjectType from polygraph.types.scalar import ID, Boolean, Float, Int, String from polygraph.types.schema import Schema from poly...
aa1c6dbede3cbee67d1b2b0a1064fd7cc5662251
discovery-diff/discovery-diff.py
discovery-diff/discovery-diff.py
import json from subprocess import Popen, PIPE import os import sys def hardware_data(hw_id): '''Read the discoverd data about the given node from Swift''' # OS_TENANT_NAME=service swift download --output - ironic-discoverd <ID> p = Popen(('swift', 'download', '--output', '-', 'ironic-discoverd', hw_id), ...
Add a script for diffing the hw discovery data
Add a script for diffing the hw discovery data This will let us spot-check things that should be identical but aren't.
Python
apache-2.0
rthallisey/clapper,larsks/clapper,larsks/clapper,coolsvap/clapper,rthallisey/clapper,coolsvap/clapper,coolsvap/clapper
Add a script for diffing the hw discovery data This will let us spot-check things that should be identical but aren't.
import json from subprocess import Popen, PIPE import os import sys def hardware_data(hw_id): '''Read the discoverd data about the given node from Swift''' # OS_TENANT_NAME=service swift download --output - ironic-discoverd <ID> p = Popen(('swift', 'download', '--output', '-', 'ironic-discoverd', hw_id), ...
<commit_before><commit_msg>Add a script for diffing the hw discovery data This will let us spot-check things that should be identical but aren't.<commit_after>
import json from subprocess import Popen, PIPE import os import sys def hardware_data(hw_id): '''Read the discoverd data about the given node from Swift''' # OS_TENANT_NAME=service swift download --output - ironic-discoverd <ID> p = Popen(('swift', 'download', '--output', '-', 'ironic-discoverd', hw_id), ...
Add a script for diffing the hw discovery data This will let us spot-check things that should be identical but aren't.import json from subprocess import Popen, PIPE import os import sys def hardware_data(hw_id): '''Read the discoverd data about the given node from Swift''' # OS_TENANT_NAME=service swift down...
<commit_before><commit_msg>Add a script for diffing the hw discovery data This will let us spot-check things that should be identical but aren't.<commit_after>import json from subprocess import Popen, PIPE import os import sys def hardware_data(hw_id): '''Read the discoverd data about the given node from Swift''...
c18519b4f5f7cbac24e053df422d83733d6963f6
examples/test_pdf_asserts.py
examples/test_pdf_asserts.py
from seleniumbase import BaseCase class PdfTestClass(BaseCase): def test_assert_pdf_text(self): # Assert PDF contains the expected text on Page 1 self.assert_pdf_text( "https://nostarch.com/download/Automate_the_Boring_Stuff_dTOC.pdf", "Programming Is a Creative Activity"...
Add a test for asserting text in a PDF file
Add a test for asserting text in a PDF file
Python
mit
seleniumbase/SeleniumBase,seleniumbase/SeleniumBase,seleniumbase/SeleniumBase,mdmintz/SeleniumBase,mdmintz/SeleniumBase,mdmintz/SeleniumBase,mdmintz/SeleniumBase,seleniumbase/SeleniumBase
Add a test for asserting text in a PDF file
from seleniumbase import BaseCase class PdfTestClass(BaseCase): def test_assert_pdf_text(self): # Assert PDF contains the expected text on Page 1 self.assert_pdf_text( "https://nostarch.com/download/Automate_the_Boring_Stuff_dTOC.pdf", "Programming Is a Creative Activity"...
<commit_before><commit_msg>Add a test for asserting text in a PDF file<commit_after>
from seleniumbase import BaseCase class PdfTestClass(BaseCase): def test_assert_pdf_text(self): # Assert PDF contains the expected text on Page 1 self.assert_pdf_text( "https://nostarch.com/download/Automate_the_Boring_Stuff_dTOC.pdf", "Programming Is a Creative Activity"...
Add a test for asserting text in a PDF filefrom seleniumbase import BaseCase class PdfTestClass(BaseCase): def test_assert_pdf_text(self): # Assert PDF contains the expected text on Page 1 self.assert_pdf_text( "https://nostarch.com/download/Automate_the_Boring_Stuff_dTOC.pdf", ...
<commit_before><commit_msg>Add a test for asserting text in a PDF file<commit_after>from seleniumbase import BaseCase class PdfTestClass(BaseCase): def test_assert_pdf_text(self): # Assert PDF contains the expected text on Page 1 self.assert_pdf_text( "https://nostarch.com/download/A...
1f6c7b33a150096dad4c856516b6dd23dd1571ae
read-coverage.py
read-coverage.py
"""Translate coverage.py data files to JSON.""" import argparse import json import pathlib import sys from coverage import coverage as Coverage def parse_args(argv=None): """Parse command-line argument.""" parser = argparse.ArgumentParser() parser.add_argument( "coverage", nargs=1, ...
Add Python script to read coverage data files
Add Python script to read coverage data files
Python
mit
Holiverh/atom-coverage-python
Add Python script to read coverage data files
"""Translate coverage.py data files to JSON.""" import argparse import json import pathlib import sys from coverage import coverage as Coverage def parse_args(argv=None): """Parse command-line argument.""" parser = argparse.ArgumentParser() parser.add_argument( "coverage", nargs=1, ...
<commit_before><commit_msg>Add Python script to read coverage data files<commit_after>
"""Translate coverage.py data files to JSON.""" import argparse import json import pathlib import sys from coverage import coverage as Coverage def parse_args(argv=None): """Parse command-line argument.""" parser = argparse.ArgumentParser() parser.add_argument( "coverage", nargs=1, ...
Add Python script to read coverage data files"""Translate coverage.py data files to JSON.""" import argparse import json import pathlib import sys from coverage import coverage as Coverage def parse_args(argv=None): """Parse command-line argument.""" parser = argparse.ArgumentParser() parser.add_argume...
<commit_before><commit_msg>Add Python script to read coverage data files<commit_after>"""Translate coverage.py data files to JSON.""" import argparse import json import pathlib import sys from coverage import coverage as Coverage def parse_args(argv=None): """Parse command-line argument.""" parser = argpar...
597938ad9fd4117fd5bd43f492983a0364cdf276
tests/cupy_tests/sparse_tests/test_construct.py
tests/cupy_tests/sparse_tests/test_construct.py
import unittest import numpy from cupy import testing @testing.parameterize(*testing.product({ 'dtype': [numpy.float32, numpy.float64], 'format': ['csr', 'csc', 'coo'], 'm': [3], 'n': [None, 3], })) @testing.with_requires('scipy') class TestEye(unittest.TestCase): @testing.numpy_cupy_allclose(s...
Add test for eye and identity
Add test for eye and identity
Python
mit
cupy/cupy,cupy/cupy,cupy/cupy,cupy/cupy
Add test for eye and identity
import unittest import numpy from cupy import testing @testing.parameterize(*testing.product({ 'dtype': [numpy.float32, numpy.float64], 'format': ['csr', 'csc', 'coo'], 'm': [3], 'n': [None, 3], })) @testing.with_requires('scipy') class TestEye(unittest.TestCase): @testing.numpy_cupy_allclose(s...
<commit_before><commit_msg>Add test for eye and identity<commit_after>
import unittest import numpy from cupy import testing @testing.parameterize(*testing.product({ 'dtype': [numpy.float32, numpy.float64], 'format': ['csr', 'csc', 'coo'], 'm': [3], 'n': [None, 3], })) @testing.with_requires('scipy') class TestEye(unittest.TestCase): @testing.numpy_cupy_allclose(s...
Add test for eye and identityimport unittest import numpy from cupy import testing @testing.parameterize(*testing.product({ 'dtype': [numpy.float32, numpy.float64], 'format': ['csr', 'csc', 'coo'], 'm': [3], 'n': [None, 3], })) @testing.with_requires('scipy') class TestEye(unittest.TestCase): @...
<commit_before><commit_msg>Add test for eye and identity<commit_after>import unittest import numpy from cupy import testing @testing.parameterize(*testing.product({ 'dtype': [numpy.float32, numpy.float64], 'format': ['csr', 'csc', 'coo'], 'm': [3], 'n': [None, 3], })) @testing.with_requires('scipy')...
038bd9745cda294491589bbca60b1b3431ce39cc
llvmlite/tests/test_setup.py
llvmlite/tests/test_setup.py
""" Tests for setup.py behavior """ import distutils.core try: import setuptools except ImportError: setuptools = None import sys import unittest from collections import namedtuple from importlib.util import spec_from_file_location, module_from_spec from pathlib import Path from . import TestCase setup_path ...
Add test for setup.py's _guard_py_ver
Add test for setup.py's _guard_py_ver
Python
bsd-2-clause
numba/llvmlite,numba/llvmlite,numba/llvmlite,numba/llvmlite
Add test for setup.py's _guard_py_ver
""" Tests for setup.py behavior """ import distutils.core try: import setuptools except ImportError: setuptools = None import sys import unittest from collections import namedtuple from importlib.util import spec_from_file_location, module_from_spec from pathlib import Path from . import TestCase setup_path ...
<commit_before><commit_msg>Add test for setup.py's _guard_py_ver<commit_after>
""" Tests for setup.py behavior """ import distutils.core try: import setuptools except ImportError: setuptools = None import sys import unittest from collections import namedtuple from importlib.util import spec_from_file_location, module_from_spec from pathlib import Path from . import TestCase setup_path ...
Add test for setup.py's _guard_py_ver""" Tests for setup.py behavior """ import distutils.core try: import setuptools except ImportError: setuptools = None import sys import unittest from collections import namedtuple from importlib.util import spec_from_file_location, module_from_spec from pathlib import Path...
<commit_before><commit_msg>Add test for setup.py's _guard_py_ver<commit_after>""" Tests for setup.py behavior """ import distutils.core try: import setuptools except ImportError: setuptools = None import sys import unittest from collections import namedtuple from importlib.util import spec_from_file_location, ...
a4aaa91209d8ab3e819bbf22e45f22e62af99426
pymatgen/symmetry/tests/test_spacegroup.py
pymatgen/symmetry/tests/test_spacegroup.py
#!/usr/bin/env python ''' Created on Mar 12, 2012 ''' from __future__ import division __author__="Shyue Ping Ong" __copyright__ = "Copyright 2012, The Materials Project" __version__ = "0.1" __maintainer__ = "Shyue Ping Ong" __email__ = "shyue@mit.edu" __date__ = "Mar 12, 2012" import unittest import os from pymatg...
Add a unittest for spacegroup. Still very basic.
Add a unittest for spacegroup. Still very basic. Former-commit-id: 1a63abe5e2a85b220d8b4fd5fa4cd25a1c739e49 [formerly 5f925f837f4ae3ba136f0d6e271848b06467ea8b] Former-commit-id: 3112d8f3738a35c4572c9384f8860a6de69a9b6a
Python
mit
mbkumar/pymatgen,davidwaroquiers/pymatgen,Bismarrck/pymatgen,Bismarrck/pymatgen,blondegeek/pymatgen,gpetretto/pymatgen,tschaume/pymatgen,xhqu1981/pymatgen,ndardenne/pymatgen,dongsenfo/pymatgen,ndardenne/pymatgen,Bismarrck/pymatgen,davidwaroquiers/pymatgen,matk86/pymatgen,montoyjh/pymatgen,nisse3000/pymatgen,johnson1228...
Add a unittest for spacegroup. Still very basic. Former-commit-id: 1a63abe5e2a85b220d8b4fd5fa4cd25a1c739e49 [formerly 5f925f837f4ae3ba136f0d6e271848b06467ea8b] Former-commit-id: 3112d8f3738a35c4572c9384f8860a6de69a9b6a
#!/usr/bin/env python ''' Created on Mar 12, 2012 ''' from __future__ import division __author__="Shyue Ping Ong" __copyright__ = "Copyright 2012, The Materials Project" __version__ = "0.1" __maintainer__ = "Shyue Ping Ong" __email__ = "shyue@mit.edu" __date__ = "Mar 12, 2012" import unittest import os from pymatg...
<commit_before><commit_msg>Add a unittest for spacegroup. Still very basic. Former-commit-id: 1a63abe5e2a85b220d8b4fd5fa4cd25a1c739e49 [formerly 5f925f837f4ae3ba136f0d6e271848b06467ea8b] Former-commit-id: 3112d8f3738a35c4572c9384f8860a6de69a9b6a<commit_after>
#!/usr/bin/env python ''' Created on Mar 12, 2012 ''' from __future__ import division __author__="Shyue Ping Ong" __copyright__ = "Copyright 2012, The Materials Project" __version__ = "0.1" __maintainer__ = "Shyue Ping Ong" __email__ = "shyue@mit.edu" __date__ = "Mar 12, 2012" import unittest import os from pymatg...
Add a unittest for spacegroup. Still very basic. Former-commit-id: 1a63abe5e2a85b220d8b4fd5fa4cd25a1c739e49 [formerly 5f925f837f4ae3ba136f0d6e271848b06467ea8b] Former-commit-id: 3112d8f3738a35c4572c9384f8860a6de69a9b6a#!/usr/bin/env python ''' Created on Mar 12, 2012 ''' from __future__ import division __author__=...
<commit_before><commit_msg>Add a unittest for spacegroup. Still very basic. Former-commit-id: 1a63abe5e2a85b220d8b4fd5fa4cd25a1c739e49 [formerly 5f925f837f4ae3ba136f0d6e271848b06467ea8b] Former-commit-id: 3112d8f3738a35c4572c9384f8860a6de69a9b6a<commit_after>#!/usr/bin/env python ''' Created on Mar 12, 2012 ''' fro...
4f6fde8329b0873f3568ce7153dc64017f5bc0cb
boto/beanstalk/__init__.py
boto/beanstalk/__init__.py
# Copyright (c) 2013 Mitch Garnaat http://garnaat.org/ # Copyright (c) 2013 Amazon.com, Inc. or its affiliates. # All Rights Reserved # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the # "Software"), to deal in the Software without...
Add connect_to_region to beanstalk module.
Add connect_to_region to beanstalk module.
Python
mit
jamesls/boto,appneta/boto,rjschwei/boto,SaranyaKarthikeyan/boto,drbild/boto,lra/boto,weebygames/boto,revmischa/boto,s0enke/boto,pfhayes/boto,drbild/boto,khagler/boto,dimdung/boto,Timus1712/boto,trademob/boto,alex/boto,nishigori/boto,jindongh/boto,janslow/boto,garnaat/boto,alfredodeza/boto,jameslegg/boto,disruptek/boto,...
Add connect_to_region to beanstalk module.
# Copyright (c) 2013 Mitch Garnaat http://garnaat.org/ # Copyright (c) 2013 Amazon.com, Inc. or its affiliates. # All Rights Reserved # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the # "Software"), to deal in the Software without...
<commit_before><commit_msg>Add connect_to_region to beanstalk module.<commit_after>
# Copyright (c) 2013 Mitch Garnaat http://garnaat.org/ # Copyright (c) 2013 Amazon.com, Inc. or its affiliates. # All Rights Reserved # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the # "Software"), to deal in the Software without...
Add connect_to_region to beanstalk module.# Copyright (c) 2013 Mitch Garnaat http://garnaat.org/ # Copyright (c) 2013 Amazon.com, Inc. or its affiliates. # All Rights Reserved # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the # "S...
<commit_before><commit_msg>Add connect_to_region to beanstalk module.<commit_after># Copyright (c) 2013 Mitch Garnaat http://garnaat.org/ # Copyright (c) 2013 Amazon.com, Inc. or its affiliates. # All Rights Reserved # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and...
915b3f3ca7008faa22bbe9ef32cd652d371dbe4a
bongo/apps/bongo/tests/cache_tests.py
bongo/apps/bongo/tests/cache_tests.py
from django.test import TestCase from django.core.cache import cache class CacheTestCase(TestCase): def test_cache_task(self): """ Test memcached or LocMemCache, just so we know it's working """ cached = cache.get("cache_key") if not cached: cache.set("cache_key", "cache_value"...
Add a test to test the cache is working
Add a test to test the cache is working
Python
mit
BowdoinOrient/bongo,BowdoinOrient/bongo,BowdoinOrient/bongo,BowdoinOrient/bongo
Add a test to test the cache is working
from django.test import TestCase from django.core.cache import cache class CacheTestCase(TestCase): def test_cache_task(self): """ Test memcached or LocMemCache, just so we know it's working """ cached = cache.get("cache_key") if not cached: cache.set("cache_key", "cache_value"...
<commit_before><commit_msg>Add a test to test the cache is working<commit_after>
from django.test import TestCase from django.core.cache import cache class CacheTestCase(TestCase): def test_cache_task(self): """ Test memcached or LocMemCache, just so we know it's working """ cached = cache.get("cache_key") if not cached: cache.set("cache_key", "cache_value"...
Add a test to test the cache is workingfrom django.test import TestCase from django.core.cache import cache class CacheTestCase(TestCase): def test_cache_task(self): """ Test memcached or LocMemCache, just so we know it's working """ cached = cache.get("cache_key") if not cached: ...
<commit_before><commit_msg>Add a test to test the cache is working<commit_after>from django.test import TestCase from django.core.cache import cache class CacheTestCase(TestCase): def test_cache_task(self): """ Test memcached or LocMemCache, just so we know it's working """ cached = cache.get("cach...
8e19937489f4481c860487a8f06440cfe5c7bea2
switchy/apps/routers.py
switchy/apps/routers.py
# This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at http://mozilla.org/MPL/2.0/. """ Routing apps """ from collections import Counter from ..marks import event_callback from ..utils import get_logger ...
Add a generic bridging app - `Bridger`
Add a generic bridging app - `Bridger` Allows for defining bridge args per profile entry count. By default 'proxy' routing is implemented as described in the docs.
Python
mpl-2.0
wwezhuimeng/switch,sangoma/switchy
Add a generic bridging app - `Bridger` Allows for defining bridge args per profile entry count. By default 'proxy' routing is implemented as described in the docs.
# This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at http://mozilla.org/MPL/2.0/. """ Routing apps """ from collections import Counter from ..marks import event_callback from ..utils import get_logger ...
<commit_before><commit_msg>Add a generic bridging app - `Bridger` Allows for defining bridge args per profile entry count. By default 'proxy' routing is implemented as described in the docs.<commit_after>
# This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at http://mozilla.org/MPL/2.0/. """ Routing apps """ from collections import Counter from ..marks import event_callback from ..utils import get_logger ...
Add a generic bridging app - `Bridger` Allows for defining bridge args per profile entry count. By default 'proxy' routing is implemented as described in the docs.# This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can ...
<commit_before><commit_msg>Add a generic bridging app - `Bridger` Allows for defining bridge args per profile entry count. By default 'proxy' routing is implemented as described in the docs.<commit_after># This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was n...
9b38539c1828af1c45ac736fccda907cded65c24
examples/vds_simple.py
examples/vds_simple.py
'''A simple example of building a virtual dataset. This makes four 'source' HDF5 files, each with a 1D dataset of 100 numbers. Then it makes a single 4x100 virtual dataset in a separate file, exposing the four sources as one dataset. ''' import h5py from h5py._hl.vds import vmlist_to_kwawrgs import numpy as np # Cre...
Add simple example of using VDS
Add simple example of using VDS
Python
bsd-3-clause
h5py/h5py,h5py/h5py,h5py/h5py
Add simple example of using VDS
'''A simple example of building a virtual dataset. This makes four 'source' HDF5 files, each with a 1D dataset of 100 numbers. Then it makes a single 4x100 virtual dataset in a separate file, exposing the four sources as one dataset. ''' import h5py from h5py._hl.vds import vmlist_to_kwawrgs import numpy as np # Cre...
<commit_before><commit_msg>Add simple example of using VDS<commit_after>
'''A simple example of building a virtual dataset. This makes four 'source' HDF5 files, each with a 1D dataset of 100 numbers. Then it makes a single 4x100 virtual dataset in a separate file, exposing the four sources as one dataset. ''' import h5py from h5py._hl.vds import vmlist_to_kwawrgs import numpy as np # Cre...
Add simple example of using VDS'''A simple example of building a virtual dataset. This makes four 'source' HDF5 files, each with a 1D dataset of 100 numbers. Then it makes a single 4x100 virtual dataset in a separate file, exposing the four sources as one dataset. ''' import h5py from h5py._hl.vds import vmlist_to_kw...
<commit_before><commit_msg>Add simple example of using VDS<commit_after>'''A simple example of building a virtual dataset. This makes four 'source' HDF5 files, each with a 1D dataset of 100 numbers. Then it makes a single 4x100 virtual dataset in a separate file, exposing the four sources as one dataset. ''' import h...
9e8bce87c10e14a1961cab1a6a0275d8008b590e
djangae/contrib/auth/backends.py
djangae/contrib/auth/backends.py
from django.contrib.auth.models import User, UserPermissionStorage class AppEngineUserAPI(object): """ A custom Django authentication backend, which lets us authenticate against the Google users API """ supports_anonymous_user = True def authenticate(self, **credentials): """ ...
Add an appengine users API auth backend
Add an appengine users API auth backend
Python
bsd-3-clause
armirusco/djangae,jscissr/djangae,stucox/djangae,stucox/djangae,leekchan/djangae,jscissr/djangae,pablorecio/djangae,asendecka/djangae,kirberich/djangae,martinogden/djangae,pablorecio/djangae,potatolondon/djangae,jscissr/djangae,chargrizzle/djangae,pablorecio/djangae,chargrizzle/djangae,trik/djangae,leekchan/djangae,grz...
Add an appengine users API auth backend
from django.contrib.auth.models import User, UserPermissionStorage class AppEngineUserAPI(object): """ A custom Django authentication backend, which lets us authenticate against the Google users API """ supports_anonymous_user = True def authenticate(self, **credentials): """ ...
<commit_before><commit_msg>Add an appengine users API auth backend<commit_after>
from django.contrib.auth.models import User, UserPermissionStorage class AppEngineUserAPI(object): """ A custom Django authentication backend, which lets us authenticate against the Google users API """ supports_anonymous_user = True def authenticate(self, **credentials): """ ...
Add an appengine users API auth backendfrom django.contrib.auth.models import User, UserPermissionStorage class AppEngineUserAPI(object): """ A custom Django authentication backend, which lets us authenticate against the Google users API """ supports_anonymous_user = True def authenti...
<commit_before><commit_msg>Add an appengine users API auth backend<commit_after>from django.contrib.auth.models import User, UserPermissionStorage class AppEngineUserAPI(object): """ A custom Django authentication backend, which lets us authenticate against the Google users API """ support...
58c55d65cc32f673a378a65772e7ae447907994e
test/MSVC/pch-basics.py
test/MSVC/pch-basics.py
#!/usr/bin/env python # # __COPYRIGHT__ # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, ...
Add a test on basic PCH behavior: bulid a simple executable and a simple shared lib
Add a test on basic PCH behavior: bulid a simple executable and a simple shared lib
Python
mit
timj/scons,timj/scons,timj/scons,andrewyoung1991/scons,andrewyoung1991/scons,timj/scons,timj/scons,timj/scons,timj/scons,andrewyoung1991/scons,andrewyoung1991/scons,timj/scons,andrewyoung1991/scons,andrewyoung1991/scons,timj/scons,andrewyoung1991/scons,andrewyoung1991/scons,andrewyoung1991/scons
Add a test on basic PCH behavior: bulid a simple executable and a simple shared lib
#!/usr/bin/env python # # __COPYRIGHT__ # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, ...
<commit_before><commit_msg>Add a test on basic PCH behavior: bulid a simple executable and a simple shared lib<commit_after>
#!/usr/bin/env python # # __COPYRIGHT__ # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, ...
Add a test on basic PCH behavior: bulid a simple executable and a simple shared lib#!/usr/bin/env python # # __COPYRIGHT__ # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the # "Software"), to deal in the Software without restrictio...
<commit_before><commit_msg>Add a test on basic PCH behavior: bulid a simple executable and a simple shared lib<commit_after>#!/usr/bin/env python # # __COPYRIGHT__ # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the # "Software"), t...
27d975bf84122ec62f96ddae4777e177d562bf7e
thinc/extra/load_nlp.py
thinc/extra/load_nlp.py
import spacy SPACY_MODELS = {} def get_spacy(lang, parser=False, tagger=False, entity=False): global SPACY_MODELS if spacy is None: raise ImportError("Could not import spacy. Is it installed?") if lang not in SPACY_MODELS: SPACY_MODELS[lang] = spacy.load( lang, parser=parser, t...
Add loader for spaCy, with singleton
Add loader for spaCy, with singleton
Python
mit
spacy-io/thinc,explosion/thinc,spacy-io/thinc,explosion/thinc,explosion/thinc,spacy-io/thinc,explosion/thinc
Add loader for spaCy, with singleton
import spacy SPACY_MODELS = {} def get_spacy(lang, parser=False, tagger=False, entity=False): global SPACY_MODELS if spacy is None: raise ImportError("Could not import spacy. Is it installed?") if lang not in SPACY_MODELS: SPACY_MODELS[lang] = spacy.load( lang, parser=parser, t...
<commit_before><commit_msg>Add loader for spaCy, with singleton<commit_after>
import spacy SPACY_MODELS = {} def get_spacy(lang, parser=False, tagger=False, entity=False): global SPACY_MODELS if spacy is None: raise ImportError("Could not import spacy. Is it installed?") if lang not in SPACY_MODELS: SPACY_MODELS[lang] = spacy.load( lang, parser=parser, t...
Add loader for spaCy, with singletonimport spacy SPACY_MODELS = {} def get_spacy(lang, parser=False, tagger=False, entity=False): global SPACY_MODELS if spacy is None: raise ImportError("Could not import spacy. Is it installed?") if lang not in SPACY_MODELS: SPACY_MODELS[lang] = spacy.load...
<commit_before><commit_msg>Add loader for spaCy, with singleton<commit_after>import spacy SPACY_MODELS = {} def get_spacy(lang, parser=False, tagger=False, entity=False): global SPACY_MODELS if spacy is None: raise ImportError("Could not import spacy. Is it installed?") if lang not in SPACY_MODELS...
31a42391445846cf2c8c4ace5319df92df8e5e96
plugins/vars/default_vars.py
plugins/vars/default_vars.py
# -*- coding: utf-8 -*- # (c) 2014, Craig Tracey <craigtracey@gmail.com> # # This module is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version...
Add a default variable plugin
Add a default variable plugin As it stands right now, there are a number of scenarios where we would like to be more DRY. We have multiple environments that we support and copying and pasting variables from one environment to the next is a recipe for disaster. Therefore provide an optional group_vars wrapper plugin.
Python
mit
nirajdp76/ursula,narengan/ursula,pbannister/ursula,nirajdp76/ursula,pgraziano/ursula,davidcusatis/ursula,edtubillara/ursula,j2sol/ursula,MaheshIBM/ursula,masteinhauser/ursula,knandya/ursula,blueboxjesse/ursula,twaldrop/ursula,sivakom/ursula,nirajdp76/ursula,blueboxgroup/ursula,greghaynes/ursula,rongzhus/ursula,blueboxj...
Add a default variable plugin As it stands right now, there are a number of scenarios where we would like to be more DRY. We have multiple environments that we support and copying and pasting variables from one environment to the next is a recipe for disaster. Therefore provide an optional group_vars wrapper plugin.
# -*- coding: utf-8 -*- # (c) 2014, Craig Tracey <craigtracey@gmail.com> # # This module is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version...
<commit_before><commit_msg>Add a default variable plugin As it stands right now, there are a number of scenarios where we would like to be more DRY. We have multiple environments that we support and copying and pasting variables from one environment to the next is a recipe for disaster. Therefore provide an optional g...
# -*- coding: utf-8 -*- # (c) 2014, Craig Tracey <craigtracey@gmail.com> # # This module is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version...
Add a default variable plugin As it stands right now, there are a number of scenarios where we would like to be more DRY. We have multiple environments that we support and copying and pasting variables from one environment to the next is a recipe for disaster. Therefore provide an optional group_vars wrapper plugin.# ...
<commit_before><commit_msg>Add a default variable plugin As it stands right now, there are a number of scenarios where we would like to be more DRY. We have multiple environments that we support and copying and pasting variables from one environment to the next is a recipe for disaster. Therefore provide an optional g...
79dc92f7089e26f7751fdd8ef53543922750e41d
jarn/mkrelease/tests/test_scp.py
jarn/mkrelease/tests/test_scp.py
import unittest from jarn.mkrelease.scp import SCP class HasHostTests(unittest.TestCase): def test_simple(self): scp = SCP() self.assertEqual(scp.has_host('foo:bar'), True) def test_slash(self): scp = SCP() self.assertEqual(scp.has_host('foo:bar/baz'), True) def test_no...
Add tests for SCP operations.
Add tests for SCP operations.
Python
bsd-2-clause
Jarn/jarn.mkrelease
Add tests for SCP operations.
import unittest from jarn.mkrelease.scp import SCP class HasHostTests(unittest.TestCase): def test_simple(self): scp = SCP() self.assertEqual(scp.has_host('foo:bar'), True) def test_slash(self): scp = SCP() self.assertEqual(scp.has_host('foo:bar/baz'), True) def test_no...
<commit_before><commit_msg>Add tests for SCP operations.<commit_after>
import unittest from jarn.mkrelease.scp import SCP class HasHostTests(unittest.TestCase): def test_simple(self): scp = SCP() self.assertEqual(scp.has_host('foo:bar'), True) def test_slash(self): scp = SCP() self.assertEqual(scp.has_host('foo:bar/baz'), True) def test_no...
Add tests for SCP operations.import unittest from jarn.mkrelease.scp import SCP class HasHostTests(unittest.TestCase): def test_simple(self): scp = SCP() self.assertEqual(scp.has_host('foo:bar'), True) def test_slash(self): scp = SCP() self.assertEqual(scp.has_host('foo:bar/...
<commit_before><commit_msg>Add tests for SCP operations.<commit_after>import unittest from jarn.mkrelease.scp import SCP class HasHostTests(unittest.TestCase): def test_simple(self): scp = SCP() self.assertEqual(scp.has_host('foo:bar'), True) def test_slash(self): scp = SCP() ...
da1a7ceb0dafdeb14b366139e0ec13fe95c55c00
scripts/generate_manifest.py
scripts/generate_manifest.py
#!/usr/bin/env python # -*- coding: utf-8 -*- import os import sys import json import yaml def merge_dicts(a, b): if not (isinstance(a, dict) and isinstance(b, dict)): raise ValueError("Error merging variables: '{}' and '{}'".format( type(a).__name__, type(b).__name__ )) result ...
Add a script to generate PaaS manifest with environment variables
Add a script to generate PaaS manifest with environment variables `./scripts/generate_manifest.py` takes a path to a PaaS manifest file and a list of variable files and prints a single CloudFoundry manifest. The generated manifest replaces all `inherit` keys by loading the data from parent manifests. This allows us t...
Python
mit
alphagov/notifications-api,alphagov/notifications-api
Add a script to generate PaaS manifest with environment variables `./scripts/generate_manifest.py` takes a path to a PaaS manifest file and a list of variable files and prints a single CloudFoundry manifest. The generated manifest replaces all `inherit` keys by loading the data from parent manifests. This allows us t...
#!/usr/bin/env python # -*- coding: utf-8 -*- import os import sys import json import yaml def merge_dicts(a, b): if not (isinstance(a, dict) and isinstance(b, dict)): raise ValueError("Error merging variables: '{}' and '{}'".format( type(a).__name__, type(b).__name__ )) result ...
<commit_before><commit_msg>Add a script to generate PaaS manifest with environment variables `./scripts/generate_manifest.py` takes a path to a PaaS manifest file and a list of variable files and prints a single CloudFoundry manifest. The generated manifest replaces all `inherit` keys by loading the data from parent ...
#!/usr/bin/env python # -*- coding: utf-8 -*- import os import sys import json import yaml def merge_dicts(a, b): if not (isinstance(a, dict) and isinstance(b, dict)): raise ValueError("Error merging variables: '{}' and '{}'".format( type(a).__name__, type(b).__name__ )) result ...
Add a script to generate PaaS manifest with environment variables `./scripts/generate_manifest.py` takes a path to a PaaS manifest file and a list of variable files and prints a single CloudFoundry manifest. The generated manifest replaces all `inherit` keys by loading the data from parent manifests. This allows us t...
<commit_before><commit_msg>Add a script to generate PaaS manifest with environment variables `./scripts/generate_manifest.py` takes a path to a PaaS manifest file and a list of variable files and prints a single CloudFoundry manifest. The generated manifest replaces all `inherit` keys by loading the data from parent ...
b1af7e4d1a6ee0b954406af5a65936a011db3269
openstack/common/fixture/mockpatch.py
openstack/common/fixture/mockpatch.py
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2010 United States Government as represented by the # Administrator of the National Aeronautics and Space Administration. # Copyright 2013 Hewlett-Packard Development Company, L.P. # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "Li...
Add a fixture for dealing with mock patching.
Add a fixture for dealing with mock patching. Quantum uses a pattern all over their test base, which can be collapsed down into a simple re-usable fixture. Change-Id: I5944505ce44ce8b79a685c3ea392f001307b5319
Python
apache-2.0
openstack/oslotest,openstack/oslotest
Add a fixture for dealing with mock patching. Quantum uses a pattern all over their test base, which can be collapsed down into a simple re-usable fixture. Change-Id: I5944505ce44ce8b79a685c3ea392f001307b5319
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2010 United States Government as represented by the # Administrator of the National Aeronautics and Space Administration. # Copyright 2013 Hewlett-Packard Development Company, L.P. # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "Li...
<commit_before><commit_msg>Add a fixture for dealing with mock patching. Quantum uses a pattern all over their test base, which can be collapsed down into a simple re-usable fixture. Change-Id: I5944505ce44ce8b79a685c3ea392f001307b5319<commit_after>
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2010 United States Government as represented by the # Administrator of the National Aeronautics and Space Administration. # Copyright 2013 Hewlett-Packard Development Company, L.P. # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "Li...
Add a fixture for dealing with mock patching. Quantum uses a pattern all over their test base, which can be collapsed down into a simple re-usable fixture. Change-Id: I5944505ce44ce8b79a685c3ea392f001307b5319# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2010 United States Government as represented by the #...
<commit_before><commit_msg>Add a fixture for dealing with mock patching. Quantum uses a pattern all over their test base, which can be collapsed down into a simple re-usable fixture. Change-Id: I5944505ce44ce8b79a685c3ea392f001307b5319<commit_after># vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2010 United ...
d70f973b8b77ad30f6c6d893adda90d2a084d7bb
scripts/mc_monitor_correlator.py
scripts/mc_monitor_correlator.py
#! /usr/bin/env python # -*- mode: python; coding: utf-8 -*- # Copyright 2018 the HERA Collaboration # Licensed under the 2-clause BSD license. """Gather correlator status info and log them into M&C """ from __future__ import absolute_import, division, print_function import sqlalchemy.exc import sys import time impo...
Add monitoring daemon for correlator control state
Add monitoring daemon for correlator control state
Python
bsd-2-clause
HERA-Team/hera_mc,HERA-Team/Monitor_and_Control,HERA-Team/hera_mc
Add monitoring daemon for correlator control state
#! /usr/bin/env python # -*- mode: python; coding: utf-8 -*- # Copyright 2018 the HERA Collaboration # Licensed under the 2-clause BSD license. """Gather correlator status info and log them into M&C """ from __future__ import absolute_import, division, print_function import sqlalchemy.exc import sys import time impo...
<commit_before><commit_msg>Add monitoring daemon for correlator control state<commit_after>
#! /usr/bin/env python # -*- mode: python; coding: utf-8 -*- # Copyright 2018 the HERA Collaboration # Licensed under the 2-clause BSD license. """Gather correlator status info and log them into M&C """ from __future__ import absolute_import, division, print_function import sqlalchemy.exc import sys import time impo...
Add monitoring daemon for correlator control state#! /usr/bin/env python # -*- mode: python; coding: utf-8 -*- # Copyright 2018 the HERA Collaboration # Licensed under the 2-clause BSD license. """Gather correlator status info and log them into M&C """ from __future__ import absolute_import, division, print_function ...
<commit_before><commit_msg>Add monitoring daemon for correlator control state<commit_after>#! /usr/bin/env python # -*- mode: python; coding: utf-8 -*- # Copyright 2018 the HERA Collaboration # Licensed under the 2-clause BSD license. """Gather correlator status info and log them into M&C """ from __future__ import a...
2d88b2ffaa3c6348fcc246185e48abc52ee8804d
backends.py
backends.py
from django.contrib.auth.backends import ModelBackend from .decorators import monitor_login class MonitoredModelBackend(ModelBackend): @monitor_login def authenticate(self, **credentials): super(MonitoredModelBackend, self).authenticate(**credentials)
Add monitored model auth backend
Add monitored model auth backend
Python
bsd-3-clause
mysociety/django-failedloginblocker
Add monitored model auth backend
from django.contrib.auth.backends import ModelBackend from .decorators import monitor_login class MonitoredModelBackend(ModelBackend): @monitor_login def authenticate(self, **credentials): super(MonitoredModelBackend, self).authenticate(**credentials)
<commit_before><commit_msg>Add monitored model auth backend<commit_after>
from django.contrib.auth.backends import ModelBackend from .decorators import monitor_login class MonitoredModelBackend(ModelBackend): @monitor_login def authenticate(self, **credentials): super(MonitoredModelBackend, self).authenticate(**credentials)
Add monitored model auth backendfrom django.contrib.auth.backends import ModelBackend from .decorators import monitor_login class MonitoredModelBackend(ModelBackend): @monitor_login def authenticate(self, **credentials): super(MonitoredModelBackend, self).authenticate(**credentials)
<commit_before><commit_msg>Add monitored model auth backend<commit_after>from django.contrib.auth.backends import ModelBackend from .decorators import monitor_login class MonitoredModelBackend(ModelBackend): @monitor_login def authenticate(self, **credentials): super(MonitoredModelBackend, self).aut...
f665fd7c8e3100427d589c9f82c847526aa41c86
test_aversion.py
test_aversion.py
# Copyright 2013 Rackspace # 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...
Set up test file and add tests on quoted_split().
Set up test file and add tests on quoted_split().
Python
apache-2.0
klmitch/aversion
Set up test file and add tests on quoted_split().
# Copyright 2013 Rackspace # 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...
<commit_before><commit_msg>Set up test file and add tests on quoted_split().<commit_after>
# Copyright 2013 Rackspace # 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...
Set up test file and add tests on quoted_split().# Copyright 2013 Rackspace # 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/l...
<commit_before><commit_msg>Set up test file and add tests on quoted_split().<commit_after># Copyright 2013 Rackspace # 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 Licen...
cc7ea8b4e51e1f5d8e580dea89141dcca7032c32
ureport/polls/migrations/0052_auto_20180327_2024.py
ureport/polls/migrations/0052_auto_20180327_2024.py
# -*- coding: utf-8 -*- # Generated by Django 1.11.11 on 2018-03-27 20:24 from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('polls', '0051_auto_20180316_0912'), ] operations = [ migrations.AlterField...
Add default value and constraints migrations
Add default value and constraints migrations
Python
agpl-3.0
Ilhasoft/ureport,rapidpro/ureport,rapidpro/ureport,rapidpro/ureport,Ilhasoft/ureport,Ilhasoft/ureport,Ilhasoft/ureport,rapidpro/ureport
Add default value and constraints migrations
# -*- coding: utf-8 -*- # Generated by Django 1.11.11 on 2018-03-27 20:24 from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('polls', '0051_auto_20180316_0912'), ] operations = [ migrations.AlterField...
<commit_before><commit_msg>Add default value and constraints migrations<commit_after>
# -*- coding: utf-8 -*- # Generated by Django 1.11.11 on 2018-03-27 20:24 from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('polls', '0051_auto_20180316_0912'), ] operations = [ migrations.AlterField...
Add default value and constraints migrations# -*- coding: utf-8 -*- # Generated by Django 1.11.11 on 2018-03-27 20:24 from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('polls', '0051_auto_20180316_0912'), ] ...
<commit_before><commit_msg>Add default value and constraints migrations<commit_after># -*- coding: utf-8 -*- # Generated by Django 1.11.11 on 2018-03-27 20:24 from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('polls'...
c466242d652683f8d22164f7b322399100961bcc
anytownlib/maps.py
anytownlib/maps.py
"""Functions to retrieve images for the maps.""" def _retrieve_google_maps_image_url(coords, zoom_level): lat, lng = coords return ( 'http://maps.googleapis.com/maps/api/staticmap?center={0},{1}&zoom={2}' '&scale=false&size=600x300&maptype=roadmap&format=png' '&markers=size:small%7Ccol...
Add Anytown Maps utils library
Add Anytown Maps utils library
Python
mit
andrewyang96/AnytownMapper,andrewyang96/AnytownMapper,andrewyang96/AnytownMapper
Add Anytown Maps utils library
"""Functions to retrieve images for the maps.""" def _retrieve_google_maps_image_url(coords, zoom_level): lat, lng = coords return ( 'http://maps.googleapis.com/maps/api/staticmap?center={0},{1}&zoom={2}' '&scale=false&size=600x300&maptype=roadmap&format=png' '&markers=size:small%7Ccol...
<commit_before><commit_msg>Add Anytown Maps utils library<commit_after>
"""Functions to retrieve images for the maps.""" def _retrieve_google_maps_image_url(coords, zoom_level): lat, lng = coords return ( 'http://maps.googleapis.com/maps/api/staticmap?center={0},{1}&zoom={2}' '&scale=false&size=600x300&maptype=roadmap&format=png' '&markers=size:small%7Ccol...
Add Anytown Maps utils library"""Functions to retrieve images for the maps.""" def _retrieve_google_maps_image_url(coords, zoom_level): lat, lng = coords return ( 'http://maps.googleapis.com/maps/api/staticmap?center={0},{1}&zoom={2}' '&scale=false&size=600x300&maptype=roadmap&format=png' ...
<commit_before><commit_msg>Add Anytown Maps utils library<commit_after>"""Functions to retrieve images for the maps.""" def _retrieve_google_maps_image_url(coords, zoom_level): lat, lng = coords return ( 'http://maps.googleapis.com/maps/api/staticmap?center={0},{1}&zoom={2}' '&scale=false&size...
b9a28ad7358b64211905957ef854026cf03764c8
keras_tf_atrous_bug.py
keras_tf_atrous_bug.py
import numpy as np from keras.models import Model from keras.layers import Input, AtrousConvolution1D inp = Input((100, 1)) M = AtrousConvolution1D(1, 2, atrous_rate=25, border_mode='same')(inp) M = Model(inp, M) M.compile('sgd', 'mse') M.train_on_batch(np.random.rand(1, 100, 1), np.random.rand(1, 100, 1))
Introduce Keras TF atrous bug
Introduce Keras TF atrous bug
Python
apache-2.0
israelg99/eva
Introduce Keras TF atrous bug
import numpy as np from keras.models import Model from keras.layers import Input, AtrousConvolution1D inp = Input((100, 1)) M = AtrousConvolution1D(1, 2, atrous_rate=25, border_mode='same')(inp) M = Model(inp, M) M.compile('sgd', 'mse') M.train_on_batch(np.random.rand(1, 100, 1), np.random.rand(1, 100, 1))
<commit_before><commit_msg>Introduce Keras TF atrous bug<commit_after>
import numpy as np from keras.models import Model from keras.layers import Input, AtrousConvolution1D inp = Input((100, 1)) M = AtrousConvolution1D(1, 2, atrous_rate=25, border_mode='same')(inp) M = Model(inp, M) M.compile('sgd', 'mse') M.train_on_batch(np.random.rand(1, 100, 1), np.random.rand(1, 100, 1))
Introduce Keras TF atrous bugimport numpy as np from keras.models import Model from keras.layers import Input, AtrousConvolution1D inp = Input((100, 1)) M = AtrousConvolution1D(1, 2, atrous_rate=25, border_mode='same')(inp) M = Model(inp, M) M.compile('sgd', 'mse') M.train_on_batch(np.random.rand(1, 100, 1), np.rando...
<commit_before><commit_msg>Introduce Keras TF atrous bug<commit_after>import numpy as np from keras.models import Model from keras.layers import Input, AtrousConvolution1D inp = Input((100, 1)) M = AtrousConvolution1D(1, 2, atrous_rate=25, border_mode='same')(inp) M = Model(inp, M) M.compile('sgd', 'mse') M.train_on_...
d9f60cba7af74dd724306111b366dda78b363236
common/djangoapps/django_comment_common/migrations/0008_role_user_index.py
common/djangoapps/django_comment_common/migrations/0008_role_user_index.py
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('django_comment_common', '0007_discussionsidmapping'), ] operations = [ migrations.RunSQL( 'CREATE INDEX dcc_role_users_u...
Add a (user_id, role_id) index to dcc_role_users table.
Add a (user_id, role_id) index to dcc_role_users table.
Python
agpl-3.0
ESOedX/edx-platform,philanthropy-u/edx-platform,EDUlib/edx-platform,eduNEXT/edunext-platform,ESOedX/edx-platform,msegado/edx-platform,philanthropy-u/edx-platform,ahmedaljazzar/edx-platform,eduNEXT/edx-platform,ESOedX/edx-platform,ahmedaljazzar/edx-platform,edx-solutions/edx-platform,edx-solutions/edx-platform,EDUlib/ed...
Add a (user_id, role_id) index to dcc_role_users table.
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('django_comment_common', '0007_discussionsidmapping'), ] operations = [ migrations.RunSQL( 'CREATE INDEX dcc_role_users_u...
<commit_before><commit_msg>Add a (user_id, role_id) index to dcc_role_users table.<commit_after>
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('django_comment_common', '0007_discussionsidmapping'), ] operations = [ migrations.RunSQL( 'CREATE INDEX dcc_role_users_u...
Add a (user_id, role_id) index to dcc_role_users table.# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('django_comment_common', '0007_discussionsidmapping'), ] operations = [ migrat...
<commit_before><commit_msg>Add a (user_id, role_id) index to dcc_role_users table.<commit_after># -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('django_comment_common', '0007_discussionsidmapping'),...
86de63f819a67aafd71e1565266e1bec09bc62c2
corehq/apps/accounting/management/commands/find_inactive_custom_modules.py
corehq/apps/accounting/management/commands/find_inactive_custom_modules.py
from __future__ import print_function from __future__ import absolute_import from __future__ import unicode_literals import csv from collections import defaultdict from django.apps import apps from django.core.management import BaseCommand from django.conf import settings from importlib import import_module from cor...
Add management command to identify stale custom modules
Add management command to identify stale custom modules
Python
bsd-3-clause
dimagi/commcare-hq,dimagi/commcare-hq,dimagi/commcare-hq,dimagi/commcare-hq,dimagi/commcare-hq
Add management command to identify stale custom modules
from __future__ import print_function from __future__ import absolute_import from __future__ import unicode_literals import csv from collections import defaultdict from django.apps import apps from django.core.management import BaseCommand from django.conf import settings from importlib import import_module from cor...
<commit_before><commit_msg>Add management command to identify stale custom modules<commit_after>
from __future__ import print_function from __future__ import absolute_import from __future__ import unicode_literals import csv from collections import defaultdict from django.apps import apps from django.core.management import BaseCommand from django.conf import settings from importlib import import_module from cor...
Add management command to identify stale custom modulesfrom __future__ import print_function from __future__ import absolute_import from __future__ import unicode_literals import csv from collections import defaultdict from django.apps import apps from django.core.management import BaseCommand from django.conf import...
<commit_before><commit_msg>Add management command to identify stale custom modules<commit_after>from __future__ import print_function from __future__ import absolute_import from __future__ import unicode_literals import csv from collections import defaultdict from django.apps import apps from django.core.management i...
b47bf6a862075af25d7dbfa022f403997474414d
dragonflow/common/utils.py
dragonflow/common/utils.py
# Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the...
Add Dargonflow DFDaemon base class
Add Dargonflow DFDaemon base class Change-Id: Ie84681792cdc13b3127a95a18121d4b9a8ff8dba
Python
apache-2.0
FrankDuan/df_code,openstack/dragonflow,openstack/dragonflow,FrankDuan/df_code,FrankDuan/df_code,openstack/dragonflow
Add Dargonflow DFDaemon base class Change-Id: Ie84681792cdc13b3127a95a18121d4b9a8ff8dba
# Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the...
<commit_before><commit_msg>Add Dargonflow DFDaemon base class Change-Id: Ie84681792cdc13b3127a95a18121d4b9a8ff8dba<commit_after>
# Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the...
Add Dargonflow DFDaemon base class Change-Id: Ie84681792cdc13b3127a95a18121d4b9a8ff8dba# 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 # # Unl...
<commit_before><commit_msg>Add Dargonflow DFDaemon base class Change-Id: Ie84681792cdc13b3127a95a18121d4b9a8ff8dba<commit_after># 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://ww...
551f3de948b6b0a7338dbb2e1783a407b724fc04
tests/v6/test_spawn_primitive_generators.py
tests/v6/test_spawn_primitive_generators.py
import pytest from .exemplar_generators import EXEMPLAR_PRIMITIVE_GENERATORS @pytest.mark.parametrize("g", EXEMPLAR_PRIMITIVE_GENERATORS) def test_spawn_primitive_generators(g): """ Test that primitive generators can be spawned and the spawned versions produce the same elements. """ num_items = 50 ...
Add test that spawns of primitive generators produce the same elements as the original
Add test that spawns of primitive generators produce the same elements as the original
Python
mit
maxalbert/tohu
Add test that spawns of primitive generators produce the same elements as the original
import pytest from .exemplar_generators import EXEMPLAR_PRIMITIVE_GENERATORS @pytest.mark.parametrize("g", EXEMPLAR_PRIMITIVE_GENERATORS) def test_spawn_primitive_generators(g): """ Test that primitive generators can be spawned and the spawned versions produce the same elements. """ num_items = 50 ...
<commit_before><commit_msg>Add test that spawns of primitive generators produce the same elements as the original<commit_after>
import pytest from .exemplar_generators import EXEMPLAR_PRIMITIVE_GENERATORS @pytest.mark.parametrize("g", EXEMPLAR_PRIMITIVE_GENERATORS) def test_spawn_primitive_generators(g): """ Test that primitive generators can be spawned and the spawned versions produce the same elements. """ num_items = 50 ...
Add test that spawns of primitive generators produce the same elements as the originalimport pytest from .exemplar_generators import EXEMPLAR_PRIMITIVE_GENERATORS @pytest.mark.parametrize("g", EXEMPLAR_PRIMITIVE_GENERATORS) def test_spawn_primitive_generators(g): """ Test that primitive generators can be spaw...
<commit_before><commit_msg>Add test that spawns of primitive generators produce the same elements as the original<commit_after>import pytest from .exemplar_generators import EXEMPLAR_PRIMITIVE_GENERATORS @pytest.mark.parametrize("g", EXEMPLAR_PRIMITIVE_GENERATORS) def test_spawn_primitive_generators(g): """ T...
b39d03cf5e4ca514da6e8d0f20e0d5e8960c191c
server/src/weblab/db/upgrade/regular/versions/3fab9480c190_professor_instructor.py
server/src/weblab/db/upgrade/regular/versions/3fab9480c190_professor_instructor.py
"""professor => instructor Revision ID: 3fab9480c190 Revises: 31ded1f6ad6 Create Date: 2014-02-17 00:56:12.566690 """ # revision identifiers, used by Alembic. revision = '3fab9480c190' down_revision = '31ded1f6ad6' from alembic import op import sqlalchemy as sa metadata = sa.MetaData() role = sa.Table('Role', meta...
Use instructor instead of professor
Use instructor instead of professor
Python
bsd-2-clause
morelab/weblabdeusto,zstars/weblabdeusto,weblabdeusto/weblabdeusto,porduna/weblabdeusto,weblabdeusto/weblabdeusto,morelab/weblabdeusto,weblabdeusto/weblabdeusto,zstars/weblabdeusto,morelab/weblabdeusto,morelab/weblabdeusto,morelab/weblabdeusto,porduna/weblabdeusto,zstars/weblabdeusto,weblabdeusto/weblabdeusto,porduna/w...
Use instructor instead of professor
"""professor => instructor Revision ID: 3fab9480c190 Revises: 31ded1f6ad6 Create Date: 2014-02-17 00:56:12.566690 """ # revision identifiers, used by Alembic. revision = '3fab9480c190' down_revision = '31ded1f6ad6' from alembic import op import sqlalchemy as sa metadata = sa.MetaData() role = sa.Table('Role', meta...
<commit_before><commit_msg>Use instructor instead of professor<commit_after>
"""professor => instructor Revision ID: 3fab9480c190 Revises: 31ded1f6ad6 Create Date: 2014-02-17 00:56:12.566690 """ # revision identifiers, used by Alembic. revision = '3fab9480c190' down_revision = '31ded1f6ad6' from alembic import op import sqlalchemy as sa metadata = sa.MetaData() role = sa.Table('Role', meta...
Use instructor instead of professor"""professor => instructor Revision ID: 3fab9480c190 Revises: 31ded1f6ad6 Create Date: 2014-02-17 00:56:12.566690 """ # revision identifiers, used by Alembic. revision = '3fab9480c190' down_revision = '31ded1f6ad6' from alembic import op import sqlalchemy as sa metadata = sa.Meta...
<commit_before><commit_msg>Use instructor instead of professor<commit_after>"""professor => instructor Revision ID: 3fab9480c190 Revises: 31ded1f6ad6 Create Date: 2014-02-17 00:56:12.566690 """ # revision identifiers, used by Alembic. revision = '3fab9480c190' down_revision = '31ded1f6ad6' from alembic import op im...
2192cf4caa93a2b9c2a4332ba59c40175e8f977b
gscripts/ipython_imports.py
gscripts/ipython_imports.py
import numpy as np import pandas as pd import matplotlib_venn import matplotlib.pyplot as plt import brewer2mpl set1 = brewer2mpl.get_map('Set1', 'qualitative', 9).mpl_colors red = set1[0] blue = set1[1] green = set1[2] purple = set1[3] orange = set1[4] yellow = set1[5] brown = set1[6] pink = set1[7] grey = set1[8]
Add file for easy ipython imports
Add file for easy ipython imports
Python
mit
YeoLab/gscripts,YeoLab/gscripts,YeoLab/gscripts,YeoLab/gscripts
Add file for easy ipython imports
import numpy as np import pandas as pd import matplotlib_venn import matplotlib.pyplot as plt import brewer2mpl set1 = brewer2mpl.get_map('Set1', 'qualitative', 9).mpl_colors red = set1[0] blue = set1[1] green = set1[2] purple = set1[3] orange = set1[4] yellow = set1[5] brown = set1[6] pink = set1[7] grey = set1[8]
<commit_before><commit_msg>Add file for easy ipython imports<commit_after>
import numpy as np import pandas as pd import matplotlib_venn import matplotlib.pyplot as plt import brewer2mpl set1 = brewer2mpl.get_map('Set1', 'qualitative', 9).mpl_colors red = set1[0] blue = set1[1] green = set1[2] purple = set1[3] orange = set1[4] yellow = set1[5] brown = set1[6] pink = set1[7] grey = set1[8]
Add file for easy ipython importsimport numpy as np import pandas as pd import matplotlib_venn import matplotlib.pyplot as plt import brewer2mpl set1 = brewer2mpl.get_map('Set1', 'qualitative', 9).mpl_colors red = set1[0] blue = set1[1] green = set1[2] purple = set1[3] orange = set1[4] yellow = set1[5] brown = set1[6]...
<commit_before><commit_msg>Add file for easy ipython imports<commit_after>import numpy as np import pandas as pd import matplotlib_venn import matplotlib.pyplot as plt import brewer2mpl set1 = brewer2mpl.get_map('Set1', 'qualitative', 9).mpl_colors red = set1[0] blue = set1[1] green = set1[2] purple = set1[3] orange =...
55755871c240289238072602eefd9eed14d7e70e
bin/combine-examples.py
bin/combine-examples.py
#!/usr/bin/python import re import sys def main(argv): examples = {} requires = set() for filename in argv[1:]: lines = open(filename, 'rU').readlines() if len(lines) > 0 and lines[0].startswith('// NOCOMPILE'): continue requires.update(line for line in lines if line.s...
#!/usr/bin/python import re import sys def main(argv): examples = {} requires = set() for filename in argv[1:]: lines = open(filename, 'rU').readlines() if len(lines) > 0 and lines[0].startswith('// NOCOMPILE'): continue requires.update(line for line in lines if line.s...
Use write to avoid newline problems
Use write to avoid newline problems
Python
bsd-2-clause
elemoine/ol3,gingerik/ol3,itayod/ol3,stweil/ol3,bill-chadwick/ol3,epointal/ol3,adube/ol3,denilsonsa/ol3,fblackburn/ol3,xiaoqqchen/ol3,bogdanvaduva/ol3,landonb/ol3,tsauerwein/ol3,klokantech/ol3,landonb/ol3,bjornharrtell/ol3,llambanna/ol3,gingerik/ol3,gingerik/ol3,Distem/ol3,bjornharrtell/ol3,Distem/ol3,richstoner/ol3,kl...
#!/usr/bin/python import re import sys def main(argv): examples = {} requires = set() for filename in argv[1:]: lines = open(filename, 'rU').readlines() if len(lines) > 0 and lines[0].startswith('// NOCOMPILE'): continue requires.update(line for line in lines if line.s...
#!/usr/bin/python import re import sys def main(argv): examples = {} requires = set() for filename in argv[1:]: lines = open(filename, 'rU').readlines() if len(lines) > 0 and lines[0].startswith('// NOCOMPILE'): continue requires.update(line for line in lines if line.s...
<commit_before>#!/usr/bin/python import re import sys def main(argv): examples = {} requires = set() for filename in argv[1:]: lines = open(filename, 'rU').readlines() if len(lines) > 0 and lines[0].startswith('// NOCOMPILE'): continue requires.update(line for line in ...
#!/usr/bin/python import re import sys def main(argv): examples = {} requires = set() for filename in argv[1:]: lines = open(filename, 'rU').readlines() if len(lines) > 0 and lines[0].startswith('// NOCOMPILE'): continue requires.update(line for line in lines if line.s...
#!/usr/bin/python import re import sys def main(argv): examples = {} requires = set() for filename in argv[1:]: lines = open(filename, 'rU').readlines() if len(lines) > 0 and lines[0].startswith('// NOCOMPILE'): continue requires.update(line for line in lines if line.s...
<commit_before>#!/usr/bin/python import re import sys def main(argv): examples = {} requires = set() for filename in argv[1:]: lines = open(filename, 'rU').readlines() if len(lines) > 0 and lines[0].startswith('// NOCOMPILE'): continue requires.update(line for line in ...
ecf0105a48c479f28d2e83a5816ab9b021186562
REF/search-by-keyword.py
REF/search-by-keyword.py
import sys import xml.etree.ElementTree as ET def getkeywords(filename): with open(filename) as kwfile: terms = () for line in kwfile: terms += ( '"' + line.rstrip('\n') + '"' ,) return terms def simpleSearch(phraseterm, proxies=None): import requests svcbase = \ ...
Add the published keyword search proggy
Add the published keyword search proggy
Python
mit
ijjorama/Impact
Add the published keyword search proggy
import sys import xml.etree.ElementTree as ET def getkeywords(filename): with open(filename) as kwfile: terms = () for line in kwfile: terms += ( '"' + line.rstrip('\n') + '"' ,) return terms def simpleSearch(phraseterm, proxies=None): import requests svcbase = \ ...
<commit_before><commit_msg>Add the published keyword search proggy<commit_after>
import sys import xml.etree.ElementTree as ET def getkeywords(filename): with open(filename) as kwfile: terms = () for line in kwfile: terms += ( '"' + line.rstrip('\n') + '"' ,) return terms def simpleSearch(phraseterm, proxies=None): import requests svcbase = \ ...
Add the published keyword search proggyimport sys import xml.etree.ElementTree as ET def getkeywords(filename): with open(filename) as kwfile: terms = () for line in kwfile: terms += ( '"' + line.rstrip('\n') + '"' ,) return terms def simpleSearch(phraseterm, proxies=None): ...
<commit_before><commit_msg>Add the published keyword search proggy<commit_after>import sys import xml.etree.ElementTree as ET def getkeywords(filename): with open(filename) as kwfile: terms = () for line in kwfile: terms += ( '"' + line.rstrip('\n') + '"' ,) return terms def ...
149c546cb70f45ee8128966bfe1af8e8a10958b0
largedatatest/createdata.py
largedatatest/createdata.py
#!/usr/bin/env python import h5py import random X = 500 Y = 500 f = h5py.File('/tmp/test-datafile.hdf5', 'w') dset = f.create_dataset("default", (X, Y), dtype='float64') for x in xrange(X): for y in xrange(Y): dset[x,y] = random.random() f.close()
Add largedatatest for testing a large data set from an hdf5 file
Add largedatatest for testing a large data set from an hdf5 file
Python
apache-2.0
matyasselmeci/dask_condor,matyasselmeci/dask_condor
Add largedatatest for testing a large data set from an hdf5 file
#!/usr/bin/env python import h5py import random X = 500 Y = 500 f = h5py.File('/tmp/test-datafile.hdf5', 'w') dset = f.create_dataset("default", (X, Y), dtype='float64') for x in xrange(X): for y in xrange(Y): dset[x,y] = random.random() f.close()
<commit_before><commit_msg>Add largedatatest for testing a large data set from an hdf5 file<commit_after>
#!/usr/bin/env python import h5py import random X = 500 Y = 500 f = h5py.File('/tmp/test-datafile.hdf5', 'w') dset = f.create_dataset("default", (X, Y), dtype='float64') for x in xrange(X): for y in xrange(Y): dset[x,y] = random.random() f.close()
Add largedatatest for testing a large data set from an hdf5 file#!/usr/bin/env python import h5py import random X = 500 Y = 500 f = h5py.File('/tmp/test-datafile.hdf5', 'w') dset = f.create_dataset("default", (X, Y), dtype='float64') for x in xrange(X): for y in xrange(Y): dset[x,y] = random.random() f....
<commit_before><commit_msg>Add largedatatest for testing a large data set from an hdf5 file<commit_after>#!/usr/bin/env python import h5py import random X = 500 Y = 500 f = h5py.File('/tmp/test-datafile.hdf5', 'w') dset = f.create_dataset("default", (X, Y), dtype='float64') for x in xrange(X): for y in xrange(Y...
a840dfbcfbefd2827226c4b27aa29cf7854dc36a
autoscaling/delete-old-launch-configuration.py
autoscaling/delete-old-launch-configuration.py
#!/usr/bin/env python import re import sys import boto.ec2.autoscale from boto.ec2.autoscale import LaunchConfiguration def main(REGION, pattern): print('Checking new launch configuration in the "{0}" region.'.format(REGION)) asConnection = boto.ec2.autoscale.connect_to_region(REGION) lc = asConnection.g...
Add script to delete old launch configuration
Add script to delete old launch configuration
Python
mit
tendant/aws-script
Add script to delete old launch configuration
#!/usr/bin/env python import re import sys import boto.ec2.autoscale from boto.ec2.autoscale import LaunchConfiguration def main(REGION, pattern): print('Checking new launch configuration in the "{0}" region.'.format(REGION)) asConnection = boto.ec2.autoscale.connect_to_region(REGION) lc = asConnection.g...
<commit_before><commit_msg>Add script to delete old launch configuration<commit_after>
#!/usr/bin/env python import re import sys import boto.ec2.autoscale from boto.ec2.autoscale import LaunchConfiguration def main(REGION, pattern): print('Checking new launch configuration in the "{0}" region.'.format(REGION)) asConnection = boto.ec2.autoscale.connect_to_region(REGION) lc = asConnection.g...
Add script to delete old launch configuration#!/usr/bin/env python import re import sys import boto.ec2.autoscale from boto.ec2.autoscale import LaunchConfiguration def main(REGION, pattern): print('Checking new launch configuration in the "{0}" region.'.format(REGION)) asConnection = boto.ec2.autoscale.conne...
<commit_before><commit_msg>Add script to delete old launch configuration<commit_after>#!/usr/bin/env python import re import sys import boto.ec2.autoscale from boto.ec2.autoscale import LaunchConfiguration def main(REGION, pattern): print('Checking new launch configuration in the "{0}" region.'.format(REGION)) ...
3ba0b1cde749d92a6966e45e29c1dcf8fee54a0d
scripts/instrumentationRunner.py
scripts/instrumentationRunner.py
""" Submits the apks to BrowserStack to run the instrumentation tests. """ import os import shlex import subprocess from subprocess import PIPE import sys import json def appendData(command, dataUrl): var = 'data={\"url\": \"%s\"}' % dataUrl return command + " " + json.dumps(var) def buildTestCommand(appToke...
Add a python script to schedule runs on browserstack
Add a python script to schedule runs on browserstack
Python
apache-2.0
dimagi/commcare-android,dimagi/commcare-android,dimagi/commcare-android,dimagi/commcare-android,dimagi/commcare-android,dimagi/commcare-android
Add a python script to schedule runs on browserstack
""" Submits the apks to BrowserStack to run the instrumentation tests. """ import os import shlex import subprocess from subprocess import PIPE import sys import json def appendData(command, dataUrl): var = 'data={\"url\": \"%s\"}' % dataUrl return command + " " + json.dumps(var) def buildTestCommand(appToke...
<commit_before><commit_msg>Add a python script to schedule runs on browserstack<commit_after>
""" Submits the apks to BrowserStack to run the instrumentation tests. """ import os import shlex import subprocess from subprocess import PIPE import sys import json def appendData(command, dataUrl): var = 'data={\"url\": \"%s\"}' % dataUrl return command + " " + json.dumps(var) def buildTestCommand(appToke...
Add a python script to schedule runs on browserstack""" Submits the apks to BrowserStack to run the instrumentation tests. """ import os import shlex import subprocess from subprocess import PIPE import sys import json def appendData(command, dataUrl): var = 'data={\"url\": \"%s\"}' % dataUrl return command +...
<commit_before><commit_msg>Add a python script to schedule runs on browserstack<commit_after>""" Submits the apks to BrowserStack to run the instrumentation tests. """ import os import shlex import subprocess from subprocess import PIPE import sys import json def appendData(command, dataUrl): var = 'data={\"url\"...
790163173efb34e2b9b0ad0d8927057836f0ad51
examples/grouped_violinplots.py
examples/grouped_violinplots.py
""" Grouped violinplots with split violins ====================================== """ import seaborn as sns sns.set(style="darkgrid", palette="pastel", color_codes=True) # Load the example tips dataset tips = sns.load_dataset("tips") # Draw a nested violinplot and split the violins for easier comparison sns.violinpl...
Add a split violin example script
Add a split violin example script
Python
bsd-3-clause
jat255/seaborn,clarkfitzg/seaborn,bsipocz/seaborn,uhjish/seaborn,mwaskom/seaborn,ashhher3/seaborn,sinhrks/seaborn,sauliusl/seaborn,q1ang/seaborn,nileracecrew/seaborn,lypzln/seaborn,phobson/seaborn,mwaskom/seaborn,arokem/seaborn,lukauskas/seaborn,olgabot/seaborn,parantapa/seaborn,muku42/seaborn,anntzer/seaborn,kyleam/se...
Add a split violin example script
""" Grouped violinplots with split violins ====================================== """ import seaborn as sns sns.set(style="darkgrid", palette="pastel", color_codes=True) # Load the example tips dataset tips = sns.load_dataset("tips") # Draw a nested violinplot and split the violins for easier comparison sns.violinpl...
<commit_before><commit_msg>Add a split violin example script<commit_after>
""" Grouped violinplots with split violins ====================================== """ import seaborn as sns sns.set(style="darkgrid", palette="pastel", color_codes=True) # Load the example tips dataset tips = sns.load_dataset("tips") # Draw a nested violinplot and split the violins for easier comparison sns.violinpl...
Add a split violin example script""" Grouped violinplots with split violins ====================================== """ import seaborn as sns sns.set(style="darkgrid", palette="pastel", color_codes=True) # Load the example tips dataset tips = sns.load_dataset("tips") # Draw a nested violinplot and split the violins f...
<commit_before><commit_msg>Add a split violin example script<commit_after>""" Grouped violinplots with split violins ====================================== """ import seaborn as sns sns.set(style="darkgrid", palette="pastel", color_codes=True) # Load the example tips dataset tips = sns.load_dataset("tips") # Draw a ...
fa5d8bbd194a7903d1f6cdc8057a76a4f3752b21
h5shuffle.py
h5shuffle.py
from __future__ import division import argparse import numpy as np import h5py def main(): parser = argparse.ArgumentParser() parser.add_argument('file', type=str) args = parser.parse_args() f = h5py.File(args.file, 'r+') inds = None for key, dataset in f.iteritems(): if inds is ...
Add script for shuffling the first axis of each entry in a h5 file
Add script for shuffling the first axis of each entry in a h5 file
Python
mit
alexlee-gk/visual_dynamics
Add script for shuffling the first axis of each entry in a h5 file
from __future__ import division import argparse import numpy as np import h5py def main(): parser = argparse.ArgumentParser() parser.add_argument('file', type=str) args = parser.parse_args() f = h5py.File(args.file, 'r+') inds = None for key, dataset in f.iteritems(): if inds is ...
<commit_before><commit_msg>Add script for shuffling the first axis of each entry in a h5 file<commit_after>
from __future__ import division import argparse import numpy as np import h5py def main(): parser = argparse.ArgumentParser() parser.add_argument('file', type=str) args = parser.parse_args() f = h5py.File(args.file, 'r+') inds = None for key, dataset in f.iteritems(): if inds is ...
Add script for shuffling the first axis of each entry in a h5 filefrom __future__ import division import argparse import numpy as np import h5py def main(): parser = argparse.ArgumentParser() parser.add_argument('file', type=str) args = parser.parse_args() f = h5py.File(args.file, 'r+') inds...
<commit_before><commit_msg>Add script for shuffling the first axis of each entry in a h5 file<commit_after>from __future__ import division import argparse import numpy as np import h5py def main(): parser = argparse.ArgumentParser() parser.add_argument('file', type=str) args = parser.parse_args() ...
3f4f55f3232546ea407672522f6223a9548b3167
tests/pycurl_object_test.py
tests/pycurl_object_test.py
#! /usr/bin/env python # -*- coding: iso-8859-1 -*- # vi:ts=4:et import pycurl import unittest import sys class PycurlObjectTest(unittest.TestCase): def setUp(self): self.curl = pycurl.Curl() def tearDown(self): self.curl.close() def test_set_attribute(self): assert not h...
Add a test for general object behavior as it seems to be changed by python 3 patch
Add a test for general object behavior as it seems to be changed by python 3 patch
Python
lgpl-2.1
pycurl/pycurl,pycurl/pycurl,pycurl/pycurl
Add a test for general object behavior as it seems to be changed by python 3 patch
#! /usr/bin/env python # -*- coding: iso-8859-1 -*- # vi:ts=4:et import pycurl import unittest import sys class PycurlObjectTest(unittest.TestCase): def setUp(self): self.curl = pycurl.Curl() def tearDown(self): self.curl.close() def test_set_attribute(self): assert not h...
<commit_before><commit_msg>Add a test for general object behavior as it seems to be changed by python 3 patch<commit_after>
#! /usr/bin/env python # -*- coding: iso-8859-1 -*- # vi:ts=4:et import pycurl import unittest import sys class PycurlObjectTest(unittest.TestCase): def setUp(self): self.curl = pycurl.Curl() def tearDown(self): self.curl.close() def test_set_attribute(self): assert not h...
Add a test for general object behavior as it seems to be changed by python 3 patch#! /usr/bin/env python # -*- coding: iso-8859-1 -*- # vi:ts=4:et import pycurl import unittest import sys class PycurlObjectTest(unittest.TestCase): def setUp(self): self.curl = pycurl.Curl() def tearDown(self): ...
<commit_before><commit_msg>Add a test for general object behavior as it seems to be changed by python 3 patch<commit_after>#! /usr/bin/env python # -*- coding: iso-8859-1 -*- # vi:ts=4:et import pycurl import unittest import sys class PycurlObjectTest(unittest.TestCase): def setUp(self): self.curl = pycur...
4c4bf05e34d46a396c3ac124c5f78bf37d142580
nodeconductor/structure/migrations/0037_remove_customer_billing_backend_id.py
nodeconductor/structure/migrations/0037_remove_customer_billing_backend_id.py
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('structure', '0036_add_vat_fields'), ] operations = [ migrations.RemoveField( model_name='customer', ...
Remove customer billing backend id
Remove customer billing backend id - nc-1554
Python
mit
opennode/nodeconductor,opennode/nodeconductor,opennode/nodeconductor
Remove customer billing backend id - nc-1554
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('structure', '0036_add_vat_fields'), ] operations = [ migrations.RemoveField( model_name='customer', ...
<commit_before><commit_msg>Remove customer billing backend id - nc-1554<commit_after>
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('structure', '0036_add_vat_fields'), ] operations = [ migrations.RemoveField( model_name='customer', ...
Remove customer billing backend id - nc-1554# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('structure', '0036_add_vat_fields'), ] operations = [ migrations.RemoveField( ...
<commit_before><commit_msg>Remove customer billing backend id - nc-1554<commit_after># -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('structure', '0036_add_vat_fields'), ] operati...
dbf71a7f4973d22259e81e095402d39acb823651
pymatgen/symmetry/tests/test_spacegroup.py
pymatgen/symmetry/tests/test_spacegroup.py
#!/usr/bin/env python ''' Created on Mar 12, 2012 ''' from __future__ import division __author__="Shyue Ping Ong" __copyright__ = "Copyright 2012, The Materials Project" __version__ = "0.1" __maintainer__ = "Shyue Ping Ong" __email__ = "shyue@mit.edu" __date__ = "Mar 12, 2012" import unittest import os from pymatg...
Add a unittest for spacegroup. Still very basic.
Add a unittest for spacegroup. Still very basic.
Python
mit
rousseab/pymatgen,ctoher/pymatgen,yanikou19/pymatgen,ctoher/pymatgen,sonium0/pymatgen,yanikou19/pymatgen,Bismarrck/pymatgen,migueldiascosta/pymatgen,ctoher/pymatgen,Bismarrck/pymatgen,Dioptas/pymatgen,sonium0/pymatgen,migueldiascosta/pymatgen,Bismarrck/pymatgen,Bismarrck/pymatgen,sonium0/pymatgen,rousseab/pymatgen,yani...
Add a unittest for spacegroup. Still very basic.
#!/usr/bin/env python ''' Created on Mar 12, 2012 ''' from __future__ import division __author__="Shyue Ping Ong" __copyright__ = "Copyright 2012, The Materials Project" __version__ = "0.1" __maintainer__ = "Shyue Ping Ong" __email__ = "shyue@mit.edu" __date__ = "Mar 12, 2012" import unittest import os from pymatg...
<commit_before><commit_msg>Add a unittest for spacegroup. Still very basic.<commit_after>
#!/usr/bin/env python ''' Created on Mar 12, 2012 ''' from __future__ import division __author__="Shyue Ping Ong" __copyright__ = "Copyright 2012, The Materials Project" __version__ = "0.1" __maintainer__ = "Shyue Ping Ong" __email__ = "shyue@mit.edu" __date__ = "Mar 12, 2012" import unittest import os from pymatg...
Add a unittest for spacegroup. Still very basic.#!/usr/bin/env python ''' Created on Mar 12, 2012 ''' from __future__ import division __author__="Shyue Ping Ong" __copyright__ = "Copyright 2012, The Materials Project" __version__ = "0.1" __maintainer__ = "Shyue Ping Ong" __email__ = "shyue@mit.edu" __date__ = "Mar 1...
<commit_before><commit_msg>Add a unittest for spacegroup. Still very basic.<commit_after>#!/usr/bin/env python ''' Created on Mar 12, 2012 ''' from __future__ import division __author__="Shyue Ping Ong" __copyright__ = "Copyright 2012, The Materials Project" __version__ = "0.1" __maintainer__ = "Shyue Ping Ong" __em...
1098f43d5fb02328ce4708bd5a8c1b5f8ac23f51
py/optimal-division.py
py/optimal-division.py
class Solution(object): def optimalDivision(self, nums): """ :type nums: List[int] :rtype: str """ min_result, max_result = dict(), dict() lnums = len(nums) def find_cut(start, end, need_max): if start + 1 == end: return 0, (nums[s...
Add py solution for 553. Optimal Division
Add py solution for 553. Optimal Division 553. Optimal Division: https://leetcode.com/problems/optimal-division/
Python
apache-2.0
ckclark/leetcode,ckclark/leetcode,ckclark/leetcode,ckclark/leetcode,ckclark/leetcode,ckclark/leetcode
Add py solution for 553. Optimal Division 553. Optimal Division: https://leetcode.com/problems/optimal-division/
class Solution(object): def optimalDivision(self, nums): """ :type nums: List[int] :rtype: str """ min_result, max_result = dict(), dict() lnums = len(nums) def find_cut(start, end, need_max): if start + 1 == end: return 0, (nums[s...
<commit_before><commit_msg>Add py solution for 553. Optimal Division 553. Optimal Division: https://leetcode.com/problems/optimal-division/<commit_after>
class Solution(object): def optimalDivision(self, nums): """ :type nums: List[int] :rtype: str """ min_result, max_result = dict(), dict() lnums = len(nums) def find_cut(start, end, need_max): if start + 1 == end: return 0, (nums[s...
Add py solution for 553. Optimal Division 553. Optimal Division: https://leetcode.com/problems/optimal-division/class Solution(object): def optimalDivision(self, nums): """ :type nums: List[int] :rtype: str """ min_result, max_result = dict(), dict() lnums = len(nums...
<commit_before><commit_msg>Add py solution for 553. Optimal Division 553. Optimal Division: https://leetcode.com/problems/optimal-division/<commit_after>class Solution(object): def optimalDivision(self, nums): """ :type nums: List[int] :rtype: str """ min_result, max_result ...
0ebd6e8e5e8c09f15e6170de03965de150edca22
crawler/crawler.py
crawler/crawler.py
#!/usr/bin/env python # -*- coding: utf-8 -*- from __future__ import absolute_import import re import requests from lxml import html class Songlist(object): def __init__(self, url): self.url = url response = requests.get(url) self.tree = html.fromstring(response.text) def _get_num...
Add a class for getting meta info from a songlist
Add a class for getting meta info from a songlist
Python
mit
lord63/wangyi_music_top100,lord63/wangyi_music_top100,lord63/wangyi_music_top100
Add a class for getting meta info from a songlist
#!/usr/bin/env python # -*- coding: utf-8 -*- from __future__ import absolute_import import re import requests from lxml import html class Songlist(object): def __init__(self, url): self.url = url response = requests.get(url) self.tree = html.fromstring(response.text) def _get_num...
<commit_before><commit_msg>Add a class for getting meta info from a songlist<commit_after>
#!/usr/bin/env python # -*- coding: utf-8 -*- from __future__ import absolute_import import re import requests from lxml import html class Songlist(object): def __init__(self, url): self.url = url response = requests.get(url) self.tree = html.fromstring(response.text) def _get_num...
Add a class for getting meta info from a songlist#!/usr/bin/env python # -*- coding: utf-8 -*- from __future__ import absolute_import import re import requests from lxml import html class Songlist(object): def __init__(self, url): self.url = url response = requests.get(url) self.tree =...
<commit_before><commit_msg>Add a class for getting meta info from a songlist<commit_after>#!/usr/bin/env python # -*- coding: utf-8 -*- from __future__ import absolute_import import re import requests from lxml import html class Songlist(object): def __init__(self, url): self.url = url respons...
c00a32f913d7e22e7405b4560f8c618ea20071b8
python/cluster-test.py
python/cluster-test.py
#!/usr/bin/env python # Copyright (C) 2010 Red Hat, Inc. # # This is free software; you can redistribute it and/or modify it # under the terms of the GNU Lesser General Public License as # published by the Free Software Foundation; either version 2.1 of # the License, or (at your option) any later version. # # This so...
Add a simple python clusters test
Add a simple python clusters test
Python
lgpl-2.1
colloquium/rhevm-api,markmc/rhevm-api,colloquium/rhevm-api,markmc/rhevm-api,markmc/rhevm-api
Add a simple python clusters test
#!/usr/bin/env python # Copyright (C) 2010 Red Hat, Inc. # # This is free software; you can redistribute it and/or modify it # under the terms of the GNU Lesser General Public License as # published by the Free Software Foundation; either version 2.1 of # the License, or (at your option) any later version. # # This so...
<commit_before><commit_msg>Add a simple python clusters test<commit_after>
#!/usr/bin/env python # Copyright (C) 2010 Red Hat, Inc. # # This is free software; you can redistribute it and/or modify it # under the terms of the GNU Lesser General Public License as # published by the Free Software Foundation; either version 2.1 of # the License, or (at your option) any later version. # # This so...
Add a simple python clusters test#!/usr/bin/env python # Copyright (C) 2010 Red Hat, Inc. # # This is free software; you can redistribute it and/or modify it # under the terms of the GNU Lesser General Public License as # published by the Free Software Foundation; either version 2.1 of # the License, or (at your optio...
<commit_before><commit_msg>Add a simple python clusters test<commit_after>#!/usr/bin/env python # Copyright (C) 2010 Red Hat, Inc. # # This is free software; you can redistribute it and/or modify it # under the terms of the GNU Lesser General Public License as # published by the Free Software Foundation; either versio...
669a2edf8fd92b8473a8e4fe45ff2afb41babfbb
algorithms/ids.py
algorithms/ids.py
""" pynpuzzle - Solve n-puzzle with Python Iterative deepening depth-first search algorithm Version : 1.0.0 Author : Hamidreza Mahdavipanah Repository: http://github.com/mahdavipanah/pynpuzzle License : MIT License """ from .util.tree_search import Node def search(state, goal_state): """Iterative deepening dept...
Add Iterative deepening depth-first algorithm
Add Iterative deepening depth-first algorithm
Python
mit
mahdavipanah/pynpuzzle
Add Iterative deepening depth-first algorithm
""" pynpuzzle - Solve n-puzzle with Python Iterative deepening depth-first search algorithm Version : 1.0.0 Author : Hamidreza Mahdavipanah Repository: http://github.com/mahdavipanah/pynpuzzle License : MIT License """ from .util.tree_search import Node def search(state, goal_state): """Iterative deepening dept...
<commit_before><commit_msg>Add Iterative deepening depth-first algorithm<commit_after>
""" pynpuzzle - Solve n-puzzle with Python Iterative deepening depth-first search algorithm Version : 1.0.0 Author : Hamidreza Mahdavipanah Repository: http://github.com/mahdavipanah/pynpuzzle License : MIT License """ from .util.tree_search import Node def search(state, goal_state): """Iterative deepening dept...
Add Iterative deepening depth-first algorithm""" pynpuzzle - Solve n-puzzle with Python Iterative deepening depth-first search algorithm Version : 1.0.0 Author : Hamidreza Mahdavipanah Repository: http://github.com/mahdavipanah/pynpuzzle License : MIT License """ from .util.tree_search import Node def search(state,...
<commit_before><commit_msg>Add Iterative deepening depth-first algorithm<commit_after>""" pynpuzzle - Solve n-puzzle with Python Iterative deepening depth-first search algorithm Version : 1.0.0 Author : Hamidreza Mahdavipanah Repository: http://github.com/mahdavipanah/pynpuzzle License : MIT License """ from .util.tr...
4f36b66690425998ecf803c459ca652e75ae9fca
src/examples/python/extractor_metadata.py
src/examples/python/extractor_metadata.py
import sys import os, fnmatch from essentia.standard import MetadataReader, YamlOutput from essentia import Pool FILE_EXT = ('.mp3', '.flac', '.ogg') def find_files(directory, pattern): for root, dirs, files in os.walk(directory): for basename in files: if basename.lower().endswith(pattern): ...
Add script for metadata extraction given a folder
Add script for metadata extraction given a folder - Extracts audio file metadata using MetadataReader for all audio files in a given folder
Python
agpl-3.0
carthach/essentia,carthach/essentia,arseneyr/essentia,MTG/essentia,carthach/essentia,carthach/essentia,MTG/essentia,carthach/essentia,arseneyr/essentia,arseneyr/essentia,MTG/essentia,MTG/essentia,MTG/essentia,arseneyr/essentia,arseneyr/essentia
Add script for metadata extraction given a folder - Extracts audio file metadata using MetadataReader for all audio files in a given folder
import sys import os, fnmatch from essentia.standard import MetadataReader, YamlOutput from essentia import Pool FILE_EXT = ('.mp3', '.flac', '.ogg') def find_files(directory, pattern): for root, dirs, files in os.walk(directory): for basename in files: if basename.lower().endswith(pattern): ...
<commit_before><commit_msg>Add script for metadata extraction given a folder - Extracts audio file metadata using MetadataReader for all audio files in a given folder<commit_after>
import sys import os, fnmatch from essentia.standard import MetadataReader, YamlOutput from essentia import Pool FILE_EXT = ('.mp3', '.flac', '.ogg') def find_files(directory, pattern): for root, dirs, files in os.walk(directory): for basename in files: if basename.lower().endswith(pattern): ...
Add script for metadata extraction given a folder - Extracts audio file metadata using MetadataReader for all audio files in a given folderimport sys import os, fnmatch from essentia.standard import MetadataReader, YamlOutput from essentia import Pool FILE_EXT = ('.mp3', '.flac', '.ogg') def find_files(directory, ...
<commit_before><commit_msg>Add script for metadata extraction given a folder - Extracts audio file metadata using MetadataReader for all audio files in a given folder<commit_after>import sys import os, fnmatch from essentia.standard import MetadataReader, YamlOutput from essentia import Pool FILE_EXT = ('.mp3', '.f...
a71ce9fb543c7108f8c606bc46674cfad0ff8cc7
migrations/versions/0218_another_letter_org.py
migrations/versions/0218_another_letter_org.py
"""empty message Revision ID: 0218_another_letter_org Revises: 0217_default_email_branding """ # revision identifiers, used by Alembic. revision = '0218_another_letter_org' down_revision = '0217_default_email_branding' from alembic import op NEW_ORGANISATIONS = [ ('511', 'NHS'), ] def upgrade(): for num...
Add NHS logo for letters
Add NHS logo for letters Matches: https://github.com/alphagov/notifications-template-preview/pull/192
Python
mit
alphagov/notifications-api,alphagov/notifications-api
Add NHS logo for letters Matches: https://github.com/alphagov/notifications-template-preview/pull/192
"""empty message Revision ID: 0218_another_letter_org Revises: 0217_default_email_branding """ # revision identifiers, used by Alembic. revision = '0218_another_letter_org' down_revision = '0217_default_email_branding' from alembic import op NEW_ORGANISATIONS = [ ('511', 'NHS'), ] def upgrade(): for num...
<commit_before><commit_msg>Add NHS logo for letters Matches: https://github.com/alphagov/notifications-template-preview/pull/192<commit_after>
"""empty message Revision ID: 0218_another_letter_org Revises: 0217_default_email_branding """ # revision identifiers, used by Alembic. revision = '0218_another_letter_org' down_revision = '0217_default_email_branding' from alembic import op NEW_ORGANISATIONS = [ ('511', 'NHS'), ] def upgrade(): for num...
Add NHS logo for letters Matches: https://github.com/alphagov/notifications-template-preview/pull/192"""empty message Revision ID: 0218_another_letter_org Revises: 0217_default_email_branding """ # revision identifiers, used by Alembic. revision = '0218_another_letter_org' down_revision = '0217_default_email_brandi...
<commit_before><commit_msg>Add NHS logo for letters Matches: https://github.com/alphagov/notifications-template-preview/pull/192<commit_after>"""empty message Revision ID: 0218_another_letter_org Revises: 0217_default_email_branding """ # revision identifiers, used by Alembic. revision = '0218_another_letter_org' d...
6aa2e5d3b8519ae3b8e21431e4eaf34dd9d34f9f
tests/test_wysiwyg_editor.py
tests/test_wysiwyg_editor.py
from . import TheInternetTestCase from helium.api import click, Text, press, CONTROL, COMMAND, write from sys import platform class WYSIWYGEditorTest(TheInternetTestCase): def get_page(self): return "http://the-internet.herokuapp.com/tinymce" def test_use_wysiwyg_editor(self): self.assertTrue(Text("Your content ...
Add test case for tinyMCE (WYSIWYG editor).
Add test case for tinyMCE (WYSIWYG editor).
Python
mit
bugfree-software/the-internet-solution-python
Add test case for tinyMCE (WYSIWYG editor).
from . import TheInternetTestCase from helium.api import click, Text, press, CONTROL, COMMAND, write from sys import platform class WYSIWYGEditorTest(TheInternetTestCase): def get_page(self): return "http://the-internet.herokuapp.com/tinymce" def test_use_wysiwyg_editor(self): self.assertTrue(Text("Your content ...
<commit_before><commit_msg>Add test case for tinyMCE (WYSIWYG editor).<commit_after>
from . import TheInternetTestCase from helium.api import click, Text, press, CONTROL, COMMAND, write from sys import platform class WYSIWYGEditorTest(TheInternetTestCase): def get_page(self): return "http://the-internet.herokuapp.com/tinymce" def test_use_wysiwyg_editor(self): self.assertTrue(Text("Your content ...
Add test case for tinyMCE (WYSIWYG editor).from . import TheInternetTestCase from helium.api import click, Text, press, CONTROL, COMMAND, write from sys import platform class WYSIWYGEditorTest(TheInternetTestCase): def get_page(self): return "http://the-internet.herokuapp.com/tinymce" def test_use_wysiwyg_editor(s...
<commit_before><commit_msg>Add test case for tinyMCE (WYSIWYG editor).<commit_after>from . import TheInternetTestCase from helium.api import click, Text, press, CONTROL, COMMAND, write from sys import platform class WYSIWYGEditorTest(TheInternetTestCase): def get_page(self): return "http://the-internet.herokuapp.co...
b8a410bc2f54a89e0e44100a890183fcd6a88e3e
tools/convert-url-history.py
tools/convert-url-history.py
#!/usr/bin/env python # Copyright 2009 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...
Add initial URL history importer
Add initial URL history importer
Python
apache-2.0
jimmsta/namebench-1,catap/namebench
Add initial URL history importer
#!/usr/bin/env python # Copyright 2009 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...
<commit_before><commit_msg>Add initial URL history importer<commit_after>
#!/usr/bin/env python # Copyright 2009 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...
Add initial URL history importer#!/usr/bin/env python # Copyright 2009 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...
<commit_before><commit_msg>Add initial URL history importer<commit_after>#!/usr/bin/env python # Copyright 2009 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 a...
2759119ea8a2afe6c47575825aef9ae59c1ce921
python/misc/oo/CSStudent.py
python/misc/oo/CSStudent.py
# Code from https://www.geeksforgeeks.org/g-fact-34-class-or-static-variables-in-python/ # Copy - Paste here to test it directly # Python program to show that the variables with a value # assigned in class declaration, are class variables # Class for Computer Science Student class CSStudent: stream = 'cse' ...
Test d'un bout de code de GeeksForGeeks
Test d'un bout de code de GeeksForGeeks
Python
mit
TGITS/programming-workouts,TGITS/programming-workouts,TGITS/programming-workouts,TGITS/programming-workouts,TGITS/programming-workouts,TGITS/programming-workouts,TGITS/programming-workouts,TGITS/programming-workouts,TGITS/programming-workouts,TGITS/programming-workouts,TGITS/programming-workouts,TGITS/programming-worko...
Test d'un bout de code de GeeksForGeeks
# Code from https://www.geeksforgeeks.org/g-fact-34-class-or-static-variables-in-python/ # Copy - Paste here to test it directly # Python program to show that the variables with a value # assigned in class declaration, are class variables # Class for Computer Science Student class CSStudent: stream = 'cse' ...
<commit_before><commit_msg>Test d'un bout de code de GeeksForGeeks<commit_after>
# Code from https://www.geeksforgeeks.org/g-fact-34-class-or-static-variables-in-python/ # Copy - Paste here to test it directly # Python program to show that the variables with a value # assigned in class declaration, are class variables # Class for Computer Science Student class CSStudent: stream = 'cse' ...
Test d'un bout de code de GeeksForGeeks# Code from https://www.geeksforgeeks.org/g-fact-34-class-or-static-variables-in-python/ # Copy - Paste here to test it directly # Python program to show that the variables with a value # assigned in class declaration, are class variables # Class for Computer Science Student...
<commit_before><commit_msg>Test d'un bout de code de GeeksForGeeks<commit_after># Code from https://www.geeksforgeeks.org/g-fact-34-class-or-static-variables-in-python/ # Copy - Paste here to test it directly # Python program to show that the variables with a value # assigned in class declaration, are class variable...
49c73b00b5528706fbb340e53b37e59c8303d70d
oneflow/settings/snippets/common_production.py
oneflow/settings/snippets/common_production.py
# # Put production machines hostnames here. # # MANAGERS += (('Matthieu Chaignot', 'mc@1flow.io'), ) ALLOWED_HOSTS += [ '1flow.io', 'app.1flow.io', 'api.1flow.io', ]
# # Put production machines hostnames here. # MANAGERS += (('Matthieu Chaignot', 'mchaignot@gmail.com'), ) ALLOWED_HOSTS += [ '1flow.io', 'app.1flow.io', 'api.1flow.io', ]
Add Matthieu to MANAGERS, for him to receive the warn-closed-feed mail.
Add Matthieu to MANAGERS, for him to receive the warn-closed-feed mail.
Python
agpl-3.0
1flow/1flow,1flow/1flow,1flow/1flow,WillianPaiva/1flow,1flow/1flow,WillianPaiva/1flow,WillianPaiva/1flow,1flow/1flow,WillianPaiva/1flow,WillianPaiva/1flow
# # Put production machines hostnames here. # # MANAGERS += (('Matthieu Chaignot', 'mc@1flow.io'), ) ALLOWED_HOSTS += [ '1flow.io', 'app.1flow.io', 'api.1flow.io', ] Add Matthieu to MANAGERS, for him to receive the warn-closed-feed mail.
# # Put production machines hostnames here. # MANAGERS += (('Matthieu Chaignot', 'mchaignot@gmail.com'), ) ALLOWED_HOSTS += [ '1flow.io', 'app.1flow.io', 'api.1flow.io', ]
<commit_before># # Put production machines hostnames here. # # MANAGERS += (('Matthieu Chaignot', 'mc@1flow.io'), ) ALLOWED_HOSTS += [ '1flow.io', 'app.1flow.io', 'api.1flow.io', ] <commit_msg>Add Matthieu to MANAGERS, for him to receive the warn-closed-feed mail.<commit_after>
# # Put production machines hostnames here. # MANAGERS += (('Matthieu Chaignot', 'mchaignot@gmail.com'), ) ALLOWED_HOSTS += [ '1flow.io', 'app.1flow.io', 'api.1flow.io', ]
# # Put production machines hostnames here. # # MANAGERS += (('Matthieu Chaignot', 'mc@1flow.io'), ) ALLOWED_HOSTS += [ '1flow.io', 'app.1flow.io', 'api.1flow.io', ] Add Matthieu to MANAGERS, for him to receive the warn-closed-feed mail.# # Put production machines hostnames here. # MANAGERS += (('Matthi...
<commit_before># # Put production machines hostnames here. # # MANAGERS += (('Matthieu Chaignot', 'mc@1flow.io'), ) ALLOWED_HOSTS += [ '1flow.io', 'app.1flow.io', 'api.1flow.io', ] <commit_msg>Add Matthieu to MANAGERS, for him to receive the warn-closed-feed mail.<commit_after># # Put production machines...
f25275dd2a65c9b962df3b522981d595c2d3809f
opendebates/migrations/0017_enable_unaccent.py
opendebates/migrations/0017_enable_unaccent.py
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.core.management import call_command from django.db import migrations, models def update_search_index(apps, schema): print("Updating search field...") call_command("update_search_field", "opendebates") print("Updating search field...
Add a migration for unaccent
Add a migration for unaccent This is on top of https://github.com/caktus/django-opendebates/pull/88
Python
apache-2.0
ejucovy/django-opendebates,ejucovy/django-opendebates,ejucovy/django-opendebates,caktus/django-opendebates,ejucovy/django-opendebates,caktus/django-opendebates,caktus/django-opendebates,caktus/django-opendebates
Add a migration for unaccent This is on top of https://github.com/caktus/django-opendebates/pull/88
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.core.management import call_command from django.db import migrations, models def update_search_index(apps, schema): print("Updating search field...") call_command("update_search_field", "opendebates") print("Updating search field...
<commit_before><commit_msg>Add a migration for unaccent This is on top of https://github.com/caktus/django-opendebates/pull/88<commit_after>
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.core.management import call_command from django.db import migrations, models def update_search_index(apps, schema): print("Updating search field...") call_command("update_search_field", "opendebates") print("Updating search field...
Add a migration for unaccent This is on top of https://github.com/caktus/django-opendebates/pull/88# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.core.management import call_command from django.db import migrations, models def update_search_index(apps, schema): print("Updating searc...
<commit_before><commit_msg>Add a migration for unaccent This is on top of https://github.com/caktus/django-opendebates/pull/88<commit_after># -*- coding: utf-8 -*- from __future__ import unicode_literals from django.core.management import call_command from django.db import migrations, models def update_search_index...
3e50e0cd6c55730bd2d2ed1c22b71ce67723a0d5
corehq/apps/data_interfaces/migrations/0018_check_for_rule_migration.py
corehq/apps/data_interfaces/migrations/0018_check_for_rule_migration.py
# -*- coding: utf-8 -*- from __future__ import unicode_literals from __future__ import absolute_import from django.db import migrations from corehq.sql_db.operations import HqRunPython def noop(*args, **kwargs): pass def assert_rule_migration_complete(apps, schema_editor): AutomaticUpdateRule = apps.get_mod...
Add blocking migration to ensure all rules have been migrated
Add blocking migration to ensure all rules have been migrated
Python
bsd-3-clause
dimagi/commcare-hq,dimagi/commcare-hq,dimagi/commcare-hq,dimagi/commcare-hq,dimagi/commcare-hq
Add blocking migration to ensure all rules have been migrated
# -*- coding: utf-8 -*- from __future__ import unicode_literals from __future__ import absolute_import from django.db import migrations from corehq.sql_db.operations import HqRunPython def noop(*args, **kwargs): pass def assert_rule_migration_complete(apps, schema_editor): AutomaticUpdateRule = apps.get_mod...
<commit_before><commit_msg>Add blocking migration to ensure all rules have been migrated<commit_after>
# -*- coding: utf-8 -*- from __future__ import unicode_literals from __future__ import absolute_import from django.db import migrations from corehq.sql_db.operations import HqRunPython def noop(*args, **kwargs): pass def assert_rule_migration_complete(apps, schema_editor): AutomaticUpdateRule = apps.get_mod...
Add blocking migration to ensure all rules have been migrated# -*- coding: utf-8 -*- from __future__ import unicode_literals from __future__ import absolute_import from django.db import migrations from corehq.sql_db.operations import HqRunPython def noop(*args, **kwargs): pass def assert_rule_migration_complete...
<commit_before><commit_msg>Add blocking migration to ensure all rules have been migrated<commit_after># -*- coding: utf-8 -*- from __future__ import unicode_literals from __future__ import absolute_import from django.db import migrations from corehq.sql_db.operations import HqRunPython def noop(*args, **kwargs): ...
2f25825812e38318076984a83a1d602d3d33bc9d
bin/tag_using_alchemy.py
bin/tag_using_alchemy.py
import copy import requests from urllib import quote_plus from optparse import OptionParser from pocketpy.auth import auth from pocketpy.pocket import retrieve KEYWORD_URL = "http://access.alchemyapi.com/calls/url/URLGetRankedKeywords" def get_keywords_from_alchemy(access_token, item_url): params = {"url": ite...
Tag using alchemy api. As request by costaclayton
Tag using alchemy api. As request by costaclayton
Python
mit
Newky/PocketPy
Tag using alchemy api. As request by costaclayton
import copy import requests from urllib import quote_plus from optparse import OptionParser from pocketpy.auth import auth from pocketpy.pocket import retrieve KEYWORD_URL = "http://access.alchemyapi.com/calls/url/URLGetRankedKeywords" def get_keywords_from_alchemy(access_token, item_url): params = {"url": ite...
<commit_before><commit_msg>Tag using alchemy api. As request by costaclayton<commit_after>
import copy import requests from urllib import quote_plus from optparse import OptionParser from pocketpy.auth import auth from pocketpy.pocket import retrieve KEYWORD_URL = "http://access.alchemyapi.com/calls/url/URLGetRankedKeywords" def get_keywords_from_alchemy(access_token, item_url): params = {"url": ite...
Tag using alchemy api. As request by costaclaytonimport copy import requests from urllib import quote_plus from optparse import OptionParser from pocketpy.auth import auth from pocketpy.pocket import retrieve KEYWORD_URL = "http://access.alchemyapi.com/calls/url/URLGetRankedKeywords" def get_keywords_from_alchemy(...
<commit_before><commit_msg>Tag using alchemy api. As request by costaclayton<commit_after>import copy import requests from urllib import quote_plus from optparse import OptionParser from pocketpy.auth import auth from pocketpy.pocket import retrieve KEYWORD_URL = "http://access.alchemyapi.com/calls/url/URLGetRankedK...
609b27736728ce17f7f05594a2a44ed1cb0a9fd2
scripts/util/dl_daily_shapefiles.py
scripts/util/dl_daily_shapefiles.py
#!/usr/bin/env python """Example script to download daily shapefiles from the dailyerosion site""" import datetime import urllib2 start_time = datetime.date(2007, 1, 1) end_time = datetime.date(2015, 9, 8) interval = datetime.timedelta(days=1) now = start_time while now < end_time: print("Downloading shapefile f...
Add example script that downloads DEP daily shapefiles
Add example script that downloads DEP daily shapefiles
Python
mit
akrherz/idep,akrherz/dep,akrherz/dep,akrherz/idep,akrherz/dep,akrherz/idep,akrherz/dep,akrherz/idep,akrherz/idep,akrherz/dep,akrherz/idep
Add example script that downloads DEP daily shapefiles
#!/usr/bin/env python """Example script to download daily shapefiles from the dailyerosion site""" import datetime import urllib2 start_time = datetime.date(2007, 1, 1) end_time = datetime.date(2015, 9, 8) interval = datetime.timedelta(days=1) now = start_time while now < end_time: print("Downloading shapefile f...
<commit_before><commit_msg>Add example script that downloads DEP daily shapefiles<commit_after>
#!/usr/bin/env python """Example script to download daily shapefiles from the dailyerosion site""" import datetime import urllib2 start_time = datetime.date(2007, 1, 1) end_time = datetime.date(2015, 9, 8) interval = datetime.timedelta(days=1) now = start_time while now < end_time: print("Downloading shapefile f...
Add example script that downloads DEP daily shapefiles#!/usr/bin/env python """Example script to download daily shapefiles from the dailyerosion site""" import datetime import urllib2 start_time = datetime.date(2007, 1, 1) end_time = datetime.date(2015, 9, 8) interval = datetime.timedelta(days=1) now = start_time wh...
<commit_before><commit_msg>Add example script that downloads DEP daily shapefiles<commit_after>#!/usr/bin/env python """Example script to download daily shapefiles from the dailyerosion site""" import datetime import urllib2 start_time = datetime.date(2007, 1, 1) end_time = datetime.date(2015, 9, 8) interval = dateti...
a5487a417d53645bb33bf4f4b466965679813890
sensu/plugins/check-static-route.py
sensu/plugins/check-static-route.py
#!/usr/bin/env python # # Checks static route for specific subnet # # Return CRITICAL if no route found # # Jose L Coello Enriquez <jlcoello@us.ibm.com> import subprocess import argparse import sys STATE_OK = 0 STATE_WARNING = 1 STATE_CRITICAL = 2 CRITICALITY = 'critical' def switch_on_criticality(): if CRITICAL...
Check for checking a static route is present for multi subnets
Check for checking a static route is present for multi subnets
Python
apache-2.0
blueboxgroup/ursula-monitoring,aacole/ursula-monitoring,aacole/ursula-monitoring,blueboxgroup/ursula-monitoring,aacole/ursula-monitoring,aacole/ursula-monitoring,blueboxgroup/ursula-monitoring,sivakom/ursula-monitoring,sivakom/ursula-monitoring,sivakom/ursula-monitoring,blueboxgroup/ursula-monitoring,sivakom/ursula-mon...
Check for checking a static route is present for multi subnets
#!/usr/bin/env python # # Checks static route for specific subnet # # Return CRITICAL if no route found # # Jose L Coello Enriquez <jlcoello@us.ibm.com> import subprocess import argparse import sys STATE_OK = 0 STATE_WARNING = 1 STATE_CRITICAL = 2 CRITICALITY = 'critical' def switch_on_criticality(): if CRITICAL...
<commit_before><commit_msg>Check for checking a static route is present for multi subnets<commit_after>
#!/usr/bin/env python # # Checks static route for specific subnet # # Return CRITICAL if no route found # # Jose L Coello Enriquez <jlcoello@us.ibm.com> import subprocess import argparse import sys STATE_OK = 0 STATE_WARNING = 1 STATE_CRITICAL = 2 CRITICALITY = 'critical' def switch_on_criticality(): if CRITICAL...
Check for checking a static route is present for multi subnets#!/usr/bin/env python # # Checks static route for specific subnet # # Return CRITICAL if no route found # # Jose L Coello Enriquez <jlcoello@us.ibm.com> import subprocess import argparse import sys STATE_OK = 0 STATE_WARNING = 1 STATE_CRITICAL = 2 CRITICAL...
<commit_before><commit_msg>Check for checking a static route is present for multi subnets<commit_after>#!/usr/bin/env python # # Checks static route for specific subnet # # Return CRITICAL if no route found # # Jose L Coello Enriquez <jlcoello@us.ibm.com> import subprocess import argparse import sys STATE_OK = 0 STAT...
e1138ebffbdfe31d4a4acdb4e164bdd767c6e8ea
saylua/wrappers.py
saylua/wrappers.py
from flask import redirect as _redirect, url_for, render_template, g from functools import wraps def login_required(f, redirect='login'): """Redirects non-logged in users to a specified location. Usage: `@login_required`, `@login_required(redirect=<url>)` """ @wraps(f) def decorated_function(*args, **kwar...
from flask import redirect as _redirect, url_for, render_template, g from functools import wraps def login_required(f, redirect='login'): """Redirects non-logged in users to a specified location. Usage: `@login_required`, `@login_required(redirect=<url>)` """ @wraps(f) def decorated_function(*args, **kwar...
Fix for no role in admin access wrapper
Fix for no role in admin access wrapper
Python
agpl-3.0
LikeMyBread/Saylua,saylua/SayluaV2,LikeMyBread/Saylua,saylua/SayluaV2,saylua/SayluaV2,LikeMyBread/Saylua,LikeMyBread/Saylua
from flask import redirect as _redirect, url_for, render_template, g from functools import wraps def login_required(f, redirect='login'): """Redirects non-logged in users to a specified location. Usage: `@login_required`, `@login_required(redirect=<url>)` """ @wraps(f) def decorated_function(*args, **kwar...
from flask import redirect as _redirect, url_for, render_template, g from functools import wraps def login_required(f, redirect='login'): """Redirects non-logged in users to a specified location. Usage: `@login_required`, `@login_required(redirect=<url>)` """ @wraps(f) def decorated_function(*args, **kwar...
<commit_before>from flask import redirect as _redirect, url_for, render_template, g from functools import wraps def login_required(f, redirect='login'): """Redirects non-logged in users to a specified location. Usage: `@login_required`, `@login_required(redirect=<url>)` """ @wraps(f) def decorated_functio...
from flask import redirect as _redirect, url_for, render_template, g from functools import wraps def login_required(f, redirect='login'): """Redirects non-logged in users to a specified location. Usage: `@login_required`, `@login_required(redirect=<url>)` """ @wraps(f) def decorated_function(*args, **kwar...
from flask import redirect as _redirect, url_for, render_template, g from functools import wraps def login_required(f, redirect='login'): """Redirects non-logged in users to a specified location. Usage: `@login_required`, `@login_required(redirect=<url>)` """ @wraps(f) def decorated_function(*args, **kwar...
<commit_before>from flask import redirect as _redirect, url_for, render_template, g from functools import wraps def login_required(f, redirect='login'): """Redirects non-logged in users to a specified location. Usage: `@login_required`, `@login_required(redirect=<url>)` """ @wraps(f) def decorated_functio...
ca11355cb4ece27ffb9fee8e9df304b43dd6b6b8
server/proposal/migrations/0034_fix_updated.py
server/proposal/migrations/0034_fix_updated.py
import django.contrib.gis.db.models.fields from django.db import migrations from django.contrib.gis.db.models import Max def fix_updated(apps, _): Proposal = apps.get_model("proposal", "Proposal") proposals = Proposal.objects.annotate(published=Max("documents__published")) for proposal in proposals: ...
Set proposal updated date to the mod date of most recent Document
Set proposal updated date to the mod date of most recent Document
Python
mit
cityofsomerville/cornerwise,cityofsomerville/citydash,cityofsomerville/cornerwise,codeforboston/cornerwise,cityofsomerville/citydash,cityofsomerville/citydash,cityofsomerville/cornerwise,cityofsomerville/citydash,cityofsomerville/cornerwise,codeforboston/cornerwise,codeforboston/cornerwise,codeforboston/cornerwise
Set proposal updated date to the mod date of most recent Document
import django.contrib.gis.db.models.fields from django.db import migrations from django.contrib.gis.db.models import Max def fix_updated(apps, _): Proposal = apps.get_model("proposal", "Proposal") proposals = Proposal.objects.annotate(published=Max("documents__published")) for proposal in proposals: ...
<commit_before><commit_msg>Set proposal updated date to the mod date of most recent Document<commit_after>
import django.contrib.gis.db.models.fields from django.db import migrations from django.contrib.gis.db.models import Max def fix_updated(apps, _): Proposal = apps.get_model("proposal", "Proposal") proposals = Proposal.objects.annotate(published=Max("documents__published")) for proposal in proposals: ...
Set proposal updated date to the mod date of most recent Documentimport django.contrib.gis.db.models.fields from django.db import migrations from django.contrib.gis.db.models import Max def fix_updated(apps, _): Proposal = apps.get_model("proposal", "Proposal") proposals = Proposal.objects.annotate(published=...
<commit_before><commit_msg>Set proposal updated date to the mod date of most recent Document<commit_after>import django.contrib.gis.db.models.fields from django.db import migrations from django.contrib.gis.db.models import Max def fix_updated(apps, _): Proposal = apps.get_model("proposal", "Proposal") proposa...
5ca5736ec9c3357f7b68ed44b3154970561a8c3d
tests/test_specify_output_dir.py
tests/test_specify_output_dir.py
# -*- coding: utf-8 -*- import pytest from cookiecutter import main @pytest.fixture def context(): """Fixture to return a valid context as known from a cookiecutter.json.""" return { u'cookiecutter': { u'email': u'raphael@hackebrot.de', u'full_name': u'Raphael Pierzina', ...
Implement a test to make sure output_dir is passed along to generate_files
Implement a test to make sure output_dir is passed along to generate_files
Python
bsd-3-clause
willingc/cookiecutter,pjbull/cookiecutter,luzfcb/cookiecutter,pjbull/cookiecutter,terryjbates/cookiecutter,stevepiercy/cookiecutter,dajose/cookiecutter,michaeljoseph/cookiecutter,cguardia/cookiecutter,hackebrot/cookiecutter,dajose/cookiecutter,willingc/cookiecutter,audreyr/cookiecutter,michaeljoseph/cookiecutter,cguard...
Implement a test to make sure output_dir is passed along to generate_files
# -*- coding: utf-8 -*- import pytest from cookiecutter import main @pytest.fixture def context(): """Fixture to return a valid context as known from a cookiecutter.json.""" return { u'cookiecutter': { u'email': u'raphael@hackebrot.de', u'full_name': u'Raphael Pierzina', ...
<commit_before><commit_msg>Implement a test to make sure output_dir is passed along to generate_files<commit_after>
# -*- coding: utf-8 -*- import pytest from cookiecutter import main @pytest.fixture def context(): """Fixture to return a valid context as known from a cookiecutter.json.""" return { u'cookiecutter': { u'email': u'raphael@hackebrot.de', u'full_name': u'Raphael Pierzina', ...
Implement a test to make sure output_dir is passed along to generate_files# -*- coding: utf-8 -*- import pytest from cookiecutter import main @pytest.fixture def context(): """Fixture to return a valid context as known from a cookiecutter.json.""" return { u'cookiecutter': { u'email': u'...
<commit_before><commit_msg>Implement a test to make sure output_dir is passed along to generate_files<commit_after># -*- coding: utf-8 -*- import pytest from cookiecutter import main @pytest.fixture def context(): """Fixture to return a valid context as known from a cookiecutter.json.""" return { u'...
e49331122001bf142e7478037d9ad8e932103657
migrations/versions/306f880b11c3_.py
migrations/versions/306f880b11c3_.py
"""empty message Revision ID: 306f880b11c3 Revises: 255f81eff867 Create Date: 2018-08-03 15:07:44.354557 """ import sqlalchemy as sa from alembic import op # revision identifiers, used by Alembic. revision = '306f880b11c3' down_revision = '255f81eff867' branch_labels = None depends_on = None def upgrade(): op....
Update cluster database to make local spark work
Update cluster database to make local spark work
Python
apache-2.0
eubr-bigsea/stand,eubr-bigsea/stand
Update cluster database to make local spark work
"""empty message Revision ID: 306f880b11c3 Revises: 255f81eff867 Create Date: 2018-08-03 15:07:44.354557 """ import sqlalchemy as sa from alembic import op # revision identifiers, used by Alembic. revision = '306f880b11c3' down_revision = '255f81eff867' branch_labels = None depends_on = None def upgrade(): op....
<commit_before><commit_msg>Update cluster database to make local spark work<commit_after>
"""empty message Revision ID: 306f880b11c3 Revises: 255f81eff867 Create Date: 2018-08-03 15:07:44.354557 """ import sqlalchemy as sa from alembic import op # revision identifiers, used by Alembic. revision = '306f880b11c3' down_revision = '255f81eff867' branch_labels = None depends_on = None def upgrade(): op....
Update cluster database to make local spark work"""empty message Revision ID: 306f880b11c3 Revises: 255f81eff867 Create Date: 2018-08-03 15:07:44.354557 """ import sqlalchemy as sa from alembic import op # revision identifiers, used by Alembic. revision = '306f880b11c3' down_revision = '255f81eff867' branch_labels =...
<commit_before><commit_msg>Update cluster database to make local spark work<commit_after>"""empty message Revision ID: 306f880b11c3 Revises: 255f81eff867 Create Date: 2018-08-03 15:07:44.354557 """ import sqlalchemy as sa from alembic import op # revision identifiers, used by Alembic. revision = '306f880b11c3' down_...
04a93e33afd41405fcc660e9cfd7de191def4657
backend/breach/tests/test_error_handling.py
backend/breach/tests/test_error_handling.py
from mock import patch from django.utils import timezone from django.test import TestCase from breach.strategy import Strategy from breach.models import Target, Victim, SampleSet class ErrorHandlingTestCase(TestCase): def setUp(self): self.target = Target.objects.create( endpoint='https://di.u...
Add strategy error handling tests
Add strategy error handling tests
Python
mit
dimriou/rupture,dimkarakostas/rupture,dimriou/rupture,dimkarakostas/rupture,dimkarakostas/rupture,dimkarakostas/rupture,dimriou/rupture,dimriou/rupture,dimkarakostas/rupture,dimriou/rupture
Add strategy error handling tests
from mock import patch from django.utils import timezone from django.test import TestCase from breach.strategy import Strategy from breach.models import Target, Victim, SampleSet class ErrorHandlingTestCase(TestCase): def setUp(self): self.target = Target.objects.create( endpoint='https://di.u...
<commit_before><commit_msg>Add strategy error handling tests<commit_after>
from mock import patch from django.utils import timezone from django.test import TestCase from breach.strategy import Strategy from breach.models import Target, Victim, SampleSet class ErrorHandlingTestCase(TestCase): def setUp(self): self.target = Target.objects.create( endpoint='https://di.u...
Add strategy error handling testsfrom mock import patch from django.utils import timezone from django.test import TestCase from breach.strategy import Strategy from breach.models import Target, Victim, SampleSet class ErrorHandlingTestCase(TestCase): def setUp(self): self.target = Target.objects.create( ...
<commit_before><commit_msg>Add strategy error handling tests<commit_after>from mock import patch from django.utils import timezone from django.test import TestCase from breach.strategy import Strategy from breach.models import Target, Victim, SampleSet class ErrorHandlingTestCase(TestCase): def setUp(self): ...
4e48b4587d8af6cce0cc083db10287c8a9f933e3
libcloud/test/loadbalancer/test_ninefold.py
libcloud/test/loadbalancer/test_ninefold.py
import sys import unittest from libcloud.loadbalancer.types import Provider from libcloud.loadbalancer.providers import get_driver class NinefoldLbTestCase(unittest.TestCase): def test_driver_instantiation(self): cls = get_driver(Provider.NINEFOLD) cls('username', 'key') if __name__ == '__main_...
Add a test case for ninefold loadbalancer driver.
Add a test case for ninefold loadbalancer driver.
Python
apache-2.0
mtekel/libcloud,Kami/libcloud,briancurtin/libcloud,mistio/libcloud,briancurtin/libcloud,Jc2k/libcloud,t-tran/libcloud,t-tran/libcloud,vongazman/libcloud,mgogoulos/libcloud,jimbobhickville/libcloud,cryptickp/libcloud,carletes/libcloud,wrigri/libcloud,sahildua2305/libcloud,munkiat/libcloud,thesquelched/libcloud,mtekel/li...
Add a test case for ninefold loadbalancer driver.
import sys import unittest from libcloud.loadbalancer.types import Provider from libcloud.loadbalancer.providers import get_driver class NinefoldLbTestCase(unittest.TestCase): def test_driver_instantiation(self): cls = get_driver(Provider.NINEFOLD) cls('username', 'key') if __name__ == '__main_...
<commit_before><commit_msg>Add a test case for ninefold loadbalancer driver.<commit_after>
import sys import unittest from libcloud.loadbalancer.types import Provider from libcloud.loadbalancer.providers import get_driver class NinefoldLbTestCase(unittest.TestCase): def test_driver_instantiation(self): cls = get_driver(Provider.NINEFOLD) cls('username', 'key') if __name__ == '__main_...
Add a test case for ninefold loadbalancer driver.import sys import unittest from libcloud.loadbalancer.types import Provider from libcloud.loadbalancer.providers import get_driver class NinefoldLbTestCase(unittest.TestCase): def test_driver_instantiation(self): cls = get_driver(Provider.NINEFOLD) ...
<commit_before><commit_msg>Add a test case for ninefold loadbalancer driver.<commit_after>import sys import unittest from libcloud.loadbalancer.types import Provider from libcloud.loadbalancer.providers import get_driver class NinefoldLbTestCase(unittest.TestCase): def test_driver_instantiation(self): cl...
bb578d4237ccaf16fe5c38842cc100cdbefc0119
senlin/tests/functional/drivers/openstack/__init__.py
senlin/tests/functional/drivers/openstack/__init__.py
# Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed unde...
# Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed unde...
Add keystone driver plugin for functional test
Add keystone driver plugin for functional test This patch adds keystone driver plugin for functional test. Change-Id: Iefa9c1b8956854ae75f672627aa3d2f9f7d22c0e
Python
apache-2.0
openstack/senlin,stackforge/senlin,tengqm/senlin-container,stackforge/senlin,openstack/senlin,tengqm/senlin-container,Alzon/senlin,Alzon/senlin,openstack/senlin
# Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed unde...
# Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed unde...
<commit_before># Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # d...
# Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed unde...
# Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed unde...
<commit_before># Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # d...
b483840cd7ec275090d41ee9a3b59b6300ea879e
glitch/renderer.py
glitch/renderer.py
from aiohttp import web import asyncio app = web.Application() async def moosic(req): print("req", type(req)) resp = web.StreamResponse() resp.content_type = "text/plain" # "audio/mpeg" await resp.prepare(req) resp.write(b"Hello, world!") for i in range(5): print(i,"...") await asyncio.sleep(i) resp.write...
Create POC streaming server using asyncio
Create POC streaming server using asyncio
Python
artistic-2.0
Rosuav/appension,MikeiLL/appension,Rosuav/appension,Rosuav/appension,MikeiLL/appension,MikeiLL/appension,Rosuav/appension,MikeiLL/appension
Create POC streaming server using asyncio
from aiohttp import web import asyncio app = web.Application() async def moosic(req): print("req", type(req)) resp = web.StreamResponse() resp.content_type = "text/plain" # "audio/mpeg" await resp.prepare(req) resp.write(b"Hello, world!") for i in range(5): print(i,"...") await asyncio.sleep(i) resp.write...
<commit_before><commit_msg>Create POC streaming server using asyncio<commit_after>
from aiohttp import web import asyncio app = web.Application() async def moosic(req): print("req", type(req)) resp = web.StreamResponse() resp.content_type = "text/plain" # "audio/mpeg" await resp.prepare(req) resp.write(b"Hello, world!") for i in range(5): print(i,"...") await asyncio.sleep(i) resp.write...
Create POC streaming server using asynciofrom aiohttp import web import asyncio app = web.Application() async def moosic(req): print("req", type(req)) resp = web.StreamResponse() resp.content_type = "text/plain" # "audio/mpeg" await resp.prepare(req) resp.write(b"Hello, world!") for i in range(5): print(i,".....
<commit_before><commit_msg>Create POC streaming server using asyncio<commit_after>from aiohttp import web import asyncio app = web.Application() async def moosic(req): print("req", type(req)) resp = web.StreamResponse() resp.content_type = "text/plain" # "audio/mpeg" await resp.prepare(req) resp.write(b"Hello, w...
0485a265c5076402acc482db6789fb46bc313451
proc_images.py
proc_images.py
import numpy as np import cv from pytesser import * from common import * def proc_ex (ex): try: text = (image_file_to_string(img_filename(ex[0])),) except IOError: print "Exception thrown" text = ("",) return text + tuple(ex) def write_txt (fname, txt): with open(fname, 'wb')...
Add code to lift text out of images
Add code to lift text out of images
Python
mit
hausdorff/i-like-you,hausdorff/i-like-you
Add code to lift text out of images
import numpy as np import cv from pytesser import * from common import * def proc_ex (ex): try: text = (image_file_to_string(img_filename(ex[0])),) except IOError: print "Exception thrown" text = ("",) return text + tuple(ex) def write_txt (fname, txt): with open(fname, 'wb')...
<commit_before><commit_msg>Add code to lift text out of images<commit_after>
import numpy as np import cv from pytesser import * from common import * def proc_ex (ex): try: text = (image_file_to_string(img_filename(ex[0])),) except IOError: print "Exception thrown" text = ("",) return text + tuple(ex) def write_txt (fname, txt): with open(fname, 'wb')...
Add code to lift text out of imagesimport numpy as np import cv from pytesser import * from common import * def proc_ex (ex): try: text = (image_file_to_string(img_filename(ex[0])),) except IOError: print "Exception thrown" text = ("",) return text + tuple(ex) def write_txt (fnam...
<commit_before><commit_msg>Add code to lift text out of images<commit_after>import numpy as np import cv from pytesser import * from common import * def proc_ex (ex): try: text = (image_file_to_string(img_filename(ex[0])),) except IOError: print "Exception thrown" text = ("",) ret...
c27f7651a933fa831f936ca90fd25ede3f79aa50
pythran/analyses/ast_matcher.py
pythran/analyses/ast_matcher.py
""" Module to looks for a specified pattern in a given AST. """ from ast import AST, iter_fields import ast class AST_no_cond(object): """ Class to specify we don't care about a field value in ast. """ def match(node, pattern): """ Check matching between an ast.Node and a pattern. AST_no_cond per...
Add ast matcher for pattern recognition
Add ast matcher for pattern recognition
Python
bsd-3-clause
artas360/pythran,pbrunet/pythran,pbrunet/pythran,hainm/pythran,artas360/pythran,artas360/pythran,hainm/pythran,pombredanne/pythran,pombredanne/pythran,serge-sans-paille/pythran,pombredanne/pythran,hainm/pythran,serge-sans-paille/pythran,pbrunet/pythran
Add ast matcher for pattern recognition
""" Module to looks for a specified pattern in a given AST. """ from ast import AST, iter_fields import ast class AST_no_cond(object): """ Class to specify we don't care about a field value in ast. """ def match(node, pattern): """ Check matching between an ast.Node and a pattern. AST_no_cond per...
<commit_before><commit_msg>Add ast matcher for pattern recognition<commit_after>
""" Module to looks for a specified pattern in a given AST. """ from ast import AST, iter_fields import ast class AST_no_cond(object): """ Class to specify we don't care about a field value in ast. """ def match(node, pattern): """ Check matching between an ast.Node and a pattern. AST_no_cond per...
Add ast matcher for pattern recognition""" Module to looks for a specified pattern in a given AST. """ from ast import AST, iter_fields import ast class AST_no_cond(object): """ Class to specify we don't care about a field value in ast. """ def match(node, pattern): """ Check matching between an ast.N...
<commit_before><commit_msg>Add ast matcher for pattern recognition<commit_after>""" Module to looks for a specified pattern in a given AST. """ from ast import AST, iter_fields import ast class AST_no_cond(object): """ Class to specify we don't care about a field value in ast. """ def match(node, pattern): ...
bb8774152e63ce8a09dbb75d43579ba145bbe08f
tests/cli/test_task.py
tests/cli/test_task.py
""" Copyright (c) 2021 Red Hat, Inc All rights reserved. This software may be modified and distributed under the terms of the BSD license. See the LICENSE file for details. """ import flexmock from atomic_reactor.cli import task from atomic_reactor.tasks import orchestrator, worker, sources, common TASK_ARGS = { ...
Add unit tests for cli.task
Add unit tests for cli.task CLOUDBLD-6300 Signed-off-by: Adam Cmiel <1217f9865bd733d1bcad0d0d64be310272c5592c@redhat.com>
Python
bsd-3-clause
fr34k8/atomic-reactor,projectatomic/atomic-reactor,projectatomic/atomic-reactor,fr34k8/atomic-reactor
Add unit tests for cli.task CLOUDBLD-6300 Signed-off-by: Adam Cmiel <1217f9865bd733d1bcad0d0d64be310272c5592c@redhat.com>
""" Copyright (c) 2021 Red Hat, Inc All rights reserved. This software may be modified and distributed under the terms of the BSD license. See the LICENSE file for details. """ import flexmock from atomic_reactor.cli import task from atomic_reactor.tasks import orchestrator, worker, sources, common TASK_ARGS = { ...
<commit_before><commit_msg>Add unit tests for cli.task CLOUDBLD-6300 Signed-off-by: Adam Cmiel <1217f9865bd733d1bcad0d0d64be310272c5592c@redhat.com><commit_after>
""" Copyright (c) 2021 Red Hat, Inc All rights reserved. This software may be modified and distributed under the terms of the BSD license. See the LICENSE file for details. """ import flexmock from atomic_reactor.cli import task from atomic_reactor.tasks import orchestrator, worker, sources, common TASK_ARGS = { ...
Add unit tests for cli.task CLOUDBLD-6300 Signed-off-by: Adam Cmiel <1217f9865bd733d1bcad0d0d64be310272c5592c@redhat.com>""" Copyright (c) 2021 Red Hat, Inc All rights reserved. This software may be modified and distributed under the terms of the BSD license. See the LICENSE file for details. """ import flexmock f...
<commit_before><commit_msg>Add unit tests for cli.task CLOUDBLD-6300 Signed-off-by: Adam Cmiel <1217f9865bd733d1bcad0d0d64be310272c5592c@redhat.com><commit_after>""" Copyright (c) 2021 Red Hat, Inc All rights reserved. This software may be modified and distributed under the terms of the BSD license. See the LICENSE ...
45eb018082d035f36d6b5d207f6f44e77a65a895
wk1/MeanOfASetOfFITSFiles.py
wk1/MeanOfASetOfFITSFiles.py
# Write your mean_fits function here: from astropy.io import fits import numpy as np def mean_fits(fitsfiles): count = 0 for fitsfile in fitsfiles: hdulist = fits.open(fitsfile) newdata = hdulist[0].data if count == 0: data = newdata else: data = data + newdata #adds matrixes ...
Read a set of FITS files and calculate the mean (average). Based on code from two previous exercizes.
Read a set of FITS files and calculate the mean (average). Based on code from two previous exercizes.
Python
mit
lokijota/datadrivenastronomymooc
Read a set of FITS files and calculate the mean (average). Based on code from two previous exercizes.
# Write your mean_fits function here: from astropy.io import fits import numpy as np def mean_fits(fitsfiles): count = 0 for fitsfile in fitsfiles: hdulist = fits.open(fitsfile) newdata = hdulist[0].data if count == 0: data = newdata else: data = data + newdata #adds matrixes ...
<commit_before><commit_msg>Read a set of FITS files and calculate the mean (average). Based on code from two previous exercizes.<commit_after>
# Write your mean_fits function here: from astropy.io import fits import numpy as np def mean_fits(fitsfiles): count = 0 for fitsfile in fitsfiles: hdulist = fits.open(fitsfile) newdata = hdulist[0].data if count == 0: data = newdata else: data = data + newdata #adds matrixes ...
Read a set of FITS files and calculate the mean (average). Based on code from two previous exercizes.# Write your mean_fits function here: from astropy.io import fits import numpy as np def mean_fits(fitsfiles): count = 0 for fitsfile in fitsfiles: hdulist = fits.open(fitsfile) newdata = hdulist[0].data...
<commit_before><commit_msg>Read a set of FITS files and calculate the mean (average). Based on code from two previous exercizes.<commit_after># Write your mean_fits function here: from astropy.io import fits import numpy as np def mean_fits(fitsfiles): count = 0 for fitsfile in fitsfiles: hdulist = fits.ope...
cac3636a2e49e088c2a43b2f21a7aa31af66d215
src/tpn/data_io.py
src/tpn/data_io.py
#!/usr/bin/env python import zipfile import cPickle import numpy as np """ track_obj: { frames: 1 by n numpy array, anchors: 1 by n numpy array, features: m by n numpy array, scores: c by n numpy array, boxes: 4 by n numpy array, rois: 4 by n numpy array } """ d...
Add function to save track proto to zip files for efficient storage and usage.
Add function to save track proto to zip files for efficient storage and usage.
Python
mit
myfavouritekk/TPN
Add function to save track proto to zip files for efficient storage and usage.
#!/usr/bin/env python import zipfile import cPickle import numpy as np """ track_obj: { frames: 1 by n numpy array, anchors: 1 by n numpy array, features: m by n numpy array, scores: c by n numpy array, boxes: 4 by n numpy array, rois: 4 by n numpy array } """ d...
<commit_before><commit_msg>Add function to save track proto to zip files for efficient storage and usage.<commit_after>
#!/usr/bin/env python import zipfile import cPickle import numpy as np """ track_obj: { frames: 1 by n numpy array, anchors: 1 by n numpy array, features: m by n numpy array, scores: c by n numpy array, boxes: 4 by n numpy array, rois: 4 by n numpy array } """ d...
Add function to save track proto to zip files for efficient storage and usage.#!/usr/bin/env python import zipfile import cPickle import numpy as np """ track_obj: { frames: 1 by n numpy array, anchors: 1 by n numpy array, features: m by n numpy array, scores: c by n numpy array, ...
<commit_before><commit_msg>Add function to save track proto to zip files for efficient storage and usage.<commit_after>#!/usr/bin/env python import zipfile import cPickle import numpy as np """ track_obj: { frames: 1 by n numpy array, anchors: 1 by n numpy array, features: m by n numpy arr...
2c175426c93f446cad6846bee141cbd9b29c5593
src/xml2csv.py
src/xml2csv.py
from bs4 import BeautifulSoup import csv import sys XML_FILE_PATH = sys.argv[1] CSV_FILE_PATH = sys.argv[2] xml_file = open(XML_FILE_PATH, 'rb').read() xml_soup = BeautifulSoup(xml_file, 'lxml-xml') variables_file = open('data/datasets_format.html', 'rb').read() variables_soup = BeautifulSoup(variables_file, 'lxml')...
Add script for converting XML datasets to CSV
Add script for converting XML datasets to CSV
Python
mit
wisner23/serenata-de-amor,marcusrehm/serenata-de-amor,wisner23/serenata-de-amor,datasciencebr/serenata-de-amor,datasciencebr/serenata-de-amor,marcusrehm/serenata-de-amor,marcusrehm/serenata-de-amor,marcusrehm/serenata-de-amor
Add script for converting XML datasets to CSV
from bs4 import BeautifulSoup import csv import sys XML_FILE_PATH = sys.argv[1] CSV_FILE_PATH = sys.argv[2] xml_file = open(XML_FILE_PATH, 'rb').read() xml_soup = BeautifulSoup(xml_file, 'lxml-xml') variables_file = open('data/datasets_format.html', 'rb').read() variables_soup = BeautifulSoup(variables_file, 'lxml')...
<commit_before><commit_msg>Add script for converting XML datasets to CSV<commit_after>
from bs4 import BeautifulSoup import csv import sys XML_FILE_PATH = sys.argv[1] CSV_FILE_PATH = sys.argv[2] xml_file = open(XML_FILE_PATH, 'rb').read() xml_soup = BeautifulSoup(xml_file, 'lxml-xml') variables_file = open('data/datasets_format.html', 'rb').read() variables_soup = BeautifulSoup(variables_file, 'lxml')...
Add script for converting XML datasets to CSVfrom bs4 import BeautifulSoup import csv import sys XML_FILE_PATH = sys.argv[1] CSV_FILE_PATH = sys.argv[2] xml_file = open(XML_FILE_PATH, 'rb').read() xml_soup = BeautifulSoup(xml_file, 'lxml-xml') variables_file = open('data/datasets_format.html', 'rb').read() variables...
<commit_before><commit_msg>Add script for converting XML datasets to CSV<commit_after>from bs4 import BeautifulSoup import csv import sys XML_FILE_PATH = sys.argv[1] CSV_FILE_PATH = sys.argv[2] xml_file = open(XML_FILE_PATH, 'rb').read() xml_soup = BeautifulSoup(xml_file, 'lxml-xml') variables_file = open('data/data...
50c21151b54759d297fdbef222aaa45c17f70027
horizon/conf/__init__.py
horizon/conf/__init__.py
import copy from django.utils.functional import LazyObject, empty from .default import HORIZON_CONFIG as DEFAULT_CONFIG class LazySettings(LazyObject): def _setup(self, name=None): from django.conf import settings HORIZON_CONFIG = copy.copy(DEFAULT_CONFIG) HORIZON_CONFIG.update(settings....
import copy from django.utils.functional import LazyObject, empty class LazySettings(LazyObject): def _setup(self, name=None): from django.conf import settings from .default import HORIZON_CONFIG as DEFAULT_CONFIG HORIZON_CONFIG = copy.copy(DEFAULT_CONFIG) HORIZON_CONFIG.update(se...
Fix circular dependencies in dashboard settings
Fix circular dependencies in dashboard settings Importing horizon.utils from dashboard local_settings.py to generate SECRET_KEY results in a sequence of imports, and horizon.conf.default module gets imported at some point. During initialization of default HORIZON_CONFIG this module uses settings.LOGIN_REDIRECT_URL and...
Python
apache-2.0
dan1/horizon-x509,rickerc/horizon_audit,Tesora/tesora-horizon,tuskar/tuskar-ui,maestro-hybrid-cloud/horizon,orbitfp7/horizon,VaneCloud/horizon,CiscoSystems/horizon,nvoron23/avos,openstack-ja/horizon,tqtran7/horizon,JioCloud/horizon,promptworks/horizon,Mirantis/mos-horizon,FNST-OpenStack/horizon,Tesora/tesora-horizon,Fr...
import copy from django.utils.functional import LazyObject, empty from .default import HORIZON_CONFIG as DEFAULT_CONFIG class LazySettings(LazyObject): def _setup(self, name=None): from django.conf import settings HORIZON_CONFIG = copy.copy(DEFAULT_CONFIG) HORIZON_CONFIG.update(settings....
import copy from django.utils.functional import LazyObject, empty class LazySettings(LazyObject): def _setup(self, name=None): from django.conf import settings from .default import HORIZON_CONFIG as DEFAULT_CONFIG HORIZON_CONFIG = copy.copy(DEFAULT_CONFIG) HORIZON_CONFIG.update(se...
<commit_before>import copy from django.utils.functional import LazyObject, empty from .default import HORIZON_CONFIG as DEFAULT_CONFIG class LazySettings(LazyObject): def _setup(self, name=None): from django.conf import settings HORIZON_CONFIG = copy.copy(DEFAULT_CONFIG) HORIZON_CONFIG.u...
import copy from django.utils.functional import LazyObject, empty class LazySettings(LazyObject): def _setup(self, name=None): from django.conf import settings from .default import HORIZON_CONFIG as DEFAULT_CONFIG HORIZON_CONFIG = copy.copy(DEFAULT_CONFIG) HORIZON_CONFIG.update(se...
import copy from django.utils.functional import LazyObject, empty from .default import HORIZON_CONFIG as DEFAULT_CONFIG class LazySettings(LazyObject): def _setup(self, name=None): from django.conf import settings HORIZON_CONFIG = copy.copy(DEFAULT_CONFIG) HORIZON_CONFIG.update(settings....
<commit_before>import copy from django.utils.functional import LazyObject, empty from .default import HORIZON_CONFIG as DEFAULT_CONFIG class LazySettings(LazyObject): def _setup(self, name=None): from django.conf import settings HORIZON_CONFIG = copy.copy(DEFAULT_CONFIG) HORIZON_CONFIG.u...
ca6de0795babfd911c49a0f66ca27cd063faf1f1
tests/test_tool.py
tests/test_tool.py
import pytest import sys import binascii import base64 from unittest import mock from io import StringIO, BytesIO, TextIOWrapper import cbor2.tool def test_stdin(monkeypatch, tmpdir): f = tmpdir.join('outfile') argv = ['-o', str(f)] inbuf = TextIOWrapper(BytesIO(binascii.unhexlify('02'))) with monkey...
Write a test for the command line tool
Write a test for the command line tool
Python
mit
agronholm/cbor2,agronholm/cbor2,agronholm/cbor2
Write a test for the command line tool
import pytest import sys import binascii import base64 from unittest import mock from io import StringIO, BytesIO, TextIOWrapper import cbor2.tool def test_stdin(monkeypatch, tmpdir): f = tmpdir.join('outfile') argv = ['-o', str(f)] inbuf = TextIOWrapper(BytesIO(binascii.unhexlify('02'))) with monkey...
<commit_before><commit_msg>Write a test for the command line tool<commit_after>
import pytest import sys import binascii import base64 from unittest import mock from io import StringIO, BytesIO, TextIOWrapper import cbor2.tool def test_stdin(monkeypatch, tmpdir): f = tmpdir.join('outfile') argv = ['-o', str(f)] inbuf = TextIOWrapper(BytesIO(binascii.unhexlify('02'))) with monkey...
Write a test for the command line toolimport pytest import sys import binascii import base64 from unittest import mock from io import StringIO, BytesIO, TextIOWrapper import cbor2.tool def test_stdin(monkeypatch, tmpdir): f = tmpdir.join('outfile') argv = ['-o', str(f)] inbuf = TextIOWrapper(BytesIO(bina...
<commit_before><commit_msg>Write a test for the command line tool<commit_after>import pytest import sys import binascii import base64 from unittest import mock from io import StringIO, BytesIO, TextIOWrapper import cbor2.tool def test_stdin(monkeypatch, tmpdir): f = tmpdir.join('outfile') argv = ['-o', str(f...
a6db84b191f5df54bab66615d48d9d0ade903229
website/addons/dropbox/tests/webtest_tests.py
website/addons/dropbox/tests/webtest_tests.py
# -*- coding: utf-8 -*- import unittest from nose.tools import * # PEP8 asserts from webtest_plus import TestApp from website.app import init_app from website.util import web_url_for, api_url_for from website.project.model import ensure_schemas from tests.base import DbTestCase from tests.factories import AuthUserFac...
Add failing webtest for user settings page
Add failing webtest for user settings page
Python
apache-2.0
amyshi188/osf.io,asanfilippo7/osf.io,samchrisinger/osf.io,jnayak1/osf.io,brandonPurvis/osf.io,mluo613/osf.io,felliott/osf.io,kch8qx/osf.io,mfraezz/osf.io,caseyrollins/osf.io,dplorimer/osf,jnayak1/osf.io,asanfilippo7/osf.io,dplorimer/osf,binoculars/osf.io,Nesiehr/osf.io,TomBaxter/osf.io,doublebits/osf.io,billyhunt/osf.i...
Add failing webtest for user settings page
# -*- coding: utf-8 -*- import unittest from nose.tools import * # PEP8 asserts from webtest_plus import TestApp from website.app import init_app from website.util import web_url_for, api_url_for from website.project.model import ensure_schemas from tests.base import DbTestCase from tests.factories import AuthUserFac...
<commit_before><commit_msg>Add failing webtest for user settings page<commit_after>
# -*- coding: utf-8 -*- import unittest from nose.tools import * # PEP8 asserts from webtest_plus import TestApp from website.app import init_app from website.util import web_url_for, api_url_for from website.project.model import ensure_schemas from tests.base import DbTestCase from tests.factories import AuthUserFac...
Add failing webtest for user settings page# -*- coding: utf-8 -*- import unittest from nose.tools import * # PEP8 asserts from webtest_plus import TestApp from website.app import init_app from website.util import web_url_for, api_url_for from website.project.model import ensure_schemas from tests.base import DbTestCa...
<commit_before><commit_msg>Add failing webtest for user settings page<commit_after># -*- coding: utf-8 -*- import unittest from nose.tools import * # PEP8 asserts from webtest_plus import TestApp from website.app import init_app from website.util import web_url_for, api_url_for from website.project.model import ensur...
81cba73a64e72fc10170cd8a5082a109037ad27e
examples/service/test_hello_service.py
examples/service/test_hello_service.py
from pyon.util.int_test import IonIntegrationTestCase from interface.services.examples.hello.ihello_service import HelloServiceClient class TestHelloService(IonIntegrationTestCase): def setUp(self): self._start_container() self.container.start_rel_from_url('res/deploy/examples/hello.yml') s...
Add simple examples test for HelloService RPC
Add simple examples test for HelloService RPC
Python
bsd-2-clause
mkl-/scioncc,scionrep/scioncc,scionrep/scioncc,ooici/pyon,crchemist/scioncc,crchemist/scioncc,mkl-/scioncc,crchemist/scioncc,scionrep/scioncc,mkl-/scioncc,ooici/pyon
Add simple examples test for HelloService RPC
from pyon.util.int_test import IonIntegrationTestCase from interface.services.examples.hello.ihello_service import HelloServiceClient class TestHelloService(IonIntegrationTestCase): def setUp(self): self._start_container() self.container.start_rel_from_url('res/deploy/examples/hello.yml') s...
<commit_before><commit_msg>Add simple examples test for HelloService RPC<commit_after>
from pyon.util.int_test import IonIntegrationTestCase from interface.services.examples.hello.ihello_service import HelloServiceClient class TestHelloService(IonIntegrationTestCase): def setUp(self): self._start_container() self.container.start_rel_from_url('res/deploy/examples/hello.yml') s...
Add simple examples test for HelloService RPCfrom pyon.util.int_test import IonIntegrationTestCase from interface.services.examples.hello.ihello_service import HelloServiceClient class TestHelloService(IonIntegrationTestCase): def setUp(self): self._start_container() self.container.start_rel_from_u...
<commit_before><commit_msg>Add simple examples test for HelloService RPC<commit_after>from pyon.util.int_test import IonIntegrationTestCase from interface.services.examples.hello.ihello_service import HelloServiceClient class TestHelloService(IonIntegrationTestCase): def setUp(self): self._start_container(...
d99dd117c41e850781056371043ef7de546f0c18
test_vpoker.py
test_vpoker.py
# Copyright (c) 2016 Kirill 'Kolyat' Kiselnikov # This file is the part of vpoker, released under modified MIT license # See the file LICENSE.txt included in this distribution """ Unit tests for main module """ import unittest from vpoker import CARD_BACKGROUND_HEIGHT from vpoker import SCREEN_WIDTH from vpoker im...
Add file with tests for main module
Add file with tests for main module
Python
mit
kolyat/vpoker
Add file with tests for main module
# Copyright (c) 2016 Kirill 'Kolyat' Kiselnikov # This file is the part of vpoker, released under modified MIT license # See the file LICENSE.txt included in this distribution """ Unit tests for main module """ import unittest from vpoker import CARD_BACKGROUND_HEIGHT from vpoker import SCREEN_WIDTH from vpoker im...
<commit_before><commit_msg>Add file with tests for main module<commit_after>
# Copyright (c) 2016 Kirill 'Kolyat' Kiselnikov # This file is the part of vpoker, released under modified MIT license # See the file LICENSE.txt included in this distribution """ Unit tests for main module """ import unittest from vpoker import CARD_BACKGROUND_HEIGHT from vpoker import SCREEN_WIDTH from vpoker im...
Add file with tests for main module# Copyright (c) 2016 Kirill 'Kolyat' Kiselnikov # This file is the part of vpoker, released under modified MIT license # See the file LICENSE.txt included in this distribution """ Unit tests for main module """ import unittest from vpoker import CARD_BACKGROUND_HEIGHT from vpoker ...
<commit_before><commit_msg>Add file with tests for main module<commit_after># Copyright (c) 2016 Kirill 'Kolyat' Kiselnikov # This file is the part of vpoker, released under modified MIT license # See the file LICENSE.txt included in this distribution """ Unit tests for main module """ import unittest from vpoker i...
444a6d3a53e2e373e5abe2156b875f5342f371ae
pdc/apps/package/migrations/0014_auto_20170412_1331.py
pdc/apps/package/migrations/0014_auto_20170412_1331.py
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('package', '0013_set_default_subvariant_to_empty_string'), ] operations = [ migrations.AddField( model_name='rpm'...
Add missing database migration script for srpm_commit_hash and srpm_commit_branch.
Add missing database migration script for srpm_commit_hash and srpm_commit_branch. Signed-off-by: Jan Kaluza <24a219eb5881fc77986f139dd507482b6c2e7698@redhat.com>
Python
mit
release-engineering/product-definition-center,product-definition-center/product-definition-center,product-definition-center/product-definition-center,release-engineering/product-definition-center,product-definition-center/product-definition-center,release-engineering/product-definition-center,release-engineering/produc...
Add missing database migration script for srpm_commit_hash and srpm_commit_branch. Signed-off-by: Jan Kaluza <24a219eb5881fc77986f139dd507482b6c2e7698@redhat.com>
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('package', '0013_set_default_subvariant_to_empty_string'), ] operations = [ migrations.AddField( model_name='rpm'...
<commit_before><commit_msg>Add missing database migration script for srpm_commit_hash and srpm_commit_branch. Signed-off-by: Jan Kaluza <24a219eb5881fc77986f139dd507482b6c2e7698@redhat.com><commit_after>
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('package', '0013_set_default_subvariant_to_empty_string'), ] operations = [ migrations.AddField( model_name='rpm'...
Add missing database migration script for srpm_commit_hash and srpm_commit_branch. Signed-off-by: Jan Kaluza <24a219eb5881fc77986f139dd507482b6c2e7698@redhat.com># -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): depen...
<commit_before><commit_msg>Add missing database migration script for srpm_commit_hash and srpm_commit_branch. Signed-off-by: Jan Kaluza <24a219eb5881fc77986f139dd507482b6c2e7698@redhat.com><commit_after># -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations, models class Mi...
e7a46e772aa09e760b9c817afb618860eeb7e33c
helenae/gui/widgets/CompleteRegCtrl.py
helenae/gui/widgets/CompleteRegCtrl.py
# -*- coding: utf-8 -*- import wx ID_BUTTON_CLOSE_MSG = 1000 ID_LABLE_TEXT_INFO = 1001 ID_ICON_INFO = 1002 class CompleteRegCtrl(wx.Frame): def __init__(self, parent, id, title, ico_folder): wx.Frame.__init__(self, parent, -1, title, style=wx.DEFAULT_FRAME_STYLE ^ wx.RESIZE_BORDER) # lables, wh...
Complete register window for widget
Complete register window for widget
Python
mit
Relrin/Helenae,Relrin/Helenae,Relrin/Helenae
Complete register window for widget
# -*- coding: utf-8 -*- import wx ID_BUTTON_CLOSE_MSG = 1000 ID_LABLE_TEXT_INFO = 1001 ID_ICON_INFO = 1002 class CompleteRegCtrl(wx.Frame): def __init__(self, parent, id, title, ico_folder): wx.Frame.__init__(self, parent, -1, title, style=wx.DEFAULT_FRAME_STYLE ^ wx.RESIZE_BORDER) # lables, wh...
<commit_before><commit_msg>Complete register window for widget<commit_after>
# -*- coding: utf-8 -*- import wx ID_BUTTON_CLOSE_MSG = 1000 ID_LABLE_TEXT_INFO = 1001 ID_ICON_INFO = 1002 class CompleteRegCtrl(wx.Frame): def __init__(self, parent, id, title, ico_folder): wx.Frame.__init__(self, parent, -1, title, style=wx.DEFAULT_FRAME_STYLE ^ wx.RESIZE_BORDER) # lables, wh...
Complete register window for widget# -*- coding: utf-8 -*- import wx ID_BUTTON_CLOSE_MSG = 1000 ID_LABLE_TEXT_INFO = 1001 ID_ICON_INFO = 1002 class CompleteRegCtrl(wx.Frame): def __init__(self, parent, id, title, ico_folder): wx.Frame.__init__(self, parent, -1, title, style=wx.DEFAULT_FRAME_STYLE ^ wx.R...
<commit_before><commit_msg>Complete register window for widget<commit_after># -*- coding: utf-8 -*- import wx ID_BUTTON_CLOSE_MSG = 1000 ID_LABLE_TEXT_INFO = 1001 ID_ICON_INFO = 1002 class CompleteRegCtrl(wx.Frame): def __init__(self, parent, id, title, ico_folder): wx.Frame.__init__(self, parent, -1, t...
2acfc552c42846628304e54a3b87e2bf3a59af07
conf/ci/appveyor/get-artifacts.py
conf/ci/appveyor/get-artifacts.py
#!/usr/bin/env python # Author: Lisandro Dalcin # Contact: dalcinl@gmail.com import os import requests APIURL = 'https://ci.appveyor.com/api' ACCOUNT = 'mpi4py/mpi4py' BRANCH = 'master' BRANCH = 'maint' branch_url = APIURL + '/projects/' + ACCOUNT + "/branch/" + BRANCH branch = requests.get(branch_url).json() jo...
Add helper script to download build artifacts
AppVeyor: Add helper script to download build artifacts
Python
bsd-2-clause
mpi4py/mpi4py,mpi4py/mpi4py,mpi4py/mpi4py
AppVeyor: Add helper script to download build artifacts
#!/usr/bin/env python # Author: Lisandro Dalcin # Contact: dalcinl@gmail.com import os import requests APIURL = 'https://ci.appveyor.com/api' ACCOUNT = 'mpi4py/mpi4py' BRANCH = 'master' BRANCH = 'maint' branch_url = APIURL + '/projects/' + ACCOUNT + "/branch/" + BRANCH branch = requests.get(branch_url).json() jo...
<commit_before><commit_msg>AppVeyor: Add helper script to download build artifacts<commit_after>
#!/usr/bin/env python # Author: Lisandro Dalcin # Contact: dalcinl@gmail.com import os import requests APIURL = 'https://ci.appveyor.com/api' ACCOUNT = 'mpi4py/mpi4py' BRANCH = 'master' BRANCH = 'maint' branch_url = APIURL + '/projects/' + ACCOUNT + "/branch/" + BRANCH branch = requests.get(branch_url).json() jo...
AppVeyor: Add helper script to download build artifacts#!/usr/bin/env python # Author: Lisandro Dalcin # Contact: dalcinl@gmail.com import os import requests APIURL = 'https://ci.appveyor.com/api' ACCOUNT = 'mpi4py/mpi4py' BRANCH = 'master' BRANCH = 'maint' branch_url = APIURL + '/projects/' + ACCOUNT + "/branch...
<commit_before><commit_msg>AppVeyor: Add helper script to download build artifacts<commit_after>#!/usr/bin/env python # Author: Lisandro Dalcin # Contact: dalcinl@gmail.com import os import requests APIURL = 'https://ci.appveyor.com/api' ACCOUNT = 'mpi4py/mpi4py' BRANCH = 'master' BRANCH = 'maint' branch_url = A...
4fe9d2ceb7b1d8be1b89167944c06c6c2c92d1c4
csv2ofx/mappings/ingdirect.py
csv2ofx/mappings/ingdirect.py
# -*- coding: utf-8 -*- # vim: sw=4:ts=4:expandtab # pylint: disable=invalid-name """ csv2ofx.mappings.ingdirect ~~~~~~~~~~~~~~~~~~~~~~~~ Provides a mapping for transactions obtained via ING Direct (Australian bank) """ from __future__ import absolute_import from operator import itemgetter mapping = { 'is_split'...
Create mapping for ING Direct
Create mapping for ING Direct
Python
mit
reubano/csv2ofx,reubano/csv2ofx
Create mapping for ING Direct
# -*- coding: utf-8 -*- # vim: sw=4:ts=4:expandtab # pylint: disable=invalid-name """ csv2ofx.mappings.ingdirect ~~~~~~~~~~~~~~~~~~~~~~~~ Provides a mapping for transactions obtained via ING Direct (Australian bank) """ from __future__ import absolute_import from operator import itemgetter mapping = { 'is_split'...
<commit_before><commit_msg>Create mapping for ING Direct<commit_after>
# -*- coding: utf-8 -*- # vim: sw=4:ts=4:expandtab # pylint: disable=invalid-name """ csv2ofx.mappings.ingdirect ~~~~~~~~~~~~~~~~~~~~~~~~ Provides a mapping for transactions obtained via ING Direct (Australian bank) """ from __future__ import absolute_import from operator import itemgetter mapping = { 'is_split'...
Create mapping for ING Direct# -*- coding: utf-8 -*- # vim: sw=4:ts=4:expandtab # pylint: disable=invalid-name """ csv2ofx.mappings.ingdirect ~~~~~~~~~~~~~~~~~~~~~~~~ Provides a mapping for transactions obtained via ING Direct (Australian bank) """ from __future__ import absolute_import from operator import itemgette...
<commit_before><commit_msg>Create mapping for ING Direct<commit_after># -*- coding: utf-8 -*- # vim: sw=4:ts=4:expandtab # pylint: disable=invalid-name """ csv2ofx.mappings.ingdirect ~~~~~~~~~~~~~~~~~~~~~~~~ Provides a mapping for transactions obtained via ING Direct (Australian bank) """ from __future__ import absolu...
a0844c1dd37e0d487350187874804e973c106445
TH02.py
TH02.py
#TH02 by Trent Monahan, 2015 #ported from Intel's UPM TH02 in C import mraa TH02_ADDR = 0x40 # device address TH02_REG_STATUS = 0x00 TH02_REG_DATA_H = 0x01 TH02_REG_DATA_L = 0x02 TH02_REG_CONFIG = 0x03 TH02_REG_ID = 0x11 TH02_STATUS_RDY_MASK = 0x01 TH02_CMD_MEASURE_HUMI = 0x01 TH02_CMD_MEASURE_TEMP = 0x11 clas...
Add Temp & Humi API
Add Temp & Humi API
Python
mit
SinZ163/EdisonSandbox
Add Temp & Humi API
#TH02 by Trent Monahan, 2015 #ported from Intel's UPM TH02 in C import mraa TH02_ADDR = 0x40 # device address TH02_REG_STATUS = 0x00 TH02_REG_DATA_H = 0x01 TH02_REG_DATA_L = 0x02 TH02_REG_CONFIG = 0x03 TH02_REG_ID = 0x11 TH02_STATUS_RDY_MASK = 0x01 TH02_CMD_MEASURE_HUMI = 0x01 TH02_CMD_MEASURE_TEMP = 0x11 clas...
<commit_before><commit_msg>Add Temp & Humi API<commit_after>
#TH02 by Trent Monahan, 2015 #ported from Intel's UPM TH02 in C import mraa TH02_ADDR = 0x40 # device address TH02_REG_STATUS = 0x00 TH02_REG_DATA_H = 0x01 TH02_REG_DATA_L = 0x02 TH02_REG_CONFIG = 0x03 TH02_REG_ID = 0x11 TH02_STATUS_RDY_MASK = 0x01 TH02_CMD_MEASURE_HUMI = 0x01 TH02_CMD_MEASURE_TEMP = 0x11 clas...
Add Temp & Humi API#TH02 by Trent Monahan, 2015 #ported from Intel's UPM TH02 in C import mraa TH02_ADDR = 0x40 # device address TH02_REG_STATUS = 0x00 TH02_REG_DATA_H = 0x01 TH02_REG_DATA_L = 0x02 TH02_REG_CONFIG = 0x03 TH02_REG_ID = 0x11 TH02_STATUS_RDY_MASK = 0x01 TH02_CMD_MEASURE_HUMI = 0x01 TH02_CMD_MEASUR...
<commit_before><commit_msg>Add Temp & Humi API<commit_after>#TH02 by Trent Monahan, 2015 #ported from Intel's UPM TH02 in C import mraa TH02_ADDR = 0x40 # device address TH02_REG_STATUS = 0x00 TH02_REG_DATA_H = 0x01 TH02_REG_DATA_L = 0x02 TH02_REG_CONFIG = 0x03 TH02_REG_ID = 0x11 TH02_STATUS_RDY_MASK = 0x01 TH0...
f2e6fedf021e48e275a857bc7a0471a17aa10c29
tests/integration/test_webui.py
tests/integration/test_webui.py
import requests import pytest class TestWebUI(object): def get_page(self, page): return requests.get('http://127.0.0.1' + page) pages = [ { 'page': '/', 'matching_text': 'Diamond', }, { 'page': '/scoreboard', }, { ...
Add basic checks for web endpoints integraiton tests
Add basic checks for web endpoints integraiton tests
Python
mit
pwnbus/scoring_engine,pwnbus/scoring_engine,pwnbus/scoring_engine,pwnbus/scoring_engine
Add basic checks for web endpoints integraiton tests
import requests import pytest class TestWebUI(object): def get_page(self, page): return requests.get('http://127.0.0.1' + page) pages = [ { 'page': '/', 'matching_text': 'Diamond', }, { 'page': '/scoreboard', }, { ...
<commit_before><commit_msg>Add basic checks for web endpoints integraiton tests<commit_after>
import requests import pytest class TestWebUI(object): def get_page(self, page): return requests.get('http://127.0.0.1' + page) pages = [ { 'page': '/', 'matching_text': 'Diamond', }, { 'page': '/scoreboard', }, { ...
Add basic checks for web endpoints integraiton testsimport requests import pytest class TestWebUI(object): def get_page(self, page): return requests.get('http://127.0.0.1' + page) pages = [ { 'page': '/', 'matching_text': 'Diamond', }, { 'pa...
<commit_before><commit_msg>Add basic checks for web endpoints integraiton tests<commit_after>import requests import pytest class TestWebUI(object): def get_page(self, page): return requests.get('http://127.0.0.1' + page) pages = [ { 'page': '/', 'matching_text': 'Diamo...
4233919f94296e1e4986345d876b3f2ebf14e0e4
unix_rpc.py
unix_rpc.py
import socket import struct import json import os RPC_VERSION = 1 def msg_send(sock, msg): j = json.dumps(msg) header = struct.pack('!LL', RPC_VERSION, len(j)) sock.sendall(b'%b%b' % (header, j.encode('utf-8'))) def msg_recv(sock): buff = b'' while len(buff) < 8: buff += sock.recv(1024) ...
Add module for executing RPCs over UNIX sockets
Add module for executing RPCs over UNIX sockets
Python
apache-2.0
sagelywizard/dlex
Add module for executing RPCs over UNIX sockets
import socket import struct import json import os RPC_VERSION = 1 def msg_send(sock, msg): j = json.dumps(msg) header = struct.pack('!LL', RPC_VERSION, len(j)) sock.sendall(b'%b%b' % (header, j.encode('utf-8'))) def msg_recv(sock): buff = b'' while len(buff) < 8: buff += sock.recv(1024) ...
<commit_before><commit_msg>Add module for executing RPCs over UNIX sockets<commit_after>
import socket import struct import json import os RPC_VERSION = 1 def msg_send(sock, msg): j = json.dumps(msg) header = struct.pack('!LL', RPC_VERSION, len(j)) sock.sendall(b'%b%b' % (header, j.encode('utf-8'))) def msg_recv(sock): buff = b'' while len(buff) < 8: buff += sock.recv(1024) ...
Add module for executing RPCs over UNIX socketsimport socket import struct import json import os RPC_VERSION = 1 def msg_send(sock, msg): j = json.dumps(msg) header = struct.pack('!LL', RPC_VERSION, len(j)) sock.sendall(b'%b%b' % (header, j.encode('utf-8'))) def msg_recv(sock): buff = b'' while l...
<commit_before><commit_msg>Add module for executing RPCs over UNIX sockets<commit_after>import socket import struct import json import os RPC_VERSION = 1 def msg_send(sock, msg): j = json.dumps(msg) header = struct.pack('!LL', RPC_VERSION, len(j)) sock.sendall(b'%b%b' % (header, j.encode('utf-8'))) def m...
431292036e591e037ce83ce84173d17e86ff80d1
lib/carbon/tests/benchmark_aggregator.py
lib/carbon/tests/benchmark_aggregator.py
import timeit import time from carbon.aggregator.processor import AggregationProcessor, RuleManager, settings from carbon.aggregator.buffers import BufferManager from carbon.tests.util import print_stats from carbon.conf import settings from carbon import state METRIC = 'prod.applications.foo.1.requests' METRIC_AGGR ...
Add a benchmark for the aggregator
Add a benchmark for the aggregator
Python
apache-2.0
graphite-project/carbon,deniszh/carbon,deniszh/carbon,obfuscurity/carbon,obfuscurity/carbon,criteo-forks/carbon,criteo-forks/carbon,piotr1212/carbon,graphite-project/carbon,piotr1212/carbon
Add a benchmark for the aggregator
import timeit import time from carbon.aggregator.processor import AggregationProcessor, RuleManager, settings from carbon.aggregator.buffers import BufferManager from carbon.tests.util import print_stats from carbon.conf import settings from carbon import state METRIC = 'prod.applications.foo.1.requests' METRIC_AGGR ...
<commit_before><commit_msg>Add a benchmark for the aggregator<commit_after>
import timeit import time from carbon.aggregator.processor import AggregationProcessor, RuleManager, settings from carbon.aggregator.buffers import BufferManager from carbon.tests.util import print_stats from carbon.conf import settings from carbon import state METRIC = 'prod.applications.foo.1.requests' METRIC_AGGR ...
Add a benchmark for the aggregatorimport timeit import time from carbon.aggregator.processor import AggregationProcessor, RuleManager, settings from carbon.aggregator.buffers import BufferManager from carbon.tests.util import print_stats from carbon.conf import settings from carbon import state METRIC = 'prod.applica...
<commit_before><commit_msg>Add a benchmark for the aggregator<commit_after>import timeit import time from carbon.aggregator.processor import AggregationProcessor, RuleManager, settings from carbon.aggregator.buffers import BufferManager from carbon.tests.util import print_stats from carbon.conf import settings from ca...
cfee86e7e9e1e29cbdbf6d888edff1f02d733808
31-coin-sums.py
31-coin-sums.py
def coin_change(left, coins, count): if left == 0: return count if not coins: return 0 coin, *coins_left = coins return sum(coin_change(left-coin*i, coins_left, count+1) for i in range(0, left//coin)) if __name__ == '__main__': coins = [200, 100, 50,...
Work on 31 coin sums
Work on 31 coin sums
Python
mit
dawran6/project-euler
Work on 31 coin sums
def coin_change(left, coins, count): if left == 0: return count if not coins: return 0 coin, *coins_left = coins return sum(coin_change(left-coin*i, coins_left, count+1) for i in range(0, left//coin)) if __name__ == '__main__': coins = [200, 100, 50,...
<commit_before><commit_msg>Work on 31 coin sums<commit_after>
def coin_change(left, coins, count): if left == 0: return count if not coins: return 0 coin, *coins_left = coins return sum(coin_change(left-coin*i, coins_left, count+1) for i in range(0, left//coin)) if __name__ == '__main__': coins = [200, 100, 50,...
Work on 31 coin sumsdef coin_change(left, coins, count): if left == 0: return count if not coins: return 0 coin, *coins_left = coins return sum(coin_change(left-coin*i, coins_left, count+1) for i in range(0, left//coin)) if __name__ == '__main__': co...
<commit_before><commit_msg>Work on 31 coin sums<commit_after>def coin_change(left, coins, count): if left == 0: return count if not coins: return 0 coin, *coins_left = coins return sum(coin_change(left-coin*i, coins_left, count+1) for i in range(0, left//c...
660aecd99935ef3073d8ff166c5bd131b2d95b22
tests/unit/test_inotify.py
tests/unit/test_inotify.py
#!/usr/bin/env python import pytest from butter.inotify import watch from subprocess import Popen from tempfile import TemporaryDirectory from time import sleep import os def test_watch(): FILENAME = 'inotify_test' with TemporaryDirectory() as tmp_dir: filename = os.path.join(tmp_dir, FILENAME) ...
Add tests for watch function
Add tests for watch function
Python
bsd-3-clause
wdv4758h/butter,dasSOZO/python-butter
Add tests for watch function
#!/usr/bin/env python import pytest from butter.inotify import watch from subprocess import Popen from tempfile import TemporaryDirectory from time import sleep import os def test_watch(): FILENAME = 'inotify_test' with TemporaryDirectory() as tmp_dir: filename = os.path.join(tmp_dir, FILENAME) ...
<commit_before><commit_msg>Add tests for watch function<commit_after>
#!/usr/bin/env python import pytest from butter.inotify import watch from subprocess import Popen from tempfile import TemporaryDirectory from time import sleep import os def test_watch(): FILENAME = 'inotify_test' with TemporaryDirectory() as tmp_dir: filename = os.path.join(tmp_dir, FILENAME) ...
Add tests for watch function#!/usr/bin/env python import pytest from butter.inotify import watch from subprocess import Popen from tempfile import TemporaryDirectory from time import sleep import os def test_watch(): FILENAME = 'inotify_test' with TemporaryDirectory() as tmp_dir: filename = os.path.j...
<commit_before><commit_msg>Add tests for watch function<commit_after>#!/usr/bin/env python import pytest from butter.inotify import watch from subprocess import Popen from tempfile import TemporaryDirectory from time import sleep import os def test_watch(): FILENAME = 'inotify_test' with TemporaryDirectory()...
4e5ce8c0d0c998d8e9734bec584c93e0bc2fd065
migrations/versions/790_add_g9_lots.py
migrations/versions/790_add_g9_lots.py
"""add entries to lots table for G-Cloud 9 Revision ID: 790 Revises: 780 Create Date: 2017-01-27 13:33:33.333333 """ # revision identifiers, used by Alembic. revision = '790' down_revision = '780' from alembic import op import sqlalchemy as sa from sqlalchemy.sql import table, column def upgrade(): # Insert G...
Add new lots for G-Cloud 9
Add new lots for G-Cloud 9
Python
mit
alphagov/digitalmarketplace-api,alphagov/digitalmarketplace-api,alphagov/digitalmarketplace-api
Add new lots for G-Cloud 9
"""add entries to lots table for G-Cloud 9 Revision ID: 790 Revises: 780 Create Date: 2017-01-27 13:33:33.333333 """ # revision identifiers, used by Alembic. revision = '790' down_revision = '780' from alembic import op import sqlalchemy as sa from sqlalchemy.sql import table, column def upgrade(): # Insert G...
<commit_before><commit_msg>Add new lots for G-Cloud 9<commit_after>
"""add entries to lots table for G-Cloud 9 Revision ID: 790 Revises: 780 Create Date: 2017-01-27 13:33:33.333333 """ # revision identifiers, used by Alembic. revision = '790' down_revision = '780' from alembic import op import sqlalchemy as sa from sqlalchemy.sql import table, column def upgrade(): # Insert G...
Add new lots for G-Cloud 9"""add entries to lots table for G-Cloud 9 Revision ID: 790 Revises: 780 Create Date: 2017-01-27 13:33:33.333333 """ # revision identifiers, used by Alembic. revision = '790' down_revision = '780' from alembic import op import sqlalchemy as sa from sqlalchemy.sql import table, column def...
<commit_before><commit_msg>Add new lots for G-Cloud 9<commit_after>"""add entries to lots table for G-Cloud 9 Revision ID: 790 Revises: 780 Create Date: 2017-01-27 13:33:33.333333 """ # revision identifiers, used by Alembic. revision = '790' down_revision = '780' from alembic import op import sqlalchemy as sa from ...
7086dcce04799d744bb594cbf6ccbe8b7b09767d
Glyphs/DecRO.py
Glyphs/DecRO.py
# MenuTitle: Copy to Background, Decompose, Remove Overlaps, Correct Path Direction for layer in Glyphs.font.selectedLayers: g = layer.parent for l in g.layers: l.background = l.copy() l.decomposeComponents() l.removeOverlap() l.correctPathDirection()
Add "Glyphs/Copy to Background, Decompose, Remove Overlaps, Correct Path Direction"
Add "Glyphs/Copy to Background, Decompose, Remove Overlaps, Correct Path Direction"
Python
mit
jenskutilek/Glyphs-Scripts
Add "Glyphs/Copy to Background, Decompose, Remove Overlaps, Correct Path Direction"
# MenuTitle: Copy to Background, Decompose, Remove Overlaps, Correct Path Direction for layer in Glyphs.font.selectedLayers: g = layer.parent for l in g.layers: l.background = l.copy() l.decomposeComponents() l.removeOverlap() l.correctPathDirection()
<commit_before><commit_msg>Add "Glyphs/Copy to Background, Decompose, Remove Overlaps, Correct Path Direction"<commit_after>
# MenuTitle: Copy to Background, Decompose, Remove Overlaps, Correct Path Direction for layer in Glyphs.font.selectedLayers: g = layer.parent for l in g.layers: l.background = l.copy() l.decomposeComponents() l.removeOverlap() l.correctPathDirection()
Add "Glyphs/Copy to Background, Decompose, Remove Overlaps, Correct Path Direction"# MenuTitle: Copy to Background, Decompose, Remove Overlaps, Correct Path Direction for layer in Glyphs.font.selectedLayers: g = layer.parent for l in g.layers: l.background = l.copy() l.decomposeComponents() ...
<commit_before><commit_msg>Add "Glyphs/Copy to Background, Decompose, Remove Overlaps, Correct Path Direction"<commit_after># MenuTitle: Copy to Background, Decompose, Remove Overlaps, Correct Path Direction for layer in Glyphs.font.selectedLayers: g = layer.parent for l in g.layers: l.background = l.co...
8475c80b48d02fad440acd4324b2bfba2f8e1f67
migrations/versions/940_more_supplier_details.py
migrations/versions/940_more_supplier_details.py
""" Extend suppliers table with new fields (to be initially populated from declaration data) Revision ID: 940 Revises: 930 Create Date: 2017-08-16 16:39:00.000000 """ # revision identifiers, used by Alembic. revision = '940' down_revision = '930' from alembic import op import sqlalchemy as sa def upgrade(): o...
Add columns to suppliers table
Add columns to suppliers table The following data is moving from framework-level supplier declarations to the supplier account level: * Organisation size * VAT number * Non-companies-house registration number (for non-UK companies) * Registered organisation name (as opposed to marketplace supplier account name) * Reg...
Python
mit
alphagov/digitalmarketplace-api,alphagov/digitalmarketplace-api,alphagov/digitalmarketplace-api
Add columns to suppliers table The following data is moving from framework-level supplier declarations to the supplier account level: * Organisation size * VAT number * Non-companies-house registration number (for non-UK companies) * Registered organisation name (as opposed to marketplace supplier account name) * Reg...
""" Extend suppliers table with new fields (to be initially populated from declaration data) Revision ID: 940 Revises: 930 Create Date: 2017-08-16 16:39:00.000000 """ # revision identifiers, used by Alembic. revision = '940' down_revision = '930' from alembic import op import sqlalchemy as sa def upgrade(): o...
<commit_before><commit_msg>Add columns to suppliers table The following data is moving from framework-level supplier declarations to the supplier account level: * Organisation size * VAT number * Non-companies-house registration number (for non-UK companies) * Registered organisation name (as opposed to marketplace s...
""" Extend suppliers table with new fields (to be initially populated from declaration data) Revision ID: 940 Revises: 930 Create Date: 2017-08-16 16:39:00.000000 """ # revision identifiers, used by Alembic. revision = '940' down_revision = '930' from alembic import op import sqlalchemy as sa def upgrade(): o...
Add columns to suppliers table The following data is moving from framework-level supplier declarations to the supplier account level: * Organisation size * VAT number * Non-companies-house registration number (for non-UK companies) * Registered organisation name (as opposed to marketplace supplier account name) * Reg...
<commit_before><commit_msg>Add columns to suppliers table The following data is moving from framework-level supplier declarations to the supplier account level: * Organisation size * VAT number * Non-companies-house registration number (for non-UK companies) * Registered organisation name (as opposed to marketplace s...
fe9da2481ab777012fbfd94bd9bacef9fc8151f4
psshlib/hosts.py
psshlib/hosts.py
import sys import psshutil import random class ServerPool(list): def __init__(self, options): self.options = options try: hosts = psshutil.read_host_files(options.host_files, default_user=options.user) except IOError: _, e, _ = sys.exc_info() sys.stderr.w...
import sys import psshutil import random class ServerPool(list): def __init__(self, options): self.options = options try: hosts = psshutil.read_host_files(options.host_files, default_user=options.user) except IOError: _, e, _ = sys.exc_info() sys.stderr.w...
Fix --sample-size error messages lacking newlines
Fix --sample-size error messages lacking newlines
Python
bsd-3-clause
jcmcken/parallel-ssh,jorik041/parallel-ssh,gyf19/parallel-ssh
import sys import psshutil import random class ServerPool(list): def __init__(self, options): self.options = options try: hosts = psshutil.read_host_files(options.host_files, default_user=options.user) except IOError: _, e, _ = sys.exc_info() sys.stderr.w...
import sys import psshutil import random class ServerPool(list): def __init__(self, options): self.options = options try: hosts = psshutil.read_host_files(options.host_files, default_user=options.user) except IOError: _, e, _ = sys.exc_info() sys.stderr.w...
<commit_before>import sys import psshutil import random class ServerPool(list): def __init__(self, options): self.options = options try: hosts = psshutil.read_host_files(options.host_files, default_user=options.user) except IOError: _, e, _ = sys.exc_info() ...
import sys import psshutil import random class ServerPool(list): def __init__(self, options): self.options = options try: hosts = psshutil.read_host_files(options.host_files, default_user=options.user) except IOError: _, e, _ = sys.exc_info() sys.stderr.w...
import sys import psshutil import random class ServerPool(list): def __init__(self, options): self.options = options try: hosts = psshutil.read_host_files(options.host_files, default_user=options.user) except IOError: _, e, _ = sys.exc_info() sys.stderr.w...
<commit_before>import sys import psshutil import random class ServerPool(list): def __init__(self, options): self.options = options try: hosts = psshutil.read_host_files(options.host_files, default_user=options.user) except IOError: _, e, _ = sys.exc_info() ...
8c37c1ae7f42d22a186de4751a56209ebdd77ec4
dr27demo/dr27app/test_settings.py
dr27demo/dr27app/test_settings.py
from .base_settings import * CACHES = { 'default': { 'BACKEND': 'django.core.cache.backends.memcached.MemcachedCache', 'LOCATION': '127.0.0.1:11211', 'KEY_PREFIX': 'driver27-cache-app' } }
Add settings for django tests.
Add settings for django tests.
Python
mit
SRJ9/django-driver27,SRJ9/django-driver27,SRJ9/django-driver27
Add settings for django tests.
from .base_settings import * CACHES = { 'default': { 'BACKEND': 'django.core.cache.backends.memcached.MemcachedCache', 'LOCATION': '127.0.0.1:11211', 'KEY_PREFIX': 'driver27-cache-app' } }
<commit_before><commit_msg>Add settings for django tests.<commit_after>
from .base_settings import * CACHES = { 'default': { 'BACKEND': 'django.core.cache.backends.memcached.MemcachedCache', 'LOCATION': '127.0.0.1:11211', 'KEY_PREFIX': 'driver27-cache-app' } }
Add settings for django tests.from .base_settings import * CACHES = { 'default': { 'BACKEND': 'django.core.cache.backends.memcached.MemcachedCache', 'LOCATION': '127.0.0.1:11211', 'KEY_PREFIX': 'driver27-cache-app' } }
<commit_before><commit_msg>Add settings for django tests.<commit_after>from .base_settings import * CACHES = { 'default': { 'BACKEND': 'django.core.cache.backends.memcached.MemcachedCache', 'LOCATION': '127.0.0.1:11211', 'KEY_PREFIX': 'driver27-cache-app' } }
3e25a1b44743bbf7d0bf1205cebe5bfb6a693fef
delete_whois.py
delete_whois.py
#!/usr/bin/env python import os import sys import time import getpass import datetime from common.appenginepatch.aecmd import setup_env setup_env() import ADNS from adns import rr from google.appengine.ext import db from google.appengine.ext.remote_api import remote_api_stub from google.appengine.api.datastore_erro...
Delete obsolete Whois model from the datastore.
Delete obsolete Whois model from the datastore.
Python
mit
jcrocholl/nxdom,jcrocholl/nxdom
Delete obsolete Whois model from the datastore.
#!/usr/bin/env python import os import sys import time import getpass import datetime from common.appenginepatch.aecmd import setup_env setup_env() import ADNS from adns import rr from google.appengine.ext import db from google.appengine.ext.remote_api import remote_api_stub from google.appengine.api.datastore_erro...
<commit_before><commit_msg>Delete obsolete Whois model from the datastore.<commit_after>
#!/usr/bin/env python import os import sys import time import getpass import datetime from common.appenginepatch.aecmd import setup_env setup_env() import ADNS from adns import rr from google.appengine.ext import db from google.appengine.ext.remote_api import remote_api_stub from google.appengine.api.datastore_erro...
Delete obsolete Whois model from the datastore.#!/usr/bin/env python import os import sys import time import getpass import datetime from common.appenginepatch.aecmd import setup_env setup_env() import ADNS from adns import rr from google.appengine.ext import db from google.appengine.ext.remote_api import remote_ap...
<commit_before><commit_msg>Delete obsolete Whois model from the datastore.<commit_after>#!/usr/bin/env python import os import sys import time import getpass import datetime from common.appenginepatch.aecmd import setup_env setup_env() import ADNS from adns import rr from google.appengine.ext import db from google....
b977cf85a16d322cecb2bde051ad3026fa8e037e
setup.py
setup.py
from distutils.core import setup setup( name="pycomponents", version='0.1', description="A simple component entity system for python", author="David Gabor Bodor", url="http://github.com/dragonfi/pycomponents", packages=['pycomponents'], license="MIT", )
Make package installable via pip
Make package installable via pip
Python
mit
dragonfi/pycomponents,dragonfi/pycomponents
Make package installable via pip
from distutils.core import setup setup( name="pycomponents", version='0.1', description="A simple component entity system for python", author="David Gabor Bodor", url="http://github.com/dragonfi/pycomponents", packages=['pycomponents'], license="MIT", )
<commit_before><commit_msg>Make package installable via pip<commit_after>
from distutils.core import setup setup( name="pycomponents", version='0.1', description="A simple component entity system for python", author="David Gabor Bodor", url="http://github.com/dragonfi/pycomponents", packages=['pycomponents'], license="MIT", )
Make package installable via pipfrom distutils.core import setup setup( name="pycomponents", version='0.1', description="A simple component entity system for python", author="David Gabor Bodor", url="http://github.com/dragonfi/pycomponents", packages=['pycomponents'], license="MIT", )
<commit_before><commit_msg>Make package installable via pip<commit_after>from distutils.core import setup setup( name="pycomponents", version='0.1', description="A simple component entity system for python", author="David Gabor Bodor", url="http://github.com/dragonfi/pycomponents", packages=['p...
594039c17f9db7b2cb058eaca58299281a61ef29
irrigator_pro/farms/formset_views.py
irrigator_pro/farms/formset_views.py
from extra_views import ModelFormSetView from django.forms import Textarea, TextInput from django.db.models import Q from django.contrib.auth.decorators import login_required from django.utils.decorators import method_decorator from farms.models import Field, Probe, ProbeReading, WaterHistory from fields_filter import...
Move Probes and Water_History formset views to using a common "Farms_FormsetView" superclass.
Move Probes and Water_History formset views to using a common "Farms_FormsetView" superclass.
Python
mit
warnes/irrigatorpro,warnes/irrigatorpro,warnes/irrigatorpro,warnes/irrigatorpro
Move Probes and Water_History formset views to using a common "Farms_FormsetView" superclass.
from extra_views import ModelFormSetView from django.forms import Textarea, TextInput from django.db.models import Q from django.contrib.auth.decorators import login_required from django.utils.decorators import method_decorator from farms.models import Field, Probe, ProbeReading, WaterHistory from fields_filter import...
<commit_before><commit_msg>Move Probes and Water_History formset views to using a common "Farms_FormsetView" superclass.<commit_after>
from extra_views import ModelFormSetView from django.forms import Textarea, TextInput from django.db.models import Q from django.contrib.auth.decorators import login_required from django.utils.decorators import method_decorator from farms.models import Field, Probe, ProbeReading, WaterHistory from fields_filter import...
Move Probes and Water_History formset views to using a common "Farms_FormsetView" superclass.from extra_views import ModelFormSetView from django.forms import Textarea, TextInput from django.db.models import Q from django.contrib.auth.decorators import login_required from django.utils.decorators import method_decorator...
<commit_before><commit_msg>Move Probes and Water_History formset views to using a common "Farms_FormsetView" superclass.<commit_after>from extra_views import ModelFormSetView from django.forms import Textarea, TextInput from django.db.models import Q from django.contrib.auth.decorators import login_required from django...
1337bed0e13f8e0f3d1294464e817b782b765b47
scripts/read_in_lines.py
scripts/read_in_lines.py
from image_process.hough_transform import get_hough_lines from lines.line import Point, LineSegment import matplotlib.pyplot as plt import os image_path = os.path.join(os.path.dirname(os.path.dirname(__file__)), 'data', 'hough_test', 'Test_Set_1', 'PNGs', 'C(C)C(CCCC)(C)C.png') lines = get_h...
Add Script for Testing Line Segment Features
Add Script for Testing Line Segment Features
Python
mit
Molecular-Image-Recognition/Molecular-Image-Recognition
Add Script for Testing Line Segment Features
from image_process.hough_transform import get_hough_lines from lines.line import Point, LineSegment import matplotlib.pyplot as plt import os image_path = os.path.join(os.path.dirname(os.path.dirname(__file__)), 'data', 'hough_test', 'Test_Set_1', 'PNGs', 'C(C)C(CCCC)(C)C.png') lines = get_h...
<commit_before><commit_msg>Add Script for Testing Line Segment Features<commit_after>
from image_process.hough_transform import get_hough_lines from lines.line import Point, LineSegment import matplotlib.pyplot as plt import os image_path = os.path.join(os.path.dirname(os.path.dirname(__file__)), 'data', 'hough_test', 'Test_Set_1', 'PNGs', 'C(C)C(CCCC)(C)C.png') lines = get_h...
Add Script for Testing Line Segment Featuresfrom image_process.hough_transform import get_hough_lines from lines.line import Point, LineSegment import matplotlib.pyplot as plt import os image_path = os.path.join(os.path.dirname(os.path.dirname(__file__)), 'data', 'hough_test', 'Test_Set_1', 'PNGs', ...
<commit_before><commit_msg>Add Script for Testing Line Segment Features<commit_after>from image_process.hough_transform import get_hough_lines from lines.line import Point, LineSegment import matplotlib.pyplot as plt import os image_path = os.path.join(os.path.dirname(os.path.dirname(__file__)), 'data', 'hough_test', ...
05c2b5edb0ad2dd96f4146893de1bcaa2b691c64
jenkinsapi/utils/krb_requester.py
jenkinsapi/utils/krb_requester.py
from jenkinsapi.utils.requester import Requester from requests_kerberos import HTTPKerberosAuth, OPTIONAL class KrbRequester(Requester): """ A class which carries out HTTP requests with Kerberos/GSSAPI authentication. """ def __init__(self, ssl_verify=None, baseurl=None, mutual_auth=OPTIONAL): ...
Add kerberos authentication requester using requests_kerberos
Add kerberos authentication requester using requests_kerberos
Python
mit
domenkozar/jenkinsapi,imsardine/jenkinsapi,zaro0508/jenkinsapi,jduan/jenkinsapi,JohnLZeller/jenkinsapi,JohnLZeller/jenkinsapi,mistermocha/jenkinsapi,imsardine/jenkinsapi,aerickson/jenkinsapi,zaro0508/jenkinsapi,mistermocha/jenkinsapi,jduan/jenkinsapi,domenkozar/jenkinsapi,salimfadhley/jenkinsapi,salimfadhley/jenkinsapi...
Add kerberos authentication requester using requests_kerberos
from jenkinsapi.utils.requester import Requester from requests_kerberos import HTTPKerberosAuth, OPTIONAL class KrbRequester(Requester): """ A class which carries out HTTP requests with Kerberos/GSSAPI authentication. """ def __init__(self, ssl_verify=None, baseurl=None, mutual_auth=OPTIONAL): ...
<commit_before><commit_msg>Add kerberos authentication requester using requests_kerberos<commit_after>
from jenkinsapi.utils.requester import Requester from requests_kerberos import HTTPKerberosAuth, OPTIONAL class KrbRequester(Requester): """ A class which carries out HTTP requests with Kerberos/GSSAPI authentication. """ def __init__(self, ssl_verify=None, baseurl=None, mutual_auth=OPTIONAL): ...
Add kerberos authentication requester using requests_kerberosfrom jenkinsapi.utils.requester import Requester from requests_kerberos import HTTPKerberosAuth, OPTIONAL class KrbRequester(Requester): """ A class which carries out HTTP requests with Kerberos/GSSAPI authentication. """ def __init__(self...
<commit_before><commit_msg>Add kerberos authentication requester using requests_kerberos<commit_after>from jenkinsapi.utils.requester import Requester from requests_kerberos import HTTPKerberosAuth, OPTIONAL class KrbRequester(Requester): """ A class which carries out HTTP requests with Kerberos/GSSAPI authe...