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
a4e98c9bdf1a16e4bcf4ec952452913b9812bb9e
fire_risk/models/DIST/providers/iaff.py
fire_risk/models/DIST/providers/iaff.py
# A dictionary where the key is an fdid-state and the values are lognormal fits generated # from response time gis data. response_time_distributions = { '37140-CA': (0.20611095226322063, -4.7357748161635111, 8.6850997083002905), '02072-FL': (0.34949627393777505, -2.1718657657665021, 6.6793162966144539), '0...
Add response time distributions from GIS.
Add response time distributions from GIS.
Python
mit
FireCARES/fire-risk,FireCARES/fire-risk
Add response time distributions from GIS.
# A dictionary where the key is an fdid-state and the values are lognormal fits generated # from response time gis data. response_time_distributions = { '37140-CA': (0.20611095226322063, -4.7357748161635111, 8.6850997083002905), '02072-FL': (0.34949627393777505, -2.1718657657665021, 6.6793162966144539), '0...
<commit_before><commit_msg>Add response time distributions from GIS.<commit_after>
# A dictionary where the key is an fdid-state and the values are lognormal fits generated # from response time gis data. response_time_distributions = { '37140-CA': (0.20611095226322063, -4.7357748161635111, 8.6850997083002905), '02072-FL': (0.34949627393777505, -2.1718657657665021, 6.6793162966144539), '0...
Add response time distributions from GIS.# A dictionary where the key is an fdid-state and the values are lognormal fits generated # from response time gis data. response_time_distributions = { '37140-CA': (0.20611095226322063, -4.7357748161635111, 8.6850997083002905), '02072-FL': (0.34949627393777505, -2.1718...
<commit_before><commit_msg>Add response time distributions from GIS.<commit_after># A dictionary where the key is an fdid-state and the values are lognormal fits generated # from response time gis data. response_time_distributions = { '37140-CA': (0.20611095226322063, -4.7357748161635111, 8.6850997083002905), ...
e9e9999ed9b3fe73bd132fd5dcbcef3bbee1bef6
csunplugged/utils/convert_heading_tree_to_dict.py
csunplugged/utils/convert_heading_tree_to_dict.py
"""Module used for converting Verto heading tree data. The Verto result object is a tuple containing NamedTuples, however this must be converted to a dictionary to be stored in a HStoreField Postgres database field. """ def convert_heading_tree_to_dict(heading_tree_tuples): """Convert tuple heading tree to dicti...
Add module for converting heading node tuples to a dictionary
Add module for converting heading node tuples to a dictionary This could be stored in BaseLoader.py directly if that is a more logical location. It also could convert output of every Verto conversion, but currently is only called when needed.
Python
mit
uccser/cs-unplugged,uccser/cs-unplugged,uccser/cs-unplugged,uccser/cs-unplugged
Add module for converting heading node tuples to a dictionary This could be stored in BaseLoader.py directly if that is a more logical location. It also could convert output of every Verto conversion, but currently is only called when needed.
"""Module used for converting Verto heading tree data. The Verto result object is a tuple containing NamedTuples, however this must be converted to a dictionary to be stored in a HStoreField Postgres database field. """ def convert_heading_tree_to_dict(heading_tree_tuples): """Convert tuple heading tree to dicti...
<commit_before><commit_msg>Add module for converting heading node tuples to a dictionary This could be stored in BaseLoader.py directly if that is a more logical location. It also could convert output of every Verto conversion, but currently is only called when needed.<commit_after>
"""Module used for converting Verto heading tree data. The Verto result object is a tuple containing NamedTuples, however this must be converted to a dictionary to be stored in a HStoreField Postgres database field. """ def convert_heading_tree_to_dict(heading_tree_tuples): """Convert tuple heading tree to dicti...
Add module for converting heading node tuples to a dictionary This could be stored in BaseLoader.py directly if that is a more logical location. It also could convert output of every Verto conversion, but currently is only called when needed."""Module used for converting Verto heading tree data. The Verto result obje...
<commit_before><commit_msg>Add module for converting heading node tuples to a dictionary This could be stored in BaseLoader.py directly if that is a more logical location. It also could convert output of every Verto conversion, but currently is only called when needed.<commit_after>"""Module used for converting Verto ...
987a660f6adc86bd2eed176c5fa11cceebbcde9f
devicehive/api.py
devicehive/api.py
from devicehive.transport import Request from devicehive.transport import Response class Api(object): """Api class.""" def __init__(self, transport): self._transport = transport def _request(self, url, action, request, **params): req = Request(url, action, request, **params) resp...
Add Api class with refresh token request
Add Api class with refresh token request
Python
apache-2.0
devicehive/devicehive-python
Add Api class with refresh token request
from devicehive.transport import Request from devicehive.transport import Response class Api(object): """Api class.""" def __init__(self, transport): self._transport = transport def _request(self, url, action, request, **params): req = Request(url, action, request, **params) resp...
<commit_before><commit_msg>Add Api class with refresh token request<commit_after>
from devicehive.transport import Request from devicehive.transport import Response class Api(object): """Api class.""" def __init__(self, transport): self._transport = transport def _request(self, url, action, request, **params): req = Request(url, action, request, **params) resp...
Add Api class with refresh token requestfrom devicehive.transport import Request from devicehive.transport import Response class Api(object): """Api class.""" def __init__(self, transport): self._transport = transport def _request(self, url, action, request, **params): req = Request(url,...
<commit_before><commit_msg>Add Api class with refresh token request<commit_after>from devicehive.transport import Request from devicehive.transport import Response class Api(object): """Api class.""" def __init__(self, transport): self._transport = transport def _request(self, url, action, reque...
c0bd56cffd87b00d6889cfd745212d8cd53860f5
books/CrackingCodesWithPython/Chapter02/PracticeQuestions.py
books/CrackingCodesWithPython/Chapter02/PracticeQuestions.py
# Chapter 2 Practice Questions # To check these questions, they should be entered in IDLE; otherwise # print statements would be needed. # 1. Which is the operator for division, / or \? 4 / 2 4 \ 2 # 2. Which of the following is an integer value, and which is a floating-point value? type(42) type(3.141592) # 3. Whic...
Initialize Chapter 2 Practice Questions
Initialize Chapter 2 Practice Questions
Python
mit
JoseALermaIII/python-tutorials,JoseALermaIII/python-tutorials
Initialize Chapter 2 Practice Questions
# Chapter 2 Practice Questions # To check these questions, they should be entered in IDLE; otherwise # print statements would be needed. # 1. Which is the operator for division, / or \? 4 / 2 4 \ 2 # 2. Which of the following is an integer value, and which is a floating-point value? type(42) type(3.141592) # 3. Whic...
<commit_before><commit_msg>Initialize Chapter 2 Practice Questions<commit_after>
# Chapter 2 Practice Questions # To check these questions, they should be entered in IDLE; otherwise # print statements would be needed. # 1. Which is the operator for division, / or \? 4 / 2 4 \ 2 # 2. Which of the following is an integer value, and which is a floating-point value? type(42) type(3.141592) # 3. Whic...
Initialize Chapter 2 Practice Questions# Chapter 2 Practice Questions # To check these questions, they should be entered in IDLE; otherwise # print statements would be needed. # 1. Which is the operator for division, / or \? 4 / 2 4 \ 2 # 2. Which of the following is an integer value, and which is a floating-point va...
<commit_before><commit_msg>Initialize Chapter 2 Practice Questions<commit_after># Chapter 2 Practice Questions # To check these questions, they should be entered in IDLE; otherwise # print statements would be needed. # 1. Which is the operator for division, / or \? 4 / 2 4 \ 2 # 2. Which of the following is an intege...
3c94cd8e6f7429f3a512a49a86eaa089a8f472c7
other/wrapping-cpp/swig/c++/multiplefiles/test_shapes.py
other/wrapping-cpp/swig/c++/multiplefiles/test_shapes.py
import os import pytest @pytest.fixture def setup(request): def teardown(): print("Running make clean") os.system('make clean') print("Completed finaliser") request.addfinalizer(teardown) os.system('make clean') os.system('make all') def test_square(setup): import shape...
import os import pytest # Need to call Makefile in directory where this test file is def call_make(target): # where is this file this_file = os.path.realpath(__file__) this_dir = os.path.split(this_file)[0] cd_command = "cd {}".format(this_dir) make_command = "make {}".format(target) command =...
Allow to be called from other directories.
Allow to be called from other directories.
Python
bsd-2-clause
ryanpepper/oommf-python,ryanpepper/oommf-python,fangohr/oommf-python,ryanpepper/oommf-python,fangohr/oommf-python,fangohr/oommf-python,ryanpepper/oommf-python
import os import pytest @pytest.fixture def setup(request): def teardown(): print("Running make clean") os.system('make clean') print("Completed finaliser") request.addfinalizer(teardown) os.system('make clean') os.system('make all') def test_square(setup): import shape...
import os import pytest # Need to call Makefile in directory where this test file is def call_make(target): # where is this file this_file = os.path.realpath(__file__) this_dir = os.path.split(this_file)[0] cd_command = "cd {}".format(this_dir) make_command = "make {}".format(target) command =...
<commit_before>import os import pytest @pytest.fixture def setup(request): def teardown(): print("Running make clean") os.system('make clean') print("Completed finaliser") request.addfinalizer(teardown) os.system('make clean') os.system('make all') def test_square(setup): ...
import os import pytest # Need to call Makefile in directory where this test file is def call_make(target): # where is this file this_file = os.path.realpath(__file__) this_dir = os.path.split(this_file)[0] cd_command = "cd {}".format(this_dir) make_command = "make {}".format(target) command =...
import os import pytest @pytest.fixture def setup(request): def teardown(): print("Running make clean") os.system('make clean') print("Completed finaliser") request.addfinalizer(teardown) os.system('make clean') os.system('make all') def test_square(setup): import shape...
<commit_before>import os import pytest @pytest.fixture def setup(request): def teardown(): print("Running make clean") os.system('make clean') print("Completed finaliser") request.addfinalizer(teardown) os.system('make clean') os.system('make all') def test_square(setup): ...
8ea9b63224a33f73a49210a5cd6dd29f0eba41ce
app/test_programs.py
app/test_programs.py
import unittest import multiprocessing import time class TestPrograms(unittest.TestCase): def program_helper(self, func, params=dict()): self.process = multiprocessing.Process(target=func, args=(params,)) self.process.start() time.sleep(1) self.process.terminate() def test_pr...
Add unit tests for programs
Add unit tests for programs
Python
mit
njbbaer/unicorn-remote,njbbaer/unicorn-remote,njbbaer/unicorn-remote
Add unit tests for programs
import unittest import multiprocessing import time class TestPrograms(unittest.TestCase): def program_helper(self, func, params=dict()): self.process = multiprocessing.Process(target=func, args=(params,)) self.process.start() time.sleep(1) self.process.terminate() def test_pr...
<commit_before><commit_msg>Add unit tests for programs<commit_after>
import unittest import multiprocessing import time class TestPrograms(unittest.TestCase): def program_helper(self, func, params=dict()): self.process = multiprocessing.Process(target=func, args=(params,)) self.process.start() time.sleep(1) self.process.terminate() def test_pr...
Add unit tests for programsimport unittest import multiprocessing import time class TestPrograms(unittest.TestCase): def program_helper(self, func, params=dict()): self.process = multiprocessing.Process(target=func, args=(params,)) self.process.start() time.sleep(1) self.process.t...
<commit_before><commit_msg>Add unit tests for programs<commit_after>import unittest import multiprocessing import time class TestPrograms(unittest.TestCase): def program_helper(self, func, params=dict()): self.process = multiprocessing.Process(target=func, args=(params,)) self.process.start() ...
1cb01db57fe761b37852650f8acfd7a7707b721f
create_recipes.py
create_recipes.py
import argparse import subprocess parser = argparse.ArgumentParser() parser.add_argument("package_list", help="List of packages for which" + " recipies will be created") args = parser.parse_args() package_names = [package.strip() for package in open(args.package_list, 'r').readlin...
Write Python Script for recipe creation
Write Python Script for recipe creation Signed-off-by: Harsh Gupta <[email protected]>
Python
bsd-3-clause
ContinuumIO/pypi-conda-builds
Write Python Script for recipe creation Signed-off-by: Harsh Gupta <[email protected]>
import argparse import subprocess parser = argparse.ArgumentParser() parser.add_argument("package_list", help="List of packages for which" + " recipies will be created") args = parser.parse_args() package_names = [package.strip() for package in open(args.package_list, 'r').readlin...
<commit_before><commit_msg>Write Python Script for recipe creation Signed-off-by: Harsh Gupta <[email protected]><commit_after>
import argparse import subprocess parser = argparse.ArgumentParser() parser.add_argument("package_list", help="List of packages for which" + " recipies will be created") args = parser.parse_args() package_names = [package.strip() for package in open(args.package_list, 'r').readlin...
Write Python Script for recipe creation Signed-off-by: Harsh Gupta <[email protected]>import argparse import subprocess parser = argparse.ArgumentParser() parser.add_argument("package_list", help="List of packages for which" + " recipies will be created") args = pa...
<commit_before><commit_msg>Write Python Script for recipe creation Signed-off-by: Harsh Gupta <[email protected]><commit_after>import argparse import subprocess parser = argparse.ArgumentParser() parser.add_argument("package_list", help="List of packages for which" + ...
9004162c264173beddb8308a2533fa08c8ca24ca
pkgs/applications/networking/browsers/chromium/get-commit-message.py
pkgs/applications/networking/browsers/chromium/get-commit-message.py
#!/usr/bin/env nix-shell #!nix-shell -i python3 -p python3Packages.feedparser python3Packages.requests # This script prints the Git commit message for stable channel updates. import re import textwrap import feedparser import requests feed = feedparser.parse('https://chromereleases.googleblog.com/feeds/posts/defaul...
Add my script to generate the commit messages
chromium: Add my script to generate the commit messages Might not be that readable and reliable but it should get the job done.
Python
mit
NixOS/nixpkgs,NixOS/nixpkgs,NixOS/nixpkgs,NixOS/nixpkgs,NixOS/nixpkgs,NixOS/nixpkgs,NixOS/nixpkgs,NixOS/nixpkgs,NixOS/nixpkgs,NixOS/nixpkgs,NixOS/nixpkgs,NixOS/nixpkgs,NixOS/nixpkgs,NixOS/nixpkgs,NixOS/nixpkgs
chromium: Add my script to generate the commit messages Might not be that readable and reliable but it should get the job done.
#!/usr/bin/env nix-shell #!nix-shell -i python3 -p python3Packages.feedparser python3Packages.requests # This script prints the Git commit message for stable channel updates. import re import textwrap import feedparser import requests feed = feedparser.parse('https://chromereleases.googleblog.com/feeds/posts/defaul...
<commit_before><commit_msg>chromium: Add my script to generate the commit messages Might not be that readable and reliable but it should get the job done.<commit_after>
#!/usr/bin/env nix-shell #!nix-shell -i python3 -p python3Packages.feedparser python3Packages.requests # This script prints the Git commit message for stable channel updates. import re import textwrap import feedparser import requests feed = feedparser.parse('https://chromereleases.googleblog.com/feeds/posts/defaul...
chromium: Add my script to generate the commit messages Might not be that readable and reliable but it should get the job done.#!/usr/bin/env nix-shell #!nix-shell -i python3 -p python3Packages.feedparser python3Packages.requests # This script prints the Git commit message for stable channel updates. import re impor...
<commit_before><commit_msg>chromium: Add my script to generate the commit messages Might not be that readable and reliable but it should get the job done.<commit_after>#!/usr/bin/env nix-shell #!nix-shell -i python3 -p python3Packages.feedparser python3Packages.requests # This script prints the Git commit message for...
c750c371ce3315d7fa556c6143a1ea5ed3e5e488
examples/check_remote_upload.py
examples/check_remote_upload.py
from __future__ import print_function from openload import OpenLoad username = 'FTP Username/API Login' key = 'FTP Password/API Key' openload = OpenLoad(username, key) resp = openload.remote_upload_status() print(resp)
Add check remote upload example
Add check remote upload example
Python
mit
mohan3d/PyOpenload
Add check remote upload example
from __future__ import print_function from openload import OpenLoad username = 'FTP Username/API Login' key = 'FTP Password/API Key' openload = OpenLoad(username, key) resp = openload.remote_upload_status() print(resp)
<commit_before><commit_msg>Add check remote upload example<commit_after>
from __future__ import print_function from openload import OpenLoad username = 'FTP Username/API Login' key = 'FTP Password/API Key' openload = OpenLoad(username, key) resp = openload.remote_upload_status() print(resp)
Add check remote upload examplefrom __future__ import print_function from openload import OpenLoad username = 'FTP Username/API Login' key = 'FTP Password/API Key' openload = OpenLoad(username, key) resp = openload.remote_upload_status() print(resp)
<commit_before><commit_msg>Add check remote upload example<commit_after>from __future__ import print_function from openload import OpenLoad username = 'FTP Username/API Login' key = 'FTP Password/API Key' openload = OpenLoad(username, key) resp = openload.remote_upload_status() print(resp)
e3b49fe1ecbce68154de8f286507b99848d251d7
external_tools/src/main/python/images/move_corrupt_images.py
external_tools/src/main/python/images/move_corrupt_images.py
""" Script to move corrupt images to 'dirty' directory Reads list of images to move. Does not verify that images are corrupt - Simply moves to 'dirty' directory of appropriate data-release creating the required directory structure """ import os import argparse parser = argparse.ArgumentParser( ...
Add script to move corrupt images
Add script to move corrupt images
Python
apache-2.0
mpi2/PhenotypeData,mpi2/PhenotypeData,mpi2/PhenotypeData,mpi2/PhenotypeData,mpi2/PhenotypeData,mpi2/PhenotypeData
Add script to move corrupt images
""" Script to move corrupt images to 'dirty' directory Reads list of images to move. Does not verify that images are corrupt - Simply moves to 'dirty' directory of appropriate data-release creating the required directory structure """ import os import argparse parser = argparse.ArgumentParser( ...
<commit_before><commit_msg>Add script to move corrupt images<commit_after>
""" Script to move corrupt images to 'dirty' directory Reads list of images to move. Does not verify that images are corrupt - Simply moves to 'dirty' directory of appropriate data-release creating the required directory structure """ import os import argparse parser = argparse.ArgumentParser( ...
Add script to move corrupt images""" Script to move corrupt images to 'dirty' directory Reads list of images to move. Does not verify that images are corrupt - Simply moves to 'dirty' directory of appropriate data-release creating the required directory structure """ import os import argparse pa...
<commit_before><commit_msg>Add script to move corrupt images<commit_after>""" Script to move corrupt images to 'dirty' directory Reads list of images to move. Does not verify that images are corrupt - Simply moves to 'dirty' directory of appropriate data-release creating the required directory str...
29f3f84fbd90e5d43ba5d6c621d19021a45d184d
examples/hwapi/hwconfig_dragonboard410c.py
examples/hwapi/hwconfig_dragonboard410c.py
from machine import Pin # 96Boards/Qualcomm DragonBoard 410c # By default, on-board LEDs are controlled by kernel LED driver. # To make corresponding pins be available as normal GPIO, # corresponding driver needs to be unbound first (as root): # echo -n "soc:leds" >/sys/class/leds/apq8016-sbc:green:user1/device/driver...
Add hwconfig for DragonBoard 410c.
examples/hwapi: Add hwconfig for DragonBoard 410c. This requires recently added implementation of machine.Pin from micropython-lib.
Python
mit
pfalcon/micropython,adafruit/micropython,pozetroninc/micropython,mhoffma/micropython,MrSurly/micropython,infinnovation/micropython,pramasoul/micropython,oopy/micropython,infinnovation/micropython,matthewelse/micropython,MrSurly/micropython,torwag/micropython,Timmenem/micropython,lowRISC/micropython,lowRISC/micropython,...
examples/hwapi: Add hwconfig for DragonBoard 410c. This requires recently added implementation of machine.Pin from micropython-lib.
from machine import Pin # 96Boards/Qualcomm DragonBoard 410c # By default, on-board LEDs are controlled by kernel LED driver. # To make corresponding pins be available as normal GPIO, # corresponding driver needs to be unbound first (as root): # echo -n "soc:leds" >/sys/class/leds/apq8016-sbc:green:user1/device/driver...
<commit_before><commit_msg>examples/hwapi: Add hwconfig for DragonBoard 410c. This requires recently added implementation of machine.Pin from micropython-lib.<commit_after>
from machine import Pin # 96Boards/Qualcomm DragonBoard 410c # By default, on-board LEDs are controlled by kernel LED driver. # To make corresponding pins be available as normal GPIO, # corresponding driver needs to be unbound first (as root): # echo -n "soc:leds" >/sys/class/leds/apq8016-sbc:green:user1/device/driver...
examples/hwapi: Add hwconfig for DragonBoard 410c. This requires recently added implementation of machine.Pin from micropython-lib.from machine import Pin # 96Boards/Qualcomm DragonBoard 410c # By default, on-board LEDs are controlled by kernel LED driver. # To make corresponding pins be available as normal GPIO, # c...
<commit_before><commit_msg>examples/hwapi: Add hwconfig for DragonBoard 410c. This requires recently added implementation of machine.Pin from micropython-lib.<commit_after>from machine import Pin # 96Boards/Qualcomm DragonBoard 410c # By default, on-board LEDs are controlled by kernel LED driver. # To make correspond...
e5c35523744bb10c8207200784f7f4e66ed5ea0c
openstackclient/common/parseractions.py
openstackclient/common/parseractions.py
# Copyright 2013 OpenStack Foundation # # 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 ...
Tweak volume commands and add k=v argparse action
Tweak volume commands and add k=v argparse action Basic cleanups: * change metadata to property * add new KeyValueAction to parse the property options * multiple properties can be set using multiple --property args * consistent formatting * do lookups for volume args Change-Id: Ib6c43f01ad46b395aee8c61e886f42e2a5f557...
Python
apache-2.0
dtroyer/osc-lib
Tweak volume commands and add k=v argparse action Basic cleanups: * change metadata to property * add new KeyValueAction to parse the property options * multiple properties can be set using multiple --property args * consistent formatting * do lookups for volume args Change-Id: Ib6c43f01ad46b395aee8c61e886f42e2a5f557...
# Copyright 2013 OpenStack Foundation # # 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><commit_msg>Tweak volume commands and add k=v argparse action Basic cleanups: * change metadata to property * add new KeyValueAction to parse the property options * multiple properties can be set using multiple --property args * consistent formatting * do lookups for volume args Change-Id: Ib6c43f01ad4...
# Copyright 2013 OpenStack Foundation # # 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 ...
Tweak volume commands and add k=v argparse action Basic cleanups: * change metadata to property * add new KeyValueAction to parse the property options * multiple properties can be set using multiple --property args * consistent formatting * do lookups for volume args Change-Id: Ib6c43f01ad46b395aee8c61e886f42e2a5f557...
<commit_before><commit_msg>Tweak volume commands and add k=v argparse action Basic cleanups: * change metadata to property * add new KeyValueAction to parse the property options * multiple properties can be set using multiple --property args * consistent formatting * do lookups for volume args Change-Id: Ib6c43f01ad4...
cdf3a6273ad13ed4c269e221edc33a0abb4ba116
next_pr_number.py
next_pr_number.py
import sys from github import Github if len(sys.argv) == 2: repository = sys.argv[1] elif len(sys.argv) > 2: print("Usage: next_pr_number.py <repository>") sys.exit(1) else: repository = 'astropy/astropy' gh = Github() repo = gh.get_repo('astropy/astropy') pl = repo.get_issues(sort='created', state='a...
Add a script to find the next PR number for the changelog
Add a script to find the next PR number for the changelog
Python
bsd-3-clause
astropy/astropy-tools,astropy/astropy-tools
Add a script to find the next PR number for the changelog
import sys from github import Github if len(sys.argv) == 2: repository = sys.argv[1] elif len(sys.argv) > 2: print("Usage: next_pr_number.py <repository>") sys.exit(1) else: repository = 'astropy/astropy' gh = Github() repo = gh.get_repo('astropy/astropy') pl = repo.get_issues(sort='created', state='a...
<commit_before><commit_msg>Add a script to find the next PR number for the changelog<commit_after>
import sys from github import Github if len(sys.argv) == 2: repository = sys.argv[1] elif len(sys.argv) > 2: print("Usage: next_pr_number.py <repository>") sys.exit(1) else: repository = 'astropy/astropy' gh = Github() repo = gh.get_repo('astropy/astropy') pl = repo.get_issues(sort='created', state='a...
Add a script to find the next PR number for the changelogimport sys from github import Github if len(sys.argv) == 2: repository = sys.argv[1] elif len(sys.argv) > 2: print("Usage: next_pr_number.py <repository>") sys.exit(1) else: repository = 'astropy/astropy' gh = Github() repo = gh.get_repo('astrop...
<commit_before><commit_msg>Add a script to find the next PR number for the changelog<commit_after>import sys from github import Github if len(sys.argv) == 2: repository = sys.argv[1] elif len(sys.argv) > 2: print("Usage: next_pr_number.py <repository>") sys.exit(1) else: repository = 'astropy/astropy' ...
46d2c36e02605ba5dbe63df6ea75d7c00cf28993
readthedocs/projects/migrations/0013_add-container-limits.py
readthedocs/projects/migrations/0013_add-container-limits.py
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations class Migration(migrations.Migration): dependencies = [ ('projects', '0012_proper-name-for-install-project'), ] operations = [ migrations.AddField( model_name='project', ...
Include the migration this time :fireworks:
Include the migration this time :fireworks:
Python
mit
espdev/readthedocs.org,rtfd/readthedocs.org,davidfischer/readthedocs.org,safwanrahman/readthedocs.org,tddv/readthedocs.org,tddv/readthedocs.org,davidfischer/readthedocs.org,davidfischer/readthedocs.org,stevepiercy/readthedocs.org,davidfischer/readthedocs.org,espdev/readthedocs.org,stevepiercy/readthedocs.org,rtfd/readt...
Include the migration this time :fireworks:
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations class Migration(migrations.Migration): dependencies = [ ('projects', '0012_proper-name-for-install-project'), ] operations = [ migrations.AddField( model_name='project', ...
<commit_before><commit_msg>Include the migration this time :fireworks:<commit_after>
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations class Migration(migrations.Migration): dependencies = [ ('projects', '0012_proper-name-for-install-project'), ] operations = [ migrations.AddField( model_name='project', ...
Include the migration this time :fireworks:# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations class Migration(migrations.Migration): dependencies = [ ('projects', '0012_proper-name-for-install-project'), ] operations = [ migrations.A...
<commit_before><commit_msg>Include the migration this time :fireworks:<commit_after># -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations class Migration(migrations.Migration): dependencies = [ ('projects', '0012_proper-name-for-install-project'), ]...
41fae7b73867e09b9c3965b7b3cbb911b67a26c5
homedisplay/info_ext_pages/migrations/0002_auto_20150315_2143.py
homedisplay/info_ext_pages/migrations/0002_auto_20150315_2143.py
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations class Migration(migrations.Migration): dependencies = [ ('info_ext_pages', '0001_initial'), ] operations = [ migrations.AlterModelOptions( name='extpage', opt...
Add missing (meta) migration from previous commit
Add missing (meta) migration from previous commit
Python
bsd-3-clause
ojarva/home-info-display,ojarva/home-info-display,ojarva/home-info-display,ojarva/home-info-display
Add missing (meta) migration from previous commit
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations class Migration(migrations.Migration): dependencies = [ ('info_ext_pages', '0001_initial'), ] operations = [ migrations.AlterModelOptions( name='extpage', opt...
<commit_before><commit_msg>Add missing (meta) migration from previous commit<commit_after>
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations class Migration(migrations.Migration): dependencies = [ ('info_ext_pages', '0001_initial'), ] operations = [ migrations.AlterModelOptions( name='extpage', opt...
Add missing (meta) migration from previous commit# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations class Migration(migrations.Migration): dependencies = [ ('info_ext_pages', '0001_initial'), ] operations = [ migrations.AlterModelOpt...
<commit_before><commit_msg>Add missing (meta) migration from previous commit<commit_after># -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations class Migration(migrations.Migration): dependencies = [ ('info_ext_pages', '0001_initial'), ] operat...
c95428c04460774d4b2c3eb247c1d7c431c13dd6
tests/pifont_test.py
tests/pifont_test.py
#!/usr/bin/env python # coding: utf-8 # Copyright 2013,2017 The Font Bakery Authors. 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/license...
Add test for pifont.PiFontFontTools.get_contours_count method
Add test for pifont.PiFontFontTools.get_contours_count method
Python
apache-2.0
moyogo/fontbakery,graphicore/fontbakery,googlefonts/fontbakery,moyogo/fontbakery,googlefonts/fontbakery,graphicore/fontbakery,graphicore/fontbakery,moyogo/fontbakery,googlefonts/fontbakery
Add test for pifont.PiFontFontTools.get_contours_count method
#!/usr/bin/env python # coding: utf-8 # Copyright 2013,2017 The Font Bakery Authors. 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/license...
<commit_before><commit_msg>Add test for pifont.PiFontFontTools.get_contours_count method<commit_after>
#!/usr/bin/env python # coding: utf-8 # Copyright 2013,2017 The Font Bakery Authors. 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/license...
Add test for pifont.PiFontFontTools.get_contours_count method#!/usr/bin/env python # coding: utf-8 # Copyright 2013,2017 The Font Bakery Authors. 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...
<commit_before><commit_msg>Add test for pifont.PiFontFontTools.get_contours_count method<commit_after>#!/usr/bin/env python # coding: utf-8 # Copyright 2013,2017 The Font Bakery Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compli...
0d3294d8831d87fdda605c24b7ddda82b9879a73
set_spider_env.py
set_spider_env.py
#!/use/bin/env python3 import os os.system('mv report_spider report_spider_temp') os.system('scrapy startproject report_spider') os.chdir('./report_spider_temp') for f in os.listdir(): if os.path.isdir(f): os.system('cp -r ./{} ../report_spider'.format(f)) else: os.system('cp ./{} ../report_spider'.format(f)) ...
Add script for set spider env
Add script for set spider env
Python
mit
HeadCow/ARPS,HeadCow/ARPS,AnselCmy/ARPS,hbtech-ai/ARPS,AnselCmy/ARPS,AnselCmy/ARPS,hbtech-ai/ARPS
Add script for set spider env
#!/use/bin/env python3 import os os.system('mv report_spider report_spider_temp') os.system('scrapy startproject report_spider') os.chdir('./report_spider_temp') for f in os.listdir(): if os.path.isdir(f): os.system('cp -r ./{} ../report_spider'.format(f)) else: os.system('cp ./{} ../report_spider'.format(f)) ...
<commit_before><commit_msg>Add script for set spider env<commit_after>
#!/use/bin/env python3 import os os.system('mv report_spider report_spider_temp') os.system('scrapy startproject report_spider') os.chdir('./report_spider_temp') for f in os.listdir(): if os.path.isdir(f): os.system('cp -r ./{} ../report_spider'.format(f)) else: os.system('cp ./{} ../report_spider'.format(f)) ...
Add script for set spider env#!/use/bin/env python3 import os os.system('mv report_spider report_spider_temp') os.system('scrapy startproject report_spider') os.chdir('./report_spider_temp') for f in os.listdir(): if os.path.isdir(f): os.system('cp -r ./{} ../report_spider'.format(f)) else: os.system('cp ./{} ....
<commit_before><commit_msg>Add script for set spider env<commit_after>#!/use/bin/env python3 import os os.system('mv report_spider report_spider_temp') os.system('scrapy startproject report_spider') os.chdir('./report_spider_temp') for f in os.listdir(): if os.path.isdir(f): os.system('cp -r ./{} ../report_spider'...
28215cb8244c6e6bd7a6951a1380fbf78aa77fdf
games/management/commands/fix_wine_arch.py
games/management/commands/fix_wine_arch.py
import logging import yaml from django.core.management.base import BaseCommand from games.models import Installer LOGGER = logging.getLogger(__name__) class Command(BaseCommand): help = "My shiny new management command." def add_arch_to_non_wine_installers(self, installer): script_updated = False ...
Add script to add missing arch to Wine scripts
Add script to add missing arch to Wine scripts
Python
agpl-3.0
lutris/website,lutris/website,lutris/website,lutris/website
Add script to add missing arch to Wine scripts
import logging import yaml from django.core.management.base import BaseCommand from games.models import Installer LOGGER = logging.getLogger(__name__) class Command(BaseCommand): help = "My shiny new management command." def add_arch_to_non_wine_installers(self, installer): script_updated = False ...
<commit_before><commit_msg>Add script to add missing arch to Wine scripts<commit_after>
import logging import yaml from django.core.management.base import BaseCommand from games.models import Installer LOGGER = logging.getLogger(__name__) class Command(BaseCommand): help = "My shiny new management command." def add_arch_to_non_wine_installers(self, installer): script_updated = False ...
Add script to add missing arch to Wine scriptsimport logging import yaml from django.core.management.base import BaseCommand from games.models import Installer LOGGER = logging.getLogger(__name__) class Command(BaseCommand): help = "My shiny new management command." def add_arch_to_non_wine_installers(self,...
<commit_before><commit_msg>Add script to add missing arch to Wine scripts<commit_after>import logging import yaml from django.core.management.base import BaseCommand from games.models import Installer LOGGER = logging.getLogger(__name__) class Command(BaseCommand): help = "My shiny new management command." ...
d9c9ba576fda54e22c9292ce43f0fb895d8eb371
py/longest-increasing-path-in-a-matrix.py
py/longest-increasing-path-in-a-matrix.py
from collections import defaultdict, Counter class Solution(object): def longestIncreasingPath(self, matrix): """ :type matrix: List[List[int]] :rtype: int """ if not matrix: return 0 h = len(matrix) w = len(matrix[0]) neighbors = defaultdi...
Add py solution for 329. Longest Increasing Path in a Matrix
Add py solution for 329. Longest Increasing Path in a Matrix 329. Longest Increasing Path in a Matrix: https://leetcode.com/problems/longest-increasing-path-in-a-matrix/ Approach 1: Topological sort and find the maximum chain length
Python
apache-2.0
ckclark/leetcode,ckclark/leetcode,ckclark/leetcode,ckclark/leetcode,ckclark/leetcode,ckclark/leetcode
Add py solution for 329. Longest Increasing Path in a Matrix 329. Longest Increasing Path in a Matrix: https://leetcode.com/problems/longest-increasing-path-in-a-matrix/ Approach 1: Topological sort and find the maximum chain length
from collections import defaultdict, Counter class Solution(object): def longestIncreasingPath(self, matrix): """ :type matrix: List[List[int]] :rtype: int """ if not matrix: return 0 h = len(matrix) w = len(matrix[0]) neighbors = defaultdi...
<commit_before><commit_msg>Add py solution for 329. Longest Increasing Path in a Matrix 329. Longest Increasing Path in a Matrix: https://leetcode.com/problems/longest-increasing-path-in-a-matrix/ Approach 1: Topological sort and find the maximum chain length<commit_after>
from collections import defaultdict, Counter class Solution(object): def longestIncreasingPath(self, matrix): """ :type matrix: List[List[int]] :rtype: int """ if not matrix: return 0 h = len(matrix) w = len(matrix[0]) neighbors = defaultdi...
Add py solution for 329. Longest Increasing Path in a Matrix 329. Longest Increasing Path in a Matrix: https://leetcode.com/problems/longest-increasing-path-in-a-matrix/ Approach 1: Topological sort and find the maximum chain lengthfrom collections import defaultdict, Counter class Solution(object): def longe...
<commit_before><commit_msg>Add py solution for 329. Longest Increasing Path in a Matrix 329. Longest Increasing Path in a Matrix: https://leetcode.com/problems/longest-increasing-path-in-a-matrix/ Approach 1: Topological sort and find the maximum chain length<commit_after>from collections import defaultdict, Coun...
b8bd5fc044d3dd3b273cba4443c771e60036b6c0
corehq/apps/importer/base.py
corehq/apps/importer/base.py
from corehq.apps.data_interfaces.interfaces import DataInterface from django.utils.translation import ugettext as _ class ImportCases(DataInterface): name = _("Import Cases from Excel") slug = "import_cases" description = _("Import case data from an external Excel file") report_template_path = "importe...
from corehq.apps.data_interfaces.interfaces import DataInterface from django.utils.translation import ugettext_lazy class ImportCases(DataInterface): name = ugettext_lazy("Import Cases from Excel") slug = "import_cases" description = ugettext_lazy("Import case data from an external Excel file") report_...
Use lazy translation for importer strings
Use lazy translation for importer strings
Python
bsd-3-clause
SEL-Columbia/commcare-hq,dimagi/commcare-hq,SEL-Columbia/commcare-hq,gmimano/commcaretest,dimagi/commcare-hq,dimagi/commcare-hq,puttarajubr/commcare-hq,SEL-Columbia/commcare-hq,dimagi/commcare-hq,puttarajubr/commcare-hq,dimagi/commcare-hq,qedsoftware/commcare-hq,gmimano/commcaretest,qedsoftware/commcare-hq,puttarajubr/...
from corehq.apps.data_interfaces.interfaces import DataInterface from django.utils.translation import ugettext as _ class ImportCases(DataInterface): name = _("Import Cases from Excel") slug = "import_cases" description = _("Import case data from an external Excel file") report_template_path = "importe...
from corehq.apps.data_interfaces.interfaces import DataInterface from django.utils.translation import ugettext_lazy class ImportCases(DataInterface): name = ugettext_lazy("Import Cases from Excel") slug = "import_cases" description = ugettext_lazy("Import case data from an external Excel file") report_...
<commit_before>from corehq.apps.data_interfaces.interfaces import DataInterface from django.utils.translation import ugettext as _ class ImportCases(DataInterface): name = _("Import Cases from Excel") slug = "import_cases" description = _("Import case data from an external Excel file") report_template_...
from corehq.apps.data_interfaces.interfaces import DataInterface from django.utils.translation import ugettext_lazy class ImportCases(DataInterface): name = ugettext_lazy("Import Cases from Excel") slug = "import_cases" description = ugettext_lazy("Import case data from an external Excel file") report_...
from corehq.apps.data_interfaces.interfaces import DataInterface from django.utils.translation import ugettext as _ class ImportCases(DataInterface): name = _("Import Cases from Excel") slug = "import_cases" description = _("Import case data from an external Excel file") report_template_path = "importe...
<commit_before>from corehq.apps.data_interfaces.interfaces import DataInterface from django.utils.translation import ugettext as _ class ImportCases(DataInterface): name = _("Import Cases from Excel") slug = "import_cases" description = _("Import case data from an external Excel file") report_template_...
6d73e22ed9d885d9678b821b1c46d4a4567fb63f
parsl/tests/manual_tests/plain_executor.py
parsl/tests/manual_tests/plain_executor.py
import time # from requests import get import argparse import parsl # from parsl.config import Config # from parsl.app.app import python_app # from parsl.executors import HighThroughputExecutor # from parsl.providers.slurm.slurm import SlurmProvider # from parsl.launchers import SimpleLauncher def sleep(...
Test case using executors without Parsl
Test case using executors without Parsl
Python
apache-2.0
Parsl/parsl,swift-lang/swift-e-lab,swift-lang/swift-e-lab,Parsl/parsl,Parsl/parsl,Parsl/parsl
Test case using executors without Parsl
import time # from requests import get import argparse import parsl # from parsl.config import Config # from parsl.app.app import python_app # from parsl.executors import HighThroughputExecutor # from parsl.providers.slurm.slurm import SlurmProvider # from parsl.launchers import SimpleLauncher def sleep(...
<commit_before><commit_msg>Test case using executors without Parsl<commit_after>
import time # from requests import get import argparse import parsl # from parsl.config import Config # from parsl.app.app import python_app # from parsl.executors import HighThroughputExecutor # from parsl.providers.slurm.slurm import SlurmProvider # from parsl.launchers import SimpleLauncher def sleep(...
Test case using executors without Parslimport time # from requests import get import argparse import parsl # from parsl.config import Config # from parsl.app.app import python_app # from parsl.executors import HighThroughputExecutor # from parsl.providers.slurm.slurm import SlurmProvider # from parsl.launcher...
<commit_before><commit_msg>Test case using executors without Parsl<commit_after>import time # from requests import get import argparse import parsl # from parsl.config import Config # from parsl.app.app import python_app # from parsl.executors import HighThroughputExecutor # from parsl.providers.slurm.slurm im...
07dde7603367cae9cc52dd8c0b1bdd1d567aa307
nodeconductor/core/tests/test_management.py
nodeconductor/core/tests/test_management.py
import StringIO from django.core.management import call_command from django.test import TestCase class CommandsTestCase(TestCase): def test_no_missing_migrations(self): result = StringIO.StringIO() call_command('makemigrations', dry_run=True, stdout=result) result_string = result.getvalu...
Add a test for missing migrations
Add a test for missing migrations
Python
mit
opennode/nodeconductor,opennode/nodeconductor,opennode/nodeconductor
Add a test for missing migrations
import StringIO from django.core.management import call_command from django.test import TestCase class CommandsTestCase(TestCase): def test_no_missing_migrations(self): result = StringIO.StringIO() call_command('makemigrations', dry_run=True, stdout=result) result_string = result.getvalu...
<commit_before><commit_msg>Add a test for missing migrations<commit_after>
import StringIO from django.core.management import call_command from django.test import TestCase class CommandsTestCase(TestCase): def test_no_missing_migrations(self): result = StringIO.StringIO() call_command('makemigrations', dry_run=True, stdout=result) result_string = result.getvalu...
Add a test for missing migrationsimport StringIO from django.core.management import call_command from django.test import TestCase class CommandsTestCase(TestCase): def test_no_missing_migrations(self): result = StringIO.StringIO() call_command('makemigrations', dry_run=True, stdout=result) ...
<commit_before><commit_msg>Add a test for missing migrations<commit_after>import StringIO from django.core.management import call_command from django.test import TestCase class CommandsTestCase(TestCase): def test_no_missing_migrations(self): result = StringIO.StringIO() call_command('makemigrat...
fac9d34d6c514f33bb97760fcc391ffa17cb7b5d
zerver/management/commands/queue_digest_emails.py
zerver/management/commands/queue_digest_emails.py
from __future__ import absolute_import import datetime import pytz from django.core.management.base import BaseCommand from zerver.lib.queue import queue_json_publish from zerver.models import UserActivity, get_user_profile_by_email VALID_DIGEST_DAYS = (1, 2, 3) def inactive_since(user_profile, cutoff): # Hasn't...
Add a management command to enqueue digest email recipients.
digest: Add a management command to enqueue digest email recipients. (imported from commit 70ff2c7a4dae654f4077041c45e2154b3ac7afb7)
Python
apache-2.0
jonesgithub/zulip,Drooids/zulip,littledogboy/zulip,zorojean/zulip,andersk/zulip,hj3938/zulip,MariaFaBella85/zulip,ashwinirudrappa/zulip,krtkmj/zulip,AZtheAsian/zulip,hustlzp/zulip,Diptanshu8/zulip,dxq-git/zulip,itnihao/zulip,mdavid/zulip,so0k/zulip,zhaoweigg/zulip,susansls/zulip,aps-sids/zulip,verma-varsha/zulip,ApsOps...
digest: Add a management command to enqueue digest email recipients. (imported from commit 70ff2c7a4dae654f4077041c45e2154b3ac7afb7)
from __future__ import absolute_import import datetime import pytz from django.core.management.base import BaseCommand from zerver.lib.queue import queue_json_publish from zerver.models import UserActivity, get_user_profile_by_email VALID_DIGEST_DAYS = (1, 2, 3) def inactive_since(user_profile, cutoff): # Hasn't...
<commit_before><commit_msg>digest: Add a management command to enqueue digest email recipients. (imported from commit 70ff2c7a4dae654f4077041c45e2154b3ac7afb7)<commit_after>
from __future__ import absolute_import import datetime import pytz from django.core.management.base import BaseCommand from zerver.lib.queue import queue_json_publish from zerver.models import UserActivity, get_user_profile_by_email VALID_DIGEST_DAYS = (1, 2, 3) def inactive_since(user_profile, cutoff): # Hasn't...
digest: Add a management command to enqueue digest email recipients. (imported from commit 70ff2c7a4dae654f4077041c45e2154b3ac7afb7)from __future__ import absolute_import import datetime import pytz from django.core.management.base import BaseCommand from zerver.lib.queue import queue_json_publish from zerver.models...
<commit_before><commit_msg>digest: Add a management command to enqueue digest email recipients. (imported from commit 70ff2c7a4dae654f4077041c45e2154b3ac7afb7)<commit_after>from __future__ import absolute_import import datetime import pytz from django.core.management.base import BaseCommand from zerver.lib.queue imp...
1a0be0d7731a6e89c4b84991f1fd486722b7eb39
sample-code/examples/simple_real_device.py
sample-code/examples/simple_real_device.py
"""Be sure to use the latest selenium version as there might be some problems with JSON serialization Before running the test make sure you started appium server with TestApp app: grunt appium:TestApp """ import unittest import os from random import randint from selenium import webdriver class TestSequenceFunctions(...
Add example for real device (iOS).
Add example for real device (iOS).
Python
apache-2.0
appium/appium,appium/appium,appium/appium,appium/appium,Sw0rdstream/appium,appium/appium,appium/appium
Add example for real device (iOS).
"""Be sure to use the latest selenium version as there might be some problems with JSON serialization Before running the test make sure you started appium server with TestApp app: grunt appium:TestApp """ import unittest import os from random import randint from selenium import webdriver class TestSequenceFunctions(...
<commit_before><commit_msg>Add example for real device (iOS).<commit_after>
"""Be sure to use the latest selenium version as there might be some problems with JSON serialization Before running the test make sure you started appium server with TestApp app: grunt appium:TestApp """ import unittest import os from random import randint from selenium import webdriver class TestSequenceFunctions(...
Add example for real device (iOS)."""Be sure to use the latest selenium version as there might be some problems with JSON serialization Before running the test make sure you started appium server with TestApp app: grunt appium:TestApp """ import unittest import os from random import randint from selenium import webdri...
<commit_before><commit_msg>Add example for real device (iOS).<commit_after>"""Be sure to use the latest selenium version as there might be some problems with JSON serialization Before running the test make sure you started appium server with TestApp app: grunt appium:TestApp """ import unittest import os from random i...
5658b7267d3f7070371fb6a8d54e0c128db9b39b
heat/db/sqlalchemy/migrate_repo/versions/028_text_mysql_longtext.py
heat/db/sqlalchemy/migrate_repo/versions/028_text_mysql_longtext.py
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable...
Migrate remaining TEXT columns to LONGTEXT
Migrate remaining TEXT columns to LONGTEXT To avoid cases where mysql silently truncates json data when it is > 2^16 bytes, migrate all remaining TEXT columns to LONGTEXT, in a similar way to the fix for bug #1210799 Combined with the fix for bug #1215501 which limits the request body size, we should never truncate, ...
Python
apache-2.0
openstack/heat,ntt-sic/heat,varunarya10/heat,steveb/heat,varunarya10/heat,maestro-hybrid-cloud/heat,NeCTAR-RC/heat,noironetworks/heat,rdo-management/heat,noironetworks/heat,openstack/heat,rh-s/heat,miguelgrinberg/heat,redhat-openstack/heat,cryptickp/heat,pshchelo/heat,citrix-openstack-build/heat,ntt-sic/heat,NeCTAR-RC/...
Migrate remaining TEXT columns to LONGTEXT To avoid cases where mysql silently truncates json data when it is > 2^16 bytes, migrate all remaining TEXT columns to LONGTEXT, in a similar way to the fix for bug #1210799 Combined with the fix for bug #1215501 which limits the request body size, we should never truncate, ...
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable...
<commit_before><commit_msg>Migrate remaining TEXT columns to LONGTEXT To avoid cases where mysql silently truncates json data when it is > 2^16 bytes, migrate all remaining TEXT columns to LONGTEXT, in a similar way to the fix for bug #1210799 Combined with the fix for bug #1215501 which limits the request body size,...
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable...
Migrate remaining TEXT columns to LONGTEXT To avoid cases where mysql silently truncates json data when it is > 2^16 bytes, migrate all remaining TEXT columns to LONGTEXT, in a similar way to the fix for bug #1210799 Combined with the fix for bug #1215501 which limits the request body size, we should never truncate, ...
<commit_before><commit_msg>Migrate remaining TEXT columns to LONGTEXT To avoid cases where mysql silently truncates json data when it is > 2^16 bytes, migrate all remaining TEXT columns to LONGTEXT, in a similar way to the fix for bug #1210799 Combined with the fix for bug #1215501 which limits the request body size,...
d709a553d73438a88e56df2aa96532f0c4d570e9
nbgrader/alembic/versions/50a4d84c131a_add_kernelspecs.py
nbgrader/alembic/versions/50a4d84c131a_add_kernelspecs.py
"""add kernelspecs Revision ID: 50a4d84c131a Revises: b6d005d67074 Create Date: 2017-06-01 16:48:02.243764 """ from alembic import op import sqlalchemy as sa # revision identifiers, used by Alembic. revision = '50a4d84c131a' down_revision = 'b6d005d67074' branch_labels = None depends_on = None def upgrade(): ...
Upgrade database to add kernelspec column
Upgrade database to add kernelspec column
Python
bsd-3-clause
jhamrick/nbgrader,jupyter/nbgrader,jupyter/nbgrader,jhamrick/nbgrader,jhamrick/nbgrader,jhamrick/nbgrader,jupyter/nbgrader,jupyter/nbgrader,jupyter/nbgrader
Upgrade database to add kernelspec column
"""add kernelspecs Revision ID: 50a4d84c131a Revises: b6d005d67074 Create Date: 2017-06-01 16:48:02.243764 """ from alembic import op import sqlalchemy as sa # revision identifiers, used by Alembic. revision = '50a4d84c131a' down_revision = 'b6d005d67074' branch_labels = None depends_on = None def upgrade(): ...
<commit_before><commit_msg>Upgrade database to add kernelspec column<commit_after>
"""add kernelspecs Revision ID: 50a4d84c131a Revises: b6d005d67074 Create Date: 2017-06-01 16:48:02.243764 """ from alembic import op import sqlalchemy as sa # revision identifiers, used by Alembic. revision = '50a4d84c131a' down_revision = 'b6d005d67074' branch_labels = None depends_on = None def upgrade(): ...
Upgrade database to add kernelspec column"""add kernelspecs Revision ID: 50a4d84c131a Revises: b6d005d67074 Create Date: 2017-06-01 16:48:02.243764 """ from alembic import op import sqlalchemy as sa # revision identifiers, used by Alembic. revision = '50a4d84c131a' down_revision = 'b6d005d67074' branch_labels = Non...
<commit_before><commit_msg>Upgrade database to add kernelspec column<commit_after>"""add kernelspecs Revision ID: 50a4d84c131a Revises: b6d005d67074 Create Date: 2017-06-01 16:48:02.243764 """ from alembic import op import sqlalchemy as sa # revision identifiers, used by Alembic. revision = '50a4d84c131a' down_revi...
79026437668aac69c24790c3d06868067c4d0bd5
src/s.save_csv.py
src/s.save_csv.py
import argparse import os import caffe import leveldb import numpy as np import pandas as pd import dataset as data DFLT_INPUT = 'data/nn00/test_65001' HELP_INPUT = 'Fullpath of file/folder with results' DFLT_NKEYS = 1304000 HELP_NKEYS = 'Number of keys in the database' HELP_OUTPUT ='Name of csv file for submission'...
Add script to create csv for submissions
Add script to create csv for submissions
Python
mit
escorciav/ndsb,escorciav/ndsb
Add script to create csv for submissions
import argparse import os import caffe import leveldb import numpy as np import pandas as pd import dataset as data DFLT_INPUT = 'data/nn00/test_65001' HELP_INPUT = 'Fullpath of file/folder with results' DFLT_NKEYS = 1304000 HELP_NKEYS = 'Number of keys in the database' HELP_OUTPUT ='Name of csv file for submission'...
<commit_before><commit_msg>Add script to create csv for submissions<commit_after>
import argparse import os import caffe import leveldb import numpy as np import pandas as pd import dataset as data DFLT_INPUT = 'data/nn00/test_65001' HELP_INPUT = 'Fullpath of file/folder with results' DFLT_NKEYS = 1304000 HELP_NKEYS = 'Number of keys in the database' HELP_OUTPUT ='Name of csv file for submission'...
Add script to create csv for submissionsimport argparse import os import caffe import leveldb import numpy as np import pandas as pd import dataset as data DFLT_INPUT = 'data/nn00/test_65001' HELP_INPUT = 'Fullpath of file/folder with results' DFLT_NKEYS = 1304000 HELP_NKEYS = 'Number of keys in the database' HELP_O...
<commit_before><commit_msg>Add script to create csv for submissions<commit_after>import argparse import os import caffe import leveldb import numpy as np import pandas as pd import dataset as data DFLT_INPUT = 'data/nn00/test_65001' HELP_INPUT = 'Fullpath of file/folder with results' DFLT_NKEYS = 1304000 HELP_NKEYS ...
1a58a6f4ca0e1d00270fbbc35120328cb769d807
src/swift-auth.py
src/swift-auth.py
# coding: utf-8 import requests url = 'https://lon-identity.open.softlayer.com/v3/auth/tokens' headers={'Content-Type': 'application/json'} data = '''{ "auth": { "identity": { "methods": [ "password" ], "password": { "user": { ...
Create python script to access bluemix object storage
Create python script to access bluemix object storage
Python
mit
tomoyuki-nakabayashi/bluemix-object-storage-test,tomoyuki-nakabayashi/bluemix-object-storage-test
Create python script to access bluemix object storage
# coding: utf-8 import requests url = 'https://lon-identity.open.softlayer.com/v3/auth/tokens' headers={'Content-Type': 'application/json'} data = '''{ "auth": { "identity": { "methods": [ "password" ], "password": { "user": { ...
<commit_before><commit_msg>Create python script to access bluemix object storage<commit_after>
# coding: utf-8 import requests url = 'https://lon-identity.open.softlayer.com/v3/auth/tokens' headers={'Content-Type': 'application/json'} data = '''{ "auth": { "identity": { "methods": [ "password" ], "password": { "user": { ...
Create python script to access bluemix object storage# coding: utf-8 import requests url = 'https://lon-identity.open.softlayer.com/v3/auth/tokens' headers={'Content-Type': 'application/json'} data = '''{ "auth": { "identity": { "methods": [ "password" ], ...
<commit_before><commit_msg>Create python script to access bluemix object storage<commit_after># coding: utf-8 import requests url = 'https://lon-identity.open.softlayer.com/v3/auth/tokens' headers={'Content-Type': 'application/json'} data = '''{ "auth": { "identity": { "methods": [ ...
c90748dba9b751f833d6663f115f1592c1293ae7
ucf_sub_embedded_ros/ucf_sub/src/sub_sensors/src/StartButton.py
ucf_sub_embedded_ros/ucf_sub/src/sub_sensors/src/StartButton.py
#!/usr/bin/env python3 import gpio import rospy import time from std_msgs.msg import Bool CHANNEL = 395 gpio.setup(CHANNEL, gpio.IN) if __name__ == '__main__': rospy.init_node("StartButton") start_pub = rospy.Publisher("/start", Bool, queue_size=10) r = rospy.Rate(4) while not rospy.is_shutdown(): ...
Create simple node to check start button state
Create simple node to check start button state
Python
mit
RoboticsClubatUCF/RoboSub,RoboticsClubatUCF/RoboSub,RoboticsClubatUCF/RoboSub,RoboticsClubatUCF/RoboSub
Create simple node to check start button state
#!/usr/bin/env python3 import gpio import rospy import time from std_msgs.msg import Bool CHANNEL = 395 gpio.setup(CHANNEL, gpio.IN) if __name__ == '__main__': rospy.init_node("StartButton") start_pub = rospy.Publisher("/start", Bool, queue_size=10) r = rospy.Rate(4) while not rospy.is_shutdown(): ...
<commit_before><commit_msg>Create simple node to check start button state<commit_after>
#!/usr/bin/env python3 import gpio import rospy import time from std_msgs.msg import Bool CHANNEL = 395 gpio.setup(CHANNEL, gpio.IN) if __name__ == '__main__': rospy.init_node("StartButton") start_pub = rospy.Publisher("/start", Bool, queue_size=10) r = rospy.Rate(4) while not rospy.is_shutdown(): ...
Create simple node to check start button state#!/usr/bin/env python3 import gpio import rospy import time from std_msgs.msg import Bool CHANNEL = 395 gpio.setup(CHANNEL, gpio.IN) if __name__ == '__main__': rospy.init_node("StartButton") start_pub = rospy.Publisher("/start", Bool, queue_size=10) r = rospy....
<commit_before><commit_msg>Create simple node to check start button state<commit_after>#!/usr/bin/env python3 import gpio import rospy import time from std_msgs.msg import Bool CHANNEL = 395 gpio.setup(CHANNEL, gpio.IN) if __name__ == '__main__': rospy.init_node("StartButton") start_pub = rospy.Publisher("/st...
a89ab233ab57f37b6e5bb07906fc6d54c9a0efb0
registrations/management/commands/repopulate_subscriptions.py
registrations/management/commands/repopulate_subscriptions.py
from os import environ from django.core.management.base import BaseCommand, CommandError from registrations.models import Registration from registrations.tasks import validate_registration from seed_services_client import StageBasedMessagingApiClient from ._utils import validate_and_return_url class Command(BaseC...
Add management command for repopulating subscriptions
Add management command for repopulating subscriptions
Python
bsd-3-clause
praekelt/hellomama-registration,praekelt/hellomama-registration
Add management command for repopulating subscriptions
from os import environ from django.core.management.base import BaseCommand, CommandError from registrations.models import Registration from registrations.tasks import validate_registration from seed_services_client import StageBasedMessagingApiClient from ._utils import validate_and_return_url class Command(BaseC...
<commit_before><commit_msg>Add management command for repopulating subscriptions<commit_after>
from os import environ from django.core.management.base import BaseCommand, CommandError from registrations.models import Registration from registrations.tasks import validate_registration from seed_services_client import StageBasedMessagingApiClient from ._utils import validate_and_return_url class Command(BaseC...
Add management command for repopulating subscriptionsfrom os import environ from django.core.management.base import BaseCommand, CommandError from registrations.models import Registration from registrations.tasks import validate_registration from seed_services_client import StageBasedMessagingApiClient from ._utils...
<commit_before><commit_msg>Add management command for repopulating subscriptions<commit_after>from os import environ from django.core.management.base import BaseCommand, CommandError from registrations.models import Registration from registrations.tasks import validate_registration from seed_services_client import S...
d9818c3212e327b8de25f9844b0456e4a56270a3
examples/char_lcd.py
examples/char_lcd.py
#!/usr/bin/python # Example using a character LCD connected to a Raspberry Pi or BeagleBone Black. import math import time import Adafruit_CharLCD as LCD # Raspberry Pi pin configuration: lcd_rs = 27 # Note this might need to be changed to 21 for older revision Pi's. lcd_en = 22 lcd_d4 = 25 lcd...
Add basic char LCD example.
Add basic char LCD example.
Python
mit
jfabi/infomini,mtnahill/DomeTrainingRig,adafruit/Adafruit_Python_CharLCD,sylvandb/Adafruit_Python_CharLCD,retrography/Adafruit_Python_CharLCD,mtnahill/DomeTrainingRig,thurstylark/Adafruit_Python_CharLCD,gik60/LabProject,saraf/Adafruit_Python_CharLCD
Add basic char LCD example.
#!/usr/bin/python # Example using a character LCD connected to a Raspberry Pi or BeagleBone Black. import math import time import Adafruit_CharLCD as LCD # Raspberry Pi pin configuration: lcd_rs = 27 # Note this might need to be changed to 21 for older revision Pi's. lcd_en = 22 lcd_d4 = 25 lcd...
<commit_before><commit_msg>Add basic char LCD example.<commit_after>
#!/usr/bin/python # Example using a character LCD connected to a Raspberry Pi or BeagleBone Black. import math import time import Adafruit_CharLCD as LCD # Raspberry Pi pin configuration: lcd_rs = 27 # Note this might need to be changed to 21 for older revision Pi's. lcd_en = 22 lcd_d4 = 25 lcd...
Add basic char LCD example.#!/usr/bin/python # Example using a character LCD connected to a Raspberry Pi or BeagleBone Black. import math import time import Adafruit_CharLCD as LCD # Raspberry Pi pin configuration: lcd_rs = 27 # Note this might need to be changed to 21 for older revision Pi's. lcd_en ...
<commit_before><commit_msg>Add basic char LCD example.<commit_after>#!/usr/bin/python # Example using a character LCD connected to a Raspberry Pi or BeagleBone Black. import math import time import Adafruit_CharLCD as LCD # Raspberry Pi pin configuration: lcd_rs = 27 # Note this might need to be changed to 2...
5059c8776c6ddc16c2f037e40dd0af849e9ca673
alembic/versions/2ea9623b21fa_add_an_active_field_to_filter.py
alembic/versions/2ea9623b21fa_add_an_active_field_to_filter.py
"""Add an active field to Filter Revision ID: 2ea9623b21fa Revises: 18ebf3181f87 Create Date: 2014-09-03 09:37:39.653039 """ # revision identifiers, used by Alembic. revision = '2ea9623b21fa' down_revision = '18ebf3181f87' from alembic import op import sqlalchemy as sa def upgrade(): op.add_column( 'f...
Add an alembic migration script adding the `active` field to the filters table
Add an alembic migration script adding the `active` field to the filters table Relates to https://github.com/fedora-infra/fmn/issues/13
Python
lgpl-2.1
jeremycline/fmn,jeremycline/fmn,jeremycline/fmn
Add an alembic migration script adding the `active` field to the filters table Relates to https://github.com/fedora-infra/fmn/issues/13
"""Add an active field to Filter Revision ID: 2ea9623b21fa Revises: 18ebf3181f87 Create Date: 2014-09-03 09:37:39.653039 """ # revision identifiers, used by Alembic. revision = '2ea9623b21fa' down_revision = '18ebf3181f87' from alembic import op import sqlalchemy as sa def upgrade(): op.add_column( 'f...
<commit_before><commit_msg>Add an alembic migration script adding the `active` field to the filters table Relates to https://github.com/fedora-infra/fmn/issues/13<commit_after>
"""Add an active field to Filter Revision ID: 2ea9623b21fa Revises: 18ebf3181f87 Create Date: 2014-09-03 09:37:39.653039 """ # revision identifiers, used by Alembic. revision = '2ea9623b21fa' down_revision = '18ebf3181f87' from alembic import op import sqlalchemy as sa def upgrade(): op.add_column( 'f...
Add an alembic migration script adding the `active` field to the filters table Relates to https://github.com/fedora-infra/fmn/issues/13"""Add an active field to Filter Revision ID: 2ea9623b21fa Revises: 18ebf3181f87 Create Date: 2014-09-03 09:37:39.653039 """ # revision identifiers, used by Alembic. revision = '2ea...
<commit_before><commit_msg>Add an alembic migration script adding the `active` field to the filters table Relates to https://github.com/fedora-infra/fmn/issues/13<commit_after>"""Add an active field to Filter Revision ID: 2ea9623b21fa Revises: 18ebf3181f87 Create Date: 2014-09-03 09:37:39.653039 """ # revision iden...
406ea23adcf67e4bcce5959dac2f1386374a6b34
analysis/plot-target-approach.py
analysis/plot-target-approach.py
import climate import itertools import lmj.plot import numpy as np import source as experiment import plots @climate.annotate( root='plot data from this experiment subjects', pattern=('plot data from files matching this pattern', 'option'), markers=('plot data for these mocap markers', 'option'), tar...
Add a starter script for plotting marker trajectories approaching targets.
Add a starter script for plotting marker trajectories approaching targets.
Python
mit
lmjohns3/cube-experiment,lmjohns3/cube-experiment,lmjohns3/cube-experiment
Add a starter script for plotting marker trajectories approaching targets.
import climate import itertools import lmj.plot import numpy as np import source as experiment import plots @climate.annotate( root='plot data from this experiment subjects', pattern=('plot data from files matching this pattern', 'option'), markers=('plot data for these mocap markers', 'option'), tar...
<commit_before><commit_msg>Add a starter script for plotting marker trajectories approaching targets.<commit_after>
import climate import itertools import lmj.plot import numpy as np import source as experiment import plots @climate.annotate( root='plot data from this experiment subjects', pattern=('plot data from files matching this pattern', 'option'), markers=('plot data for these mocap markers', 'option'), tar...
Add a starter script for plotting marker trajectories approaching targets.import climate import itertools import lmj.plot import numpy as np import source as experiment import plots @climate.annotate( root='plot data from this experiment subjects', pattern=('plot data from files matching this pattern', 'opti...
<commit_before><commit_msg>Add a starter script for plotting marker trajectories approaching targets.<commit_after>import climate import itertools import lmj.plot import numpy as np import source as experiment import plots @climate.annotate( root='plot data from this experiment subjects', pattern=('plot data...
87be0fa9d4cd105ffa27c743e79b02689f0602d3
python/static_catalog.py
python/static_catalog.py
from pymongo import MongoClient path = '/Users/willettk/Astronomy/Research/GalaxyZoo/rgz-analysis' def load_data(): client = MongoClient('localhost', 27017) db = client['rgz'] catalog = db['catalog'] return catalog def run_static(catalog): filename = '%s/csv/static_catalog.csv' with o...
Create an ASCII version of static catalog for Larry
Create an ASCII version of static catalog for Larry
Python
mit
willettk/rgz-analysis,willettk/rgz-analysis,willettk/rgz-analysis,afgaron/rgz-analysis,afgaron/rgz-analysis,afgaron/rgz-analysis
Create an ASCII version of static catalog for Larry
from pymongo import MongoClient path = '/Users/willettk/Astronomy/Research/GalaxyZoo/rgz-analysis' def load_data(): client = MongoClient('localhost', 27017) db = client['rgz'] catalog = db['catalog'] return catalog def run_static(catalog): filename = '%s/csv/static_catalog.csv' with o...
<commit_before><commit_msg>Create an ASCII version of static catalog for Larry<commit_after>
from pymongo import MongoClient path = '/Users/willettk/Astronomy/Research/GalaxyZoo/rgz-analysis' def load_data(): client = MongoClient('localhost', 27017) db = client['rgz'] catalog = db['catalog'] return catalog def run_static(catalog): filename = '%s/csv/static_catalog.csv' with o...
Create an ASCII version of static catalog for Larryfrom pymongo import MongoClient path = '/Users/willettk/Astronomy/Research/GalaxyZoo/rgz-analysis' def load_data(): client = MongoClient('localhost', 27017) db = client['rgz'] catalog = db['catalog'] return catalog def run_static(catalog): ...
<commit_before><commit_msg>Create an ASCII version of static catalog for Larry<commit_after>from pymongo import MongoClient path = '/Users/willettk/Astronomy/Research/GalaxyZoo/rgz-analysis' def load_data(): client = MongoClient('localhost', 27017) db = client['rgz'] catalog = db['catalog'] re...
dca8802b77a4682d9f6a09e68cdc807736e830a8
fmn/rules/buidsys.py
fmn/rules/buidsys.py
def buildsys_build_state_change(config, message): """ Buildsys: build changed state (started, failed, finished) TODO description for the web interface goes here """ return message['topic'].endswith('buildsys.build.state.change') def buildsys_package_list_change(config, message): """ Buildsys: P...
Add filters for the buildsystem messages
Add filters for the buildsystem messages
Python
lgpl-2.1
jeremycline/fmn,jeremycline/fmn,jeremycline/fmn
Add filters for the buildsystem messages
def buildsys_build_state_change(config, message): """ Buildsys: build changed state (started, failed, finished) TODO description for the web interface goes here """ return message['topic'].endswith('buildsys.build.state.change') def buildsys_package_list_change(config, message): """ Buildsys: P...
<commit_before><commit_msg>Add filters for the buildsystem messages<commit_after>
def buildsys_build_state_change(config, message): """ Buildsys: build changed state (started, failed, finished) TODO description for the web interface goes here """ return message['topic'].endswith('buildsys.build.state.change') def buildsys_package_list_change(config, message): """ Buildsys: P...
Add filters for the buildsystem messages def buildsys_build_state_change(config, message): """ Buildsys: build changed state (started, failed, finished) TODO description for the web interface goes here """ return message['topic'].endswith('buildsys.build.state.change') def buildsys_package_list_chan...
<commit_before><commit_msg>Add filters for the buildsystem messages<commit_after> def buildsys_build_state_change(config, message): """ Buildsys: build changed state (started, failed, finished) TODO description for the web interface goes here """ return message['topic'].endswith('buildsys.build.state....
94f1fc2b227ad2b6c1c441e74352b108688f0172
loinc_generate.py
loinc_generate.py
import argparse parser = argparse.ArgumentParser() parser.add_argument("--start", type=int) parser.add_argument("--num", type=int) parser.add_argument("--noX", action="count") args = parser.parse_args() start = args.start num = args.num noX = args.noX def nextTen(n): if (n % 10): n = n + (10 - n % 10) ...
Add script to generate custom loinc codes
Add script to generate custom loinc codes
Python
apache-2.0
ibmkendrick/streamsx.health,ibmkendrick/streamsx.health,IBMStreams/streamsx.health,IBMStreams/streamsx.health,ibmkendrick/streamsx.health,IBMStreams/streamsx.health,IBMStreams/streamsx.health,ibmkendrick/streamsx.health,IBMStreams/streamsx.health,ibmkendrick/streamsx.health
Add script to generate custom loinc codes
import argparse parser = argparse.ArgumentParser() parser.add_argument("--start", type=int) parser.add_argument("--num", type=int) parser.add_argument("--noX", action="count") args = parser.parse_args() start = args.start num = args.num noX = args.noX def nextTen(n): if (n % 10): n = n + (10 - n % 10) ...
<commit_before><commit_msg>Add script to generate custom loinc codes<commit_after>
import argparse parser = argparse.ArgumentParser() parser.add_argument("--start", type=int) parser.add_argument("--num", type=int) parser.add_argument("--noX", action="count") args = parser.parse_args() start = args.start num = args.num noX = args.noX def nextTen(n): if (n % 10): n = n + (10 - n % 10) ...
Add script to generate custom loinc codesimport argparse parser = argparse.ArgumentParser() parser.add_argument("--start", type=int) parser.add_argument("--num", type=int) parser.add_argument("--noX", action="count") args = parser.parse_args() start = args.start num = args.num noX = args.noX def nextTen(n): if (...
<commit_before><commit_msg>Add script to generate custom loinc codes<commit_after>import argparse parser = argparse.ArgumentParser() parser.add_argument("--start", type=int) parser.add_argument("--num", type=int) parser.add_argument("--noX", action="count") args = parser.parse_args() start = args.start num = args.num...
d7641279fee4adcf393a68143612199773fcd4c2
st2common/tests/test_util_sandboxing.py
st2common/tests/test_util_sandboxing.py
import os import sys import unittest import mock from st2common.util.sandboxing import get_sandbox_python_path class SandboxingUtilsTestCase(unittest.TestCase): @mock.patch('st2common.util.sandboxing.get_python_lib') def test_get_sandbox_python_path(self, mock_get_python_lib): # No inheritence ...
Add tests for sandboxing utils.
Add tests for sandboxing utils.
Python
apache-2.0
punalpatel/st2,grengojbo/st2,grengojbo/st2,pinterb/st2,pixelrebel/st2,dennybaa/st2,nzlosh/st2,Plexxi/st2,pixelrebel/st2,StackStorm/st2,dennybaa/st2,tonybaloney/st2,StackStorm/st2,nzlosh/st2,armab/st2,armab/st2,StackStorm/st2,Plexxi/st2,grengojbo/st2,peak6/st2,Itxaka/st2,pinterb/st2,pixelrebel/st2,pinterb/st2,tonybalone...
Add tests for sandboxing utils.
import os import sys import unittest import mock from st2common.util.sandboxing import get_sandbox_python_path class SandboxingUtilsTestCase(unittest.TestCase): @mock.patch('st2common.util.sandboxing.get_python_lib') def test_get_sandbox_python_path(self, mock_get_python_lib): # No inheritence ...
<commit_before><commit_msg>Add tests for sandboxing utils.<commit_after>
import os import sys import unittest import mock from st2common.util.sandboxing import get_sandbox_python_path class SandboxingUtilsTestCase(unittest.TestCase): @mock.patch('st2common.util.sandboxing.get_python_lib') def test_get_sandbox_python_path(self, mock_get_python_lib): # No inheritence ...
Add tests for sandboxing utils.import os import sys import unittest import mock from st2common.util.sandboxing import get_sandbox_python_path class SandboxingUtilsTestCase(unittest.TestCase): @mock.patch('st2common.util.sandboxing.get_python_lib') def test_get_sandbox_python_path(self, mock_get_python_lib)...
<commit_before><commit_msg>Add tests for sandboxing utils.<commit_after>import os import sys import unittest import mock from st2common.util.sandboxing import get_sandbox_python_path class SandboxingUtilsTestCase(unittest.TestCase): @mock.patch('st2common.util.sandboxing.get_python_lib') def test_get_sandb...
da4e1b3e2598e448d6325f97142e613af079d106
tests/conftest.py
tests/conftest.py
import pytest @pytest.fixture def credentials(): """Fake set of MWS credentials""" return { "access_key": "AAAAAAAAAAAAAAAAAAAA", "secret_key": "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", "account_id": "AAAAAAAAAAAAAA", }
Add fake MWS credentials pytest fixture
Add fake MWS credentials pytest fixture
Python
unlicense
Bobspadger/python-amazon-mws,GriceTurrble/python-amazon-mws
Add fake MWS credentials pytest fixture
import pytest @pytest.fixture def credentials(): """Fake set of MWS credentials""" return { "access_key": "AAAAAAAAAAAAAAAAAAAA", "secret_key": "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", "account_id": "AAAAAAAAAAAAAA", }
<commit_before><commit_msg>Add fake MWS credentials pytest fixture<commit_after>
import pytest @pytest.fixture def credentials(): """Fake set of MWS credentials""" return { "access_key": "AAAAAAAAAAAAAAAAAAAA", "secret_key": "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", "account_id": "AAAAAAAAAAAAAA", }
Add fake MWS credentials pytest fixtureimport pytest @pytest.fixture def credentials(): """Fake set of MWS credentials""" return { "access_key": "AAAAAAAAAAAAAAAAAAAA", "secret_key": "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", "account_id": "AAAAAAAAAAAAAA", }
<commit_before><commit_msg>Add fake MWS credentials pytest fixture<commit_after>import pytest @pytest.fixture def credentials(): """Fake set of MWS credentials""" return { "access_key": "AAAAAAAAAAAAAAAAAAAA", "secret_key": "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", "account_id": "AAA...
63f9bf61a8edcbd88844281c3d343097a8ca49ef
tests/test_cli.py
tests/test_cli.py
import re def test_simple(pyscript): script = pyscript(""" import click from daemonocle.cli import DaemonCLI @click.command(cls=DaemonCLI, daemon_params={'prog': 'foo', 'pidfile': 'foo.pid'}) def main(): \"\"\"My awesome daemon\"\"\" ...
Add tests for Click integration
Add tests for Click integration
Python
mit
jnrbsn/daemonocle
Add tests for Click integration
import re def test_simple(pyscript): script = pyscript(""" import click from daemonocle.cli import DaemonCLI @click.command(cls=DaemonCLI, daemon_params={'prog': 'foo', 'pidfile': 'foo.pid'}) def main(): \"\"\"My awesome daemon\"\"\" ...
<commit_before><commit_msg>Add tests for Click integration<commit_after>
import re def test_simple(pyscript): script = pyscript(""" import click from daemonocle.cli import DaemonCLI @click.command(cls=DaemonCLI, daemon_params={'prog': 'foo', 'pidfile': 'foo.pid'}) def main(): \"\"\"My awesome daemon\"\"\" ...
Add tests for Click integrationimport re def test_simple(pyscript): script = pyscript(""" import click from daemonocle.cli import DaemonCLI @click.command(cls=DaemonCLI, daemon_params={'prog': 'foo', 'pidfile': 'foo.pid'}) def main(): \"\"\"My aw...
<commit_before><commit_msg>Add tests for Click integration<commit_after>import re def test_simple(pyscript): script = pyscript(""" import click from daemonocle.cli import DaemonCLI @click.command(cls=DaemonCLI, daemon_params={'prog': 'foo', 'pidfile': 'foo.pid'}) ...
dd4ca2f934978b36a381a756c6a6c97429dea6a5
zerver/migrations/0008_preregistrationuser_upper_email_idx.py
zerver/migrations/0008_preregistrationuser_upper_email_idx.py
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations class Migration(migrations.Migration): dependencies = [ ('zerver', '0007_userprofile_is_bot_active_indexes'), ] operations = [ migrations.RunSQL("CREATE INDEX upper_preregistration_e...
Add case-insensitive index on PreregistrationUser.email.
Add case-insensitive index on PreregistrationUser.email. This fixes a performance issue joining a server with a large number of users. Thanks to @dbiollo for the suggestion!
Python
apache-2.0
vikas-parashar/zulip,amanharitsh123/zulip,paxapy/zulip,jainayush975/zulip,Galexrt/zulip,Jianchun1/zulip,KingxBanana/zulip,mohsenSy/zulip,Vallher/zulip,Galexrt/zulip,synicalsyntax/zulip,dhcrzf/zulip,punchagan/zulip,reyha/zulip,blaze225/zulip,cosmicAsymmetry/zulip,verma-varsha/zulip,joyhchen/zulip,isht3/zulip,punchagan/z...
Add case-insensitive index on PreregistrationUser.email. This fixes a performance issue joining a server with a large number of users. Thanks to @dbiollo for the suggestion!
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations class Migration(migrations.Migration): dependencies = [ ('zerver', '0007_userprofile_is_bot_active_indexes'), ] operations = [ migrations.RunSQL("CREATE INDEX upper_preregistration_e...
<commit_before><commit_msg>Add case-insensitive index on PreregistrationUser.email. This fixes a performance issue joining a server with a large number of users. Thanks to @dbiollo for the suggestion!<commit_after>
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations class Migration(migrations.Migration): dependencies = [ ('zerver', '0007_userprofile_is_bot_active_indexes'), ] operations = [ migrations.RunSQL("CREATE INDEX upper_preregistration_e...
Add case-insensitive index on PreregistrationUser.email. This fixes a performance issue joining a server with a large number of users. Thanks to @dbiollo for the suggestion!# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations class Migration(migrations.Migration)...
<commit_before><commit_msg>Add case-insensitive index on PreregistrationUser.email. This fixes a performance issue joining a server with a large number of users. Thanks to @dbiollo for the suggestion!<commit_after># -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migration...
cf6c98abea7e14f897f650f9c4e644c3380caab2
django/website/main/tests/test_merge_coverage_prepare_package_filters.py
django/website/main/tests/test_merge_coverage_prepare_package_filters.py
from main.tests.helper_methods import get_command_with_parsed_options def test_prepare_package_filters_returns_none_when_no_package_filters(): merge_coverage_files_command = get_command_with_parsed_options({ 'packagefilters': [], }) assert merge_coverage_files_command.prepare_packagefilters() is ...
Add tests for preparing filters
Add tests for preparing filters
Python
agpl-3.0
aptivate/alfie,aptivate/kashana,aptivate/kashana,aptivate/alfie,aptivate/kashana,aptivate/alfie,daniell/kashana,aptivate/kashana,aptivate/alfie,daniell/kashana,daniell/kashana,daniell/kashana
Add tests for preparing filters
from main.tests.helper_methods import get_command_with_parsed_options def test_prepare_package_filters_returns_none_when_no_package_filters(): merge_coverage_files_command = get_command_with_parsed_options({ 'packagefilters': [], }) assert merge_coverage_files_command.prepare_packagefilters() is ...
<commit_before><commit_msg>Add tests for preparing filters<commit_after>
from main.tests.helper_methods import get_command_with_parsed_options def test_prepare_package_filters_returns_none_when_no_package_filters(): merge_coverage_files_command = get_command_with_parsed_options({ 'packagefilters': [], }) assert merge_coverage_files_command.prepare_packagefilters() is ...
Add tests for preparing filtersfrom main.tests.helper_methods import get_command_with_parsed_options def test_prepare_package_filters_returns_none_when_no_package_filters(): merge_coverage_files_command = get_command_with_parsed_options({ 'packagefilters': [], }) assert merge_coverage_files_comma...
<commit_before><commit_msg>Add tests for preparing filters<commit_after>from main.tests.helper_methods import get_command_with_parsed_options def test_prepare_package_filters_returns_none_when_no_package_filters(): merge_coverage_files_command = get_command_with_parsed_options({ 'packagefilters': [], ...
d12a4d5fbaeb068e5e7544a9b9e09a9842e48bc1
satori.core/satori/core/wsgi.py
satori.core/satori/core/wsgi.py
import sys import os from django.core.wsgi import get_wsgi_application os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'satori.core.settings') application = get_wsgi_application() # initialize thrift server structures - takes a long time and it's better # to do it on startup than during the first request import sato...
Add satori.core WSGI aplication file (belongs to 97b22ae4a25e, but forgot to add the file).
Add satori.core WSGI aplication file (belongs to 97b22ae4a25e, but forgot to add the file).
Python
mit
zielmicha/satori,zielmicha/satori,zielmicha/satori,zielmicha/satori,zielmicha/satori,zielmicha/satori,zielmicha/satori
Add satori.core WSGI aplication file (belongs to 97b22ae4a25e, but forgot to add the file).
import sys import os from django.core.wsgi import get_wsgi_application os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'satori.core.settings') application = get_wsgi_application() # initialize thrift server structures - takes a long time and it's better # to do it on startup than during the first request import sato...
<commit_before><commit_msg>Add satori.core WSGI aplication file (belongs to 97b22ae4a25e, but forgot to add the file).<commit_after>
import sys import os from django.core.wsgi import get_wsgi_application os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'satori.core.settings') application = get_wsgi_application() # initialize thrift server structures - takes a long time and it's better # to do it on startup than during the first request import sato...
Add satori.core WSGI aplication file (belongs to 97b22ae4a25e, but forgot to add the file).import sys import os from django.core.wsgi import get_wsgi_application os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'satori.core.settings') application = get_wsgi_application() # initialize thrift server structures - takes ...
<commit_before><commit_msg>Add satori.core WSGI aplication file (belongs to 97b22ae4a25e, but forgot to add the file).<commit_after>import sys import os from django.core.wsgi import get_wsgi_application os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'satori.core.settings') application = get_wsgi_application() # ini...
d97b34d01c60ded20f79f968a7fa8f2f866a1a89
File_Transfer_Protocol/ftp_send_receive.py
File_Transfer_Protocol/ftp_send_receive.py
""" File transfer protocol used to send and receive files using FTP server. Use credentials to provide access to the FTP client Note: Do not use root username & password for security reasons Create a seperate user and provide access to a home directory of the user Use login id and password of the user creat...
Send & receive files via ftp
Send & receive files via ftp
Python
mit
TheAlgorithms/Python
Send & receive files via ftp
""" File transfer protocol used to send and receive files using FTP server. Use credentials to provide access to the FTP client Note: Do not use root username & password for security reasons Create a seperate user and provide access to a home directory of the user Use login id and password of the user creat...
<commit_before><commit_msg>Send & receive files via ftp<commit_after>
""" File transfer protocol used to send and receive files using FTP server. Use credentials to provide access to the FTP client Note: Do not use root username & password for security reasons Create a seperate user and provide access to a home directory of the user Use login id and password of the user creat...
Send & receive files via ftp""" File transfer protocol used to send and receive files using FTP server. Use credentials to provide access to the FTP client Note: Do not use root username & password for security reasons Create a seperate user and provide access to a home directory of the user Use login id an...
<commit_before><commit_msg>Send & receive files via ftp<commit_after>""" File transfer protocol used to send and receive files using FTP server. Use credentials to provide access to the FTP client Note: Do not use root username & password for security reasons Create a seperate user and provide access to a home ...
325862842887a671dd485277b73b9277fbbcc6e0
core/tests/test_models.py
core/tests/test_models.py
import core.tests.utils as test_utils from core import models class WagtailCompanyPageTestCase(test_utils.WagtailTest): def test_twitter_handler(self): twitter_user = 'springloadnz' twitter_url = 'https://twitter.com/{}'.format(twitter_user) twitter_handle = '@{}'.format(twitter_user) ...
Add failing tests for social handles
Add failing tests for social handles
Python
mit
springload/madewithwagtail,springload/madewithwagtail,springload/madewithwagtail,springload/madewithwagtail
Add failing tests for social handles
import core.tests.utils as test_utils from core import models class WagtailCompanyPageTestCase(test_utils.WagtailTest): def test_twitter_handler(self): twitter_user = 'springloadnz' twitter_url = 'https://twitter.com/{}'.format(twitter_user) twitter_handle = '@{}'.format(twitter_user) ...
<commit_before><commit_msg>Add failing tests for social handles<commit_after>
import core.tests.utils as test_utils from core import models class WagtailCompanyPageTestCase(test_utils.WagtailTest): def test_twitter_handler(self): twitter_user = 'springloadnz' twitter_url = 'https://twitter.com/{}'.format(twitter_user) twitter_handle = '@{}'.format(twitter_user) ...
Add failing tests for social handlesimport core.tests.utils as test_utils from core import models class WagtailCompanyPageTestCase(test_utils.WagtailTest): def test_twitter_handler(self): twitter_user = 'springloadnz' twitter_url = 'https://twitter.com/{}'.format(twitter_user) twitter_han...
<commit_before><commit_msg>Add failing tests for social handles<commit_after>import core.tests.utils as test_utils from core import models class WagtailCompanyPageTestCase(test_utils.WagtailTest): def test_twitter_handler(self): twitter_user = 'springloadnz' twitter_url = 'https://twitter.com/{}'...
dd4d624ab51b610cfe1a7047368d8c305156916b
scripts/check_repeated_token.py
scripts/check_repeated_token.py
#!/usr/bin/env python """ Checker for repeated tokens ~~~~~~~~~~~~~~~~~~~~~~~~~~~ Helper script to find suspicious lexers which produce the same token repeatedly, i.e. for example: .. code:: 'd' Text 'a' Text 't' Text 'a' Text ...
Add a script to check for repeated tokens.
Add a script to check for repeated tokens.
Python
bsd-2-clause
dscorbett/pygments,pygments/pygments,dscorbett/pygments,pygments/pygments,dscorbett/pygments,dscorbett/pygments,pygments/pygments,pygments/pygments,pygments/pygments,dscorbett/pygments,dscorbett/pygments,dscorbett/pygments,pygments/pygments,pygments/pygments,dscorbett/pygments,pygments/pygments,pygments/pygments,pygmen...
Add a script to check for repeated tokens.
#!/usr/bin/env python """ Checker for repeated tokens ~~~~~~~~~~~~~~~~~~~~~~~~~~~ Helper script to find suspicious lexers which produce the same token repeatedly, i.e. for example: .. code:: 'd' Text 'a' Text 't' Text 'a' Text ...
<commit_before><commit_msg>Add a script to check for repeated tokens.<commit_after>
#!/usr/bin/env python """ Checker for repeated tokens ~~~~~~~~~~~~~~~~~~~~~~~~~~~ Helper script to find suspicious lexers which produce the same token repeatedly, i.e. for example: .. code:: 'd' Text 'a' Text 't' Text 'a' Text ...
Add a script to check for repeated tokens.#!/usr/bin/env python """ Checker for repeated tokens ~~~~~~~~~~~~~~~~~~~~~~~~~~~ Helper script to find suspicious lexers which produce the same token repeatedly, i.e. for example: .. code:: 'd' Text 'a' Text 't' ...
<commit_before><commit_msg>Add a script to check for repeated tokens.<commit_after>#!/usr/bin/env python """ Checker for repeated tokens ~~~~~~~~~~~~~~~~~~~~~~~~~~~ Helper script to find suspicious lexers which produce the same token repeatedly, i.e. for example: .. code:: 'd' ...
12e00be812ec8167ec9aa97426d4eebae5d5280c
databroker/tests/test_document.py
databroker/tests/test_document.py
import copy import pytest from ..core import Document, NotMutable def test_immutable(): d = Document({'a': 1}) with pytest.raises(NotMutable): # Update existing key d['a'] = 2 with pytest.raises(NotMutable): # Add new key d['b'] = 2 with pytest.raises(NotMutable): ...
Test immutability and deepcopy behavior.
Test immutability and deepcopy behavior.
Python
bsd-3-clause
ericdill/databroker,ericdill/databroker
Test immutability and deepcopy behavior.
import copy import pytest from ..core import Document, NotMutable def test_immutable(): d = Document({'a': 1}) with pytest.raises(NotMutable): # Update existing key d['a'] = 2 with pytest.raises(NotMutable): # Add new key d['b'] = 2 with pytest.raises(NotMutable): ...
<commit_before><commit_msg>Test immutability and deepcopy behavior.<commit_after>
import copy import pytest from ..core import Document, NotMutable def test_immutable(): d = Document({'a': 1}) with pytest.raises(NotMutable): # Update existing key d['a'] = 2 with pytest.raises(NotMutable): # Add new key d['b'] = 2 with pytest.raises(NotMutable): ...
Test immutability and deepcopy behavior.import copy import pytest from ..core import Document, NotMutable def test_immutable(): d = Document({'a': 1}) with pytest.raises(NotMutable): # Update existing key d['a'] = 2 with pytest.raises(NotMutable): # Add new key d['b'] = 2...
<commit_before><commit_msg>Test immutability and deepcopy behavior.<commit_after>import copy import pytest from ..core import Document, NotMutable def test_immutable(): d = Document({'a': 1}) with pytest.raises(NotMutable): # Update existing key d['a'] = 2 with pytest.raises(NotMutable):...
5bfbd7cdadae691176bab93b754b51b3b185ddd6
doc/examples/plot_phase_unwrap.py
doc/examples/plot_phase_unwrap.py
""" ================ Phase Unwrapping ================ Some signals can only be observed modulo 2*pi, and this can also apply to two- and three dimensional images. In these cases phase unwrapping is needed to recover the underlying, unwrapped signal. In this example we will demonstrate an algorithm [1]_ implemented in...
Add example for phase unwrapping.
Add example for phase unwrapping.
Python
bsd-3-clause
jwiggins/scikit-image,bennlich/scikit-image,keflavich/scikit-image,bennlich/scikit-image,SamHames/scikit-image,pratapvardhan/scikit-image,chintak/scikit-image,paalge/scikit-image,almarklein/scikit-image,bsipocz/scikit-image,ofgulban/scikit-image,ofgulban/scikit-image,rjeli/scikit-image,ofgulban/scikit-image,almarklein/...
Add example for phase unwrapping.
""" ================ Phase Unwrapping ================ Some signals can only be observed modulo 2*pi, and this can also apply to two- and three dimensional images. In these cases phase unwrapping is needed to recover the underlying, unwrapped signal. In this example we will demonstrate an algorithm [1]_ implemented in...
<commit_before><commit_msg>Add example for phase unwrapping.<commit_after>
""" ================ Phase Unwrapping ================ Some signals can only be observed modulo 2*pi, and this can also apply to two- and three dimensional images. In these cases phase unwrapping is needed to recover the underlying, unwrapped signal. In this example we will demonstrate an algorithm [1]_ implemented in...
Add example for phase unwrapping.""" ================ Phase Unwrapping ================ Some signals can only be observed modulo 2*pi, and this can also apply to two- and three dimensional images. In these cases phase unwrapping is needed to recover the underlying, unwrapped signal. In this example we will demonstrate...
<commit_before><commit_msg>Add example for phase unwrapping.<commit_after>""" ================ Phase Unwrapping ================ Some signals can only be observed modulo 2*pi, and this can also apply to two- and three dimensional images. In these cases phase unwrapping is needed to recover the underlying, unwrapped si...
933ac64d169aecdaf072d9e8147f8dcf1d2b67d0
stationspinner/accounting/management/commands/findapiupdate.py
stationspinner/accounting/management/commands/findapiupdate.py
from django.core.management.base import BaseCommand, CommandError from stationspinner.accounting.models import APIUpdate, APICall from stationspinner.character.models import CharacterSheet from stationspinner.corporation.models import CorporationSheet import sys class Command(BaseCommand): args = '<character/corpor...
Add convenience command for finding apiupdates to execute manually
Add convenience command for finding apiupdates to execute manually
Python
agpl-3.0
kriberg/stationspinner,kriberg/stationspinner
Add convenience command for finding apiupdates to execute manually
from django.core.management.base import BaseCommand, CommandError from stationspinner.accounting.models import APIUpdate, APICall from stationspinner.character.models import CharacterSheet from stationspinner.corporation.models import CorporationSheet import sys class Command(BaseCommand): args = '<character/corpor...
<commit_before><commit_msg>Add convenience command for finding apiupdates to execute manually<commit_after>
from django.core.management.base import BaseCommand, CommandError from stationspinner.accounting.models import APIUpdate, APICall from stationspinner.character.models import CharacterSheet from stationspinner.corporation.models import CorporationSheet import sys class Command(BaseCommand): args = '<character/corpor...
Add convenience command for finding apiupdates to execute manuallyfrom django.core.management.base import BaseCommand, CommandError from stationspinner.accounting.models import APIUpdate, APICall from stationspinner.character.models import CharacterSheet from stationspinner.corporation.models import CorporationSheet im...
<commit_before><commit_msg>Add convenience command for finding apiupdates to execute manually<commit_after>from django.core.management.base import BaseCommand, CommandError from stationspinner.accounting.models import APIUpdate, APICall from stationspinner.character.models import CharacterSheet from stationspinner.corp...
9dbfb4faae1afbed21d0e315b5148db5310643fe
tests/util/api.py
tests/util/api.py
import pytest, zerorpc from .base import TestDB @pytest.fixture(scope='session') def api_client(config, request): test = TestDB() api_server_loc = config.get('API_SERVER_LOC') from inbox.server.api import API from inbox.server.util.concurrency import make_zerorpc test.server = make_zerorpc(API,...
Test fixture for API clients
Test fixture for API clients
Python
agpl-3.0
gale320/sync-engine,nylas/sync-engine,Eagles2F/sync-engine,PriviPK/privipk-sync-engine,EthanBlackburn/sync-engine,ErinCall/sync-engine,jobscore/sync-engine,Eagles2F/sync-engine,rmasters/inbox,gale320/sync-engine,wakermahmud/sync-engine,EthanBlackburn/sync-engine,wakermahmud/sync-engine,jobscore/sync-engine,PriviPK/priv...
Test fixture for API clients
import pytest, zerorpc from .base import TestDB @pytest.fixture(scope='session') def api_client(config, request): test = TestDB() api_server_loc = config.get('API_SERVER_LOC') from inbox.server.api import API from inbox.server.util.concurrency import make_zerorpc test.server = make_zerorpc(API,...
<commit_before><commit_msg>Test fixture for API clients<commit_after>
import pytest, zerorpc from .base import TestDB @pytest.fixture(scope='session') def api_client(config, request): test = TestDB() api_server_loc = config.get('API_SERVER_LOC') from inbox.server.api import API from inbox.server.util.concurrency import make_zerorpc test.server = make_zerorpc(API,...
Test fixture for API clientsimport pytest, zerorpc from .base import TestDB @pytest.fixture(scope='session') def api_client(config, request): test = TestDB() api_server_loc = config.get('API_SERVER_LOC') from inbox.server.api import API from inbox.server.util.concurrency import make_zerorpc tes...
<commit_before><commit_msg>Test fixture for API clients<commit_after>import pytest, zerorpc from .base import TestDB @pytest.fixture(scope='session') def api_client(config, request): test = TestDB() api_server_loc = config.get('API_SERVER_LOC') from inbox.server.api import API from inbox.server.util...
aaaaaa747fad0e0ac66190fa0853572681f9443c
falcom/test/read_example_file.py
falcom/test/read_example_file.py
# Copyright (c) 2017 The Regents of the University of Michigan. # All Rights Reserved. Licensed according to the terms of the Revised # BSD License. See LICENSE.txt for details. from os.path import join, dirname from unittest import TestCase class ExampleFileTest (TestCase): def setUp (self): format_str =...
Write TestCase subclass that reads an example file
Write TestCase subclass that reads an example file
Python
bsd-3-clause
mlibrary/image-conversion-and-validation,mlibrary/image-conversion-and-validation
Write TestCase subclass that reads an example file
# Copyright (c) 2017 The Regents of the University of Michigan. # All Rights Reserved. Licensed according to the terms of the Revised # BSD License. See LICENSE.txt for details. from os.path import join, dirname from unittest import TestCase class ExampleFileTest (TestCase): def setUp (self): format_str =...
<commit_before><commit_msg>Write TestCase subclass that reads an example file<commit_after>
# Copyright (c) 2017 The Regents of the University of Michigan. # All Rights Reserved. Licensed according to the terms of the Revised # BSD License. See LICENSE.txt for details. from os.path import join, dirname from unittest import TestCase class ExampleFileTest (TestCase): def setUp (self): format_str =...
Write TestCase subclass that reads an example file# Copyright (c) 2017 The Regents of the University of Michigan. # All Rights Reserved. Licensed according to the terms of the Revised # BSD License. See LICENSE.txt for details. from os.path import join, dirname from unittest import TestCase class ExampleFileTest (Test...
<commit_before><commit_msg>Write TestCase subclass that reads an example file<commit_after># Copyright (c) 2017 The Regents of the University of Michigan. # All Rights Reserved. Licensed according to the terms of the Revised # BSD License. See LICENSE.txt for details. from os.path import join, dirname from unittest imp...
46ad1e9af94df2b2ff38030223f456d07ec10de1
tests/test_array.py
tests/test_array.py
import numpy as np import sfs import pytest linear_cases = [ ((3, 1), [[-1, 0, 0], [0, 0, 0], [1, 0, 0]]), ((2, 1), [[-0.5, 0, 0], [0.5, 0, 0]]), ((1, 1), [[0, 0, 0]]), ((3, 0.5), [[-0.5, 0, 0], [0, 0, 0], [0.5, 0, 0]]), ((2, 1, [0.5, 2, 3]), [[0, 2, 3], [1, 2, 3]]), ((2, 1, np.array([0.5, 2, ...
Add a first test file
Add a first test file To be used with py.test
Python
mit
AchimTuran/sfs-python,chris-hld/sfs-python,sfstoolbox/sfs-python,chris-hld/sfs-python,sfstoolbox/sfs-python
Add a first test file To be used with py.test
import numpy as np import sfs import pytest linear_cases = [ ((3, 1), [[-1, 0, 0], [0, 0, 0], [1, 0, 0]]), ((2, 1), [[-0.5, 0, 0], [0.5, 0, 0]]), ((1, 1), [[0, 0, 0]]), ((3, 0.5), [[-0.5, 0, 0], [0, 0, 0], [0.5, 0, 0]]), ((2, 1, [0.5, 2, 3]), [[0, 2, 3], [1, 2, 3]]), ((2, 1, np.array([0.5, 2, ...
<commit_before><commit_msg>Add a first test file To be used with py.test<commit_after>
import numpy as np import sfs import pytest linear_cases = [ ((3, 1), [[-1, 0, 0], [0, 0, 0], [1, 0, 0]]), ((2, 1), [[-0.5, 0, 0], [0.5, 0, 0]]), ((1, 1), [[0, 0, 0]]), ((3, 0.5), [[-0.5, 0, 0], [0, 0, 0], [0.5, 0, 0]]), ((2, 1, [0.5, 2, 3]), [[0, 2, 3], [1, 2, 3]]), ((2, 1, np.array([0.5, 2, ...
Add a first test file To be used with py.testimport numpy as np import sfs import pytest linear_cases = [ ((3, 1), [[-1, 0, 0], [0, 0, 0], [1, 0, 0]]), ((2, 1), [[-0.5, 0, 0], [0.5, 0, 0]]), ((1, 1), [[0, 0, 0]]), ((3, 0.5), [[-0.5, 0, 0], [0, 0, 0], [0.5, 0, 0]]), ((2, 1, [0.5, 2, 3]), [[0, 2, 3...
<commit_before><commit_msg>Add a first test file To be used with py.test<commit_after>import numpy as np import sfs import pytest linear_cases = [ ((3, 1), [[-1, 0, 0], [0, 0, 0], [1, 0, 0]]), ((2, 1), [[-0.5, 0, 0], [0.5, 0, 0]]), ((1, 1), [[0, 0, 0]]), ((3, 0.5), [[-0.5, 0, 0], [0, 0, 0], [0.5, 0, ...
b936df053637f170f583f9fcff8cc4edc4e2c696
tests/test_green.py
tests/test_green.py
import datetime import unittest import gevent import gevent.socket import pymssql from .helpers import pymssqlconn class GreenletTests(unittest.TestCase): def greenlet_run(self, num): with pymssqlconn() as conn: cur = conn.cursor() cur.execute(""" WAITFOR DELAY '00:0...
Add test for green query with gevent
Add test for green query with gevent
Python
lgpl-2.1
bladams/pymssql,Aloomaio/pymssql,JimDennis/pymssql,klothe/pymssql,klothe/pymssql,Aloomaio/pymssql,zerolugithub/pymssql,bladams/pymssql,pymssql/pymssql,ramiro/pymssql,bladams/pymssql,JimDennis/pymssql,ramiro/pymssql,JimDennis/pymssql,Aloomaio/pymssql,pymssql/pymssql,klothe/pymssql,ramiro/pymssql,zerolugithub/pymssql,zer...
Add test for green query with gevent
import datetime import unittest import gevent import gevent.socket import pymssql from .helpers import pymssqlconn class GreenletTests(unittest.TestCase): def greenlet_run(self, num): with pymssqlconn() as conn: cur = conn.cursor() cur.execute(""" WAITFOR DELAY '00:0...
<commit_before><commit_msg>Add test for green query with gevent<commit_after>
import datetime import unittest import gevent import gevent.socket import pymssql from .helpers import pymssqlconn class GreenletTests(unittest.TestCase): def greenlet_run(self, num): with pymssqlconn() as conn: cur = conn.cursor() cur.execute(""" WAITFOR DELAY '00:0...
Add test for green query with geventimport datetime import unittest import gevent import gevent.socket import pymssql from .helpers import pymssqlconn class GreenletTests(unittest.TestCase): def greenlet_run(self, num): with pymssqlconn() as conn: cur = conn.cursor() cur.execute...
<commit_before><commit_msg>Add test for green query with gevent<commit_after>import datetime import unittest import gevent import gevent.socket import pymssql from .helpers import pymssqlconn class GreenletTests(unittest.TestCase): def greenlet_run(self, num): with pymssqlconn() as conn: cu...
9d0aeb0931b59311a890e02e90ce57b8cbdf42ef
tools/context/naive_context_suppression.py
tools/context/naive_context_suppression.py
#!/usr/bin/env python import argparse import numpy as np from tpn.data_io import tpn_test_iterator import os import cPickle def parse_args(): parser = argparse.ArgumentParser('Naive context suppression: add bonus scores to the top classes.') parser.add_argument('input_track') parser.add_argument('output_t...
Add naive context suppression script.
Add naive context suppression script.
Python
mit
myfavouritekk/TPN
Add naive context suppression script.
#!/usr/bin/env python import argparse import numpy as np from tpn.data_io import tpn_test_iterator import os import cPickle def parse_args(): parser = argparse.ArgumentParser('Naive context suppression: add bonus scores to the top classes.') parser.add_argument('input_track') parser.add_argument('output_t...
<commit_before><commit_msg>Add naive context suppression script.<commit_after>
#!/usr/bin/env python import argparse import numpy as np from tpn.data_io import tpn_test_iterator import os import cPickle def parse_args(): parser = argparse.ArgumentParser('Naive context suppression: add bonus scores to the top classes.') parser.add_argument('input_track') parser.add_argument('output_t...
Add naive context suppression script.#!/usr/bin/env python import argparse import numpy as np from tpn.data_io import tpn_test_iterator import os import cPickle def parse_args(): parser = argparse.ArgumentParser('Naive context suppression: add bonus scores to the top classes.') parser.add_argument('input_trac...
<commit_before><commit_msg>Add naive context suppression script.<commit_after>#!/usr/bin/env python import argparse import numpy as np from tpn.data_io import tpn_test_iterator import os import cPickle def parse_args(): parser = argparse.ArgumentParser('Naive context suppression: add bonus scores to the top class...
7017ef29891e979f0cd5c1c397ddf2e393128e85
python/ClinicalReportLaunchers/add_variants_to_clinical_report.py
python/ClinicalReportLaunchers/add_variants_to_clinical_report.py
"""Add variant report variants to a Clinical Report by ID. """ import os import requests from requests.auth import HTTPBasicAuth import sys import json import argparse # Load environment variables for request authentication parameters if "OMICIA_API_PASSWORD" not in os.environ: sys.exit("OMICIA_API_PASSWORD envir...
Add variants to clinical report script
Add variants to clinical report script
Python
mit
Omicia/omicia_api_examples,Omicia/omicia_api_examples,Omicia/omicia_api_examples
Add variants to clinical report script
"""Add variant report variants to a Clinical Report by ID. """ import os import requests from requests.auth import HTTPBasicAuth import sys import json import argparse # Load environment variables for request authentication parameters if "OMICIA_API_PASSWORD" not in os.environ: sys.exit("OMICIA_API_PASSWORD envir...
<commit_before><commit_msg>Add variants to clinical report script<commit_after>
"""Add variant report variants to a Clinical Report by ID. """ import os import requests from requests.auth import HTTPBasicAuth import sys import json import argparse # Load environment variables for request authentication parameters if "OMICIA_API_PASSWORD" not in os.environ: sys.exit("OMICIA_API_PASSWORD envir...
Add variants to clinical report script"""Add variant report variants to a Clinical Report by ID. """ import os import requests from requests.auth import HTTPBasicAuth import sys import json import argparse # Load environment variables for request authentication parameters if "OMICIA_API_PASSWORD" not in os.environ: ...
<commit_before><commit_msg>Add variants to clinical report script<commit_after>"""Add variant report variants to a Clinical Report by ID. """ import os import requests from requests.auth import HTTPBasicAuth import sys import json import argparse # Load environment variables for request authentication parameters if "...
1477c3ed2b163001f0427cb6288c4fdd49456930
examples/blur_faces_on_webcam.py
examples/blur_faces_on_webcam.py
import face_recognition import cv2 # This is a demo of blurring faces in video. # PLEASE NOTE: This example requires OpenCV (the `cv2` library) to be installed only to read from your webcam. # OpenCV is *not* required to use the face_recognition library. It's only required if you want to run this # specific demo. If ...
Add an example of automatically blurring faces in images or videos
Add an example of automatically blurring faces in images or videos
Python
mit
ageitgey/face_recognition
Add an example of automatically blurring faces in images or videos
import face_recognition import cv2 # This is a demo of blurring faces in video. # PLEASE NOTE: This example requires OpenCV (the `cv2` library) to be installed only to read from your webcam. # OpenCV is *not* required to use the face_recognition library. It's only required if you want to run this # specific demo. If ...
<commit_before><commit_msg>Add an example of automatically blurring faces in images or videos<commit_after>
import face_recognition import cv2 # This is a demo of blurring faces in video. # PLEASE NOTE: This example requires OpenCV (the `cv2` library) to be installed only to read from your webcam. # OpenCV is *not* required to use the face_recognition library. It's only required if you want to run this # specific demo. If ...
Add an example of automatically blurring faces in images or videosimport face_recognition import cv2 # This is a demo of blurring faces in video. # PLEASE NOTE: This example requires OpenCV (the `cv2` library) to be installed only to read from your webcam. # OpenCV is *not* required to use the face_recognition librar...
<commit_before><commit_msg>Add an example of automatically blurring faces in images or videos<commit_after>import face_recognition import cv2 # This is a demo of blurring faces in video. # PLEASE NOTE: This example requires OpenCV (the `cv2` library) to be installed only to read from your webcam. # OpenCV is *not* re...
a3b046089a4ccc62286c62367847f39d8581fece
corehq/apps/sms/management/commands/set_default_dup_number_option.py
corehq/apps/sms/management/commands/set_default_dup_number_option.py
from django.core.management.base import BaseCommand, CommandError from optparse import make_option from corehq.apps.domain.models import Domain from corehq.apps.sms.models import SMSLog class Command(BaseCommand): args = "" help = ("Sets a default value for all domains' " "send_to_duplicated_case_numbe...
Add management command for setting default value of send to dup number option
Add management command for setting default value of send to dup number option
Python
bsd-3-clause
qedsoftware/commcare-hq,dimagi/commcare-hq,qedsoftware/commcare-hq,puttarajubr/commcare-hq,puttarajubr/commcare-hq,SEL-Columbia/commcare-hq,qedsoftware/commcare-hq,dimagi/commcare-hq,dimagi/commcare-hq,qedsoftware/commcare-hq,dimagi/commcare-hq,SEL-Columbia/commcare-hq,puttarajubr/commcare-hq,puttarajubr/commcare-hq,SE...
Add management command for setting default value of send to dup number option
from django.core.management.base import BaseCommand, CommandError from optparse import make_option from corehq.apps.domain.models import Domain from corehq.apps.sms.models import SMSLog class Command(BaseCommand): args = "" help = ("Sets a default value for all domains' " "send_to_duplicated_case_numbe...
<commit_before><commit_msg>Add management command for setting default value of send to dup number option<commit_after>
from django.core.management.base import BaseCommand, CommandError from optparse import make_option from corehq.apps.domain.models import Domain from corehq.apps.sms.models import SMSLog class Command(BaseCommand): args = "" help = ("Sets a default value for all domains' " "send_to_duplicated_case_numbe...
Add management command for setting default value of send to dup number optionfrom django.core.management.base import BaseCommand, CommandError from optparse import make_option from corehq.apps.domain.models import Domain from corehq.apps.sms.models import SMSLog class Command(BaseCommand): args = "" help = ("S...
<commit_before><commit_msg>Add management command for setting default value of send to dup number option<commit_after>from django.core.management.base import BaseCommand, CommandError from optparse import make_option from corehq.apps.domain.models import Domain from corehq.apps.sms.models import SMSLog class Command(B...
3aeca09940f5e42a45df55efc2ac5df0cdd291e4
flexx/ui/examples/stayin_alive.py
flexx/ui/examples/stayin_alive.py
""" Example that demonstrates/tests how objects survive synchronisation jitter even if Python and JS are busy. We tried hard to make this as painless as possible in Flexx, which is why this example may look a bit dull. But the fact that this works is not trivial :) What happens is that the ``the_thing`` property is se...
Add example to test keep alive
Add example to test keep alive
Python
bsd-2-clause
JohnLunzer/flexx,JohnLunzer/flexx,zoofIO/flexx,JohnLunzer/flexx,zoofIO/flexx,jrversteegh/flexx,jrversteegh/flexx
Add example to test keep alive
""" Example that demonstrates/tests how objects survive synchronisation jitter even if Python and JS are busy. We tried hard to make this as painless as possible in Flexx, which is why this example may look a bit dull. But the fact that this works is not trivial :) What happens is that the ``the_thing`` property is se...
<commit_before><commit_msg>Add example to test keep alive<commit_after>
""" Example that demonstrates/tests how objects survive synchronisation jitter even if Python and JS are busy. We tried hard to make this as painless as possible in Flexx, which is why this example may look a bit dull. But the fact that this works is not trivial :) What happens is that the ``the_thing`` property is se...
Add example to test keep alive""" Example that demonstrates/tests how objects survive synchronisation jitter even if Python and JS are busy. We tried hard to make this as painless as possible in Flexx, which is why this example may look a bit dull. But the fact that this works is not trivial :) What happens is that th...
<commit_before><commit_msg>Add example to test keep alive<commit_after>""" Example that demonstrates/tests how objects survive synchronisation jitter even if Python and JS are busy. We tried hard to make this as painless as possible in Flexx, which is why this example may look a bit dull. But the fact that this works i...
5ada28bf4eeda038fa1a930dba94cbd00f42a69e
two_pass_example.py
two_pass_example.py
#!/usr/bin/env python3 # # Generates two heat maps from the same data and composites them together. # # Copyright 2022 Seth Golub http://www.sethoscope.net/heatmap/ # # 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 th...
Add example of doing a 2-pass composite heatmap in Python.
Add example of doing a 2-pass composite heatmap in Python.
Python
agpl-3.0
sethoscope/heatmap,sethoscope/heatmap
Add example of doing a 2-pass composite heatmap in Python.
#!/usr/bin/env python3 # # Generates two heat maps from the same data and composites them together. # # Copyright 2022 Seth Golub http://www.sethoscope.net/heatmap/ # # 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 th...
<commit_before><commit_msg>Add example of doing a 2-pass composite heatmap in Python.<commit_after>
#!/usr/bin/env python3 # # Generates two heat maps from the same data and composites them together. # # Copyright 2022 Seth Golub http://www.sethoscope.net/heatmap/ # # 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 th...
Add example of doing a 2-pass composite heatmap in Python.#!/usr/bin/env python3 # # Generates two heat maps from the same data and composites them together. # # Copyright 2022 Seth Golub http://www.sethoscope.net/heatmap/ # # This program is free software: you can redistribute it and/or modify # it under the terms of ...
<commit_before><commit_msg>Add example of doing a 2-pass composite heatmap in Python.<commit_after>#!/usr/bin/env python3 # # Generates two heat maps from the same data and composites them together. # # Copyright 2022 Seth Golub http://www.sethoscope.net/heatmap/ # # This program is free software: you can redistribute ...
85b81a3b4ae5b62b8cbf5993445385531a48c530
Regression/DecisionTreeRegression/regularDecisionTreeRegression.py
Regression/DecisionTreeRegression/regularDecisionTreeRegression.py
# -*- coding: utf-8 -*- """Decision Tree regression for machine learning. Decision tree builds regression or classification models in the form of a tree structure. It brakes down a dataset into smaller and smaller subsets while at the same time an associated decision tree is incrementally developed. The final result i...
Add Decision Tree Regression in Python
Add Decision Tree Regression in Python
Python
mit
a-holm/MachinelearningAlgorithms,a-holm/MachinelearningAlgorithms
Add Decision Tree Regression in Python
# -*- coding: utf-8 -*- """Decision Tree regression for machine learning. Decision tree builds regression or classification models in the form of a tree structure. It brakes down a dataset into smaller and smaller subsets while at the same time an associated decision tree is incrementally developed. The final result i...
<commit_before><commit_msg>Add Decision Tree Regression in Python<commit_after>
# -*- coding: utf-8 -*- """Decision Tree regression for machine learning. Decision tree builds regression or classification models in the form of a tree structure. It brakes down a dataset into smaller and smaller subsets while at the same time an associated decision tree is incrementally developed. The final result i...
Add Decision Tree Regression in Python# -*- coding: utf-8 -*- """Decision Tree regression for machine learning. Decision tree builds regression or classification models in the form of a tree structure. It brakes down a dataset into smaller and smaller subsets while at the same time an associated decision tree is incre...
<commit_before><commit_msg>Add Decision Tree Regression in Python<commit_after># -*- coding: utf-8 -*- """Decision Tree regression for machine learning. Decision tree builds regression or classification models in the form of a tree structure. It brakes down a dataset into smaller and smaller subsets while at the same ...
4f6968888f12d3e8bba407f6701b06c357d1130b
openfisca_core/scripts/xml_to_json/xml_to_json_country_template.py
openfisca_core/scripts/xml_to_json/xml_to_json_country_template.py
# -*- coding: utf-8 -*- ''' xml_to_json_country_template.py : Parse XML parameter files for Country-Template and convert them to YAML files. Comments are NOT transformed. Usage : `python xml_to_json_country_template.py output_dir` or just (output is written in a directory called `yaml_parameters`): `python xml_to...
Add script to transform CountryTemplate legilation
Add script to transform CountryTemplate legilation
Python
agpl-3.0
openfisca/openfisca-core,openfisca/openfisca-core
Add script to transform CountryTemplate legilation
# -*- coding: utf-8 -*- ''' xml_to_json_country_template.py : Parse XML parameter files for Country-Template and convert them to YAML files. Comments are NOT transformed. Usage : `python xml_to_json_country_template.py output_dir` or just (output is written in a directory called `yaml_parameters`): `python xml_to...
<commit_before><commit_msg>Add script to transform CountryTemplate legilation<commit_after>
# -*- coding: utf-8 -*- ''' xml_to_json_country_template.py : Parse XML parameter files for Country-Template and convert them to YAML files. Comments are NOT transformed. Usage : `python xml_to_json_country_template.py output_dir` or just (output is written in a directory called `yaml_parameters`): `python xml_to...
Add script to transform CountryTemplate legilation# -*- coding: utf-8 -*- ''' xml_to_json_country_template.py : Parse XML parameter files for Country-Template and convert them to YAML files. Comments are NOT transformed. Usage : `python xml_to_json_country_template.py output_dir` or just (output is written in a dir...
<commit_before><commit_msg>Add script to transform CountryTemplate legilation<commit_after># -*- coding: utf-8 -*- ''' xml_to_json_country_template.py : Parse XML parameter files for Country-Template and convert them to YAML files. Comments are NOT transformed. Usage : `python xml_to_json_country_template.py output...
6a04fd060d400e062db7d7233b614caf3bb1aa44
misc_scripts/create_civic_vcf.py
misc_scripts/create_civic_vcf.py
from civicpy import civic from civicpy.exports import VCFWriter import argparse parser = argparse.ArgumentParser(description='Create CIViC VCF') parser.add_argument('vcf_path') args = parser.parse_args() with open(args.vcf_path, "w") as fh: writer = VCFWriter(fh) for variant in civic.get_all_variants(): ...
Add script to write CIViC VCF
Add script to write CIViC VCF
Python
mit
genome/civic-server,genome/civic-server,genome/civic-server,genome/civic-server,genome/civic-server
Add script to write CIViC VCF
from civicpy import civic from civicpy.exports import VCFWriter import argparse parser = argparse.ArgumentParser(description='Create CIViC VCF') parser.add_argument('vcf_path') args = parser.parse_args() with open(args.vcf_path, "w") as fh: writer = VCFWriter(fh) for variant in civic.get_all_variants(): ...
<commit_before><commit_msg>Add script to write CIViC VCF<commit_after>
from civicpy import civic from civicpy.exports import VCFWriter import argparse parser = argparse.ArgumentParser(description='Create CIViC VCF') parser.add_argument('vcf_path') args = parser.parse_args() with open(args.vcf_path, "w") as fh: writer = VCFWriter(fh) for variant in civic.get_all_variants(): ...
Add script to write CIViC VCFfrom civicpy import civic from civicpy.exports import VCFWriter import argparse parser = argparse.ArgumentParser(description='Create CIViC VCF') parser.add_argument('vcf_path') args = parser.parse_args() with open(args.vcf_path, "w") as fh: writer = VCFWriter(fh) for variant in ci...
<commit_before><commit_msg>Add script to write CIViC VCF<commit_after>from civicpy import civic from civicpy.exports import VCFWriter import argparse parser = argparse.ArgumentParser(description='Create CIViC VCF') parser.add_argument('vcf_path') args = parser.parse_args() with open(args.vcf_path, "w") as fh: wri...
8f71a4824b6db1a4e7d9d25335e6d4af595d79cf
nanpy/examples/lcd_createchar.py
nanpy/examples/lcd_createchar.py
#!/usr/bin/env python from nanpy.lcd import Lcd if __name__ == '__main__': pins = [7, 8, 9, 10, 11, 12] cols, rows = 16, 2 lcd = Lcd(pins, [cols, rows]) smiley= [ 0b00000, 0b10001, 0b00000, 0b00000, 0b10001, 0b01110, 0b00000, 0b000...
Add example for LCD createChar
Add example for LCD createChar
Python
mit
joppi/nanpy,nanpy/nanpy
Add example for LCD createChar
#!/usr/bin/env python from nanpy.lcd import Lcd if __name__ == '__main__': pins = [7, 8, 9, 10, 11, 12] cols, rows = 16, 2 lcd = Lcd(pins, [cols, rows]) smiley= [ 0b00000, 0b10001, 0b00000, 0b00000, 0b10001, 0b01110, 0b00000, 0b000...
<commit_before><commit_msg>Add example for LCD createChar<commit_after>
#!/usr/bin/env python from nanpy.lcd import Lcd if __name__ == '__main__': pins = [7, 8, 9, 10, 11, 12] cols, rows = 16, 2 lcd = Lcd(pins, [cols, rows]) smiley= [ 0b00000, 0b10001, 0b00000, 0b00000, 0b10001, 0b01110, 0b00000, 0b000...
Add example for LCD createChar#!/usr/bin/env python from nanpy.lcd import Lcd if __name__ == '__main__': pins = [7, 8, 9, 10, 11, 12] cols, rows = 16, 2 lcd = Lcd(pins, [cols, rows]) smiley= [ 0b00000, 0b10001, 0b00000, 0b00000, 0b10001, 0b01110, ...
<commit_before><commit_msg>Add example for LCD createChar<commit_after>#!/usr/bin/env python from nanpy.lcd import Lcd if __name__ == '__main__': pins = [7, 8, 9, 10, 11, 12] cols, rows = 16, 2 lcd = Lcd(pins, [cols, rows]) smiley= [ 0b00000, 0b10001, 0b00000, 0b...
9db2999edfbe6b2813412287cbc7146374277246
tests/test_cli.py
tests/test_cli.py
# -*- coding: utf-8 -*- """Command Line Interface test cases.""" import os import tempfile import unittest from esis.cli import ( clean, count, index, parse_arguments, search, ) class ParseArgumentsTest(unittest.TestCase): """Parse arguments test case.""" def test_index_command(self): ...
Add parse arguments test cases
Add parse arguments test cases
Python
mit
jcollado/esis
Add parse arguments test cases
# -*- coding: utf-8 -*- """Command Line Interface test cases.""" import os import tempfile import unittest from esis.cli import ( clean, count, index, parse_arguments, search, ) class ParseArgumentsTest(unittest.TestCase): """Parse arguments test case.""" def test_index_command(self): ...
<commit_before><commit_msg>Add parse arguments test cases<commit_after>
# -*- coding: utf-8 -*- """Command Line Interface test cases.""" import os import tempfile import unittest from esis.cli import ( clean, count, index, parse_arguments, search, ) class ParseArgumentsTest(unittest.TestCase): """Parse arguments test case.""" def test_index_command(self): ...
Add parse arguments test cases# -*- coding: utf-8 -*- """Command Line Interface test cases.""" import os import tempfile import unittest from esis.cli import ( clean, count, index, parse_arguments, search, ) class ParseArgumentsTest(unittest.TestCase): """Parse arguments test case.""" ...
<commit_before><commit_msg>Add parse arguments test cases<commit_after># -*- coding: utf-8 -*- """Command Line Interface test cases.""" import os import tempfile import unittest from esis.cli import ( clean, count, index, parse_arguments, search, ) class ParseArgumentsTest(unittest.TestCase): ...
3bb268fcf28082df3d65f78d703938dccabac51b
scripts/win32-setup-svn-root.py
scripts/win32-setup-svn-root.py
import os import sys VERSION = '0.5.2' def process_template(input, output=None, vardict={}): if output is None and input.endswith('.in'): output = input[:-3] data = open(input).read() for key, value in vardict.items(): data = data.replace(key, value) open(output, 'w').write(...
Add a new script to setup a win32 svn root
Add a new script to setup a win32 svn root
Python
lgpl-2.1
flumotion-mirror/flumotion,timvideos/flumotion,Flumotion/flumotion,timvideos/flumotion,Flumotion/flumotion,Flumotion/flumotion,flumotion-mirror/flumotion,timvideos/flumotion,Flumotion/flumotion
Add a new script to setup a win32 svn root
import os import sys VERSION = '0.5.2' def process_template(input, output=None, vardict={}): if output is None and input.endswith('.in'): output = input[:-3] data = open(input).read() for key, value in vardict.items(): data = data.replace(key, value) open(output, 'w').write(...
<commit_before><commit_msg>Add a new script to setup a win32 svn root<commit_after>
import os import sys VERSION = '0.5.2' def process_template(input, output=None, vardict={}): if output is None and input.endswith('.in'): output = input[:-3] data = open(input).read() for key, value in vardict.items(): data = data.replace(key, value) open(output, 'w').write(...
Add a new script to setup a win32 svn rootimport os import sys VERSION = '0.5.2' def process_template(input, output=None, vardict={}): if output is None and input.endswith('.in'): output = input[:-3] data = open(input).read() for key, value in vardict.items(): data = data.replace...
<commit_before><commit_msg>Add a new script to setup a win32 svn root<commit_after>import os import sys VERSION = '0.5.2' def process_template(input, output=None, vardict={}): if output is None and input.endswith('.in'): output = input[:-3] data = open(input).read() for key, value in vard...
423b3ba67561d3bc9017566ce5598f973713270c
glitter/blocks/call_to_action/migrations/0003_delete_empty_blocks.py
glitter/blocks/call_to_action/migrations/0003_delete_empty_blocks.py
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations, models def remove_empty_blocks(apps, schema_editor): CallToActionBlock = apps.get_model('glitter_call_to_action', 'CallToActionBlock') ContentBlock = apps.get_model('glitter', 'ContentBlock') empty_blocks =...
Clean up empty call to action blocks
Clean up empty call to action blocks
Python
bsd-3-clause
developersociety/django-glitter,blancltd/django-glitter,blancltd/django-glitter,blancltd/django-glitter,developersociety/django-glitter,developersociety/django-glitter
Clean up empty call to action blocks
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations, models def remove_empty_blocks(apps, schema_editor): CallToActionBlock = apps.get_model('glitter_call_to_action', 'CallToActionBlock') ContentBlock = apps.get_model('glitter', 'ContentBlock') empty_blocks =...
<commit_before><commit_msg>Clean up empty call to action blocks<commit_after>
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations, models def remove_empty_blocks(apps, schema_editor): CallToActionBlock = apps.get_model('glitter_call_to_action', 'CallToActionBlock') ContentBlock = apps.get_model('glitter', 'ContentBlock') empty_blocks =...
Clean up empty call to action blocks# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations, models def remove_empty_blocks(apps, schema_editor): CallToActionBlock = apps.get_model('glitter_call_to_action', 'CallToActionBlock') ContentBlock = apps.get_model('glitter',...
<commit_before><commit_msg>Clean up empty call to action blocks<commit_after># -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations, models def remove_empty_blocks(apps, schema_editor): CallToActionBlock = apps.get_model('glitter_call_to_action', 'CallToActionBlock') ...
431a7221780b36862876ef7f64d47bbb0082ef48
neuroanalysis/tests/test_spike_detection.py
neuroanalysis/tests/test_spike_detection.py
import numpy as np from neuroanalysis.data import Recording, Trace from neuroanalysis.neuronsim.model_cell import ModelCell from neuroanalysis.units import pA, mV, MOhm, pF, us, ms from neuroanalysis.spike_detection import detect_evoked_spike def test_spike_detection(): # Need to fill this function up with many m...
Add stub for spike detection unit test
Add stub for spike detection unit test
Python
mit
campagnola/neuroanalysis
Add stub for spike detection unit test
import numpy as np from neuroanalysis.data import Recording, Trace from neuroanalysis.neuronsim.model_cell import ModelCell from neuroanalysis.units import pA, mV, MOhm, pF, us, ms from neuroanalysis.spike_detection import detect_evoked_spike def test_spike_detection(): # Need to fill this function up with many m...
<commit_before><commit_msg>Add stub for spike detection unit test<commit_after>
import numpy as np from neuroanalysis.data import Recording, Trace from neuroanalysis.neuronsim.model_cell import ModelCell from neuroanalysis.units import pA, mV, MOhm, pF, us, ms from neuroanalysis.spike_detection import detect_evoked_spike def test_spike_detection(): # Need to fill this function up with many m...
Add stub for spike detection unit testimport numpy as np from neuroanalysis.data import Recording, Trace from neuroanalysis.neuronsim.model_cell import ModelCell from neuroanalysis.units import pA, mV, MOhm, pF, us, ms from neuroanalysis.spike_detection import detect_evoked_spike def test_spike_detection(): # Nee...
<commit_before><commit_msg>Add stub for spike detection unit test<commit_after>import numpy as np from neuroanalysis.data import Recording, Trace from neuroanalysis.neuronsim.model_cell import ModelCell from neuroanalysis.units import pA, mV, MOhm, pF, us, ms from neuroanalysis.spike_detection import detect_evoked_spik...
2f6aa42fb768f0e97e84192f99eb82c90442f959
PerfTest.py
PerfTest.py
__author__ = 'Frank' import pycurl import json from datetime import datetime, timezone, timedelta import random try: # python 3 from urllib.parse import urlencode except ImportError: # python 2 from urllib import urlencode #curl -X PUT --header "Content-Type: application/json" --header "Accept: app...
Add simple Python Stress test script
Add simple Python Stress test script
Python
apache-2.0
frankfarrell/SNOWBALL-MAGIC-19851014,frankfarrell/SNOWBALL-MAGIC-19851014
Add simple Python Stress test script
__author__ = 'Frank' import pycurl import json from datetime import datetime, timezone, timedelta import random try: # python 3 from urllib.parse import urlencode except ImportError: # python 2 from urllib import urlencode #curl -X PUT --header "Content-Type: application/json" --header "Accept: app...
<commit_before><commit_msg>Add simple Python Stress test script<commit_after>
__author__ = 'Frank' import pycurl import json from datetime import datetime, timezone, timedelta import random try: # python 3 from urllib.parse import urlencode except ImportError: # python 2 from urllib import urlencode #curl -X PUT --header "Content-Type: application/json" --header "Accept: app...
Add simple Python Stress test script__author__ = 'Frank' import pycurl import json from datetime import datetime, timezone, timedelta import random try: # python 3 from urllib.parse import urlencode except ImportError: # python 2 from urllib import urlencode #curl -X PUT --header "Content-Type: app...
<commit_before><commit_msg>Add simple Python Stress test script<commit_after>__author__ = 'Frank' import pycurl import json from datetime import datetime, timezone, timedelta import random try: # python 3 from urllib.parse import urlencode except ImportError: # python 2 from urllib import urlencode ...
8267097f9befa2e949531436d8299525ac9a34d5
bitbots_body_behavior/src/bitbots_body_behavior/decisions/reached_movebase_goal.py
bitbots_body_behavior/src/bitbots_body_behavior/decisions/reached_movebase_goal.py
import numpy as np from dynamic_stack_decider.abstract_decision_element import AbstractDecisionElement class ReachedMovebaseGoalPosition(AbstractDecisionElement): def __init__(self, blackboard, dsd, parameters=None): super(ReachedMovebaseGoalPosition, self).__init__(blackboard, dsd, parameters) ...
Add reached movebase goal desision
Add reached movebase goal desision
Python
bsd-3-clause
bit-bots/bitbots_behaviour
Add reached movebase goal desision
import numpy as np from dynamic_stack_decider.abstract_decision_element import AbstractDecisionElement class ReachedMovebaseGoalPosition(AbstractDecisionElement): def __init__(self, blackboard, dsd, parameters=None): super(ReachedMovebaseGoalPosition, self).__init__(blackboard, dsd, parameters) ...
<commit_before><commit_msg>Add reached movebase goal desision<commit_after>
import numpy as np from dynamic_stack_decider.abstract_decision_element import AbstractDecisionElement class ReachedMovebaseGoalPosition(AbstractDecisionElement): def __init__(self, blackboard, dsd, parameters=None): super(ReachedMovebaseGoalPosition, self).__init__(blackboard, dsd, parameters) ...
Add reached movebase goal desisionimport numpy as np from dynamic_stack_decider.abstract_decision_element import AbstractDecisionElement class ReachedMovebaseGoalPosition(AbstractDecisionElement): def __init__(self, blackboard, dsd, parameters=None): super(ReachedMovebaseGoalPosition, self).__init__(blac...
<commit_before><commit_msg>Add reached movebase goal desision<commit_after>import numpy as np from dynamic_stack_decider.abstract_decision_element import AbstractDecisionElement class ReachedMovebaseGoalPosition(AbstractDecisionElement): def __init__(self, blackboard, dsd, parameters=None): super(Reached...
3135e75954fa5aa91e1cd0970167f3699a04dcd0
py/split-linked-list-in-parts.py
py/split-linked-list-in-parts.py
# Definition for singly-linked list. # class ListNode(object): # def __init__(self, x): # self.val = x # self.next = None class Solution(object): def splitListToParts(self, root, k): """ :type root: ListNode :type k: int :rtype: List[ListNode] """ ...
Add py solution for 725. Split Linked List in Parts
Add py solution for 725. Split Linked List in Parts 725. Split Linked List in Parts: https://leetcode.com/problems/split-linked-list-in-parts/
Python
apache-2.0
ckclark/leetcode,ckclark/leetcode,ckclark/leetcode,ckclark/leetcode,ckclark/leetcode,ckclark/leetcode
Add py solution for 725. Split Linked List in Parts 725. Split Linked List in Parts: https://leetcode.com/problems/split-linked-list-in-parts/
# Definition for singly-linked list. # class ListNode(object): # def __init__(self, x): # self.val = x # self.next = None class Solution(object): def splitListToParts(self, root, k): """ :type root: ListNode :type k: int :rtype: List[ListNode] """ ...
<commit_before><commit_msg>Add py solution for 725. Split Linked List in Parts 725. Split Linked List in Parts: https://leetcode.com/problems/split-linked-list-in-parts/<commit_after>
# Definition for singly-linked list. # class ListNode(object): # def __init__(self, x): # self.val = x # self.next = None class Solution(object): def splitListToParts(self, root, k): """ :type root: ListNode :type k: int :rtype: List[ListNode] """ ...
Add py solution for 725. Split Linked List in Parts 725. Split Linked List in Parts: https://leetcode.com/problems/split-linked-list-in-parts/# Definition for singly-linked list. # class ListNode(object): # def __init__(self, x): # self.val = x # self.next = None class Solution(object): def sp...
<commit_before><commit_msg>Add py solution for 725. Split Linked List in Parts 725. Split Linked List in Parts: https://leetcode.com/problems/split-linked-list-in-parts/<commit_after># Definition for singly-linked list. # class ListNode(object): # def __init__(self, x): # self.val = x # self.next =...
f6f8e724cae70f722885736a9db204e18aa1846a
tests/test_04_ignore_unknown.py
tests/test_04_ignore_unknown.py
"""Test the ignore-unknown-dependency command line option. """ import pytest def test_no_ignore(ctestdir): """No command line option, e.g. ignore-unknown-dependency is not set. Explicitly select only a single test that depends on another one. Since the other test has not been run at all, the selected te...
Add a test for the ignore-unknown-dependency command line option.
Add a test for the ignore-unknown-dependency command line option.
Python
apache-2.0
RKrahl/pytest-dependency
Add a test for the ignore-unknown-dependency command line option.
"""Test the ignore-unknown-dependency command line option. """ import pytest def test_no_ignore(ctestdir): """No command line option, e.g. ignore-unknown-dependency is not set. Explicitly select only a single test that depends on another one. Since the other test has not been run at all, the selected te...
<commit_before><commit_msg>Add a test for the ignore-unknown-dependency command line option.<commit_after>
"""Test the ignore-unknown-dependency command line option. """ import pytest def test_no_ignore(ctestdir): """No command line option, e.g. ignore-unknown-dependency is not set. Explicitly select only a single test that depends on another one. Since the other test has not been run at all, the selected te...
Add a test for the ignore-unknown-dependency command line option."""Test the ignore-unknown-dependency command line option. """ import pytest def test_no_ignore(ctestdir): """No command line option, e.g. ignore-unknown-dependency is not set. Explicitly select only a single test that depends on another one. ...
<commit_before><commit_msg>Add a test for the ignore-unknown-dependency command line option.<commit_after>"""Test the ignore-unknown-dependency command line option. """ import pytest def test_no_ignore(ctestdir): """No command line option, e.g. ignore-unknown-dependency is not set. Explicitly select only a ...
f457ab08212da6c320c3156e397ae2f02e95435b
tests/test_libnit_translator.py
tests/test_libnit_translator.py
#Jerry B. backer #11/06/2012 #test for TUFTanslator and libnit_lister #Uses test_simple server import libnit_listener from tuf_api_translator import TUFTranslator def main(): test = TUFTranslator("127.0.0.1") new_listener = libnit_listener.LibnitListener(test, debug_mode = True) new_listener.serve_forever() ...
Test for TUFTranslator and network call interposition
Test for TUFTranslator and network call interposition
Python
mit
monzum/tuf-legacy,monzum/tuf-legacy,monzum/tuf-legacy
Test for TUFTranslator and network call interposition
#Jerry B. backer #11/06/2012 #test for TUFTanslator and libnit_lister #Uses test_simple server import libnit_listener from tuf_api_translator import TUFTranslator def main(): test = TUFTranslator("127.0.0.1") new_listener = libnit_listener.LibnitListener(test, debug_mode = True) new_listener.serve_forever() ...
<commit_before><commit_msg>Test for TUFTranslator and network call interposition<commit_after>
#Jerry B. backer #11/06/2012 #test for TUFTanslator and libnit_lister #Uses test_simple server import libnit_listener from tuf_api_translator import TUFTranslator def main(): test = TUFTranslator("127.0.0.1") new_listener = libnit_listener.LibnitListener(test, debug_mode = True) new_listener.serve_forever() ...
Test for TUFTranslator and network call interposition#Jerry B. backer #11/06/2012 #test for TUFTanslator and libnit_lister #Uses test_simple server import libnit_listener from tuf_api_translator import TUFTranslator def main(): test = TUFTranslator("127.0.0.1") new_listener = libnit_listener.LibnitListener(test, de...
<commit_before><commit_msg>Test for TUFTranslator and network call interposition<commit_after>#Jerry B. backer #11/06/2012 #test for TUFTanslator and libnit_lister #Uses test_simple server import libnit_listener from tuf_api_translator import TUFTranslator def main(): test = TUFTranslator("127.0.0.1") new_listener ...
1f02167e1d2134dd83cb7f81ce6c4e95b9c85eb5
studygroups/management/commands/add_team_to_learning_circles.py
studygroups/management/commands/add_team_to_learning_circles.py
from django.core.management.base import BaseCommand, CommandError from studygroups.models import StudyGroup import requests class Command(BaseCommand): help = 'Associate learning circles to the team of the facilitator' def handle(self, *args, **options): study_groups = StudyGroup.objects.active() ...
Add django task to link learning circles to teams
Add django task to link learning circles to teams
Python
mit
p2pu/learning-circles,p2pu/learning-circles,p2pu/learning-circles,p2pu/learning-circles
Add django task to link learning circles to teams
from django.core.management.base import BaseCommand, CommandError from studygroups.models import StudyGroup import requests class Command(BaseCommand): help = 'Associate learning circles to the team of the facilitator' def handle(self, *args, **options): study_groups = StudyGroup.objects.active() ...
<commit_before><commit_msg>Add django task to link learning circles to teams<commit_after>
from django.core.management.base import BaseCommand, CommandError from studygroups.models import StudyGroup import requests class Command(BaseCommand): help = 'Associate learning circles to the team of the facilitator' def handle(self, *args, **options): study_groups = StudyGroup.objects.active() ...
Add django task to link learning circles to teamsfrom django.core.management.base import BaseCommand, CommandError from studygroups.models import StudyGroup import requests class Command(BaseCommand): help = 'Associate learning circles to the team of the facilitator' def handle(self, *args, **options): ...
<commit_before><commit_msg>Add django task to link learning circles to teams<commit_after>from django.core.management.base import BaseCommand, CommandError from studygroups.models import StudyGroup import requests class Command(BaseCommand): help = 'Associate learning circles to the team of the facilitator' ...
93df9699c1ac06d35a72532b0e36f9d687f5fb67
py/implement-magic-dictionary.py
py/implement-magic-dictionary.py
from collections import defaultdict class Node(object): def __init__(self): self.end = False self._not = defaultdict(set) self.children = defaultdict(Node) class MagicDictionary(object): def __init__(self): """ Initialize your data structure here. """ se...
Add py solution for 676. Implement Magic Dictionary
Add py solution for 676. Implement Magic Dictionary 676. Implement Magic Dictionary: https://leetcode.com/problems/implement-magic-dictionary/
Python
apache-2.0
ckclark/leetcode,ckclark/leetcode,ckclark/leetcode,ckclark/leetcode,ckclark/leetcode,ckclark/leetcode
Add py solution for 676. Implement Magic Dictionary 676. Implement Magic Dictionary: https://leetcode.com/problems/implement-magic-dictionary/
from collections import defaultdict class Node(object): def __init__(self): self.end = False self._not = defaultdict(set) self.children = defaultdict(Node) class MagicDictionary(object): def __init__(self): """ Initialize your data structure here. """ se...
<commit_before><commit_msg>Add py solution for 676. Implement Magic Dictionary 676. Implement Magic Dictionary: https://leetcode.com/problems/implement-magic-dictionary/<commit_after>
from collections import defaultdict class Node(object): def __init__(self): self.end = False self._not = defaultdict(set) self.children = defaultdict(Node) class MagicDictionary(object): def __init__(self): """ Initialize your data structure here. """ se...
Add py solution for 676. Implement Magic Dictionary 676. Implement Magic Dictionary: https://leetcode.com/problems/implement-magic-dictionary/from collections import defaultdict class Node(object): def __init__(self): self.end = False self._not = defaultdict(set) self.children = defaultdict...
<commit_before><commit_msg>Add py solution for 676. Implement Magic Dictionary 676. Implement Magic Dictionary: https://leetcode.com/problems/implement-magic-dictionary/<commit_after>from collections import defaultdict class Node(object): def __init__(self): self.end = False self._not = defaultdict...
df58e6332c47efdef34021d811d5101fe5c944ea
cat/management/commands/importcategories.py
cat/management/commands/importcategories.py
from django.core.management.base import BaseCommand, CommandError from cat.models import Category from openpyxl.reader.excel import load_workbook def import_categories(filename): wb = load_workbook(filename = filename) categories_sheet = wb.get_sheet_by_name(name = 'Categories') _import_sheet(categories_...
Add script for importing the new categories from excel.
Add script for importing the new categories from excel.
Python
bsd-3-clause
uq-eresearch/uqam,uq-eresearch/uqam,uq-eresearch/uqam,uq-eresearch/uqam
Add script for importing the new categories from excel.
from django.core.management.base import BaseCommand, CommandError from cat.models import Category from openpyxl.reader.excel import load_workbook def import_categories(filename): wb = load_workbook(filename = filename) categories_sheet = wb.get_sheet_by_name(name = 'Categories') _import_sheet(categories_...
<commit_before><commit_msg>Add script for importing the new categories from excel.<commit_after>
from django.core.management.base import BaseCommand, CommandError from cat.models import Category from openpyxl.reader.excel import load_workbook def import_categories(filename): wb = load_workbook(filename = filename) categories_sheet = wb.get_sheet_by_name(name = 'Categories') _import_sheet(categories_...
Add script for importing the new categories from excel.from django.core.management.base import BaseCommand, CommandError from cat.models import Category from openpyxl.reader.excel import load_workbook def import_categories(filename): wb = load_workbook(filename = filename) categories_sheet = wb.get_sheet_by_n...
<commit_before><commit_msg>Add script for importing the new categories from excel.<commit_after>from django.core.management.base import BaseCommand, CommandError from cat.models import Category from openpyxl.reader.excel import load_workbook def import_categories(filename): wb = load_workbook(filename = filename)...
db3ff13c74c492341f11a8829c548fda79e34cc2
test/Win32/file-is-type-not-func.py
test/Win32/file-is-type-not-func.py
#!/usr/bin/env python # # __COPYRIGHT__ # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, ...
Add test for issue-2857 fix.
Add test for issue-2857 fix. The test makes sure that inheriting from file works as it should.
Python
mit
timj/scons,andrewyoung1991/scons,timj/scons,timj/scons,timj/scons,timj/scons,andrewyoung1991/scons,andrewyoung1991/scons,timj/scons,timj/scons,andrewyoung1991/scons,andrewyoung1991/scons,andrewyoung1991/scons,andrewyoung1991/scons,andrewyoung1991/scons,andrewyoung1991/scons,timj/scons,timj/scons
Add test for issue-2857 fix. The test makes sure that inheriting from file works as it should.
#!/usr/bin/env python # # __COPYRIGHT__ # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, ...
<commit_before><commit_msg>Add test for issue-2857 fix. The test makes sure that inheriting from file works as it should.<commit_after>
#!/usr/bin/env python # # __COPYRIGHT__ # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, ...
Add test for issue-2857 fix. The test makes sure that inheriting from file works as it should.#!/usr/bin/env python # # __COPYRIGHT__ # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the # "Software"), to deal in the Software withou...
<commit_before><commit_msg>Add test for issue-2857 fix. The test makes sure that inheriting from file works as it should.<commit_after>#!/usr/bin/env python # # __COPYRIGHT__ # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the # "S...
fb65033cca916faf15158d79e870009eebb823b6
pyconca2017/pycon_schedule/migrations/0005_auto_20171005_0914.py
pyconca2017/pycon_schedule/migrations/0005_auto_20171005_0914.py
# -*- coding: utf-8 -*- # Generated by Django 1.10.5 on 2017-10-05 13:14 from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('pycon_schedule', '0004_auto_20171002_2324'), ] operations = [ migrations.Ad...
Add French language option to Slot content.
:sparkles: Add French language option to Slot content. #59
Python
mit
pyconca/2017-web,pyconca/2017-web,pyconca/2017-web,pyconca/2017-web
:sparkles: Add French language option to Slot content. #59
# -*- coding: utf-8 -*- # Generated by Django 1.10.5 on 2017-10-05 13:14 from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('pycon_schedule', '0004_auto_20171002_2324'), ] operations = [ migrations.Ad...
<commit_before><commit_msg>:sparkles: Add French language option to Slot content. #59<commit_after>
# -*- coding: utf-8 -*- # Generated by Django 1.10.5 on 2017-10-05 13:14 from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('pycon_schedule', '0004_auto_20171002_2324'), ] operations = [ migrations.Ad...
:sparkles: Add French language option to Slot content. #59# -*- coding: utf-8 -*- # Generated by Django 1.10.5 on 2017-10-05 13:14 from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('pycon_schedule', '0004_auto_2017...
<commit_before><commit_msg>:sparkles: Add French language option to Slot content. #59<commit_after># -*- coding: utf-8 -*- # Generated by Django 1.10.5 on 2017-10-05 13:14 from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ...
b26053cb517aea3885e06c3cc702e5a4d3a595e6
pylayers/gis/test/test_convex.py
pylayers/gis/test/test_convex.py
from pylayers.gis.layout import * import pylayers.util.geomutil as geu L=Layout('WHERE1.ini') L.build() lc = [(n,L.Gt.node[n]['polyg'].isconvex()) for n in L.Gt.nodes()] cnc = [n for n in L.Gt.nodes() if not L.Gt.node[n]['polyg'].isconvex()] fig,ax=L.showG('st',labels=True) for cy,c in lc: if c: print cy, ...
Add test convex in gis
Add test convex in gis
Python
mit
dialounke/pylayers,pylayers/pylayers,dialounke/pylayers,pylayers/pylayers
Add test convex in gis
from pylayers.gis.layout import * import pylayers.util.geomutil as geu L=Layout('WHERE1.ini') L.build() lc = [(n,L.Gt.node[n]['polyg'].isconvex()) for n in L.Gt.nodes()] cnc = [n for n in L.Gt.nodes() if not L.Gt.node[n]['polyg'].isconvex()] fig,ax=L.showG('st',labels=True) for cy,c in lc: if c: print cy, ...
<commit_before><commit_msg>Add test convex in gis<commit_after>
from pylayers.gis.layout import * import pylayers.util.geomutil as geu L=Layout('WHERE1.ini') L.build() lc = [(n,L.Gt.node[n]['polyg'].isconvex()) for n in L.Gt.nodes()] cnc = [n for n in L.Gt.nodes() if not L.Gt.node[n]['polyg'].isconvex()] fig,ax=L.showG('st',labels=True) for cy,c in lc: if c: print cy, ...
Add test convex in gisfrom pylayers.gis.layout import * import pylayers.util.geomutil as geu L=Layout('WHERE1.ini') L.build() lc = [(n,L.Gt.node[n]['polyg'].isconvex()) for n in L.Gt.nodes()] cnc = [n for n in L.Gt.nodes() if not L.Gt.node[n]['polyg'].isconvex()] fig,ax=L.showG('st',labels=True) for cy,c in lc: if...
<commit_before><commit_msg>Add test convex in gis<commit_after>from pylayers.gis.layout import * import pylayers.util.geomutil as geu L=Layout('WHERE1.ini') L.build() lc = [(n,L.Gt.node[n]['polyg'].isconvex()) for n in L.Gt.nodes()] cnc = [n for n in L.Gt.nodes() if not L.Gt.node[n]['polyg'].isconvex()] fig,ax=L.showG...
1d617b7b072f65e9ecb0baad87485b6d471edf31
tests/unit/test_tokenstorage.py
tests/unit/test_tokenstorage.py
import json import pytest from globus_sdk.tokenstorage import SimpleJSONFileAdapter, SQLiteAdapter from globus_sdk.version import __version__ as sdkversion def test_sqlite_reading_bad_config(): adapter = SQLiteAdapter(":memory:") # inject bad data (array, needs to be dict) # store_config does not check ...
Add some unit tests to cover tokenstorage
Add some unit tests to cover tokenstorage The tokenstorage adapters have several untested behaviors regarding handling of malformed data. Add some unit tests which inject bad data, to confirm that the handling code is triggered correctly with no crashfails or other unexpected issues.
Python
apache-2.0
sirosen/globus-sdk-python,globus/globus-sdk-python,globus/globus-sdk-python
Add some unit tests to cover tokenstorage The tokenstorage adapters have several untested behaviors regarding handling of malformed data. Add some unit tests which inject bad data, to confirm that the handling code is triggered correctly with no crashfails or other unexpected issues.
import json import pytest from globus_sdk.tokenstorage import SimpleJSONFileAdapter, SQLiteAdapter from globus_sdk.version import __version__ as sdkversion def test_sqlite_reading_bad_config(): adapter = SQLiteAdapter(":memory:") # inject bad data (array, needs to be dict) # store_config does not check ...
<commit_before><commit_msg>Add some unit tests to cover tokenstorage The tokenstorage adapters have several untested behaviors regarding handling of malformed data. Add some unit tests which inject bad data, to confirm that the handling code is triggered correctly with no crashfails or other unexpected issues.<commit_...
import json import pytest from globus_sdk.tokenstorage import SimpleJSONFileAdapter, SQLiteAdapter from globus_sdk.version import __version__ as sdkversion def test_sqlite_reading_bad_config(): adapter = SQLiteAdapter(":memory:") # inject bad data (array, needs to be dict) # store_config does not check ...
Add some unit tests to cover tokenstorage The tokenstorage adapters have several untested behaviors regarding handling of malformed data. Add some unit tests which inject bad data, to confirm that the handling code is triggered correctly with no crashfails or other unexpected issues.import json import pytest from gl...
<commit_before><commit_msg>Add some unit tests to cover tokenstorage The tokenstorage adapters have several untested behaviors regarding handling of malformed data. Add some unit tests which inject bad data, to confirm that the handling code is triggered correctly with no crashfails or other unexpected issues.<commit_...
974739822bbe80c8841c3aceafd3a49d29b5c1dc
custom/icds_reports/management/commands/rebuild_ccs_record_ucr.py
custom/icds_reports/management/commands/rebuild_ccs_record_ucr.py
from __future__ import absolute_import from __future__ import unicode_literals import time from django.core.management.base import BaseCommand from corehq.apps.userreports.tasks import _get_config_by_id, _build_indicators from corehq.apps.change_feed.data_sources import get_document_store_for_doc_type from custom.icd...
Add Mgt command to rebuild ccs records rebuild ccs record cases for pnc_complete=1
Add Mgt command to rebuild ccs records rebuild ccs record cases for pnc_complete=1
Python
bsd-3-clause
dimagi/commcare-hq,dimagi/commcare-hq,dimagi/commcare-hq,dimagi/commcare-hq,dimagi/commcare-hq
Add Mgt command to rebuild ccs records rebuild ccs record cases for pnc_complete=1
from __future__ import absolute_import from __future__ import unicode_literals import time from django.core.management.base import BaseCommand from corehq.apps.userreports.tasks import _get_config_by_id, _build_indicators from corehq.apps.change_feed.data_sources import get_document_store_for_doc_type from custom.icd...
<commit_before><commit_msg>Add Mgt command to rebuild ccs records rebuild ccs record cases for pnc_complete=1<commit_after>
from __future__ import absolute_import from __future__ import unicode_literals import time from django.core.management.base import BaseCommand from corehq.apps.userreports.tasks import _get_config_by_id, _build_indicators from corehq.apps.change_feed.data_sources import get_document_store_for_doc_type from custom.icd...
Add Mgt command to rebuild ccs records rebuild ccs record cases for pnc_complete=1from __future__ import absolute_import from __future__ import unicode_literals import time from django.core.management.base import BaseCommand from corehq.apps.userreports.tasks import _get_config_by_id, _build_indicators from corehq.ap...
<commit_before><commit_msg>Add Mgt command to rebuild ccs records rebuild ccs record cases for pnc_complete=1<commit_after>from __future__ import absolute_import from __future__ import unicode_literals import time from django.core.management.base import BaseCommand from corehq.apps.userreports.tasks import _get_confi...
a5c8ab3637ccf748dce8ea8d8941ba2dc45c0086
wikipendium/jitishcron/tasks.py
wikipendium/jitishcron/tasks.py
from wikipendium.jitishcron.decorators import task from wikipendium import settings import subprocess twenty_four_hours_in_seconds = 60 * 60 * 24 @task(min_interval_in_seconds=twenty_four_hours_in_seconds) def database_backup(): if not settings.DEBUG: subprocess.Popen(['venv/bin/python', 'manage.py', 'ba...
Add database backup JITishCron task
Add database backup JITishCron task Now the database will be backed up once per day, given activity on the site. The task is run asynchronously using subprocess.Popen. This fixes #46.
Python
apache-2.0
stianjensen/wikipendium.no,stianjensen/wikipendium.no,stianjensen/wikipendium.no
Add database backup JITishCron task Now the database will be backed up once per day, given activity on the site. The task is run asynchronously using subprocess.Popen. This fixes #46.
from wikipendium.jitishcron.decorators import task from wikipendium import settings import subprocess twenty_four_hours_in_seconds = 60 * 60 * 24 @task(min_interval_in_seconds=twenty_four_hours_in_seconds) def database_backup(): if not settings.DEBUG: subprocess.Popen(['venv/bin/python', 'manage.py', 'ba...
<commit_before><commit_msg>Add database backup JITishCron task Now the database will be backed up once per day, given activity on the site. The task is run asynchronously using subprocess.Popen. This fixes #46.<commit_after>
from wikipendium.jitishcron.decorators import task from wikipendium import settings import subprocess twenty_four_hours_in_seconds = 60 * 60 * 24 @task(min_interval_in_seconds=twenty_four_hours_in_seconds) def database_backup(): if not settings.DEBUG: subprocess.Popen(['venv/bin/python', 'manage.py', 'ba...
Add database backup JITishCron task Now the database will be backed up once per day, given activity on the site. The task is run asynchronously using subprocess.Popen. This fixes #46.from wikipendium.jitishcron.decorators import task from wikipendium import settings import subprocess twenty_four_hours_in_seconds = 6...
<commit_before><commit_msg>Add database backup JITishCron task Now the database will be backed up once per day, given activity on the site. The task is run asynchronously using subprocess.Popen. This fixes #46.<commit_after>from wikipendium.jitishcron.decorators import task from wikipendium import settings import sub...
f50c5d683cc46c08d887afc8fb3a167edd6bc8fd
polling_stations/apps/data_collection/management/commands/import_ceredigion.py
polling_stations/apps/data_collection/management/commands/import_ceredigion.py
""" Import Ceredigion note: this script takes quite a long time to run """ from django.contrib.gis.geos import Point from data_collection.management.commands import BaseAddressCsvImporter class Command(BaseAddressCsvImporter): """ Imports the Polling Station data from Ceredigion """ council_id =...
Add import script for Ceredigion
Add import script for Ceredigion
Python
bsd-3-clause
chris48s/UK-Polling-Stations,andylolz/UK-Polling-Stations,DemocracyClub/UK-Polling-Stations,chris48s/UK-Polling-Stations,DemocracyClub/UK-Polling-Stations,DemocracyClub/UK-Polling-Stations,andylolz/UK-Polling-Stations,chris48s/UK-Polling-Stations,andylolz/UK-Polling-Stations
Add import script for Ceredigion
""" Import Ceredigion note: this script takes quite a long time to run """ from django.contrib.gis.geos import Point from data_collection.management.commands import BaseAddressCsvImporter class Command(BaseAddressCsvImporter): """ Imports the Polling Station data from Ceredigion """ council_id =...
<commit_before><commit_msg>Add import script for Ceredigion<commit_after>
""" Import Ceredigion note: this script takes quite a long time to run """ from django.contrib.gis.geos import Point from data_collection.management.commands import BaseAddressCsvImporter class Command(BaseAddressCsvImporter): """ Imports the Polling Station data from Ceredigion """ council_id =...
Add import script for Ceredigion""" Import Ceredigion note: this script takes quite a long time to run """ from django.contrib.gis.geos import Point from data_collection.management.commands import BaseAddressCsvImporter class Command(BaseAddressCsvImporter): """ Imports the Polling Station data from Ceredigio...
<commit_before><commit_msg>Add import script for Ceredigion<commit_after>""" Import Ceredigion note: this script takes quite a long time to run """ from django.contrib.gis.geos import Point from data_collection.management.commands import BaseAddressCsvImporter class Command(BaseAddressCsvImporter): """ Import...
6ca1fc012e1fb2a3bfc231af1bab3edfba6a30d0
pinax/stripe/tests/test_hooks.py
pinax/stripe/tests/test_hooks.py
import decimal from django.test import TestCase from django.contrib.auth import get_user_model from mock import patch from ..hooks import DefaultHookSet from ..proxies import ChargeProxy, CustomerProxy class HooksTestCase(TestCase): def setUp(self): self.User = get_user_model() self.user = se...
Add some tests for hooks
Add some tests for hooks
Python
mit
pinax/django-stripe-payments
Add some tests for hooks
import decimal from django.test import TestCase from django.contrib.auth import get_user_model from mock import patch from ..hooks import DefaultHookSet from ..proxies import ChargeProxy, CustomerProxy class HooksTestCase(TestCase): def setUp(self): self.User = get_user_model() self.user = se...
<commit_before><commit_msg>Add some tests for hooks<commit_after>
import decimal from django.test import TestCase from django.contrib.auth import get_user_model from mock import patch from ..hooks import DefaultHookSet from ..proxies import ChargeProxy, CustomerProxy class HooksTestCase(TestCase): def setUp(self): self.User = get_user_model() self.user = se...
Add some tests for hooksimport decimal from django.test import TestCase from django.contrib.auth import get_user_model from mock import patch from ..hooks import DefaultHookSet from ..proxies import ChargeProxy, CustomerProxy class HooksTestCase(TestCase): def setUp(self): self.User = get_user_model(...
<commit_before><commit_msg>Add some tests for hooks<commit_after>import decimal from django.test import TestCase from django.contrib.auth import get_user_model from mock import patch from ..hooks import DefaultHookSet from ..proxies import ChargeProxy, CustomerProxy class HooksTestCase(TestCase): def setUp(s...
74f4359ce3afddc3fab122e0aa741a4b0b276821
spreadflow_core/test/test_eventdispatcher.py
spreadflow_core/test/test_eventdispatcher.py
from __future__ import absolute_import from __future__ import division from __future__ import unicode_literals from mock import Mock from testtools import TestCase from spreadflow_core.eventdispatcher import EventDispatcher class TestEvent(object): pass class OtherEvent(object): pass class EventDispatcherT...
Add some tests for event dispatcher
Add some tests for event dispatcher
Python
mit
znerol/spreadflow-core,spreadflow/spreadflow-core
Add some tests for event dispatcher
from __future__ import absolute_import from __future__ import division from __future__ import unicode_literals from mock import Mock from testtools import TestCase from spreadflow_core.eventdispatcher import EventDispatcher class TestEvent(object): pass class OtherEvent(object): pass class EventDispatcherT...
<commit_before><commit_msg>Add some tests for event dispatcher<commit_after>
from __future__ import absolute_import from __future__ import division from __future__ import unicode_literals from mock import Mock from testtools import TestCase from spreadflow_core.eventdispatcher import EventDispatcher class TestEvent(object): pass class OtherEvent(object): pass class EventDispatcherT...
Add some tests for event dispatcherfrom __future__ import absolute_import from __future__ import division from __future__ import unicode_literals from mock import Mock from testtools import TestCase from spreadflow_core.eventdispatcher import EventDispatcher class TestEvent(object): pass class OtherEvent(object...
<commit_before><commit_msg>Add some tests for event dispatcher<commit_after>from __future__ import absolute_import from __future__ import division from __future__ import unicode_literals from mock import Mock from testtools import TestCase from spreadflow_core.eventdispatcher import EventDispatcher class TestEvent(o...
c7c54f6d3afdd8b63775a4f2177275817143d423
tests/TestProfileRequirements.py
tests/TestProfileRequirements.py
import configparser #To read the profiles. import os #To join paths. import pytest ## Makes sure that the variants for the Ultimaker 3 Extended are exactly the # same as for the Ultimaker 3. # # Once we have specialised profiles or a mechanism to inherit variants too, we # may remove this test and have differen...
Add test to ensure that UM3 and UM3E variants are kept the same
Add test to ensure that UM3 and UM3E variants are kept the same It's a bit chunky, but functional.
Python
agpl-3.0
Curahelper/Cura,Curahelper/Cura
Add test to ensure that UM3 and UM3E variants are kept the same It's a bit chunky, but functional.
import configparser #To read the profiles. import os #To join paths. import pytest ## Makes sure that the variants for the Ultimaker 3 Extended are exactly the # same as for the Ultimaker 3. # # Once we have specialised profiles or a mechanism to inherit variants too, we # may remove this test and have differen...
<commit_before><commit_msg>Add test to ensure that UM3 and UM3E variants are kept the same It's a bit chunky, but functional.<commit_after>
import configparser #To read the profiles. import os #To join paths. import pytest ## Makes sure that the variants for the Ultimaker 3 Extended are exactly the # same as for the Ultimaker 3. # # Once we have specialised profiles or a mechanism to inherit variants too, we # may remove this test and have differen...
Add test to ensure that UM3 and UM3E variants are kept the same It's a bit chunky, but functional.import configparser #To read the profiles. import os #To join paths. import pytest ## Makes sure that the variants for the Ultimaker 3 Extended are exactly the # same as for the Ultimaker 3. # # Once we have special...
<commit_before><commit_msg>Add test to ensure that UM3 and UM3E variants are kept the same It's a bit chunky, but functional.<commit_after>import configparser #To read the profiles. import os #To join paths. import pytest ## Makes sure that the variants for the Ultimaker 3 Extended are exactly the # same as for th...
60865b51bfffb2b623bc7ed423621141f5126350
h2o-py/tests/testdir_algos/deepwater/pyunit_airlines_cv_deepwater.py
h2o-py/tests/testdir_algos/deepwater/pyunit_airlines_cv_deepwater.py
from __future__ import print_function from builtins import range import sys, os sys.path.insert(1, os.path.join("..","..","..")) import h2o from tests import pyunit_utils import random from h2o.estimators.deepwater import H2ODeepWaterEstimator def cv_airlines(): # read in the dataset and construct training set (and...
Add 3-fold cv airlines example for Deep Water.
Add 3-fold cv airlines example for Deep Water.
Python
apache-2.0
jangorecki/h2o-3,spennihana/h2o-3,h2oai/h2o-dev,spennihana/h2o-3,mathemage/h2o-3,mathemage/h2o-3,mathemage/h2o-3,mathemage/h2o-3,michalkurka/h2o-3,michalkurka/h2o-3,h2oai/h2o-dev,h2oai/h2o-dev,spennihana/h2o-3,h2oai/h2o-dev,h2oai/h2o-3,h2oai/h2o-3,h2oai/h2o-dev,h2oai/h2o-3,michalkurka/h2o-3,michalkurka/h2o-3,h2oai/h2o-...
Add 3-fold cv airlines example for Deep Water.
from __future__ import print_function from builtins import range import sys, os sys.path.insert(1, os.path.join("..","..","..")) import h2o from tests import pyunit_utils import random from h2o.estimators.deepwater import H2ODeepWaterEstimator def cv_airlines(): # read in the dataset and construct training set (and...
<commit_before><commit_msg>Add 3-fold cv airlines example for Deep Water.<commit_after>
from __future__ import print_function from builtins import range import sys, os sys.path.insert(1, os.path.join("..","..","..")) import h2o from tests import pyunit_utils import random from h2o.estimators.deepwater import H2ODeepWaterEstimator def cv_airlines(): # read in the dataset and construct training set (and...
Add 3-fold cv airlines example for Deep Water.from __future__ import print_function from builtins import range import sys, os sys.path.insert(1, os.path.join("..","..","..")) import h2o from tests import pyunit_utils import random from h2o.estimators.deepwater import H2ODeepWaterEstimator def cv_airlines(): # read ...
<commit_before><commit_msg>Add 3-fold cv airlines example for Deep Water.<commit_after>from __future__ import print_function from builtins import range import sys, os sys.path.insert(1, os.path.join("..","..","..")) import h2o from tests import pyunit_utils import random from h2o.estimators.deepwater import H2ODeepWate...
f4f92cc3f5f41f1d8a06089e306a75062f53cb2e
pycroscopy/learn/dl/datautils.py
pycroscopy/learn/dl/datautils.py
from typing import Tuple, Type, Union import torch import numpy as np def init_dataloaders(X_train: np.ndarray, y_train: np.ndarray, X_test: np.ndarray, y_test: np.ndarray, batch_size: int ) -> Tuple[Type[torch.u...
Add utils for initalizing dataloaders
Add utils for initalizing dataloaders
Python
mit
pycroscopy/pycroscopy
Add utils for initalizing dataloaders
from typing import Tuple, Type, Union import torch import numpy as np def init_dataloaders(X_train: np.ndarray, y_train: np.ndarray, X_test: np.ndarray, y_test: np.ndarray, batch_size: int ) -> Tuple[Type[torch.u...
<commit_before><commit_msg>Add utils for initalizing dataloaders<commit_after>
from typing import Tuple, Type, Union import torch import numpy as np def init_dataloaders(X_train: np.ndarray, y_train: np.ndarray, X_test: np.ndarray, y_test: np.ndarray, batch_size: int ) -> Tuple[Type[torch.u...
Add utils for initalizing dataloadersfrom typing import Tuple, Type, Union import torch import numpy as np def init_dataloaders(X_train: np.ndarray, y_train: np.ndarray, X_test: np.ndarray, y_test: np.ndarray, batch_size: int ...
<commit_before><commit_msg>Add utils for initalizing dataloaders<commit_after>from typing import Tuple, Type, Union import torch import numpy as np def init_dataloaders(X_train: np.ndarray, y_train: np.ndarray, X_test: np.ndarray, y_test: np.ndarray, ...
ee01ba77e67d5bc03a14e33cc7b29a4c247b8d55
mapit/management/commands/mapit_delete_areas_from_new_generation.py
mapit/management/commands/mapit_delete_areas_from_new_generation.py
# This script deletes all the areas from the new generation (i.e. the # most recent inactive one). from optparse import make_option from django.core.management.base import NoArgsCommand from mapit.models import Generation, Area class Command(NoArgsCommand): help = 'Remove all areas from the new (inactive) generat...
Add a command to delete areas for a new (inactive) generation
Add a command to delete areas for a new (inactive) generation
Python
agpl-3.0
Sinar/mapit,opencorato/mapit,opencorato/mapit,Code4SA/mapit,chris48s/mapit,Sinar/mapit,opencorato/mapit,New-Bamboo/mapit,New-Bamboo/mapit,Code4SA/mapit,Code4SA/mapit,chris48s/mapit,chris48s/mapit
Add a command to delete areas for a new (inactive) generation
# This script deletes all the areas from the new generation (i.e. the # most recent inactive one). from optparse import make_option from django.core.management.base import NoArgsCommand from mapit.models import Generation, Area class Command(NoArgsCommand): help = 'Remove all areas from the new (inactive) generat...
<commit_before><commit_msg>Add a command to delete areas for a new (inactive) generation<commit_after>
# This script deletes all the areas from the new generation (i.e. the # most recent inactive one). from optparse import make_option from django.core.management.base import NoArgsCommand from mapit.models import Generation, Area class Command(NoArgsCommand): help = 'Remove all areas from the new (inactive) generat...
Add a command to delete areas for a new (inactive) generation# This script deletes all the areas from the new generation (i.e. the # most recent inactive one). from optparse import make_option from django.core.management.base import NoArgsCommand from mapit.models import Generation, Area class Command(NoArgsCommand):...
<commit_before><commit_msg>Add a command to delete areas for a new (inactive) generation<commit_after># This script deletes all the areas from the new generation (i.e. the # most recent inactive one). from optparse import make_option from django.core.management.base import NoArgsCommand from mapit.models import Genera...
6fd8b14cd57a05a0eeb840236e437c452a77d1cd
support/strip-leading-comments.py
support/strip-leading-comments.py
#!/bin/perl # $Id$ import os, sys from stat import * def walktree(dir, callback): '''recursively descend the directory rooted at dir, calling the callback function for each regular file''' print dir for f in os.listdir(dir): pathname = '%s/%s' % (dir, f) mode = os.stat(pa...
Switch license from LGPL to ASL.
Switch license from LGPL to ASL. git-svn-id: 1006245cb1bdea2fd4c9095e50bc2ef3d167b18c@243048 13f79535-47bb-0310-9956-ffa450edef68
Python
apache-2.0
apache/tapestry3,apache/tapestry3,apache/tapestry3,apache/tapestry3
Switch license from LGPL to ASL. git-svn-id: 1006245cb1bdea2fd4c9095e50bc2ef3d167b18c@243048 13f79535-47bb-0310-9956-ffa450edef68
#!/bin/perl # $Id$ import os, sys from stat import * def walktree(dir, callback): '''recursively descend the directory rooted at dir, calling the callback function for each regular file''' print dir for f in os.listdir(dir): pathname = '%s/%s' % (dir, f) mode = os.stat(pa...
<commit_before><commit_msg>Switch license from LGPL to ASL. git-svn-id: 1006245cb1bdea2fd4c9095e50bc2ef3d167b18c@243048 13f79535-47bb-0310-9956-ffa450edef68<commit_after>
#!/bin/perl # $Id$ import os, sys from stat import * def walktree(dir, callback): '''recursively descend the directory rooted at dir, calling the callback function for each regular file''' print dir for f in os.listdir(dir): pathname = '%s/%s' % (dir, f) mode = os.stat(pa...
Switch license from LGPL to ASL. git-svn-id: 1006245cb1bdea2fd4c9095e50bc2ef3d167b18c@243048 13f79535-47bb-0310-9956-ffa450edef68#!/bin/perl # $Id$ import os, sys from stat import * def walktree(dir, callback): '''recursively descend the directory rooted at dir, calling the callback function for ...
<commit_before><commit_msg>Switch license from LGPL to ASL. git-svn-id: 1006245cb1bdea2fd4c9095e50bc2ef3d167b18c@243048 13f79535-47bb-0310-9956-ffa450edef68<commit_after>#!/bin/perl # $Id$ import os, sys from stat import * def walktree(dir, callback): '''recursively descend the directory rooted at dir, ...
192f0c8ce32328dc8079edf0072e423431d4749a
nodeconductor/template/migrations/0006_templategroup_tags.py
nodeconductor/template/migrations/0006_templategroup_tags.py
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations import taggit.managers class Migration(migrations.Migration): dependencies = [ ('taggit', '0002_auto_20150616_2121'), ('template', '0005_new_templates_models'), ] operations = [ ...
Add template tags to template groups
Add template tags to template groups - nc-959
Python
mit
opennode/nodeconductor,opennode/nodeconductor,opennode/nodeconductor
Add template tags to template groups - nc-959
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations import taggit.managers class Migration(migrations.Migration): dependencies = [ ('taggit', '0002_auto_20150616_2121'), ('template', '0005_new_templates_models'), ] operations = [ ...
<commit_before><commit_msg>Add template tags to template groups - nc-959<commit_after>
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations import taggit.managers class Migration(migrations.Migration): dependencies = [ ('taggit', '0002_auto_20150616_2121'), ('template', '0005_new_templates_models'), ] operations = [ ...
Add template tags to template groups - nc-959# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations import taggit.managers class Migration(migrations.Migration): dependencies = [ ('taggit', '0002_auto_20150616_2121'), ('template', '0005_new_tem...
<commit_before><commit_msg>Add template tags to template groups - nc-959<commit_after># -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations import taggit.managers class Migration(migrations.Migration): dependencies = [ ('taggit', '0002_auto_20150616_2...
e9998ce3b367d70a54a5c2f8150048e7be1634ee
csunplugged/tests/utils/translatable_model_loader/test_TranslatableModelLoader.py
csunplugged/tests/utils/translatable_model_loader/test_TranslatableModelLoader.py
"""Test class for TranslatableModelLoader.""" from django.test import SimpleTestCase class TranslatableModelLoaderTest(SimpleTestCase): """Test class for TranslatableModelLoader.""" def test_get_yaml_translations_english(self): pass def test_get_yaml_translations_english_missing_reqd_field(self)...
Add test definitions for TranslatableModelLoader unit tests
Add test definitions for TranslatableModelLoader unit tests
Python
mit
uccser/cs-unplugged,uccser/cs-unplugged,uccser/cs-unplugged,uccser/cs-unplugged
Add test definitions for TranslatableModelLoader unit tests
"""Test class for TranslatableModelLoader.""" from django.test import SimpleTestCase class TranslatableModelLoaderTest(SimpleTestCase): """Test class for TranslatableModelLoader.""" def test_get_yaml_translations_english(self): pass def test_get_yaml_translations_english_missing_reqd_field(self)...
<commit_before><commit_msg>Add test definitions for TranslatableModelLoader unit tests<commit_after>
"""Test class for TranslatableModelLoader.""" from django.test import SimpleTestCase class TranslatableModelLoaderTest(SimpleTestCase): """Test class for TranslatableModelLoader.""" def test_get_yaml_translations_english(self): pass def test_get_yaml_translations_english_missing_reqd_field(self)...
Add test definitions for TranslatableModelLoader unit tests"""Test class for TranslatableModelLoader.""" from django.test import SimpleTestCase class TranslatableModelLoaderTest(SimpleTestCase): """Test class for TranslatableModelLoader.""" def test_get_yaml_translations_english(self): pass def ...
<commit_before><commit_msg>Add test definitions for TranslatableModelLoader unit tests<commit_after>"""Test class for TranslatableModelLoader.""" from django.test import SimpleTestCase class TranslatableModelLoaderTest(SimpleTestCase): """Test class for TranslatableModelLoader.""" def test_get_yaml_translati...
ef7558c2f0f6f32a8326decaf44c6fb86bd48fc1
falmer/content/migrations/0008_auto_20170530_1519.py
falmer/content/migrations/0008_auto_20170530_1519.py
# -*- coding: utf-8 -*- # Generated by Django 1.10.7 on 2017-05-30 15:19 from __future__ import unicode_literals from django.db import migrations import falmer.content.blocks import falmer.content.models.selection_grid import wagtail.wagtailcore.blocks import wagtail.wagtailcore.fields class Migration(migrations.Mig...
Remove static selectiongrid hero fields
Remove static selectiongrid hero fields
Python
mit
sussexstudent/falmer,sussexstudent/falmer,sussexstudent/falmer,sussexstudent/falmer
Remove static selectiongrid hero fields
# -*- coding: utf-8 -*- # Generated by Django 1.10.7 on 2017-05-30 15:19 from __future__ import unicode_literals from django.db import migrations import falmer.content.blocks import falmer.content.models.selection_grid import wagtail.wagtailcore.blocks import wagtail.wagtailcore.fields class Migration(migrations.Mig...
<commit_before><commit_msg>Remove static selectiongrid hero fields<commit_after>
# -*- coding: utf-8 -*- # Generated by Django 1.10.7 on 2017-05-30 15:19 from __future__ import unicode_literals from django.db import migrations import falmer.content.blocks import falmer.content.models.selection_grid import wagtail.wagtailcore.blocks import wagtail.wagtailcore.fields class Migration(migrations.Mig...
Remove static selectiongrid hero fields# -*- coding: utf-8 -*- # Generated by Django 1.10.7 on 2017-05-30 15:19 from __future__ import unicode_literals from django.db import migrations import falmer.content.blocks import falmer.content.models.selection_grid import wagtail.wagtailcore.blocks import wagtail.wagtailcore....
<commit_before><commit_msg>Remove static selectiongrid hero fields<commit_after># -*- coding: utf-8 -*- # Generated by Django 1.10.7 on 2017-05-30 15:19 from __future__ import unicode_literals from django.db import migrations import falmer.content.blocks import falmer.content.models.selection_grid import wagtail.wagta...
26dec2182012ab6206d79235526f678480bc3601
vpr/vpr_content/utils.py
vpr/vpr_content/utils.py
from django.db.models import Q from models import Material, Person def get_page(pid, qset, per_page=20): """ Returns item list of specific page in result pid: ID of page, start from 1 """ start_on = (pid-1)*per_page res = qset[start_on:start_on+per_page] return res class MaterialSca...
Add functions for filtering mal-formed materials
Add functions for filtering mal-formed materials
Python
agpl-3.0
voer-platform/vp.repo,voer-platform/vp.repo,voer-platform/vp.repo,voer-platform/vp.repo
Add functions for filtering mal-formed materials
from django.db.models import Q from models import Material, Person def get_page(pid, qset, per_page=20): """ Returns item list of specific page in result pid: ID of page, start from 1 """ start_on = (pid-1)*per_page res = qset[start_on:start_on+per_page] return res class MaterialSca...
<commit_before><commit_msg>Add functions for filtering mal-formed materials<commit_after>
from django.db.models import Q from models import Material, Person def get_page(pid, qset, per_page=20): """ Returns item list of specific page in result pid: ID of page, start from 1 """ start_on = (pid-1)*per_page res = qset[start_on:start_on+per_page] return res class MaterialSca...
Add functions for filtering mal-formed materialsfrom django.db.models import Q from models import Material, Person def get_page(pid, qset, per_page=20): """ Returns item list of specific page in result pid: ID of page, start from 1 """ start_on = (pid-1)*per_page res = qset[start_on:start...
<commit_before><commit_msg>Add functions for filtering mal-formed materials<commit_after>from django.db.models import Q from models import Material, Person def get_page(pid, qset, per_page=20): """ Returns item list of specific page in result pid: ID of page, start from 1 """ start_on = (pid-...
3628767a0923f9bf728c9445c813725730c8d20b
commonsdownloader.py
commonsdownloader.py
# -=- encoding: latin-1 -=- """Download files from Wikimedia Commons""" import os import urllib2 import logging DEFAULT_WIDTH = 100 def clean_up_filename(file_name): """Return the cleaned-up file title.""" return file_name.strip().replace(' ', '_') def make_thumb_url(image_name, width): """Return th...
Add module to download thumbnails from Commons
Add module to download thumbnails from Commons This module allows to download file thumbnails given the image name, using the module urllib2 to access the MediaWiki API thumb.php. The entry method is download_file().
Python
mit
Commonists/CommonsDownloader
Add module to download thumbnails from Commons This module allows to download file thumbnails given the image name, using the module urllib2 to access the MediaWiki API thumb.php. The entry method is download_file().
# -=- encoding: latin-1 -=- """Download files from Wikimedia Commons""" import os import urllib2 import logging DEFAULT_WIDTH = 100 def clean_up_filename(file_name): """Return the cleaned-up file title.""" return file_name.strip().replace(' ', '_') def make_thumb_url(image_name, width): """Return th...
<commit_before><commit_msg>Add module to download thumbnails from Commons This module allows to download file thumbnails given the image name, using the module urllib2 to access the MediaWiki API thumb.php. The entry method is download_file().<commit_after>
# -=- encoding: latin-1 -=- """Download files from Wikimedia Commons""" import os import urllib2 import logging DEFAULT_WIDTH = 100 def clean_up_filename(file_name): """Return the cleaned-up file title.""" return file_name.strip().replace(' ', '_') def make_thumb_url(image_name, width): """Return th...
Add module to download thumbnails from Commons This module allows to download file thumbnails given the image name, using the module urllib2 to access the MediaWiki API thumb.php. The entry method is download_file().# -=- encoding: latin-1 -=- """Download files from Wikimedia Commons""" import os import urllib2 imp...
<commit_before><commit_msg>Add module to download thumbnails from Commons This module allows to download file thumbnails given the image name, using the module urllib2 to access the MediaWiki API thumb.php. The entry method is download_file().<commit_after># -=- encoding: latin-1 -=- """Download files from Wikimedia...
0aedcaccf0d62093ec2d055bf4d72f05f8a99537
app/grandchallenge/annotations/migrations/0003_auto_20190603_1208.py
app/grandchallenge/annotations/migrations/0003_auto_20190603_1208.py
# Generated by Django 2.1.8 on 2019-06-03 12:08 import django.contrib.postgres.fields from django.db import migrations, models import grandchallenge.annotations.models class Migration(migrations.Migration): dependencies = [("annotations", "0002_auto_20190510_1046")] operations = [ migrations.AddFie...
Add migration for model changes
Add migration for model changes
Python
apache-2.0
comic/comic-django,comic/comic-django,comic/comic-django,comic/comic-django,comic/comic-django
Add migration for model changes
# Generated by Django 2.1.8 on 2019-06-03 12:08 import django.contrib.postgres.fields from django.db import migrations, models import grandchallenge.annotations.models class Migration(migrations.Migration): dependencies = [("annotations", "0002_auto_20190510_1046")] operations = [ migrations.AddFie...
<commit_before><commit_msg>Add migration for model changes<commit_after>
# Generated by Django 2.1.8 on 2019-06-03 12:08 import django.contrib.postgres.fields from django.db import migrations, models import grandchallenge.annotations.models class Migration(migrations.Migration): dependencies = [("annotations", "0002_auto_20190510_1046")] operations = [ migrations.AddFie...
Add migration for model changes# Generated by Django 2.1.8 on 2019-06-03 12:08 import django.contrib.postgres.fields from django.db import migrations, models import grandchallenge.annotations.models class Migration(migrations.Migration): dependencies = [("annotations", "0002_auto_20190510_1046")] operation...
<commit_before><commit_msg>Add migration for model changes<commit_after># Generated by Django 2.1.8 on 2019-06-03 12:08 import django.contrib.postgres.fields from django.db import migrations, models import grandchallenge.annotations.models class Migration(migrations.Migration): dependencies = [("annotations", "...
1823d4a41685111b8b70c28ab742b864f205b171
006.py
006.py
""" Project Euler Problem 6 ======================= The sum of the squares of the first ten natural numbers is, 1^2 + 2^2 + ... + 10^2 = 385 The square of the sum of the first ten natural numbers is, (1 + 2 + ... + 10)^2 = 55^2 = 3025 Hence the difference between the sum of...
Add solution and unit tests for problem 6
Add solution and unit tests for problem 6
Python
mit
BeataBak/project-euler-problems
Add solution and unit tests for problem 6
""" Project Euler Problem 6 ======================= The sum of the squares of the first ten natural numbers is, 1^2 + 2^2 + ... + 10^2 = 385 The square of the sum of the first ten natural numbers is, (1 + 2 + ... + 10)^2 = 55^2 = 3025 Hence the difference between the sum of...
<commit_before><commit_msg>Add solution and unit tests for problem 6<commit_after>
""" Project Euler Problem 6 ======================= The sum of the squares of the first ten natural numbers is, 1^2 + 2^2 + ... + 10^2 = 385 The square of the sum of the first ten natural numbers is, (1 + 2 + ... + 10)^2 = 55^2 = 3025 Hence the difference between the sum of...
Add solution and unit tests for problem 6""" Project Euler Problem 6 ======================= The sum of the squares of the first ten natural numbers is, 1^2 + 2^2 + ... + 10^2 = 385 The square of the sum of the first ten natural numbers is, (1 + 2 + ... + 10)^2 = 55^2 = 3025...
<commit_before><commit_msg>Add solution and unit tests for problem 6<commit_after>""" Project Euler Problem 6 ======================= The sum of the squares of the first ten natural numbers is, 1^2 + 2^2 + ... + 10^2 = 385 The square of the sum of the first ten natural numbers is, ...
a6dd0a8deff9da7d1c3a792a23fa2d57c24b608f
src/lineage/utils.py
src/lineage/utils.py
from multiprocessing import Pool import os class Parallelizer: def __init__(self, parallelize=True, processes=os.cpu_count()): """ Initialize a `Parallelizer`. Parameters ---------- parallelize : bool utilize multiprocessing to speedup calculations processes : ...
Add multiprocessing capability via `Parallelizer`
Add multiprocessing capability via `Parallelizer` See https://docs.python.org/3/library/multiprocessing.html
Python
mit
apriha/lineage
Add multiprocessing capability via `Parallelizer` See https://docs.python.org/3/library/multiprocessing.html
from multiprocessing import Pool import os class Parallelizer: def __init__(self, parallelize=True, processes=os.cpu_count()): """ Initialize a `Parallelizer`. Parameters ---------- parallelize : bool utilize multiprocessing to speedup calculations processes : ...
<commit_before><commit_msg>Add multiprocessing capability via `Parallelizer` See https://docs.python.org/3/library/multiprocessing.html<commit_after>
from multiprocessing import Pool import os class Parallelizer: def __init__(self, parallelize=True, processes=os.cpu_count()): """ Initialize a `Parallelizer`. Parameters ---------- parallelize : bool utilize multiprocessing to speedup calculations processes : ...
Add multiprocessing capability via `Parallelizer` See https://docs.python.org/3/library/multiprocessing.htmlfrom multiprocessing import Pool import os class Parallelizer: def __init__(self, parallelize=True, processes=os.cpu_count()): """ Initialize a `Parallelizer`. Parameters ---------...
<commit_before><commit_msg>Add multiprocessing capability via `Parallelizer` See https://docs.python.org/3/library/multiprocessing.html<commit_after>from multiprocessing import Pool import os class Parallelizer: def __init__(self, parallelize=True, processes=os.cpu_count()): """ Initialize a `Parallelize...
796cc99e9bf6d1acdd44d4820343c1c5defcae86
tests/test_recursive_reference.py
tests/test_recursive_reference.py
from mongoengine import Document, fields import unittest class MyDocument(Document): parent = fields.ReferenceField("MyDocument") class SimpleDocumentTest(unittest.TestCase): def test_document(self): MyDocument()
Add test with recursive field
Add test with recursive field
Python
bsd-3-clause
thomwiggers/django-mongodbforms
Add test with recursive field
from mongoengine import Document, fields import unittest class MyDocument(Document): parent = fields.ReferenceField("MyDocument") class SimpleDocumentTest(unittest.TestCase): def test_document(self): MyDocument()
<commit_before><commit_msg>Add test with recursive field<commit_after>
from mongoengine import Document, fields import unittest class MyDocument(Document): parent = fields.ReferenceField("MyDocument") class SimpleDocumentTest(unittest.TestCase): def test_document(self): MyDocument()
Add test with recursive fieldfrom mongoengine import Document, fields import unittest class MyDocument(Document): parent = fields.ReferenceField("MyDocument") class SimpleDocumentTest(unittest.TestCase): def test_document(self): MyDocument()
<commit_before><commit_msg>Add test with recursive field<commit_after>from mongoengine import Document, fields import unittest class MyDocument(Document): parent = fields.ReferenceField("MyDocument") class SimpleDocumentTest(unittest.TestCase): def test_document(self): MyDocument()
3044ab001215a34105db8d82e422db8c7f823536
results/migrations/0013_update_related_facts_name.py
results/migrations/0013_update_related_facts_name.py
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations, models import modelcluster.fields class Migration(migrations.Migration): dependencies = [ ('results', '0012_add_winner_model'), ] operations = [ migrations.AlterField( model_nam...
Update related facts attr name in results model
Update related facts attr name in results model
Python
unlicense
nott/next.filmfest.by,kinaklub/next.filmfest.by,nott/next.filmfest.by,kinaklub/next.filmfest.by,nott/next.filmfest.by,kinaklub/next.filmfest.by,kinaklub/next.filmfest.by,nott/next.filmfest.by
Update related facts attr name in results model
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations, models import modelcluster.fields class Migration(migrations.Migration): dependencies = [ ('results', '0012_add_winner_model'), ] operations = [ migrations.AlterField( model_nam...
<commit_before><commit_msg>Update related facts attr name in results model<commit_after>
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations, models import modelcluster.fields class Migration(migrations.Migration): dependencies = [ ('results', '0012_add_winner_model'), ] operations = [ migrations.AlterField( model_nam...
Update related facts attr name in results model# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations, models import modelcluster.fields class Migration(migrations.Migration): dependencies = [ ('results', '0012_add_winner_model'), ] operations = [ ...
<commit_before><commit_msg>Update related facts attr name in results model<commit_after># -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations, models import modelcluster.fields class Migration(migrations.Migration): dependencies = [ ('results', '0012_add_winner...
1999515136ed0fab1ce3b91f5772ca8922a9ffb2
odd.py
odd.py
def odd( number ): return number % 2 == 1 number = int( input( "Enter a number: ") ) print( "Is the number " + str( number ) + " odd? Answer: " + str( odd( number) ) )
Add the answer to the fourth question of Assignment 3
Add the answer to the fourth question of Assignment 3
Python
mit
SuyashD95/python-assignments
Add the answer to the fourth question of Assignment 3
def odd( number ): return number % 2 == 1 number = int( input( "Enter a number: ") ) print( "Is the number " + str( number ) + " odd? Answer: " + str( odd( number) ) )
<commit_before><commit_msg>Add the answer to the fourth question of Assignment 3<commit_after>
def odd( number ): return number % 2 == 1 number = int( input( "Enter a number: ") ) print( "Is the number " + str( number ) + " odd? Answer: " + str( odd( number) ) )
Add the answer to the fourth question of Assignment 3def odd( number ): return number % 2 == 1 number = int( input( "Enter a number: ") ) print( "Is the number " + str( number ) + " odd? Answer: " + str( odd( number) ) )
<commit_before><commit_msg>Add the answer to the fourth question of Assignment 3<commit_after>def odd( number ): return number % 2 == 1 number = int( input( "Enter a number: ") ) print( "Is the number " + str( number ) + " odd? Answer: " + str( odd( number) ) )
aca013f2f8c8bc4b6832c3afbe335e89f4959e17
thinglang/parser/patterns.py
thinglang/parser/patterns.py
from thinglang.common import ValueType from thinglang.lexer.symbols import LexicalGroupEnd from thinglang.lexer.symbols.arithmetic import FirstOrderLexicalBinaryOperation, SecondOrderLexicalBinaryOperation from thinglang.lexer.symbols.base import LexicalParenthesesOpen, LexicalParenthesesClose, LexicalSeparator, \ ...
Split parser pattenrs into passes to support compound returns
Split parser pattenrs into passes to support compound returns
Python
mit
ytanay/thinglang,ytanay/thinglang,ytanay/thinglang,ytanay/thinglang
Split parser pattenrs into passes to support compound returns
from thinglang.common import ValueType from thinglang.lexer.symbols import LexicalGroupEnd from thinglang.lexer.symbols.arithmetic import FirstOrderLexicalBinaryOperation, SecondOrderLexicalBinaryOperation from thinglang.lexer.symbols.base import LexicalParenthesesOpen, LexicalParenthesesClose, LexicalSeparator, \ ...
<commit_before><commit_msg>Split parser pattenrs into passes to support compound returns<commit_after>
from thinglang.common import ValueType from thinglang.lexer.symbols import LexicalGroupEnd from thinglang.lexer.symbols.arithmetic import FirstOrderLexicalBinaryOperation, SecondOrderLexicalBinaryOperation from thinglang.lexer.symbols.base import LexicalParenthesesOpen, LexicalParenthesesClose, LexicalSeparator, \ ...
Split parser pattenrs into passes to support compound returnsfrom thinglang.common import ValueType from thinglang.lexer.symbols import LexicalGroupEnd from thinglang.lexer.symbols.arithmetic import FirstOrderLexicalBinaryOperation, SecondOrderLexicalBinaryOperation from thinglang.lexer.symbols.base import LexicalParen...
<commit_before><commit_msg>Split parser pattenrs into passes to support compound returns<commit_after>from thinglang.common import ValueType from thinglang.lexer.symbols import LexicalGroupEnd from thinglang.lexer.symbols.arithmetic import FirstOrderLexicalBinaryOperation, SecondOrderLexicalBinaryOperation from thingla...