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
c7fa4500b22104b34b50bbcacc3b64923d6da294
trex/parsers.py
trex/parsers.py
# -*- coding: utf-8 -*- # # (c) 2014 Bjoern Ricks <bjoern.ricks@gmail.com> # # See LICENSE comming with the source of 'trex' for details. # from io import TextIOWrapper from rest_framework.parsers import BaseParser class PlainTextParser(BaseParser): media_type = "text/plain" def parse(self, stream, media_...
Add a parser for plain text
Add a parser for plain text
Python
mit
bjoernricks/trex,bjoernricks/trex
Add a parser for plain text
# -*- coding: utf-8 -*- # # (c) 2014 Bjoern Ricks <bjoern.ricks@gmail.com> # # See LICENSE comming with the source of 'trex' for details. # from io import TextIOWrapper from rest_framework.parsers import BaseParser class PlainTextParser(BaseParser): media_type = "text/plain" def parse(self, stream, media_...
<commit_before><commit_msg>Add a parser for plain text<commit_after>
# -*- coding: utf-8 -*- # # (c) 2014 Bjoern Ricks <bjoern.ricks@gmail.com> # # See LICENSE comming with the source of 'trex' for details. # from io import TextIOWrapper from rest_framework.parsers import BaseParser class PlainTextParser(BaseParser): media_type = "text/plain" def parse(self, stream, media_...
Add a parser for plain text# -*- coding: utf-8 -*- # # (c) 2014 Bjoern Ricks <bjoern.ricks@gmail.com> # # See LICENSE comming with the source of 'trex' for details. # from io import TextIOWrapper from rest_framework.parsers import BaseParser class PlainTextParser(BaseParser): media_type = "text/plain" def...
<commit_before><commit_msg>Add a parser for plain text<commit_after># -*- coding: utf-8 -*- # # (c) 2014 Bjoern Ricks <bjoern.ricks@gmail.com> # # See LICENSE comming with the source of 'trex' for details. # from io import TextIOWrapper from rest_framework.parsers import BaseParser class PlainTextParser(BaseParser)...
e8560c42e3ae73f1753073b8ad6aef7d564e6d65
Host/original.py
Host/original.py
import sys from functools import reduce tempVmId = -1 def enhancedActiveVMLoadBalancer(vmStateList, currentAllocationCounts): ''' vmStateList: Dict<vmId, vmState> currentAllocationCounts: Dict<vmId, currentActiveAllocationCount> ''' global tempVmId vmId = -1 tot...
Implement basic active monitoring algorithm
Implement basic active monitoring algorithm
Python
mit
kaushikSarma/VM-Load-balancing,kaushikSarma/VM-Load-balancing,kaushikSarma/VM-Load-balancing,kaushikSarma/VM-Load-balancing
Implement basic active monitoring algorithm
import sys from functools import reduce tempVmId = -1 def enhancedActiveVMLoadBalancer(vmStateList, currentAllocationCounts): ''' vmStateList: Dict<vmId, vmState> currentAllocationCounts: Dict<vmId, currentActiveAllocationCount> ''' global tempVmId vmId = -1 tot...
<commit_before><commit_msg>Implement basic active monitoring algorithm<commit_after>
import sys from functools import reduce tempVmId = -1 def enhancedActiveVMLoadBalancer(vmStateList, currentAllocationCounts): ''' vmStateList: Dict<vmId, vmState> currentAllocationCounts: Dict<vmId, currentActiveAllocationCount> ''' global tempVmId vmId = -1 tot...
Implement basic active monitoring algorithmimport sys from functools import reduce tempVmId = -1 def enhancedActiveVMLoadBalancer(vmStateList, currentAllocationCounts): ''' vmStateList: Dict<vmId, vmState> currentAllocationCounts: Dict<vmId, currentActiveAllocationCount> ''' ...
<commit_before><commit_msg>Implement basic active monitoring algorithm<commit_after>import sys from functools import reduce tempVmId = -1 def enhancedActiveVMLoadBalancer(vmStateList, currentAllocationCounts): ''' vmStateList: Dict<vmId, vmState> currentAllocationCounts: Dict<vmI...
3693b1aea769af1e0fbe31007a00f3e33bcec622
aids/sorting_and_searching/pair_sum.py
aids/sorting_and_searching/pair_sum.py
''' Given an integer array, output all pairs that sum up to a specific value k ''' from binary_search import binary_search_iterative def pair_sum_sorting(arr, k): ''' Using sorting - O(n logn) ''' number_of_items = len(arr) if number_of_items < 2: return arr.sort() for index, item in enumerate(arr): ind...
Add function to solve two pair sum
Add function to solve two pair sum
Python
mit
ueg1990/aids
Add function to solve two pair sum
''' Given an integer array, output all pairs that sum up to a specific value k ''' from binary_search import binary_search_iterative def pair_sum_sorting(arr, k): ''' Using sorting - O(n logn) ''' number_of_items = len(arr) if number_of_items < 2: return arr.sort() for index, item in enumerate(arr): ind...
<commit_before><commit_msg>Add function to solve two pair sum<commit_after>
''' Given an integer array, output all pairs that sum up to a specific value k ''' from binary_search import binary_search_iterative def pair_sum_sorting(arr, k): ''' Using sorting - O(n logn) ''' number_of_items = len(arr) if number_of_items < 2: return arr.sort() for index, item in enumerate(arr): ind...
Add function to solve two pair sum''' Given an integer array, output all pairs that sum up to a specific value k ''' from binary_search import binary_search_iterative def pair_sum_sorting(arr, k): ''' Using sorting - O(n logn) ''' number_of_items = len(arr) if number_of_items < 2: return arr.sort() for in...
<commit_before><commit_msg>Add function to solve two pair sum<commit_after>''' Given an integer array, output all pairs that sum up to a specific value k ''' from binary_search import binary_search_iterative def pair_sum_sorting(arr, k): ''' Using sorting - O(n logn) ''' number_of_items = len(arr) if number_of...
9a67d63650b751c7b876f248bb3d82e619b37725
frequenciesToWords.py
frequenciesToWords.py
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # Spell corrector - http://www.chiodini.org/ # Copyright © 2015 Luca Chiodini <luca@chiodini.org> # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the Free Software Fou...
Add new script to create a list of words from frequencies
Add new script to create a list of words from frequencies
Python
agpl-3.0
lucach/spellcorrect,lucach/spellcorrect,lucach/spellcorrect,lucach/spellcorrect
Add new script to create a list of words from frequencies
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # Spell corrector - http://www.chiodini.org/ # Copyright © 2015 Luca Chiodini <luca@chiodini.org> # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the Free Software Fou...
<commit_before><commit_msg>Add new script to create a list of words from frequencies<commit_after>
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # Spell corrector - http://www.chiodini.org/ # Copyright © 2015 Luca Chiodini <luca@chiodini.org> # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the Free Software Fou...
Add new script to create a list of words from frequencies#!/usr/bin/env python3 # -*- coding: utf-8 -*- # Spell corrector - http://www.chiodini.org/ # Copyright © 2015 Luca Chiodini <luca@chiodini.org> # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero Gener...
<commit_before><commit_msg>Add new script to create a list of words from frequencies<commit_after>#!/usr/bin/env python3 # -*- coding: utf-8 -*- # Spell corrector - http://www.chiodini.org/ # Copyright © 2015 Luca Chiodini <luca@chiodini.org> # # This program is free software: you can redistribute it and/or modify # i...
4535d6c41e17031b943e7016fc7de6f76b890f17
test/lib/test_inputsource.py
test/lib/test_inputsource.py
######################################################################## # test/xslt/test_inputsource.py import os from amara.lib import inputsource, iri, treecompare module_dir = os.path.dirname(os.path.abspath(__file__)) rlimit_nofile = 300 try: import resource except ImportError: pass else: rlimit_nof...
Put the test into the correct directory.
Put the test into the correct directory. --HG-- rename : test/xslt/test_inputsource.py => test/lib/test_inputsource.py
Python
apache-2.0
zepheira/amara,zepheira/amara,zepheira/amara,zepheira/amara,zepheira/amara,zepheira/amara
Put the test into the correct directory. --HG-- rename : test/xslt/test_inputsource.py => test/lib/test_inputsource.py
######################################################################## # test/xslt/test_inputsource.py import os from amara.lib import inputsource, iri, treecompare module_dir = os.path.dirname(os.path.abspath(__file__)) rlimit_nofile = 300 try: import resource except ImportError: pass else: rlimit_nof...
<commit_before><commit_msg>Put the test into the correct directory. --HG-- rename : test/xslt/test_inputsource.py => test/lib/test_inputsource.py<commit_after>
######################################################################## # test/xslt/test_inputsource.py import os from amara.lib import inputsource, iri, treecompare module_dir = os.path.dirname(os.path.abspath(__file__)) rlimit_nofile = 300 try: import resource except ImportError: pass else: rlimit_nof...
Put the test into the correct directory. --HG-- rename : test/xslt/test_inputsource.py => test/lib/test_inputsource.py######################################################################## # test/xslt/test_inputsource.py import os from amara.lib import inputsource, iri, treecompare module_dir = os.path.dirname(os....
<commit_before><commit_msg>Put the test into the correct directory. --HG-- rename : test/xslt/test_inputsource.py => test/lib/test_inputsource.py<commit_after>######################################################################## # test/xslt/test_inputsource.py import os from amara.lib import inputsource, iri, tree...
732898dc4858ae5cfc7eac3e470069ac702f6c12
mapit/management/commands/mapit_generation_deactivate.py
mapit/management/commands/mapit_generation_deactivate.py
# This script deactivates a particular generation from optparse import make_option from django.core.management.base import BaseCommand from mapit.models import Generation class Command(BaseCommand): help = 'Deactivate a generation' args = '<GENERATION-ID>' option_list = BaseCommand.option_list + ( ...
Add a command for deactivating a generation
Add a command for deactivating a generation
Python
agpl-3.0
Sinar/mapit,chris48s/mapit,New-Bamboo/mapit,Sinar/mapit,opencorato/mapit,chris48s/mapit,chris48s/mapit,Code4SA/mapit,opencorato/mapit,opencorato/mapit,Code4SA/mapit,Code4SA/mapit,New-Bamboo/mapit
Add a command for deactivating a generation
# This script deactivates a particular generation from optparse import make_option from django.core.management.base import BaseCommand from mapit.models import Generation class Command(BaseCommand): help = 'Deactivate a generation' args = '<GENERATION-ID>' option_list = BaseCommand.option_list + ( ...
<commit_before><commit_msg>Add a command for deactivating a generation<commit_after>
# This script deactivates a particular generation from optparse import make_option from django.core.management.base import BaseCommand from mapit.models import Generation class Command(BaseCommand): help = 'Deactivate a generation' args = '<GENERATION-ID>' option_list = BaseCommand.option_list + ( ...
Add a command for deactivating a generation# This script deactivates a particular generation from optparse import make_option from django.core.management.base import BaseCommand from mapit.models import Generation class Command(BaseCommand): help = 'Deactivate a generation' args = '<GENERATION-ID>' option...
<commit_before><commit_msg>Add a command for deactivating a generation<commit_after># This script deactivates a particular generation from optparse import make_option from django.core.management.base import BaseCommand from mapit.models import Generation class Command(BaseCommand): help = 'Deactivate a generation...
98fbfe6e65c4cb32ea0f4f6ce6cba77f7fadcb7b
app/api/tests/test_vendor_api.py
app/api/tests/test_vendor_api.py
from django.test import Client, TestCase from .utils import obtain_api_key, create_admin_account class VendorApiTest(TestCase): """Test for Vendor API.""" def setUp(self): self.client = Client() self.endpoint = '/api' self.admin_test_credentials = ('admin', 'admin@taverna.com', 'qwer...
Add test for vendor object creation
Add test for vendor object creation
Python
mit
teamtaverna/core
Add test for vendor object creation
from django.test import Client, TestCase from .utils import obtain_api_key, create_admin_account class VendorApiTest(TestCase): """Test for Vendor API.""" def setUp(self): self.client = Client() self.endpoint = '/api' self.admin_test_credentials = ('admin', 'admin@taverna.com', 'qwer...
<commit_before><commit_msg>Add test for vendor object creation<commit_after>
from django.test import Client, TestCase from .utils import obtain_api_key, create_admin_account class VendorApiTest(TestCase): """Test for Vendor API.""" def setUp(self): self.client = Client() self.endpoint = '/api' self.admin_test_credentials = ('admin', 'admin@taverna.com', 'qwer...
Add test for vendor object creationfrom django.test import Client, TestCase from .utils import obtain_api_key, create_admin_account class VendorApiTest(TestCase): """Test for Vendor API.""" def setUp(self): self.client = Client() self.endpoint = '/api' self.admin_test_credentials = (...
<commit_before><commit_msg>Add test for vendor object creation<commit_after>from django.test import Client, TestCase from .utils import obtain_api_key, create_admin_account class VendorApiTest(TestCase): """Test for Vendor API.""" def setUp(self): self.client = Client() self.endpoint = '/api...
7c33e8c7a386e911d835f81e637515d40dfc4e62
benchmarks/bench_laplace.py
benchmarks/bench_laplace.py
""" Benchmark Laplace equation solving. From the Numpy benchmark suite, original code at https://github.com/yarikoptic/numpy-vbench/commit/a192bfd43043d413cc5d27526a9b28ad343b2499 """ import numpy as np from numba import jit dx = 0.1 dy = 0.1 dx2 = (dx * dx) dy2 = (dy * dy) @jit(nopython=True) def laplace(N, Nite...
Add a Laplace equation solving benchmark (from Numpy)
Add a Laplace equation solving benchmark (from Numpy)
Python
bsd-2-clause
numba/numba-benchmark
Add a Laplace equation solving benchmark (from Numpy)
""" Benchmark Laplace equation solving. From the Numpy benchmark suite, original code at https://github.com/yarikoptic/numpy-vbench/commit/a192bfd43043d413cc5d27526a9b28ad343b2499 """ import numpy as np from numba import jit dx = 0.1 dy = 0.1 dx2 = (dx * dx) dy2 = (dy * dy) @jit(nopython=True) def laplace(N, Nite...
<commit_before><commit_msg>Add a Laplace equation solving benchmark (from Numpy)<commit_after>
""" Benchmark Laplace equation solving. From the Numpy benchmark suite, original code at https://github.com/yarikoptic/numpy-vbench/commit/a192bfd43043d413cc5d27526a9b28ad343b2499 """ import numpy as np from numba import jit dx = 0.1 dy = 0.1 dx2 = (dx * dx) dy2 = (dy * dy) @jit(nopython=True) def laplace(N, Nite...
Add a Laplace equation solving benchmark (from Numpy)""" Benchmark Laplace equation solving. From the Numpy benchmark suite, original code at https://github.com/yarikoptic/numpy-vbench/commit/a192bfd43043d413cc5d27526a9b28ad343b2499 """ import numpy as np from numba import jit dx = 0.1 dy = 0.1 dx2 = (dx * dx) dy2...
<commit_before><commit_msg>Add a Laplace equation solving benchmark (from Numpy)<commit_after>""" Benchmark Laplace equation solving. From the Numpy benchmark suite, original code at https://github.com/yarikoptic/numpy-vbench/commit/a192bfd43043d413cc5d27526a9b28ad343b2499 """ import numpy as np from numba import ji...
9115628cf10e194f1975e01142d8ae08ab5c4b06
joommf/test_odtreader.py
joommf/test_odtreader.py
def test_odtreader_dynamics_example(): from joommf.sim import Sim from joommf.mesh import Mesh from joommf.energies.exchange import Exchange from joommf.energies.demag import Demag from joommf.energies.zeeman import FixedZeeman from joommf.drivers import evolver # Mesh specification. lx ...
Add test for pandas dataframe loading
Add test for pandas dataframe loading
Python
bsd-2-clause
fangohr/oommf-python,ryanpepper/oommf-python,ryanpepper/oommf-python,fangohr/oommf-python,ryanpepper/oommf-python,fangohr/oommf-python,ryanpepper/oommf-python
Add test for pandas dataframe loading
def test_odtreader_dynamics_example(): from joommf.sim import Sim from joommf.mesh import Mesh from joommf.energies.exchange import Exchange from joommf.energies.demag import Demag from joommf.energies.zeeman import FixedZeeman from joommf.drivers import evolver # Mesh specification. lx ...
<commit_before><commit_msg>Add test for pandas dataframe loading<commit_after>
def test_odtreader_dynamics_example(): from joommf.sim import Sim from joommf.mesh import Mesh from joommf.energies.exchange import Exchange from joommf.energies.demag import Demag from joommf.energies.zeeman import FixedZeeman from joommf.drivers import evolver # Mesh specification. lx ...
Add test for pandas dataframe loadingdef test_odtreader_dynamics_example(): from joommf.sim import Sim from joommf.mesh import Mesh from joommf.energies.exchange import Exchange from joommf.energies.demag import Demag from joommf.energies.zeeman import FixedZeeman from joommf.drivers import evol...
<commit_before><commit_msg>Add test for pandas dataframe loading<commit_after>def test_odtreader_dynamics_example(): from joommf.sim import Sim from joommf.mesh import Mesh from joommf.energies.exchange import Exchange from joommf.energies.demag import Demag from joommf.energies.zeeman import FixedZ...
5f47cf46c82d9a48a9efe5ad11c6c3a55896da12
cupy/sparse/compressed.py
cupy/sparse/compressed.py
from cupy import cusparse from cupy.sparse import base from cupy.sparse import data as sparse_data class _compressed_sparse_matrix(sparse_data._data_matrix): def __init__(self, arg1, shape=None, dtype=None, copy=False): if isinstance(arg1, tuple) and len(arg1) == 3: data, indices, indptr = ar...
Implement abstract class for csc and csr matrix
Implement abstract class for csc and csr matrix
Python
mit
cupy/cupy,cupy/cupy,cupy/cupy,cupy/cupy
Implement abstract class for csc and csr matrix
from cupy import cusparse from cupy.sparse import base from cupy.sparse import data as sparse_data class _compressed_sparse_matrix(sparse_data._data_matrix): def __init__(self, arg1, shape=None, dtype=None, copy=False): if isinstance(arg1, tuple) and len(arg1) == 3: data, indices, indptr = ar...
<commit_before><commit_msg>Implement abstract class for csc and csr matrix<commit_after>
from cupy import cusparse from cupy.sparse import base from cupy.sparse import data as sparse_data class _compressed_sparse_matrix(sparse_data._data_matrix): def __init__(self, arg1, shape=None, dtype=None, copy=False): if isinstance(arg1, tuple) and len(arg1) == 3: data, indices, indptr = ar...
Implement abstract class for csc and csr matrixfrom cupy import cusparse from cupy.sparse import base from cupy.sparse import data as sparse_data class _compressed_sparse_matrix(sparse_data._data_matrix): def __init__(self, arg1, shape=None, dtype=None, copy=False): if isinstance(arg1, tuple) and len(arg...
<commit_before><commit_msg>Implement abstract class for csc and csr matrix<commit_after>from cupy import cusparse from cupy.sparse import base from cupy.sparse import data as sparse_data class _compressed_sparse_matrix(sparse_data._data_matrix): def __init__(self, arg1, shape=None, dtype=None, copy=False): ...
36333c275f4d3a66c8f14383c3ada5a42a197bea
bumblebee/modules/memory.py
bumblebee/modules/memory.py
import bumblebee.module import psutil def fmt(num, suffix='B'): for unit in [ "", "Ki", "Mi", "Gi" ]: if num < 1024.0: return "{:.2f}{}{}".format(num, unit, suffix) num /= 1024.0 return "{:05.2f%}{}{}".format(num, "Gi", suffix) class Module(bumblebee.module.Module): def __init_...
Add module for displaying RAM usage
[modules] Add module for displaying RAM usage Shows free RAM, total RAM, free RAM percentage
Python
mit
tobi-wan-kenobi/bumblebee-status,tobi-wan-kenobi/bumblebee-status
[modules] Add module for displaying RAM usage Shows free RAM, total RAM, free RAM percentage
import bumblebee.module import psutil def fmt(num, suffix='B'): for unit in [ "", "Ki", "Mi", "Gi" ]: if num < 1024.0: return "{:.2f}{}{}".format(num, unit, suffix) num /= 1024.0 return "{:05.2f%}{}{}".format(num, "Gi", suffix) class Module(bumblebee.module.Module): def __init_...
<commit_before><commit_msg>[modules] Add module for displaying RAM usage Shows free RAM, total RAM, free RAM percentage<commit_after>
import bumblebee.module import psutil def fmt(num, suffix='B'): for unit in [ "", "Ki", "Mi", "Gi" ]: if num < 1024.0: return "{:.2f}{}{}".format(num, unit, suffix) num /= 1024.0 return "{:05.2f%}{}{}".format(num, "Gi", suffix) class Module(bumblebee.module.Module): def __init_...
[modules] Add module for displaying RAM usage Shows free RAM, total RAM, free RAM percentageimport bumblebee.module import psutil def fmt(num, suffix='B'): for unit in [ "", "Ki", "Mi", "Gi" ]: if num < 1024.0: return "{:.2f}{}{}".format(num, unit, suffix) num /= 1024.0 return "{:0...
<commit_before><commit_msg>[modules] Add module for displaying RAM usage Shows free RAM, total RAM, free RAM percentage<commit_after>import bumblebee.module import psutil def fmt(num, suffix='B'): for unit in [ "", "Ki", "Mi", "Gi" ]: if num < 1024.0: return "{:.2f}{}{}".format(num, unit, suff...
eda3e6c005c1115a039f394d6f00baabebd39fee
calaccess_website/management/commands/updatebuildpublish.py
calaccess_website/management/commands/updatebuildpublish.py
#!/usr/bin/env python # -*- coding: utf-8 -*- """ Update to the latest available CAL-ACCESS snapshot and publish the files to the website. """ import logging from django.core.management import call_command from calaccess_raw.management.commands.updatecalaccessrawdata import Command as updatecommand logger = logging.get...
Add command for full daily build process
Add command for full daily build process
Python
mit
california-civic-data-coalition/django-calaccess-downloads-website,california-civic-data-coalition/django-calaccess-downloads-website,california-civic-data-coalition/django-calaccess-downloads-website
Add command for full daily build process
#!/usr/bin/env python # -*- coding: utf-8 -*- """ Update to the latest available CAL-ACCESS snapshot and publish the files to the website. """ import logging from django.core.management import call_command from calaccess_raw.management.commands.updatecalaccessrawdata import Command as updatecommand logger = logging.get...
<commit_before><commit_msg>Add command for full daily build process<commit_after>
#!/usr/bin/env python # -*- coding: utf-8 -*- """ Update to the latest available CAL-ACCESS snapshot and publish the files to the website. """ import logging from django.core.management import call_command from calaccess_raw.management.commands.updatecalaccessrawdata import Command as updatecommand logger = logging.get...
Add command for full daily build process#!/usr/bin/env python # -*- coding: utf-8 -*- """ Update to the latest available CAL-ACCESS snapshot and publish the files to the website. """ import logging from django.core.management import call_command from calaccess_raw.management.commands.updatecalaccessrawdata import Comma...
<commit_before><commit_msg>Add command for full daily build process<commit_after>#!/usr/bin/env python # -*- coding: utf-8 -*- """ Update to the latest available CAL-ACCESS snapshot and publish the files to the website. """ import logging from django.core.management import call_command from calaccess_raw.management.com...
b8acaf64187f5626ef6755ef00d2b2a1471d4914
numba/tests/closures/test_closure_type_inference.py
numba/tests/closures/test_closure_type_inference.py
import numpy as np from numba import * from numba.tests.test_support import * @autojit def test_cellvar_promotion(a): """ >>> inner = test_cellvar_promotion(10) 200.0 >>> inner.__name__ 'inner' >>> inner() 1000.0 """ b = int(a) * 2 @jit(void()) def inner(): print a...
Add closure type inference test
Add closure type inference test
Python
bsd-2-clause
pombredanne/numba,pombredanne/numba,cpcloud/numba,seibert/numba,numba/numba,gmarkall/numba,gmarkall/numba,numba/numba,jriehl/numba,stefanseefeld/numba,sklam/numba,GaZ3ll3/numba,stefanseefeld/numba,gmarkall/numba,sklam/numba,stuartarchibald/numba,gdementen/numba,ssarangi/numba,GaZ3ll3/numba,GaZ3ll3/numba,sklam/numba,sto...
Add closure type inference test
import numpy as np from numba import * from numba.tests.test_support import * @autojit def test_cellvar_promotion(a): """ >>> inner = test_cellvar_promotion(10) 200.0 >>> inner.__name__ 'inner' >>> inner() 1000.0 """ b = int(a) * 2 @jit(void()) def inner(): print a...
<commit_before><commit_msg>Add closure type inference test<commit_after>
import numpy as np from numba import * from numba.tests.test_support import * @autojit def test_cellvar_promotion(a): """ >>> inner = test_cellvar_promotion(10) 200.0 >>> inner.__name__ 'inner' >>> inner() 1000.0 """ b = int(a) * 2 @jit(void()) def inner(): print a...
Add closure type inference testimport numpy as np from numba import * from numba.tests.test_support import * @autojit def test_cellvar_promotion(a): """ >>> inner = test_cellvar_promotion(10) 200.0 >>> inner.__name__ 'inner' >>> inner() 1000.0 """ b = int(a) * 2 @jit(void()) ...
<commit_before><commit_msg>Add closure type inference test<commit_after>import numpy as np from numba import * from numba.tests.test_support import * @autojit def test_cellvar_promotion(a): """ >>> inner = test_cellvar_promotion(10) 200.0 >>> inner.__name__ 'inner' >>> inner() 1000.0 "...
5f503f0b9ab51ca2b1985fe88d5e84ff63b7d745
addplaylists.py
addplaylists.py
#!/usr/bin/env python2 from datetime import datetime from datetime import timedelta import random from wuvt.trackman.lib import perdelta from wuvt import db from wuvt.trackman.models import DJSet, DJ today = datetime.now() print("adding dj") dj = DJ(u"Johnny 5", u"John") db.session.add(dj) db.session.commit() print("...
Add sample playlists for testing features.
Add sample playlists for testing features.
Python
agpl-3.0
wuvt/wuvt-site,wuvt/wuvt-site,wuvt/wuvt-site,wuvt/wuvt-site
Add sample playlists for testing features.
#!/usr/bin/env python2 from datetime import datetime from datetime import timedelta import random from wuvt.trackman.lib import perdelta from wuvt import db from wuvt.trackman.models import DJSet, DJ today = datetime.now() print("adding dj") dj = DJ(u"Johnny 5", u"John") db.session.add(dj) db.session.commit() print("...
<commit_before><commit_msg>Add sample playlists for testing features.<commit_after>
#!/usr/bin/env python2 from datetime import datetime from datetime import timedelta import random from wuvt.trackman.lib import perdelta from wuvt import db from wuvt.trackman.models import DJSet, DJ today = datetime.now() print("adding dj") dj = DJ(u"Johnny 5", u"John") db.session.add(dj) db.session.commit() print("...
Add sample playlists for testing features.#!/usr/bin/env python2 from datetime import datetime from datetime import timedelta import random from wuvt.trackman.lib import perdelta from wuvt import db from wuvt.trackman.models import DJSet, DJ today = datetime.now() print("adding dj") dj = DJ(u"Johnny 5", u"John") db.se...
<commit_before><commit_msg>Add sample playlists for testing features.<commit_after>#!/usr/bin/env python2 from datetime import datetime from datetime import timedelta import random from wuvt.trackman.lib import perdelta from wuvt import db from wuvt.trackman.models import DJSet, DJ today = datetime.now() print("adding...
4fab31eef9ad80230b36039b66c70d94456e5f9b
tests/monad.py
tests/monad.py
'''Test case for monads and monoidic functions ''' import unittest from lighty import monads class MonadTestCase(unittest.TestCase): '''Test case for partial template execution ''' def testNumberComparision(self): monad = monads.ValueMonad(10) assert monad == 10, 'Number __eq__ error: %s...
Add missing tests file from previous commit.
Add missing tests file from previous commit.
Python
bsd-3-clause
GrAndSE/lighty
Add missing tests file from previous commit.
'''Test case for monads and monoidic functions ''' import unittest from lighty import monads class MonadTestCase(unittest.TestCase): '''Test case for partial template execution ''' def testNumberComparision(self): monad = monads.ValueMonad(10) assert monad == 10, 'Number __eq__ error: %s...
<commit_before><commit_msg>Add missing tests file from previous commit.<commit_after>
'''Test case for monads and monoidic functions ''' import unittest from lighty import monads class MonadTestCase(unittest.TestCase): '''Test case for partial template execution ''' def testNumberComparision(self): monad = monads.ValueMonad(10) assert monad == 10, 'Number __eq__ error: %s...
Add missing tests file from previous commit.'''Test case for monads and monoidic functions ''' import unittest from lighty import monads class MonadTestCase(unittest.TestCase): '''Test case for partial template execution ''' def testNumberComparision(self): monad = monads.ValueMonad(10) ...
<commit_before><commit_msg>Add missing tests file from previous commit.<commit_after>'''Test case for monads and monoidic functions ''' import unittest from lighty import monads class MonadTestCase(unittest.TestCase): '''Test case for partial template execution ''' def testNumberComparision(self): ...
1a7fa8080d19909ccf8e8e89aa19c92c1413f1c1
apps/pyjob_submite_jobs_again.py
apps/pyjob_submite_jobs_again.py
#!/usr/bin/env python3 import os import sys import subprocess right_inputs = False if len(sys.argv) > 2 : tp = sys.argv[1] rms = [int(x) for x in sys.argv[2:]] if tp in ['ma', 'ex', 'xy']: right_inputs = True curdir = os.getcwd() if right_inputs: if curdir.endswith('trackcpp'): flatfile = 'fl...
Add script to submite jobs again
Add script to submite jobs again
Python
mit
lnls-fac/job_manager
Add script to submite jobs again
#!/usr/bin/env python3 import os import sys import subprocess right_inputs = False if len(sys.argv) > 2 : tp = sys.argv[1] rms = [int(x) for x in sys.argv[2:]] if tp in ['ma', 'ex', 'xy']: right_inputs = True curdir = os.getcwd() if right_inputs: if curdir.endswith('trackcpp'): flatfile = 'fl...
<commit_before><commit_msg>Add script to submite jobs again<commit_after>
#!/usr/bin/env python3 import os import sys import subprocess right_inputs = False if len(sys.argv) > 2 : tp = sys.argv[1] rms = [int(x) for x in sys.argv[2:]] if tp in ['ma', 'ex', 'xy']: right_inputs = True curdir = os.getcwd() if right_inputs: if curdir.endswith('trackcpp'): flatfile = 'fl...
Add script to submite jobs again#!/usr/bin/env python3 import os import sys import subprocess right_inputs = False if len(sys.argv) > 2 : tp = sys.argv[1] rms = [int(x) for x in sys.argv[2:]] if tp in ['ma', 'ex', 'xy']: right_inputs = True curdir = os.getcwd() if right_inputs: if curdir.endswith('tr...
<commit_before><commit_msg>Add script to submite jobs again<commit_after>#!/usr/bin/env python3 import os import sys import subprocess right_inputs = False if len(sys.argv) > 2 : tp = sys.argv[1] rms = [int(x) for x in sys.argv[2:]] if tp in ['ma', 'ex', 'xy']: right_inputs = True curdir = os.getcwd() if...
884ae74bb75e5a0c60da74791a2e6fad9e4b83e5
py/find-right-interval.py
py/find-right-interval.py
from operator import itemgetter # Definition for an interval. # class Interval(object): # def __init__(self, s=0, e=0): # self.start = s # self.end = e class Solution(object): def findRightInterval(self, intervals): """ :type intervals: List[Interval] :rtype: List[int] ...
Add py solution for 436. Find Right Interval
Add py solution for 436. Find Right Interval 436. Find Right Interval: https://leetcode.com/problems/find-right-interval/
Python
apache-2.0
ckclark/leetcode,ckclark/leetcode,ckclark/leetcode,ckclark/leetcode,ckclark/leetcode,ckclark/leetcode
Add py solution for 436. Find Right Interval 436. Find Right Interval: https://leetcode.com/problems/find-right-interval/
from operator import itemgetter # Definition for an interval. # class Interval(object): # def __init__(self, s=0, e=0): # self.start = s # self.end = e class Solution(object): def findRightInterval(self, intervals): """ :type intervals: List[Interval] :rtype: List[int] ...
<commit_before><commit_msg>Add py solution for 436. Find Right Interval 436. Find Right Interval: https://leetcode.com/problems/find-right-interval/<commit_after>
from operator import itemgetter # Definition for an interval. # class Interval(object): # def __init__(self, s=0, e=0): # self.start = s # self.end = e class Solution(object): def findRightInterval(self, intervals): """ :type intervals: List[Interval] :rtype: List[int] ...
Add py solution for 436. Find Right Interval 436. Find Right Interval: https://leetcode.com/problems/find-right-interval/from operator import itemgetter # Definition for an interval. # class Interval(object): # def __init__(self, s=0, e=0): # self.start = s # self.end = e class Solution(object): ...
<commit_before><commit_msg>Add py solution for 436. Find Right Interval 436. Find Right Interval: https://leetcode.com/problems/find-right-interval/<commit_after>from operator import itemgetter # Definition for an interval. # class Interval(object): # def __init__(self, s=0, e=0): # self.start = s # ...
07f8fd56ab366a2d1365278c3310ade4b1d30c57
heat_integrationtests/functional/test_versionnegotiation.py
heat_integrationtests/functional/test_versionnegotiation.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 # d...
Add functional test for version negotiation
Add functional test for version negotiation the test attempts to make an unauthenticated request to the Heat API root. Change-Id: Ib14628927efe561744cda683ca4dcf27b0524e20 Story: 2002531 Task: 22077
Python
apache-2.0
openstack/heat,noironetworks/heat,noironetworks/heat,openstack/heat
Add functional test for version negotiation the test attempts to make an unauthenticated request to the Heat API root. Change-Id: Ib14628927efe561744cda683ca4dcf27b0524e20 Story: 2002531 Task: 22077
# 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...
<commit_before><commit_msg>Add functional test for version negotiation the test attempts to make an unauthenticated request to the Heat API root. Change-Id: Ib14628927efe561744cda683ca4dcf27b0524e20 Story: 2002531 Task: 22077<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 # d...
Add functional test for version negotiation the test attempts to make an unauthenticated request to the Heat API root. Change-Id: Ib14628927efe561744cda683ca4dcf27b0524e20 Story: 2002531 Task: 22077# Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance...
<commit_before><commit_msg>Add functional test for version negotiation the test attempts to make an unauthenticated request to the Heat API root. Change-Id: Ib14628927efe561744cda683ca4dcf27b0524e20 Story: 2002531 Task: 22077<commit_after># Licensed under the Apache License, Version 2.0 (the "License"); you may # ...
47dff2561be481ff067c22ed98d9ea6a9cf8ae10
test/test_notebook.py
test/test_notebook.py
import os import glob import contextlib import subprocess import pytest notebooks = list(glob.glob("*.ipynb", recursive=True)) @contextlib.contextmanager def cleanup(notebook): name, __ = os.path.splitext(notebook) yield fname = name + ".html" if os.path.isfile(fname): os.remove(fname) @py...
Add test to execute notebooks
Add test to execute notebooks
Python
mit
adicu/AccessibleML,alanhdu/AccessibleML
Add test to execute notebooks
import os import glob import contextlib import subprocess import pytest notebooks = list(glob.glob("*.ipynb", recursive=True)) @contextlib.contextmanager def cleanup(notebook): name, __ = os.path.splitext(notebook) yield fname = name + ".html" if os.path.isfile(fname): os.remove(fname) @py...
<commit_before><commit_msg>Add test to execute notebooks<commit_after>
import os import glob import contextlib import subprocess import pytest notebooks = list(glob.glob("*.ipynb", recursive=True)) @contextlib.contextmanager def cleanup(notebook): name, __ = os.path.splitext(notebook) yield fname = name + ".html" if os.path.isfile(fname): os.remove(fname) @py...
Add test to execute notebooksimport os import glob import contextlib import subprocess import pytest notebooks = list(glob.glob("*.ipynb", recursive=True)) @contextlib.contextmanager def cleanup(notebook): name, __ = os.path.splitext(notebook) yield fname = name + ".html" if os.path.isfile(fname): ...
<commit_before><commit_msg>Add test to execute notebooks<commit_after>import os import glob import contextlib import subprocess import pytest notebooks = list(glob.glob("*.ipynb", recursive=True)) @contextlib.contextmanager def cleanup(notebook): name, __ = os.path.splitext(notebook) yield fname = name ...
0b8d5794d2c5a1ae46659e02b65d1c21ffe8881d
babyonboard/api/tests/test_views.py
babyonboard/api/tests/test_views.py
import json from rest_framework import status from django.test import TestCase, Client from django.urls import reverse from ..models import Temperature from ..serializers import TemperatureSerializer client = Client() class GetCurrentTemperatureTest(TestCase): """ Test class for GET current temperature from API...
Implement tests for temperature endpoint
Implement tests for temperature endpoint
Python
mit
BabyOnBoard/BabyOnBoard-API,BabyOnBoard/BabyOnBoard-API
Implement tests for temperature endpoint
import json from rest_framework import status from django.test import TestCase, Client from django.urls import reverse from ..models import Temperature from ..serializers import TemperatureSerializer client = Client() class GetCurrentTemperatureTest(TestCase): """ Test class for GET current temperature from API...
<commit_before><commit_msg>Implement tests for temperature endpoint<commit_after>
import json from rest_framework import status from django.test import TestCase, Client from django.urls import reverse from ..models import Temperature from ..serializers import TemperatureSerializer client = Client() class GetCurrentTemperatureTest(TestCase): """ Test class for GET current temperature from API...
Implement tests for temperature endpointimport json from rest_framework import status from django.test import TestCase, Client from django.urls import reverse from ..models import Temperature from ..serializers import TemperatureSerializer client = Client() class GetCurrentTemperatureTest(TestCase): """ Test cl...
<commit_before><commit_msg>Implement tests for temperature endpoint<commit_after>import json from rest_framework import status from django.test import TestCase, Client from django.urls import reverse from ..models import Temperature from ..serializers import TemperatureSerializer client = Client() class GetCurrentT...
aa6837e14e520f5917cf1c452bd0c9a8ce2a27dd
module/others/plugins.py
module/others/plugins.py
from maya import cmds class Commands(object): """ class name must be 'Commands' """ commandDict = {} def _loadObjPlugin(self): if not cmds.pluginInfo("objExport", q=True, loaded=True): cmds.loadPlugin("objExport") commandDict['sampleCommand'] = "sphere.png" # ^ Don't forget t...
Add new module for plugin loading
Add new module for plugin loading
Python
mit
minoue/miExecutor
Add new module for plugin loading
from maya import cmds class Commands(object): """ class name must be 'Commands' """ commandDict = {} def _loadObjPlugin(self): if not cmds.pluginInfo("objExport", q=True, loaded=True): cmds.loadPlugin("objExport") commandDict['sampleCommand'] = "sphere.png" # ^ Don't forget t...
<commit_before><commit_msg>Add new module for plugin loading<commit_after>
from maya import cmds class Commands(object): """ class name must be 'Commands' """ commandDict = {} def _loadObjPlugin(self): if not cmds.pluginInfo("objExport", q=True, loaded=True): cmds.loadPlugin("objExport") commandDict['sampleCommand'] = "sphere.png" # ^ Don't forget t...
Add new module for plugin loadingfrom maya import cmds class Commands(object): """ class name must be 'Commands' """ commandDict = {} def _loadObjPlugin(self): if not cmds.pluginInfo("objExport", q=True, loaded=True): cmds.loadPlugin("objExport") commandDict['sampleCommand'] = "s...
<commit_before><commit_msg>Add new module for plugin loading<commit_after>from maya import cmds class Commands(object): """ class name must be 'Commands' """ commandDict = {} def _loadObjPlugin(self): if not cmds.pluginInfo("objExport", q=True, loaded=True): cmds.loadPlugin("objExpor...
67350e9ac3f2dc0fceb1899c8692adcd9cdd4213
frappe/tests/test_boot.py
frappe/tests/test_boot.py
import unittest import frappe from frappe.boot import get_unseen_notes from frappe.desk.doctype.note.note import mark_as_seen class TestBootData(unittest.TestCase): def test_get_unseen_notes(self): frappe.db.delete("Note") frappe.db.delete("Note Seen By") note = frappe.get_doc( { "doctype": "Note", ...
Add a test case to validate `get_unseen_notes`
test: Add a test case to validate `get_unseen_notes`
Python
mit
yashodhank/frappe,StrellaGroup/frappe,frappe/frappe,yashodhank/frappe,yashodhank/frappe,yashodhank/frappe,frappe/frappe,frappe/frappe,StrellaGroup/frappe,StrellaGroup/frappe
test: Add a test case to validate `get_unseen_notes`
import unittest import frappe from frappe.boot import get_unseen_notes from frappe.desk.doctype.note.note import mark_as_seen class TestBootData(unittest.TestCase): def test_get_unseen_notes(self): frappe.db.delete("Note") frappe.db.delete("Note Seen By") note = frappe.get_doc( { "doctype": "Note", ...
<commit_before><commit_msg>test: Add a test case to validate `get_unseen_notes`<commit_after>
import unittest import frappe from frappe.boot import get_unseen_notes from frappe.desk.doctype.note.note import mark_as_seen class TestBootData(unittest.TestCase): def test_get_unseen_notes(self): frappe.db.delete("Note") frappe.db.delete("Note Seen By") note = frappe.get_doc( { "doctype": "Note", ...
test: Add a test case to validate `get_unseen_notes`import unittest import frappe from frappe.boot import get_unseen_notes from frappe.desk.doctype.note.note import mark_as_seen class TestBootData(unittest.TestCase): def test_get_unseen_notes(self): frappe.db.delete("Note") frappe.db.delete("Note Seen By") no...
<commit_before><commit_msg>test: Add a test case to validate `get_unseen_notes`<commit_after>import unittest import frappe from frappe.boot import get_unseen_notes from frappe.desk.doctype.note.note import mark_as_seen class TestBootData(unittest.TestCase): def test_get_unseen_notes(self): frappe.db.delete("Note"...
f7f25876d3398cacc822faf2b16cc156e88c7fd3
misc/jp2_kakadu_pillow.py
misc/jp2_kakadu_pillow.py
# This the basic flow for getting from a JP2 to a jpg w/ kdu_expand and Pillow # Useful for debugging the scenario independent of the server. from PIL import Image from PIL.ImageFile import Parser from os import makedirs, path, unlink import subprocess import sys KDU_EXPAND='/usr/local/bin/kdu_expand' LIB_KDU='/usr/l...
Use this enough, might as well add it.
Use this enough, might as well add it.
Python
bsd-2-clause
ehenneken/loris,medusa-project/loris,rlskoeser/loris,medusa-project/loris,rlskoeser/loris,ehenneken/loris
Use this enough, might as well add it.
# This the basic flow for getting from a JP2 to a jpg w/ kdu_expand and Pillow # Useful for debugging the scenario independent of the server. from PIL import Image from PIL.ImageFile import Parser from os import makedirs, path, unlink import subprocess import sys KDU_EXPAND='/usr/local/bin/kdu_expand' LIB_KDU='/usr/l...
<commit_before><commit_msg>Use this enough, might as well add it.<commit_after>
# This the basic flow for getting from a JP2 to a jpg w/ kdu_expand and Pillow # Useful for debugging the scenario independent of the server. from PIL import Image from PIL.ImageFile import Parser from os import makedirs, path, unlink import subprocess import sys KDU_EXPAND='/usr/local/bin/kdu_expand' LIB_KDU='/usr/l...
Use this enough, might as well add it.# This the basic flow for getting from a JP2 to a jpg w/ kdu_expand and Pillow # Useful for debugging the scenario independent of the server. from PIL import Image from PIL.ImageFile import Parser from os import makedirs, path, unlink import subprocess import sys KDU_EXPAND='/usr...
<commit_before><commit_msg>Use this enough, might as well add it.<commit_after># This the basic flow for getting from a JP2 to a jpg w/ kdu_expand and Pillow # Useful for debugging the scenario independent of the server. from PIL import Image from PIL.ImageFile import Parser from os import makedirs, path, unlink impor...
d5e67563f23acb11fe0e4641d48b67fe3509822f
apps/companyprofile/migrations/0002_auto_20151014_2132.py
apps/companyprofile/migrations/0002_auto_20151014_2132.py
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations class Migration(migrations.Migration): dependencies = [ ('companyprofile', '0001_initial'), ] operations = [ migrations.RenameField( model_name='company', old...
Add test migration removing ref to old company image
Add test migration removing ref to old company image
Python
mit
dotKom/onlineweb4,dotKom/onlineweb4,dotKom/onlineweb4,dotKom/onlineweb4
Add test migration removing ref to old company image
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations class Migration(migrations.Migration): dependencies = [ ('companyprofile', '0001_initial'), ] operations = [ migrations.RenameField( model_name='company', old...
<commit_before><commit_msg>Add test migration removing ref to old company image<commit_after>
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations class Migration(migrations.Migration): dependencies = [ ('companyprofile', '0001_initial'), ] operations = [ migrations.RenameField( model_name='company', old...
Add test migration removing ref to old company image# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations class Migration(migrations.Migration): dependencies = [ ('companyprofile', '0001_initial'), ] operations = [ migrations.RenameFiel...
<commit_before><commit_msg>Add test migration removing ref to old company image<commit_after># -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations class Migration(migrations.Migration): dependencies = [ ('companyprofile', '0001_initial'), ] ope...
d5b622e9fb855753630cd3a6fae1a315b4be1a08
examples/dominant_eigenvector_pytorch.py
examples/dominant_eigenvector_pytorch.py
import numpy as np import numpy.random as rnd import numpy.linalg as la import torch from pymanopt import Problem from pymanopt.tools import decorators from pymanopt.manifolds import Sphere from pymanopt.solvers import TrustRegions def dominant_eigenvector(A): """ Returns the dominant eigenvector of the symm...
Add example using new pytorch backend
Add example using new pytorch backend Signed-off-by: Niklas Koep <342d5290239d9c5264c8f98185afedb99596601a@gmail.com>
Python
bsd-3-clause
nkoep/pymanopt,nkoep/pymanopt,pymanopt/pymanopt,nkoep/pymanopt,pymanopt/pymanopt
Add example using new pytorch backend Signed-off-by: Niklas Koep <342d5290239d9c5264c8f98185afedb99596601a@gmail.com>
import numpy as np import numpy.random as rnd import numpy.linalg as la import torch from pymanopt import Problem from pymanopt.tools import decorators from pymanopt.manifolds import Sphere from pymanopt.solvers import TrustRegions def dominant_eigenvector(A): """ Returns the dominant eigenvector of the symm...
<commit_before><commit_msg>Add example using new pytorch backend Signed-off-by: Niklas Koep <342d5290239d9c5264c8f98185afedb99596601a@gmail.com><commit_after>
import numpy as np import numpy.random as rnd import numpy.linalg as la import torch from pymanopt import Problem from pymanopt.tools import decorators from pymanopt.manifolds import Sphere from pymanopt.solvers import TrustRegions def dominant_eigenvector(A): """ Returns the dominant eigenvector of the symm...
Add example using new pytorch backend Signed-off-by: Niklas Koep <342d5290239d9c5264c8f98185afedb99596601a@gmail.com>import numpy as np import numpy.random as rnd import numpy.linalg as la import torch from pymanopt import Problem from pymanopt.tools import decorators from pymanopt.manifolds import Sphere from pymano...
<commit_before><commit_msg>Add example using new pytorch backend Signed-off-by: Niklas Koep <342d5290239d9c5264c8f98185afedb99596601a@gmail.com><commit_after>import numpy as np import numpy.random as rnd import numpy.linalg as la import torch from pymanopt import Problem from pymanopt.tools import decorators from pym...
9fbde5b8dd4d2555e03bc0b7915fc4e55f8333d9
numba/tests/test_help.py
numba/tests/test_help.py
from __future__ import print_function import builtins import types as pytypes import numpy as np from numba import types from .support import TestCase from numba.help.inspector import inspect_function, inspect_module class TestInspector(TestCase): def check_function_descriptor(self, info, must_be_defined=False...
Add test to help module
Add test to help module
Python
bsd-2-clause
numba/numba,stonebig/numba,numba/numba,stonebig/numba,seibert/numba,stuartarchibald/numba,cpcloud/numba,sklam/numba,gmarkall/numba,stuartarchibald/numba,IntelLabs/numba,seibert/numba,IntelLabs/numba,IntelLabs/numba,gmarkall/numba,gmarkall/numba,seibert/numba,numba/numba,cpcloud/numba,gmarkall/numba,stuartarchibald/numb...
Add test to help module
from __future__ import print_function import builtins import types as pytypes import numpy as np from numba import types from .support import TestCase from numba.help.inspector import inspect_function, inspect_module class TestInspector(TestCase): def check_function_descriptor(self, info, must_be_defined=False...
<commit_before><commit_msg>Add test to help module<commit_after>
from __future__ import print_function import builtins import types as pytypes import numpy as np from numba import types from .support import TestCase from numba.help.inspector import inspect_function, inspect_module class TestInspector(TestCase): def check_function_descriptor(self, info, must_be_defined=False...
Add test to help modulefrom __future__ import print_function import builtins import types as pytypes import numpy as np from numba import types from .support import TestCase from numba.help.inspector import inspect_function, inspect_module class TestInspector(TestCase): def check_function_descriptor(self, info...
<commit_before><commit_msg>Add test to help module<commit_after>from __future__ import print_function import builtins import types as pytypes import numpy as np from numba import types from .support import TestCase from numba.help.inspector import inspect_function, inspect_module class TestInspector(TestCase): ...
e8607fce01bfe17c08de0702c4041d98504bc159
reunition/apps/alumni/migrations/0006_auto_20150823_2030.py
reunition/apps/alumni/migrations/0006_auto_20150823_2030.py
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations class Migration(migrations.Migration): dependencies = [ ('alumni', '0005_note'), ] operations = [ migrations.AlterField( model_name='note', name='contacted', ...
Add migration for changing CONTACTED_CHOICES
Add migration for changing CONTACTED_CHOICES
Python
mit
reunition/reunition,reunition/reunition,reunition/reunition
Add migration for changing CONTACTED_CHOICES
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations class Migration(migrations.Migration): dependencies = [ ('alumni', '0005_note'), ] operations = [ migrations.AlterField( model_name='note', name='contacted', ...
<commit_before><commit_msg>Add migration for changing CONTACTED_CHOICES<commit_after>
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations class Migration(migrations.Migration): dependencies = [ ('alumni', '0005_note'), ] operations = [ migrations.AlterField( model_name='note', name='contacted', ...
Add migration for changing CONTACTED_CHOICES# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations class Migration(migrations.Migration): dependencies = [ ('alumni', '0005_note'), ] operations = [ migrations.AlterField( model...
<commit_before><commit_msg>Add migration for changing CONTACTED_CHOICES<commit_after># -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations class Migration(migrations.Migration): dependencies = [ ('alumni', '0005_note'), ] operations = [ ...
3367f9d1e394bf686bc6bbd6316265c9feef4f03
test/on_yubikey/test_cli_config.py
test/on_yubikey/test_cli_config.py
from .util import (DestructiveYubikeyTestCase, ykman_cli) class TestConfigUSB(DestructiveYubikeyTestCase): def setUp(self): ykman_cli('config', 'usb', '--enable-all', '-f') def tearDown(self): ykman_cli('config', 'usb', '--enable-all', '-f') def test_disable_otp(self): ykman_cli...
Add basic tests for config usb
Add basic tests for config usb
Python
bsd-2-clause
Yubico/yubikey-manager,Yubico/yubikey-manager
Add basic tests for config usb
from .util import (DestructiveYubikeyTestCase, ykman_cli) class TestConfigUSB(DestructiveYubikeyTestCase): def setUp(self): ykman_cli('config', 'usb', '--enable-all', '-f') def tearDown(self): ykman_cli('config', 'usb', '--enable-all', '-f') def test_disable_otp(self): ykman_cli...
<commit_before><commit_msg>Add basic tests for config usb<commit_after>
from .util import (DestructiveYubikeyTestCase, ykman_cli) class TestConfigUSB(DestructiveYubikeyTestCase): def setUp(self): ykman_cli('config', 'usb', '--enable-all', '-f') def tearDown(self): ykman_cli('config', 'usb', '--enable-all', '-f') def test_disable_otp(self): ykman_cli...
Add basic tests for config usbfrom .util import (DestructiveYubikeyTestCase, ykman_cli) class TestConfigUSB(DestructiveYubikeyTestCase): def setUp(self): ykman_cli('config', 'usb', '--enable-all', '-f') def tearDown(self): ykman_cli('config', 'usb', '--enable-all', '-f') def test_disabl...
<commit_before><commit_msg>Add basic tests for config usb<commit_after>from .util import (DestructiveYubikeyTestCase, ykman_cli) class TestConfigUSB(DestructiveYubikeyTestCase): def setUp(self): ykman_cli('config', 'usb', '--enable-all', '-f') def tearDown(self): ykman_cli('config', 'usb', '...
28b5fef57580640cd78775d6c0544bc633e5958a
generate-key.py
generate-key.py
#!/usr/bin/python import os import sqlite3 import sys import time if len(sys.argv) < 3: raise ValueError('Usage: %s "Firstnam Lastname" email@example.com' % sys.argv[0]) db = sqlite3.connect('/var/lib/zon-api/data.db') api_key = str(os.urandom(26).encode('hex')) tier = 'free' name = sys.argv[1] email = sys.argv[...
Add helper script to generate API keys.
Add helper script to generate API keys.
Python
bsd-3-clause
ZeitOnline/content-api,ZeitOnline/content-api
Add helper script to generate API keys.
#!/usr/bin/python import os import sqlite3 import sys import time if len(sys.argv) < 3: raise ValueError('Usage: %s "Firstnam Lastname" email@example.com' % sys.argv[0]) db = sqlite3.connect('/var/lib/zon-api/data.db') api_key = str(os.urandom(26).encode('hex')) tier = 'free' name = sys.argv[1] email = sys.argv[...
<commit_before><commit_msg>Add helper script to generate API keys.<commit_after>
#!/usr/bin/python import os import sqlite3 import sys import time if len(sys.argv) < 3: raise ValueError('Usage: %s "Firstnam Lastname" email@example.com' % sys.argv[0]) db = sqlite3.connect('/var/lib/zon-api/data.db') api_key = str(os.urandom(26).encode('hex')) tier = 'free' name = sys.argv[1] email = sys.argv[...
Add helper script to generate API keys.#!/usr/bin/python import os import sqlite3 import sys import time if len(sys.argv) < 3: raise ValueError('Usage: %s "Firstnam Lastname" email@example.com' % sys.argv[0]) db = sqlite3.connect('/var/lib/zon-api/data.db') api_key = str(os.urandom(26).encode('hex')) tier = 'fre...
<commit_before><commit_msg>Add helper script to generate API keys.<commit_after>#!/usr/bin/python import os import sqlite3 import sys import time if len(sys.argv) < 3: raise ValueError('Usage: %s "Firstnam Lastname" email@example.com' % sys.argv[0]) db = sqlite3.connect('/var/lib/zon-api/data.db') api_key = str(...
3b27b1d6b1c4739b8d456703542ec8182ce12277
heat/tests/functional/test_WordPress_Composed_Instances.py
heat/tests/functional/test_WordPress_Composed_Instances.py
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # # 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 applicabl...
Add a Wordpress+MySQL composed instance functional test case
Add a Wordpress+MySQL composed instance functional test case Change-Id: I6a905b186be59c929e530519414e46d222b4ea08 Signed-off-by: Steven Dake <8638f3fce5db0278cfbc239bd581dfc00c29ec9d@redhat.com>
Python
apache-2.0
gonzolino/heat,noironetworks/heat,steveb/heat,cwolferh/heat-scratch,noironetworks/heat,gonzolino/heat,maestro-hybrid-cloud/heat,citrix-openstack-build/heat,pshchelo/heat,cryptickp/heat,dragorosson/heat,rh-s/heat,Triv90/Heat,steveb/heat,rh-s/heat,srznew/heat,srznew/heat,openstack/heat,redhat-openstack/heat,rickerc/heat_...
Add a Wordpress+MySQL composed instance functional test case Change-Id: I6a905b186be59c929e530519414e46d222b4ea08 Signed-off-by: Steven Dake <8638f3fce5db0278cfbc239bd581dfc00c29ec9d@redhat.com>
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # # 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 applicabl...
<commit_before><commit_msg>Add a Wordpress+MySQL composed instance functional test case Change-Id: I6a905b186be59c929e530519414e46d222b4ea08 Signed-off-by: Steven Dake <8638f3fce5db0278cfbc239bd581dfc00c29ec9d@redhat.com><commit_after>
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # # 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 applicabl...
Add a Wordpress+MySQL composed instance functional test case Change-Id: I6a905b186be59c929e530519414e46d222b4ea08 Signed-off-by: Steven Dake <8638f3fce5db0278cfbc239bd581dfc00c29ec9d@redhat.com># vim: tabstop=4 shiftwidth=4 softtabstop=4 # # Licensed under the Apache License, Version 2.0 (the "License"); you may # ...
<commit_before><commit_msg>Add a Wordpress+MySQL composed instance functional test case Change-Id: I6a905b186be59c929e530519414e46d222b4ea08 Signed-off-by: Steven Dake <8638f3fce5db0278cfbc239bd581dfc00c29ec9d@redhat.com><commit_after># vim: tabstop=4 shiftwidth=4 softtabstop=4 # # Licensed under the Apache License...
3bd95d8789871246fb90c6eb0487d9746ef5cb27
bluebottle/cms/migrations/0056_auto_20191106_1041.py
bluebottle/cms/migrations/0056_auto_20191106_1041.py
# -*- coding: utf-8 -*- # Generated by Django 1.11.15 on 2019-11-06 09:41 from __future__ import unicode_literals from django.db import migrations def migrate_project_blocks(apps, schema_editor): ProjectsContent = apps.get_model('cms', 'ProjectsContent') ActivitiesContent = apps.get_model('cms', 'ActivitiesC...
Migrate all project contents blocks to activity contents blocks
Migrate all project contents blocks to activity contents blocks BB-15606 #resolve
Python
bsd-3-clause
onepercentclub/bluebottle,onepercentclub/bluebottle,onepercentclub/bluebottle,onepercentclub/bluebottle,onepercentclub/bluebottle
Migrate all project contents blocks to activity contents blocks BB-15606 #resolve
# -*- coding: utf-8 -*- # Generated by Django 1.11.15 on 2019-11-06 09:41 from __future__ import unicode_literals from django.db import migrations def migrate_project_blocks(apps, schema_editor): ProjectsContent = apps.get_model('cms', 'ProjectsContent') ActivitiesContent = apps.get_model('cms', 'ActivitiesC...
<commit_before><commit_msg>Migrate all project contents blocks to activity contents blocks BB-15606 #resolve<commit_after>
# -*- coding: utf-8 -*- # Generated by Django 1.11.15 on 2019-11-06 09:41 from __future__ import unicode_literals from django.db import migrations def migrate_project_blocks(apps, schema_editor): ProjectsContent = apps.get_model('cms', 'ProjectsContent') ActivitiesContent = apps.get_model('cms', 'ActivitiesC...
Migrate all project contents blocks to activity contents blocks BB-15606 #resolve# -*- coding: utf-8 -*- # Generated by Django 1.11.15 on 2019-11-06 09:41 from __future__ import unicode_literals from django.db import migrations def migrate_project_blocks(apps, schema_editor): ProjectsContent = apps.get_model('c...
<commit_before><commit_msg>Migrate all project contents blocks to activity contents blocks BB-15606 #resolve<commit_after># -*- coding: utf-8 -*- # Generated by Django 1.11.15 on 2019-11-06 09:41 from __future__ import unicode_literals from django.db import migrations def migrate_project_blocks(apps, schema_editor)...
06570a926bde2ea10730062b05a2348c3020745c
examples/filter_ensemble_average.py
examples/filter_ensemble_average.py
import numpy as np import matplotlib.pyplot as plt import atomic from ensemble_average import time_dependent_power if __name__ == '__main__': times = np.logspace(-7, 0, 50) temperature = np.logspace(0, 3, 50) density = 1e19 from atomic.pec import TransitionPool ad = atomic.element('argon') t...
Add example: filtered ensemble average.
Add example: filtered ensemble average.
Python
mit
cfe316/atomic,ezekial4/atomic_neu,ezekial4/atomic_neu
Add example: filtered ensemble average.
import numpy as np import matplotlib.pyplot as plt import atomic from ensemble_average import time_dependent_power if __name__ == '__main__': times = np.logspace(-7, 0, 50) temperature = np.logspace(0, 3, 50) density = 1e19 from atomic.pec import TransitionPool ad = atomic.element('argon') t...
<commit_before><commit_msg>Add example: filtered ensemble average.<commit_after>
import numpy as np import matplotlib.pyplot as plt import atomic from ensemble_average import time_dependent_power if __name__ == '__main__': times = np.logspace(-7, 0, 50) temperature = np.logspace(0, 3, 50) density = 1e19 from atomic.pec import TransitionPool ad = atomic.element('argon') t...
Add example: filtered ensemble average.import numpy as np import matplotlib.pyplot as plt import atomic from ensemble_average import time_dependent_power if __name__ == '__main__': times = np.logspace(-7, 0, 50) temperature = np.logspace(0, 3, 50) density = 1e19 from atomic.pec import TransitionPool...
<commit_before><commit_msg>Add example: filtered ensemble average.<commit_after>import numpy as np import matplotlib.pyplot as plt import atomic from ensemble_average import time_dependent_power if __name__ == '__main__': times = np.logspace(-7, 0, 50) temperature = np.logspace(0, 3, 50) density = 1e19 ...
38b4ec7164f07af7135c41c401c4f403c1061d66
app/main.py
app/main.py
"""lazy Usage: lazy (new|n) lazy (show|s) [<id>] lazy (delete|d) [<id>] lazy (import|i) <path> lazy (export|e) <path> [<id>] Options: -h, --help: Show this help message. """ from docopt import docopt def main(): # Parse commandline arguments. args = docop...
Add skeleton for parsing commands
Add skeleton for parsing commands
Python
mit
Zillolo/lazy-todo
Add skeleton for parsing commands
"""lazy Usage: lazy (new|n) lazy (show|s) [<id>] lazy (delete|d) [<id>] lazy (import|i) <path> lazy (export|e) <path> [<id>] Options: -h, --help: Show this help message. """ from docopt import docopt def main(): # Parse commandline arguments. args = docop...
<commit_before><commit_msg>Add skeleton for parsing commands<commit_after>
"""lazy Usage: lazy (new|n) lazy (show|s) [<id>] lazy (delete|d) [<id>] lazy (import|i) <path> lazy (export|e) <path> [<id>] Options: -h, --help: Show this help message. """ from docopt import docopt def main(): # Parse commandline arguments. args = docop...
Add skeleton for parsing commands"""lazy Usage: lazy (new|n) lazy (show|s) [<id>] lazy (delete|d) [<id>] lazy (import|i) <path> lazy (export|e) <path> [<id>] Options: -h, --help: Show this help message. """ from docopt import docopt def main(): # Parse comman...
<commit_before><commit_msg>Add skeleton for parsing commands<commit_after>"""lazy Usage: lazy (new|n) lazy (show|s) [<id>] lazy (delete|d) [<id>] lazy (import|i) <path> lazy (export|e) <path> [<id>] Options: -h, --help: Show this help message. """ from docopt impor...
3ed9dd0ca03216311771cda5f9cd3eb954a14d4f
telemeta/management/commands/telemeta-test-boilerplate.py
telemeta/management/commands/telemeta-test-boilerplate.py
from optparse import make_option from django.conf import settings from django.core.management.base import BaseCommand, CommandError from django.contrib.auth.models import User from django.template.defaultfilters import slugify import os from telemeta.models import * from timeside.core.tools.test_samples import generat...
Add boilerplate with simple test sounds
Add boilerplate with simple test sounds
Python
agpl-3.0
Parisson/Telemeta,Parisson/Telemeta,ANR-kamoulox/Telemeta,ANR-kamoulox/Telemeta,Parisson/Telemeta,ANR-kamoulox/Telemeta,ANR-kamoulox/Telemeta,Parisson/Telemeta
Add boilerplate with simple test sounds
from optparse import make_option from django.conf import settings from django.core.management.base import BaseCommand, CommandError from django.contrib.auth.models import User from django.template.defaultfilters import slugify import os from telemeta.models import * from timeside.core.tools.test_samples import generat...
<commit_before><commit_msg>Add boilerplate with simple test sounds<commit_after>
from optparse import make_option from django.conf import settings from django.core.management.base import BaseCommand, CommandError from django.contrib.auth.models import User from django.template.defaultfilters import slugify import os from telemeta.models import * from timeside.core.tools.test_samples import generat...
Add boilerplate with simple test soundsfrom optparse import make_option from django.conf import settings from django.core.management.base import BaseCommand, CommandError from django.contrib.auth.models import User from django.template.defaultfilters import slugify import os from telemeta.models import * from timeside...
<commit_before><commit_msg>Add boilerplate with simple test sounds<commit_after>from optparse import make_option from django.conf import settings from django.core.management.base import BaseCommand, CommandError from django.contrib.auth.models import User from django.template.defaultfilters import slugify import os fr...
3e0ababfeb0e22d33853d4bad68a29a0249e1a60
other/iterate_deadlock.py
other/iterate_deadlock.py
""" Demonstrates deadlock related to attribute iteration. """ from threading import Thread import h5py FNAME = "deadlock.hdf5" def make_file(): with h5py.File(FNAME,'w') as f: for idx in xrange(1000): f.attrs['%d'%idx] = 1 def list_attributes(): with h5py.File(FNAME, 'r') as f: ...
Add script demonstrating thread deadlock
Add script demonstrating thread deadlock
Python
bsd-3-clause
h5py/h5py,h5py/h5py,h5py/h5py
Add script demonstrating thread deadlock
""" Demonstrates deadlock related to attribute iteration. """ from threading import Thread import h5py FNAME = "deadlock.hdf5" def make_file(): with h5py.File(FNAME,'w') as f: for idx in xrange(1000): f.attrs['%d'%idx] = 1 def list_attributes(): with h5py.File(FNAME, 'r') as f: ...
<commit_before><commit_msg>Add script demonstrating thread deadlock<commit_after>
""" Demonstrates deadlock related to attribute iteration. """ from threading import Thread import h5py FNAME = "deadlock.hdf5" def make_file(): with h5py.File(FNAME,'w') as f: for idx in xrange(1000): f.attrs['%d'%idx] = 1 def list_attributes(): with h5py.File(FNAME, 'r') as f: ...
Add script demonstrating thread deadlock """ Demonstrates deadlock related to attribute iteration. """ from threading import Thread import h5py FNAME = "deadlock.hdf5" def make_file(): with h5py.File(FNAME,'w') as f: for idx in xrange(1000): f.attrs['%d'%idx] = 1 def list_attributes(): ...
<commit_before><commit_msg>Add script demonstrating thread deadlock<commit_after> """ Demonstrates deadlock related to attribute iteration. """ from threading import Thread import h5py FNAME = "deadlock.hdf5" def make_file(): with h5py.File(FNAME,'w') as f: for idx in xrange(1000): f.att...
b1517f63c3aa549170d77c6fb3546901fdbe744b
candidates/migrations/0017_remove_cv_and_program_fields.py
candidates/migrations/0017_remove_cv_and_program_fields.py
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations class Migration(migrations.Migration): dependencies = [ ('candidates', '0016_migrate_data_to_extra_fields'), ] operations = [ migrations.RemoveField( model_name='personex...
Remove the hard-coded extra 'cv' and 'program' fields
Remove the hard-coded extra 'cv' and 'program' fields
Python
agpl-3.0
datamade/yournextmp-popit,datamade/yournextmp-popit,datamade/yournextmp-popit,datamade/yournextmp-popit,datamade/yournextmp-popit
Remove the hard-coded extra 'cv' and 'program' fields
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations class Migration(migrations.Migration): dependencies = [ ('candidates', '0016_migrate_data_to_extra_fields'), ] operations = [ migrations.RemoveField( model_name='personex...
<commit_before><commit_msg>Remove the hard-coded extra 'cv' and 'program' fields<commit_after>
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations class Migration(migrations.Migration): dependencies = [ ('candidates', '0016_migrate_data_to_extra_fields'), ] operations = [ migrations.RemoveField( model_name='personex...
Remove the hard-coded extra 'cv' and 'program' fields# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations class Migration(migrations.Migration): dependencies = [ ('candidates', '0016_migrate_data_to_extra_fields'), ] operations = [ mig...
<commit_before><commit_msg>Remove the hard-coded extra 'cv' and 'program' fields<commit_after># -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations class Migration(migrations.Migration): dependencies = [ ('candidates', '0016_migrate_data_to_extra_fields...
72738366fa074b457021faab0c21c3b89070b5ad
nautilus/wizbit-extension.py
nautilus/wizbit-extension.py
from urlparse import urlparse from os.path import exists, split, isdir import nautilus from lxml import etree WIZ_CONTROLLED = "wiz-controlled" WIZ_CONFLICT = "wiz-conflict" YES = "Yes" NO = "No" class WizbitExtension(nautilus.ColumnProvider, nautilus.InfoProvider): def __init__(self): pass def get...
Add first revision of Nautilus extension.
Add first revision of Nautilus extension. Features: Adds file properties for wizbit controlled and wizbit conflicting. Adds emblems to the file for these states.
Python
lgpl-2.1
wizbit-archive/wizbit,wizbit-archive/wizbit
Add first revision of Nautilus extension. Features: Adds file properties for wizbit controlled and wizbit conflicting. Adds emblems to the file for these states.
from urlparse import urlparse from os.path import exists, split, isdir import nautilus from lxml import etree WIZ_CONTROLLED = "wiz-controlled" WIZ_CONFLICT = "wiz-conflict" YES = "Yes" NO = "No" class WizbitExtension(nautilus.ColumnProvider, nautilus.InfoProvider): def __init__(self): pass def get...
<commit_before><commit_msg>Add first revision of Nautilus extension. Features: Adds file properties for wizbit controlled and wizbit conflicting. Adds emblems to the file for these states.<commit_after>
from urlparse import urlparse from os.path import exists, split, isdir import nautilus from lxml import etree WIZ_CONTROLLED = "wiz-controlled" WIZ_CONFLICT = "wiz-conflict" YES = "Yes" NO = "No" class WizbitExtension(nautilus.ColumnProvider, nautilus.InfoProvider): def __init__(self): pass def get...
Add first revision of Nautilus extension. Features: Adds file properties for wizbit controlled and wizbit conflicting. Adds emblems to the file for these states.from urlparse import urlparse from os.path import exists, split, isdir import nautilus from lxml import etree WIZ_CONTROLLED = "wiz-controlled" WIZ_CONFLICT...
<commit_before><commit_msg>Add first revision of Nautilus extension. Features: Adds file properties for wizbit controlled and wizbit conflicting. Adds emblems to the file for these states.<commit_after>from urlparse import urlparse from os.path import exists, split, isdir import nautilus from lxml import etree WIZ_C...
24cf3c2676e4ea7342e95e6a37857c6fa687865e
src/submission/migrations/0058_auto_20210812_1254.py
src/submission/migrations/0058_auto_20210812_1254.py
# -*- coding: utf-8 -*- # Generated by Django 1.11.29 on 2021-08-12 12:54 from __future__ import unicode_literals from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('submission', '0057_merge_20210811_1506'), ] operations = [ migrations.AlterModelMa...
Remove managers for article obj.
Remove managers for article obj.
Python
agpl-3.0
BirkbeckCTP/janeway,BirkbeckCTP/janeway,BirkbeckCTP/janeway,BirkbeckCTP/janeway
Remove managers for article obj.
# -*- coding: utf-8 -*- # Generated by Django 1.11.29 on 2021-08-12 12:54 from __future__ import unicode_literals from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('submission', '0057_merge_20210811_1506'), ] operations = [ migrations.AlterModelMa...
<commit_before><commit_msg>Remove managers for article obj.<commit_after>
# -*- coding: utf-8 -*- # Generated by Django 1.11.29 on 2021-08-12 12:54 from __future__ import unicode_literals from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('submission', '0057_merge_20210811_1506'), ] operations = [ migrations.AlterModelMa...
Remove managers for article obj.# -*- coding: utf-8 -*- # Generated by Django 1.11.29 on 2021-08-12 12:54 from __future__ import unicode_literals from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('submission', '0057_merge_20210811_1506'), ] operations = [...
<commit_before><commit_msg>Remove managers for article obj.<commit_after># -*- coding: utf-8 -*- # Generated by Django 1.11.29 on 2021-08-12 12:54 from __future__ import unicode_literals from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('submission', '0057_merge_2...
68a7f9faf1933bb224113d9fa5d0ddd362b2e5ea
SizeDocGenerator.py
SizeDocGenerator.py
import os, re; # I got the actual size of the binary code wrong on the site once - this script should help prevent that. dsDoc_by_sArch = {"w32": "x86", "w64": "x64", "win": "x86+x64"}; with open("build_info.txt", "rb") as oFile: iBuildNumber = int(re.search(r"build number\: (\d+)", oFile.read(), re.M).group(1)...
Add script to generate the site documentation containing the sizes of the binary shellcodes.
Add script to generate the site documentation containing the sizes of the binary shellcodes.
Python
bsd-3-clause
computerline1z/win-exec-calc-shellcode,computerline1z/win-exec-calc-shellcode,ohio813/win-exec-calc-shellcode,ohio813/win-exec-calc-shellcode
Add script to generate the site documentation containing the sizes of the binary shellcodes.
import os, re; # I got the actual size of the binary code wrong on the site once - this script should help prevent that. dsDoc_by_sArch = {"w32": "x86", "w64": "x64", "win": "x86+x64"}; with open("build_info.txt", "rb") as oFile: iBuildNumber = int(re.search(r"build number\: (\d+)", oFile.read(), re.M).group(1)...
<commit_before><commit_msg>Add script to generate the site documentation containing the sizes of the binary shellcodes.<commit_after>
import os, re; # I got the actual size of the binary code wrong on the site once - this script should help prevent that. dsDoc_by_sArch = {"w32": "x86", "w64": "x64", "win": "x86+x64"}; with open("build_info.txt", "rb") as oFile: iBuildNumber = int(re.search(r"build number\: (\d+)", oFile.read(), re.M).group(1)...
Add script to generate the site documentation containing the sizes of the binary shellcodes.import os, re; # I got the actual size of the binary code wrong on the site once - this script should help prevent that. dsDoc_by_sArch = {"w32": "x86", "w64": "x64", "win": "x86+x64"}; with open("build_info.txt", "rb") as ...
<commit_before><commit_msg>Add script to generate the site documentation containing the sizes of the binary shellcodes.<commit_after>import os, re; # I got the actual size of the binary code wrong on the site once - this script should help prevent that. dsDoc_by_sArch = {"w32": "x86", "w64": "x64", "win": "x86+x64"...
bbc208548f0dd381f3045d24db3c21c4c8ee004e
grovepi/scan.py
grovepi/scan.py
import time import grove_i2c_temp_hum_mini # temp + humidity import hp206c # altitude + temp + pressure import grovepi # used by air sensor and dust sensor import atexit # used for the dust sensor import json # Initialize the sensors t= grove_i2c_temp_hum_mini.th02() h= hp206c.hp206c() grovepi.dust_sensor_en() air_se...
Test all sensors at once
Test all sensors at once
Python
mit
mmewen/UTSEUS-Binky,mmewen/UTSEUS-Binky,mmewen/UTSEUS-Binky,mmewen/UTSEUS-Binky,mmewen/UTSEUS-Binky
Test all sensors at once
import time import grove_i2c_temp_hum_mini # temp + humidity import hp206c # altitude + temp + pressure import grovepi # used by air sensor and dust sensor import atexit # used for the dust sensor import json # Initialize the sensors t= grove_i2c_temp_hum_mini.th02() h= hp206c.hp206c() grovepi.dust_sensor_en() air_se...
<commit_before><commit_msg>Test all sensors at once<commit_after>
import time import grove_i2c_temp_hum_mini # temp + humidity import hp206c # altitude + temp + pressure import grovepi # used by air sensor and dust sensor import atexit # used for the dust sensor import json # Initialize the sensors t= grove_i2c_temp_hum_mini.th02() h= hp206c.hp206c() grovepi.dust_sensor_en() air_se...
Test all sensors at onceimport time import grove_i2c_temp_hum_mini # temp + humidity import hp206c # altitude + temp + pressure import grovepi # used by air sensor and dust sensor import atexit # used for the dust sensor import json # Initialize the sensors t= grove_i2c_temp_hum_mini.th02() h= hp206c.hp206c() grovepi...
<commit_before><commit_msg>Test all sensors at once<commit_after>import time import grove_i2c_temp_hum_mini # temp + humidity import hp206c # altitude + temp + pressure import grovepi # used by air sensor and dust sensor import atexit # used for the dust sensor import json # Initialize the sensors t= grove_i2c_temp_h...
c834082c59abe6ae6d2e065e1a5afac2d399a612
lib/bridgedb/test/test_crypto.py
lib/bridgedb/test/test_crypto.py
# -*- coding: utf-8 -*- # # This file is part of BridgeDB, a Tor bridge distribution system. # # :authors: Isis Lovecruft 0xA3ADB67A2CDB8B35 <isis@torproject.org> # please also see AUTHORS file # :copyright: (c) 2013, Isis Lovecruft # (c) 2007-2013, The Tor Project, Inc. # (c) 2007-201...
Add unittests for the bridgedb.crypto module.
Add unittests for the bridgedb.crypto module.
Python
bsd-3-clause
mmaker/bridgedb,pagea/bridgedb,mmaker/bridgedb,wfn/bridgedb,pagea/bridgedb,wfn/bridgedb
Add unittests for the bridgedb.crypto module.
# -*- coding: utf-8 -*- # # This file is part of BridgeDB, a Tor bridge distribution system. # # :authors: Isis Lovecruft 0xA3ADB67A2CDB8B35 <isis@torproject.org> # please also see AUTHORS file # :copyright: (c) 2013, Isis Lovecruft # (c) 2007-2013, The Tor Project, Inc. # (c) 2007-201...
<commit_before><commit_msg>Add unittests for the bridgedb.crypto module.<commit_after>
# -*- coding: utf-8 -*- # # This file is part of BridgeDB, a Tor bridge distribution system. # # :authors: Isis Lovecruft 0xA3ADB67A2CDB8B35 <isis@torproject.org> # please also see AUTHORS file # :copyright: (c) 2013, Isis Lovecruft # (c) 2007-2013, The Tor Project, Inc. # (c) 2007-201...
Add unittests for the bridgedb.crypto module.# -*- coding: utf-8 -*- # # This file is part of BridgeDB, a Tor bridge distribution system. # # :authors: Isis Lovecruft 0xA3ADB67A2CDB8B35 <isis@torproject.org> # please also see AUTHORS file # :copyright: (c) 2013, Isis Lovecruft # (c) 2007-2013, The...
<commit_before><commit_msg>Add unittests for the bridgedb.crypto module.<commit_after># -*- coding: utf-8 -*- # # This file is part of BridgeDB, a Tor bridge distribution system. # # :authors: Isis Lovecruft 0xA3ADB67A2CDB8B35 <isis@torproject.org> # please also see AUTHORS file # :copyright: (c) 2013, Isis L...
955bca3beb7808636a586bed43c37e5f74fba17f
kino/functions/weather.py
kino/functions/weather.py
# -*- coding: utf-8 -*- import datetime import forecastio from geopy.geocoders import GoogleV3 from kino.template import MsgTemplate from slack.slackbot import SlackerAdapter from utils.config import Config class Weather(object): def __init__(self): self.config = Config() self.slackbot = Slacker...
Add Weather class (use forecastio, geopy) - forecase(current/daily)
Add Weather class (use forecastio, geopy) - forecase(current/daily)
Python
mit
DongjunLee/kino-bot
Add Weather class (use forecastio, geopy) - forecase(current/daily)
# -*- coding: utf-8 -*- import datetime import forecastio from geopy.geocoders import GoogleV3 from kino.template import MsgTemplate from slack.slackbot import SlackerAdapter from utils.config import Config class Weather(object): def __init__(self): self.config = Config() self.slackbot = Slacker...
<commit_before><commit_msg>Add Weather class (use forecastio, geopy) - forecase(current/daily)<commit_after>
# -*- coding: utf-8 -*- import datetime import forecastio from geopy.geocoders import GoogleV3 from kino.template import MsgTemplate from slack.slackbot import SlackerAdapter from utils.config import Config class Weather(object): def __init__(self): self.config = Config() self.slackbot = Slacker...
Add Weather class (use forecastio, geopy) - forecase(current/daily)# -*- coding: utf-8 -*- import datetime import forecastio from geopy.geocoders import GoogleV3 from kino.template import MsgTemplate from slack.slackbot import SlackerAdapter from utils.config import Config class Weather(object): def __init__(se...
<commit_before><commit_msg>Add Weather class (use forecastio, geopy) - forecase(current/daily)<commit_after># -*- coding: utf-8 -*- import datetime import forecastio from geopy.geocoders import GoogleV3 from kino.template import MsgTemplate from slack.slackbot import SlackerAdapter from utils.config import Config cl...
6789f2ea1862f4c30e8d60bd0b47640b7e5835c1
count_labels.py
count_labels.py
"""Count HEEM labels in data set. Usage: python count_labels.py <dir with train and test files> """ import codecs from glob import glob import numpy as np import argparse from collections import Counter def load_data(data_file): data = [ln.rsplit(None, 1) for ln in open(data_file)] X_data, Y_data = zip(*dat...
Add script to count labels in a data set
Add script to count labels in a data set (Moved from embodied emotions ml code.)
Python
apache-2.0
NLeSC/embodied-emotions-scripts,NLeSC/embodied-emotions-scripts
Add script to count labels in a data set (Moved from embodied emotions ml code.)
"""Count HEEM labels in data set. Usage: python count_labels.py <dir with train and test files> """ import codecs from glob import glob import numpy as np import argparse from collections import Counter def load_data(data_file): data = [ln.rsplit(None, 1) for ln in open(data_file)] X_data, Y_data = zip(*dat...
<commit_before><commit_msg>Add script to count labels in a data set (Moved from embodied emotions ml code.)<commit_after>
"""Count HEEM labels in data set. Usage: python count_labels.py <dir with train and test files> """ import codecs from glob import glob import numpy as np import argparse from collections import Counter def load_data(data_file): data = [ln.rsplit(None, 1) for ln in open(data_file)] X_data, Y_data = zip(*dat...
Add script to count labels in a data set (Moved from embodied emotions ml code.)"""Count HEEM labels in data set. Usage: python count_labels.py <dir with train and test files> """ import codecs from glob import glob import numpy as np import argparse from collections import Counter def load_data(data_file): dat...
<commit_before><commit_msg>Add script to count labels in a data set (Moved from embodied emotions ml code.)<commit_after>"""Count HEEM labels in data set. Usage: python count_labels.py <dir with train and test files> """ import codecs from glob import glob import numpy as np import argparse from collections import Co...
a9609a500a65cc0efb787f5d90e164bd6fa48c1a
leftViewofBST.py
leftViewofBST.py
class BST: def __init__(self,val): self.left = None self.right = None self.data = val def insertToBst(root,value): if root is None: root = value else: if value.data < root.data: if root.left is None: root.left = value else: ...
Print the left view of a BST
Print the left view of a BST
Python
mit
arunkumarpalaniappan/algorithm_tryouts
Print the left view of a BST
class BST: def __init__(self,val): self.left = None self.right = None self.data = val def insertToBst(root,value): if root is None: root = value else: if value.data < root.data: if root.left is None: root.left = value else: ...
<commit_before><commit_msg>Print the left view of a BST<commit_after>
class BST: def __init__(self,val): self.left = None self.right = None self.data = val def insertToBst(root,value): if root is None: root = value else: if value.data < root.data: if root.left is None: root.left = value else: ...
Print the left view of a BSTclass BST: def __init__(self,val): self.left = None self.right = None self.data = val def insertToBst(root,value): if root is None: root = value else: if value.data < root.data: if root.left is None: root.left =...
<commit_before><commit_msg>Print the left view of a BST<commit_after>class BST: def __init__(self,val): self.left = None self.right = None self.data = val def insertToBst(root,value): if root is None: root = value else: if value.data < root.data: if root....
e19097216c090c0e3f4b68c743d6427f012ab69e
txlege84/legislators/migrations/0004_auto_20141201_1604.py
txlege84/legislators/migrations/0004_auto_20141201_1604.py
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations class Migration(migrations.Migration): dependencies = [ ('legislators', '0003_auto_20141120_1731'), ] operations = [ migrations.AlterField( model_name='legislator', ...
Add migration for legislator change
Add migration for legislator change
Python
mit
texastribune/txlege84,texastribune/txlege84,texastribune/txlege84,texastribune/txlege84
Add migration for legislator change
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations class Migration(migrations.Migration): dependencies = [ ('legislators', '0003_auto_20141120_1731'), ] operations = [ migrations.AlterField( model_name='legislator', ...
<commit_before><commit_msg>Add migration for legislator change<commit_after>
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations class Migration(migrations.Migration): dependencies = [ ('legislators', '0003_auto_20141120_1731'), ] operations = [ migrations.AlterField( model_name='legislator', ...
Add migration for legislator change# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations class Migration(migrations.Migration): dependencies = [ ('legislators', '0003_auto_20141120_1731'), ] operations = [ migrations.AlterField( ...
<commit_before><commit_msg>Add migration for legislator change<commit_after># -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations class Migration(migrations.Migration): dependencies = [ ('legislators', '0003_auto_20141120_1731'), ] operations =...
897843932937faa841220cde90bdc89603d95615
hackerrank/linked-list/dedup.py
hackerrank/linked-list/dedup.py
# https://www.hackerrank.com/challenges/delete-duplicate-value-nodes-from-a-sorted-linked-list/problem def RemoveDuplicates(head): if head is None: return None curr = head while curr.next is not None: currentData = curr.data next = curr.next; nextData = next.data ...
Solve hackerrank linked list problem
[algorithm] Solve hackerrank linked list problem
Python
mit
honux77/practice,honux77/practice,honux77/practice,honux77/practice,honux77/practice,honux77/practice,honux77/practice,honux77/practice,honux77/practice,honux77/practice,honux77/practice,honux77/practice,honux77/practice
[algorithm] Solve hackerrank linked list problem
# https://www.hackerrank.com/challenges/delete-duplicate-value-nodes-from-a-sorted-linked-list/problem def RemoveDuplicates(head): if head is None: return None curr = head while curr.next is not None: currentData = curr.data next = curr.next; nextData = next.data ...
<commit_before><commit_msg>[algorithm] Solve hackerrank linked list problem<commit_after>
# https://www.hackerrank.com/challenges/delete-duplicate-value-nodes-from-a-sorted-linked-list/problem def RemoveDuplicates(head): if head is None: return None curr = head while curr.next is not None: currentData = curr.data next = curr.next; nextData = next.data ...
[algorithm] Solve hackerrank linked list problem# https://www.hackerrank.com/challenges/delete-duplicate-value-nodes-from-a-sorted-linked-list/problem def RemoveDuplicates(head): if head is None: return None curr = head while curr.next is not None: currentData = curr.data next ...
<commit_before><commit_msg>[algorithm] Solve hackerrank linked list problem<commit_after># https://www.hackerrank.com/challenges/delete-duplicate-value-nodes-from-a-sorted-linked-list/problem def RemoveDuplicates(head): if head is None: return None curr = head while curr.next is not None: ...
a8274a5d5e4ec68f3ee594ffa741e90f11cf24db
tools/update_test_bmv2_jsons.py
tools/update_test_bmv2_jsons.py
#!/usr/bin/env python2 import argparse import fnmatch import os import subprocess import sys def find_files(root): files = [] for path_prefix, _, filenames in os.walk(root, followlinks=False): for filename in fnmatch.filter(filenames, '*.p4'): path = os.path.join(path_prefix, filename) ...
Add tool to regenerate JSON files from P4 progs
Add tool to regenerate JSON files from P4 progs tools/update_test_bmv2_jsons.py can be used to regenerate all the bmv2 JSON files from their P4 counterpart
Python
apache-2.0
p4lang/PI,p4lang/PI,p4lang/PI,p4lang/PI
Add tool to regenerate JSON files from P4 progs tools/update_test_bmv2_jsons.py can be used to regenerate all the bmv2 JSON files from their P4 counterpart
#!/usr/bin/env python2 import argparse import fnmatch import os import subprocess import sys def find_files(root): files = [] for path_prefix, _, filenames in os.walk(root, followlinks=False): for filename in fnmatch.filter(filenames, '*.p4'): path = os.path.join(path_prefix, filename) ...
<commit_before><commit_msg>Add tool to regenerate JSON files from P4 progs tools/update_test_bmv2_jsons.py can be used to regenerate all the bmv2 JSON files from their P4 counterpart<commit_after>
#!/usr/bin/env python2 import argparse import fnmatch import os import subprocess import sys def find_files(root): files = [] for path_prefix, _, filenames in os.walk(root, followlinks=False): for filename in fnmatch.filter(filenames, '*.p4'): path = os.path.join(path_prefix, filename) ...
Add tool to regenerate JSON files from P4 progs tools/update_test_bmv2_jsons.py can be used to regenerate all the bmv2 JSON files from their P4 counterpart#!/usr/bin/env python2 import argparse import fnmatch import os import subprocess import sys def find_files(root): files = [] for path_prefix, _, filename...
<commit_before><commit_msg>Add tool to regenerate JSON files from P4 progs tools/update_test_bmv2_jsons.py can be used to regenerate all the bmv2 JSON files from their P4 counterpart<commit_after>#!/usr/bin/env python2 import argparse import fnmatch import os import subprocess import sys def find_files(root): fi...
b9034ca499ae8c0366ac8cd5ee71641f39c0ffba
website/project/taxonomies/__init__.py
website/project/taxonomies/__init__.py
import json import os from website import settings from modularodm import fields, Q from modularodm.exceptions import NoResultsFound from framework.mongo import ( ObjectId, StoredObject, utils as mongo_utils ) @mongo_utils.unique_on(['id', '_id']) class Subject(StoredObject): _id = fields.StringFie...
Add taxonomy model and initiation
Add taxonomy model and initiation
Python
apache-2.0
Nesiehr/osf.io,binoculars/osf.io,pattisdr/osf.io,mattclark/osf.io,caseyrollins/osf.io,leb2dg/osf.io,baylee-d/osf.io,monikagrabowska/osf.io,monikagrabowska/osf.io,acshi/osf.io,icereval/osf.io,adlius/osf.io,leb2dg/osf.io,aaxelb/osf.io,chrisseto/osf.io,binoculars/osf.io,rdhyee/osf.io,alexschiller/osf.io,chennan47/osf.io,m...
Add taxonomy model and initiation
import json import os from website import settings from modularodm import fields, Q from modularodm.exceptions import NoResultsFound from framework.mongo import ( ObjectId, StoredObject, utils as mongo_utils ) @mongo_utils.unique_on(['id', '_id']) class Subject(StoredObject): _id = fields.StringFie...
<commit_before><commit_msg>Add taxonomy model and initiation<commit_after>
import json import os from website import settings from modularodm import fields, Q from modularodm.exceptions import NoResultsFound from framework.mongo import ( ObjectId, StoredObject, utils as mongo_utils ) @mongo_utils.unique_on(['id', '_id']) class Subject(StoredObject): _id = fields.StringFie...
Add taxonomy model and initiationimport json import os from website import settings from modularodm import fields, Q from modularodm.exceptions import NoResultsFound from framework.mongo import ( ObjectId, StoredObject, utils as mongo_utils ) @mongo_utils.unique_on(['id', '_id']) class Subject(StoredOb...
<commit_before><commit_msg>Add taxonomy model and initiation<commit_after>import json import os from website import settings from modularodm import fields, Q from modularodm.exceptions import NoResultsFound from framework.mongo import ( ObjectId, StoredObject, utils as mongo_utils ) @mongo_utils.unique...
7491f500c75850c094158b4621fdef602bce3d27
benchmarks/benchmarks/benchmark_custom_generators.py
benchmarks/benchmarks/benchmark_custom_generators.py
from tohu.v6.primitive_generators import Integer, HashDigest, FakerGenerator from tohu.v6.derived_generators import Apply, Lookup, SelectOne, SelectMultiple from tohu.v6.custom_generator import CustomGenerator from .common import NUM_PARAMS mapping = { 'A': ['a', 'aa', 'aaa', 'aaaa', 'aaaaa'], 'B': ['b', 'bb...
Add benchmarks for custom generators
Add benchmarks for custom generators
Python
mit
maxalbert/tohu
Add benchmarks for custom generators
from tohu.v6.primitive_generators import Integer, HashDigest, FakerGenerator from tohu.v6.derived_generators import Apply, Lookup, SelectOne, SelectMultiple from tohu.v6.custom_generator import CustomGenerator from .common import NUM_PARAMS mapping = { 'A': ['a', 'aa', 'aaa', 'aaaa', 'aaaaa'], 'B': ['b', 'bb...
<commit_before><commit_msg>Add benchmarks for custom generators<commit_after>
from tohu.v6.primitive_generators import Integer, HashDigest, FakerGenerator from tohu.v6.derived_generators import Apply, Lookup, SelectOne, SelectMultiple from tohu.v6.custom_generator import CustomGenerator from .common import NUM_PARAMS mapping = { 'A': ['a', 'aa', 'aaa', 'aaaa', 'aaaaa'], 'B': ['b', 'bb...
Add benchmarks for custom generatorsfrom tohu.v6.primitive_generators import Integer, HashDigest, FakerGenerator from tohu.v6.derived_generators import Apply, Lookup, SelectOne, SelectMultiple from tohu.v6.custom_generator import CustomGenerator from .common import NUM_PARAMS mapping = { 'A': ['a', 'aa', 'aaa', ...
<commit_before><commit_msg>Add benchmarks for custom generators<commit_after>from tohu.v6.primitive_generators import Integer, HashDigest, FakerGenerator from tohu.v6.derived_generators import Apply, Lookup, SelectOne, SelectMultiple from tohu.v6.custom_generator import CustomGenerator from .common import NUM_PARAMS ...
48eb4604673513b771b6def05a1652ae1b66d4d0
scripts/add_ssm_config.py
scripts/add_ssm_config.py
#!/usr/bin/env python # -*- encoding: utf-8 """ Store a config variable in SSM under the key structure /{project_id}/config/{label}/{config_key} This script can store a regular config key (unencrypted) or an encrypted key. """ import sys import boto3 import click ssm_client = boto3.client("ssm") @click.com...
Add a script for storing a config variable
Add a script for storing a config variable
Python
mit
wellcometrust/platform-api,wellcometrust/platform-api,wellcometrust/platform-api,wellcometrust/platform-api
Add a script for storing a config variable
#!/usr/bin/env python # -*- encoding: utf-8 """ Store a config variable in SSM under the key structure /{project_id}/config/{label}/{config_key} This script can store a regular config key (unencrypted) or an encrypted key. """ import sys import boto3 import click ssm_client = boto3.client("ssm") @click.com...
<commit_before><commit_msg>Add a script for storing a config variable<commit_after>
#!/usr/bin/env python # -*- encoding: utf-8 """ Store a config variable in SSM under the key structure /{project_id}/config/{label}/{config_key} This script can store a regular config key (unencrypted) or an encrypted key. """ import sys import boto3 import click ssm_client = boto3.client("ssm") @click.com...
Add a script for storing a config variable#!/usr/bin/env python # -*- encoding: utf-8 """ Store a config variable in SSM under the key structure /{project_id}/config/{label}/{config_key} This script can store a regular config key (unencrypted) or an encrypted key. """ import sys import boto3 import click ssm...
<commit_before><commit_msg>Add a script for storing a config variable<commit_after>#!/usr/bin/env python # -*- encoding: utf-8 """ Store a config variable in SSM under the key structure /{project_id}/config/{label}/{config_key} This script can store a regular config key (unencrypted) or an encrypted key. """ im...
50dded21e316b6b8e6cb7800b17ed7bd92624946
xml_to_json.py
xml_to_json.py
#!/usr/bin/env python import xml.etree.cElementTree as ET from sys import argv input_file = argv[1] NAMESPACE = "{http://www.mediawiki.org/xml/export-0.10/}" with open(input_file) as open_file: in_page = False for _, elem in ET.iterparse(open_file): # Pull out each revision if elem.tag == NA...
Add toy example of reading a large XML file
Add toy example of reading a large XML file
Python
apache-2.0
tiffanyj41/hermes,tiffanyj41/hermes,tiffanyj41/hermes,tiffanyj41/hermes
Add toy example of reading a large XML file
#!/usr/bin/env python import xml.etree.cElementTree as ET from sys import argv input_file = argv[1] NAMESPACE = "{http://www.mediawiki.org/xml/export-0.10/}" with open(input_file) as open_file: in_page = False for _, elem in ET.iterparse(open_file): # Pull out each revision if elem.tag == NA...
<commit_before><commit_msg>Add toy example of reading a large XML file<commit_after>
#!/usr/bin/env python import xml.etree.cElementTree as ET from sys import argv input_file = argv[1] NAMESPACE = "{http://www.mediawiki.org/xml/export-0.10/}" with open(input_file) as open_file: in_page = False for _, elem in ET.iterparse(open_file): # Pull out each revision if elem.tag == NA...
Add toy example of reading a large XML file#!/usr/bin/env python import xml.etree.cElementTree as ET from sys import argv input_file = argv[1] NAMESPACE = "{http://www.mediawiki.org/xml/export-0.10/}" with open(input_file) as open_file: in_page = False for _, elem in ET.iterparse(open_file): # Pull ...
<commit_before><commit_msg>Add toy example of reading a large XML file<commit_after>#!/usr/bin/env python import xml.etree.cElementTree as ET from sys import argv input_file = argv[1] NAMESPACE = "{http://www.mediawiki.org/xml/export-0.10/}" with open(input_file) as open_file: in_page = False for _, elem in...
63f9f87a3f04cb03c1e286cc5b6d49306f90e352
python/004_largest_palindrome_product/palindrome_product.py
python/004_largest_palindrome_product/palindrome_product.py
from itertools import combinations_with_replacement from operator import mul three_digit_numbers = tuple(range(100, 1000)) combinations = combinations_with_replacement(three_digit_numbers, 2) products = [mul(*x) for x in combinations] max_palindrome = max([x for x in products if str(x)[::-1] == str(x)])
Add solution for problem 4
Add solution for problem 4
Python
bsd-3-clause
gidj/euler,gidj/euler
Add solution for problem 4
from itertools import combinations_with_replacement from operator import mul three_digit_numbers = tuple(range(100, 1000)) combinations = combinations_with_replacement(three_digit_numbers, 2) products = [mul(*x) for x in combinations] max_palindrome = max([x for x in products if str(x)[::-1] == str(x)])
<commit_before><commit_msg>Add solution for problem 4<commit_after>
from itertools import combinations_with_replacement from operator import mul three_digit_numbers = tuple(range(100, 1000)) combinations = combinations_with_replacement(three_digit_numbers, 2) products = [mul(*x) for x in combinations] max_palindrome = max([x for x in products if str(x)[::-1] == str(x)])
Add solution for problem 4from itertools import combinations_with_replacement from operator import mul three_digit_numbers = tuple(range(100, 1000)) combinations = combinations_with_replacement(three_digit_numbers, 2) products = [mul(*x) for x in combinations] max_palindrome = max([x for x in products if str(x)[::-...
<commit_before><commit_msg>Add solution for problem 4<commit_after>from itertools import combinations_with_replacement from operator import mul three_digit_numbers = tuple(range(100, 1000)) combinations = combinations_with_replacement(three_digit_numbers, 2) products = [mul(*x) for x in combinations] max_palindrome...
d410fb26d3fb8bbd843234e90891bee5a5fff7e7
halaqat/settings/local_settings.py
halaqat/settings/local_settings.py
from .base_settings import * DEBUG = True LANGUAGE_CODE = 'en' TIME_FORMAT = [ '%I:%M %p', '%H:%M %p', ] TIME_INPUT_FORMATS = [ '%I:%M %p', '%H:%M %p' ]
Add local dev settings module
Add local dev settings module
Python
mit
EmadMokhtar/halaqat,EmadMokhtar/halaqat,EmadMokhtar/halaqat
Add local dev settings module
from .base_settings import * DEBUG = True LANGUAGE_CODE = 'en' TIME_FORMAT = [ '%I:%M %p', '%H:%M %p', ] TIME_INPUT_FORMATS = [ '%I:%M %p', '%H:%M %p' ]
<commit_before><commit_msg>Add local dev settings module<commit_after>
from .base_settings import * DEBUG = True LANGUAGE_CODE = 'en' TIME_FORMAT = [ '%I:%M %p', '%H:%M %p', ] TIME_INPUT_FORMATS = [ '%I:%M %p', '%H:%M %p' ]
Add local dev settings modulefrom .base_settings import * DEBUG = True LANGUAGE_CODE = 'en' TIME_FORMAT = [ '%I:%M %p', '%H:%M %p', ] TIME_INPUT_FORMATS = [ '%I:%M %p', '%H:%M %p' ]
<commit_before><commit_msg>Add local dev settings module<commit_after>from .base_settings import * DEBUG = True LANGUAGE_CODE = 'en' TIME_FORMAT = [ '%I:%M %p', '%H:%M %p', ] TIME_INPUT_FORMATS = [ '%I:%M %p', '%H:%M %p' ]
dc7cf288c5c5c9733a59184770fbaa26db036833
tests/unit_project/test_core/test_custom_urls.py
tests/unit_project/test_core/test_custom_urls.py
# -*- coding: utf-8 -*- from djangosanetesting import UnitTestCase from django.http import Http404 from ella.core.custom_urls import DetailDispatcher # dummy functions to register as views def view(request, bits, context): return request, bits, context def custom_view(request, context): return request, cont...
Add basic tests for custom_urls system
Add basic tests for custom_urls system
Python
bsd-3-clause
whalerock/ella,petrlosa/ella,WhiskeyMedia/ella,whalerock/ella,whalerock/ella,MichalMaM/ella,petrlosa/ella,MichalMaM/ella,ella/ella,WhiskeyMedia/ella
Add basic tests for custom_urls system
# -*- coding: utf-8 -*- from djangosanetesting import UnitTestCase from django.http import Http404 from ella.core.custom_urls import DetailDispatcher # dummy functions to register as views def view(request, bits, context): return request, bits, context def custom_view(request, context): return request, cont...
<commit_before><commit_msg>Add basic tests for custom_urls system<commit_after>
# -*- coding: utf-8 -*- from djangosanetesting import UnitTestCase from django.http import Http404 from ella.core.custom_urls import DetailDispatcher # dummy functions to register as views def view(request, bits, context): return request, bits, context def custom_view(request, context): return request, cont...
Add basic tests for custom_urls system# -*- coding: utf-8 -*- from djangosanetesting import UnitTestCase from django.http import Http404 from ella.core.custom_urls import DetailDispatcher # dummy functions to register as views def view(request, bits, context): return request, bits, context def custom_view(reque...
<commit_before><commit_msg>Add basic tests for custom_urls system<commit_after># -*- coding: utf-8 -*- from djangosanetesting import UnitTestCase from django.http import Http404 from ella.core.custom_urls import DetailDispatcher # dummy functions to register as views def view(request, bits, context): return requ...
c153bc9422308599d1354abf782273ca7bd78952
nova/tests/virt_unittest.py
nova/tests/virt_unittest.py
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # # Copyright 2010 OpenStack LLC # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0...
Add a few unit tests for libvirt_conn.
Add a few unit tests for libvirt_conn.
Python
apache-2.0
n0ano/ganttclient
Add a few unit tests for libvirt_conn.
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # # Copyright 2010 OpenStack LLC # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0...
<commit_before><commit_msg>Add a few unit tests for libvirt_conn.<commit_after>
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # # Copyright 2010 OpenStack LLC # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0...
Add a few unit tests for libvirt_conn.# vim: tabstop=4 shiftwidth=4 softtabstop=4 # # Copyright 2010 OpenStack LLC # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http...
<commit_before><commit_msg>Add a few unit tests for libvirt_conn.<commit_after># vim: tabstop=4 shiftwidth=4 softtabstop=4 # # Copyright 2010 OpenStack LLC # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # ...
ea11ae8919139eae8eaa6b9b1dfe256726d3c584
test/test_SBSolarcell.py
test/test_SBSolarcell.py
# -*- coding: utf-8 -*- import numpy as np import ibei from astropy import units import unittest temp_sun = 5762. temp_earth = 288. bandgap = 1.15 input_params = {"temp_sun": temp_sun, "temp_planet": temp_earth, "bandgap": bandgap, "voltage": 0.5,} class CalculatorsRe...
Copy SBSolarcell tests into individual file
Copy SBSolarcell tests into individual file
Python
mit
jrsmith3/ibei,jrsmith3/tec,jrsmith3/tec
Copy SBSolarcell tests into individual file
# -*- coding: utf-8 -*- import numpy as np import ibei from astropy import units import unittest temp_sun = 5762. temp_earth = 288. bandgap = 1.15 input_params = {"temp_sun": temp_sun, "temp_planet": temp_earth, "bandgap": bandgap, "voltage": 0.5,} class CalculatorsRe...
<commit_before><commit_msg>Copy SBSolarcell tests into individual file<commit_after>
# -*- coding: utf-8 -*- import numpy as np import ibei from astropy import units import unittest temp_sun = 5762. temp_earth = 288. bandgap = 1.15 input_params = {"temp_sun": temp_sun, "temp_planet": temp_earth, "bandgap": bandgap, "voltage": 0.5,} class CalculatorsRe...
Copy SBSolarcell tests into individual file# -*- coding: utf-8 -*- import numpy as np import ibei from astropy import units import unittest temp_sun = 5762. temp_earth = 288. bandgap = 1.15 input_params = {"temp_sun": temp_sun, "temp_planet": temp_earth, "bandgap": bandgap, ...
<commit_before><commit_msg>Copy SBSolarcell tests into individual file<commit_after># -*- coding: utf-8 -*- import numpy as np import ibei from astropy import units import unittest temp_sun = 5762. temp_earth = 288. bandgap = 1.15 input_params = {"temp_sun": temp_sun, "temp_planet": temp_earth, ...
8fd466ecd16db736177104902eb84f661b2b62cc
opps/sitemaps/googlenews.py
opps/sitemaps/googlenews.py
#!/usr/bin/env python # -*- coding: utf-8 -*- from django.contrib.sitemaps import GenericSitemap from django.contrib.sites.models import Site class GoogleNewsSitemap(GenericSitemap): # That's Google News limit. Do not increase it! limit = 1000 sitemap_template = 'sitemap_googlenews.xml' def get_urls(...
Create sitemap for google news
Create sitemap for google news
Python
mit
jeanmask/opps,opps/opps,YACOWS/opps,williamroot/opps,opps/opps,YACOWS/opps,williamroot/opps,williamroot/opps,opps/opps,YACOWS/opps,jeanmask/opps,YACOWS/opps,opps/opps,jeanmask/opps,williamroot/opps,jeanmask/opps
Create sitemap for google news
#!/usr/bin/env python # -*- coding: utf-8 -*- from django.contrib.sitemaps import GenericSitemap from django.contrib.sites.models import Site class GoogleNewsSitemap(GenericSitemap): # That's Google News limit. Do not increase it! limit = 1000 sitemap_template = 'sitemap_googlenews.xml' def get_urls(...
<commit_before><commit_msg>Create sitemap for google news<commit_after>
#!/usr/bin/env python # -*- coding: utf-8 -*- from django.contrib.sitemaps import GenericSitemap from django.contrib.sites.models import Site class GoogleNewsSitemap(GenericSitemap): # That's Google News limit. Do not increase it! limit = 1000 sitemap_template = 'sitemap_googlenews.xml' def get_urls(...
Create sitemap for google news#!/usr/bin/env python # -*- coding: utf-8 -*- from django.contrib.sitemaps import GenericSitemap from django.contrib.sites.models import Site class GoogleNewsSitemap(GenericSitemap): # That's Google News limit. Do not increase it! limit = 1000 sitemap_template = 'sitemap_goog...
<commit_before><commit_msg>Create sitemap for google news<commit_after>#!/usr/bin/env python # -*- coding: utf-8 -*- from django.contrib.sitemaps import GenericSitemap from django.contrib.sites.models import Site class GoogleNewsSitemap(GenericSitemap): # That's Google News limit. Do not increase it! limit = ...
2a106a12db2a59ccb0517a13db67b35f475b3ef5
apps/survey/urls.py
apps/survey/urls.py
from django.conf.urls.defaults import * from . import views urlpatterns = patterns('', url(r'^profile/$', views.profile_index, name='survey_profile'), url(r'^profile/electric/$', views.profile_electric, name='survey_profile_electric'), url(r'^main/$', views.main_index), url(r'^group_management/$', vie...
from django.conf.urls.defaults import * from . import views urlpatterns = patterns('', url(r'^profile/$', views.profile_index, name='survey_profile'), url(r'^profile/electric/$', views.profile_electric, name='survey_profile_electric'), url(r'^main/$', views.main_index), url(r'^group_management/$', vie...
Add args to survey_data url
Add args to survey_data url
Python
agpl-3.0
chispita/epiwork,chispita/epiwork,chispita/epiwork,chispita/epiwork,chispita/epiwork,chispita/epiwork,chispita/epiwork
from django.conf.urls.defaults import * from . import views urlpatterns = patterns('', url(r'^profile/$', views.profile_index, name='survey_profile'), url(r'^profile/electric/$', views.profile_electric, name='survey_profile_electric'), url(r'^main/$', views.main_index), url(r'^group_management/$', vie...
from django.conf.urls.defaults import * from . import views urlpatterns = patterns('', url(r'^profile/$', views.profile_index, name='survey_profile'), url(r'^profile/electric/$', views.profile_electric, name='survey_profile_electric'), url(r'^main/$', views.main_index), url(r'^group_management/$', vie...
<commit_before>from django.conf.urls.defaults import * from . import views urlpatterns = patterns('', url(r'^profile/$', views.profile_index, name='survey_profile'), url(r'^profile/electric/$', views.profile_electric, name='survey_profile_electric'), url(r'^main/$', views.main_index), url(r'^group_man...
from django.conf.urls.defaults import * from . import views urlpatterns = patterns('', url(r'^profile/$', views.profile_index, name='survey_profile'), url(r'^profile/electric/$', views.profile_electric, name='survey_profile_electric'), url(r'^main/$', views.main_index), url(r'^group_management/$', vie...
from django.conf.urls.defaults import * from . import views urlpatterns = patterns('', url(r'^profile/$', views.profile_index, name='survey_profile'), url(r'^profile/electric/$', views.profile_electric, name='survey_profile_electric'), url(r'^main/$', views.main_index), url(r'^group_management/$', vie...
<commit_before>from django.conf.urls.defaults import * from . import views urlpatterns = patterns('', url(r'^profile/$', views.profile_index, name='survey_profile'), url(r'^profile/electric/$', views.profile_electric, name='survey_profile_electric'), url(r'^main/$', views.main_index), url(r'^group_man...
1b00a597d8145b2df05054fef8d072d452209463
src/data/surface.py
src/data/surface.py
from glob import glob # Third-party modules import pandas as pd # Hand-made modules from base import LocationHandlerBase SFC_REGEX_DIRNAME = "sfc[1-5]" KWARGS_READ_CSV_SFC_MASTER = { "index_col": 0, } KWARGS_READ_CSV_SFC_LOG = { "index_col": 0, "na_values": ['', ' '] } class SurfaceHandler(LocationHandle...
Make SurfaceHandler (for sfc data)
Make SurfaceHandler (for sfc data)
Python
mit
gciteam6/xgboost,gciteam6/xgboost
Make SurfaceHandler (for sfc data)
from glob import glob # Third-party modules import pandas as pd # Hand-made modules from base import LocationHandlerBase SFC_REGEX_DIRNAME = "sfc[1-5]" KWARGS_READ_CSV_SFC_MASTER = { "index_col": 0, } KWARGS_READ_CSV_SFC_LOG = { "index_col": 0, "na_values": ['', ' '] } class SurfaceHandler(LocationHandle...
<commit_before><commit_msg>Make SurfaceHandler (for sfc data)<commit_after>
from glob import glob # Third-party modules import pandas as pd # Hand-made modules from base import LocationHandlerBase SFC_REGEX_DIRNAME = "sfc[1-5]" KWARGS_READ_CSV_SFC_MASTER = { "index_col": 0, } KWARGS_READ_CSV_SFC_LOG = { "index_col": 0, "na_values": ['', ' '] } class SurfaceHandler(LocationHandle...
Make SurfaceHandler (for sfc data)from glob import glob # Third-party modules import pandas as pd # Hand-made modules from base import LocationHandlerBase SFC_REGEX_DIRNAME = "sfc[1-5]" KWARGS_READ_CSV_SFC_MASTER = { "index_col": 0, } KWARGS_READ_CSV_SFC_LOG = { "index_col": 0, "na_values": ['', ' '] } c...
<commit_before><commit_msg>Make SurfaceHandler (for sfc data)<commit_after>from glob import glob # Third-party modules import pandas as pd # Hand-made modules from base import LocationHandlerBase SFC_REGEX_DIRNAME = "sfc[1-5]" KWARGS_READ_CSV_SFC_MASTER = { "index_col": 0, } KWARGS_READ_CSV_SFC_LOG = { "index_...
3091555ca7fc421f886a1df1ac28f677feb70a53
app/migrations/0006_auto_20150825_1513.py
app/migrations/0006_auto_20150825_1513.py
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations class Migration(migrations.Migration): dependencies = [ ('app', '0005_auto_20150819_1054'), ] operations = [ migrations.AlterField( model_name='socialnetworkapp', ...
Add default value for the fields object and field of the social network app model
Add default value for the fields object and field of the social network app model
Python
mit
rebearteta/social-ideation,rebearteta/social-ideation,rebearteta/social-ideation,joausaga/social-ideation,rebearteta/social-ideation,joausaga/social-ideation,joausaga/social-ideation,joausaga/social-ideation
Add default value for the fields object and field of the social network app model
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations class Migration(migrations.Migration): dependencies = [ ('app', '0005_auto_20150819_1054'), ] operations = [ migrations.AlterField( model_name='socialnetworkapp', ...
<commit_before><commit_msg>Add default value for the fields object and field of the social network app model<commit_after>
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations class Migration(migrations.Migration): dependencies = [ ('app', '0005_auto_20150819_1054'), ] operations = [ migrations.AlterField( model_name='socialnetworkapp', ...
Add default value for the fields object and field of the social network app model# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations class Migration(migrations.Migration): dependencies = [ ('app', '0005_auto_20150819_1054'), ] operations = [ ...
<commit_before><commit_msg>Add default value for the fields object and field of the social network app model<commit_after># -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations class Migration(migrations.Migration): dependencies = [ ('app', '0005_auto_20...
d9be3f189fc34117bdec6e0c7856f7a7dc5f902a
cdap-docs/tools/versionscallback-gen.py
cdap-docs/tools/versionscallback-gen.py
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Copyright © 2014 Cask Data, Inc. # # Used to generate JSONP from a CDAP documentation directory on a webserver. # # sudo echo "versionscallback({\"development\": \"2.6.0-SNAPSHOT\", \"current\": \"2.5.2\", \"versions\": [\"2.5.1\", \"2.5.0\"]});" > json-versions.js; l...
Add tool for generating the JSONP required by the documentation versions.
Add tool for generating the JSONP required by the documentation versions.
Python
apache-2.0
chtyim/cdap,mpouttuclarke/cdap,anthcp/cdap,chtyim/cdap,hsaputra/cdap,chtyim/cdap,hsaputra/cdap,caskdata/cdap,chtyim/cdap,caskdata/cdap,mpouttuclarke/cdap,mpouttuclarke/cdap,hsaputra/cdap,caskdata/cdap,hsaputra/cdap,mpouttuclarke/cdap,caskdata/cdap,anthcp/cdap,anthcp/cdap,chtyim/cdap,caskdata/cdap,anthcp/cdap,caskdata/c...
Add tool for generating the JSONP required by the documentation versions.
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Copyright © 2014 Cask Data, Inc. # # Used to generate JSONP from a CDAP documentation directory on a webserver. # # sudo echo "versionscallback({\"development\": \"2.6.0-SNAPSHOT\", \"current\": \"2.5.2\", \"versions\": [\"2.5.1\", \"2.5.0\"]});" > json-versions.js; l...
<commit_before><commit_msg>Add tool for generating the JSONP required by the documentation versions.<commit_after>
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Copyright © 2014 Cask Data, Inc. # # Used to generate JSONP from a CDAP documentation directory on a webserver. # # sudo echo "versionscallback({\"development\": \"2.6.0-SNAPSHOT\", \"current\": \"2.5.2\", \"versions\": [\"2.5.1\", \"2.5.0\"]});" > json-versions.js; l...
Add tool for generating the JSONP required by the documentation versions.#!/usr/bin/env python # -*- coding: utf-8 -*- # # Copyright © 2014 Cask Data, Inc. # # Used to generate JSONP from a CDAP documentation directory on a webserver. # # sudo echo "versionscallback({\"development\": \"2.6.0-SNAPSHOT\", \"current\": ...
<commit_before><commit_msg>Add tool for generating the JSONP required by the documentation versions.<commit_after>#!/usr/bin/env python # -*- coding: utf-8 -*- # # Copyright © 2014 Cask Data, Inc. # # Used to generate JSONP from a CDAP documentation directory on a webserver. # # sudo echo "versionscallback({\"develop...
bf3f14692b6e2a348f5a0171ad57e494801ed4f4
scripts/writelibsvmdataformat.py
scripts/writelibsvmdataformat.py
""" A script to write out lib svm expected data format from my collecting data """ import os import sys import csv import getopt cmd_usage = """ usage: writelibsvmdataformat.py --inputs="/inputs/csv_files" --output="/output/lib_svm_data" """ feature_space = 10 def write_libsvm_data(input_files, output_file): ...
Add python script to write lib svm expected data format from my collected data
Add python script to write lib svm expected data format from my collected data
Python
bsd-3-clause
Wayne82/libsvm-practice,Wayne82/libsvm-practice,Wayne82/libsvm-practice
Add python script to write lib svm expected data format from my collected data
""" A script to write out lib svm expected data format from my collecting data """ import os import sys import csv import getopt cmd_usage = """ usage: writelibsvmdataformat.py --inputs="/inputs/csv_files" --output="/output/lib_svm_data" """ feature_space = 10 def write_libsvm_data(input_files, output_file): ...
<commit_before><commit_msg>Add python script to write lib svm expected data format from my collected data<commit_after>
""" A script to write out lib svm expected data format from my collecting data """ import os import sys import csv import getopt cmd_usage = """ usage: writelibsvmdataformat.py --inputs="/inputs/csv_files" --output="/output/lib_svm_data" """ feature_space = 10 def write_libsvm_data(input_files, output_file): ...
Add python script to write lib svm expected data format from my collected data""" A script to write out lib svm expected data format from my collecting data """ import os import sys import csv import getopt cmd_usage = """ usage: writelibsvmdataformat.py --inputs="/inputs/csv_files" --output="/output/lib_svm_data"...
<commit_before><commit_msg>Add python script to write lib svm expected data format from my collected data<commit_after>""" A script to write out lib svm expected data format from my collecting data """ import os import sys import csv import getopt cmd_usage = """ usage: writelibsvmdataformat.py --inputs="/inputs/c...
1c2c7d5134780e58bd69f24ee06050b2f405d946
src/program/lwaftr/tests/subcommands/run_nohw_test.py
src/program/lwaftr/tests/subcommands/run_nohw_test.py
""" Test the "snabb lwaftr run_nohw" subcommand. """ import unittest from random import randint from subprocess import call, check_call from test_env import DATA_DIR, SNABB_CMD, BaseTestCase class TestRun(BaseTestCase): program = [ str(SNABB_CMD), 'lwaftr', 'run_nohw', ] cmd_args = { '--...
Add unit test for run_nohw
Add unit test for run_nohw
Python
apache-2.0
Igalia/snabb,eugeneia/snabbswitch,eugeneia/snabbswitch,eugeneia/snabbswitch,alexandergall/snabbswitch,Igalia/snabb,alexandergall/snabbswitch,snabbco/snabb,dpino/snabb,eugeneia/snabb,heryii/snabb,alexandergall/snabbswitch,snabbco/snabb,snabbco/snabb,alexandergall/snabbswitch,Igalia/snabbswitch,Igalia/snabb,snabbco/snabb...
Add unit test for run_nohw
""" Test the "snabb lwaftr run_nohw" subcommand. """ import unittest from random import randint from subprocess import call, check_call from test_env import DATA_DIR, SNABB_CMD, BaseTestCase class TestRun(BaseTestCase): program = [ str(SNABB_CMD), 'lwaftr', 'run_nohw', ] cmd_args = { '--...
<commit_before><commit_msg>Add unit test for run_nohw<commit_after>
""" Test the "snabb lwaftr run_nohw" subcommand. """ import unittest from random import randint from subprocess import call, check_call from test_env import DATA_DIR, SNABB_CMD, BaseTestCase class TestRun(BaseTestCase): program = [ str(SNABB_CMD), 'lwaftr', 'run_nohw', ] cmd_args = { '--...
Add unit test for run_nohw""" Test the "snabb lwaftr run_nohw" subcommand. """ import unittest from random import randint from subprocess import call, check_call from test_env import DATA_DIR, SNABB_CMD, BaseTestCase class TestRun(BaseTestCase): program = [ str(SNABB_CMD), 'lwaftr', 'run_nohw', ] ...
<commit_before><commit_msg>Add unit test for run_nohw<commit_after>""" Test the "snabb lwaftr run_nohw" subcommand. """ import unittest from random import randint from subprocess import call, check_call from test_env import DATA_DIR, SNABB_CMD, BaseTestCase class TestRun(BaseTestCase): program = [ str(S...
87565c1e6032bff2cc3e20f5c4f46b7a17977f7c
migrations/versions/0098_tfl_dar.py
migrations/versions/0098_tfl_dar.py
"""empty message Revision ID: 0098_tfl_dar Revises: 0097_notnull_inbound_provider Create Date: 2017-06-05 16:15:17.744908 """ # revision identifiers, used by Alembic. revision = '0098_tfl_dar' down_revision = '0097_notnull_inbound_provider' from alembic import op import sqlalchemy as sa from sqlalchemy.dialects imp...
Add organisation for TFL Dial a Ride
Add organisation for TFL Dial a Ride References image added in: - [ ] https://github.com/alphagov/notifications-admin/pull/1321
Python
mit
alphagov/notifications-api,alphagov/notifications-api
Add organisation for TFL Dial a Ride References image added in: - [ ] https://github.com/alphagov/notifications-admin/pull/1321
"""empty message Revision ID: 0098_tfl_dar Revises: 0097_notnull_inbound_provider Create Date: 2017-06-05 16:15:17.744908 """ # revision identifiers, used by Alembic. revision = '0098_tfl_dar' down_revision = '0097_notnull_inbound_provider' from alembic import op import sqlalchemy as sa from sqlalchemy.dialects imp...
<commit_before><commit_msg>Add organisation for TFL Dial a Ride References image added in: - [ ] https://github.com/alphagov/notifications-admin/pull/1321<commit_after>
"""empty message Revision ID: 0098_tfl_dar Revises: 0097_notnull_inbound_provider Create Date: 2017-06-05 16:15:17.744908 """ # revision identifiers, used by Alembic. revision = '0098_tfl_dar' down_revision = '0097_notnull_inbound_provider' from alembic import op import sqlalchemy as sa from sqlalchemy.dialects imp...
Add organisation for TFL Dial a Ride References image added in: - [ ] https://github.com/alphagov/notifications-admin/pull/1321"""empty message Revision ID: 0098_tfl_dar Revises: 0097_notnull_inbound_provider Create Date: 2017-06-05 16:15:17.744908 """ # revision identifiers, used by Alembic. revision = '0098_tfl_d...
<commit_before><commit_msg>Add organisation for TFL Dial a Ride References image added in: - [ ] https://github.com/alphagov/notifications-admin/pull/1321<commit_after>"""empty message Revision ID: 0098_tfl_dar Revises: 0097_notnull_inbound_provider Create Date: 2017-06-05 16:15:17.744908 """ # revision identifiers...
22585d29220709dc3a3de16b03c626ca27c715ca
migrations/versions/3025c44bdb2_.py
migrations/versions/3025c44bdb2_.py
"""empty message Revision ID: 3025c44bdb2 Revises: None Create Date: 2014-12-16 12:13:55.759378 """ # revision identifiers, used by Alembic. revision = '3025c44bdb2' down_revision = None from alembic import op import sqlalchemy as sa def upgrade(): pass def downgrade(): pass
Add migration version? Not sure if this is right
Add migration version? Not sure if this is right
Python
bsd-2-clause
brianwolfe/robotics-tutorial,brianwolfe/robotics-tutorial,brianwolfe/robotics-tutorial
Add migration version? Not sure if this is right
"""empty message Revision ID: 3025c44bdb2 Revises: None Create Date: 2014-12-16 12:13:55.759378 """ # revision identifiers, used by Alembic. revision = '3025c44bdb2' down_revision = None from alembic import op import sqlalchemy as sa def upgrade(): pass def downgrade(): pass
<commit_before><commit_msg>Add migration version? Not sure if this is right<commit_after>
"""empty message Revision ID: 3025c44bdb2 Revises: None Create Date: 2014-12-16 12:13:55.759378 """ # revision identifiers, used by Alembic. revision = '3025c44bdb2' down_revision = None from alembic import op import sqlalchemy as sa def upgrade(): pass def downgrade(): pass
Add migration version? Not sure if this is right"""empty message Revision ID: 3025c44bdb2 Revises: None Create Date: 2014-12-16 12:13:55.759378 """ # revision identifiers, used by Alembic. revision = '3025c44bdb2' down_revision = None from alembic import op import sqlalchemy as sa def upgrade(): pass def do...
<commit_before><commit_msg>Add migration version? Not sure if this is right<commit_after>"""empty message Revision ID: 3025c44bdb2 Revises: None Create Date: 2014-12-16 12:13:55.759378 """ # revision identifiers, used by Alembic. revision = '3025c44bdb2' down_revision = None from alembic import op import sqlalchemy...
64c70f3f73d14d5bdd18cf5c4ad8b15ec745f517
config/check_ascii.py
config/check_ascii.py
import json files = ["go-ussd_public.ibo_NG.json"] def is_ascii(s): return all(ord(c) < 128 for c in s) current_message_id = 0 for file_name in files: json_file = open(file_name, "rU").read() json_data = json.loads(json_file) print "Proccessing %s\n-------" % file_name for key, value in json_dat...
Add helpful script for ascii checking - fyi @bruskiza
Add helpful script for ascii checking - fyi @bruskiza
Python
bsd-3-clause
praekelt/mama-ng-jsbox,praekelt/mama-ng-jsbox
Add helpful script for ascii checking - fyi @bruskiza
import json files = ["go-ussd_public.ibo_NG.json"] def is_ascii(s): return all(ord(c) < 128 for c in s) current_message_id = 0 for file_name in files: json_file = open(file_name, "rU").read() json_data = json.loads(json_file) print "Proccessing %s\n-------" % file_name for key, value in json_dat...
<commit_before><commit_msg>Add helpful script for ascii checking - fyi @bruskiza<commit_after>
import json files = ["go-ussd_public.ibo_NG.json"] def is_ascii(s): return all(ord(c) < 128 for c in s) current_message_id = 0 for file_name in files: json_file = open(file_name, "rU").read() json_data = json.loads(json_file) print "Proccessing %s\n-------" % file_name for key, value in json_dat...
Add helpful script for ascii checking - fyi @bruskizaimport json files = ["go-ussd_public.ibo_NG.json"] def is_ascii(s): return all(ord(c) < 128 for c in s) current_message_id = 0 for file_name in files: json_file = open(file_name, "rU").read() json_data = json.loads(json_file) print "Proccessing %s\...
<commit_before><commit_msg>Add helpful script for ascii checking - fyi @bruskiza<commit_after>import json files = ["go-ussd_public.ibo_NG.json"] def is_ascii(s): return all(ord(c) < 128 for c in s) current_message_id = 0 for file_name in files: json_file = open(file_name, "rU").read() json_data = json.lo...
289ce4a720c5863f6a80e1b86083fd2919b52f14
tests/startsymbol_tests/NotNonterminalTest.py
tests/startsymbol_tests/NotNonterminalTest.py
#!/usr/bin/env python """ :Author Patrik Valkovic :Created 10.08.2017 23:12 :Licence GNUv3 Part of grammpy """ from unittest import TestCase, main from grammpy import * class NotNonterminalTest(TestCase): pass if __name__ == '__main__': main()
Add file for tests of start symbol as not nonterminal
Add file for tests of start symbol as not nonterminal
Python
mit
PatrikValkovic/grammpy
Add file for tests of start symbol as not nonterminal
#!/usr/bin/env python """ :Author Patrik Valkovic :Created 10.08.2017 23:12 :Licence GNUv3 Part of grammpy """ from unittest import TestCase, main from grammpy import * class NotNonterminalTest(TestCase): pass if __name__ == '__main__': main()
<commit_before><commit_msg>Add file for tests of start symbol as not nonterminal<commit_after>
#!/usr/bin/env python """ :Author Patrik Valkovic :Created 10.08.2017 23:12 :Licence GNUv3 Part of grammpy """ from unittest import TestCase, main from grammpy import * class NotNonterminalTest(TestCase): pass if __name__ == '__main__': main()
Add file for tests of start symbol as not nonterminal#!/usr/bin/env python """ :Author Patrik Valkovic :Created 10.08.2017 23:12 :Licence GNUv3 Part of grammpy """ from unittest import TestCase, main from grammpy import * class NotNonterminalTest(TestCase): pass if __name__ == '__main__': main()
<commit_before><commit_msg>Add file for tests of start symbol as not nonterminal<commit_after>#!/usr/bin/env python """ :Author Patrik Valkovic :Created 10.08.2017 23:12 :Licence GNUv3 Part of grammpy """ from unittest import TestCase, main from grammpy import * class NotNonterminalTest(TestCase): pass if __n...
e075b0b1c8d581107209e869eda7f6ff07a7321c
reverse_dict.py
reverse_dict.py
"""Reverse modern->historic spelling variants dictonary to historic->modern mappings """ import argparse import codecs import json from collections import Counter if __name__ == '__main__': parser = argparse.ArgumentParser() parser.add_argument('input_dict', help='the name of the json file ' ...
Add script to create a historic->modern dictionary
Add script to create a historic->modern dictionary The script takes as input a modern->historic variants dictionary in a json file (created by the generate_historic_liwc script) and reverses it to a dictionary that can be used to replace historic words with their modern variant(s). Currently, the script only prints st...
Python
apache-2.0
NLeSC/embodied-emotions-scripts,NLeSC/embodied-emotions-scripts
Add script to create a historic->modern dictionary The script takes as input a modern->historic variants dictionary in a json file (created by the generate_historic_liwc script) and reverses it to a dictionary that can be used to replace historic words with their modern variant(s). Currently, the script only prints st...
"""Reverse modern->historic spelling variants dictonary to historic->modern mappings """ import argparse import codecs import json from collections import Counter if __name__ == '__main__': parser = argparse.ArgumentParser() parser.add_argument('input_dict', help='the name of the json file ' ...
<commit_before><commit_msg>Add script to create a historic->modern dictionary The script takes as input a modern->historic variants dictionary in a json file (created by the generate_historic_liwc script) and reverses it to a dictionary that can be used to replace historic words with their modern variant(s). Currently...
"""Reverse modern->historic spelling variants dictonary to historic->modern mappings """ import argparse import codecs import json from collections import Counter if __name__ == '__main__': parser = argparse.ArgumentParser() parser.add_argument('input_dict', help='the name of the json file ' ...
Add script to create a historic->modern dictionary The script takes as input a modern->historic variants dictionary in a json file (created by the generate_historic_liwc script) and reverses it to a dictionary that can be used to replace historic words with their modern variant(s). Currently, the script only prints st...
<commit_before><commit_msg>Add script to create a historic->modern dictionary The script takes as input a modern->historic variants dictionary in a json file (created by the generate_historic_liwc script) and reverses it to a dictionary that can be used to replace historic words with their modern variant(s). Currently...
fb6eee18b2bf48dd0063623515ced00e980bdf10
nipype/utils/tests/test_docparse.py
nipype/utils/tests/test_docparse.py
from nipype.testing import * from nipype.utils.docparse import reverse_opt_map, build_doc class Foo(object): opt_map = {'outline': '-o', 'fun': '-f %.2f', 'flags': '%s'} foo_doc = """Usage: foo infile outfile [opts] Bunch of options: -o something about an outline -f <f> intensity of fun factor O...
Add a few tests for docparse.
Add a few tests for docparse. git-svn-id: 24f545668198cdd163a527378499f2123e59bf9f@338 ead46cd0-7350-4e37-8683-fc4c6f79bf00
Python
bsd-3-clause
carolFrohlich/nipype,carolFrohlich/nipype,sgiavasis/nipype,gerddie/nipype,christianbrodbeck/nipype,glatard/nipype,grlee77/nipype,satra/NiPypeold,arokem/nipype,wanderine/nipype,mick-d/nipype,carlohamalainen/nipype,rameshvs/nipype,dgellis90/nipype,blakedewey/nipype,glatard/nipype,gerddie/nipype,grlee77/nipype,Leoniela/ni...
Add a few tests for docparse. git-svn-id: 24f545668198cdd163a527378499f2123e59bf9f@338 ead46cd0-7350-4e37-8683-fc4c6f79bf00
from nipype.testing import * from nipype.utils.docparse import reverse_opt_map, build_doc class Foo(object): opt_map = {'outline': '-o', 'fun': '-f %.2f', 'flags': '%s'} foo_doc = """Usage: foo infile outfile [opts] Bunch of options: -o something about an outline -f <f> intensity of fun factor O...
<commit_before><commit_msg>Add a few tests for docparse. git-svn-id: 24f545668198cdd163a527378499f2123e59bf9f@338 ead46cd0-7350-4e37-8683-fc4c6f79bf00<commit_after>
from nipype.testing import * from nipype.utils.docparse import reverse_opt_map, build_doc class Foo(object): opt_map = {'outline': '-o', 'fun': '-f %.2f', 'flags': '%s'} foo_doc = """Usage: foo infile outfile [opts] Bunch of options: -o something about an outline -f <f> intensity of fun factor O...
Add a few tests for docparse. git-svn-id: 24f545668198cdd163a527378499f2123e59bf9f@338 ead46cd0-7350-4e37-8683-fc4c6f79bf00from nipype.testing import * from nipype.utils.docparse import reverse_opt_map, build_doc class Foo(object): opt_map = {'outline': '-o', 'fun': '-f %.2f', 'flags': '%s'} foo_doc = """Usage:...
<commit_before><commit_msg>Add a few tests for docparse. git-svn-id: 24f545668198cdd163a527378499f2123e59bf9f@338 ead46cd0-7350-4e37-8683-fc4c6f79bf00<commit_after>from nipype.testing import * from nipype.utils.docparse import reverse_opt_map, build_doc class Foo(object): opt_map = {'outline': '-o', 'fun': '-f %...
555dac76a8810cfeaae96f8de04e9eb3362a3314
migrations/versions/0109_rem_old_noti_status.py
migrations/versions/0109_rem_old_noti_status.py
""" Revision ID: 0109_rem_old_noti_status Revises: 0108_change_logo_not_nullable Create Date: 2017-07-10 14:25:15.712055 """ from alembic import op import sqlalchemy as sa from sqlalchemy.dialects import postgresql revision = '0109_rem_old_noti_status' down_revision = '0108_change_logo_not_nullable' def upgrade():...
Remove old notification status column
Remove old notification status column
Python
mit
alphagov/notifications-api,alphagov/notifications-api
Remove old notification status column
""" Revision ID: 0109_rem_old_noti_status Revises: 0108_change_logo_not_nullable Create Date: 2017-07-10 14:25:15.712055 """ from alembic import op import sqlalchemy as sa from sqlalchemy.dialects import postgresql revision = '0109_rem_old_noti_status' down_revision = '0108_change_logo_not_nullable' def upgrade():...
<commit_before><commit_msg>Remove old notification status column<commit_after>
""" Revision ID: 0109_rem_old_noti_status Revises: 0108_change_logo_not_nullable Create Date: 2017-07-10 14:25:15.712055 """ from alembic import op import sqlalchemy as sa from sqlalchemy.dialects import postgresql revision = '0109_rem_old_noti_status' down_revision = '0108_change_logo_not_nullable' def upgrade():...
Remove old notification status column""" Revision ID: 0109_rem_old_noti_status Revises: 0108_change_logo_not_nullable Create Date: 2017-07-10 14:25:15.712055 """ from alembic import op import sqlalchemy as sa from sqlalchemy.dialects import postgresql revision = '0109_rem_old_noti_status' down_revision = '0108_chang...
<commit_before><commit_msg>Remove old notification status column<commit_after>""" Revision ID: 0109_rem_old_noti_status Revises: 0108_change_logo_not_nullable Create Date: 2017-07-10 14:25:15.712055 """ from alembic import op import sqlalchemy as sa from sqlalchemy.dialects import postgresql revision = '0109_rem_old...
21a67556b83b7905134439d55afe33c35e4b3422
migrations/versions/0246_notifications_index.py
migrations/versions/0246_notifications_index.py
""" Revision ID: 0246_notifications_index Revises: 0245_archived_flag_jobs Create Date: 2018-12-12 12:00:09.770775 """ from alembic import op revision = '0246_notifications_index' down_revision = '0245_archived_flag_jobs' def upgrade(): conn = op.get_bind() conn.execute( "CREATE INDEX IF NOT EXISTS...
Add an index on notifications for (service_id, created_at) to improve the performance of the notification queries. We've already performed this update on production since you need to create the index concurrently, which is not allowed from the alembic script. For that reason we are checking if the index exists.
Add an index on notifications for (service_id, created_at) to improve the performance of the notification queries. We've already performed this update on production since you need to create the index concurrently, which is not allowed from the alembic script. For that reason we are checking if the index exists.
Python
mit
alphagov/notifications-api,alphagov/notifications-api
Add an index on notifications for (service_id, created_at) to improve the performance of the notification queries. We've already performed this update on production since you need to create the index concurrently, which is not allowed from the alembic script. For that reason we are checking if the index exists.
""" Revision ID: 0246_notifications_index Revises: 0245_archived_flag_jobs Create Date: 2018-12-12 12:00:09.770775 """ from alembic import op revision = '0246_notifications_index' down_revision = '0245_archived_flag_jobs' def upgrade(): conn = op.get_bind() conn.execute( "CREATE INDEX IF NOT EXISTS...
<commit_before><commit_msg>Add an index on notifications for (service_id, created_at) to improve the performance of the notification queries. We've already performed this update on production since you need to create the index concurrently, which is not allowed from the alembic script. For that reason we are checking i...
""" Revision ID: 0246_notifications_index Revises: 0245_archived_flag_jobs Create Date: 2018-12-12 12:00:09.770775 """ from alembic import op revision = '0246_notifications_index' down_revision = '0245_archived_flag_jobs' def upgrade(): conn = op.get_bind() conn.execute( "CREATE INDEX IF NOT EXISTS...
Add an index on notifications for (service_id, created_at) to improve the performance of the notification queries. We've already performed this update on production since you need to create the index concurrently, which is not allowed from the alembic script. For that reason we are checking if the index exists.""" Rev...
<commit_before><commit_msg>Add an index on notifications for (service_id, created_at) to improve the performance of the notification queries. We've already performed this update on production since you need to create the index concurrently, which is not allowed from the alembic script. For that reason we are checking i...
5acc7d50cbe199af49aece28b95ea97484ae31c7
snake/solutions/ghiaEtAl1982.py
snake/solutions/ghiaEtAl1982.py
""" Implementation of the class `GhiaEtAl1982` that reads the centerline velocities reported in Ghia et al. (1982). _References:_ * Ghia, U. K. N. G., Ghia, K. N., & Shin, C. T. (1982). High-Re solutions for incompressible flow using the Navier-Stokes equations and a multigrid method. Journal of computational ph...
Add solution class for Ghia et al. (1982)
Add solution class for Ghia et al. (1982)
Python
mit
mesnardo/snake
Add solution class for Ghia et al. (1982)
""" Implementation of the class `GhiaEtAl1982` that reads the centerline velocities reported in Ghia et al. (1982). _References:_ * Ghia, U. K. N. G., Ghia, K. N., & Shin, C. T. (1982). High-Re solutions for incompressible flow using the Navier-Stokes equations and a multigrid method. Journal of computational ph...
<commit_before><commit_msg>Add solution class for Ghia et al. (1982)<commit_after>
""" Implementation of the class `GhiaEtAl1982` that reads the centerline velocities reported in Ghia et al. (1982). _References:_ * Ghia, U. K. N. G., Ghia, K. N., & Shin, C. T. (1982). High-Re solutions for incompressible flow using the Navier-Stokes equations and a multigrid method. Journal of computational ph...
Add solution class for Ghia et al. (1982)""" Implementation of the class `GhiaEtAl1982` that reads the centerline velocities reported in Ghia et al. (1982). _References:_ * Ghia, U. K. N. G., Ghia, K. N., & Shin, C. T. (1982). High-Re solutions for incompressible flow using the Navier-Stokes equations and a multig...
<commit_before><commit_msg>Add solution class for Ghia et al. (1982)<commit_after>""" Implementation of the class `GhiaEtAl1982` that reads the centerline velocities reported in Ghia et al. (1982). _References:_ * Ghia, U. K. N. G., Ghia, K. N., & Shin, C. T. (1982). High-Re solutions for incompressible flow using t...
14068a2e3ca445c02895aed38420baf846338aae
scripts/examples/25-Machine-Learning/nn_haar_smile_detection.py
scripts/examples/25-Machine-Learning/nn_haar_smile_detection.py
# Simle detection using Haar Cascade + CNN. import sensor, time, image, os, nn sensor.reset() # Reset and initialize the sensor. sensor.set_contrast(2) sensor.set_pixformat(sensor.GRAYSCALE) # Set pixel format to RGB565 sensor.set_framesize(sensor.QQVGA) # Set frame size to QVGA (320x240...
Add smile detection example script.
NN: Add smile detection example script.
Python
mit
iabdalkader/openmv,iabdalkader/openmv,iabdalkader/openmv,iabdalkader/openmv,openmv/openmv,kwagyeman/openmv,openmv/openmv,kwagyeman/openmv,kwagyeman/openmv,openmv/openmv,kwagyeman/openmv,openmv/openmv
NN: Add smile detection example script.
# Simle detection using Haar Cascade + CNN. import sensor, time, image, os, nn sensor.reset() # Reset and initialize the sensor. sensor.set_contrast(2) sensor.set_pixformat(sensor.GRAYSCALE) # Set pixel format to RGB565 sensor.set_framesize(sensor.QQVGA) # Set frame size to QVGA (320x240...
<commit_before><commit_msg>NN: Add smile detection example script.<commit_after>
# Simle detection using Haar Cascade + CNN. import sensor, time, image, os, nn sensor.reset() # Reset and initialize the sensor. sensor.set_contrast(2) sensor.set_pixformat(sensor.GRAYSCALE) # Set pixel format to RGB565 sensor.set_framesize(sensor.QQVGA) # Set frame size to QVGA (320x240...
NN: Add smile detection example script.# Simle detection using Haar Cascade + CNN. import sensor, time, image, os, nn sensor.reset() # Reset and initialize the sensor. sensor.set_contrast(2) sensor.set_pixformat(sensor.GRAYSCALE) # Set pixel format to RGB565 sensor.set_framesize(sensor.QQVGA)...
<commit_before><commit_msg>NN: Add smile detection example script.<commit_after># Simle detection using Haar Cascade + CNN. import sensor, time, image, os, nn sensor.reset() # Reset and initialize the sensor. sensor.set_contrast(2) sensor.set_pixformat(sensor.GRAYSCALE) # Set pixel format to ...
139123ddb81eec12d0f932ff6ff73aadb4b418cc
ocradmin/lib/nodetree/decorators.py
ocradmin/lib/nodetree/decorators.py
""" Nodetree decorators. """ import inspect import textwrap import node def underscore_to_camelcase(value): def camelcase(): yield str.lower while True: yield str.capitalize c = camelcase() return "".join(c.next()(x) if x else '_' for x in value.split("_")) def upper_camelca...
Add decorator to make a Node class from a regular function
Add decorator to make a Node class from a regular function
Python
apache-2.0
vitorio/ocropodium,vitorio/ocropodium,vitorio/ocropodium,vitorio/ocropodium
Add decorator to make a Node class from a regular function
""" Nodetree decorators. """ import inspect import textwrap import node def underscore_to_camelcase(value): def camelcase(): yield str.lower while True: yield str.capitalize c = camelcase() return "".join(c.next()(x) if x else '_' for x in value.split("_")) def upper_camelca...
<commit_before><commit_msg>Add decorator to make a Node class from a regular function<commit_after>
""" Nodetree decorators. """ import inspect import textwrap import node def underscore_to_camelcase(value): def camelcase(): yield str.lower while True: yield str.capitalize c = camelcase() return "".join(c.next()(x) if x else '_' for x in value.split("_")) def upper_camelca...
Add decorator to make a Node class from a regular function""" Nodetree decorators. """ import inspect import textwrap import node def underscore_to_camelcase(value): def camelcase(): yield str.lower while True: yield str.capitalize c = camelcase() return "".join(c.next()(x) i...
<commit_before><commit_msg>Add decorator to make a Node class from a regular function<commit_after>""" Nodetree decorators. """ import inspect import textwrap import node def underscore_to_camelcase(value): def camelcase(): yield str.lower while True: yield str.capitalize c = cam...
fbc780c7beb94d73b2a4ea110e733f8c87763741
geoip/lookups.py
geoip/lookups.py
#!/usr/bin/env python # -*- coding: utf-8 -*- ## ## Author: Orcun Avsar <orc.avs@gmail.com> ## ## Copyright (C) 2011 S2S Network Consultoria e Tecnologia da Informacao LTDA ## ## This program is free software: you can redistribute it and/or modify ## it under the terms of the GNU Affero General Public License as ## pub...
Add location name lookup for ajax_select.
Add location name lookup for ajax_select.
Python
agpl-3.0
umitproject/openmonitor-aggregator,umitproject/openmonitor-aggregator,umitproject/openmonitor-aggregator,umitproject/openmonitor-aggregator,umitproject/openmonitor-aggregator
Add location name lookup for ajax_select.
#!/usr/bin/env python # -*- coding: utf-8 -*- ## ## Author: Orcun Avsar <orc.avs@gmail.com> ## ## Copyright (C) 2011 S2S Network Consultoria e Tecnologia da Informacao LTDA ## ## This program is free software: you can redistribute it and/or modify ## it under the terms of the GNU Affero General Public License as ## pub...
<commit_before><commit_msg>Add location name lookup for ajax_select.<commit_after>
#!/usr/bin/env python # -*- coding: utf-8 -*- ## ## Author: Orcun Avsar <orc.avs@gmail.com> ## ## Copyright (C) 2011 S2S Network Consultoria e Tecnologia da Informacao LTDA ## ## This program is free software: you can redistribute it and/or modify ## it under the terms of the GNU Affero General Public License as ## pub...
Add location name lookup for ajax_select.#!/usr/bin/env python # -*- coding: utf-8 -*- ## ## Author: Orcun Avsar <orc.avs@gmail.com> ## ## Copyright (C) 2011 S2S Network Consultoria e Tecnologia da Informacao LTDA ## ## This program is free software: you can redistribute it and/or modify ## it under the terms of the GN...
<commit_before><commit_msg>Add location name lookup for ajax_select.<commit_after>#!/usr/bin/env python # -*- coding: utf-8 -*- ## ## Author: Orcun Avsar <orc.avs@gmail.com> ## ## Copyright (C) 2011 S2S Network Consultoria e Tecnologia da Informacao LTDA ## ## This program is free software: you can redistribute it and/...
af3ba846a8074132c64568c420ecb9b6ade9c6ea
geomRegexTest.py
geomRegexTest.py
__author__ = 'Thomas Heavey' import re filename = "testg.out" def findgeoms(filename): """A function that takes a file name and returns a list of geometries.""" relevantelem = [1,3,4,5] xyzformat = '{:>2} {: f} {: f} {: f}' geomregex = re.compile( r'(?:Standard orientation)' # no...
Work on defining RegEx to find and format molecular geometries in Gaussian output files.
Work on defining RegEx to find and format molecular geometries in Gaussian output files.
Python
apache-2.0
thompcinnamon/QM-calc-scripts
Work on defining RegEx to find and format molecular geometries in Gaussian output files.
__author__ = 'Thomas Heavey' import re filename = "testg.out" def findgeoms(filename): """A function that takes a file name and returns a list of geometries.""" relevantelem = [1,3,4,5] xyzformat = '{:>2} {: f} {: f} {: f}' geomregex = re.compile( r'(?:Standard orientation)' # no...
<commit_before><commit_msg>Work on defining RegEx to find and format molecular geometries in Gaussian output files.<commit_after>
__author__ = 'Thomas Heavey' import re filename = "testg.out" def findgeoms(filename): """A function that takes a file name and returns a list of geometries.""" relevantelem = [1,3,4,5] xyzformat = '{:>2} {: f} {: f} {: f}' geomregex = re.compile( r'(?:Standard orientation)' # no...
Work on defining RegEx to find and format molecular geometries in Gaussian output files.__author__ = 'Thomas Heavey' import re filename = "testg.out" def findgeoms(filename): """A function that takes a file name and returns a list of geometries.""" relevantelem = [1,3,4,5] xyzformat = '{:>2} {: ...
<commit_before><commit_msg>Work on defining RegEx to find and format molecular geometries in Gaussian output files.<commit_after>__author__ = 'Thomas Heavey' import re filename = "testg.out" def findgeoms(filename): """A function that takes a file name and returns a list of geometries.""" relevantelem = ...
c2b69a51faac56689edc88e747a00b60cf08cc04
dthm4kaiako/poet/migrations/0003_auto_20190731_1912.py
dthm4kaiako/poet/migrations/0003_auto_20190731_1912.py
# Generated by Django 2.1.5 on 2019-07-31 07:12 from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('poet', '0002_progressoutcomegroup'), ] operations = [ migrations.AlterModelOptions( name='progressoutcomegroup', options={'o...
Add default ordering of progress outcome groups
Add default ordering of progress outcome groups
Python
mit
uccser/cs4teachers,uccser/cs4teachers,uccser/cs4teachers,uccser/cs4teachers
Add default ordering of progress outcome groups
# Generated by Django 2.1.5 on 2019-07-31 07:12 from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('poet', '0002_progressoutcomegroup'), ] operations = [ migrations.AlterModelOptions( name='progressoutcomegroup', options={'o...
<commit_before><commit_msg>Add default ordering of progress outcome groups<commit_after>
# Generated by Django 2.1.5 on 2019-07-31 07:12 from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('poet', '0002_progressoutcomegroup'), ] operations = [ migrations.AlterModelOptions( name='progressoutcomegroup', options={'o...
Add default ordering of progress outcome groups# Generated by Django 2.1.5 on 2019-07-31 07:12 from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('poet', '0002_progressoutcomegroup'), ] operations = [ migrations.AlterModelOptions( name=...
<commit_before><commit_msg>Add default ordering of progress outcome groups<commit_after># Generated by Django 2.1.5 on 2019-07-31 07:12 from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('poet', '0002_progressoutcomegroup'), ] operations = [ migrat...
32a79573b38c6d2ea7f5b81363610a5d9332ed4e
src/main/resources/jsonformat.py
src/main/resources/jsonformat.py
#!/usr/bin/python2.7 import json import socket import sys def readOutput(host, port): data = None s = None try: s = socket.socket(socket.AF_INET, socket.SOCK_STREAM) s.connect((host, int(port))) except socket.error as msg: s = None print msg if s is None: return None try: data = s.recv(1024) except ...
Add python script to parse JSON output
Add python script to parse JSON output
Python
apache-2.0
leo27lijiang/app-monitor,leo27lijiang/app-monitor
Add python script to parse JSON output
#!/usr/bin/python2.7 import json import socket import sys def readOutput(host, port): data = None s = None try: s = socket.socket(socket.AF_INET, socket.SOCK_STREAM) s.connect((host, int(port))) except socket.error as msg: s = None print msg if s is None: return None try: data = s.recv(1024) except ...
<commit_before><commit_msg>Add python script to parse JSON output<commit_after>
#!/usr/bin/python2.7 import json import socket import sys def readOutput(host, port): data = None s = None try: s = socket.socket(socket.AF_INET, socket.SOCK_STREAM) s.connect((host, int(port))) except socket.error as msg: s = None print msg if s is None: return None try: data = s.recv(1024) except ...
Add python script to parse JSON output#!/usr/bin/python2.7 import json import socket import sys def readOutput(host, port): data = None s = None try: s = socket.socket(socket.AF_INET, socket.SOCK_STREAM) s.connect((host, int(port))) except socket.error as msg: s = None print msg if s is None: return Non...
<commit_before><commit_msg>Add python script to parse JSON output<commit_after>#!/usr/bin/python2.7 import json import socket import sys def readOutput(host, port): data = None s = None try: s = socket.socket(socket.AF_INET, socket.SOCK_STREAM) s.connect((host, int(port))) except socket.error as msg: s = Non...
699469342179fdc4319b5f39ea201015860ef09d
infrastructure/migrations/0020_auto_20210922_0929.py
infrastructure/migrations/0020_auto_20210922_0929.py
# -*- coding: utf-8 -*- # Generated by Django 1.11.29 on 2021-09-22 07:29 from __future__ import unicode_literals from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ('infrastructure', '0019_project_latest_implementation_year'...
Add migration for CI fix
Add migration for CI fix
Python
mit
Code4SA/municipal-data,Code4SA/municipal-data,Code4SA/municipal-data,Code4SA/municipal-data
Add migration for CI fix
# -*- coding: utf-8 -*- # Generated by Django 1.11.29 on 2021-09-22 07:29 from __future__ import unicode_literals from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ('infrastructure', '0019_project_latest_implementation_year'...
<commit_before><commit_msg>Add migration for CI fix<commit_after>
# -*- coding: utf-8 -*- # Generated by Django 1.11.29 on 2021-09-22 07:29 from __future__ import unicode_literals from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ('infrastructure', '0019_project_latest_implementation_year'...
Add migration for CI fix# -*- coding: utf-8 -*- # Generated by Django 1.11.29 on 2021-09-22 07:29 from __future__ import unicode_literals from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ('infrastructure', '0019_project_lat...
<commit_before><commit_msg>Add migration for CI fix<commit_after># -*- coding: utf-8 -*- # Generated by Django 1.11.29 on 2021-09-22 07:29 from __future__ import unicode_literals from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ...
c63144242d9cf2ecf02d58eb9a93cfe426acc6dc
scripts/send_preprint_unreg_contributor_emails.py
scripts/send_preprint_unreg_contributor_emails.py
# -*- coding: utf-8 -*- """Sends an unregistered user claim email for preprints created after 2017-03-14. A hotfix was made on that date which caused unregistered user claim emails to not be sent. The regression was fixed on 2017-05-05. This sends the emails that should have been sent during that time period. NOTE: Th...
Add script to send unregister user emails
Add script to send unregister user emails ...to unregistered contributors who didn't receive the email after 568413a77cc51511a0f7afe081a218676a36ebb6 was deployed Relates to [OSF-7935]
Python
apache-2.0
laurenrevere/osf.io,Nesiehr/osf.io,cwisecarver/osf.io,leb2dg/osf.io,crcresearch/osf.io,leb2dg/osf.io,brianjgeiger/osf.io,Johnetordoff/osf.io,chennan47/osf.io,chrisseto/osf.io,Johnetordoff/osf.io,cslzchen/osf.io,Nesiehr/osf.io,caseyrollins/osf.io,sloria/osf.io,baylee-d/osf.io,cslzchen/osf.io,hmoco/osf.io,TomBaxter/osf.i...
Add script to send unregister user emails ...to unregistered contributors who didn't receive the email after 568413a77cc51511a0f7afe081a218676a36ebb6 was deployed Relates to [OSF-7935]
# -*- coding: utf-8 -*- """Sends an unregistered user claim email for preprints created after 2017-03-14. A hotfix was made on that date which caused unregistered user claim emails to not be sent. The regression was fixed on 2017-05-05. This sends the emails that should have been sent during that time period. NOTE: Th...
<commit_before><commit_msg>Add script to send unregister user emails ...to unregistered contributors who didn't receive the email after 568413a77cc51511a0f7afe081a218676a36ebb6 was deployed Relates to [OSF-7935]<commit_after>
# -*- coding: utf-8 -*- """Sends an unregistered user claim email for preprints created after 2017-03-14. A hotfix was made on that date which caused unregistered user claim emails to not be sent. The regression was fixed on 2017-05-05. This sends the emails that should have been sent during that time period. NOTE: Th...
Add script to send unregister user emails ...to unregistered contributors who didn't receive the email after 568413a77cc51511a0f7afe081a218676a36ebb6 was deployed Relates to [OSF-7935]# -*- coding: utf-8 -*- """Sends an unregistered user claim email for preprints created after 2017-03-14. A hotfix was made on that da...
<commit_before><commit_msg>Add script to send unregister user emails ...to unregistered contributors who didn't receive the email after 568413a77cc51511a0f7afe081a218676a36ebb6 was deployed Relates to [OSF-7935]<commit_after># -*- coding: utf-8 -*- """Sends an unregistered user claim email for preprints created after...
4065a08ea401e0d95e8d40d9d735edf92edda861
oslo_policy/tests/test_cache_handler.py
oslo_policy/tests/test_cache_handler.py
# Copyright (c) 2020 OpenStack Foundation. # 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 ...
Add unit tests on cache handler
Add unit tests on cache handler Change-Id: Ife6600da240f830aa0080e3f214cedf1389ea512
Python
apache-2.0
openstack/oslo.policy
Add unit tests on cache handler Change-Id: Ife6600da240f830aa0080e3f214cedf1389ea512
# Copyright (c) 2020 OpenStack Foundation. # 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 ...
<commit_before><commit_msg>Add unit tests on cache handler Change-Id: Ife6600da240f830aa0080e3f214cedf1389ea512<commit_after>
# Copyright (c) 2020 OpenStack Foundation. # 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 ...
Add unit tests on cache handler Change-Id: Ife6600da240f830aa0080e3f214cedf1389ea512# Copyright (c) 2020 OpenStack Foundation. # 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...
<commit_before><commit_msg>Add unit tests on cache handler Change-Id: Ife6600da240f830aa0080e3f214cedf1389ea512<commit_after># Copyright (c) 2020 OpenStack Foundation. # All Rights Reserved. # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with t...
3661ca3947763656165f8fc68ea42358ad37285a
test/unit/helpers/test_qiprofile.py
test/unit/helpers/test_qiprofile.py
import os import glob import shutil from nose.tools import (assert_equal, assert_is_not_none) import qixnat from ... import (project, ROOT) from ...helpers.logging import logger from qipipe.helpers import qiprofile COLLECTION = 'Sarcoma' """The test collection.""" SUBJECT = 'Sarcoma001' """The test subjects.""" SESS...
Add stub for qiprofile update test.
Add stub for qiprofile update test.
Python
bsd-2-clause
ohsu-qin/qipipe
Add stub for qiprofile update test.
import os import glob import shutil from nose.tools import (assert_equal, assert_is_not_none) import qixnat from ... import (project, ROOT) from ...helpers.logging import logger from qipipe.helpers import qiprofile COLLECTION = 'Sarcoma' """The test collection.""" SUBJECT = 'Sarcoma001' """The test subjects.""" SESS...
<commit_before><commit_msg>Add stub for qiprofile update test.<commit_after>
import os import glob import shutil from nose.tools import (assert_equal, assert_is_not_none) import qixnat from ... import (project, ROOT) from ...helpers.logging import logger from qipipe.helpers import qiprofile COLLECTION = 'Sarcoma' """The test collection.""" SUBJECT = 'Sarcoma001' """The test subjects.""" SESS...
Add stub for qiprofile update test.import os import glob import shutil from nose.tools import (assert_equal, assert_is_not_none) import qixnat from ... import (project, ROOT) from ...helpers.logging import logger from qipipe.helpers import qiprofile COLLECTION = 'Sarcoma' """The test collection.""" SUBJECT = 'Sarcoma...
<commit_before><commit_msg>Add stub for qiprofile update test.<commit_after>import os import glob import shutil from nose.tools import (assert_equal, assert_is_not_none) import qixnat from ... import (project, ROOT) from ...helpers.logging import logger from qipipe.helpers import qiprofile COLLECTION = 'Sarcoma' """Th...
36af45d88f01723204d9b65d4081e74a80f0776b
test/layers_test.py
test/layers_test.py
import theanets import numpy as np class TestLayer: def test_build(self): layer = theanets.layers.build('feedforward', nin=2, nout=4) assert isinstance(layer, theanets.layers.Layer) class TestFeedforward: def test_create(self): l = theanets.layers.Feedforward(nin=2, nout=4) a...
Add test for layers module.
Add test for layers module.
Python
mit
chrinide/theanets,devdoer/theanets,lmjohns3/theanets
Add test for layers module.
import theanets import numpy as np class TestLayer: def test_build(self): layer = theanets.layers.build('feedforward', nin=2, nout=4) assert isinstance(layer, theanets.layers.Layer) class TestFeedforward: def test_create(self): l = theanets.layers.Feedforward(nin=2, nout=4) a...
<commit_before><commit_msg>Add test for layers module.<commit_after>
import theanets import numpy as np class TestLayer: def test_build(self): layer = theanets.layers.build('feedforward', nin=2, nout=4) assert isinstance(layer, theanets.layers.Layer) class TestFeedforward: def test_create(self): l = theanets.layers.Feedforward(nin=2, nout=4) a...
Add test for layers module.import theanets import numpy as np class TestLayer: def test_build(self): layer = theanets.layers.build('feedforward', nin=2, nout=4) assert isinstance(layer, theanets.layers.Layer) class TestFeedforward: def test_create(self): l = theanets.layers.Feedforwa...
<commit_before><commit_msg>Add test for layers module.<commit_after>import theanets import numpy as np class TestLayer: def test_build(self): layer = theanets.layers.build('feedforward', nin=2, nout=4) assert isinstance(layer, theanets.layers.Layer) class TestFeedforward: def test_create(sel...
3dcf251276060b43ac888e0239f26a0cf2531832
tests/test_proxy_drop_executable.py
tests/test_proxy_drop_executable.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/. # Copyright (c) 2017 Mozilla Corporation from positive_alert_test_case import PositiveAlertTestCase from negative_alert_t...
Add tests for proxy drop executable
Add tests for proxy drop executable
Python
mpl-2.0
gdestuynder/MozDef,mozilla/MozDef,jeffbryner/MozDef,gdestuynder/MozDef,jeffbryner/MozDef,mozilla/MozDef,jeffbryner/MozDef,Phrozyn/MozDef,Phrozyn/MozDef,gdestuynder/MozDef,mpurzynski/MozDef,Phrozyn/MozDef,gdestuynder/MozDef,jeffbryner/MozDef,mpurzynski/MozDef,mozilla/MozDef,mpurzynski/MozDef,Phrozyn/MozDef,mpurzynski/Mo...
Add tests for proxy drop executable
# 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/. # Copyright (c) 2017 Mozilla Corporation from positive_alert_test_case import PositiveAlertTestCase from negative_alert_t...
<commit_before><commit_msg>Add tests for proxy drop executable<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/. # Copyright (c) 2017 Mozilla Corporation from positive_alert_test_case import PositiveAlertTestCase from negative_alert_t...
Add tests for proxy drop executable# 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/. # Copyright (c) 2017 Mozilla Corporation from positive_alert_test_case import Positive...
<commit_before><commit_msg>Add tests for proxy drop executable<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/. # Copyright (c) 2017 Mozilla Corporation from...
379aef7e3aebc05352cacd274b43b156e32de18b
runtests.py
runtests.py
#!/usr/bin/env python import argparse import sys import django from django.conf import settings from django.test.utils import get_runner def runtests(test_labels): settings.configure(INSTALLED_APPS=['tests']) django.setup() TestRunner = get_runner(settings) test_runner = TestRunner() failures = t...
Add script to run tests
Add script to run tests
Python
mit
lamarmeigs/django-clean-fields
Add script to run tests
#!/usr/bin/env python import argparse import sys import django from django.conf import settings from django.test.utils import get_runner def runtests(test_labels): settings.configure(INSTALLED_APPS=['tests']) django.setup() TestRunner = get_runner(settings) test_runner = TestRunner() failures = t...
<commit_before><commit_msg>Add script to run tests<commit_after>
#!/usr/bin/env python import argparse import sys import django from django.conf import settings from django.test.utils import get_runner def runtests(test_labels): settings.configure(INSTALLED_APPS=['tests']) django.setup() TestRunner = get_runner(settings) test_runner = TestRunner() failures = t...
Add script to run tests#!/usr/bin/env python import argparse import sys import django from django.conf import settings from django.test.utils import get_runner def runtests(test_labels): settings.configure(INSTALLED_APPS=['tests']) django.setup() TestRunner = get_runner(settings) test_runner = TestRu...
<commit_before><commit_msg>Add script to run tests<commit_after>#!/usr/bin/env python import argparse import sys import django from django.conf import settings from django.test.utils import get_runner def runtests(test_labels): settings.configure(INSTALLED_APPS=['tests']) django.setup() TestRunner = get_...
abf39931331f54aff5f10345939420041bd2039d
tests/test_APS2Pattern.py
tests/test_APS2Pattern.py
import h5py import unittest import numpy as np from copy import copy from QGL import * from instruments.drivers import APS2Pattern class APSPatternUtils(unittest.TestCase): def setUp(self): self.q1gate = Channels.LogicalMarkerChannel(label='q1-gate') self.q1 = Qubit(label='q1', gateChan=self.q1gat...
Add test for APS2 instruction merging.
Add test for APS2 instruction merging. A reduced example of the failing situation from issue #90.
Python
apache-2.0
Plourde-Research-Lab/PyQLab,BBN-Q/PyQLab,rmcgurrin/PyQLab,calebjordan/PyQLab
Add test for APS2 instruction merging. A reduced example of the failing situation from issue #90.
import h5py import unittest import numpy as np from copy import copy from QGL import * from instruments.drivers import APS2Pattern class APSPatternUtils(unittest.TestCase): def setUp(self): self.q1gate = Channels.LogicalMarkerChannel(label='q1-gate') self.q1 = Qubit(label='q1', gateChan=self.q1gat...
<commit_before><commit_msg>Add test for APS2 instruction merging. A reduced example of the failing situation from issue #90.<commit_after>
import h5py import unittest import numpy as np from copy import copy from QGL import * from instruments.drivers import APS2Pattern class APSPatternUtils(unittest.TestCase): def setUp(self): self.q1gate = Channels.LogicalMarkerChannel(label='q1-gate') self.q1 = Qubit(label='q1', gateChan=self.q1gat...
Add test for APS2 instruction merging. A reduced example of the failing situation from issue #90.import h5py import unittest import numpy as np from copy import copy from QGL import * from instruments.drivers import APS2Pattern class APSPatternUtils(unittest.TestCase): def setUp(self): self.q1gate = Chan...
<commit_before><commit_msg>Add test for APS2 instruction merging. A reduced example of the failing situation from issue #90.<commit_after>import h5py import unittest import numpy as np from copy import copy from QGL import * from instruments.drivers import APS2Pattern class APSPatternUtils(unittest.TestCase): de...
aeaf2e1a1207f2094ea4298b1ecff015f5996b5a
skimage/filter/tests/test_gabor.py
skimage/filter/tests/test_gabor.py
import numpy as np from numpy.testing import assert_almost_equal, assert_array_almost_equal from skimage.filter import gabor_kernel, gabor_filter def test_gabor_kernel_sum(): for sigmax in range(1, 10, 2): for sigmay in range(1, 10, 2): for frequency in range(0, 10, 2): kernel...
Add test cases for gabor filter
Add test cases for gabor filter
Python
bsd-3-clause
blink1073/scikit-image,dpshelio/scikit-image,emon10005/scikit-image,ofgulban/scikit-image,Britefury/scikit-image,chriscrosscutler/scikit-image,keflavich/scikit-image,Hiyorimi/scikit-image,keflavich/scikit-image,warmspringwinds/scikit-image,chintak/scikit-image,vighneshbirodkar/scikit-image,ClinicalGraphics/scikit-image...
Add test cases for gabor filter
import numpy as np from numpy.testing import assert_almost_equal, assert_array_almost_equal from skimage.filter import gabor_kernel, gabor_filter def test_gabor_kernel_sum(): for sigmax in range(1, 10, 2): for sigmay in range(1, 10, 2): for frequency in range(0, 10, 2): kernel...
<commit_before><commit_msg>Add test cases for gabor filter<commit_after>
import numpy as np from numpy.testing import assert_almost_equal, assert_array_almost_equal from skimage.filter import gabor_kernel, gabor_filter def test_gabor_kernel_sum(): for sigmax in range(1, 10, 2): for sigmay in range(1, 10, 2): for frequency in range(0, 10, 2): kernel...
Add test cases for gabor filterimport numpy as np from numpy.testing import assert_almost_equal, assert_array_almost_equal from skimage.filter import gabor_kernel, gabor_filter def test_gabor_kernel_sum(): for sigmax in range(1, 10, 2): for sigmay in range(1, 10, 2): for frequency in range(0,...
<commit_before><commit_msg>Add test cases for gabor filter<commit_after>import numpy as np from numpy.testing import assert_almost_equal, assert_array_almost_equal from skimage.filter import gabor_kernel, gabor_filter def test_gabor_kernel_sum(): for sigmax in range(1, 10, 2): for sigmay in range(1, 10, ...
a70f46aac52be5b38b869cfbe18c0421a0032aee
count_params.py
count_params.py
import sys import numpy as np import torch model = torch.load(sys.argv[1]) params = 0 for key in model: params += np.multiply.reduce(model[key].shape) print('Total number of parameters: ' + str(params))
Add script to count parameters of PyTorch model
Add script to count parameters of PyTorch model Signed-off-by: Tushar Pankaj <514568343cdd6c4d7c6bb94cf636e24b01176284@gmail.com>
Python
mit
sauhaardac/training,sauhaardac/training
Add script to count parameters of PyTorch model Signed-off-by: Tushar Pankaj <514568343cdd6c4d7c6bb94cf636e24b01176284@gmail.com>
import sys import numpy as np import torch model = torch.load(sys.argv[1]) params = 0 for key in model: params += np.multiply.reduce(model[key].shape) print('Total number of parameters: ' + str(params))
<commit_before><commit_msg>Add script to count parameters of PyTorch model Signed-off-by: Tushar Pankaj <514568343cdd6c4d7c6bb94cf636e24b01176284@gmail.com><commit_after>
import sys import numpy as np import torch model = torch.load(sys.argv[1]) params = 0 for key in model: params += np.multiply.reduce(model[key].shape) print('Total number of parameters: ' + str(params))
Add script to count parameters of PyTorch model Signed-off-by: Tushar Pankaj <514568343cdd6c4d7c6bb94cf636e24b01176284@gmail.com>import sys import numpy as np import torch model = torch.load(sys.argv[1]) params = 0 for key in model: params += np.multiply.reduce(model[key].shape) print('Total number of parameters:...
<commit_before><commit_msg>Add script to count parameters of PyTorch model Signed-off-by: Tushar Pankaj <514568343cdd6c4d7c6bb94cf636e24b01176284@gmail.com><commit_after>import sys import numpy as np import torch model = torch.load(sys.argv[1]) params = 0 for key in model: params += np.multiply.reduce(model[key]....
35e76ec99a3710a20b17a5afddaa14389af65098
tools/import_mediawiki.py
tools/import_mediawiki.py
import os import os.path import argparse from sqlalchemy import create_engine def main(): parser = argparse.ArgumentParser() parser.add_argument('url') parser.add_argument('-o', '--out', default='wikked_import') parser.add_argument('--prefix', default='wiki') parser.add_argument('-v', '--verbose',...
Add some simple MediaWiki importer.
tools: Add some simple MediaWiki importer.
Python
apache-2.0
ludovicchabant/Wikked,ludovicchabant/Wikked,ludovicchabant/Wikked
tools: Add some simple MediaWiki importer.
import os import os.path import argparse from sqlalchemy import create_engine def main(): parser = argparse.ArgumentParser() parser.add_argument('url') parser.add_argument('-o', '--out', default='wikked_import') parser.add_argument('--prefix', default='wiki') parser.add_argument('-v', '--verbose',...
<commit_before><commit_msg>tools: Add some simple MediaWiki importer.<commit_after>
import os import os.path import argparse from sqlalchemy import create_engine def main(): parser = argparse.ArgumentParser() parser.add_argument('url') parser.add_argument('-o', '--out', default='wikked_import') parser.add_argument('--prefix', default='wiki') parser.add_argument('-v', '--verbose',...
tools: Add some simple MediaWiki importer.import os import os.path import argparse from sqlalchemy import create_engine def main(): parser = argparse.ArgumentParser() parser.add_argument('url') parser.add_argument('-o', '--out', default='wikked_import') parser.add_argument('--prefix', default='wiki') ...
<commit_before><commit_msg>tools: Add some simple MediaWiki importer.<commit_after>import os import os.path import argparse from sqlalchemy import create_engine def main(): parser = argparse.ArgumentParser() parser.add_argument('url') parser.add_argument('-o', '--out', default='wikked_import') parser....
fe6ece236e684d76441280ba700565f7fbce40cc
14B-088/HI/analysis/pbcov_masking.py
14B-088/HI/analysis/pbcov_masking.py
''' Cut out noisy regions by imposing a mask of the primary beam coverage. ''' from astropy.io import fits from spectral_cube import SpectralCube from spectral_cube.cube_utils import beams_to_bintable from astropy.utils.console import ProgressBar import os from analysis.paths import fourteenB_HI_data_path # execfil...
Create masked version based on pbcov cutogg
Create masked version based on pbcov cutogg
Python
mit
e-koch/VLA_Lband,e-koch/VLA_Lband
Create masked version based on pbcov cutogg
''' Cut out noisy regions by imposing a mask of the primary beam coverage. ''' from astropy.io import fits from spectral_cube import SpectralCube from spectral_cube.cube_utils import beams_to_bintable from astropy.utils.console import ProgressBar import os from analysis.paths import fourteenB_HI_data_path # execfil...
<commit_before><commit_msg>Create masked version based on pbcov cutogg<commit_after>
''' Cut out noisy regions by imposing a mask of the primary beam coverage. ''' from astropy.io import fits from spectral_cube import SpectralCube from spectral_cube.cube_utils import beams_to_bintable from astropy.utils.console import ProgressBar import os from analysis.paths import fourteenB_HI_data_path # execfil...
Create masked version based on pbcov cutogg ''' Cut out noisy regions by imposing a mask of the primary beam coverage. ''' from astropy.io import fits from spectral_cube import SpectralCube from spectral_cube.cube_utils import beams_to_bintable from astropy.utils.console import ProgressBar import os from analysis.pat...
<commit_before><commit_msg>Create masked version based on pbcov cutogg<commit_after> ''' Cut out noisy regions by imposing a mask of the primary beam coverage. ''' from astropy.io import fits from spectral_cube import SpectralCube from spectral_cube.cube_utils import beams_to_bintable from astropy.utils.console import...
b3e6855489eba5d59507ef6fb4c92f8284526ec1
Arrays/check_consecutive_elements.py
Arrays/check_consecutive_elements.py
import unittest """ Given an unsorted array of numbers, return true if the array only contains consecutive elements. Input: 5 2 3 1 4 Ouput: True (consecutive elements from 1 through 5) Input: 83 78 80 81 79 82 Output: True (consecutive elements from 78 through 83) Input: 34 23 52 12 3 Output: False """ """ Approach: ...
Check consecutive elements in an array
Check consecutive elements in an array
Python
mit
prathamtandon/g4gproblems
Check consecutive elements in an array
import unittest """ Given an unsorted array of numbers, return true if the array only contains consecutive elements. Input: 5 2 3 1 4 Ouput: True (consecutive elements from 1 through 5) Input: 83 78 80 81 79 82 Output: True (consecutive elements from 78 through 83) Input: 34 23 52 12 3 Output: False """ """ Approach: ...
<commit_before><commit_msg>Check consecutive elements in an array<commit_after>
import unittest """ Given an unsorted array of numbers, return true if the array only contains consecutive elements. Input: 5 2 3 1 4 Ouput: True (consecutive elements from 1 through 5) Input: 83 78 80 81 79 82 Output: True (consecutive elements from 78 through 83) Input: 34 23 52 12 3 Output: False """ """ Approach: ...
Check consecutive elements in an arrayimport unittest """ Given an unsorted array of numbers, return true if the array only contains consecutive elements. Input: 5 2 3 1 4 Ouput: True (consecutive elements from 1 through 5) Input: 83 78 80 81 79 82 Output: True (consecutive elements from 78 through 83) Input: 34 23 52 ...
<commit_before><commit_msg>Check consecutive elements in an array<commit_after>import unittest """ Given an unsorted array of numbers, return true if the array only contains consecutive elements. Input: 5 2 3 1 4 Ouput: True (consecutive elements from 1 through 5) Input: 83 78 80 81 79 82 Output: True (consecutive elem...
55b33bff9856cc91943f0a5ae492db1fdc7d8d5a
numba/tests/jitclass_usecases.py
numba/tests/jitclass_usecases.py
""" Usecases with Python 3 syntax in the signatures. This is a separate module in order to avoid syntax errors with Python 2. """ class TestClass1(object): def __init__(self, x, y, z=1, *, a=5): self.x = x self.y = y self.z = z self.a = a class TestClass2(object): def __init_...
Add missing python 3 only file.
Add missing python 3 only file. As title.
Python
bsd-2-clause
cpcloud/numba,stonebig/numba,gmarkall/numba,numba/numba,seibert/numba,seibert/numba,stonebig/numba,cpcloud/numba,stuartarchibald/numba,stuartarchibald/numba,IntelLabs/numba,sklam/numba,IntelLabs/numba,sklam/numba,numba/numba,numba/numba,seibert/numba,jriehl/numba,cpcloud/numba,jriehl/numba,IntelLabs/numba,seibert/numba...
Add missing python 3 only file. As title.
""" Usecases with Python 3 syntax in the signatures. This is a separate module in order to avoid syntax errors with Python 2. """ class TestClass1(object): def __init__(self, x, y, z=1, *, a=5): self.x = x self.y = y self.z = z self.a = a class TestClass2(object): def __init_...
<commit_before><commit_msg>Add missing python 3 only file. As title.<commit_after>
""" Usecases with Python 3 syntax in the signatures. This is a separate module in order to avoid syntax errors with Python 2. """ class TestClass1(object): def __init__(self, x, y, z=1, *, a=5): self.x = x self.y = y self.z = z self.a = a class TestClass2(object): def __init_...
Add missing python 3 only file. As title.""" Usecases with Python 3 syntax in the signatures. This is a separate module in order to avoid syntax errors with Python 2. """ class TestClass1(object): def __init__(self, x, y, z=1, *, a=5): self.x = x self.y = y self.z = z self.a = a ...
<commit_before><commit_msg>Add missing python 3 only file. As title.<commit_after>""" Usecases with Python 3 syntax in the signatures. This is a separate module in order to avoid syntax errors with Python 2. """ class TestClass1(object): def __init__(self, x, y, z=1, *, a=5): self.x = x self.y = ...
e251aff9a232a66b2d24324f394da2ad9345ce79
scripts/migration/migrate_none_as_email_verification.py
scripts/migration/migrate_none_as_email_verification.py
""" Ensure that users with User.email_verifications == None now have {} instead """ import logging import sys from tests.base import OsfTestCase from tests.factories import UserFactory from modularodm import Q from nose.tools import * from website import models from website.app import init_app from scripts import util...
Add migration script for changing users with None as email_verifications to {}
Add migration script for changing users with None as email_verifications to {}
Python
apache-2.0
rdhyee/osf.io,samanehsan/osf.io,barbour-em/osf.io,saradbowman/osf.io,haoyuchen1992/osf.io,brandonPurvis/osf.io,jolene-esposito/osf.io,emetsger/osf.io,laurenrevere/osf.io,HarryRybacki/osf.io,haoyuchen1992/osf.io,CenterForOpenScience/osf.io,samchrisinger/osf.io,jnayak1/osf.io,caneruguz/osf.io,reinaH/osf.io,binoculars/osf...
Add migration script for changing users with None as email_verifications to {}
""" Ensure that users with User.email_verifications == None now have {} instead """ import logging import sys from tests.base import OsfTestCase from tests.factories import UserFactory from modularodm import Q from nose.tools import * from website import models from website.app import init_app from scripts import util...
<commit_before><commit_msg>Add migration script for changing users with None as email_verifications to {}<commit_after>
""" Ensure that users with User.email_verifications == None now have {} instead """ import logging import sys from tests.base import OsfTestCase from tests.factories import UserFactory from modularodm import Q from nose.tools import * from website import models from website.app import init_app from scripts import util...
Add migration script for changing users with None as email_verifications to {}""" Ensure that users with User.email_verifications == None now have {} instead """ import logging import sys from tests.base import OsfTestCase from tests.factories import UserFactory from modularodm import Q from nose.tools import * from w...
<commit_before><commit_msg>Add migration script for changing users with None as email_verifications to {}<commit_after>""" Ensure that users with User.email_verifications == None now have {} instead """ import logging import sys from tests.base import OsfTestCase from tests.factories import UserFactory from modularodm...
4c8ea40eeec6df07cf8721c256ad8cc3d35fb23e
src/test_main.py
src/test_main.py
import pytest from main import * test_files = [ "examples/C/filenames/script", "examples/Clojure/index.cljs.hl", "examples/Chapel/lulesh.chpl", "examples/Forth/core.fth", "examples/GAP/Magic.gd", "examples/JavaScript/steelseries-min.js", "examples/Matlab/FTLE_reg.m", ...
Add intial unit test file
Add intial unit test file Currently just tests the two primary functions, the results are a bit brittle but that will allow us to detect regressions for future work.
Python
mit
masterkoppa/whatodo
Add intial unit test file Currently just tests the two primary functions, the results are a bit brittle but that will allow us to detect regressions for future work.
import pytest from main import * test_files = [ "examples/C/filenames/script", "examples/Clojure/index.cljs.hl", "examples/Chapel/lulesh.chpl", "examples/Forth/core.fth", "examples/GAP/Magic.gd", "examples/JavaScript/steelseries-min.js", "examples/Matlab/FTLE_reg.m", ...
<commit_before><commit_msg>Add intial unit test file Currently just tests the two primary functions, the results are a bit brittle but that will allow us to detect regressions for future work.<commit_after>
import pytest from main import * test_files = [ "examples/C/filenames/script", "examples/Clojure/index.cljs.hl", "examples/Chapel/lulesh.chpl", "examples/Forth/core.fth", "examples/GAP/Magic.gd", "examples/JavaScript/steelseries-min.js", "examples/Matlab/FTLE_reg.m", ...
Add intial unit test file Currently just tests the two primary functions, the results are a bit brittle but that will allow us to detect regressions for future work.import pytest from main import * test_files = [ "examples/C/filenames/script", "examples/Clojure/index.cljs.hl", "examples/Chapel/lules...
<commit_before><commit_msg>Add intial unit test file Currently just tests the two primary functions, the results are a bit brittle but that will allow us to detect regressions for future work.<commit_after>import pytest from main import * test_files = [ "examples/C/filenames/script", "examples/Clojure/index.cljs.hl"...
4a179825234b711a729fce5bc9ffc8de029c0999
utest/controller/test_loading.py
utest/controller/test_loading.py
import unittest from robot.utils.asserts import assert_true, assert_raises from robotide.application.chiefcontroller import ChiefController from robotide.namespace import Namespace from resources import MINIMAL_SUITE_PATH, RESOURCE_PATH from robot.errors import DataError class _FakeObserver(object): def notify...
import unittest from robot.utils.asserts import assert_true, assert_raises, assert_raises_with_msg from robotide.controller import ChiefController from robotide.namespace import Namespace from resources import MINIMAL_SUITE_PATH, RESOURCE_PATH, FakeLoadObserver from robot.errors import DataError class TestDataLoadi...
Test for invalid data when loading
Test for invalid data when loading
Python
apache-2.0
robotframework/RIDE,robotframework/RIDE,HelioGuilherme66/RIDE,HelioGuilherme66/RIDE,caio2k/RIDE,robotframework/RIDE,HelioGuilherme66/RIDE,robotframework/RIDE,HelioGuilherme66/RIDE,fingeronthebutton/RIDE,fingeronthebutton/RIDE,fingeronthebutton/RIDE,caio2k/RIDE,caio2k/RIDE
import unittest from robot.utils.asserts import assert_true, assert_raises from robotide.application.chiefcontroller import ChiefController from robotide.namespace import Namespace from resources import MINIMAL_SUITE_PATH, RESOURCE_PATH from robot.errors import DataError class _FakeObserver(object): def notify...
import unittest from robot.utils.asserts import assert_true, assert_raises, assert_raises_with_msg from robotide.controller import ChiefController from robotide.namespace import Namespace from resources import MINIMAL_SUITE_PATH, RESOURCE_PATH, FakeLoadObserver from robot.errors import DataError class TestDataLoadi...
<commit_before>import unittest from robot.utils.asserts import assert_true, assert_raises from robotide.application.chiefcontroller import ChiefController from robotide.namespace import Namespace from resources import MINIMAL_SUITE_PATH, RESOURCE_PATH from robot.errors import DataError class _FakeObserver(object): ...
import unittest from robot.utils.asserts import assert_true, assert_raises, assert_raises_with_msg from robotide.controller import ChiefController from robotide.namespace import Namespace from resources import MINIMAL_SUITE_PATH, RESOURCE_PATH, FakeLoadObserver from robot.errors import DataError class TestDataLoadi...
import unittest from robot.utils.asserts import assert_true, assert_raises from robotide.application.chiefcontroller import ChiefController from robotide.namespace import Namespace from resources import MINIMAL_SUITE_PATH, RESOURCE_PATH from robot.errors import DataError class _FakeObserver(object): def notify...
<commit_before>import unittest from robot.utils.asserts import assert_true, assert_raises from robotide.application.chiefcontroller import ChiefController from robotide.namespace import Namespace from resources import MINIMAL_SUITE_PATH, RESOURCE_PATH from robot.errors import DataError class _FakeObserver(object): ...
0e6a7a805ff08f191c88bda67992cb874f538c2f
services/migrations/0097_alter_unitconnection_section_type.py
services/migrations/0097_alter_unitconnection_section_type.py
# Generated by Django 4.0.5 on 2022-06-22 05:40 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ("services", "0096_create_syllables_fi_columns"), ] operations = [ migrations.AlterField( model_name="unitconnection", ...
Add migration for unitconnection section types
Add migration for unitconnection section types
Python
agpl-3.0
City-of-Helsinki/smbackend,City-of-Helsinki/smbackend
Add migration for unitconnection section types
# Generated by Django 4.0.5 on 2022-06-22 05:40 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ("services", "0096_create_syllables_fi_columns"), ] operations = [ migrations.AlterField( model_name="unitconnection", ...
<commit_before><commit_msg>Add migration for unitconnection section types<commit_after>
# Generated by Django 4.0.5 on 2022-06-22 05:40 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ("services", "0096_create_syllables_fi_columns"), ] operations = [ migrations.AlterField( model_name="unitconnection", ...
Add migration for unitconnection section types# Generated by Django 4.0.5 on 2022-06-22 05:40 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ("services", "0096_create_syllables_fi_columns"), ] operations = [ migrations.AlterField( ...
<commit_before><commit_msg>Add migration for unitconnection section types<commit_after># Generated by Django 4.0.5 on 2022-06-22 05:40 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ("services", "0096_create_syllables_fi_columns"), ] operations ...
5e49eb4fb6bce9cdeae515590530b78e4dde89d9
doc/examples/plot_match_face_template.py
doc/examples/plot_match_face_template.py
""" ================= Template Matching ================= In this example, we use template matching to identify the occurrence of an image patch (in this case, a sub-image centered on the camera man's head). Since there's only a single match, the maximum value in the `match_template` result` corresponds to the head lo...
Add alternate example for `match_template`.
Add alternate example for `match_template`.
Python
bsd-3-clause
emmanuelle/scikits.image,warmspringwinds/scikit-image,bennlich/scikit-image,rjeli/scikit-image,ofgulban/scikit-image,GaZ3ll3/scikit-image,rjeli/scikit-image,ClinicalGraphics/scikit-image,dpshelio/scikit-image,pratapvardhan/scikit-image,michaelpacer/scikit-image,chintak/scikit-image,michaelaye/scikit-image,chintak/sciki...
Add alternate example for `match_template`.
""" ================= Template Matching ================= In this example, we use template matching to identify the occurrence of an image patch (in this case, a sub-image centered on the camera man's head). Since there's only a single match, the maximum value in the `match_template` result` corresponds to the head lo...
<commit_before><commit_msg>Add alternate example for `match_template`.<commit_after>
""" ================= Template Matching ================= In this example, we use template matching to identify the occurrence of an image patch (in this case, a sub-image centered on the camera man's head). Since there's only a single match, the maximum value in the `match_template` result` corresponds to the head lo...
Add alternate example for `match_template`.""" ================= Template Matching ================= In this example, we use template matching to identify the occurrence of an image patch (in this case, a sub-image centered on the camera man's head). Since there's only a single match, the maximum value in the `match_t...
<commit_before><commit_msg>Add alternate example for `match_template`.<commit_after>""" ================= Template Matching ================= In this example, we use template matching to identify the occurrence of an image patch (in this case, a sub-image centered on the camera man's head). Since there's only a single...
edc5116472c49370e5bf3ff7f9f7872732b0285e
phone_numbers.py
phone_numbers.py
#!/usr/bin/env python import unittest words = set(["dog", "clog", "cat", "mouse", "rat", "can", "fig", "dig", "mud", "a", "an", "duh", "sin", "get", "shit", "done", "all", "glory", "comes", "from", "daring", "to", "begin", ]) dialmap = { 'a':2, 'b':2, 'c':2, 'd':3, 'e':...
Add a solution to the phone number problem: can a phone number be represented as words in a dictionary?
Add a solution to the phone number problem: can a phone number be represented as words in a dictionary?
Python
apache-2.0
aww/cs_practice
Add a solution to the phone number problem: can a phone number be represented as words in a dictionary?
#!/usr/bin/env python import unittest words = set(["dog", "clog", "cat", "mouse", "rat", "can", "fig", "dig", "mud", "a", "an", "duh", "sin", "get", "shit", "done", "all", "glory", "comes", "from", "daring", "to", "begin", ]) dialmap = { 'a':2, 'b':2, 'c':2, 'd':3, 'e':...
<commit_before><commit_msg>Add a solution to the phone number problem: can a phone number be represented as words in a dictionary?<commit_after>
#!/usr/bin/env python import unittest words = set(["dog", "clog", "cat", "mouse", "rat", "can", "fig", "dig", "mud", "a", "an", "duh", "sin", "get", "shit", "done", "all", "glory", "comes", "from", "daring", "to", "begin", ]) dialmap = { 'a':2, 'b':2, 'c':2, 'd':3, 'e':...
Add a solution to the phone number problem: can a phone number be represented as words in a dictionary?#!/usr/bin/env python import unittest words = set(["dog", "clog", "cat", "mouse", "rat", "can", "fig", "dig", "mud", "a", "an", "duh", "sin", "get", "shit", "done", "all", "glory", "comes",...
<commit_before><commit_msg>Add a solution to the phone number problem: can a phone number be represented as words in a dictionary?<commit_after>#!/usr/bin/env python import unittest words = set(["dog", "clog", "cat", "mouse", "rat", "can", "fig", "dig", "mud", "a", "an", "duh", "sin", "get",...
86baa4f437cf3892c15a56e8331c19b6d2e63b1d
lib/gen-names.py
lib/gen-names.py
#!/usr/bin/python3 # Input: https://www.unicode.org/Public/UNIDATA/UnicodeData.txt import io import re class Builder(object): def __init__(self): pass def read(self, infile): names = [] for line in infile: if line.startswith('#'): continue line...
Add a script for generating unicode name table
lib: Add a script for generating unicode name table GLib doesn't have a way to get unicode char names, so we'll have to reimplement this.
Python
bsd-3-clause
GNOME/gnome-characters,GNOME/gnome-characters,GNOME/gnome-characters,GNOME/gnome-characters,GNOME/gnome-characters
lib: Add a script for generating unicode name table GLib doesn't have a way to get unicode char names, so we'll have to reimplement this.
#!/usr/bin/python3 # Input: https://www.unicode.org/Public/UNIDATA/UnicodeData.txt import io import re class Builder(object): def __init__(self): pass def read(self, infile): names = [] for line in infile: if line.startswith('#'): continue line...
<commit_before><commit_msg>lib: Add a script for generating unicode name table GLib doesn't have a way to get unicode char names, so we'll have to reimplement this.<commit_after>
#!/usr/bin/python3 # Input: https://www.unicode.org/Public/UNIDATA/UnicodeData.txt import io import re class Builder(object): def __init__(self): pass def read(self, infile): names = [] for line in infile: if line.startswith('#'): continue line...
lib: Add a script for generating unicode name table GLib doesn't have a way to get unicode char names, so we'll have to reimplement this.#!/usr/bin/python3 # Input: https://www.unicode.org/Public/UNIDATA/UnicodeData.txt import io import re class Builder(object): def __init__(self): pass def read(se...
<commit_before><commit_msg>lib: Add a script for generating unicode name table GLib doesn't have a way to get unicode char names, so we'll have to reimplement this.<commit_after>#!/usr/bin/python3 # Input: https://www.unicode.org/Public/UNIDATA/UnicodeData.txt import io import re class Builder(object): def __in...
3ba109622c24bd52f32e605c523249e1c26b0207
spacy/tests/regression/test_issue834.py
spacy/tests/regression/test_issue834.py
# coding: utf-8 from io import StringIO word2vec_str = """, -0.046107 -0.035951 -0.560418 de -0.648927 -0.400976 -0.527124 . 0.113685 0.439990 -0.634510   -1.499184 -0.184280 -0.598371""" def test_issue834(en_vocab): f = StringIO(word2vec_str) vector_length = en_vocab.load_vectors(f) assert vector_lengt...
Add regression test with non ' ' space character as token
Add regression test with non ' ' space character as token
Python
mit
banglakit/spaCy,banglakit/spaCy,explosion/spaCy,Gregory-Howard/spaCy,Gregory-Howard/spaCy,raphael0202/spaCy,banglakit/spaCy,banglakit/spaCy,oroszgy/spaCy.hu,explosion/spaCy,recognai/spaCy,explosion/spaCy,oroszgy/spaCy.hu,explosion/spaCy,Gregory-Howard/spaCy,oroszgy/spaCy.hu,explosion/spaCy,banglakit/spaCy,recognai/spaC...
Add regression test with non ' ' space character as token
# coding: utf-8 from io import StringIO word2vec_str = """, -0.046107 -0.035951 -0.560418 de -0.648927 -0.400976 -0.527124 . 0.113685 0.439990 -0.634510   -1.499184 -0.184280 -0.598371""" def test_issue834(en_vocab): f = StringIO(word2vec_str) vector_length = en_vocab.load_vectors(f) assert vector_lengt...
<commit_before><commit_msg>Add regression test with non ' ' space character as token<commit_after>
# coding: utf-8 from io import StringIO word2vec_str = """, -0.046107 -0.035951 -0.560418 de -0.648927 -0.400976 -0.527124 . 0.113685 0.439990 -0.634510   -1.499184 -0.184280 -0.598371""" def test_issue834(en_vocab): f = StringIO(word2vec_str) vector_length = en_vocab.load_vectors(f) assert vector_lengt...
Add regression test with non ' ' space character as token# coding: utf-8 from io import StringIO word2vec_str = """, -0.046107 -0.035951 -0.560418 de -0.648927 -0.400976 -0.527124 . 0.113685 0.439990 -0.634510   -1.499184 -0.184280 -0.598371""" def test_issue834(en_vocab): f = StringIO(word2vec_str) vector_...
<commit_before><commit_msg>Add regression test with non ' ' space character as token<commit_after># coding: utf-8 from io import StringIO word2vec_str = """, -0.046107 -0.035951 -0.560418 de -0.648927 -0.400976 -0.527124 . 0.113685 0.439990 -0.634510   -1.499184 -0.184280 -0.598371""" def test_issue834(en_vocab): ...