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
f51c52b612e09c2ed6738bf234dbf4da9986b332
moduleManager.py
moduleManager.py
from glob import glob import importlib class ModuleManager: def __init__(self): self.availableNodes = {} # Import all builtin modules first modpaths = glob("modules/*.py") for modpath in modpaths: newmod = importlib.import_module("modules." + modpath[8:-3]) ...
Move module manager to own module
Move module manager to own module
Python
mit
DrLuke/gpnshader
Move module manager to own module
from glob import glob import importlib class ModuleManager: def __init__(self): self.availableNodes = {} # Import all builtin modules first modpaths = glob("modules/*.py") for modpath in modpaths: newmod = importlib.import_module("modules." + modpath[8:-3]) ...
<commit_before><commit_msg>Move module manager to own module<commit_after>
from glob import glob import importlib class ModuleManager: def __init__(self): self.availableNodes = {} # Import all builtin modules first modpaths = glob("modules/*.py") for modpath in modpaths: newmod = importlib.import_module("modules." + modpath[8:-3]) ...
Move module manager to own modulefrom glob import glob import importlib class ModuleManager: def __init__(self): self.availableNodes = {} # Import all builtin modules first modpaths = glob("modules/*.py") for modpath in modpaths: newmod = importlib.import_module("modul...
<commit_before><commit_msg>Move module manager to own module<commit_after>from glob import glob import importlib class ModuleManager: def __init__(self): self.availableNodes = {} # Import all builtin modules first modpaths = glob("modules/*.py") for modpath in modpaths: ...
a772e7cbc6597585408daab1cb2b00c1d397aa3c
CodeFights/efficientComparison.py
CodeFights/efficientComparison.py
#!/usr/local/bin/python # Code Fights Efficient Comparison Problem import time def main(): x, y, L, R = 9, 9, 1, 10000 print("Procedure 1") t1 = time.clock() procedure1(x, y, L, R) print(time.clock() - t1) print("Procedure 2") t2 = time.clock() procedure2(x, y, L, R) print(time.c...
Solve Code Fights efficient comparison problem
Solve Code Fights efficient comparison problem
Python
mit
HKuz/Test_Code
Solve Code Fights efficient comparison problem
#!/usr/local/bin/python # Code Fights Efficient Comparison Problem import time def main(): x, y, L, R = 9, 9, 1, 10000 print("Procedure 1") t1 = time.clock() procedure1(x, y, L, R) print(time.clock() - t1) print("Procedure 2") t2 = time.clock() procedure2(x, y, L, R) print(time.c...
<commit_before><commit_msg>Solve Code Fights efficient comparison problem<commit_after>
#!/usr/local/bin/python # Code Fights Efficient Comparison Problem import time def main(): x, y, L, R = 9, 9, 1, 10000 print("Procedure 1") t1 = time.clock() procedure1(x, y, L, R) print(time.clock() - t1) print("Procedure 2") t2 = time.clock() procedure2(x, y, L, R) print(time.c...
Solve Code Fights efficient comparison problem#!/usr/local/bin/python # Code Fights Efficient Comparison Problem import time def main(): x, y, L, R = 9, 9, 1, 10000 print("Procedure 1") t1 = time.clock() procedure1(x, y, L, R) print(time.clock() - t1) print("Procedure 2") t2 = time.clock...
<commit_before><commit_msg>Solve Code Fights efficient comparison problem<commit_after>#!/usr/local/bin/python # Code Fights Efficient Comparison Problem import time def main(): x, y, L, R = 9, 9, 1, 10000 print("Procedure 1") t1 = time.clock() procedure1(x, y, L, R) print(time.clock() - t1) ...
0d176a318fcc3a1206919935d3a257d0606fb49b
tools/validate_cli_serial.py
tools/validate_cli_serial.py
#!/bin/python2 # Copyright (C) 2021 OpenMotics BV # # 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 Foundation, either version 3 of the # License, or (at your option) any later version. # # This prog...
Add script to validate CLI communications
Add script to validate CLI communications
Python
agpl-3.0
openmotics/gateway,openmotics/gateway
Add script to validate CLI communications
#!/bin/python2 # Copyright (C) 2021 OpenMotics BV # # 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 Foundation, either version 3 of the # License, or (at your option) any later version. # # This prog...
<commit_before><commit_msg>Add script to validate CLI communications<commit_after>
#!/bin/python2 # Copyright (C) 2021 OpenMotics BV # # 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 Foundation, either version 3 of the # License, or (at your option) any later version. # # This prog...
Add script to validate CLI communications#!/bin/python2 # Copyright (C) 2021 OpenMotics BV # # 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 Foundation, either version 3 of the # License, or (at your...
<commit_before><commit_msg>Add script to validate CLI communications<commit_after>#!/bin/python2 # Copyright (C) 2021 OpenMotics BV # # 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 Foundation, eithe...
cf2a110cc9f71fa7555d212de86e5c67d6095ae3
CodeFights/calkinWilfSequence.py
CodeFights/calkinWilfSequence.py
#!/usr/local/bin/python # Code Fights Calkin Wilf Problem def calkinWilfSequence(number): def fractions(): cur = (1, 1) while True: yield list(cur) cur = (cur[1], (2 * int(cur[0] / cur[1]) + 1) * cur[1] - cur[0]) gen = fractions() res = 0 whi...
Solve Code Fights calkin wilf sequence problem
Solve Code Fights calkin wilf sequence problem
Python
mit
HKuz/Test_Code
Solve Code Fights calkin wilf sequence problem
#!/usr/local/bin/python # Code Fights Calkin Wilf Problem def calkinWilfSequence(number): def fractions(): cur = (1, 1) while True: yield list(cur) cur = (cur[1], (2 * int(cur[0] / cur[1]) + 1) * cur[1] - cur[0]) gen = fractions() res = 0 whi...
<commit_before><commit_msg>Solve Code Fights calkin wilf sequence problem<commit_after>
#!/usr/local/bin/python # Code Fights Calkin Wilf Problem def calkinWilfSequence(number): def fractions(): cur = (1, 1) while True: yield list(cur) cur = (cur[1], (2 * int(cur[0] / cur[1]) + 1) * cur[1] - cur[0]) gen = fractions() res = 0 whi...
Solve Code Fights calkin wilf sequence problem#!/usr/local/bin/python # Code Fights Calkin Wilf Problem def calkinWilfSequence(number): def fractions(): cur = (1, 1) while True: yield list(cur) cur = (cur[1], (2 * int(cur[0] / cur[1]) + 1) * cur[1] - cur[...
<commit_before><commit_msg>Solve Code Fights calkin wilf sequence problem<commit_after>#!/usr/local/bin/python # Code Fights Calkin Wilf Problem def calkinWilfSequence(number): def fractions(): cur = (1, 1) while True: yield list(cur) cur = (cur[1], (2 * int(cur[0] / cur[1]...
4042faa044dc051f38f473c1199b253ddd7b0b7a
dataset_collection.py
dataset_collection.py
from app import db from app import Text from sklearn.externals import joblib import gc #Train Data Set training_collection = Text.query.filter_by(data_set = "train").all() training_targets = [] training_text_collection = [] gc.disable() for text in training_collection: training_targets.append(text.period_start_ye...
Create training and testing text and target pickle files
Create training and testing text and target pickle files
Python
mit
npentella/CuriousCorpus,npentella/CuriousCorpus,npentella/CuriousCorpus
Create training and testing text and target pickle files
from app import db from app import Text from sklearn.externals import joblib import gc #Train Data Set training_collection = Text.query.filter_by(data_set = "train").all() training_targets = [] training_text_collection = [] gc.disable() for text in training_collection: training_targets.append(text.period_start_ye...
<commit_before><commit_msg>Create training and testing text and target pickle files<commit_after>
from app import db from app import Text from sklearn.externals import joblib import gc #Train Data Set training_collection = Text.query.filter_by(data_set = "train").all() training_targets = [] training_text_collection = [] gc.disable() for text in training_collection: training_targets.append(text.period_start_ye...
Create training and testing text and target pickle filesfrom app import db from app import Text from sklearn.externals import joblib import gc #Train Data Set training_collection = Text.query.filter_by(data_set = "train").all() training_targets = [] training_text_collection = [] gc.disable() for text in training_co...
<commit_before><commit_msg>Create training and testing text and target pickle files<commit_after>from app import db from app import Text from sklearn.externals import joblib import gc #Train Data Set training_collection = Text.query.filter_by(data_set = "train").all() training_targets = [] training_text_collection = ...
0c22dfc65c4d6188c2d1fa127d357945914aa100
biolib/src/test/cafparser_test.py
biolib/src/test/cafparser_test.py
''' Created on 2009 mar 11 @author: peio ''' import unittest from biolib.cafparser import CafFile class Test(unittest.TestCase): ''' It tests ''' def setUp(self): self._file2test = '/home/peio/eucalyptus_out.caf' def test_caf_parser(self): ''' It tests if we can create and caf fil...
Add three test to check the module
Add three test to check the module
Python
agpl-3.0
JoseBlanca/franklin,JoseBlanca/franklin
Add three test to check the module
''' Created on 2009 mar 11 @author: peio ''' import unittest from biolib.cafparser import CafFile class Test(unittest.TestCase): ''' It tests ''' def setUp(self): self._file2test = '/home/peio/eucalyptus_out.caf' def test_caf_parser(self): ''' It tests if we can create and caf fil...
<commit_before><commit_msg>Add three test to check the module<commit_after>
''' Created on 2009 mar 11 @author: peio ''' import unittest from biolib.cafparser import CafFile class Test(unittest.TestCase): ''' It tests ''' def setUp(self): self._file2test = '/home/peio/eucalyptus_out.caf' def test_caf_parser(self): ''' It tests if we can create and caf fil...
Add three test to check the module''' Created on 2009 mar 11 @author: peio ''' import unittest from biolib.cafparser import CafFile class Test(unittest.TestCase): ''' It tests ''' def setUp(self): self._file2test = '/home/peio/eucalyptus_out.caf' def test_caf_parser(self): ''' It ...
<commit_before><commit_msg>Add three test to check the module<commit_after>''' Created on 2009 mar 11 @author: peio ''' import unittest from biolib.cafparser import CafFile class Test(unittest.TestCase): ''' It tests ''' def setUp(self): self._file2test = '/home/peio/eucalyptus_out.caf' d...
5d1ca10b9e33e8e37e08de5233a8fb143c99936b
spikes_to_mat.py
spikes_to_mat.py
import click import numpy as np from scipy import stats import scipy.io as sio from scipy.special import expit from spikes_activity_generator import generate_spikes, spike_and_slab @click.command() @click.option('--num_neurons', type=click.INT, default=10, help='number of neurons in the ne...
Add file to save activity and connectivity matrices to a matlab file
Add file to save activity and connectivity matrices to a matlab file
Python
mit
noashin/kinetic_ising_model_neurons
Add file to save activity and connectivity matrices to a matlab file
import click import numpy as np from scipy import stats import scipy.io as sio from scipy.special import expit from spikes_activity_generator import generate_spikes, spike_and_slab @click.command() @click.option('--num_neurons', type=click.INT, default=10, help='number of neurons in the ne...
<commit_before><commit_msg>Add file to save activity and connectivity matrices to a matlab file<commit_after>
import click import numpy as np from scipy import stats import scipy.io as sio from scipy.special import expit from spikes_activity_generator import generate_spikes, spike_and_slab @click.command() @click.option('--num_neurons', type=click.INT, default=10, help='number of neurons in the ne...
Add file to save activity and connectivity matrices to a matlab fileimport click import numpy as np from scipy import stats import scipy.io as sio from scipy.special import expit from spikes_activity_generator import generate_spikes, spike_and_slab @click.command() @click.option('--num_neurons', type=click.INT, ...
<commit_before><commit_msg>Add file to save activity and connectivity matrices to a matlab file<commit_after>import click import numpy as np from scipy import stats import scipy.io as sio from scipy.special import expit from spikes_activity_generator import generate_spikes, spike_and_slab @click.command() @click.opti...
d4e7571b1d361a9d24650a74fffbc1980c2bbc70
blaze/compute/air/frontend/ckernel_impls.py
blaze/compute/air/frontend/ckernel_impls.py
""" Lift ckernels to their appropriate rank so they always consume the full array arguments. """ from __future__ import absolute_import, division, print_function import datashape from pykit.ir import transform, Op #------------------------------------------------------------------------ # Run #----------------------...
""" Lift ckernels to their appropriate rank so they always consume the full array arguments. """ from __future__ import absolute_import, division, print_function import datashape from pykit.ir import transform, Op #------------------------------------------------------------------------ # Run #----------------------...
Remove redundant 'ckernel' overload match
Remove redundant 'ckernel' overload match
Python
bsd-3-clause
jdmcbr/blaze,alexmojaki/blaze,FrancescAlted/blaze,aterrel/blaze,xlhtc007/blaze,mwiebe/blaze,cowlicks/blaze,ChinaQuants/blaze,mwiebe/blaze,mwiebe/blaze,LiaoPan/blaze,xlhtc007/blaze,dwillmer/blaze,FrancescAlted/blaze,scls19fr/blaze,cpcloud/blaze,scls19fr/blaze,caseyclements/blaze,mrocklin/blaze,FrancescAlted/blaze,Contin...
""" Lift ckernels to their appropriate rank so they always consume the full array arguments. """ from __future__ import absolute_import, division, print_function import datashape from pykit.ir import transform, Op #------------------------------------------------------------------------ # Run #----------------------...
""" Lift ckernels to their appropriate rank so they always consume the full array arguments. """ from __future__ import absolute_import, division, print_function import datashape from pykit.ir import transform, Op #------------------------------------------------------------------------ # Run #----------------------...
<commit_before>""" Lift ckernels to their appropriate rank so they always consume the full array arguments. """ from __future__ import absolute_import, division, print_function import datashape from pykit.ir import transform, Op #------------------------------------------------------------------------ # Run #-------...
""" Lift ckernels to their appropriate rank so they always consume the full array arguments. """ from __future__ import absolute_import, division, print_function import datashape from pykit.ir import transform, Op #------------------------------------------------------------------------ # Run #----------------------...
""" Lift ckernels to their appropriate rank so they always consume the full array arguments. """ from __future__ import absolute_import, division, print_function import datashape from pykit.ir import transform, Op #------------------------------------------------------------------------ # Run #----------------------...
<commit_before>""" Lift ckernels to their appropriate rank so they always consume the full array arguments. """ from __future__ import absolute_import, division, print_function import datashape from pykit.ir import transform, Op #------------------------------------------------------------------------ # Run #-------...
f623775309c75cd0742b03df4ff4759efee4470d
Code/Python/Kamaelia/Test/Internet/test_MulticastTransceiverSystem.py
Code/Python/Kamaelia/Test/Internet/test_MulticastTransceiverSystem.py
#!/usr/bin/python # # Basic acceptance test harness for the Multicast_sender and receiver # components. # import socket import Axon def tests(): from Axon.Scheduler import scheduler from Kamaelia.Util.ConsoleEcho import consoleEchoer from Kamaelia.Util.Chargen import Chargen from Kamaelia.Internet.Multic...
Test harness for the multicast transceiver.
Test harness for the multicast transceiver. Michael.
Python
apache-2.0
sparkslabs/kamaelia,sparkslabs/kamaelia,sparkslabs/kamaelia,sparkslabs/kamaelia,sparkslabs/kamaelia,sparkslabs/kamaelia,sparkslabs/kamaelia,sparkslabs/kamaelia,sparkslabs/kamaelia,sparkslabs/kamaelia
Test harness for the multicast transceiver. Michael.
#!/usr/bin/python # # Basic acceptance test harness for the Multicast_sender and receiver # components. # import socket import Axon def tests(): from Axon.Scheduler import scheduler from Kamaelia.Util.ConsoleEcho import consoleEchoer from Kamaelia.Util.Chargen import Chargen from Kamaelia.Internet.Multic...
<commit_before><commit_msg>Test harness for the multicast transceiver. Michael.<commit_after>
#!/usr/bin/python # # Basic acceptance test harness for the Multicast_sender and receiver # components. # import socket import Axon def tests(): from Axon.Scheduler import scheduler from Kamaelia.Util.ConsoleEcho import consoleEchoer from Kamaelia.Util.Chargen import Chargen from Kamaelia.Internet.Multic...
Test harness for the multicast transceiver. Michael.#!/usr/bin/python # # Basic acceptance test harness for the Multicast_sender and receiver # components. # import socket import Axon def tests(): from Axon.Scheduler import scheduler from Kamaelia.Util.ConsoleEcho import consoleEchoer from Kamaelia.Util.Ch...
<commit_before><commit_msg>Test harness for the multicast transceiver. Michael.<commit_after>#!/usr/bin/python # # Basic acceptance test harness for the Multicast_sender and receiver # components. # import socket import Axon def tests(): from Axon.Scheduler import scheduler from Kamaelia.Util.ConsoleEcho impo...
74103c1af330221cfa668eb2496ab99b49775e7c
storyboard/db/migration/alembic_migrations/versions/040_create_accesstoken_index.py
storyboard/db/migration/alembic_migrations/versions/040_create_accesstoken_index.py
# Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the Li...
Add an index on accesstokens table for access_token column
Add an index on accesstokens table for access_token column Performance improvement tweak for retrieving and validating access_tokens. Change-Id: I96a81902d607cc3a3bbb20e71df5f87ff544406e Story: 2000165
Python
apache-2.0
ColdrickSotK/storyboard,ColdrickSotK/storyboard,ColdrickSotK/storyboard
Add an index on accesstokens table for access_token column Performance improvement tweak for retrieving and validating access_tokens. Change-Id: I96a81902d607cc3a3bbb20e71df5f87ff544406e Story: 2000165
# Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the Li...
<commit_before><commit_msg>Add an index on accesstokens table for access_token column Performance improvement tweak for retrieving and validating access_tokens. Change-Id: I96a81902d607cc3a3bbb20e71df5f87ff544406e Story: 2000165<commit_after>
# Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the Li...
Add an index on accesstokens table for access_token column Performance improvement tweak for retrieving and validating access_tokens. Change-Id: I96a81902d607cc3a3bbb20e71df5f87ff544406e Story: 2000165# Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance wi...
<commit_before><commit_msg>Add an index on accesstokens table for access_token column Performance improvement tweak for retrieving and validating access_tokens. Change-Id: I96a81902d607cc3a3bbb20e71df5f87ff544406e Story: 2000165<commit_after># Licensed under the Apache License, Version 2.0 (the "License"); you may # ...
ac8e94368b86d406811016233a4c0f0b47cf87e9
IMAP/move_imap.py
IMAP/move_imap.py
import imaplib, getpass, re pattern_uid = re.compile('\d+ \(UID (?P<uid>\d+)\)') def connect(email): imap = imaplib.IMAP4_SSL("imap.gmail.com") password = getpass.getpass("Enter your password: ") imap.login(email, password) return imap def disconnect(imap): imap.logout() def parse_uid(data): ...
Add script to move mail in imap folder
Add script to move mail in imap folder
Python
agpl-3.0
Micronaet/micronaet-script,Micronaet/micronaet-script
Add script to move mail in imap folder
import imaplib, getpass, re pattern_uid = re.compile('\d+ \(UID (?P<uid>\d+)\)') def connect(email): imap = imaplib.IMAP4_SSL("imap.gmail.com") password = getpass.getpass("Enter your password: ") imap.login(email, password) return imap def disconnect(imap): imap.logout() def parse_uid(data): ...
<commit_before><commit_msg>Add script to move mail in imap folder<commit_after>
import imaplib, getpass, re pattern_uid = re.compile('\d+ \(UID (?P<uid>\d+)\)') def connect(email): imap = imaplib.IMAP4_SSL("imap.gmail.com") password = getpass.getpass("Enter your password: ") imap.login(email, password) return imap def disconnect(imap): imap.logout() def parse_uid(data): ...
Add script to move mail in imap folderimport imaplib, getpass, re pattern_uid = re.compile('\d+ \(UID (?P<uid>\d+)\)') def connect(email): imap = imaplib.IMAP4_SSL("imap.gmail.com") password = getpass.getpass("Enter your password: ") imap.login(email, password) return imap def disconnect(imap): im...
<commit_before><commit_msg>Add script to move mail in imap folder<commit_after>import imaplib, getpass, re pattern_uid = re.compile('\d+ \(UID (?P<uid>\d+)\)') def connect(email): imap = imaplib.IMAP4_SSL("imap.gmail.com") password = getpass.getpass("Enter your password: ") imap.login(email, password) ...
db29615f7de3fb809e9fd78f43b6d3a61452623d
14B-088/HI/imaging/deproj_cube.py
14B-088/HI/imaging/deproj_cube.py
''' Create a deprojected cube in M33's frame ''' from spectral_cube import SpectralCube from astropy.io import fits import numpy as np import os import astropy.units as u from radio_beam import Beam from cube_analysis.cube_deproject import deproject_cube from paths import (fourteenB_wGBT_HI_file_dict, allfigs_path,...
Add script to make a deprojected cube
Add script to make a deprojected cube
Python
mit
e-koch/VLA_Lband,e-koch/VLA_Lband
Add script to make a deprojected cube
''' Create a deprojected cube in M33's frame ''' from spectral_cube import SpectralCube from astropy.io import fits import numpy as np import os import astropy.units as u from radio_beam import Beam from cube_analysis.cube_deproject import deproject_cube from paths import (fourteenB_wGBT_HI_file_dict, allfigs_path,...
<commit_before><commit_msg>Add script to make a deprojected cube<commit_after>
''' Create a deprojected cube in M33's frame ''' from spectral_cube import SpectralCube from astropy.io import fits import numpy as np import os import astropy.units as u from radio_beam import Beam from cube_analysis.cube_deproject import deproject_cube from paths import (fourteenB_wGBT_HI_file_dict, allfigs_path,...
Add script to make a deprojected cube ''' Create a deprojected cube in M33's frame ''' from spectral_cube import SpectralCube from astropy.io import fits import numpy as np import os import astropy.units as u from radio_beam import Beam from cube_analysis.cube_deproject import deproject_cube from paths import (fourt...
<commit_before><commit_msg>Add script to make a deprojected cube<commit_after> ''' Create a deprojected cube in M33's frame ''' from spectral_cube import SpectralCube from astropy.io import fits import numpy as np import os import astropy.units as u from radio_beam import Beam from cube_analysis.cube_deproject import...
d55c23575bd247affcb200e3d835fe74fcf1fd54
web/web/settings/arnes.py
web/web/settings/arnes.py
from common import * SECRET_KEY = os.environ['SECRET_KEY'] DEBUG = False TEMPLATE_DEBUG = False ALLOWED_HOSTS = ['tomo.arnes.si'] WSGI_APPLICATION = 'web.wsgi.dev.application' DATABASES = { 'default': { 'ENGINE': 'django.db.backends.postgresql_psycopg2', 'NAME': 'tomo', 'USER': 'tomo', ...
Add settings for ARNES Tomo instance
Add settings for ARNES Tomo instance
Python
agpl-3.0
matijapretnar/projekt-tomo,ul-fmf/projekt-tomo,ul-fmf/projekt-tomo,ul-fmf/projekt-tomo,ul-fmf/projekt-tomo,ul-fmf/projekt-tomo,matijapretnar/projekt-tomo,matijapretnar/projekt-tomo,ul-fmf/projekt-tomo,matijapretnar/projekt-tomo,matijapretnar/projekt-tomo
Add settings for ARNES Tomo instance
from common import * SECRET_KEY = os.environ['SECRET_KEY'] DEBUG = False TEMPLATE_DEBUG = False ALLOWED_HOSTS = ['tomo.arnes.si'] WSGI_APPLICATION = 'web.wsgi.dev.application' DATABASES = { 'default': { 'ENGINE': 'django.db.backends.postgresql_psycopg2', 'NAME': 'tomo', 'USER': 'tomo', ...
<commit_before><commit_msg>Add settings for ARNES Tomo instance<commit_after>
from common import * SECRET_KEY = os.environ['SECRET_KEY'] DEBUG = False TEMPLATE_DEBUG = False ALLOWED_HOSTS = ['tomo.arnes.si'] WSGI_APPLICATION = 'web.wsgi.dev.application' DATABASES = { 'default': { 'ENGINE': 'django.db.backends.postgresql_psycopg2', 'NAME': 'tomo', 'USER': 'tomo', ...
Add settings for ARNES Tomo instancefrom common import * SECRET_KEY = os.environ['SECRET_KEY'] DEBUG = False TEMPLATE_DEBUG = False ALLOWED_HOSTS = ['tomo.arnes.si'] WSGI_APPLICATION = 'web.wsgi.dev.application' DATABASES = { 'default': { 'ENGINE': 'django.db.backends.postgresql_psycopg2', 'NAM...
<commit_before><commit_msg>Add settings for ARNES Tomo instance<commit_after>from common import * SECRET_KEY = os.environ['SECRET_KEY'] DEBUG = False TEMPLATE_DEBUG = False ALLOWED_HOSTS = ['tomo.arnes.si'] WSGI_APPLICATION = 'web.wsgi.dev.application' DATABASES = { 'default': { 'ENGINE': 'django.db.ba...
c46d628449651fde613fb4f7c1829f7770d2e353
django-server/feel/core/db/load_fixtures.py
django-server/feel/core/db/load_fixtures.py
import subprocess from django.conf import settings MY_APPS = settings.MY_APPS COMMAND_FORMAT = "python manage.py loaddata core/fixtures/{app}.json" def load_fixtures(): for app in MY_APPS: command = COMMAND_FORMAT.format(app=app) print(command) subprocess.check_output(command, shell=True)...
Add script to load fixtures into tables.
Fixtures: Add script to load fixtures into tables.
Python
mit
pixyj/feel,pixyj/feel,pixyj/feel,pixyj/feel,pixyj/feel
Fixtures: Add script to load fixtures into tables.
import subprocess from django.conf import settings MY_APPS = settings.MY_APPS COMMAND_FORMAT = "python manage.py loaddata core/fixtures/{app}.json" def load_fixtures(): for app in MY_APPS: command = COMMAND_FORMAT.format(app=app) print(command) subprocess.check_output(command, shell=True)...
<commit_before><commit_msg>Fixtures: Add script to load fixtures into tables.<commit_after>
import subprocess from django.conf import settings MY_APPS = settings.MY_APPS COMMAND_FORMAT = "python manage.py loaddata core/fixtures/{app}.json" def load_fixtures(): for app in MY_APPS: command = COMMAND_FORMAT.format(app=app) print(command) subprocess.check_output(command, shell=True)...
Fixtures: Add script to load fixtures into tables.import subprocess from django.conf import settings MY_APPS = settings.MY_APPS COMMAND_FORMAT = "python manage.py loaddata core/fixtures/{app}.json" def load_fixtures(): for app in MY_APPS: command = COMMAND_FORMAT.format(app=app) print(command) ...
<commit_before><commit_msg>Fixtures: Add script to load fixtures into tables.<commit_after>import subprocess from django.conf import settings MY_APPS = settings.MY_APPS COMMAND_FORMAT = "python manage.py loaddata core/fixtures/{app}.json" def load_fixtures(): for app in MY_APPS: command = COMMAND_FORMAT....
30ac63d485d548241e586b2698a10123b2a3cad9
DataStructuresAndAlgorithmsInPython/Chapter01.PythonPrimer/PreviewOfAPythonProgram.py
DataStructuresAndAlgorithmsInPython/Chapter01.PythonPrimer/PreviewOfAPythonProgram.py
print("\nTest quotations.") print("Welcome to the GPA calculator."); print("""Welcome to the GPA calculator. Please enter all your letter grades, one per line. Enter a blank line to designate the end."""); print("\nPairs."); pairs = [('ga','Irish'), ('de','German')]; print(pairs[0]); print("\nThe modulo operator."); ...
Add some python test codes.
Add some python test codes.
Python
mit
iandmyhand/python-utils
Add some python test codes.
print("\nTest quotations.") print("Welcome to the GPA calculator."); print("""Welcome to the GPA calculator. Please enter all your letter grades, one per line. Enter a blank line to designate the end."""); print("\nPairs."); pairs = [('ga','Irish'), ('de','German')]; print(pairs[0]); print("\nThe modulo operator."); ...
<commit_before><commit_msg>Add some python test codes.<commit_after>
print("\nTest quotations.") print("Welcome to the GPA calculator."); print("""Welcome to the GPA calculator. Please enter all your letter grades, one per line. Enter a blank line to designate the end."""); print("\nPairs."); pairs = [('ga','Irish'), ('de','German')]; print(pairs[0]); print("\nThe modulo operator."); ...
Add some python test codes.print("\nTest quotations.") print("Welcome to the GPA calculator."); print("""Welcome to the GPA calculator. Please enter all your letter grades, one per line. Enter a blank line to designate the end."""); print("\nPairs."); pairs = [('ga','Irish'), ('de','German')]; print(pairs[0]); print(...
<commit_before><commit_msg>Add some python test codes.<commit_after>print("\nTest quotations.") print("Welcome to the GPA calculator."); print("""Welcome to the GPA calculator. Please enter all your letter grades, one per line. Enter a blank line to designate the end."""); print("\nPairs."); pairs = [('ga','Irish'), (...
5619a15402099b1209db9ed7f71e1e55548ddebe
run-thnvm-se.py
run-thnvm-se.py
#!/bin/bash if [ $# -lt 1 ]; then echo "Usage: $0 [-h] [-c COMMAND] [-o OPTIONS]" exit -1 fi GEM5ROOT=~/Projects/Sexain-MemController/gem5-stable ARCH=X86 #X86_MESI_CMP_directory # in ./build_opts CPU_TYPE=atomic # timing, detailed NUM_CPUS=1 MEM_TYPE=simple_mem MEM_SIZE=2GB L1D_SIZE=32kB L1D_ASSOC=8 L1I_SIZE=...
Add basic run script with config for syscall emulation.
[gem5] Add basic run script with config for syscall emulation.
Python
apache-2.0
basicthinker/Sexain-MemController,basicthinker/Sexain-MemController,basicthinker/Sexain-MemController,basicthinker/Sexain-MemController,basicthinker/Sexain-MemController,basicthinker/Sexain-MemController,basicthinker/Sexain-MemController,basicthinker/Sexain-MemController
[gem5] Add basic run script with config for syscall emulation.
#!/bin/bash if [ $# -lt 1 ]; then echo "Usage: $0 [-h] [-c COMMAND] [-o OPTIONS]" exit -1 fi GEM5ROOT=~/Projects/Sexain-MemController/gem5-stable ARCH=X86 #X86_MESI_CMP_directory # in ./build_opts CPU_TYPE=atomic # timing, detailed NUM_CPUS=1 MEM_TYPE=simple_mem MEM_SIZE=2GB L1D_SIZE=32kB L1D_ASSOC=8 L1I_SIZE=...
<commit_before><commit_msg>[gem5] Add basic run script with config for syscall emulation.<commit_after>
#!/bin/bash if [ $# -lt 1 ]; then echo "Usage: $0 [-h] [-c COMMAND] [-o OPTIONS]" exit -1 fi GEM5ROOT=~/Projects/Sexain-MemController/gem5-stable ARCH=X86 #X86_MESI_CMP_directory # in ./build_opts CPU_TYPE=atomic # timing, detailed NUM_CPUS=1 MEM_TYPE=simple_mem MEM_SIZE=2GB L1D_SIZE=32kB L1D_ASSOC=8 L1I_SIZE=...
[gem5] Add basic run script with config for syscall emulation.#!/bin/bash if [ $# -lt 1 ]; then echo "Usage: $0 [-h] [-c COMMAND] [-o OPTIONS]" exit -1 fi GEM5ROOT=~/Projects/Sexain-MemController/gem5-stable ARCH=X86 #X86_MESI_CMP_directory # in ./build_opts CPU_TYPE=atomic # timing, detailed NUM_CPUS=1 MEM_TYP...
<commit_before><commit_msg>[gem5] Add basic run script with config for syscall emulation.<commit_after>#!/bin/bash if [ $# -lt 1 ]; then echo "Usage: $0 [-h] [-c COMMAND] [-o OPTIONS]" exit -1 fi GEM5ROOT=~/Projects/Sexain-MemController/gem5-stable ARCH=X86 #X86_MESI_CMP_directory # in ./build_opts CPU_TYPE=atom...
2dfab0f34bc96f1547382139e6a83bea3a3d202a
error_messenger.py
error_messenger.py
#!/usr/bin/env python3 # This file provides exactly one method: send_error_message # If the setup.ERROR_MESSAGE_RECIPIENT_SCREEN_NAME is not set to None, # an error message should be sent to the recipient via DM # import twythonaccess for sending DMs import twythonaccess # import setup import setup # The main funct...
Add error messenger via DM
Add error messenger via DM
Python
mit
ArVID220u/LoveAgainstHate
Add error messenger via DM
#!/usr/bin/env python3 # This file provides exactly one method: send_error_message # If the setup.ERROR_MESSAGE_RECIPIENT_SCREEN_NAME is not set to None, # an error message should be sent to the recipient via DM # import twythonaccess for sending DMs import twythonaccess # import setup import setup # The main funct...
<commit_before><commit_msg>Add error messenger via DM<commit_after>
#!/usr/bin/env python3 # This file provides exactly one method: send_error_message # If the setup.ERROR_MESSAGE_RECIPIENT_SCREEN_NAME is not set to None, # an error message should be sent to the recipient via DM # import twythonaccess for sending DMs import twythonaccess # import setup import setup # The main funct...
Add error messenger via DM#!/usr/bin/env python3 # This file provides exactly one method: send_error_message # If the setup.ERROR_MESSAGE_RECIPIENT_SCREEN_NAME is not set to None, # an error message should be sent to the recipient via DM # import twythonaccess for sending DMs import twythonaccess # import setup impor...
<commit_before><commit_msg>Add error messenger via DM<commit_after>#!/usr/bin/env python3 # This file provides exactly one method: send_error_message # If the setup.ERROR_MESSAGE_RECIPIENT_SCREEN_NAME is not set to None, # an error message should be sent to the recipient via DM # import twythonaccess for sending DMs ...
5e577befa191561dcdd2025842266f4ec9ef46f3
examples/to_csv.py
examples/to_csv.py
""" This file is an exmaple for running the conversion script """ from datetime import datetime, timedelta import sys sys.path.append('.') sys.path.append('../') from convert import Convert # NOQA convert = Convert() convert.CSV_FILE_LOCATION = 'examples/BostonCruiseTerminalSchedule.csv' convert.SAVE_LOCATION = 'e...
Add script to convert from ical to csv
Add script to convert from ical to csv
Python
mit
albertyw/csv-to-ical
Add script to convert from ical to csv
""" This file is an exmaple for running the conversion script """ from datetime import datetime, timedelta import sys sys.path.append('.') sys.path.append('../') from convert import Convert # NOQA convert = Convert() convert.CSV_FILE_LOCATION = 'examples/BostonCruiseTerminalSchedule.csv' convert.SAVE_LOCATION = 'e...
<commit_before><commit_msg>Add script to convert from ical to csv<commit_after>
""" This file is an exmaple for running the conversion script """ from datetime import datetime, timedelta import sys sys.path.append('.') sys.path.append('../') from convert import Convert # NOQA convert = Convert() convert.CSV_FILE_LOCATION = 'examples/BostonCruiseTerminalSchedule.csv' convert.SAVE_LOCATION = 'e...
Add script to convert from ical to csv""" This file is an exmaple for running the conversion script """ from datetime import datetime, timedelta import sys sys.path.append('.') sys.path.append('../') from convert import Convert # NOQA convert = Convert() convert.CSV_FILE_LOCATION = 'examples/BostonCruiseTerminalSc...
<commit_before><commit_msg>Add script to convert from ical to csv<commit_after>""" This file is an exmaple for running the conversion script """ from datetime import datetime, timedelta import sys sys.path.append('.') sys.path.append('../') from convert import Convert # NOQA convert = Convert() convert.CSV_FILE_LO...
00d6f99cf1f94babb237bff00364497ec30f475c
examples/hwapi/hwconfig_console.py
examples/hwapi/hwconfig_console.py
# This is hwconfig for "emulation" for cases when there's no real hardware. # It just prints information to console. class LEDClass: def __init__(self, id): self.id = id def value(self, v): print("LED(%d):" % self.id, v) LED = LEDClass(1) LED2 = LEDClass(12)
Add hwconfig for console tracing of LED operations.
examples/hwapi: Add hwconfig for console tracing of LED operations.
Python
mit
puuu/micropython,MrSurly/micropython,oopy/micropython,deshipu/micropython,pozetroninc/micropython,pfalcon/micropython,oopy/micropython,ryannathans/micropython,kerneltask/micropython,TDAbboud/micropython,MrSurly/micropython-esp32,trezor/micropython,deshipu/micropython,dmazzella/micropython,chrisdearman/micropython,pozet...
examples/hwapi: Add hwconfig for console tracing of LED operations.
# This is hwconfig for "emulation" for cases when there's no real hardware. # It just prints information to console. class LEDClass: def __init__(self, id): self.id = id def value(self, v): print("LED(%d):" % self.id, v) LED = LEDClass(1) LED2 = LEDClass(12)
<commit_before><commit_msg>examples/hwapi: Add hwconfig for console tracing of LED operations.<commit_after>
# This is hwconfig for "emulation" for cases when there's no real hardware. # It just prints information to console. class LEDClass: def __init__(self, id): self.id = id def value(self, v): print("LED(%d):" % self.id, v) LED = LEDClass(1) LED2 = LEDClass(12)
examples/hwapi: Add hwconfig for console tracing of LED operations.# This is hwconfig for "emulation" for cases when there's no real hardware. # It just prints information to console. class LEDClass: def __init__(self, id): self.id = id def value(self, v): print("LED(%d):" % self.id, v) LED ...
<commit_before><commit_msg>examples/hwapi: Add hwconfig for console tracing of LED operations.<commit_after># This is hwconfig for "emulation" for cases when there's no real hardware. # It just prints information to console. class LEDClass: def __init__(self, id): self.id = id def value(self, v): ...
8b1b0418d559d0765b30da5e1e431bc7ec6441c1
examples/sns/create_and_publish.py
examples/sns/create_and_publish.py
import os import sys from tornado.ioloop import IOLoop from tornado.gen import coroutine from asyncaws import SNS ioloop = IOLoop.current() aws_key_id = os.environ['AWS_ACCESS_KEY_ID'] aws_key_secret = os.environ['AWS_SECRET_ACCESS_KEY'] sns = SNS(aws_key_id, aws_key_secret, "eu-west-1") @coroutine def create_and_p...
Add SNS example file with case: create a topic and publish message to it
Add SNS example file with case: create a topic and publish message to it
Python
mit
MA3STR0/AsyncAWS
Add SNS example file with case: create a topic and publish message to it
import os import sys from tornado.ioloop import IOLoop from tornado.gen import coroutine from asyncaws import SNS ioloop = IOLoop.current() aws_key_id = os.environ['AWS_ACCESS_KEY_ID'] aws_key_secret = os.environ['AWS_SECRET_ACCESS_KEY'] sns = SNS(aws_key_id, aws_key_secret, "eu-west-1") @coroutine def create_and_p...
<commit_before><commit_msg>Add SNS example file with case: create a topic and publish message to it<commit_after>
import os import sys from tornado.ioloop import IOLoop from tornado.gen import coroutine from asyncaws import SNS ioloop = IOLoop.current() aws_key_id = os.environ['AWS_ACCESS_KEY_ID'] aws_key_secret = os.environ['AWS_SECRET_ACCESS_KEY'] sns = SNS(aws_key_id, aws_key_secret, "eu-west-1") @coroutine def create_and_p...
Add SNS example file with case: create a topic and publish message to itimport os import sys from tornado.ioloop import IOLoop from tornado.gen import coroutine from asyncaws import SNS ioloop = IOLoop.current() aws_key_id = os.environ['AWS_ACCESS_KEY_ID'] aws_key_secret = os.environ['AWS_SECRET_ACCESS_KEY'] sns = SN...
<commit_before><commit_msg>Add SNS example file with case: create a topic and publish message to it<commit_after>import os import sys from tornado.ioloop import IOLoop from tornado.gen import coroutine from asyncaws import SNS ioloop = IOLoop.current() aws_key_id = os.environ['AWS_ACCESS_KEY_ID'] aws_key_secret = os.e...
da4b904714cb77b862633c76085ecabf20d3edd6
filer/test_utils/extended_app/migrations/0002_auto_20160702_0839.py
filer/test_utils/extended_app/migrations/0002_auto_20160702_0839.py
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('extended_app', '0001_initial'), ] operations = [ migrations.AlterField( model_name='extimage', name=...
Add missing migration for extended_app
Add missing migration for extended_app
Python
bsd-3-clause
webu/django-filer,divio/django-filer,jakob-o/django-filer,skirsdeda/django-filer,webu/django-filer,skirsdeda/django-filer,webu/django-filer,stefanfoulis/django-filer,stefanfoulis/django-filer,divio/django-filer,skirsdeda/django-filer,webu/django-filer,jakob-o/django-filer,stefanfoulis/django-filer,stefanfoulis/django-f...
Add missing migration for extended_app
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('extended_app', '0001_initial'), ] operations = [ migrations.AlterField( model_name='extimage', name=...
<commit_before><commit_msg>Add missing migration for extended_app<commit_after>
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('extended_app', '0001_initial'), ] operations = [ migrations.AlterField( model_name='extimage', name=...
Add missing migration for extended_app# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('extended_app', '0001_initial'), ] operations = [ migrations.AlterField( mo...
<commit_before><commit_msg>Add missing migration for extended_app<commit_after># -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('extended_app', '0001_initial'), ] operations = [ ...
1e7cde33af4161d89bfce32a91c03d8f7ad7a7af
ielex/lexicon/migrations/0130_copy_hindi_transliteration_to_urdu.py
ielex/lexicon/migrations/0130_copy_hindi_transliteration_to_urdu.py
# -*- coding: utf-8 -*- # Inspired by: # https://github.com/lingdb/CoBL/issues/223#issuecomment-256815113 from __future__ import unicode_literals, print_function from django.db import migrations def forwards_func(apps, schema_editor): Language = apps.get_model("lexicon", "Language") hindi = Language.objects.g...
Update Urdu transliteration from Hindi
Update Urdu transliteration from Hindi - Adds 0130_copy_hindi_transliteration_to_urdu.py which was requested by @cormacanderson
Python
bsd-2-clause
lingdb/CoBL-public,lingdb/CoBL-public,lingdb/CoBL-public,lingdb/CoBL-public
Update Urdu transliteration from Hindi - Adds 0130_copy_hindi_transliteration_to_urdu.py which was requested by @cormacanderson
# -*- coding: utf-8 -*- # Inspired by: # https://github.com/lingdb/CoBL/issues/223#issuecomment-256815113 from __future__ import unicode_literals, print_function from django.db import migrations def forwards_func(apps, schema_editor): Language = apps.get_model("lexicon", "Language") hindi = Language.objects.g...
<commit_before><commit_msg>Update Urdu transliteration from Hindi - Adds 0130_copy_hindi_transliteration_to_urdu.py which was requested by @cormacanderson<commit_after>
# -*- coding: utf-8 -*- # Inspired by: # https://github.com/lingdb/CoBL/issues/223#issuecomment-256815113 from __future__ import unicode_literals, print_function from django.db import migrations def forwards_func(apps, schema_editor): Language = apps.get_model("lexicon", "Language") hindi = Language.objects.g...
Update Urdu transliteration from Hindi - Adds 0130_copy_hindi_transliteration_to_urdu.py which was requested by @cormacanderson# -*- coding: utf-8 -*- # Inspired by: # https://github.com/lingdb/CoBL/issues/223#issuecomment-256815113 from __future__ import unicode_literals, print_function from django.db import migrat...
<commit_before><commit_msg>Update Urdu transliteration from Hindi - Adds 0130_copy_hindi_transliteration_to_urdu.py which was requested by @cormacanderson<commit_after># -*- coding: utf-8 -*- # Inspired by: # https://github.com/lingdb/CoBL/issues/223#issuecomment-256815113 from __future__ import unicode_literals, pr...
88f14a5b72637bed435405a01e66931df6534e52
goatools/obo_tasks.py
goatools/obo_tasks.py
"""Tasks for GOTerms in obo dag.""" def get_all_parents(go_objs): """Return a set containing all GO Term parents of multiple GOTerm objects.""" go_parents = set() for go_obj in go_objs: go_parents |= go_obj.get_all_parents() return go_parents
Add file containing small, common obo tasks.
Add file containing small, common obo tasks.
Python
bsd-2-clause
lileiting/goatools,tanghaibao/goatools,tanghaibao/goatools,lileiting/goatools
Add file containing small, common obo tasks.
"""Tasks for GOTerms in obo dag.""" def get_all_parents(go_objs): """Return a set containing all GO Term parents of multiple GOTerm objects.""" go_parents = set() for go_obj in go_objs: go_parents |= go_obj.get_all_parents() return go_parents
<commit_before><commit_msg>Add file containing small, common obo tasks.<commit_after>
"""Tasks for GOTerms in obo dag.""" def get_all_parents(go_objs): """Return a set containing all GO Term parents of multiple GOTerm objects.""" go_parents = set() for go_obj in go_objs: go_parents |= go_obj.get_all_parents() return go_parents
Add file containing small, common obo tasks."""Tasks for GOTerms in obo dag.""" def get_all_parents(go_objs): """Return a set containing all GO Term parents of multiple GOTerm objects.""" go_parents = set() for go_obj in go_objs: go_parents |= go_obj.get_all_parents() return go_parents
<commit_before><commit_msg>Add file containing small, common obo tasks.<commit_after>"""Tasks for GOTerms in obo dag.""" def get_all_parents(go_objs): """Return a set containing all GO Term parents of multiple GOTerm objects.""" go_parents = set() for go_obj in go_objs: go_parents |= go_obj.get_all...
63a2475d674b611cc5e8f57218272f0aac8d13a4
fuel_plugin/ostf_adapter/logger.py
fuel_plugin/ostf_adapter/logger.py
# Copyright 2013 Mirantis, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or ...
# Copyright 2013 Mirantis, Inc. # # 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 ...
Change logging format. To be compatible with nailgun web ui
Change logging format. To be compatible with nailgun web ui Change-Id: I2e8bfe32bbb1b8f48e5ab0a418ab9592cc00adc3
Python
apache-2.0
stackforge/fuel-ostf,mcloudv/fuel-ostf,mcloudv/fuel-ostf,eayunstack/fuel-ostf,stackforge/fuel-ostf,eayunstack/fuel-ostf
# Copyright 2013 Mirantis, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or ...
# Copyright 2013 Mirantis, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or ...
<commit_before># Copyright 2013 Mirantis, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by app...
# Copyright 2013 Mirantis, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or ...
# Copyright 2013 Mirantis, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or ...
<commit_before># Copyright 2013 Mirantis, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by app...
28729a6d9c1944aa888d91d47fa4a57a631d4ca1
scikits/statsmodels/tools/tests/test_data.py
scikits/statsmodels/tools/tests/test_data.py
import pandas import numpy as np from scikits.statsmodels.tools import data def test_missing_data_pandas(): """ Fixes GH: #144 """ X = np.random.random((10,5)) X[1,2] = np.nan df = pandas.DataFrame(X) vals, cnames, rnames = data.interpret_data(df) np.testing.assert_equal(rnames, [0,2,3...
Add test for missing data in DataFrame
TST: Add test for missing data in DataFrame
Python
bsd-3-clause
josef-pkt/statsmodels,Averroes/statsmodels,astocko/statsmodels,gef756/statsmodels,astocko/statsmodels,rgommers/statsmodels,huongttlan/statsmodels,ChadFulton/statsmodels,wkfwkf/statsmodels,bavardage/statsmodels,wzbozon/statsmodels,saketkc/statsmodels,hainm/statsmodels,gef756/statsmodels,gef756/statsmodels,yl565/statsmod...
TST: Add test for missing data in DataFrame
import pandas import numpy as np from scikits.statsmodels.tools import data def test_missing_data_pandas(): """ Fixes GH: #144 """ X = np.random.random((10,5)) X[1,2] = np.nan df = pandas.DataFrame(X) vals, cnames, rnames = data.interpret_data(df) np.testing.assert_equal(rnames, [0,2,3...
<commit_before><commit_msg>TST: Add test for missing data in DataFrame<commit_after>
import pandas import numpy as np from scikits.statsmodels.tools import data def test_missing_data_pandas(): """ Fixes GH: #144 """ X = np.random.random((10,5)) X[1,2] = np.nan df = pandas.DataFrame(X) vals, cnames, rnames = data.interpret_data(df) np.testing.assert_equal(rnames, [0,2,3...
TST: Add test for missing data in DataFrameimport pandas import numpy as np from scikits.statsmodels.tools import data def test_missing_data_pandas(): """ Fixes GH: #144 """ X = np.random.random((10,5)) X[1,2] = np.nan df = pandas.DataFrame(X) vals, cnames, rnames = data.interpret_data(df)...
<commit_before><commit_msg>TST: Add test for missing data in DataFrame<commit_after>import pandas import numpy as np from scikits.statsmodels.tools import data def test_missing_data_pandas(): """ Fixes GH: #144 """ X = np.random.random((10,5)) X[1,2] = np.nan df = pandas.DataFrame(X) vals,...
36cd44ad23db1cb0707e5ec3b1fff8680708fb70
scripts/examples/02-Board-Control/usb_vcp.py
scripts/examples/02-Board-Control/usb_vcp.py
# USB VCP example. # This example shows how to use the USB VCP class to send an image to PC on demand. # # WARNING: # This script should NOT be run from the IDE or command line, it should be saved as main.py # Note the following commented script shows how to receive the image from the host side. # # #!/usr/bin/env pyth...
Add USB VCP example script.
Add USB VCP example script.
Python
mit
iabdalkader/openmv,iabdalkader/openmv,openmv/openmv,kwagyeman/openmv,openmv/openmv,kwagyeman/openmv,kwagyeman/openmv,kwagyeman/openmv,openmv/openmv,iabdalkader/openmv,openmv/openmv,iabdalkader/openmv
Add USB VCP example script.
# USB VCP example. # This example shows how to use the USB VCP class to send an image to PC on demand. # # WARNING: # This script should NOT be run from the IDE or command line, it should be saved as main.py # Note the following commented script shows how to receive the image from the host side. # # #!/usr/bin/env pyth...
<commit_before><commit_msg>Add USB VCP example script.<commit_after>
# USB VCP example. # This example shows how to use the USB VCP class to send an image to PC on demand. # # WARNING: # This script should NOT be run from the IDE or command line, it should be saved as main.py # Note the following commented script shows how to receive the image from the host side. # # #!/usr/bin/env pyth...
Add USB VCP example script.# USB VCP example. # This example shows how to use the USB VCP class to send an image to PC on demand. # # WARNING: # This script should NOT be run from the IDE or command line, it should be saved as main.py # Note the following commented script shows how to receive the image from the host si...
<commit_before><commit_msg>Add USB VCP example script.<commit_after># USB VCP example. # This example shows how to use the USB VCP class to send an image to PC on demand. # # WARNING: # This script should NOT be run from the IDE or command line, it should be saved as main.py # Note the following commented script shows ...
0e0d41e875236c421cd1016449f56c4fa6717c2e
examples/shp_lines_to_polygons.py
examples/shp_lines_to_polygons.py
#!/usr/bin/env python from __future__ import print_function from stompy.spatial import join_features from optparse import OptionParser try: from osgeo import ogr except ImportError: import ogr # # How to use this: # ### Load shapefile # ods = ogr.Open("/home/rusty/classes/research/spatialdata/us/ca/suntans/s...
Add CLI for joining lines to polygons
Add CLI for joining lines to polygons
Python
mit
rustychris/stompy,rustychris/stompy
Add CLI for joining lines to polygons
#!/usr/bin/env python from __future__ import print_function from stompy.spatial import join_features from optparse import OptionParser try: from osgeo import ogr except ImportError: import ogr # # How to use this: # ### Load shapefile # ods = ogr.Open("/home/rusty/classes/research/spatialdata/us/ca/suntans/s...
<commit_before><commit_msg>Add CLI for joining lines to polygons<commit_after>
#!/usr/bin/env python from __future__ import print_function from stompy.spatial import join_features from optparse import OptionParser try: from osgeo import ogr except ImportError: import ogr # # How to use this: # ### Load shapefile # ods = ogr.Open("/home/rusty/classes/research/spatialdata/us/ca/suntans/s...
Add CLI for joining lines to polygons#!/usr/bin/env python from __future__ import print_function from stompy.spatial import join_features from optparse import OptionParser try: from osgeo import ogr except ImportError: import ogr # # How to use this: # ### Load shapefile # ods = ogr.Open("/home/rusty/classes...
<commit_before><commit_msg>Add CLI for joining lines to polygons<commit_after>#!/usr/bin/env python from __future__ import print_function from stompy.spatial import join_features from optparse import OptionParser try: from osgeo import ogr except ImportError: import ogr # # How to use this: # ### Load shapef...
35e23c4298283413ed9862125d31d5fc3e0a960c
src/program/lwaftr/tests/subcommands/generate_binding_table_test.py
src/program/lwaftr/tests/subcommands/generate_binding_table_test.py
""" Test uses "snabb lwaftr generate-binding-table" subcommand. Does not need NICs as it doesn't use any network functionality. The command is just to produce a binding table config result. """ from subprocess import Popen, PIPE from test_env import SNABB_CMD, BaseTestCase class TestGenerateBindingTable(BaseTestCase...
Add test for lwaftr's generate-binding-table subcommand
Add test for lwaftr's generate-binding-table subcommand This adds a test which runs the generate-binding-table command and verifies that it exits with a 0 status code and produces the expected output for the command line parameters. It doesn't check the contents of the block but it does check certain expected things ...
Python
apache-2.0
snabbco/snabb,alexandergall/snabbswitch,eugeneia/snabbswitch,alexandergall/snabbswitch,snabbco/snabb,SnabbCo/snabbswitch,Igalia/snabb,Igalia/snabb,dpino/snabb,dpino/snabb,eugeneia/snabb,eugeneia/snabbswitch,dpino/snabb,dpino/snabb,eugeneia/snabb,eugeneia/snabbswitch,Igalia/snabbswitch,dpino/snabbswitch,snabbco/snabb,Ig...
Add test for lwaftr's generate-binding-table subcommand This adds a test which runs the generate-binding-table command and verifies that it exits with a 0 status code and produces the expected output for the command line parameters. It doesn't check the contents of the block but it does check certain expected things ...
""" Test uses "snabb lwaftr generate-binding-table" subcommand. Does not need NICs as it doesn't use any network functionality. The command is just to produce a binding table config result. """ from subprocess import Popen, PIPE from test_env import SNABB_CMD, BaseTestCase class TestGenerateBindingTable(BaseTestCase...
<commit_before><commit_msg>Add test for lwaftr's generate-binding-table subcommand This adds a test which runs the generate-binding-table command and verifies that it exits with a 0 status code and produces the expected output for the command line parameters. It doesn't check the contents of the block but it does che...
""" Test uses "snabb lwaftr generate-binding-table" subcommand. Does not need NICs as it doesn't use any network functionality. The command is just to produce a binding table config result. """ from subprocess import Popen, PIPE from test_env import SNABB_CMD, BaseTestCase class TestGenerateBindingTable(BaseTestCase...
Add test for lwaftr's generate-binding-table subcommand This adds a test which runs the generate-binding-table command and verifies that it exits with a 0 status code and produces the expected output for the command line parameters. It doesn't check the contents of the block but it does check certain expected things ...
<commit_before><commit_msg>Add test for lwaftr's generate-binding-table subcommand This adds a test which runs the generate-binding-table command and verifies that it exits with a 0 status code and produces the expected output for the command line parameters. It doesn't check the contents of the block but it does che...
2a94934ffff2f2984ba569ea2f4b195a6c550550
derrida/books/migrations/0003_add_foreignkey_reference_canvas_intervention.py
derrida/books/migrations/0003_add_foreignkey_reference_canvas_intervention.py
# -*- coding: utf-8 -*- # Generated by Django 1.11.4 on 2017-08-03 19:38 from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('interventions', '0001_initial'), ('djiffy', '0002_view_permissions'), ('book...
Add migration to fix http 500 errors
Add migration to fix http 500 errors
Python
apache-2.0
Princeton-CDH/derrida-django,Princeton-CDH/derrida-django,Princeton-CDH/derrida-django,Princeton-CDH/derrida-django
Add migration to fix http 500 errors
# -*- coding: utf-8 -*- # Generated by Django 1.11.4 on 2017-08-03 19:38 from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('interventions', '0001_initial'), ('djiffy', '0002_view_permissions'), ('book...
<commit_before><commit_msg>Add migration to fix http 500 errors<commit_after>
# -*- coding: utf-8 -*- # Generated by Django 1.11.4 on 2017-08-03 19:38 from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('interventions', '0001_initial'), ('djiffy', '0002_view_permissions'), ('book...
Add migration to fix http 500 errors# -*- coding: utf-8 -*- # Generated by Django 1.11.4 on 2017-08-03 19:38 from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('interventions', '0001_initial'), ('djiffy', '000...
<commit_before><commit_msg>Add migration to fix http 500 errors<commit_after># -*- coding: utf-8 -*- # Generated by Django 1.11.4 on 2017-08-03 19:38 from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('interventions',...
817222e0263a653dd5bda51a237b3c51a8dc2487
rnacentral/portal/models/ensembl_compara.py
rnacentral/portal/models/ensembl_compara.py
""" Copyright [2009-2019] EMBL-European Bioinformatics Institute Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or a...
Add Ensembl Compara django model
Add Ensembl Compara django model
Python
apache-2.0
RNAcentral/rnacentral-webcode,RNAcentral/rnacentral-webcode,RNAcentral/rnacentral-webcode,RNAcentral/rnacentral-webcode
Add Ensembl Compara django model
""" Copyright [2009-2019] EMBL-European Bioinformatics Institute Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or a...
<commit_before><commit_msg>Add Ensembl Compara django model<commit_after>
""" Copyright [2009-2019] EMBL-European Bioinformatics Institute Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or a...
Add Ensembl Compara django model""" Copyright [2009-2019] EMBL-European Bioinformatics Institute 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 Ensembl Compara django model<commit_after>""" Copyright [2009-2019] EMBL-European Bioinformatics Institute 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://w...
b35e205cc683e8a87e5591791d697608e2b0c616
boosh/test_ssh.py
boosh/test_ssh.py
from boosh.ssh import Instance def test_cache_dump(): src_instance = Instance( id='i-10ca9425', profile_name='testing', region='us-west-1', private_ip_address='127.0.0.1', public_ip_address='10.0.0.1', vpc_id='vpc-bbe848de', subnet_id='subnet-b5bc10ec', ...
Add Instance cache dump/load tests
Add Instance cache dump/load tests
Python
mit
betaworks/boosh
Add Instance cache dump/load tests
from boosh.ssh import Instance def test_cache_dump(): src_instance = Instance( id='i-10ca9425', profile_name='testing', region='us-west-1', private_ip_address='127.0.0.1', public_ip_address='10.0.0.1', vpc_id='vpc-bbe848de', subnet_id='subnet-b5bc10ec', ...
<commit_before><commit_msg>Add Instance cache dump/load tests<commit_after>
from boosh.ssh import Instance def test_cache_dump(): src_instance = Instance( id='i-10ca9425', profile_name='testing', region='us-west-1', private_ip_address='127.0.0.1', public_ip_address='10.0.0.1', vpc_id='vpc-bbe848de', subnet_id='subnet-b5bc10ec', ...
Add Instance cache dump/load testsfrom boosh.ssh import Instance def test_cache_dump(): src_instance = Instance( id='i-10ca9425', profile_name='testing', region='us-west-1', private_ip_address='127.0.0.1', public_ip_address='10.0.0.1', vpc_id='vpc-bbe848de', ...
<commit_before><commit_msg>Add Instance cache dump/load tests<commit_after>from boosh.ssh import Instance def test_cache_dump(): src_instance = Instance( id='i-10ca9425', profile_name='testing', region='us-west-1', private_ip_address='127.0.0.1', public_ip_address='10.0.0.1...
b113e2ee4c97cbfb4300b22daa3209e8b8580ed3
clusterpy/tests/test_clustering.py
clusterpy/tests/test_clustering.py
""" Testing clustering algorithms in Clusterpy ** All the following tests take considerable time to complete ** """ from unittest import TestCase class TestClusteringAlgorithms(TestCase): def setUp(self): pass def test_arisel(self): assert False def tearDown(self): pass
Add test structure for clustering algorithms
Add test structure for clustering algorithms
Python
bsd-3-clause
clusterpy/clusterpy,clusterpy/clusterpy
Add test structure for clustering algorithms
""" Testing clustering algorithms in Clusterpy ** All the following tests take considerable time to complete ** """ from unittest import TestCase class TestClusteringAlgorithms(TestCase): def setUp(self): pass def test_arisel(self): assert False def tearDown(self): pass
<commit_before><commit_msg>Add test structure for clustering algorithms<commit_after>
""" Testing clustering algorithms in Clusterpy ** All the following tests take considerable time to complete ** """ from unittest import TestCase class TestClusteringAlgorithms(TestCase): def setUp(self): pass def test_arisel(self): assert False def tearDown(self): pass
Add test structure for clustering algorithms""" Testing clustering algorithms in Clusterpy ** All the following tests take considerable time to complete ** """ from unittest import TestCase class TestClusteringAlgorithms(TestCase): def setUp(self): pass def test_arisel(self): assert False ...
<commit_before><commit_msg>Add test structure for clustering algorithms<commit_after>""" Testing clustering algorithms in Clusterpy ** All the following tests take considerable time to complete ** """ from unittest import TestCase class TestClusteringAlgorithms(TestCase): def setUp(self): pass def t...
ad9a9a9c192beedd388bc8d3ff639d04630bd1ae
cnxarchive/sql/migrations/20160624172846_add_post_publication_trigger.py
cnxarchive/sql/migrations/20160624172846_add_post_publication_trigger.py
# -*- coding: utf-8 -*- def up(cursor): cursor.execute("""\ CREATE OR REPLACE FUNCTION post_publication() RETURNS trigger AS $$ BEGIN NOTIFY post_publication; RETURN NEW; END; $$ LANGUAGE 'plpgsql'; CREATE TRIGGER post_publication_trigger AFTER INSERT OR UPDATE ON modules FOR EACH ROW WHEN (NEW.stateid =...
Add migration to add post publication trigger
Add migration to add post publication trigger
Python
agpl-3.0
Connexions/cnx-archive,Connexions/cnx-archive
Add migration to add post publication trigger
# -*- coding: utf-8 -*- def up(cursor): cursor.execute("""\ CREATE OR REPLACE FUNCTION post_publication() RETURNS trigger AS $$ BEGIN NOTIFY post_publication; RETURN NEW; END; $$ LANGUAGE 'plpgsql'; CREATE TRIGGER post_publication_trigger AFTER INSERT OR UPDATE ON modules FOR EACH ROW WHEN (NEW.stateid =...
<commit_before><commit_msg>Add migration to add post publication trigger<commit_after>
# -*- coding: utf-8 -*- def up(cursor): cursor.execute("""\ CREATE OR REPLACE FUNCTION post_publication() RETURNS trigger AS $$ BEGIN NOTIFY post_publication; RETURN NEW; END; $$ LANGUAGE 'plpgsql'; CREATE TRIGGER post_publication_trigger AFTER INSERT OR UPDATE ON modules FOR EACH ROW WHEN (NEW.stateid =...
Add migration to add post publication trigger# -*- coding: utf-8 -*- def up(cursor): cursor.execute("""\ CREATE OR REPLACE FUNCTION post_publication() RETURNS trigger AS $$ BEGIN NOTIFY post_publication; RETURN NEW; END; $$ LANGUAGE 'plpgsql'; CREATE TRIGGER post_publication_trigger AFTER INSERT OR UPDATE ...
<commit_before><commit_msg>Add migration to add post publication trigger<commit_after># -*- coding: utf-8 -*- def up(cursor): cursor.execute("""\ CREATE OR REPLACE FUNCTION post_publication() RETURNS trigger AS $$ BEGIN NOTIFY post_publication; RETURN NEW; END; $$ LANGUAGE 'plpgsql'; CREATE TRIGGER post_publ...
8f11be5014deae4ec882a43774cddaabfc6033b1
examples/launch_cloud_harness.py
examples/launch_cloud_harness.py
import json import os # from osgeo import gdal from gbdxtools import Interface from task_template import TaskTemplate, Task, InputPort, OutputPort gbdx = Interface() # data = "s3://receiving-dgcs-tdgplatform-com/054813633050_01_003" # WV02 Image over San Francisco # aoptask = gbdx.Task("AOP_Strip_Processor", data=...
Add example file for running cloud-harness tasks.
Add example file for running cloud-harness tasks.
Python
mit
michaelconnor00/gbdxtools,michaelconnor00/gbdxtools
Add example file for running cloud-harness tasks.
import json import os # from osgeo import gdal from gbdxtools import Interface from task_template import TaskTemplate, Task, InputPort, OutputPort gbdx = Interface() # data = "s3://receiving-dgcs-tdgplatform-com/054813633050_01_003" # WV02 Image over San Francisco # aoptask = gbdx.Task("AOP_Strip_Processor", data=...
<commit_before><commit_msg>Add example file for running cloud-harness tasks.<commit_after>
import json import os # from osgeo import gdal from gbdxtools import Interface from task_template import TaskTemplate, Task, InputPort, OutputPort gbdx = Interface() # data = "s3://receiving-dgcs-tdgplatform-com/054813633050_01_003" # WV02 Image over San Francisco # aoptask = gbdx.Task("AOP_Strip_Processor", data=...
Add example file for running cloud-harness tasks.import json import os # from osgeo import gdal from gbdxtools import Interface from task_template import TaskTemplate, Task, InputPort, OutputPort gbdx = Interface() # data = "s3://receiving-dgcs-tdgplatform-com/054813633050_01_003" # WV02 Image over San Francisco #...
<commit_before><commit_msg>Add example file for running cloud-harness tasks.<commit_after>import json import os # from osgeo import gdal from gbdxtools import Interface from task_template import TaskTemplate, Task, InputPort, OutputPort gbdx = Interface() # data = "s3://receiving-dgcs-tdgplatform-com/054813633050_0...
c2ff5912364c0ec94d06416f70868ba7057a26f7
tests/app/soc/views/test_root_url.py
tests/app/soc/views/test_root_url.py
#!/usr/bin/env python2.5 # # Copyright 2010 the Melange authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applic...
Add test for the root url
Add test for the root url
Python
apache-2.0
rhyolight/nupic.son,rhyolight/nupic.son,rhyolight/nupic.son
Add test for the root url
#!/usr/bin/env python2.5 # # Copyright 2010 the Melange authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applic...
<commit_before><commit_msg>Add test for the root url<commit_after>
#!/usr/bin/env python2.5 # # Copyright 2010 the Melange authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applic...
Add test for the root url#!/usr/bin/env python2.5 # # Copyright 2010 the Melange authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # ...
<commit_before><commit_msg>Add test for the root url<commit_after>#!/usr/bin/env python2.5 # # Copyright 2010 the Melange authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http:/...
d34a57041e4a9058ff886431cd54e9d2c17ec468
tamper/randomfakeproxy.py
tamper/randomfakeproxy.py
#!/usr/bin/env python """ Copyright (c) 2006-2014 sqlmap developers (http://sqlmap.org/) See the file 'doc/COPYING' for copying permission """ from lib.core.enums import PRIORITY from random import randrange __priority__ = PRIORITY.NORMAL def dependencies(): pass def generateIP(): blockOne = randrange(0, 25...
Add random X-Forwarded-For to bypass IP Ban.
Add random X-Forwarded-For to bypass IP Ban.
Python
mit
dtrip/.ubuntu,dtrip/.ubuntu,RexGene/monsu-server,RexGene/monsu-server
Add random X-Forwarded-For to bypass IP Ban.
#!/usr/bin/env python """ Copyright (c) 2006-2014 sqlmap developers (http://sqlmap.org/) See the file 'doc/COPYING' for copying permission """ from lib.core.enums import PRIORITY from random import randrange __priority__ = PRIORITY.NORMAL def dependencies(): pass def generateIP(): blockOne = randrange(0, 25...
<commit_before><commit_msg>Add random X-Forwarded-For to bypass IP Ban.<commit_after>
#!/usr/bin/env python """ Copyright (c) 2006-2014 sqlmap developers (http://sqlmap.org/) See the file 'doc/COPYING' for copying permission """ from lib.core.enums import PRIORITY from random import randrange __priority__ = PRIORITY.NORMAL def dependencies(): pass def generateIP(): blockOne = randrange(0, 25...
Add random X-Forwarded-For to bypass IP Ban.#!/usr/bin/env python """ Copyright (c) 2006-2014 sqlmap developers (http://sqlmap.org/) See the file 'doc/COPYING' for copying permission """ from lib.core.enums import PRIORITY from random import randrange __priority__ = PRIORITY.NORMAL def dependencies(): pass def ...
<commit_before><commit_msg>Add random X-Forwarded-For to bypass IP Ban.<commit_after>#!/usr/bin/env python """ Copyright (c) 2006-2014 sqlmap developers (http://sqlmap.org/) See the file 'doc/COPYING' for copying permission """ from lib.core.enums import PRIORITY from random import randrange __priority__ = PRIORITY.N...
c3f8bac3571689349df5340c3ce06b3e4c100b7b
django_olcc/olcc/forms.py
django_olcc/olcc/forms.py
from django import forms from olcc.models import Store COUNTIES = ( (u'baker', u'Baker'), (u'benton', u'Benton'), (u'clackamas', u'Clackamas'), (u'clatsop', u'Clatsop'), (u'columbia', u'Columbia'), (u'coos', u'Coos'), (u'crook', u'Crook'), (u'curry', u'Curry'), (u'deschutes', u'Des...
Add a basic CountyForm for allowing the visitor to select from a list of Oregon counties.
Add a basic CountyForm for allowing the visitor to select from a list of Oregon counties.
Python
mit
twaddington/django-olcc,twaddington/django-olcc,twaddington/django-olcc
Add a basic CountyForm for allowing the visitor to select from a list of Oregon counties.
from django import forms from olcc.models import Store COUNTIES = ( (u'baker', u'Baker'), (u'benton', u'Benton'), (u'clackamas', u'Clackamas'), (u'clatsop', u'Clatsop'), (u'columbia', u'Columbia'), (u'coos', u'Coos'), (u'crook', u'Crook'), (u'curry', u'Curry'), (u'deschutes', u'Des...
<commit_before><commit_msg>Add a basic CountyForm for allowing the visitor to select from a list of Oregon counties.<commit_after>
from django import forms from olcc.models import Store COUNTIES = ( (u'baker', u'Baker'), (u'benton', u'Benton'), (u'clackamas', u'Clackamas'), (u'clatsop', u'Clatsop'), (u'columbia', u'Columbia'), (u'coos', u'Coos'), (u'crook', u'Crook'), (u'curry', u'Curry'), (u'deschutes', u'Des...
Add a basic CountyForm for allowing the visitor to select from a list of Oregon counties.from django import forms from olcc.models import Store COUNTIES = ( (u'baker', u'Baker'), (u'benton', u'Benton'), (u'clackamas', u'Clackamas'), (u'clatsop', u'Clatsop'), (u'columbia', u'Columbia'), (u'coos...
<commit_before><commit_msg>Add a basic CountyForm for allowing the visitor to select from a list of Oregon counties.<commit_after>from django import forms from olcc.models import Store COUNTIES = ( (u'baker', u'Baker'), (u'benton', u'Benton'), (u'clackamas', u'Clackamas'), (u'clatsop', u'Clatsop'), ...
b6238e741a9bc476b6b362893b462cb57532e618
tests/game_client_test.py
tests/game_client_test.py
from mock import Mock from nose.tools import * from nose.plugins.attrib import attr import pybomb from pybomb.response import Response from pybomb.clients.game_client import GameClient def setup(): global game_client, bad_response_client, bad_request_client global return_fields mock_response = Mock() ...
Add 'old style' test for game client
Add 'old style' test for game client
Python
mit
steveYeah/PyBomb
Add 'old style' test for game client
from mock import Mock from nose.tools import * from nose.plugins.attrib import attr import pybomb from pybomb.response import Response from pybomb.clients.game_client import GameClient def setup(): global game_client, bad_response_client, bad_request_client global return_fields mock_response = Mock() ...
<commit_before><commit_msg>Add 'old style' test for game client<commit_after>
from mock import Mock from nose.tools import * from nose.plugins.attrib import attr import pybomb from pybomb.response import Response from pybomb.clients.game_client import GameClient def setup(): global game_client, bad_response_client, bad_request_client global return_fields mock_response = Mock() ...
Add 'old style' test for game clientfrom mock import Mock from nose.tools import * from nose.plugins.attrib import attr import pybomb from pybomb.response import Response from pybomb.clients.game_client import GameClient def setup(): global game_client, bad_response_client, bad_request_client global return_f...
<commit_before><commit_msg>Add 'old style' test for game client<commit_after>from mock import Mock from nose.tools import * from nose.plugins.attrib import attr import pybomb from pybomb.response import Response from pybomb.clients.game_client import GameClient def setup(): global game_client, bad_response_clien...
cd5a4d0c554c838b6c07af54c98fbac957678820
tests/test_wake_losses.py
tests/test_wake_losses.py
import pandas as pd import numpy as np import pytest from pandas.util.testing import assert_series_equal from windpowerlib.wake_losses import reduce_wind_speed, get_wind_efficiency_curve, display_wind_efficiency_curves import windpowerlib.wind_turbine as wt class TestWakeLosses: def test_reduce_wind_speed(self)...
Add test for wake losses
Add test for wake losses
Python
mit
wind-python/windpowerlib
Add test for wake losses
import pandas as pd import numpy as np import pytest from pandas.util.testing import assert_series_equal from windpowerlib.wake_losses import reduce_wind_speed, get_wind_efficiency_curve, display_wind_efficiency_curves import windpowerlib.wind_turbine as wt class TestWakeLosses: def test_reduce_wind_speed(self)...
<commit_before><commit_msg>Add test for wake losses<commit_after>
import pandas as pd import numpy as np import pytest from pandas.util.testing import assert_series_equal from windpowerlib.wake_losses import reduce_wind_speed, get_wind_efficiency_curve, display_wind_efficiency_curves import windpowerlib.wind_turbine as wt class TestWakeLosses: def test_reduce_wind_speed(self)...
Add test for wake lossesimport pandas as pd import numpy as np import pytest from pandas.util.testing import assert_series_equal from windpowerlib.wake_losses import reduce_wind_speed, get_wind_efficiency_curve, display_wind_efficiency_curves import windpowerlib.wind_turbine as wt class TestWakeLosses: def test...
<commit_before><commit_msg>Add test for wake losses<commit_after>import pandas as pd import numpy as np import pytest from pandas.util.testing import assert_series_equal from windpowerlib.wake_losses import reduce_wind_speed, get_wind_efficiency_curve, display_wind_efficiency_curves import windpowerlib.wind_turbine a...
7dc579bf170799f5e834cc7caf219c4394aef4a7
examples/qspeed.py
examples/qspeed.py
#!/usr/bin/env python3 """How fast is the queue implementation?""" import time import asyncio print(asyncio) N_CONSUMERS = 10 N_PRODUCERS = 1 N_ITEMS = 100000 # Per producer Q_SIZE = 1 @asyncio.coroutine def producer(q): for i in range(N_ITEMS): yield from q.put(i) for i in range(N_CONSUMERS): ...
Add a little test for queue speed.
Add a little test for queue speed.
Python
apache-2.0
vxgmichel/asyncio,Martiusweb/asyncio,ajdavis/asyncio,gvanrossum/asyncio,ajdavis/asyncio,gvanrossum/asyncio,ajdavis/asyncio,gvanrossum/asyncio,Martiusweb/asyncio,vxgmichel/asyncio,vxgmichel/asyncio,Martiusweb/asyncio
Add a little test for queue speed.
#!/usr/bin/env python3 """How fast is the queue implementation?""" import time import asyncio print(asyncio) N_CONSUMERS = 10 N_PRODUCERS = 1 N_ITEMS = 100000 # Per producer Q_SIZE = 1 @asyncio.coroutine def producer(q): for i in range(N_ITEMS): yield from q.put(i) for i in range(N_CONSUMERS): ...
<commit_before><commit_msg>Add a little test for queue speed.<commit_after>
#!/usr/bin/env python3 """How fast is the queue implementation?""" import time import asyncio print(asyncio) N_CONSUMERS = 10 N_PRODUCERS = 1 N_ITEMS = 100000 # Per producer Q_SIZE = 1 @asyncio.coroutine def producer(q): for i in range(N_ITEMS): yield from q.put(i) for i in range(N_CONSUMERS): ...
Add a little test for queue speed.#!/usr/bin/env python3 """How fast is the queue implementation?""" import time import asyncio print(asyncio) N_CONSUMERS = 10 N_PRODUCERS = 1 N_ITEMS = 100000 # Per producer Q_SIZE = 1 @asyncio.coroutine def producer(q): for i in range(N_ITEMS): yield from q.put(i) ...
<commit_before><commit_msg>Add a little test for queue speed.<commit_after>#!/usr/bin/env python3 """How fast is the queue implementation?""" import time import asyncio print(asyncio) N_CONSUMERS = 10 N_PRODUCERS = 1 N_ITEMS = 100000 # Per producer Q_SIZE = 1 @asyncio.coroutine def producer(q): for i in range(N...
491aae797d6de061fd93a5d1e827422b33f2269a
examples/save_user_followers_into_file.py
examples/save_user_followers_into_file.py
""" instabot example Workflow: Save users' followers into a file. """ import argparse import os import sys from tqdm import tqdm sys.path.append(os.path.join(sys.path[0], '../')) from instabot import Bot parser = argparse.ArgumentParser(add_help=False) parser.add_argument('-u', type=str, help="us...
Save users' followers into file
Save users' followers into file
Python
apache-2.0
ohld/instabot,instagrambot/instabot,instagrambot/instabot
Save users' followers into file
""" instabot example Workflow: Save users' followers into a file. """ import argparse import os import sys from tqdm import tqdm sys.path.append(os.path.join(sys.path[0], '../')) from instabot import Bot parser = argparse.ArgumentParser(add_help=False) parser.add_argument('-u', type=str, help="us...
<commit_before><commit_msg>Save users' followers into file<commit_after>
""" instabot example Workflow: Save users' followers into a file. """ import argparse import os import sys from tqdm import tqdm sys.path.append(os.path.join(sys.path[0], '../')) from instabot import Bot parser = argparse.ArgumentParser(add_help=False) parser.add_argument('-u', type=str, help="us...
Save users' followers into file""" instabot example Workflow: Save users' followers into a file. """ import argparse import os import sys from tqdm import tqdm sys.path.append(os.path.join(sys.path[0], '../')) from instabot import Bot parser = argparse.ArgumentParser(add_help=False) parser.add_ar...
<commit_before><commit_msg>Save users' followers into file<commit_after>""" instabot example Workflow: Save users' followers into a file. """ import argparse import os import sys from tqdm import tqdm sys.path.append(os.path.join(sys.path[0], '../')) from instabot import Bot parser = argparse.Arg...
eb504eeb8229cd9f3f679349c171e6d93be58b32
examples/enable/component_demo.py
examples/enable/component_demo.py
from __future__ import with_statement from enthought.enable.api import Component, ComponentEditor from enthought.traits.api import HasTraits, Instance from enthought.traits.ui.api import Item, View class MyComponent(Component): def draw(self, gc, **kwargs): w,h = gc.width(), gc.height() gc.clear()...
Add a simple demo for showing the features of the Component class.
Add a simple demo for showing the features of the Component class.
Python
bsd-3-clause
tommy-u/enable,tommy-u/enable,tommy-u/enable,tommy-u/enable
Add a simple demo for showing the features of the Component class.
from __future__ import with_statement from enthought.enable.api import Component, ComponentEditor from enthought.traits.api import HasTraits, Instance from enthought.traits.ui.api import Item, View class MyComponent(Component): def draw(self, gc, **kwargs): w,h = gc.width(), gc.height() gc.clear()...
<commit_before><commit_msg>Add a simple demo for showing the features of the Component class.<commit_after>
from __future__ import with_statement from enthought.enable.api import Component, ComponentEditor from enthought.traits.api import HasTraits, Instance from enthought.traits.ui.api import Item, View class MyComponent(Component): def draw(self, gc, **kwargs): w,h = gc.width(), gc.height() gc.clear()...
Add a simple demo for showing the features of the Component class.from __future__ import with_statement from enthought.enable.api import Component, ComponentEditor from enthought.traits.api import HasTraits, Instance from enthought.traits.ui.api import Item, View class MyComponent(Component): def draw(self, gc, *...
<commit_before><commit_msg>Add a simple demo for showing the features of the Component class.<commit_after>from __future__ import with_statement from enthought.enable.api import Component, ComponentEditor from enthought.traits.api import HasTraits, Instance from enthought.traits.ui.api import Item, View class MyCompo...
85c56454501e156134ee628f279b7632e38fda04
Mathematics/Fundamentals/special-multiple.py
Mathematics/Fundamentals/special-multiple.py
# Python 2 # Enter your code here. Read input from STDIN. Print output to STDOUT # Observation: If you factor 9 from 9, 90, 99, 900, 909, 990, 999, ... # you ge the binary numbers 1, 10, 11, 100, 101, 110, 111, ... t = int(raw_input()) for i in range(t): n = int(raw_input()) j = 1 while(in...
Add code taking advantage of binary numbers
Add code taking advantage of binary numbers
Python
mit
ugaliguy/HackerRank,ugaliguy/HackerRank,ugaliguy/HackerRank
Add code taking advantage of binary numbers
# Python 2 # Enter your code here. Read input from STDIN. Print output to STDOUT # Observation: If you factor 9 from 9, 90, 99, 900, 909, 990, 999, ... # you ge the binary numbers 1, 10, 11, 100, 101, 110, 111, ... t = int(raw_input()) for i in range(t): n = int(raw_input()) j = 1 while(in...
<commit_before><commit_msg>Add code taking advantage of binary numbers<commit_after>
# Python 2 # Enter your code here. Read input from STDIN. Print output to STDOUT # Observation: If you factor 9 from 9, 90, 99, 900, 909, 990, 999, ... # you ge the binary numbers 1, 10, 11, 100, 101, 110, 111, ... t = int(raw_input()) for i in range(t): n = int(raw_input()) j = 1 while(in...
Add code taking advantage of binary numbers# Python 2 # Enter your code here. Read input from STDIN. Print output to STDOUT # Observation: If you factor 9 from 9, 90, 99, 900, 909, 990, 999, ... # you ge the binary numbers 1, 10, 11, 100, 101, 110, 111, ... t = int(raw_input()) for i in range(t): n ...
<commit_before><commit_msg>Add code taking advantage of binary numbers<commit_after># Python 2 # Enter your code here. Read input from STDIN. Print output to STDOUT # Observation: If you factor 9 from 9, 90, 99, 900, 909, 990, 999, ... # you ge the binary numbers 1, 10, 11, 100, 101, 110, 111, ... t = int(r...
6649d71702e7e6dfb0c85d222b841de9bac72f4c
dmaws/commands/syncdata.py
dmaws/commands/syncdata.py
import click from ..cli import cli_command from ..stacks import StackPlan from ..syncdata import RDS, RDSPostgresClient @cli_command('syncdata', max_apps=0) def syncdata_cmd(ctx): plan = StackPlan.from_ctx(ctx, apps=['database_dev_access']) status = plan.create(create_dependencies=False) if not status: ...
Add command to export db
Add command to export db
Python
mit
alphagov/digitalmarketplace-aws,alphagov/digitalmarketplace-aws,alphagov/digitalmarketplace-aws
Add command to export db
import click from ..cli import cli_command from ..stacks import StackPlan from ..syncdata import RDS, RDSPostgresClient @cli_command('syncdata', max_apps=0) def syncdata_cmd(ctx): plan = StackPlan.from_ctx(ctx, apps=['database_dev_access']) status = plan.create(create_dependencies=False) if not status: ...
<commit_before><commit_msg>Add command to export db<commit_after>
import click from ..cli import cli_command from ..stacks import StackPlan from ..syncdata import RDS, RDSPostgresClient @cli_command('syncdata', max_apps=0) def syncdata_cmd(ctx): plan = StackPlan.from_ctx(ctx, apps=['database_dev_access']) status = plan.create(create_dependencies=False) if not status: ...
Add command to export dbimport click from ..cli import cli_command from ..stacks import StackPlan from ..syncdata import RDS, RDSPostgresClient @cli_command('syncdata', max_apps=0) def syncdata_cmd(ctx): plan = StackPlan.from_ctx(ctx, apps=['database_dev_access']) status = plan.create(create_dependencies=Fa...
<commit_before><commit_msg>Add command to export db<commit_after>import click from ..cli import cli_command from ..stacks import StackPlan from ..syncdata import RDS, RDSPostgresClient @cli_command('syncdata', max_apps=0) def syncdata_cmd(ctx): plan = StackPlan.from_ctx(ctx, apps=['database_dev_access']) st...
95b400e147b04a904b98769f426bd7bb99e20d5d
api/restore_wallet.py
api/restore_wallet.py
import urlparse import os, sys import json tools_dir = os.environ.get('TOOLSDIR') lib_path = os.path.abspath(tools_dir) sys.path.append(lib_path) from msc_apps import * data_dir_root = os.environ.get('DATADIR') def restore_wallet_response(request_dict): if not request_dict.has_key('type'): return (None, 'No fie...
Add restore endpoint.. was missing for some reason
Add restore endpoint.. was missing for some reason
Python
agpl-3.0
Nevtep/omniwallet,achamely/omniwallet,maran/omniwallet,VukDukic/omniwallet,habibmasuro/omniwallet,FuzzyBearBTC/omniwallet,habibmasuro/omniwallet,FuzzyBearBTC/omniwallet,OmniLayer/omniwallet,Nevtep/omniwallet,arowser/omniwallet,habibmasuro/omniwallet,VukDukic/omniwallet,maran/omniwallet,ripper234/omniwallet,curtislacy/o...
Add restore endpoint.. was missing for some reason
import urlparse import os, sys import json tools_dir = os.environ.get('TOOLSDIR') lib_path = os.path.abspath(tools_dir) sys.path.append(lib_path) from msc_apps import * data_dir_root = os.environ.get('DATADIR') def restore_wallet_response(request_dict): if not request_dict.has_key('type'): return (None, 'No fie...
<commit_before><commit_msg>Add restore endpoint.. was missing for some reason<commit_after>
import urlparse import os, sys import json tools_dir = os.environ.get('TOOLSDIR') lib_path = os.path.abspath(tools_dir) sys.path.append(lib_path) from msc_apps import * data_dir_root = os.environ.get('DATADIR') def restore_wallet_response(request_dict): if not request_dict.has_key('type'): return (None, 'No fie...
Add restore endpoint.. was missing for some reasonimport urlparse import os, sys import json tools_dir = os.environ.get('TOOLSDIR') lib_path = os.path.abspath(tools_dir) sys.path.append(lib_path) from msc_apps import * data_dir_root = os.environ.get('DATADIR') def restore_wallet_response(request_dict): if not reque...
<commit_before><commit_msg>Add restore endpoint.. was missing for some reason<commit_after>import urlparse import os, sys import json tools_dir = os.environ.get('TOOLSDIR') lib_path = os.path.abspath(tools_dir) sys.path.append(lib_path) from msc_apps import * data_dir_root = os.environ.get('DATADIR') def restore_wall...
b1fad32c311f106782d08e588f1b186108be5efc
CodeFights/palindromeRearranging.py
CodeFights/palindromeRearranging.py
#!/usr/local/bin/python # Code Fights Palindrome Rearranging Problem def palindromeRearranging(inputString): from collections import Counter is_even_len = len(inputString) % 2 == 0 letter_freq = Counter(inputString) odd_counts = sum([freq % 2 for char, freq in letter_freq.items()]) return (is_even...
Solve Code Fights palindrome rearranging problem
Solve Code Fights palindrome rearranging problem
Python
mit
HKuz/Test_Code
Solve Code Fights palindrome rearranging problem
#!/usr/local/bin/python # Code Fights Palindrome Rearranging Problem def palindromeRearranging(inputString): from collections import Counter is_even_len = len(inputString) % 2 == 0 letter_freq = Counter(inputString) odd_counts = sum([freq % 2 for char, freq in letter_freq.items()]) return (is_even...
<commit_before><commit_msg>Solve Code Fights palindrome rearranging problem<commit_after>
#!/usr/local/bin/python # Code Fights Palindrome Rearranging Problem def palindromeRearranging(inputString): from collections import Counter is_even_len = len(inputString) % 2 == 0 letter_freq = Counter(inputString) odd_counts = sum([freq % 2 for char, freq in letter_freq.items()]) return (is_even...
Solve Code Fights palindrome rearranging problem#!/usr/local/bin/python # Code Fights Palindrome Rearranging Problem def palindromeRearranging(inputString): from collections import Counter is_even_len = len(inputString) % 2 == 0 letter_freq = Counter(inputString) odd_counts = sum([freq % 2 for char, f...
<commit_before><commit_msg>Solve Code Fights palindrome rearranging problem<commit_after>#!/usr/local/bin/python # Code Fights Palindrome Rearranging Problem def palindromeRearranging(inputString): from collections import Counter is_even_len = len(inputString) % 2 == 0 letter_freq = Counter(inputString) ...
a2f2392095b4692384c89a30d5a97e6bb0297dc0
pyweaving/generate.py
pyweaving/generate.py
from . import Draft, Thread def twill(): # just generates 2/2 twill for now # we'll need 4 shafts and 4 treadles draft = Draft(num_shafts=4, num_treadles=4) # do tie-up for ii in range(4): draft.treadles[ii].shafts.add(draft.shafts[ii]) draft.treadles[ii].shafts.add(draft.shafts[...
Add a simple 2/2 twill draft generator
Add a simple 2/2 twill draft generator
Python
mit
storborg/pyweaving
Add a simple 2/2 twill draft generator
from . import Draft, Thread def twill(): # just generates 2/2 twill for now # we'll need 4 shafts and 4 treadles draft = Draft(num_shafts=4, num_treadles=4) # do tie-up for ii in range(4): draft.treadles[ii].shafts.add(draft.shafts[ii]) draft.treadles[ii].shafts.add(draft.shafts[...
<commit_before><commit_msg>Add a simple 2/2 twill draft generator<commit_after>
from . import Draft, Thread def twill(): # just generates 2/2 twill for now # we'll need 4 shafts and 4 treadles draft = Draft(num_shafts=4, num_treadles=4) # do tie-up for ii in range(4): draft.treadles[ii].shafts.add(draft.shafts[ii]) draft.treadles[ii].shafts.add(draft.shafts[...
Add a simple 2/2 twill draft generatorfrom . import Draft, Thread def twill(): # just generates 2/2 twill for now # we'll need 4 shafts and 4 treadles draft = Draft(num_shafts=4, num_treadles=4) # do tie-up for ii in range(4): draft.treadles[ii].shafts.add(draft.shafts[ii]) draft...
<commit_before><commit_msg>Add a simple 2/2 twill draft generator<commit_after>from . import Draft, Thread def twill(): # just generates 2/2 twill for now # we'll need 4 shafts and 4 treadles draft = Draft(num_shafts=4, num_treadles=4) # do tie-up for ii in range(4): draft.treadles[ii].s...
7645d98247df22dbd4a5af19d89174d347d827e6
python/challenges/plusMinus.py
python/challenges/plusMinus.py
""" Problem Statement: Given an array of integers, calculate which fraction of the elements are positive, negative, and zeroes, respectively. Print the decimal value of each fraction. Input Format: The first line, N, is the size of the array. The second line contains N space-separated integers describing the array of ...
Create main challenge file with proble statement and i/o expectations
Create main challenge file with proble statement and i/o expectations
Python
mit
markthethomas/algorithms,markthethomas/algorithms,markthethomas/algorithms,markthethomas/algorithms
Create main challenge file with proble statement and i/o expectations
""" Problem Statement: Given an array of integers, calculate which fraction of the elements are positive, negative, and zeroes, respectively. Print the decimal value of each fraction. Input Format: The first line, N, is the size of the array. The second line contains N space-separated integers describing the array of ...
<commit_before><commit_msg>Create main challenge file with proble statement and i/o expectations<commit_after>
""" Problem Statement: Given an array of integers, calculate which fraction of the elements are positive, negative, and zeroes, respectively. Print the decimal value of each fraction. Input Format: The first line, N, is the size of the array. The second line contains N space-separated integers describing the array of ...
Create main challenge file with proble statement and i/o expectations""" Problem Statement: Given an array of integers, calculate which fraction of the elements are positive, negative, and zeroes, respectively. Print the decimal value of each fraction. Input Format: The first line, N, is the size of the array. The sec...
<commit_before><commit_msg>Create main challenge file with proble statement and i/o expectations<commit_after>""" Problem Statement: Given an array of integers, calculate which fraction of the elements are positive, negative, and zeroes, respectively. Print the decimal value of each fraction. Input Format: The first l...
62f3171c463fc8827f9fa2a363314ab3caec4bb7
openedx/core/djangoapps/user_api/management/tests/test_bulk_user_org_email_optout.py
openedx/core/djangoapps/user_api/management/tests/test_bulk_user_org_email_optout.py
""" Test the test_bulk_user_org_email_optout management command """ import os import tempfile from contextlib import contextmanager import mock import pytest from django.core.management import call_command pytestmark = pytest.mark.django_db CSV_DATA = """1,UniversityX 2,CollegeX 3,StateUX """ @contextmanager def ...
Add test for bulk email optout mgmt cmd.
Add test for bulk email optout mgmt cmd.
Python
agpl-3.0
stvstnfrd/edx-platform,a-parhom/edx-platform,edx/edx-platform,philanthropy-u/edx-platform,philanthropy-u/edx-platform,cpennington/edx-platform,jolyonb/edx-platform,teltek/edx-platform,msegado/edx-platform,EDUlib/edx-platform,appsembler/edx-platform,mitocw/edx-platform,cpennington/edx-platform,edx-solutions/edx-platform...
Add test for bulk email optout mgmt cmd.
""" Test the test_bulk_user_org_email_optout management command """ import os import tempfile from contextlib import contextmanager import mock import pytest from django.core.management import call_command pytestmark = pytest.mark.django_db CSV_DATA = """1,UniversityX 2,CollegeX 3,StateUX """ @contextmanager def ...
<commit_before><commit_msg>Add test for bulk email optout mgmt cmd.<commit_after>
""" Test the test_bulk_user_org_email_optout management command """ import os import tempfile from contextlib import contextmanager import mock import pytest from django.core.management import call_command pytestmark = pytest.mark.django_db CSV_DATA = """1,UniversityX 2,CollegeX 3,StateUX """ @contextmanager def ...
Add test for bulk email optout mgmt cmd.""" Test the test_bulk_user_org_email_optout management command """ import os import tempfile from contextlib import contextmanager import mock import pytest from django.core.management import call_command pytestmark = pytest.mark.django_db CSV_DATA = """1,UniversityX 2,Colle...
<commit_before><commit_msg>Add test for bulk email optout mgmt cmd.<commit_after>""" Test the test_bulk_user_org_email_optout management command """ import os import tempfile from contextlib import contextmanager import mock import pytest from django.core.management import call_command pytestmark = pytest.mark.django...
05a0340919b8d7affc369201afd2bed931559516
djangae/contrib/contenttypes/tests.py
djangae/contrib/contenttypes/tests.py
# SYSTEM from __future__ import absolute_import # LIBRARIES from django.db import models from django.test import TestCase from django.contrib.contenttypes.models import ContentType from djangae.contrib.contenttypes.models import SimulatedContentTypeManager class DummyModel(models.Model): pass class SimulatedCo...
Add basic test suite for SimulatedContentTypeManager
Add basic test suite for SimulatedContentTypeManager
Python
bsd-3-clause
grzes/djangae,potatolondon/djangae,kirberich/djangae,kirberich/djangae,grzes/djangae,kirberich/djangae,potatolondon/djangae,grzes/djangae
Add basic test suite for SimulatedContentTypeManager
# SYSTEM from __future__ import absolute_import # LIBRARIES from django.db import models from django.test import TestCase from django.contrib.contenttypes.models import ContentType from djangae.contrib.contenttypes.models import SimulatedContentTypeManager class DummyModel(models.Model): pass class SimulatedCo...
<commit_before><commit_msg>Add basic test suite for SimulatedContentTypeManager<commit_after>
# SYSTEM from __future__ import absolute_import # LIBRARIES from django.db import models from django.test import TestCase from django.contrib.contenttypes.models import ContentType from djangae.contrib.contenttypes.models import SimulatedContentTypeManager class DummyModel(models.Model): pass class SimulatedCo...
Add basic test suite for SimulatedContentTypeManager# SYSTEM from __future__ import absolute_import # LIBRARIES from django.db import models from django.test import TestCase from django.contrib.contenttypes.models import ContentType from djangae.contrib.contenttypes.models import SimulatedContentTypeManager class Du...
<commit_before><commit_msg>Add basic test suite for SimulatedContentTypeManager<commit_after># SYSTEM from __future__ import absolute_import # LIBRARIES from django.db import models from django.test import TestCase from django.contrib.contenttypes.models import ContentType from djangae.contrib.contenttypes.models impo...
0bc52971191d2fa698032912f0ed1ffcfc8fc4c9
elements/cost_functions.py
elements/cost_functions.py
""" a set of cost functions for Neural Network layers. """ import theano.tensor as T l1_norm(w): """ Returns L1 norm of the given matrix (w). L1 norm is simply sum of a matrix elements. @input: w, a theano shared variable. @output: L1 norm of w """ return abs(w).sum() l2_norm(w): """ Returns L2 norm of th...
Add some basic cost functions (L1 & L2 norms)
Add some basic cost functions (L1 & L2 norms)
Python
mit
mmohaveri/DeepNetTookKit
Add some basic cost functions (L1 & L2 norms)
""" a set of cost functions for Neural Network layers. """ import theano.tensor as T l1_norm(w): """ Returns L1 norm of the given matrix (w). L1 norm is simply sum of a matrix elements. @input: w, a theano shared variable. @output: L1 norm of w """ return abs(w).sum() l2_norm(w): """ Returns L2 norm of th...
<commit_before><commit_msg>Add some basic cost functions (L1 & L2 norms)<commit_after>
""" a set of cost functions for Neural Network layers. """ import theano.tensor as T l1_norm(w): """ Returns L1 norm of the given matrix (w). L1 norm is simply sum of a matrix elements. @input: w, a theano shared variable. @output: L1 norm of w """ return abs(w).sum() l2_norm(w): """ Returns L2 norm of th...
Add some basic cost functions (L1 & L2 norms)""" a set of cost functions for Neural Network layers. """ import theano.tensor as T l1_norm(w): """ Returns L1 norm of the given matrix (w). L1 norm is simply sum of a matrix elements. @input: w, a theano shared variable. @output: L1 norm of w """ return abs(w).s...
<commit_before><commit_msg>Add some basic cost functions (L1 & L2 norms)<commit_after>""" a set of cost functions for Neural Network layers. """ import theano.tensor as T l1_norm(w): """ Returns L1 norm of the given matrix (w). L1 norm is simply sum of a matrix elements. @input: w, a theano shared variable. @ou...
2b7f32b725c46a504ce74c4bf06c8865613cdfe7
example_code/client_adc.py
example_code/client_adc.py
# Main program for ESP8266 to sample a potentiometer sensor and send sensor # events to an MQTT broker. # Configuration is stored in a separate config.py from config import SENSOR_ID, WIFI_ESSID, WIFI_PASSWORD, MQTT_HOST,\ MQTT_TOPIC, SLEEP_TIME from wifi import wifi_connect, disable_wifi_ap from t...
Add esp8266 ADC sensor client example
Add esp8266 ADC sensor client example
Python
mit
jfischer/micropython-iot-hackathon,jfischer/micropython-iot-hackathon
Add esp8266 ADC sensor client example
# Main program for ESP8266 to sample a potentiometer sensor and send sensor # events to an MQTT broker. # Configuration is stored in a separate config.py from config import SENSOR_ID, WIFI_ESSID, WIFI_PASSWORD, MQTT_HOST,\ MQTT_TOPIC, SLEEP_TIME from wifi import wifi_connect, disable_wifi_ap from t...
<commit_before><commit_msg>Add esp8266 ADC sensor client example<commit_after>
# Main program for ESP8266 to sample a potentiometer sensor and send sensor # events to an MQTT broker. # Configuration is stored in a separate config.py from config import SENSOR_ID, WIFI_ESSID, WIFI_PASSWORD, MQTT_HOST,\ MQTT_TOPIC, SLEEP_TIME from wifi import wifi_connect, disable_wifi_ap from t...
Add esp8266 ADC sensor client example# Main program for ESP8266 to sample a potentiometer sensor and send sensor # events to an MQTT broker. # Configuration is stored in a separate config.py from config import SENSOR_ID, WIFI_ESSID, WIFI_PASSWORD, MQTT_HOST,\ MQTT_TOPIC, SLEEP_TIME from wifi import...
<commit_before><commit_msg>Add esp8266 ADC sensor client example<commit_after># Main program for ESP8266 to sample a potentiometer sensor and send sensor # events to an MQTT broker. # Configuration is stored in a separate config.py from config import SENSOR_ID, WIFI_ESSID, WIFI_PASSWORD, MQTT_HOST,\ ...
9d7a393cbc981dc3cae94c6e4df25344718def06
alembic/versions/3a98a6674cb2_add_published_column_to_project.py
alembic/versions/3a98a6674cb2_add_published_column_to_project.py
"""Add published column to project Revision ID: 3a98a6674cb2 Revises: 35f8b948e98d Create Date: 2015-08-07 10:24:31.558995 """ # revision identifiers, used by Alembic. revision = '3a98a6674cb2' down_revision = '35f8b948e98d' from alembic import op import sqlalchemy as sa def upgrade(): op.add_column('project'...
Add migration for adding published column in project
Add migration for adding published column in project
Python
agpl-3.0
PyBossa/pybossa,geotagx/pybossa,PyBossa/pybossa,Scifabric/pybossa,Scifabric/pybossa,geotagx/pybossa
Add migration for adding published column in project
"""Add published column to project Revision ID: 3a98a6674cb2 Revises: 35f8b948e98d Create Date: 2015-08-07 10:24:31.558995 """ # revision identifiers, used by Alembic. revision = '3a98a6674cb2' down_revision = '35f8b948e98d' from alembic import op import sqlalchemy as sa def upgrade(): op.add_column('project'...
<commit_before><commit_msg>Add migration for adding published column in project<commit_after>
"""Add published column to project Revision ID: 3a98a6674cb2 Revises: 35f8b948e98d Create Date: 2015-08-07 10:24:31.558995 """ # revision identifiers, used by Alembic. revision = '3a98a6674cb2' down_revision = '35f8b948e98d' from alembic import op import sqlalchemy as sa def upgrade(): op.add_column('project'...
Add migration for adding published column in project"""Add published column to project Revision ID: 3a98a6674cb2 Revises: 35f8b948e98d Create Date: 2015-08-07 10:24:31.558995 """ # revision identifiers, used by Alembic. revision = '3a98a6674cb2' down_revision = '35f8b948e98d' from alembic import op import sqlalchem...
<commit_before><commit_msg>Add migration for adding published column in project<commit_after>"""Add published column to project Revision ID: 3a98a6674cb2 Revises: 35f8b948e98d Create Date: 2015-08-07 10:24:31.558995 """ # revision identifiers, used by Alembic. revision = '3a98a6674cb2' down_revision = '35f8b948e98d'...
21df7f5837566d8bb9a17c7847fa10ec1570adb3
osf/migrations/0031_auto_20170202_0943.py
osf/migrations/0031_auto_20170202_0943.py
# -*- coding: utf-8 -*- # Generated by Django 1.9 on 2017-02-02 15:43 from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('osf', '0030_auto_20170130_1608'), ] operations = [ migrations.AlterField( ...
Add blank=True to external account and Institution so that permissions can be sucessfully added in the admin's admin interface
Add blank=True to external account and Institution so that permissions can be sucessfully added in the admin's admin interface
Python
apache-2.0
erinspace/osf.io,pattisdr/osf.io,crcresearch/osf.io,acshi/osf.io,hmoco/osf.io,Nesiehr/osf.io,TomBaxter/osf.io,cslzchen/osf.io,Nesiehr/osf.io,sloria/osf.io,felliott/osf.io,mfraezz/osf.io,erinspace/osf.io,acshi/osf.io,pattisdr/osf.io,baylee-d/osf.io,chrisseto/osf.io,mfraezz/osf.io,saradbowman/osf.io,hmoco/osf.io,monikagr...
Add blank=True to external account and Institution so that permissions can be sucessfully added in the admin's admin interface
# -*- coding: utf-8 -*- # Generated by Django 1.9 on 2017-02-02 15:43 from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('osf', '0030_auto_20170130_1608'), ] operations = [ migrations.AlterField( ...
<commit_before><commit_msg>Add blank=True to external account and Institution so that permissions can be sucessfully added in the admin's admin interface<commit_after>
# -*- coding: utf-8 -*- # Generated by Django 1.9 on 2017-02-02 15:43 from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('osf', '0030_auto_20170130_1608'), ] operations = [ migrations.AlterField( ...
Add blank=True to external account and Institution so that permissions can be sucessfully added in the admin's admin interface# -*- coding: utf-8 -*- # Generated by Django 1.9 on 2017-02-02 15:43 from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): ...
<commit_before><commit_msg>Add blank=True to external account and Institution so that permissions can be sucessfully added in the admin's admin interface<commit_after># -*- coding: utf-8 -*- # Generated by Django 1.9 on 2017-02-02 15:43 from __future__ import unicode_literals from django.db import migrations, models ...
121d908e72fc36752d42489aaa65db5897881eb4
softwareindex/handlers/coreapi.py
softwareindex/handlers/coreapi.py
import requests, json, urllib SEARCH_URL = 'http://core.ac.uk:80/api-v2/articles/search/' API_KEY = 'FILL THIS IN' def getCOREMentions(identifier, **kwargs): """Return the number of mentions in CORE and a descriptor, as a tuple. Needs an API key, which can be obtained here: http://core.ac.uk/api-keys/reg...
Add initial version of CORE API handler.
Add initial version of CORE API handler. This uses the CORE v2 API to get the number of open access articles with the given software identifier mentioned in the full text. Currently the maximum returned is 100, since the v2 API doesn't return the total number of search results. It doesn't do much error handling yet ...
Python
bsd-3-clause
softwaresaved/softwareindex,softwaresaved/softwareindex
Add initial version of CORE API handler. This uses the CORE v2 API to get the number of open access articles with the given software identifier mentioned in the full text. Currently the maximum returned is 100, since the v2 API doesn't return the total number of search results. It doesn't do much error handling yet ...
import requests, json, urllib SEARCH_URL = 'http://core.ac.uk:80/api-v2/articles/search/' API_KEY = 'FILL THIS IN' def getCOREMentions(identifier, **kwargs): """Return the number of mentions in CORE and a descriptor, as a tuple. Needs an API key, which can be obtained here: http://core.ac.uk/api-keys/reg...
<commit_before><commit_msg>Add initial version of CORE API handler. This uses the CORE v2 API to get the number of open access articles with the given software identifier mentioned in the full text. Currently the maximum returned is 100, since the v2 API doesn't return the total number of search results. It doesn't ...
import requests, json, urllib SEARCH_URL = 'http://core.ac.uk:80/api-v2/articles/search/' API_KEY = 'FILL THIS IN' def getCOREMentions(identifier, **kwargs): """Return the number of mentions in CORE and a descriptor, as a tuple. Needs an API key, which can be obtained here: http://core.ac.uk/api-keys/reg...
Add initial version of CORE API handler. This uses the CORE v2 API to get the number of open access articles with the given software identifier mentioned in the full text. Currently the maximum returned is 100, since the v2 API doesn't return the total number of search results. It doesn't do much error handling yet ...
<commit_before><commit_msg>Add initial version of CORE API handler. This uses the CORE v2 API to get the number of open access articles with the given software identifier mentioned in the full text. Currently the maximum returned is 100, since the v2 API doesn't return the total number of search results. It doesn't ...
ca2d37ad158dc996a15f5a2724d57ed0f6f298dd
Python/Templates/Django/ProjectTemplates/Python/Web/WebRoleDjango/urls.py
Python/Templates/Django/ProjectTemplates/Python/Web/WebRoleDjango/urls.py
""" Definition of urls for $safeprojectname$. """ from django.conf.urls import include, url import $safeprojectname$.views # Uncomment the next two lines to enable the admin: # from django.contrib import admin # admin.autodiscover() urlpatterns = [ # Examples: # url(r'^$', $safeprojectname$.views.home, name...
""" Definition of urls for $safeprojectname$. """ from django.conf.urls import include, url # Uncomment the next two lines to enable the admin: # from django.contrib import admin # admin.autodiscover() urlpatterns = [ # Examples: # url(r'^$', $safeprojectname$.views.home, name='home'), # url(r'^$safeproj...
Remove import of non-existing file.
Remove import of non-existing file.
Python
apache-2.0
huguesv/PTVS,huguesv/PTVS,DEVSENSE/PTVS,huguesv/PTVS,int19h/PTVS,int19h/PTVS,zooba/PTVS,Microsoft/PTVS,int19h/PTVS,Microsoft/PTVS,huguesv/PTVS,DEVSENSE/PTVS,Microsoft/PTVS,huguesv/PTVS,Microsoft/PTVS,int19h/PTVS,zooba/PTVS,Microsoft/PTVS,DEVSENSE/PTVS,DEVSENSE/PTVS,int19h/PTVS,Microsoft/PTVS,zooba/PTVS,huguesv/PTVS,zoo...
""" Definition of urls for $safeprojectname$. """ from django.conf.urls import include, url import $safeprojectname$.views # Uncomment the next two lines to enable the admin: # from django.contrib import admin # admin.autodiscover() urlpatterns = [ # Examples: # url(r'^$', $safeprojectname$.views.home, name...
""" Definition of urls for $safeprojectname$. """ from django.conf.urls import include, url # Uncomment the next two lines to enable the admin: # from django.contrib import admin # admin.autodiscover() urlpatterns = [ # Examples: # url(r'^$', $safeprojectname$.views.home, name='home'), # url(r'^$safeproj...
<commit_before>""" Definition of urls for $safeprojectname$. """ from django.conf.urls import include, url import $safeprojectname$.views # Uncomment the next two lines to enable the admin: # from django.contrib import admin # admin.autodiscover() urlpatterns = [ # Examples: # url(r'^$', $safeprojectname$.v...
""" Definition of urls for $safeprojectname$. """ from django.conf.urls import include, url # Uncomment the next two lines to enable the admin: # from django.contrib import admin # admin.autodiscover() urlpatterns = [ # Examples: # url(r'^$', $safeprojectname$.views.home, name='home'), # url(r'^$safeproj...
""" Definition of urls for $safeprojectname$. """ from django.conf.urls import include, url import $safeprojectname$.views # Uncomment the next two lines to enable the admin: # from django.contrib import admin # admin.autodiscover() urlpatterns = [ # Examples: # url(r'^$', $safeprojectname$.views.home, name...
<commit_before>""" Definition of urls for $safeprojectname$. """ from django.conf.urls import include, url import $safeprojectname$.views # Uncomment the next two lines to enable the admin: # from django.contrib import admin # admin.autodiscover() urlpatterns = [ # Examples: # url(r'^$', $safeprojectname$.v...
f0a0985ac3c5b9b77d8cd0b3bf7b8b028c7acf42
scripts/check_data.py
scripts/check_data.py
#!/usr/bin/env python3 import sys import json from glob import glob from os.path import relpath, abspath, dirname from pathlib import Path BASE_DIR = str(Path(dirname(abspath(__file__))).parent) def get_json_files(base): '''Returns a list of all JSON files in the /data/ directory''' files = glob(f'{base}/data/**...
Add script for checking whether data files have valid JSON syntax
Add script for checking whether data files have valid JSON syntax
Python
mit
msikma/pokesprite,msikma/pokesprite,msikma/pokesprite
Add script for checking whether data files have valid JSON syntax
#!/usr/bin/env python3 import sys import json from glob import glob from os.path import relpath, abspath, dirname from pathlib import Path BASE_DIR = str(Path(dirname(abspath(__file__))).parent) def get_json_files(base): '''Returns a list of all JSON files in the /data/ directory''' files = glob(f'{base}/data/**...
<commit_before><commit_msg>Add script for checking whether data files have valid JSON syntax<commit_after>
#!/usr/bin/env python3 import sys import json from glob import glob from os.path import relpath, abspath, dirname from pathlib import Path BASE_DIR = str(Path(dirname(abspath(__file__))).parent) def get_json_files(base): '''Returns a list of all JSON files in the /data/ directory''' files = glob(f'{base}/data/**...
Add script for checking whether data files have valid JSON syntax#!/usr/bin/env python3 import sys import json from glob import glob from os.path import relpath, abspath, dirname from pathlib import Path BASE_DIR = str(Path(dirname(abspath(__file__))).parent) def get_json_files(base): '''Returns a list of all JSON...
<commit_before><commit_msg>Add script for checking whether data files have valid JSON syntax<commit_after>#!/usr/bin/env python3 import sys import json from glob import glob from os.path import relpath, abspath, dirname from pathlib import Path BASE_DIR = str(Path(dirname(abspath(__file__))).parent) def get_json_fil...
928ac17b69b810b85f3cfbe168f6b3fdb8c6cd6e
src/ggrc/migrations/versions/20170214101700_ff4ebc0d89c_add_column_to_fulltext_records_table.py
src/ggrc/migrations/versions/20170214101700_ff4ebc0d89c_add_column_to_fulltext_records_table.py
# Copyright (C) 2017 Google Inc. # Licensed under http://www.apache.org/licenses/LICENSE-2.0 <see LICENSE file> """ Add 'subproperty' column into 'fulltext_record_properties' table to make search by property subtype bypossible. For example: We have two subtypes of the property Person: - name - email Create Date: 201...
Add column for property subtype
Add column for property subtype Add column 'subproperty' into fulltext_record_properties table
Python
apache-2.0
AleksNeStu/ggrc-core,AleksNeStu/ggrc-core,plamut/ggrc-core,VinnieJohns/ggrc-core,VinnieJohns/ggrc-core,plamut/ggrc-core,plamut/ggrc-core,VinnieJohns/ggrc-core,VinnieJohns/ggrc-core,plamut/ggrc-core,AleksNeStu/ggrc-core,AleksNeStu/ggrc-core
Add column for property subtype Add column 'subproperty' into fulltext_record_properties table
# Copyright (C) 2017 Google Inc. # Licensed under http://www.apache.org/licenses/LICENSE-2.0 <see LICENSE file> """ Add 'subproperty' column into 'fulltext_record_properties' table to make search by property subtype bypossible. For example: We have two subtypes of the property Person: - name - email Create Date: 201...
<commit_before><commit_msg>Add column for property subtype Add column 'subproperty' into fulltext_record_properties table<commit_after>
# Copyright (C) 2017 Google Inc. # Licensed under http://www.apache.org/licenses/LICENSE-2.0 <see LICENSE file> """ Add 'subproperty' column into 'fulltext_record_properties' table to make search by property subtype bypossible. For example: We have two subtypes of the property Person: - name - email Create Date: 201...
Add column for property subtype Add column 'subproperty' into fulltext_record_properties table# Copyright (C) 2017 Google Inc. # Licensed under http://www.apache.org/licenses/LICENSE-2.0 <see LICENSE file> """ Add 'subproperty' column into 'fulltext_record_properties' table to make search by property subtype bypossib...
<commit_before><commit_msg>Add column for property subtype Add column 'subproperty' into fulltext_record_properties table<commit_after># Copyright (C) 2017 Google Inc. # Licensed under http://www.apache.org/licenses/LICENSE-2.0 <see LICENSE file> """ Add 'subproperty' column into 'fulltext_record_properties' table to...
d4972ffd1e0b9ba42800234b847c6704b9b2146e
jisho.py
jisho.py
#!/usr/bin/env python # encoding: utf-8 import sys from workflow import Workflow, web, ICON_WEB API_URL = 'http://jisho.org/api/v1/search/words' SEP_COMMA = u'、 ' # Separator for subtitle kana readings. MAX_NUM_RESULTS = 9 # Maximum number of results that Alfred can display. def get_results(query): """Fetche...
Add ability to get and display Jisho.org results
Add ability to get and display Jisho.org results
Python
mit
janclarin/jisho-alfred-workflow
Add ability to get and display Jisho.org results
#!/usr/bin/env python # encoding: utf-8 import sys from workflow import Workflow, web, ICON_WEB API_URL = 'http://jisho.org/api/v1/search/words' SEP_COMMA = u'、 ' # Separator for subtitle kana readings. MAX_NUM_RESULTS = 9 # Maximum number of results that Alfred can display. def get_results(query): """Fetche...
<commit_before><commit_msg>Add ability to get and display Jisho.org results<commit_after>
#!/usr/bin/env python # encoding: utf-8 import sys from workflow import Workflow, web, ICON_WEB API_URL = 'http://jisho.org/api/v1/search/words' SEP_COMMA = u'、 ' # Separator for subtitle kana readings. MAX_NUM_RESULTS = 9 # Maximum number of results that Alfred can display. def get_results(query): """Fetche...
Add ability to get and display Jisho.org results#!/usr/bin/env python # encoding: utf-8 import sys from workflow import Workflow, web, ICON_WEB API_URL = 'http://jisho.org/api/v1/search/words' SEP_COMMA = u'、 ' # Separator for subtitle kana readings. MAX_NUM_RESULTS = 9 # Maximum number of results that Alfred can ...
<commit_before><commit_msg>Add ability to get and display Jisho.org results<commit_after>#!/usr/bin/env python # encoding: utf-8 import sys from workflow import Workflow, web, ICON_WEB API_URL = 'http://jisho.org/api/v1/search/words' SEP_COMMA = u'、 ' # Separator for subtitle kana readings. MAX_NUM_RESULTS = 9 # M...
2a6a7b6fff73e6622ac8a4cdc97fa2701225691d
vigir_ltl_specification/src/vigir_ltl_specification/task_specification.py
vigir_ltl_specification/src/vigir_ltl_specification/task_specification.py
#!/usr/bin/env python import os import pprint import preconditions as precond from gr1_specification import GR1Specification from gr1_formulas import GR1Formula, FastSlowFormula """ Module's docstring #TODO """ VIGIR_ROOT_DIR = os.environ['VIGIR_ROOT_DIR'] class TaskSpecification(GR1Specification): """...""" d...
Add module for task-specific specs
[vigir_ltl_specification] Add module for task-specific specs
Python
bsd-3-clause
team-vigir/vigir_behavior_synthesis,team-vigir/vigir_behavior_synthesis
[vigir_ltl_specification] Add module for task-specific specs
#!/usr/bin/env python import os import pprint import preconditions as precond from gr1_specification import GR1Specification from gr1_formulas import GR1Formula, FastSlowFormula """ Module's docstring #TODO """ VIGIR_ROOT_DIR = os.environ['VIGIR_ROOT_DIR'] class TaskSpecification(GR1Specification): """...""" d...
<commit_before><commit_msg>[vigir_ltl_specification] Add module for task-specific specs<commit_after>
#!/usr/bin/env python import os import pprint import preconditions as precond from gr1_specification import GR1Specification from gr1_formulas import GR1Formula, FastSlowFormula """ Module's docstring #TODO """ VIGIR_ROOT_DIR = os.environ['VIGIR_ROOT_DIR'] class TaskSpecification(GR1Specification): """...""" d...
[vigir_ltl_specification] Add module for task-specific specs#!/usr/bin/env python import os import pprint import preconditions as precond from gr1_specification import GR1Specification from gr1_formulas import GR1Formula, FastSlowFormula """ Module's docstring #TODO """ VIGIR_ROOT_DIR = os.environ['VIGIR_ROOT_DIR']...
<commit_before><commit_msg>[vigir_ltl_specification] Add module for task-specific specs<commit_after>#!/usr/bin/env python import os import pprint import preconditions as precond from gr1_specification import GR1Specification from gr1_formulas import GR1Formula, FastSlowFormula """ Module's docstring #TODO """ VIGI...
a37a721666551bc91743d36605073d97eb7a1f5d
package_control.py
package_control.py
import sys package_name = 'My Package' def plugin_loaded(): from package_control import events if events.install(package_name): print('Installed %s!' % events.install(package_name)) elif events.post_upgrade(package_name): print('Upgraded to %s!' % events.post_upgrade(package_name)) de...
Package control APIs for installing/removing.
Package control APIs for installing/removing.
Python
mit
niosus/EasyClangComplete,kgizdov/EasyClangComplete,kgizdov/EasyClangComplete,kgizdov/EasyClangComplete,kgizdov/EasyClangComplete,niosus/EasyClangComplete,niosus/EasyClangComplete
Package control APIs for installing/removing.
import sys package_name = 'My Package' def plugin_loaded(): from package_control import events if events.install(package_name): print('Installed %s!' % events.install(package_name)) elif events.post_upgrade(package_name): print('Upgraded to %s!' % events.post_upgrade(package_name)) de...
<commit_before><commit_msg>Package control APIs for installing/removing.<commit_after>
import sys package_name = 'My Package' def plugin_loaded(): from package_control import events if events.install(package_name): print('Installed %s!' % events.install(package_name)) elif events.post_upgrade(package_name): print('Upgraded to %s!' % events.post_upgrade(package_name)) de...
Package control APIs for installing/removing.import sys package_name = 'My Package' def plugin_loaded(): from package_control import events if events.install(package_name): print('Installed %s!' % events.install(package_name)) elif events.post_upgrade(package_name): print('Upgraded to %...
<commit_before><commit_msg>Package control APIs for installing/removing.<commit_after>import sys package_name = 'My Package' def plugin_loaded(): from package_control import events if events.install(package_name): print('Installed %s!' % events.install(package_name)) elif events.post_upgrade(pa...
c713210011772bbf5afbb88dc4bb62a7e9496f2b
new_post.py
new_post.py
import argparse, datetime, unicodedata, re def slugify(value): """ Converts to lowercase, removes non-word characters (alphanumerics and underscores) and converts spaces to hyphens. Also strips leading and trailing whitespace. """ value = unicodedata.normalize('NFKD', value).encode('ascii', 'ig...
Add python helper to add new post
Add python helper to add new post
Python
mit
tuvokki/tuvokki.github.com,tuvokki/tuvokki.github.com,tuvokki/tuvokki.github.com,tuvokki/tuvokki.github.com
Add python helper to add new post
import argparse, datetime, unicodedata, re def slugify(value): """ Converts to lowercase, removes non-word characters (alphanumerics and underscores) and converts spaces to hyphens. Also strips leading and trailing whitespace. """ value = unicodedata.normalize('NFKD', value).encode('ascii', 'ig...
<commit_before><commit_msg>Add python helper to add new post<commit_after>
import argparse, datetime, unicodedata, re def slugify(value): """ Converts to lowercase, removes non-word characters (alphanumerics and underscores) and converts spaces to hyphens. Also strips leading and trailing whitespace. """ value = unicodedata.normalize('NFKD', value).encode('ascii', 'ig...
Add python helper to add new postimport argparse, datetime, unicodedata, re def slugify(value): """ Converts to lowercase, removes non-word characters (alphanumerics and underscores) and converts spaces to hyphens. Also strips leading and trailing whitespace. """ value = unicodedata.normalize('...
<commit_before><commit_msg>Add python helper to add new post<commit_after>import argparse, datetime, unicodedata, re def slugify(value): """ Converts to lowercase, removes non-word characters (alphanumerics and underscores) and converts spaces to hyphens. Also strips leading and trailing whitespace. ...
fcd1f4c93b9f3108e1711d5dca0506549c4ba2f7
src/ggrc/migrations/versions/20150521091609_29d21b3c24b4_migrate_object_controls_to_relationships.py
src/ggrc/migrations/versions/20150521091609_29d21b3c24b4_migrate_object_controls_to_relationships.py
# Copyright (C) 2015 Google Inc., authors, and contributors <see AUTHORS file> # Licensed under http://www.apache.org/licenses/LICENSE-2.0 <see LICENSE file> # Created By: [email protected] # Maintained By: [email protected] """Migrate object_controls to relationships Revision ID: 29d21b3c24b4 Revises: ...
Add a migration for object_controls -> relationships
Add a migration for object_controls -> relationships
Python
apache-2.0
AleksNeStu/ggrc-core,andrei-karalionak/ggrc-core,hasanalom/ggrc-core,kr41/ggrc-core,josthkko/ggrc-core,uskudnik/ggrc-core,VinnieJohns/ggrc-core,kr41/ggrc-core,selahssea/ggrc-core,andrei-karalionak/ggrc-core,hyperNURb/ggrc-core,edofic/ggrc-core,jmakov/ggrc-core,plamut/ggrc-core,prasannav7/ggrc-core,VinnieJohns/ggrc-core...
Add a migration for object_controls -> relationships
# Copyright (C) 2015 Google Inc., authors, and contributors <see AUTHORS file> # Licensed under http://www.apache.org/licenses/LICENSE-2.0 <see LICENSE file> # Created By: [email protected] # Maintained By: [email protected] """Migrate object_controls to relationships Revision ID: 29d21b3c24b4 Revises: ...
<commit_before><commit_msg>Add a migration for object_controls -> relationships<commit_after>
# Copyright (C) 2015 Google Inc., authors, and contributors <see AUTHORS file> # Licensed under http://www.apache.org/licenses/LICENSE-2.0 <see LICENSE file> # Created By: [email protected] # Maintained By: [email protected] """Migrate object_controls to relationships Revision ID: 29d21b3c24b4 Revises: ...
Add a migration for object_controls -> relationships# Copyright (C) 2015 Google Inc., authors, and contributors <see AUTHORS file> # Licensed under http://www.apache.org/licenses/LICENSE-2.0 <see LICENSE file> # Created By: [email protected] # Maintained By: [email protected] """Migrate object_controls t...
<commit_before><commit_msg>Add a migration for object_controls -> relationships<commit_after># Copyright (C) 2015 Google Inc., authors, and contributors <see AUTHORS file> # Licensed under http://www.apache.org/licenses/LICENSE-2.0 <see LICENSE file> # Created By: [email protected] # Maintained By: anze@reciproc...
3047958a14f8e428404a4a29c43600b85fce6621
packages/syft/src/syft/core/node/common/node_service/simple/obj_exists.py
packages/syft/src/syft/core/node/common/node_service/simple/obj_exists.py
# stdlib from typing import Any from typing import Optional # third party from nacl.signing import VerifyKey # relative from ... import UID from ....abstract.node import AbstractNode from .simple_messages import NodeRunnableMessageWithReply class DoesObjectExistMessage(NodeRunnableMessageWithReply): __attr_all...
Add new message which checks whether an object exists
Add new message which checks whether an object exists
Python
apache-2.0
OpenMined/PySyft,OpenMined/PySyft,OpenMined/PySyft,OpenMined/PySyft
Add new message which checks whether an object exists
# stdlib from typing import Any from typing import Optional # third party from nacl.signing import VerifyKey # relative from ... import UID from ....abstract.node import AbstractNode from .simple_messages import NodeRunnableMessageWithReply class DoesObjectExistMessage(NodeRunnableMessageWithReply): __attr_all...
<commit_before><commit_msg>Add new message which checks whether an object exists<commit_after>
# stdlib from typing import Any from typing import Optional # third party from nacl.signing import VerifyKey # relative from ... import UID from ....abstract.node import AbstractNode from .simple_messages import NodeRunnableMessageWithReply class DoesObjectExistMessage(NodeRunnableMessageWithReply): __attr_all...
Add new message which checks whether an object exists# stdlib from typing import Any from typing import Optional # third party from nacl.signing import VerifyKey # relative from ... import UID from ....abstract.node import AbstractNode from .simple_messages import NodeRunnableMessageWithReply class DoesObjectExistM...
<commit_before><commit_msg>Add new message which checks whether an object exists<commit_after># stdlib from typing import Any from typing import Optional # third party from nacl.signing import VerifyKey # relative from ... import UID from ....abstract.node import AbstractNode from .simple_messages import NodeRunnable...
cf8f70e61af991ef45f2528ad1e18c017b3fef67
processjsontree.py
processjsontree.py
#!/usr/bin/env python """Process a JSON file tree.""" import os import json import logging import sys def main(): logging.basicConfig(level=logging.INFO) input = sys.stdin.read() obj = json.loads(input) ProcessJsonTree(obj) def ProcessJsonTree(json_obj): pass if __name__ == '__main__': main()
Add script to process a jsontree (this will soon parse with esprima).
Add script to process a jsontree (this will soon parse with esprima).
Python
apache-2.0
nanaze/jsdoctor,Prachigarg1/Prachi,Prachigarg1/Prachi,nanaze/jsdoctor,Prachigarg1/Prachi,nanaze/jsdoctor
Add script to process a jsontree (this will soon parse with esprima).
#!/usr/bin/env python """Process a JSON file tree.""" import os import json import logging import sys def main(): logging.basicConfig(level=logging.INFO) input = sys.stdin.read() obj = json.loads(input) ProcessJsonTree(obj) def ProcessJsonTree(json_obj): pass if __name__ == '__main__': main()
<commit_before><commit_msg>Add script to process a jsontree (this will soon parse with esprima).<commit_after>
#!/usr/bin/env python """Process a JSON file tree.""" import os import json import logging import sys def main(): logging.basicConfig(level=logging.INFO) input = sys.stdin.read() obj = json.loads(input) ProcessJsonTree(obj) def ProcessJsonTree(json_obj): pass if __name__ == '__main__': main()
Add script to process a jsontree (this will soon parse with esprima).#!/usr/bin/env python """Process a JSON file tree.""" import os import json import logging import sys def main(): logging.basicConfig(level=logging.INFO) input = sys.stdin.read() obj = json.loads(input) ProcessJsonTree(obj) def ProcessJson...
<commit_before><commit_msg>Add script to process a jsontree (this will soon parse with esprima).<commit_after>#!/usr/bin/env python """Process a JSON file tree.""" import os import json import logging import sys def main(): logging.basicConfig(level=logging.INFO) input = sys.stdin.read() obj = json.loads(input...
51868ecddb39e20bdf6fb5ad242267d421d799ca
alice3/rombasic/lst2prn.py
alice3/rombasic/lst2prn.py
#!python import sys print ' ', print_labels = False for line in sys.stdin: if line.strip() == "; +++ global symbols +++": break; dummy = sys.stdin.next() for line in sys.stdin: if len(line.strip()) == 0: break else: parts = line.strip().split("="); if len(parts) > 1: ...
Add tool to convert zasm .lst to az80 .prn for simualtor symbols
Add tool to convert zasm .lst to az80 .prn for simualtor symbols
Python
apache-2.0
lkesteloot/alice,lkesteloot/alice,lkesteloot/alice,lkesteloot/alice,lkesteloot/alice,lkesteloot/alice
Add tool to convert zasm .lst to az80 .prn for simualtor symbols
#!python import sys print ' ', print_labels = False for line in sys.stdin: if line.strip() == "; +++ global symbols +++": break; dummy = sys.stdin.next() for line in sys.stdin: if len(line.strip()) == 0: break else: parts = line.strip().split("="); if len(parts) > 1: ...
<commit_before><commit_msg>Add tool to convert zasm .lst to az80 .prn for simualtor symbols<commit_after>
#!python import sys print ' ', print_labels = False for line in sys.stdin: if line.strip() == "; +++ global symbols +++": break; dummy = sys.stdin.next() for line in sys.stdin: if len(line.strip()) == 0: break else: parts = line.strip().split("="); if len(parts) > 1: ...
Add tool to convert zasm .lst to az80 .prn for simualtor symbols#!python import sys print ' ', print_labels = False for line in sys.stdin: if line.strip() == "; +++ global symbols +++": break; dummy = sys.stdin.next() for line in sys.stdin: if len(line.strip()) == 0: break else: ...
<commit_before><commit_msg>Add tool to convert zasm .lst to az80 .prn for simualtor symbols<commit_after>#!python import sys print ' ', print_labels = False for line in sys.stdin: if line.strip() == "; +++ global symbols +++": break; dummy = sys.stdin.next() for line in sys.stdin: if len(line.stri...
b6e5d994d5db9db1fb3d732074f37177824bd594
src/lib/apply_json_metadata.py
src/lib/apply_json_metadata.py
# Copyright 2020 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, ...
Add utility to set GCS JSON metadata
Add utility to set GCS JSON metadata
Python
apache-2.0
GoogleCloudPlatform/covid-19-open-data,GoogleCloudPlatform/covid-19-open-data
Add utility to set GCS JSON metadata
# Copyright 2020 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, ...
<commit_before><commit_msg>Add utility to set GCS JSON metadata<commit_after>
# Copyright 2020 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, ...
Add utility to set GCS JSON metadata# Copyright 2020 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by appl...
<commit_before><commit_msg>Add utility to set GCS JSON metadata<commit_after># Copyright 2020 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/license...
f31f65ed111ad2ec7e7502ad8ae147d3fca4a39d
tests/util_test.py
tests/util_test.py
import os from photoshell import util def test_hash_file(tmpdir): tmpdir.join('file.test').write("Test") assert (util.hash_file(os.path.join(tmpdir.strpath, 'file.test')) == '640ab2bae07bedc4c163f679a746f7ab7fb5d1fa')
Add a test for file hashing
Add a test for file hashing
Python
mit
SamWhited/photoshell,campaul/photoshell,photoshell/photoshell
Add a test for file hashing
import os from photoshell import util def test_hash_file(tmpdir): tmpdir.join('file.test').write("Test") assert (util.hash_file(os.path.join(tmpdir.strpath, 'file.test')) == '640ab2bae07bedc4c163f679a746f7ab7fb5d1fa')
<commit_before><commit_msg>Add a test for file hashing<commit_after>
import os from photoshell import util def test_hash_file(tmpdir): tmpdir.join('file.test').write("Test") assert (util.hash_file(os.path.join(tmpdir.strpath, 'file.test')) == '640ab2bae07bedc4c163f679a746f7ab7fb5d1fa')
Add a test for file hashingimport os from photoshell import util def test_hash_file(tmpdir): tmpdir.join('file.test').write("Test") assert (util.hash_file(os.path.join(tmpdir.strpath, 'file.test')) == '640ab2bae07bedc4c163f679a746f7ab7fb5d1fa')
<commit_before><commit_msg>Add a test for file hashing<commit_after>import os from photoshell import util def test_hash_file(tmpdir): tmpdir.join('file.test').write("Test") assert (util.hash_file(os.path.join(tmpdir.strpath, 'file.test')) == '640ab2bae07bedc4c163f679a746f7ab7fb5d1fa')
45122a9e1af09cf79391801e0c8728e7a881aa34
tests/alternate_encoding_test.py
tests/alternate_encoding_test.py
import redisdl import unittest import json import os.path from . import util class RedisdlTest(unittest.TestCase): def setUp(self): import redis self.r = redis.Redis(charset='latin1') for key in self.r.keys('*'): self.r.delete(key) def test_dump_unicode_value(self): ...
Test alternate encodings when dumping and loading
Test alternate encodings when dumping and loading
Python
bsd-2-clause
p/redis-dump-load,p/redis-dump-load,hyunchel/redis-dump-load,hyunchel/redis-dump-load
Test alternate encodings when dumping and loading
import redisdl import unittest import json import os.path from . import util class RedisdlTest(unittest.TestCase): def setUp(self): import redis self.r = redis.Redis(charset='latin1') for key in self.r.keys('*'): self.r.delete(key) def test_dump_unicode_value(self): ...
<commit_before><commit_msg>Test alternate encodings when dumping and loading<commit_after>
import redisdl import unittest import json import os.path from . import util class RedisdlTest(unittest.TestCase): def setUp(self): import redis self.r = redis.Redis(charset='latin1') for key in self.r.keys('*'): self.r.delete(key) def test_dump_unicode_value(self): ...
Test alternate encodings when dumping and loadingimport redisdl import unittest import json import os.path from . import util class RedisdlTest(unittest.TestCase): def setUp(self): import redis self.r = redis.Redis(charset='latin1') for key in self.r.keys('*'): self.r.delete(key...
<commit_before><commit_msg>Test alternate encodings when dumping and loading<commit_after>import redisdl import unittest import json import os.path from . import util class RedisdlTest(unittest.TestCase): def setUp(self): import redis self.r = redis.Redis(charset='latin1') for key in self.r...
d4a36fb392139f1eb30524c1cf99d939be5542b7
tests/test_commands/test_update.py
tests/test_commands/test_update.py
# Copyright 2015 0xc0170 # # 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, soft...
Test - add commands test folder, first test - update command
Test - add commands test folder, first test - update command
Python
apache-2.0
ohagendorf/project_generator,project-generator/project_generator,0xc0170/project_generator,molejar/project_generator,hwfwgrp/project_generator,sarahmarshy/project_generator
Test - add commands test folder, first test - update command
# Copyright 2015 0xc0170 # # 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, soft...
<commit_before><commit_msg>Test - add commands test folder, first test - update command<commit_after>
# Copyright 2015 0xc0170 # # 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, soft...
Test - add commands test folder, first test - update command# Copyright 2015 0xc0170 # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unl...
<commit_before><commit_msg>Test - add commands test folder, first test - update command<commit_after># Copyright 2015 0xc0170 # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://ww...
547fb9e7290295848f81e62d26483b2576fe720f
skan/test/test_nx.py
skan/test/test_nx.py
import os, sys import numpy as np from numpy.testing import assert_equal, assert_almost_equal from skan import nx rundir = os.path.dirname(os.path.abspath(__file__)) sys.path.append(rundir) from skan._testdata import tinycycle, skeleton1, skeleton2 def test_tiny_cycle(): g, degimg, skel_labels = nx.skeleton_to_...
Add tests for nx backend
Add tests for nx backend
Python
bsd-3-clause
jni/skan
Add tests for nx backend
import os, sys import numpy as np from numpy.testing import assert_equal, assert_almost_equal from skan import nx rundir = os.path.dirname(os.path.abspath(__file__)) sys.path.append(rundir) from skan._testdata import tinycycle, skeleton1, skeleton2 def test_tiny_cycle(): g, degimg, skel_labels = nx.skeleton_to_...
<commit_before><commit_msg>Add tests for nx backend<commit_after>
import os, sys import numpy as np from numpy.testing import assert_equal, assert_almost_equal from skan import nx rundir = os.path.dirname(os.path.abspath(__file__)) sys.path.append(rundir) from skan._testdata import tinycycle, skeleton1, skeleton2 def test_tiny_cycle(): g, degimg, skel_labels = nx.skeleton_to_...
Add tests for nx backendimport os, sys import numpy as np from numpy.testing import assert_equal, assert_almost_equal from skan import nx rundir = os.path.dirname(os.path.abspath(__file__)) sys.path.append(rundir) from skan._testdata import tinycycle, skeleton1, skeleton2 def test_tiny_cycle(): g, degimg, skel_...
<commit_before><commit_msg>Add tests for nx backend<commit_after>import os, sys import numpy as np from numpy.testing import assert_equal, assert_almost_equal from skan import nx rundir = os.path.dirname(os.path.abspath(__file__)) sys.path.append(rundir) from skan._testdata import tinycycle, skeleton1, skeleton2 de...
ff23ae7705aa2841ff92d273d4e4851e3b7411c5
ws-tests/test_invalid_study_put.py
ws-tests/test_invalid_study_put.py
#!/usr/bin/env python from opentreetesting import test_http_json_method, config import datetime import codecs import json import sys import os # this makes it easier to test concurrent pushes to different branches if len(sys.argv) > 1: study_id = sys.argv[1] else: study_id = 1003 DOMAIN = config('host', 'apih...
Add a test for invalid PUTs which do not have a valid auth_token
Add a test for invalid PUTs which do not have a valid auth_token
Python
bsd-2-clause
OpenTreeOfLife/phylesystem-api,OpenTreeOfLife/phylesystem-api,OpenTreeOfLife/phylesystem-api
Add a test for invalid PUTs which do not have a valid auth_token
#!/usr/bin/env python from opentreetesting import test_http_json_method, config import datetime import codecs import json import sys import os # this makes it easier to test concurrent pushes to different branches if len(sys.argv) > 1: study_id = sys.argv[1] else: study_id = 1003 DOMAIN = config('host', 'apih...
<commit_before><commit_msg>Add a test for invalid PUTs which do not have a valid auth_token<commit_after>
#!/usr/bin/env python from opentreetesting import test_http_json_method, config import datetime import codecs import json import sys import os # this makes it easier to test concurrent pushes to different branches if len(sys.argv) > 1: study_id = sys.argv[1] else: study_id = 1003 DOMAIN = config('host', 'apih...
Add a test for invalid PUTs which do not have a valid auth_token#!/usr/bin/env python from opentreetesting import test_http_json_method, config import datetime import codecs import json import sys import os # this makes it easier to test concurrent pushes to different branches if len(sys.argv) > 1: study_id = sys....
<commit_before><commit_msg>Add a test for invalid PUTs which do not have a valid auth_token<commit_after>#!/usr/bin/env python from opentreetesting import test_http_json_method, config import datetime import codecs import json import sys import os # this makes it easier to test concurrent pushes to different branches ...
24d4168f34a50814a72886acde1a99d063324744
unit_tests/magic_mock_example.py
unit_tests/magic_mock_example.py
from mock import MagicMock from calculator import Calculator thing = Calculator() thing.mymethod = MagicMock(return_value = {'x':'X'}) thing.mymethod(1,2,3,4,5,6,7,8,9,0, k='val') thing.mymethod.assert_called_with(1,2,3,4,5,6,7,8,9,0, k='val')
Add new example with maginc mock
Add new example with maginc mock
Python
mit
rolandovillca/python_introduction_basic,rolandovillca/python_basic_introduction,rolandovillca/python_basis,rolandovillca/python_basic_concepts
Add new example with maginc mock
from mock import MagicMock from calculator import Calculator thing = Calculator() thing.mymethod = MagicMock(return_value = {'x':'X'}) thing.mymethod(1,2,3,4,5,6,7,8,9,0, k='val') thing.mymethod.assert_called_with(1,2,3,4,5,6,7,8,9,0, k='val')
<commit_before><commit_msg>Add new example with maginc mock<commit_after>
from mock import MagicMock from calculator import Calculator thing = Calculator() thing.mymethod = MagicMock(return_value = {'x':'X'}) thing.mymethod(1,2,3,4,5,6,7,8,9,0, k='val') thing.mymethod.assert_called_with(1,2,3,4,5,6,7,8,9,0, k='val')
Add new example with maginc mockfrom mock import MagicMock from calculator import Calculator thing = Calculator() thing.mymethod = MagicMock(return_value = {'x':'X'}) thing.mymethod(1,2,3,4,5,6,7,8,9,0, k='val') thing.mymethod.assert_called_with(1,2,3,4,5,6,7,8,9,0, k='val')
<commit_before><commit_msg>Add new example with maginc mock<commit_after>from mock import MagicMock from calculator import Calculator thing = Calculator() thing.mymethod = MagicMock(return_value = {'x':'X'}) thing.mymethod(1,2,3,4,5,6,7,8,9,0, k='val') thing.mymethod.assert_called_with(1,2,3,4,5,6,7,8,9,0, k='val') ...
a56400f6b503aaba19fa5a1969831db9c6b0552d
tests/framework/test_bmi_ugrid.py
tests/framework/test_bmi_ugrid.py
"""Unit tests for the pymt.framwork.bmi_ugrid module.""" import numpy as np import xarray as xr from pymt.framework.bmi_ugrid import Scalar, Vector from pymt.framework.bmi_bridge import _BmiCap grid_id = 0 class TestScalar: def get_grid_rank(self, grid_id): return 0 class ScalarBmi(_BmiCap): _cl...
Write unit tests for scalar and vector classes
Write unit tests for scalar and vector classes
Python
mit
csdms/pymt
Write unit tests for scalar and vector classes
"""Unit tests for the pymt.framwork.bmi_ugrid module.""" import numpy as np import xarray as xr from pymt.framework.bmi_ugrid import Scalar, Vector from pymt.framework.bmi_bridge import _BmiCap grid_id = 0 class TestScalar: def get_grid_rank(self, grid_id): return 0 class ScalarBmi(_BmiCap): _cl...
<commit_before><commit_msg>Write unit tests for scalar and vector classes<commit_after>
"""Unit tests for the pymt.framwork.bmi_ugrid module.""" import numpy as np import xarray as xr from pymt.framework.bmi_ugrid import Scalar, Vector from pymt.framework.bmi_bridge import _BmiCap grid_id = 0 class TestScalar: def get_grid_rank(self, grid_id): return 0 class ScalarBmi(_BmiCap): _cl...
Write unit tests for scalar and vector classes"""Unit tests for the pymt.framwork.bmi_ugrid module.""" import numpy as np import xarray as xr from pymt.framework.bmi_ugrid import Scalar, Vector from pymt.framework.bmi_bridge import _BmiCap grid_id = 0 class TestScalar: def get_grid_rank(self, grid_id): ...
<commit_before><commit_msg>Write unit tests for scalar and vector classes<commit_after>"""Unit tests for the pymt.framwork.bmi_ugrid module.""" import numpy as np import xarray as xr from pymt.framework.bmi_ugrid import Scalar, Vector from pymt.framework.bmi_bridge import _BmiCap grid_id = 0 class TestScalar: ...
05de65933792140703bcdd14f5c7f7239251e1b1
thinc/tests/unit/test_loss.py
thinc/tests/unit/test_loss.py
# coding: utf-8 from __future__ import unicode_literals import pytest from mock import MagicMock from numpy import ndarray from ...loss import categorical_crossentropy @pytest.mark.parametrize('shape,labels', [([100, 100, 100], [-1, -1, -1])]) def test_loss(shape, labels): scores = MagicMock(spec=ndarray, shape...
Add test for loss function
Add test for loss function
Python
mit
spacy-io/thinc,spacy-io/thinc,explosion/thinc,spacy-io/thinc,explosion/thinc,explosion/thinc,explosion/thinc
Add test for loss function
# coding: utf-8 from __future__ import unicode_literals import pytest from mock import MagicMock from numpy import ndarray from ...loss import categorical_crossentropy @pytest.mark.parametrize('shape,labels', [([100, 100, 100], [-1, -1, -1])]) def test_loss(shape, labels): scores = MagicMock(spec=ndarray, shape...
<commit_before><commit_msg>Add test for loss function<commit_after>
# coding: utf-8 from __future__ import unicode_literals import pytest from mock import MagicMock from numpy import ndarray from ...loss import categorical_crossentropy @pytest.mark.parametrize('shape,labels', [([100, 100, 100], [-1, -1, -1])]) def test_loss(shape, labels): scores = MagicMock(spec=ndarray, shape...
Add test for loss function# coding: utf-8 from __future__ import unicode_literals import pytest from mock import MagicMock from numpy import ndarray from ...loss import categorical_crossentropy @pytest.mark.parametrize('shape,labels', [([100, 100, 100], [-1, -1, -1])]) def test_loss(shape, labels): scores = Mag...
<commit_before><commit_msg>Add test for loss function<commit_after># coding: utf-8 from __future__ import unicode_literals import pytest from mock import MagicMock from numpy import ndarray from ...loss import categorical_crossentropy @pytest.mark.parametrize('shape,labels', [([100, 100, 100], [-1, -1, -1])]) def t...
8f30914f7c16aa56db20c612a382ee5ea5c67a5e
tools/debugging/migrate_db.py
tools/debugging/migrate_db.py
""" """ import click import gevent import structlog from raiden.exceptions import InvalidDBData, RaidenDBUpgradeError from raiden.storage import serialize, sqlite from raiden.utils.upgrades import UpgradeManager log = structlog.get_logger(__name__) database_path = "" def upgrade_db(current_version: int, new_versi...
Add DB upgrade debugging script
Add DB upgrade debugging script [skip ci]
Python
mit
hackaugusto/raiden,hackaugusto/raiden
Add DB upgrade debugging script [skip ci]
""" """ import click import gevent import structlog from raiden.exceptions import InvalidDBData, RaidenDBUpgradeError from raiden.storage import serialize, sqlite from raiden.utils.upgrades import UpgradeManager log = structlog.get_logger(__name__) database_path = "" def upgrade_db(current_version: int, new_versi...
<commit_before><commit_msg>Add DB upgrade debugging script [skip ci]<commit_after>
""" """ import click import gevent import structlog from raiden.exceptions import InvalidDBData, RaidenDBUpgradeError from raiden.storage import serialize, sqlite from raiden.utils.upgrades import UpgradeManager log = structlog.get_logger(__name__) database_path = "" def upgrade_db(current_version: int, new_versi...
Add DB upgrade debugging script [skip ci]""" """ import click import gevent import structlog from raiden.exceptions import InvalidDBData, RaidenDBUpgradeError from raiden.storage import serialize, sqlite from raiden.utils.upgrades import UpgradeManager log = structlog.get_logger(__name__) database_path = "" def ...
<commit_before><commit_msg>Add DB upgrade debugging script [skip ci]<commit_after>""" """ import click import gevent import structlog from raiden.exceptions import InvalidDBData, RaidenDBUpgradeError from raiden.storage import serialize, sqlite from raiden.utils.upgrades import UpgradeManager log = structlog.get_lo...
5a67efecccb91f68efbe7b14406a14c8151a2e9e
spacy/tests/parser/test_preset_sbd.py
spacy/tests/parser/test_preset_sbd.py
'''Test that the parser respects preset sentence boundaries.''' import pytest from thinc.neural.optimizers import Adam from thinc.neural.ops import NumpyOps from ...attrs import NORM from ...gold import GoldParse from ...vocab import Vocab from ...tokens import Doc from ...pipeline import NeuralDependencyParser @pyte...
Add tests for sentence segmentation presetting
Add tests for sentence segmentation presetting
Python
mit
explosion/spaCy,honnibal/spaCy,aikramer2/spaCy,spacy-io/spaCy,aikramer2/spaCy,aikramer2/spaCy,spacy-io/spaCy,aikramer2/spaCy,honnibal/spaCy,recognai/spaCy,explosion/spaCy,explosion/spaCy,explosion/spaCy,spacy-io/spaCy,recognai/spaCy,spacy-io/spaCy,honnibal/spaCy,aikramer2/spaCy,spacy-io/spaCy,explosion/spaCy,recognai/s...
Add tests for sentence segmentation presetting
'''Test that the parser respects preset sentence boundaries.''' import pytest from thinc.neural.optimizers import Adam from thinc.neural.ops import NumpyOps from ...attrs import NORM from ...gold import GoldParse from ...vocab import Vocab from ...tokens import Doc from ...pipeline import NeuralDependencyParser @pyte...
<commit_before><commit_msg>Add tests for sentence segmentation presetting<commit_after>
'''Test that the parser respects preset sentence boundaries.''' import pytest from thinc.neural.optimizers import Adam from thinc.neural.ops import NumpyOps from ...attrs import NORM from ...gold import GoldParse from ...vocab import Vocab from ...tokens import Doc from ...pipeline import NeuralDependencyParser @pyte...
Add tests for sentence segmentation presetting'''Test that the parser respects preset sentence boundaries.''' import pytest from thinc.neural.optimizers import Adam from thinc.neural.ops import NumpyOps from ...attrs import NORM from ...gold import GoldParse from ...vocab import Vocab from ...tokens import Doc from .....
<commit_before><commit_msg>Add tests for sentence segmentation presetting<commit_after>'''Test that the parser respects preset sentence boundaries.''' import pytest from thinc.neural.optimizers import Adam from thinc.neural.ops import NumpyOps from ...attrs import NORM from ...gold import GoldParse from ...vocab impor...
ad425bed540e3bfdb5e825dc58eb96cea3f04903
tests/test_ruby.py
tests/test_ruby.py
import json from lints.ruby import Ruby def test_ruby(): msg = [ 'app/models/message:50: syntax error, unexpected end-of-input, expecting keyword_end', ] res = Ruby().parse_loclist(msg, 1) assert json.loads(res)[0] == { "lnum": "50", "bufnr": 1, "enum": 1, "tex...
Add test for ruby linter
Add test for ruby linter
Python
mit
maralla/vim-fixup,maralla/vim-linter,maralla/validator.vim,maralla/vim-linter,maralla/vim-fixup
Add test for ruby linter
import json from lints.ruby import Ruby def test_ruby(): msg = [ 'app/models/message:50: syntax error, unexpected end-of-input, expecting keyword_end', ] res = Ruby().parse_loclist(msg, 1) assert json.loads(res)[0] == { "lnum": "50", "bufnr": 1, "enum": 1, "tex...
<commit_before><commit_msg>Add test for ruby linter<commit_after>
import json from lints.ruby import Ruby def test_ruby(): msg = [ 'app/models/message:50: syntax error, unexpected end-of-input, expecting keyword_end', ] res = Ruby().parse_loclist(msg, 1) assert json.loads(res)[0] == { "lnum": "50", "bufnr": 1, "enum": 1, "tex...
Add test for ruby linterimport json from lints.ruby import Ruby def test_ruby(): msg = [ 'app/models/message:50: syntax error, unexpected end-of-input, expecting keyword_end', ] res = Ruby().parse_loclist(msg, 1) assert json.loads(res)[0] == { "lnum": "50", "bufnr": 1, ...
<commit_before><commit_msg>Add test for ruby linter<commit_after>import json from lints.ruby import Ruby def test_ruby(): msg = [ 'app/models/message:50: syntax error, unexpected end-of-input, expecting keyword_end', ] res = Ruby().parse_loclist(msg, 1) assert json.loads(res)[0] == { ...
d395bd17d9f3776beb0cc5205e791d5be363d87d
Examples/BouncyBall/BouncyBall.py
Examples/BouncyBall/BouncyBall.py
#Imports from tphysics import VerletCircle, Rectangle, Game from Tkinter import TclError #Create the game g = Game("Bouncy Ball", 600, 600, "grey") #Create the walls walls = [Rectangle(-290, 0, 20, 600), Rectangle(290, 0, 20, 600), Rectangle(0, 290, 600, 20), Rectangle(0, -290, 600, 20)] #Add the walls to the game f...
Create a bouncy ball example that uses verlet integration.
Create a bouncy ball example that uses verlet integration.
Python
mit
thebillington/tphysics
Create a bouncy ball example that uses verlet integration.
#Imports from tphysics import VerletCircle, Rectangle, Game from Tkinter import TclError #Create the game g = Game("Bouncy Ball", 600, 600, "grey") #Create the walls walls = [Rectangle(-290, 0, 20, 600), Rectangle(290, 0, 20, 600), Rectangle(0, 290, 600, 20), Rectangle(0, -290, 600, 20)] #Add the walls to the game f...
<commit_before><commit_msg>Create a bouncy ball example that uses verlet integration.<commit_after>
#Imports from tphysics import VerletCircle, Rectangle, Game from Tkinter import TclError #Create the game g = Game("Bouncy Ball", 600, 600, "grey") #Create the walls walls = [Rectangle(-290, 0, 20, 600), Rectangle(290, 0, 20, 600), Rectangle(0, 290, 600, 20), Rectangle(0, -290, 600, 20)] #Add the walls to the game f...
Create a bouncy ball example that uses verlet integration.#Imports from tphysics import VerletCircle, Rectangle, Game from Tkinter import TclError #Create the game g = Game("Bouncy Ball", 600, 600, "grey") #Create the walls walls = [Rectangle(-290, 0, 20, 600), Rectangle(290, 0, 20, 600), Rectangle(0, 290, 600, 20), ...
<commit_before><commit_msg>Create a bouncy ball example that uses verlet integration.<commit_after>#Imports from tphysics import VerletCircle, Rectangle, Game from Tkinter import TclError #Create the game g = Game("Bouncy Ball", 600, 600, "grey") #Create the walls walls = [Rectangle(-290, 0, 20, 600), Rectangle(290, ...
12929fe96de4f7892856b72d86eb82217ad2972e
test/test_serve.py
test/test_serve.py
import unittest import asyncio import io import multiprocessing import urllib.request import time import grole def simple_server(): app = grole.Grole() @app.route('/') def hello(env, req): return 'Hello, World!' app.run() class TestServe(unittest.TestCase): def test_simple(self): ...
Add test of running the server
Add test of running the server
Python
mit
witchard/grole
Add test of running the server
import unittest import asyncio import io import multiprocessing import urllib.request import time import grole def simple_server(): app = grole.Grole() @app.route('/') def hello(env, req): return 'Hello, World!' app.run() class TestServe(unittest.TestCase): def test_simple(self): ...
<commit_before><commit_msg>Add test of running the server<commit_after>
import unittest import asyncio import io import multiprocessing import urllib.request import time import grole def simple_server(): app = grole.Grole() @app.route('/') def hello(env, req): return 'Hello, World!' app.run() class TestServe(unittest.TestCase): def test_simple(self): ...
Add test of running the serverimport unittest import asyncio import io import multiprocessing import urllib.request import time import grole def simple_server(): app = grole.Grole() @app.route('/') def hello(env, req): return 'Hello, World!' app.run() class TestServe(unittest.TestCase): ...
<commit_before><commit_msg>Add test of running the server<commit_after>import unittest import asyncio import io import multiprocessing import urllib.request import time import grole def simple_server(): app = grole.Grole() @app.route('/') def hello(env, req): return 'Hello, World!' app.run()...
dfde3b4bff462acdcfb4436c898110fda889b415
src/tests/orientated_bins_test.py
src/tests/orientated_bins_test.py
import unittest import nose.tools import numpy as np import skimage.io as io from scipy.ndimage.filters import gaussian_filter from mammogram.orientated_bins import orientated_bins class OrientatedBinsTest(unittest.TestCase): def test_with_pure_structure(self): size = 20 linear_structure = np.ze...
Add some tests for the orientated bins
Add some tests for the orientated bins
Python
mit
samueljackson92/major-project,samueljackson92/major-project,samueljackson92/major-project,samueljackson92/major-project
Add some tests for the orientated bins
import unittest import nose.tools import numpy as np import skimage.io as io from scipy.ndimage.filters import gaussian_filter from mammogram.orientated_bins import orientated_bins class OrientatedBinsTest(unittest.TestCase): def test_with_pure_structure(self): size = 20 linear_structure = np.ze...
<commit_before><commit_msg>Add some tests for the orientated bins<commit_after>
import unittest import nose.tools import numpy as np import skimage.io as io from scipy.ndimage.filters import gaussian_filter from mammogram.orientated_bins import orientated_bins class OrientatedBinsTest(unittest.TestCase): def test_with_pure_structure(self): size = 20 linear_structure = np.ze...
Add some tests for the orientated binsimport unittest import nose.tools import numpy as np import skimage.io as io from scipy.ndimage.filters import gaussian_filter from mammogram.orientated_bins import orientated_bins class OrientatedBinsTest(unittest.TestCase): def test_with_pure_structure(self): size...
<commit_before><commit_msg>Add some tests for the orientated bins<commit_after>import unittest import nose.tools import numpy as np import skimage.io as io from scipy.ndimage.filters import gaussian_filter from mammogram.orientated_bins import orientated_bins class OrientatedBinsTest(unittest.TestCase): def tes...
4cc819e76cad1e873ea16e0b8bf0a64260967af4
server/lib/python/cartodb_services/cartodb_services/here/service_factory.py
server/lib/python/cartodb_services/cartodb_services/here/service_factory.py
from cartodb_services.here.geocoder import HereMapsGeocoder, HereMapsGeocoderV7 from cartodb_services.here.bulk_geocoder import HereMapsBulkGeocoder, HereMapsBulkGeocoderV7 from cartodb_services.here.routing import HereMapsRoutingIsoline, HereMapsRoutingIsolineV8 GEOCODING_DEFAULT_MAXRESULTS = 1 def get_geocoder(logg...
Add service factory module to return appropiate service version
Add service factory module to return appropiate service version
Python
bsd-3-clause
CartoDB/dataservices-api,CartoDB/geocoder-api,CartoDB/dataservices-api,CartoDB/dataservices-api,CartoDB/dataservices-api,CartoDB/geocoder-api,CartoDB/geocoder-api,CartoDB/geocoder-api
Add service factory module to return appropiate service version
from cartodb_services.here.geocoder import HereMapsGeocoder, HereMapsGeocoderV7 from cartodb_services.here.bulk_geocoder import HereMapsBulkGeocoder, HereMapsBulkGeocoderV7 from cartodb_services.here.routing import HereMapsRoutingIsoline, HereMapsRoutingIsolineV8 GEOCODING_DEFAULT_MAXRESULTS = 1 def get_geocoder(logg...
<commit_before><commit_msg>Add service factory module to return appropiate service version<commit_after>
from cartodb_services.here.geocoder import HereMapsGeocoder, HereMapsGeocoderV7 from cartodb_services.here.bulk_geocoder import HereMapsBulkGeocoder, HereMapsBulkGeocoderV7 from cartodb_services.here.routing import HereMapsRoutingIsoline, HereMapsRoutingIsolineV8 GEOCODING_DEFAULT_MAXRESULTS = 1 def get_geocoder(logg...
Add service factory module to return appropiate service versionfrom cartodb_services.here.geocoder import HereMapsGeocoder, HereMapsGeocoderV7 from cartodb_services.here.bulk_geocoder import HereMapsBulkGeocoder, HereMapsBulkGeocoderV7 from cartodb_services.here.routing import HereMapsRoutingIsoline, HereMapsRoutingIso...
<commit_before><commit_msg>Add service factory module to return appropiate service version<commit_after>from cartodb_services.here.geocoder import HereMapsGeocoder, HereMapsGeocoderV7 from cartodb_services.here.bulk_geocoder import HereMapsBulkGeocoder, HereMapsBulkGeocoderV7 from cartodb_services.here.routing import H...
04717bf2b84b62e1f6de5f5a34307474abefec1e
run_task.py
run_task.py
import sys import logging import logging.config import traceback import bson.objectid import config.global_configuration as global_conf import database.client import util.database_helpers as dh def main(*args): """ Run a particular task. :args: Only argument is the id of the task to run :return: ...
Add a common run task script for all tasks. Not supported by db_client yet
Add a common run task script for all tasks. Not supported by db_client yet
Python
bsd-2-clause
jskinn/robot-vision-experiment-framework,jskinn/robot-vision-experiment-framework
Add a common run task script for all tasks. Not supported by db_client yet
import sys import logging import logging.config import traceback import bson.objectid import config.global_configuration as global_conf import database.client import util.database_helpers as dh def main(*args): """ Run a particular task. :args: Only argument is the id of the task to run :return: ...
<commit_before><commit_msg>Add a common run task script for all tasks. Not supported by db_client yet<commit_after>
import sys import logging import logging.config import traceback import bson.objectid import config.global_configuration as global_conf import database.client import util.database_helpers as dh def main(*args): """ Run a particular task. :args: Only argument is the id of the task to run :return: ...
Add a common run task script for all tasks. Not supported by db_client yetimport sys import logging import logging.config import traceback import bson.objectid import config.global_configuration as global_conf import database.client import util.database_helpers as dh def main(*args): """ Run a particular tas...
<commit_before><commit_msg>Add a common run task script for all tasks. Not supported by db_client yet<commit_after>import sys import logging import logging.config import traceback import bson.objectid import config.global_configuration as global_conf import database.client import util.database_helpers as dh def main...
97f5933e6f6b03bc7b0cc9b070316e2264359700
tests/infrastructure/test_utils.py
tests/infrastructure/test_utils.py
import random import string INDENT = '\n' + ' ' * 8 def generate_simple_output_program(source): return """thing Program setup{source} """.format(source=INDENT + INDENT.join([source] if isinstance(source, str) else source)) def generate_test_case_structure(dct): lst = [] for name, groups in list...
Move test utils to infra module
Move test utils to infra module
Python
mit
ytanay/thinglang,ytanay/thinglang,ytanay/thinglang,ytanay/thinglang
Move test utils to infra module
import random import string INDENT = '\n' + ' ' * 8 def generate_simple_output_program(source): return """thing Program setup{source} """.format(source=INDENT + INDENT.join([source] if isinstance(source, str) else source)) def generate_test_case_structure(dct): lst = [] for name, groups in list...
<commit_before><commit_msg>Move test utils to infra module<commit_after>
import random import string INDENT = '\n' + ' ' * 8 def generate_simple_output_program(source): return """thing Program setup{source} """.format(source=INDENT + INDENT.join([source] if isinstance(source, str) else source)) def generate_test_case_structure(dct): lst = [] for name, groups in list...
Move test utils to infra moduleimport random import string INDENT = '\n' + ' ' * 8 def generate_simple_output_program(source): return """thing Program setup{source} """.format(source=INDENT + INDENT.join([source] if isinstance(source, str) else source)) def generate_test_case_structure(dct): lst = ...
<commit_before><commit_msg>Move test utils to infra module<commit_after>import random import string INDENT = '\n' + ' ' * 8 def generate_simple_output_program(source): return """thing Program setup{source} """.format(source=INDENT + INDENT.join([source] if isinstance(source, str) else source)) def gene...
9591911cf98348a771f7fffc8951bfd578cc02ce
send_sms.py
send_sms.py
# Download the twilio-python library from http://twilio.com/docs/libraries from twilio.rest import TwilioRestClient import config # Find these values at https://twilio.com/user/account account_sid = "ACXXXXXXXXXXXXXXXXX" auth_token = "YYYYYYYYYYYYYYYYYY" client = TwilioRestClient(account_sid, auth_token) message = cl...
Add snippet for sending sms.
Add snippet for sending sms.
Python
mit
mattstibbs/twilio-snippets
Add snippet for sending sms.
# Download the twilio-python library from http://twilio.com/docs/libraries from twilio.rest import TwilioRestClient import config # Find these values at https://twilio.com/user/account account_sid = "ACXXXXXXXXXXXXXXXXX" auth_token = "YYYYYYYYYYYYYYYYYY" client = TwilioRestClient(account_sid, auth_token) message = cl...
<commit_before><commit_msg>Add snippet for sending sms.<commit_after>
# Download the twilio-python library from http://twilio.com/docs/libraries from twilio.rest import TwilioRestClient import config # Find these values at https://twilio.com/user/account account_sid = "ACXXXXXXXXXXXXXXXXX" auth_token = "YYYYYYYYYYYYYYYYYY" client = TwilioRestClient(account_sid, auth_token) message = cl...
Add snippet for sending sms.# Download the twilio-python library from http://twilio.com/docs/libraries from twilio.rest import TwilioRestClient import config # Find these values at https://twilio.com/user/account account_sid = "ACXXXXXXXXXXXXXXXXX" auth_token = "YYYYYYYYYYYYYYYYYY" client = TwilioRestClient(account_si...
<commit_before><commit_msg>Add snippet for sending sms.<commit_after># Download the twilio-python library from http://twilio.com/docs/libraries from twilio.rest import TwilioRestClient import config # Find these values at https://twilio.com/user/account account_sid = "ACXXXXXXXXXXXXXXXXX" auth_token = "YYYYYYYYYYYYYYY...
4fa3db89bd5a8a00a654cb294ca3b0acf080dd3e
bluebottle/wallposts/migrations/0003_mediawallpost_results_page.py
bluebottle/wallposts/migrations/0003_mediawallpost_results_page.py
# -*- coding: utf-8 -*- # Generated by Django 1.10.2 on 2016-11-15 15:03 from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('wallposts', '0002_auto_20161115_1601'), ] operations = [ migrations.AddFiel...
Add results boolean to wallpost pics
Add results boolean to wallpost pics
Python
bsd-3-clause
onepercentclub/bluebottle,onepercentclub/bluebottle,onepercentclub/bluebottle,onepercentclub/bluebottle,onepercentclub/bluebottle
Add results boolean to wallpost pics
# -*- coding: utf-8 -*- # Generated by Django 1.10.2 on 2016-11-15 15:03 from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('wallposts', '0002_auto_20161115_1601'), ] operations = [ migrations.AddFiel...
<commit_before><commit_msg>Add results boolean to wallpost pics<commit_after>
# -*- coding: utf-8 -*- # Generated by Django 1.10.2 on 2016-11-15 15:03 from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('wallposts', '0002_auto_20161115_1601'), ] operations = [ migrations.AddFiel...
Add results boolean to wallpost pics# -*- coding: utf-8 -*- # Generated by Django 1.10.2 on 2016-11-15 15:03 from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('wallposts', '0002_auto_20161115_1601'), ] opera...
<commit_before><commit_msg>Add results boolean to wallpost pics<commit_after># -*- coding: utf-8 -*- # Generated by Django 1.10.2 on 2016-11-15 15:03 from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('wallposts', '00...
5e0ff1ce486cc4281919ed9c8e96a71723300b07
test/examples/kissgp_gp_classification_test.py
test/examples/kissgp_gp_classification_test.py
import math import torch import gpytorch from torch import nn, optim from torch.autograd import Variable from gpytorch.kernels import RBFKernel, GridInterpolationKernel from gpytorch.means import ConstantMean from gpytorch.likelihoods import BernoulliLikelihood from gpytorch.random_variables import GaussianRandomVariab...
Add KISS-GP classification unit test.
Add KISS-GP classification unit test.
Python
mit
jrg365/gpytorch,jrg365/gpytorch,jrg365/gpytorch
Add KISS-GP classification unit test.
import math import torch import gpytorch from torch import nn, optim from torch.autograd import Variable from gpytorch.kernels import RBFKernel, GridInterpolationKernel from gpytorch.means import ConstantMean from gpytorch.likelihoods import BernoulliLikelihood from gpytorch.random_variables import GaussianRandomVariab...
<commit_before><commit_msg>Add KISS-GP classification unit test.<commit_after>
import math import torch import gpytorch from torch import nn, optim from torch.autograd import Variable from gpytorch.kernels import RBFKernel, GridInterpolationKernel from gpytorch.means import ConstantMean from gpytorch.likelihoods import BernoulliLikelihood from gpytorch.random_variables import GaussianRandomVariab...
Add KISS-GP classification unit test.import math import torch import gpytorch from torch import nn, optim from torch.autograd import Variable from gpytorch.kernels import RBFKernel, GridInterpolationKernel from gpytorch.means import ConstantMean from gpytorch.likelihoods import BernoulliLikelihood from gpytorch.random_...
<commit_before><commit_msg>Add KISS-GP classification unit test.<commit_after>import math import torch import gpytorch from torch import nn, optim from torch.autograd import Variable from gpytorch.kernels import RBFKernel, GridInterpolationKernel from gpytorch.means import ConstantMean from gpytorch.likelihoods import ...
1245e0aeaf5cd37e6f6c5c0feddbedededd3a458
tests/test_crypto.py
tests/test_crypto.py
from __future__ import absolute_import, division, print_function, unicode_literals import os import base64 import credsmash.aes_ctr import credsmash.aes_gcm class DummyKeyService(object): def generate_key_data(self, number_of_bytes): key = os.urandom(int(number_of_bytes)) return key, base64.b64en...
Add test to show crypto working
Add test to show crypto working
Python
apache-2.0
3stack-software/credsmash
Add test to show crypto working
from __future__ import absolute_import, division, print_function, unicode_literals import os import base64 import credsmash.aes_ctr import credsmash.aes_gcm class DummyKeyService(object): def generate_key_data(self, number_of_bytes): key = os.urandom(int(number_of_bytes)) return key, base64.b64en...
<commit_before><commit_msg>Add test to show crypto working<commit_after>
from __future__ import absolute_import, division, print_function, unicode_literals import os import base64 import credsmash.aes_ctr import credsmash.aes_gcm class DummyKeyService(object): def generate_key_data(self, number_of_bytes): key = os.urandom(int(number_of_bytes)) return key, base64.b64en...
Add test to show crypto workingfrom __future__ import absolute_import, division, print_function, unicode_literals import os import base64 import credsmash.aes_ctr import credsmash.aes_gcm class DummyKeyService(object): def generate_key_data(self, number_of_bytes): key = os.urandom(int(number_of_bytes)) ...
<commit_before><commit_msg>Add test to show crypto working<commit_after>from __future__ import absolute_import, division, print_function, unicode_literals import os import base64 import credsmash.aes_ctr import credsmash.aes_gcm class DummyKeyService(object): def generate_key_data(self, number_of_bytes): ...
db8a08d29c81ae9add1e55b7fb4aada6154dadfa
scipy/_lib/tests/test_warnings.py
scipy/_lib/tests/test_warnings.py
""" Tests which scan for certain occurrences in the code, they may not find all of these occurrences but should catch almost all. This file was adapted from numpy. """ from __future__ import division, absolute_import, print_function import sys if sys.version_info >= (3, 4): from pathlib import Path import a...
Add a test for "ignore" warning filters
TST: Add a test for "ignore" warning filters This file currently ignores the scipy/optimize/optimize.py file because of one (or actually two identical) remaining filters there. A commented out part, can be used to find all occurances of missing stacklevels to `warnings.warn`. This will not find errors in cython file...
Python
bsd-3-clause
perimosocordiae/scipy,vigna/scipy,anntzer/scipy,aarchiba/scipy,aarchiba/scipy,jamestwebber/scipy,gfyoung/scipy,perimosocordiae/scipy,ilayn/scipy,WarrenWeckesser/scipy,WarrenWeckesser/scipy,Stefan-Endres/scipy,scipy/scipy,gfyoung/scipy,lhilt/scipy,rgommers/scipy,gertingold/scipy,matthew-brett/scipy,jor-/scipy,pizzathief...
TST: Add a test for "ignore" warning filters This file currently ignores the scipy/optimize/optimize.py file because of one (or actually two identical) remaining filters there. A commented out part, can be used to find all occurances of missing stacklevels to `warnings.warn`. This will not find errors in cython file...
""" Tests which scan for certain occurrences in the code, they may not find all of these occurrences but should catch almost all. This file was adapted from numpy. """ from __future__ import division, absolute_import, print_function import sys if sys.version_info >= (3, 4): from pathlib import Path import a...
<commit_before><commit_msg>TST: Add a test for "ignore" warning filters This file currently ignores the scipy/optimize/optimize.py file because of one (or actually two identical) remaining filters there. A commented out part, can be used to find all occurances of missing stacklevels to `warnings.warn`. This will not...
""" Tests which scan for certain occurrences in the code, they may not find all of these occurrences but should catch almost all. This file was adapted from numpy. """ from __future__ import division, absolute_import, print_function import sys if sys.version_info >= (3, 4): from pathlib import Path import a...
TST: Add a test for "ignore" warning filters This file currently ignores the scipy/optimize/optimize.py file because of one (or actually two identical) remaining filters there. A commented out part, can be used to find all occurances of missing stacklevels to `warnings.warn`. This will not find errors in cython file...
<commit_before><commit_msg>TST: Add a test for "ignore" warning filters This file currently ignores the scipy/optimize/optimize.py file because of one (or actually two identical) remaining filters there. A commented out part, can be used to find all occurances of missing stacklevels to `warnings.warn`. This will not...
70291f0f276d0ae2ade1161d89627dd43e4df975
app/migrations/0002_brewpidevice_time_profile_started.py
app/migrations/0002_brewpidevice_time_profile_started.py
# -*- coding: utf-8 -*- # Generated by Django 1.10.4 on 2017-01-09 08:14 from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('app', '0001_squashed_0005_brewpidevice_active_profile'), ] operations = [ m...
Add migrations for latest model changes.
Add migrations for latest model changes.
Python
mit
thorrak/fermentrack,thorrak/fermentrack,thorrak/fermentrack,thorrak/fermentrack,thorrak/fermentrack
Add migrations for latest model changes.
# -*- coding: utf-8 -*- # Generated by Django 1.10.4 on 2017-01-09 08:14 from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('app', '0001_squashed_0005_brewpidevice_active_profile'), ] operations = [ m...
<commit_before><commit_msg>Add migrations for latest model changes.<commit_after>
# -*- coding: utf-8 -*- # Generated by Django 1.10.4 on 2017-01-09 08:14 from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('app', '0001_squashed_0005_brewpidevice_active_profile'), ] operations = [ m...
Add migrations for latest model changes.# -*- coding: utf-8 -*- # Generated by Django 1.10.4 on 2017-01-09 08:14 from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('app', '0001_squashed_0005_brewpidevice_active_profil...
<commit_before><commit_msg>Add migrations for latest model changes.<commit_after># -*- coding: utf-8 -*- # Generated by Django 1.10.4 on 2017-01-09 08:14 from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('app', '0001...
524aa867c43ddb44728e1df483a88f334e1e0716
standing.py
standing.py
from requirement import GenEd class Standing: def __init__(self, credits_needed=35, credits_taken=0.0): self.credits_needed = credits_needed self.credits_taken = credits_taken self.list = [ GenEd("FYW", 1), GenEd("WRI", 4), # TODO: Support requirements that have a variable number of courses needed. ...
Implement a rough draft of Standing
Implement a rough draft of Standing
Python
agpl-3.0
hawkrives/gobbldygook,hawkrives/gobbldygook,hawkrives/gobbldygook
Implement a rough draft of Standing
from requirement import GenEd class Standing: def __init__(self, credits_needed=35, credits_taken=0.0): self.credits_needed = credits_needed self.credits_taken = credits_taken self.list = [ GenEd("FYW", 1), GenEd("WRI", 4), # TODO: Support requirements that have a variable number of courses needed. ...
<commit_before><commit_msg>Implement a rough draft of Standing<commit_after>
from requirement import GenEd class Standing: def __init__(self, credits_needed=35, credits_taken=0.0): self.credits_needed = credits_needed self.credits_taken = credits_taken self.list = [ GenEd("FYW", 1), GenEd("WRI", 4), # TODO: Support requirements that have a variable number of courses needed. ...
Implement a rough draft of Standingfrom requirement import GenEd class Standing: def __init__(self, credits_needed=35, credits_taken=0.0): self.credits_needed = credits_needed self.credits_taken = credits_taken self.list = [ GenEd("FYW", 1), GenEd("WRI", 4), # TODO: Support requirements that have a va...
<commit_before><commit_msg>Implement a rough draft of Standing<commit_after>from requirement import GenEd class Standing: def __init__(self, credits_needed=35, credits_taken=0.0): self.credits_needed = credits_needed self.credits_taken = credits_taken self.list = [ GenEd("FYW", 1), GenEd("WRI", 4), # ...
00c3a71edc3fd50a3f98ed61afc1544c7aede786
ideas/TestPipe.py
ideas/TestPipe.py
import multiprocessing def worker(procnum, send_end): '''worker function''' result = str(procnum) + ' represent!' print result send_end.send(result) def main(): jobs = [] pipe_list = [] for i in range(5): recv_end, send_end = multiprocessing.Pipe(False) p = multiprocessing....
Add test script to explore using pipes instead of queues
Add test script to explore using pipes instead of queues
Python
bsd-3-clause
dkoslicki/CMash,dkoslicki/CMash
Add test script to explore using pipes instead of queues
import multiprocessing def worker(procnum, send_end): '''worker function''' result = str(procnum) + ' represent!' print result send_end.send(result) def main(): jobs = [] pipe_list = [] for i in range(5): recv_end, send_end = multiprocessing.Pipe(False) p = multiprocessing....
<commit_before><commit_msg>Add test script to explore using pipes instead of queues<commit_after>
import multiprocessing def worker(procnum, send_end): '''worker function''' result = str(procnum) + ' represent!' print result send_end.send(result) def main(): jobs = [] pipe_list = [] for i in range(5): recv_end, send_end = multiprocessing.Pipe(False) p = multiprocessing....
Add test script to explore using pipes instead of queuesimport multiprocessing def worker(procnum, send_end): '''worker function''' result = str(procnum) + ' represent!' print result send_end.send(result) def main(): jobs = [] pipe_list = [] for i in range(5): recv_end, send_end = ...
<commit_before><commit_msg>Add test script to explore using pipes instead of queues<commit_after>import multiprocessing def worker(procnum, send_end): '''worker function''' result = str(procnum) + ' represent!' print result send_end.send(result) def main(): jobs = [] pipe_list = [] for i i...
0301bc813059473838137b75bc7503cb0fba4af0
tempest/tests/common/utils/test_file_utils.py
tempest/tests/common/utils/test_file_utils.py
# Copyright 2014 IBM Corp. # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by app...
Add unit tests for the tempest.common.utils.file_utils
Add unit tests for the tempest.common.utils.file_utils This commit adds a positive and negative unit tests for the single method from file_utils in tempest.common.utils. Partially implements bp unit-tests Change-Id: Ic19428a10785afd8849442f4d1f8f8e0a87f549b
Python
apache-2.0
LIS/lis-tempest,Lilywei123/tempest,akash1808/tempest,cloudbase/lis-tempest,cisco-openstack/tempest,redhat-cip/tempest,CiscoSystems/tempest,ebagdasa/tempest,afaheem88/tempest,Juniper/tempest,Vaidyanath/tempest,jamielennox/tempest,tudorvio/tempest,xbezdick/tempest,Vaidyanath/tempest,jamielennox/tempest,zsoltdudas/lis-tem...
Add unit tests for the tempest.common.utils.file_utils This commit adds a positive and negative unit tests for the single method from file_utils in tempest.common.utils. Partially implements bp unit-tests Change-Id: Ic19428a10785afd8849442f4d1f8f8e0a87f549b
# Copyright 2014 IBM Corp. # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by app...
<commit_before><commit_msg>Add unit tests for the tempest.common.utils.file_utils This commit adds a positive and negative unit tests for the single method from file_utils in tempest.common.utils. Partially implements bp unit-tests Change-Id: Ic19428a10785afd8849442f4d1f8f8e0a87f549b<commit_after>
# Copyright 2014 IBM Corp. # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by app...
Add unit tests for the tempest.common.utils.file_utils This commit adds a positive and negative unit tests for the single method from file_utils in tempest.common.utils. Partially implements bp unit-tests Change-Id: Ic19428a10785afd8849442f4d1f8f8e0a87f549b# Copyright 2014 IBM Corp. # All Rights Reserved. # # Lic...
<commit_before><commit_msg>Add unit tests for the tempest.common.utils.file_utils This commit adds a positive and negative unit tests for the single method from file_utils in tempest.common.utils. Partially implements bp unit-tests Change-Id: Ic19428a10785afd8849442f4d1f8f8e0a87f549b<commit_after># Copyright 2014 IB...
a08977e69fa2121de95efc63f686aae983f0062e
hoomd/typeparameterdict.py
hoomd/typeparameterdict.py
from collections import defaultdict RequiredArg = None class TypeParameterDict: def __init__(self, len_keys=1, **kwargs): self._dict = defaultdict(kwargs) self._len_keys = len_keys def __getitem__(self, key): keys = self._validate_and_split_key(key) vals = dict() for ...
Add generic dictionary based on types
Add generic dictionary based on types
Python
bsd-3-clause
joaander/hoomd-blue,joaander/hoomd-blue,joaander/hoomd-blue,joaander/hoomd-blue,joaander/hoomd-blue,joaander/hoomd-blue
Add generic dictionary based on types
from collections import defaultdict RequiredArg = None class TypeParameterDict: def __init__(self, len_keys=1, **kwargs): self._dict = defaultdict(kwargs) self._len_keys = len_keys def __getitem__(self, key): keys = self._validate_and_split_key(key) vals = dict() for ...
<commit_before><commit_msg>Add generic dictionary based on types<commit_after>
from collections import defaultdict RequiredArg = None class TypeParameterDict: def __init__(self, len_keys=1, **kwargs): self._dict = defaultdict(kwargs) self._len_keys = len_keys def __getitem__(self, key): keys = self._validate_and_split_key(key) vals = dict() for ...
Add generic dictionary based on typesfrom collections import defaultdict RequiredArg = None class TypeParameterDict: def __init__(self, len_keys=1, **kwargs): self._dict = defaultdict(kwargs) self._len_keys = len_keys def __getitem__(self, key): keys = self._validate_and_split_key(ke...
<commit_before><commit_msg>Add generic dictionary based on types<commit_after>from collections import defaultdict RequiredArg = None class TypeParameterDict: def __init__(self, len_keys=1, **kwargs): self._dict = defaultdict(kwargs) self._len_keys = len_keys def __getitem__(self, key): ...
fc80d75dd04c9a5058c687c038308f99d3d254b3
config/sublime/toggle_vintageous.py
config/sublime/toggle_vintageous.py
import sublime import sublime_plugin class ToggleVintageousCommand(sublime_plugin.WindowCommand): def run(self): settings = sublime.load_settings('Preferences.sublime-settings') ignored = settings.get('ignored_packages') if 'Vintageous' in ignored: ignored.remove('Vintageous')...
Add plugin to toggle vintageous
Add plugin to toggle vintageous
Python
mit
Rypac/dotfiles,Rypac/dotfiles,Rypac/dotfiles
Add plugin to toggle vintageous
import sublime import sublime_plugin class ToggleVintageousCommand(sublime_plugin.WindowCommand): def run(self): settings = sublime.load_settings('Preferences.sublime-settings') ignored = settings.get('ignored_packages') if 'Vintageous' in ignored: ignored.remove('Vintageous')...
<commit_before><commit_msg>Add plugin to toggle vintageous<commit_after>
import sublime import sublime_plugin class ToggleVintageousCommand(sublime_plugin.WindowCommand): def run(self): settings = sublime.load_settings('Preferences.sublime-settings') ignored = settings.get('ignored_packages') if 'Vintageous' in ignored: ignored.remove('Vintageous')...
Add plugin to toggle vintageousimport sublime import sublime_plugin class ToggleVintageousCommand(sublime_plugin.WindowCommand): def run(self): settings = sublime.load_settings('Preferences.sublime-settings') ignored = settings.get('ignored_packages') if 'Vintageous' in ignored: ...
<commit_before><commit_msg>Add plugin to toggle vintageous<commit_after>import sublime import sublime_plugin class ToggleVintageousCommand(sublime_plugin.WindowCommand): def run(self): settings = sublime.load_settings('Preferences.sublime-settings') ignored = settings.get('ignored_packages') ...
e4485a24312c447814fb78fa4d4ff8c08e99ced8
corehq/apps/locations/management/commands/remove_couch_loc_types.py
corehq/apps/locations/management/commands/remove_couch_loc_types.py
from django.core.management.base import BaseCommand from dimagi.utils.couch.database import iter_docs from corehq.apps.domain.models import Domain class IterativeSaver(object): """ Bulk save docs in chunks. with IterativeSaver(db) as iter_db: for doc in iter_docs(db) iter_...
Add mgmt cmd to delete location_types from couch
Add mgmt cmd to delete location_types from couch
Python
bsd-3-clause
dimagi/commcare-hq,dimagi/commcare-hq,puttarajubr/commcare-hq,dimagi/commcare-hq,qedsoftware/commcare-hq,qedsoftware/commcare-hq,puttarajubr/commcare-hq,qedsoftware/commcare-hq,puttarajubr/commcare-hq,puttarajubr/commcare-hq,dimagi/commcare-hq,qedsoftware/commcare-hq,dimagi/commcare-hq,qedsoftware/commcare-hq
Add mgmt cmd to delete location_types from couch
from django.core.management.base import BaseCommand from dimagi.utils.couch.database import iter_docs from corehq.apps.domain.models import Domain class IterativeSaver(object): """ Bulk save docs in chunks. with IterativeSaver(db) as iter_db: for doc in iter_docs(db) iter_...
<commit_before><commit_msg>Add mgmt cmd to delete location_types from couch<commit_after>
from django.core.management.base import BaseCommand from dimagi.utils.couch.database import iter_docs from corehq.apps.domain.models import Domain class IterativeSaver(object): """ Bulk save docs in chunks. with IterativeSaver(db) as iter_db: for doc in iter_docs(db) iter_...
Add mgmt cmd to delete location_types from couchfrom django.core.management.base import BaseCommand from dimagi.utils.couch.database import iter_docs from corehq.apps.domain.models import Domain class IterativeSaver(object): """ Bulk save docs in chunks. with IterativeSaver(db) as iter_db: ...
<commit_before><commit_msg>Add mgmt cmd to delete location_types from couch<commit_after>from django.core.management.base import BaseCommand from dimagi.utils.couch.database import iter_docs from corehq.apps.domain.models import Domain class IterativeSaver(object): """ Bulk save docs in chunks. with ...
acdb366fb578b798d27e9207aa4306c9082e2458
backend/populate_dimkarakostas.py
backend/populate_dimkarakostas.py
from string import ascii_lowercase import django import os os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'backend.settings') django.setup() from breach.models import Target, Victim endpoint = 'https://dimkarakostas.com/rupture/test.php?ref=%s' prefix = 'imper' alphabet = ascii_lowercase secretlength = 9 target_1 ...
Add test population script for noiseless 'dimkarakostas' endpoint
Add test population script for noiseless 'dimkarakostas' endpoint
Python
mit
esarafianou/rupture,dimkarakostas/rupture,dimkarakostas/rupture,dimriou/rupture,dimkarakostas/rupture,dimriou/rupture,dionyziz/rupture,dionyziz/rupture,dimkarakostas/rupture,dimriou/rupture,esarafianou/rupture,dimriou/rupture,dimkarakostas/rupture,dionyziz/rupture,dionyziz/rupture,esarafianou/rupture,esarafianou/ruptur...
Add test population script for noiseless 'dimkarakostas' endpoint
from string import ascii_lowercase import django import os os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'backend.settings') django.setup() from breach.models import Target, Victim endpoint = 'https://dimkarakostas.com/rupture/test.php?ref=%s' prefix = 'imper' alphabet = ascii_lowercase secretlength = 9 target_1 ...
<commit_before><commit_msg>Add test population script for noiseless 'dimkarakostas' endpoint<commit_after>
from string import ascii_lowercase import django import os os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'backend.settings') django.setup() from breach.models import Target, Victim endpoint = 'https://dimkarakostas.com/rupture/test.php?ref=%s' prefix = 'imper' alphabet = ascii_lowercase secretlength = 9 target_1 ...
Add test population script for noiseless 'dimkarakostas' endpointfrom string import ascii_lowercase import django import os os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'backend.settings') django.setup() from breach.models import Target, Victim endpoint = 'https://dimkarakostas.com/rupture/test.php?ref=%s' prefix...
<commit_before><commit_msg>Add test population script for noiseless 'dimkarakostas' endpoint<commit_after>from string import ascii_lowercase import django import os os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'backend.settings') django.setup() from breach.models import Target, Victim endpoint = 'https://dimkarak...
19ca3135add52010d4d171af79174033b7e7d680
bluesky/tests/test_legacy_plans.py
bluesky/tests/test_legacy_plans.py
import pytest import bluesky.plans as bp def test_legacy_plan_names(): assert bp.outer_product_scan is bp.grid_scan assert bp.relative_outer_product_scan is bp.rel_grid_scan assert bp.relative_scan is bp.rel_scan assert bp.relative_spiral is bp.rel_spiral assert bp.relative_spiral_fermat is bp.rel_...
Add test to check for legacy plan names
TST: Add test to check for legacy plan names
Python
bsd-3-clause
ericdill/bluesky,ericdill/bluesky
TST: Add test to check for legacy plan names
import pytest import bluesky.plans as bp def test_legacy_plan_names(): assert bp.outer_product_scan is bp.grid_scan assert bp.relative_outer_product_scan is bp.rel_grid_scan assert bp.relative_scan is bp.rel_scan assert bp.relative_spiral is bp.rel_spiral assert bp.relative_spiral_fermat is bp.rel_...
<commit_before><commit_msg>TST: Add test to check for legacy plan names<commit_after>
import pytest import bluesky.plans as bp def test_legacy_plan_names(): assert bp.outer_product_scan is bp.grid_scan assert bp.relative_outer_product_scan is bp.rel_grid_scan assert bp.relative_scan is bp.rel_scan assert bp.relative_spiral is bp.rel_spiral assert bp.relative_spiral_fermat is bp.rel_...
TST: Add test to check for legacy plan namesimport pytest import bluesky.plans as bp def test_legacy_plan_names(): assert bp.outer_product_scan is bp.grid_scan assert bp.relative_outer_product_scan is bp.rel_grid_scan assert bp.relative_scan is bp.rel_scan assert bp.relative_spiral is bp.rel_spiral ...
<commit_before><commit_msg>TST: Add test to check for legacy plan names<commit_after>import pytest import bluesky.plans as bp def test_legacy_plan_names(): assert bp.outer_product_scan is bp.grid_scan assert bp.relative_outer_product_scan is bp.rel_grid_scan assert bp.relative_scan is bp.rel_scan asser...
ea98ee9c0a4d7e49a6c8200d02533d12ab01f664
tests/test_kdf.py
tests/test_kdf.py
from zerodb.crypto import kdf import ZEO test_key = b'x' * 32 test_args_1 = dict( username='user1', password='password1', key_file=ZEO.tests.testssl.client_key, cert_file=ZEO.tests.testssl.client_cert, appname='zerodb.com', key=test_key) test_args_2 = dict( username='user1', p...
Test kdfs just in case
Test kdfs just in case
Python
agpl-3.0
zerodb/zerodb,zero-db/zerodb,zerodb/zerodb,zero-db/zerodb
Test kdfs just in case
from zerodb.crypto import kdf import ZEO test_key = b'x' * 32 test_args_1 = dict( username='user1', password='password1', key_file=ZEO.tests.testssl.client_key, cert_file=ZEO.tests.testssl.client_cert, appname='zerodb.com', key=test_key) test_args_2 = dict( username='user1', p...
<commit_before><commit_msg>Test kdfs just in case<commit_after>
from zerodb.crypto import kdf import ZEO test_key = b'x' * 32 test_args_1 = dict( username='user1', password='password1', key_file=ZEO.tests.testssl.client_key, cert_file=ZEO.tests.testssl.client_cert, appname='zerodb.com', key=test_key) test_args_2 = dict( username='user1', p...
Test kdfs just in casefrom zerodb.crypto import kdf import ZEO test_key = b'x' * 32 test_args_1 = dict( username='user1', password='password1', key_file=ZEO.tests.testssl.client_key, cert_file=ZEO.tests.testssl.client_cert, appname='zerodb.com', key=test_key) test_args_2 = dict( ...
<commit_before><commit_msg>Test kdfs just in case<commit_after>from zerodb.crypto import kdf import ZEO test_key = b'x' * 32 test_args_1 = dict( username='user1', password='password1', key_file=ZEO.tests.testssl.client_key, cert_file=ZEO.tests.testssl.client_cert, appname='zerodb.com',...
75a2d7d8602c62a303b1ef0c4e75b337e08d8f02
utils/studs_member_picture_url.py
utils/studs_member_picture_url.py
#!/usr/bin/python3 import pymongo import unicodedata as ud DB_USER = '' DB_PASSWORD = '' DB_URL = '' # Add Studs members here STUDS_MEMBERS = [ 'Micky Mick', 'Lerp Lerpsson', ] CDN_MEMBERS_URL = '' uri = 'mongodb://{}:{}@{}'.format(DB_USER, DB_PASSWORD, DB_URL) normalize = lambda name: ud.normalize('NFKD'...
Add script for setting image urls
Add script for setting image urls In case anyone wants to use it in the future.
Python
mit
studieresan/overlord,studieresan/overlord,studieresan/overlord,studieresan/overlord,studieresan/overlord
Add script for setting image urls In case anyone wants to use it in the future.
#!/usr/bin/python3 import pymongo import unicodedata as ud DB_USER = '' DB_PASSWORD = '' DB_URL = '' # Add Studs members here STUDS_MEMBERS = [ 'Micky Mick', 'Lerp Lerpsson', ] CDN_MEMBERS_URL = '' uri = 'mongodb://{}:{}@{}'.format(DB_USER, DB_PASSWORD, DB_URL) normalize = lambda name: ud.normalize('NFKD'...
<commit_before><commit_msg>Add script for setting image urls In case anyone wants to use it in the future.<commit_after>
#!/usr/bin/python3 import pymongo import unicodedata as ud DB_USER = '' DB_PASSWORD = '' DB_URL = '' # Add Studs members here STUDS_MEMBERS = [ 'Micky Mick', 'Lerp Lerpsson', ] CDN_MEMBERS_URL = '' uri = 'mongodb://{}:{}@{}'.format(DB_USER, DB_PASSWORD, DB_URL) normalize = lambda name: ud.normalize('NFKD'...
Add script for setting image urls In case anyone wants to use it in the future.#!/usr/bin/python3 import pymongo import unicodedata as ud DB_USER = '' DB_PASSWORD = '' DB_URL = '' # Add Studs members here STUDS_MEMBERS = [ 'Micky Mick', 'Lerp Lerpsson', ] CDN_MEMBERS_URL = '' uri = 'mongodb://{}:{}@{}'.fo...
<commit_before><commit_msg>Add script for setting image urls In case anyone wants to use it in the future.<commit_after>#!/usr/bin/python3 import pymongo import unicodedata as ud DB_USER = '' DB_PASSWORD = '' DB_URL = '' # Add Studs members here STUDS_MEMBERS = [ 'Micky Mick', 'Lerp Lerpsson', ] CDN_MEMBER...