commit
stringlengths
40
40
subject
stringlengths
4
1.73k
repos
stringlengths
5
127k
old_file
stringlengths
2
751
new_file
stringlengths
2
751
new_contents
stringlengths
1
8.98k
old_contents
stringlengths
0
6.59k
license
stringclasses
13 values
lang
stringclasses
23 values
cab665bb89fde6750b9c77f4bcccfeb4d1f45572
Fix license in setup.py
jacquev6/DrawTurksHead,jacquev6/DrawTurksHead,jacquev6/DrawTurksHead
setup.py
setup.py
#!/usr/bin/env python # coding: utf8 # Copyright 2013-2015 Vincent Jacques <vincent@vincent-jacques.net> import setuptools import subprocess version = "0.2.1" def parse_pkg_config(*args): return [ s[2:] for s in subprocess.check_output(["pkg-config"] + list(args)).strip().split(" ") ...
#!/usr/bin/env python # coding: utf8 # Copyright 2013-2015 Vincent Jacques <vincent@vincent-jacques.net> import setuptools import subprocess version = "0.2.1" def parse_pkg_config(*args): return [ s[2:] for s in subprocess.check_output(["pkg-config"] + list(args)).strip().split(" ") ...
mit
Python
776e047bfcada4adc0f5c9fa9426114f6e5ca8eb
Update version
IanLewis/homepage,IanLewis/homepage,IanLewis/homepage,IanLewis/homepage,IanLewis/homepage
setup.py
setup.py
#:coding=utf-8: from distutils.core import Command from setuptools import setup, find_packages from setuptools.command.sdist import sdist class BuildStatic(Command): user_options = [] def initialize_options(self): pass def finalize_options(self): pass def run(self): # Run t...
#:coding=utf-8: from distutils.core import Command from setuptools import setup, find_packages from setuptools.command.sdist import sdist class BuildStatic(Command): user_options = [] def initialize_options(self): pass def finalize_options(self): pass def run(self): # Run t...
mit
Python
e99d31827e44458dc875e15aae831117062010c3
Bump up version
jbochi/live_thumb,jbochi/live_thumb,jbochi/live_thumb
setup.py
setup.py
from os.path import dirname, abspath, join from setuptools import setup with open(abspath(join(dirname(__file__), 'README.rst'))) as fileobj: README = fileobj.read().strip() install_reqs = [req for req in open(abspath(join(dirname(__file__), 'requirements.txt')))] setup( name='live_thumb', description='M...
from os.path import dirname, abspath, join from setuptools import setup with open(abspath(join(dirname(__file__), 'README.rst'))) as fileobj: README = fileobj.read().strip() install_reqs = [req for req in open(abspath(join(dirname(__file__), 'requirements.txt')))] setup( name='live_thumb', description='M...
mit
Python
6d76e56b1cfdbed4cb49055c0165bb6946911b01
Tweak formatting of long_description.
jmcb/python-cairo-dependencies
setup.py
setup.py
#!/usr/bin/env python from distutils.core import setup def main (): dlls = ["bin/%s" % dll for dll in ["libcairo-2.dll", "libpng14-14.dll", "zlib1.dll", "freetype6.dll", "libfontconfig-1.dll"]] licenses = ["doc/%s" % license for license in ["LICENSE-LGPL.TXT", "LICENSE-CAIRO.TXT","LICENSE-FONT...
#!/usr/bin/env python from distutils.core import setup def main (): dlls = ["bin/%s" % dll for dll in ["libcairo-2.dll", "libpng14-14.dll", "zlib1.dll", "freetype6.dll", "libfontconfig-1.dll"]] licenses = ["doc/%s" % license for license in ["LICENSE-LGPL.TXT", "LICENSE-CAIRO.TXT","LICENSE-FONT...
mit
Python
0d2ff0efacea836be7a1fbfa49c6fec0dd5fe689
Modify version string, data files to include init script
kharandziuk/carbon,deniszh/carbon,graphite-server/carbon,benburry/carbon,graphite-server/carbon,pratX/carbon,piotr1212/carbon,lyft/carbon,johnseekins/carbon,graphite-project/carbon,protochron/carbon,piotr1212/carbon,benburry/carbon,iain-buclaw-sociomantic/carbon,pu239ppy/carbon,mleinart/carbon,cbowman0/carbon,cbowman0/...
setup.py
setup.py
#!/usr/bin/env python import os from glob import glob if os.environ.get('USE_SETUPTOOLS'): from setuptools import setup setup_kwargs = dict(zip_safe=0) else: from distutils.core import setup setup_kwargs = dict() storage_dirs = [ ('storage/whisper',[]), ('storage/lists',[]), ('storage/log'...
#!/usr/bin/env python import os from glob import glob if os.environ.get('USE_SETUPTOOLS'): from setuptools import setup setup_kwargs = dict(zip_safe=0) else: from distutils.core import setup setup_kwargs = dict() storage_dirs = [ ('storage/whisper',[]), ('storage/lists',[]), ('storage/log'...
apache-2.0
Python
402ccbbeec518f1e5bcf94bfe1985f255a741f92
update version
spurin/xmldataset
setup.py
setup.py
#!/usr/bin/env python # -*- coding: utf-8 -*- import os import sys try: from setuptools import setup except ImportError: from distutils.core import setup if sys.argv[-1] == 'publish': os.system('python setup.py sdist upload') sys.exit() readme = open('README.rst').read() history = open('HISTORY.rst'...
#!/usr/bin/env python # -*- coding: utf-8 -*- import os import sys try: from setuptools import setup except ImportError: from distutils.core import setup if sys.argv[-1] == 'publish': os.system('python setup.py sdist upload') sys.exit() readme = open('README.rst').read() history = open('HISTORY.rst'...
bsd-3-clause
Python
d8e4e2e83bc3a87b88f777b30df9905afa25d205
fix readme
suenkler/PostTLS,suenkler/PostTLS
setup.py
setup.py
import os from setuptools import find_packages, setup with open(os.path.join(os.path.dirname(__file__), 'README.md')) as readme: README = readme.read() # allow setup.py to be run from any path os.chdir(os.path.normpath(os.path.join(os.path.abspath(__file__), os.pardir))) setup( name='django-posttls', ver...
import os from setuptools import find_packages, setup with open(os.path.join(os.path.dirname(__file__), 'README.md')) as readme: README = readme.read() # allow setup.py to be run from any path os.chdir(os.path.normpath(os.path.join(os.path.abspath(__file__), os.pardir))) setup( name='django-posttls', ver...
agpl-3.0
Python
741554a1406a570597d3caf52e282f867fad4f77
update lain-sdk version to replace docker-py with docker
laincloud/lain-cli
setup.py
setup.py
# -*- coding: utf-8 -*- from setuptools import setup, find_packages from lain_cli import __version__ ENTRY_POINTS = """ [console_scripts] lain = lain_cli.lain:main """ requirements = [ 'PyYAML==3.11', 'argh==0.26.1', 'humanfriendly==1.29', 'requests==2.6.0', 'tabulate==0.7.5', 'entryclient==2....
# -*- coding: utf-8 -*- from setuptools import setup, find_packages from lain_cli import __version__ ENTRY_POINTS = """ [console_scripts] lain = lain_cli.lain:main """ requirements = [ 'PyYAML==3.11', 'argh==0.26.1', 'humanfriendly==1.29', 'requests==2.6.0', 'tabulate==0.7.5', 'entryclient==2....
mit
Python
736584b8b6a7582607a52cfccb547732afe2ca5f
update version
F-Tag/python-vad
setup.py
setup.py
#!/usr/bin/env python from setuptools import setup setup_requires = [] install_requires = [ 'numpy', 'librosa', 'webrtcvad' ] tests_requires = [ 'mock', 'nose'] setup( name='pyvad', version='0.1.3', description='py-webrtcvad wrapper for trimming speech clips', long_description=...
#!/usr/bin/env python from setuptools import setup setup_requires = [] install_requires = [ 'numpy', 'librosa', 'webrtcvad' ] tests_requires = [ 'mock', 'nose'] setup( name='pyvad', version='0.1.2', description='py-webrtcvad wrapper for trimming speech clips', long_description=...
mit
Python
3cb4bf7d47f2819729bc1cfc08eb29150bd529bb
Bump version post-release
praekeltfoundation/docker-ci-deploy
setup.py
setup.py
from setuptools import setup, find_packages with open('README.md') as f: README = f.read() setup( name='docker-ci-deploy', version='0.1.3-dev', license='MIT', url='https://github.com/praekeltfoundation/docker-ci-deploy', description='Python script to help push Docker images to a registry usin...
from setuptools import setup, find_packages with open('README.md') as f: README = f.read() setup( name='docker-ci-deploy', version='0.1.2', license='MIT', url='https://github.com/praekeltfoundation/docker-ci-deploy', description='Python script to help push Docker images to a registry using ' ...
mit
Python
e38c1ba164687cac6ed99dd5cab98feb1744602e
Update version
desecho/django-tqdm,desecho/django-tqdm
setup.py
setup.py
import codecs from os.path import abspath, dirname, join from setuptools import find_packages, setup CURRENT_DIR = dirname(abspath(__file__)) def readme(): with codecs.open(join(CURRENT_DIR, 'README.rst'), encoding='utf-8') as f: return f.read() def requirements(): with open(join(CURRENT_DIR, 'req...
import codecs from os.path import abspath, dirname, join from setuptools import find_packages, setup CURRENT_DIR = dirname(abspath(__file__)) def readme(): with codecs.open(join(CURRENT_DIR, 'README.rst'), encoding='utf-8') as f: return f.read() def requirements(): with open(join(CURRENT_DIR, 'req...
mit
Python
a12240fb70a5d8d4847466076efe158343d0dbd2
Remove Python 3.3 classifier.
zsiciarz/django-envelope,zsiciarz/django-envelope
setup.py
setup.py
import os from setuptools import setup, find_packages def read(fname): return open(os.path.join(os.path.dirname(__file__), fname)).read() setup( name='django-envelope', version=__import__('envelope').__version__, description='A contact form app for Django', long_description=read('README.rst'), ...
import os from setuptools import setup, find_packages def read(fname): return open(os.path.join(os.path.dirname(__file__), fname)).read() setup( name='django-envelope', version=__import__('envelope').__version__, description='A contact form app for Django', long_description=read('README.rst'), ...
mit
Python
010b209090ce31de1f20b60e641fd6b4296f834c
Use keys instead of iterkeys to go through all keys on clean_query_set
magnet-cl/django-project-template-py3,magnet-cl/django-project-template-py3,Angoreher/xcero,Angoreher/xcero,Angoreher/xcero,magnet-cl/django-project-template-py3,Angoreher/xcero,magnet-cl/django-project-template-py3
base/view_utils.py
base/view_utils.py
# django from django.core.paginator import Paginator, EmptyPage, PageNotAnInteger # standard library def paginate(request, objects, page_size=25): paginator = Paginator(objects, page_size) page = request.GET.get('p') try: paginated_objects = paginator.page(page) except PageNotAnInteger: ...
# django from django.core.paginator import Paginator, EmptyPage, PageNotAnInteger # standard library def paginate(request, objects, page_size=25): paginator = Paginator(objects, page_size) page = request.GET.get('p') try: paginated_objects = paginator.page(page) except PageNotAnInteger: ...
mit
Python
d19c0fe0a72c0a66e20457715858f1ec879136af
add book-getting to test
fohristiwhirl/disorderCook,fohristiwhirl/disorderCook,fohristiwhirl/disorderBook_Prime,fohristiwhirl/disorderBook_Prime
mass_order_test.py
mass_order_test.py
import random import subprocess import time TEST_TIME = 10 proc = subprocess.Popen(['./disorderCook.exe', "SELLEX", "CATS"], shell = False, stdin = subprocess.PIPE, stdout = subprocess.PIPE) def get_response_from_process(proc, message): # MUST MATCH THE REAL THING IN THE FRONTEND, ELSE DEADLOCK assert(isin...
import random import subprocess import time TEST_TIME = 10 proc = subprocess.Popen(['./disorderCook.exe', "SELLEX", "CATS"], shell = False, stdin = subprocess.PIPE, stdout = subprocess.PIPE) def get_response_from_process(proc, message): # MUST MATCH THE REAL THING IN THE FRONTEND, ELSE DEADLOCK assert(isin...
bsd-2-clause
Python
6880342dfbe3d900a4f1a699346e3c6a07b109d8
Make it easier to disable (comment out) ScaLAPACK
mlouhivu/gpaw-accelerator-benchmarks,mlouhivu/gpaw-accelerator-benchmarks
copper-filament/input.py
copper-filament/input.py
### ### GPAW benchmark: Copper Filament ### from __future__ import print_function from gpaw.mpi import size, rank from gpaw import GPAW, Mixer, ConvergenceError from gpaw.occupations import FermiDirac from ase.lattice.cubic import FaceCenteredCubic try: from gpaw.eigensolvers.rmm_diis import RMM_DIIS except Import...
### ### GPAW benchmark: Copper Filament ### from __future__ import print_function from gpaw.mpi import size, rank from gpaw import GPAW, Mixer, ConvergenceError from gpaw.occupations import FermiDirac from ase.lattice.cubic import FaceCenteredCubic try: from gpaw.eigensolvers.rmm_diis import RMM_DIIS except Import...
mit
Python
75cd4944cb4990059912fb3b18f16ce353ae6e06
Fix kytos users documentation
kytos/kytos-utils
kytos/cli/commands/users/parser.py
kytos/cli/commands/users/parser.py
"""kytos - The kytos command line. You are at the "users" command. Usage: kytos users register kytos users -h | --help Options: -h, --help Show this screen. Common user subcommands: register Register a new user to upload napps to Napps Server. """ import sys from docopt import docopt...
"""kytos - The kytos command line. You are at the "users" command. Usage: kytos users register kytos users -h | --help Options: -h, --help Show this screen. Common user subcommands: create Register a new user to upload napps to Napps Server. """ import sys from docopt import docopt ...
mit
Python
6c8fafa29f5085fb8be5edf13cf52e10bcb717ac
bump version
amplifylitco/asiaq,amplifylitco/asiaq,amplifylitco/asiaq
disco_aws_automation/version.py
disco_aws_automation/version.py
"""Place of record for the package version""" __version__ = "1.0.120" __rpm_version__ = "WILL_BE_SET_BY_RPM_BUILD" __git_hash__ = "WILL_BE_SET_BY_EGG_BUILD"
"""Place of record for the package version""" __version__ = "1.0.119" __rpm_version__ = "WILL_BE_SET_BY_RPM_BUILD" __git_hash__ = "WILL_BE_SET_BY_EGG_BUILD"
bsd-2-clause
Python
ccfe6b06bb838744109b818003888e366c6e3f15
set places by keyword for py3k
swn1/pyzmq,caidongyun/pyzmq,dash-dash/pyzmq,yyt030/pyzmq,yyt030/pyzmq,swn1/pyzmq,ArvinPan/pyzmq,ArvinPan/pyzmq,Mustard-Systems-Ltd/pyzmq,Mustard-Systems-Ltd/pyzmq,dash-dash/pyzmq,swn1/pyzmq,caidongyun/pyzmq,dash-dash/pyzmq,caidongyun/pyzmq,yyt030/pyzmq,ArvinPan/pyzmq,Mustard-Systems-Ltd/pyzmq
zmq/tests/test_stopwatch.py
zmq/tests/test_stopwatch.py
#!/usr/bin/env python # -*- coding: utf8 -*- # # Copyright (c) 2011 Min Ragan-Kelley # # This file is part of pyzmq. # # pyzmq is free software; you can redistribute it and/or modify it under # the terms of the Lesser GNU General Public License as published by # the Free Software Foundation; either versi...
#!/usr/bin/env python # -*- coding: utf8 -*- # # Copyright (c) 2011 Min Ragan-Kelley # # This file is part of pyzmq. # # pyzmq is free software; you can redistribute it and/or modify it under # the terms of the Lesser GNU General Public License as published by # the Free Software Foundation; either versi...
bsd-3-clause
Python
346ddf5e26351fe1fadbed1bf06482565080a728
Add pop method on Stack class
jwarren116/data-structures-deux
stack.py
stack.py
#!/usr/bin/env python '''Implementation of a simple stack data structure. The stack has push, pop, and peek methods. Items in the stack have a value, and next_item attribute. The stack has a top attribute. ''' class Item(object): def __init__(self, value, next_item=None): self.value = value self....
#!/usr/bin/env python '''Implementation of a simple stack data structure. The stack has push, pop, and peek methods. Items in the stack have a value, and next_item attribute. The stack has a top attribute. ''' class Item(object): def __init__(self, value, next_item=None): self.value = value self....
mit
Python
b78ddc568a6854893b675b70b28252f130d1cbd0
bump version
jepegit/cellpy,jepegit/cellpy
cellpy/_version.py
cellpy/_version.py
version_info = (0, 3, 0, "rc3") __version__ = '.'.join(map(str, version_info))
version_info = (0, 3, 0, "rc2") __version__ = '.'.join(map(str, version_info))
mit
Python
8ffb33662dade7d0cf49c428e7e578e32473c2c1
add docstrings and comments to stack module.
constanthatz/data-structures
stack.py
stack.py
#!/usr/bin/env python from __future__ import print_function from __future__ import unicode_literals class Element(object): ''' Create data element with default value and previous pointer. ''' def __init__(self, value=None, previous=None): ''' Value and previous pointer default to none. ''' sel...
#!/usr/bin/env python from __future__ import print_function from __future__ import unicode_literals class Element(object): def __init__(self, value=None, previous=None): self.val = value self.previous = previous class Stack(object): def __init__(self): self.top = None def push...
mit
Python
0d475a69ca53eee62aeb39f35b3d3a8f875d5e71
Change to get test to pass.
jeffrimko/Qprompt
tests/menu_test_5.py
tests/menu_test_5.py
"""Tests the menu features.""" ##==============================================================# ## SECTION: Imports # ##==============================================================# from testlib import * from qprompt import enum_menu ##=================================...
"""Tests the menu features.""" ##==============================================================# ## SECTION: Imports # ##==============================================================# from testlib import * from qprompt import enum_menu ##=================================...
mit
Python
881dd3552b3450b46b2e0d11aba28f039ddf7624
bump version
Censys/censys-python
censys/__init__.py
censys/__init__.py
__author__ = "Censys Team" __email__ = "support@censys.io" __copyright__ = "Copyright 2020 Censys, Inc." __version__ = "1.0.0" __license__ = "Apache License, Version 2.0" __all__ = ["certificates", "ipv4", "websites"]
__author__ = "Censys Team" __email__ = "support@censys.io" __copyright__ = "Copyright 2020 Censys, Inc." __version__ = "0.2.0" __license__ = "Apache License, Version 2.0" __all__ = ["certificates", "ipv4", "websites"]
apache-2.0
Python
d7089c63ca5ba7b61f176b18242c0ede61879f0f
Update activate-devices.py
JeffreyPowell/pi-heating-hub,JeffreyPowell/pi-heating-hub,JeffreyPowell/pi-heating-hub
cron/activate-devices.py
cron/activate-devices.py
#!/usr/bin/env python import MySQLdb #import datetime #import urllib2 #import os import datetime import RPi.GPIO as GPIO try: import RPi.GPIO as GPIO except RuntimeError: print("Error importing RPi.GPIO!") servername = "localhost" username = "pi" password = "password" dbname = "pi_heating_db" cnx = MySQLdb....
#!/usr/bin/env python import MySQLdb #import datetime #import urllib2 #import os import datetime import RPi.GPIO as GPIO try: import RPi.GPIO as GPIO except RuntimeError: print("Error importing RPi.GPIO!") servername = "localhost" username = "pi" password = "password" dbname = "pi_heating_db" cnx = MySQLdb....
apache-2.0
Python
ab41fe934ce241a4dbe5f73f648858f6f9351d5c
Fix TEMPLATES warning on Django 1.9
incuna/incuna-test-utils,incuna/incuna-test-utils
tests/settings.py
tests/settings.py
import dj_database_url DATABASES = { 'default': dj_database_url.config( default='postgres://localhost/test_utils', ), } INSTALLED_APPS = ( 'incuna_test_utils', 'tests', 'feincms.module.page', 'django.contrib.admin', 'django.contrib.auth', 'django.contrib.contenttypes', '...
import dj_database_url DATABASES = { 'default': dj_database_url.config( default='postgres://localhost/test_utils', ), } INSTALLED_APPS = ( 'incuna_test_utils', 'tests', 'feincms.module.page', 'django.contrib.admin', 'django.contrib.auth', 'django.contrib.contenttypes', '...
bsd-2-clause
Python
0e64c870e86f9ac33ad19885f19cb0ab752a303d
Add TEMPLATES variable to tests settings.py. To work on Django 1.10
ChristopherRabotin/bungiesearch,Sparrho/bungiesearch,ChristopherRabotin/bungiesearch,Sparrho/bungiesearch
tests/settings.py
tests/settings.py
import os import sys DEBUG = True BASE_DIR = os.path.dirname(os.path.dirname(__file__)) SECRET_KEY = 'cookies_are_delicious_delicacies' ROOT_URLCONF = 'urls' LANGUAGE_CODE = 'en-us' TIME_ZONE = 'UTC' USE_I18N = True USE_L10N = True USE_TZ = True MIDDLEWARE_CLASSES = () DEFAULT_INDEX_TABLESPACE = '' # Make sure the co...
import os import sys DEBUG = True BASE_DIR = os.path.dirname(os.path.dirname(__file__)) SECRET_KEY = 'cookies_are_delicious_delicacies' ROOT_URLCONF = 'urls' LANGUAGE_CODE = 'en-us' TIME_ZONE = 'UTC' USE_I18N = True USE_L10N = True USE_TZ = True MIDDLEWARE_CLASSES = () DEFAULT_INDEX_TABLESPACE = '' # Make sure the co...
bsd-3-clause
Python
f3cd06721efaf3045d09f2d3c2c067e01b27953a
Sort tests, to verify they are complete
SOM-st/PySOM,SOM-st/RPySOM,SOM-st/RTruffleSOM,SOM-st/RPySOM,smarr/PySOM,smarr/PySOM,smarr/RTruffleSOM,SOM-st/RTruffleSOM,smarr/RTruffleSOM,SOM-st/PySOM
tests/som_test.py
tests/som_test.py
import unittest from parameterized import parameterized from som.vm.universe import Universe class SomTest(unittest.TestCase): @parameterized.expand([ ("Array" ,), ("Block" ,), ("ClassLoading" ,), ("ClassStructure",), ("Closure" ,), ("Coercio...
import unittest from parameterized import parameterized from som.vm.universe import Universe class SomTest(unittest.TestCase): @parameterized.expand([ ("ClassStructure",), ("Array" ,), ("Block" ,), ("ClassLoading" ,), ("Closure" ,), ("Coercio...
mit
Python
9a6a5b7c8a6d75c855eb6c774749b5405aab05d4
bump version to 0.9.44
craigahobbs/chisel
chisel/__init__.py
chisel/__init__.py
# # Copyright (C) 2012-2016 Craig Hobbs # # 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, ...
# # Copyright (C) 2012-2016 Craig Hobbs # # 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, ...
mit
Python
4f3f738d7fc4b1728c74d6ffc7bf3064ce969520
Test to ensure all samplers and analyzers have required functions
willu47/SALib,willu47/SALib,jdherman/SALib,jdherman/SALib,SALib/SALib
tests/test_cli.py
tests/test_cli.py
import subprocess import importlib from SALib.util import avail_approaches def test_cli_usage(): cmd = ["salib"] out = subprocess.check_output(cmd, shell=True, stderr=subprocess.STDOUT) out = out.decode() assert len(out) > 0 and "usage" in out.lower(), \ "Incorrect message returned from utilit...
import subprocess def test_cli_usage(): cmd = ["salib"] out = subprocess.check_output(cmd, shell=True, stderr=subprocess.STDOUT) out = out.decode() assert len(out) > 0 and "usage" in out.lower(), \ "Incorrect message returned from utility" def test_cli_setup(): cmd = ["salib", "sample", ...
mit
Python
203da5cf88c27ab310fc0586470f963de7664e74
Add first working test
origingod/hug,janusnic/hug,MuhammadAlkarouri/hug,STANAPO/hug,gbn972/hug,jean/hug,giserh/hug,giserh/hug,alisaifee/hug,jean/hug,alisaifee/hug,janusnic/hug,timothycrosley/hug,MuhammadAlkarouri/hug,MuhammadAlkarouri/hug,shaunstanislaus/hug,timothycrosley/hug,philiptzou/hug,gbn972/hug,timothycrosley/hug,yasoob/hug,STANAPO/h...
tests/test_hug.py
tests/test_hug.py
"""test_hug.py. Tests all major functionality of the Hug framework Copyright (C) 2013 Timothy Edmund Crosley 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 witho...
"""test_hug.py. Tests all major functionality of the Hug framework Copyright (C) 2013 Timothy Edmund Crosley 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 witho...
mit
Python
250a5f7bdf52a692f6557f08eed8d07320f0ab15
change test_knn to use spect_params from hvc.parse.ref_spect_params
NickleDave/hybrid-vocal-classifier
tests/test_knn.py
tests/test_knn.py
""" tests knn module """ # from standard library import glob # from dependencies import yaml import pytest import hvc.audiofileIO from hvc.features import knn from hvc.parse.ref_spect_params import refs_dict with open('../hvc/parse/feature_groups.yml') as ftr_grp_yaml: valid_feature_groups_dict = yaml.load(ftr_...
""" tests knn module """ # from standard library import glob # from dependencies import yaml import pytest import hvc.audiofileIO from hvc.features import knn with open('../hvc/parse/feature_groups.yml') as ftr_grp_yaml: valid_feature_groups_dict = yaml.load(ftr_grp_yaml) class TestKNN: """ unit tests ...
bsd-3-clause
Python
4120252f0f3b718e34b44aa2dffa7118a6a42881
set AUTOSYNTH_MULTIPLE_COMMITS=true for context aware commits (#387)
googleapis/release-please,googleapis/release-please,googleapis/release-please,googleapis/release-please,googleapis/release-please,googleapis/release-please,googleapis/release-please
synth.py
synth.py
import synthtool as s import synthtool.gcp as gcp import logging logging.basicConfig(level=logging.DEBUG) AUTOSYNTH_MULTIPLE_COMMITS = True common_templates = gcp.CommonTemplates() templates = common_templates.node_library() s.copy(templates, excludes=[ '.eslintignore', '.eslintrc.yml', '.prettierignore', '.p...
import synthtool as s import synthtool.gcp as gcp import logging logging.basicConfig(level=logging.DEBUG) common_templates = gcp.CommonTemplates() templates = common_templates.node_library() s.copy(templates, excludes=[ '.eslintignore', '.eslintrc.yml', '.prettierignore', '.prettierrc', '.nycrc', '.kokoro/p...
apache-2.0
Python
8d9db204dc775d25f1da7086465c986271e5956c
Add a stricter replacement for serviceAddress (#2243)
googleapis/google-cloud-php-security-center,googleapis/google-cloud-php-security-center
synth.py
synth.py
# Copyright 2019 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, s...
# Copyright 2019 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, s...
apache-2.0
Python
d1855bea0492d9668c865c7442d94e19bf30cc7f
set AUTOSYNTH_MULTIPLE_COMMITS=true for context aware commits (#487)
googleapis/nodejs-translate,googleapis/nodejs-translate
synth.py
synth.py
# Copyright 2018 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, s...
# Copyright 2018 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, s...
apache-2.0
Python
7727ee0c96acdd017ad549e5d711315377165fbf
enable context aware commits (#10)
googleapis/java-securitycenter-settings,googleapis/java-securitycenter-settings,googleapis/java-securitycenter-settings
synth.py
synth.py
# Copyright 2020 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, s...
# Copyright 2020 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, s...
apache-2.0
Python
0d4d2c20b131269e532436da0bf6cdabc7d398e8
Migrate python-speech synth.py from artman to bazel (#21)
googleapis/python-speech,googleapis/python-speech
synth.py
synth.py
# Copyright 2019 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, s...
# Copyright 2019 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, s...
apache-2.0
Python
d8d74c714e7385533148c8e9f890153374ef4f87
Migrate python-trace synth.py from artman to bazel (#14)
googleapis/python-trace,googleapis/python-trace
synth.py
synth.py
# Copyright 2018 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, s...
# Copyright 2018 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, s...
apache-2.0
Python
48bccf88271b9941422acd7a3bd62f59a4a4223d
use python build module
keurfonluu/StochOPy
tasks.py
tasks.py
import glob import os import shutil from invoke import task import stochopy @task def build(c): shutil.rmtree("dist", ignore_errors=True) c.run("python -m build --sdist --wheel .") @task def tag(c): c.run("git tag v{}".format(stochopy.__version__)) c.run("git push --tags") @task def upload(c): ...
import glob import os import shutil from invoke import task import stochopy @task def build(c): shutil.rmtree("dist", ignore_errors=True) c.run("python -m pep517.build --source --binary .") @task def tag(c): c.run("git tag v{}".format(stochopy.__version__)) c.run("git push --tags") @task def upl...
mit
Python
df9acf57ab0f2939a288339cd0f0b2fef1d1e9ad
Update mixins.py
dpgaspar/Flask-AppBuilder,dpgaspar/Flask-AppBuilder,zhounanshu/Flask-AppBuilder,dpgaspar/Flask-AppBuilder,dpgaspar/Flask-AppBuilder,zhounanshu/Flask-AppBuilder,qpxu007/Flask-AppBuilder,rpiotti/Flask-AppBuilder,zhounanshu/Flask-AppBuilder,rpiotti/Flask-AppBuilder,qpxu007/Flask-AppBuilder,qpxu007/Flask-AppBuilder,rpiotti...
flask_appbuilder/models/mixins.py
flask_appbuilder/models/mixins.py
from sqlalchemy.ext.declarative import declared_attr from sqlalchemy import Table, Column, Integer, String, MetaData, ForeignKey, DateTime import sqlalchemy.types as types from sqlalchemy.types import String from flask import g import uuid import datetime #try: # from app import db #except ImportError: # raise E...
from sqlalchemy.ext.declarative import declared_attr from sqlalchemy import Table, Column, Integer, String, MetaData, ForeignKey, DateTime import sqlalchemy.types as types from sqlalchemy.types import String from flask import g import uuid import datetime try: from app import db except ImportError: raise Excep...
bsd-3-clause
Python
89397b7a97c46d9a61642f699e6d0a1fda1a2d92
Update version
coinbase/coinbase-python
coinbase/wallet/__init__.py
coinbase/wallet/__init__.py
# coding: utf-8 __version__ = '2.0.2'
# coding: utf-8 __version__ = '2.0.1'
apache-2.0
Python
658fa530c888eb31b28d5937592fb94d503902fb
Allow rechttp prefix for source field.
AllMyChanges/allmychanges.com,AllMyChanges/allmychanges.com,AllMyChanges/allmychanges.com,AllMyChanges/allmychanges.com
allmychanges/validators.py
allmychanges/validators.py
import re from django.core import validators class URLValidator(validators.URLValidator): """Custom url validator to include git urls and urls with http+ like prefixes """ regex = re.compile( r'^(?:(?:(?:(?:http|git|hg|rechttp)\+)?' # optional http+ or git+ or hg+ r'(?:http|ftp|)s?|git...
import re from django.core import validators class URLValidator(validators.URLValidator): """Custom url validator to include git urls and urls with http+ like prefixes """ regex = re.compile( r'^(?:(?:(?:(?:http|git|hg)\+)?' # optional http+ or git+ or hg+ r'(?:http|ftp|)s?|git)://|git...
bsd-2-clause
Python
ed190c26cb3f0e266f0864c5a207728fe446394b
Add FIXME to re: correspondece.py
bodylabs/blmath,bodylabs/blmath,bodylabs/blmath
blmath/geometry/transform/correspondence.py
blmath/geometry/transform/correspondence.py
# FIXME -- move back to core def apply_correspondence(correspondence_src, correspondence_dst, vertices): """ Apply a correspondence defined between two vertex sets to a new set. Identifies a correspondence between `correspondence_src` and `correspondence_dst` then applies that correspondence to `verti...
def apply_correspondence(correspondence_src, correspondence_dst, vertices): """ Apply a correspondence defined between two vertex sets to a new set. Identifies a correspondence between `correspondence_src` and `correspondence_dst` then applies that correspondence to `vertices`. That is, `correspond...
bsd-2-clause
Python
cb5402c0af815e98951a394bb369a283ff5e280c
Fix invocation of Test1.3.
Renelvon/matasano
test4.py
test4.py
import unittest import test3 def solve(): with open("data4.txt", "r") as f: best_msg, best_score, the_decoder = None, 0, None for msg in f: dec_msg, score, decoder = test3.solve(msg.rstrip()) if score > best_score: best_msg, best_score, the_decoder = dec_ms...
import unittest import test3 def solve(): with open("data4.txt", "r") as f: best_score, the_decoder, best_msg = 0, None, None for msg in f: dec_msg, decoder, score = test3.solve(msg.rstrip()) if score > best_score: best_score, the_decoder, best_msg = score,...
mit
Python
ace38e69c66a5957a155091fbd3c746952f982fc
Rename test to be more fitting
banjocat/alexa-tivix-members
tests.py
tests.py
from scraper.tivix import get_list_of_tivix_members from scraper.tivix import get_random_tivix_member_bio def test_get_all_tivix_members(): members = get_list_of_tivix_members() assert members assert '/team-members/jack-muratore/' in members assert '/team-members/kyle-connors/' in members assert '...
from scraper.tivix import get_list_of_tivix_members from scraper.tivix import get_random_tivix_member_bio def test_get_all_tivix_members(): members = get_list_of_tivix_members() assert members assert '/team-members/jack-muratore/' in members assert '/team-members/kyle-connors/' in members assert '...
mit
Python
84c1517b7873028743a8840d53cd4a3881055c5a
change config path in tiles application
tomass/vector-map,openmaplt/vector-map
tiles.py
tiles.py
from os import environ import TileStache # read config file or URL from environment, defaults to tiles.cfg application = TileStache.WSGITileServer('/home/osm/tiles.cfg')
from os import environ import TileStache # read config file or URL from environment, defaults to tiles.cfg application = TileStache.WSGITileServer('tiles.cfg')
mit
Python
b783a9b7094cfc529bd663d161fa74b0e04923ac
update help info
ljwsummer/plus,ljwsummer/plus
train.py
train.py
#!/usr/bin/python # -*-coding:utf-8-*- import sys import subprocess import os import ConfigParser import optparse def train(model, config_file, optparser): config = ConfigParser.ConfigParser() config.optionxform = str config.read(config_file) options = config.items(model) cmds = [] for name, value in o...
#!/usr/bin/python # -*-coding:utf-8-*- import sys import subprocess import os import ConfigParser import optparse def train(model, config_file, optparser): config = ConfigParser.ConfigParser() config.optionxform = str config.read(config_file) options = config.items(model) cmds = [] for name, value in o...
mit
Python
f1fecac294824fa625ccf8db2d5021af2417b94f
Bump up dev version to 4.4.4.dev0
liulion/mayavi,liulion/mayavi,alexandreleroux/mayavi,dmsurti/mayavi,dmsurti/mayavi,alexandreleroux/mayavi
mayavi/__init__.py
mayavi/__init__.py
# Author: Prabhu Ramachandran, Gael Varoquaux # Copyright (c) 2004-2014, Enthought, Inc. # License: BSD Style. """ A tool for easy and interactive visualization of data. Part of the Mayavi project of the Enthought Tool Suite. """ __version__ = '4.4.4.dev0' __requires__ = [ 'apptools', 'traits', 'trait...
# Author: Prabhu Ramachandran, Gael Varoquaux # Copyright (c) 2004-2014, Enthought, Inc. # License: BSD Style. """ A tool for easy and interactive visualization of data. Part of the Mayavi project of the Enthought Tool Suite. """ __version__ = '4.4.3' __requires__ = [ 'apptools', 'traits', 'traitsui',...
bsd-3-clause
Python
70d39ce04e0dcedc1916436f4e1654ba5db5f83f
Print total number of items loaded
martinpitt/cockpit,deryni/cockpit,garrett/cockpit,deryni/cockpit,cockpituous/cockpit,SotolitoLabs/cockpit,deryni/cockpit,martinpitt/cockpit,mareklibra/cockpit,deryni/cockpit,martinpitt/cockpit,mareklibra/cockpit,garrett/cockpit,cockpituous/cockpit,deryni/cockpit,andreasn/cockpit,mvollmer/cockpit,stefwalter/cockpit,cock...
bots/learn/data.py
bots/learn/data.py
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # This file is part of Cockpit. # # Copyright (C) 2017 Slavek Kabrda # # Cockpit is free software; you can redistribute it and/or modify it # under the terms of the GNU Lesser General Public License as published by # the Free Software Foundation; either version 2.1 of the...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # This file is part of Cockpit. # # Copyright (C) 2017 Slavek Kabrda # # Cockpit is free software; you can redistribute it and/or modify it # under the terms of the GNU Lesser General Public License as published by # the Free Software Foundation; either version 2.1 of the...
lgpl-2.1
Python
00ca2e150a4c96f397e408056220b0b7208724f2
raise minor version
xiezhen/brilws,xiezhen/brilws
brilws/_version.py
brilws/_version.py
__version__ = "0.8.5"
__version__ = "0.8.4"
mit
Python
2df000192adc6a7fc364ebc668c8c45522019323
Rename root view
chop-dbhi/biorepo-portal,chop-dbhi/biorepo-portal,chop-dbhi/biorepo-portal,chop-dbhi/biorepo-portal
brp/portal/urls.py
brp/portal/urls.py
from django.conf.urls import url, patterns, include dataentry_patterns = patterns( 'portal.views', url(r'^protocol/(?P<protocol_id>\d+)/$', 'subject_select'), url(r'^protocol/(?P<protocol_id>\d+)/newsubject/$', 'new_subject'), url(r'^protocol/(?P<protocol_id>\d+)/editsubject/(?P<subject_ehb_id>\w+)/$',...
from django.conf.urls import url, patterns, include dataentry_patterns = patterns( 'portal.views', url(r'^protocol/(?P<protocol_id>\d+)/$', 'subject_select'), url(r'^protocol/(?P<protocol_id>\d+)/newsubject/$', 'new_subject'), url(r'^protocol/(?P<protocol_id>\d+)/editsubject/(?P<subject_ehb_id>\w+)/$',...
bsd-2-clause
Python
bcb1e84dc43f70b00a6838c8f131c281a887c855
Validate graymid inputs from FreeSurferSource
oesteban/fmriprep,poldracklab/preprocessing-workflow,poldracklab/fmriprep,oesteban/preprocessing-workflow,oesteban/fmriprep,poldracklab/preprocessing-workflow,poldracklab/fmriprep,oesteban/fmriprep,oesteban/preprocessing-workflow,poldracklab/fmriprep
fmriprep/interfaces/freesurfer.py
fmriprep/interfaces/freesurfer.py
#!/usr/bin/env python # -*- coding: utf-8 -*- # emacs: -*- mode: python; py-indent-offset: 4; indent-tabs-mode: nil -*- # vi: set ft=python sts=4 ts=4 sw=4 et: """ FreeSurfer tools interfaces ~~~~~~~~~~~~~~~~~~~~~~~~~~~ """ from __future__ import print_function, division, absolute_import, unicode_literals from nipype...
#!/usr/bin/env python # -*- coding: utf-8 -*- # emacs: -*- mode: python; py-indent-offset: 4; indent-tabs-mode: nil -*- # vi: set ft=python sts=4 ts=4 sw=4 et: """ FreeSurfer tools interfaces ~~~~~~~~~~~~~~~~~~~~~~~~~~~ """ from __future__ import print_function, division, absolute_import, unicode_literals from nipype...
bsd-3-clause
Python
f616118e397765b6c12512b938c43181a8009121
raise exception for south/django pre 1.7 ( #15 )
benzkji/django-folderless,benzkji/django-folderless,benzkji/django-folderless,benzkji/django-folderless
folderless/migrations/__init__.py
folderless/migrations/__init__.py
""" Django migrations for folderless This package does not contain South migrations. South migrations can be found in the ``south_migrations`` package. django 1.6 to 1.7: http://treyhunner.com/2014/03/migrating-to-django-1-dot-7/ """ SOUTH_ERROR_MESSAGE = """\n For South support, customize the SOUTH_MIGRATION_MODU...
""" Django migrations for email_log app This package does not contain South migrations. South migrations can be found in the ``south_migrations`` package. """ SOUTH_ERROR_MESSAGE = """\n For South support, customize the SOUTH_MIGRATION_MODULES setting like so: SOUTH_MIGRATION_MODULES = { 'email_log': 'e...
mit
Python
32e5614216e64396aaa58b21c0ec1d984a11aa29
Bump to 0.5.0
alexandriagroup/fnapy,alexandriagroup/fnapy
fnapy/__init__.py
fnapy/__init__.py
__version__ = '0.5.0'
__version__ = '0.4.3'
mit
Python
eba4426618e986e399169c1497b7d1f9b999461a
Add data sanity checking to summarize
guoyiteng/braid,cucapra/braid,guoyiteng/braid,guoyiteng/braid,cucapra/braid,cucapra/braid,guoyiteng/braid,guoyiteng/braid,cucapra/braid,cucapra/braid,cucapra/braid,guoyiteng/braid
harness/summarize.py
harness/summarize.py
#!/usr/bin/env python3 import os import json import uncertain import sys TIMINGS_DIR = 'collected' def mean_latency(data): """Get the average frame latency from a benchmark run. """ msgs = data['messages'][1:] # Skip the first message as a "warmup." all_latencies = [] all_draw_latencies = [] ...
#!/usr/bin/env python3 import os import json import uncertain import sys TIMINGS_DIR = 'collected' def mean_latency(data): """Get the average frame latency from a benchmark run. """ msgs = data['messages'][1:] # Skip the first message as a "warmup." all_latencies = [] all_draw_latencies = [] ...
mit
Python
afde10edece03e2deae4663bf8891ff146d46f4b
Remove debug statement
breakbase/flask-cent
flask_cent.py
flask_cent.py
__version_info__ = ('0', '1', '0') __version__ = '.'.join(__version_info__) __author__ = "BreakBase.com" __license__ = 'MIT' __copyright__ = "(c) 2015 by BreakBase.com" import blinker import logging from cent.core import Client as CentCoreClient from flask import current_app, _app_ctx_stack as stack from contextlib ...
__version_info__ = ('0', '1', '0') __version__ = '.'.join(__version_info__) __author__ = "BreakBase.com" __license__ = 'MIT' __copyright__ = "(c) 2015 by BreakBase.com" import blinker import logging from cent.core import Client as CentCoreClient from flask import current_app, _app_ctx_stack as stack from contextlib ...
mit
Python
b2acfaa87cf1cb557b2dea46778da38498782bd2
テスト : テスト時の設定読み込み変更
ayziao/niascape,ayziao/niascape,ayziao/niascape,ayziao/niascape
tests/test_action.py
tests/test_action.py
import unittest from unittest import mock import niascape from niascape import action from niascape.entity import basedata class Dummy: def __init__(self, dummy): self.dummy = dummy def _asdict(self): return self.dummy class TestAction(unittest.TestCase): def test_top(self): ret = action.top({}) self.a...
import unittest from unittest import mock from niascape import action from niascape.entity import basedata class Dummy: def __init__(self, dummy): self.dummy = dummy def _asdict(self): return self.dummy class TestAction(unittest.TestCase): def test_top(self): ret = action.top({}) self.assertEqual('top'...
mit
Python
c076774912a058edc7618dccde17829345075566
Remove the util import from the forms package once it's finished with.
emgee/formal,emgee/formal,emgee/formal
forms/__init__.py
forms/__init__.py
"""A package (for Nevow) for defining the schema, validation and rendering of HTML forms. """ version_info = (0, 6, 2) version = '.'.join([str(i) for i in version_info]) from nevow import static from forms.types import * from forms.validation import * from forms.widget import * from forms.widgets.restwidget import ...
"""A package (for Nevow) for defining the schema, validation and rendering of HTML forms. """ version_info = (0, 6, 2) version = '.'.join([str(i) for i in version_info]) from nevow import static from forms.types import * from forms.validation import * from forms.widget import * from forms.widgets.restwidget import ...
mit
Python
380f2c5a563dfa1dd9676ada5f4dc9d006d175ff
Replace custom query on user model to find a user with call to the user service's existing function
m-ober/byceps,homeworkprod/byceps,m-ober/byceps,m-ober/byceps,homeworkprod/byceps,homeworkprod/byceps
byceps/blueprints/authentication/session.py
byceps/blueprints/authentication/session.py
# -*- coding: utf-8 -*- """ byceps.blueprints.authentication.session ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :Copyright: 2006-2016 Jochen Kupperschmidt :License: Modified BSD, see LICENSE for details. """ from flask import session from ..user.models.user import AnonymousUser from ..user import service as user_serv...
# -*- coding: utf-8 -*- """ byceps.blueprints.authentication.session ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :Copyright: 2006-2016 Jochen Kupperschmidt :License: Modified BSD, see LICENSE for details. """ from flask import session from ..user.models.user import AnonymousUser, User KEY_USER_ID = 'user_id' KEY_USE...
bsd-3-clause
Python
df24f3830fb0362c8cfe5ab0d16803a1a940bc1e
adjust for python3
eplaut/python-butler
tests/test_client.py
tests/test_client.py
import slash import requests from .fixtures import run_server def test_client_sanity(run_server): r = run_server.client.get_test_get() assert r.status_code == 200 with slash.assert_raises(AttributeError): r = run_server.client.get_no_such_view() def test_client_method(run_server): r = run_s...
import slash import requests from .fixtures import run_server def test_client_sanity(run_server): r = run_server.client.get_test_get() assert r.status_code == 200 with slash.assert_raises(AttributeError): r = run_server.client.get_no_such_view() def test_client_method(run_server): r = run_s...
apache-2.0
Python
0bd3bb8c144c61d3c07b527e3bf3245738a106b9
Create lists with properties for each file or folder; if folder - there are folder path and word 'folder'; if it is file - there are file's path, word 'file', size of file and date of its modofocation
RandyRomero/folderSync
folderSync.py
folderSync.py
#! python3 '''Program that can sync all files and folders between two chosen folders. I need it to keep my photo-backup updated. But script should be able to sync in both ways. And keep track of changes in both folders.''' import logging, os, time, send2trash logging.basicConfig( format = "%(levelname) -1s %(asctim...
#! python3 '''Program that can sync all files and folders between two chosen folders. I need it to keep my photo-backup updated. But script should be able to sync in both ways. And keep track of changes in both folders.''' import logging, os, time, send2trash logging.basicConfig( format = "%(levelname) -1s %(asctim...
mit
Python
1ac84348bc3b6f18d1bca04c0615504252680756
Add support for geography option in geodjango
smartfile/django-south,smartfile/django-south
south/introspection_plugins/geodjango.py
south/introspection_plugins/geodjango.py
""" GeoDjango introspection rules """ import django from django.conf import settings from south.modelsinspector import add_introspection_rules has_gis = "django.contrib.gis" in settings.INSTALLED_APPS if has_gis: # Alright,import the field from django.contrib.gis.db.models.fields import GeometryField ...
""" GeoDjango introspection rules """ import django from django.conf import settings from south.modelsinspector import add_introspection_rules has_gis = "django.contrib.gis" in settings.INSTALLED_APPS if has_gis: # Alright,import the field from django.contrib.gis.db.models.fields import GeometryField ...
apache-2.0
Python
d7f033f4606e7335009c54156dd8f45ae229755a
Update test cases
exercism/xpython,jmluy/xpython,behrtam/xpython,mweb/python,pheanex/xpython,N-Parsons/exercism-python,mweb/python,pheanex/xpython,exercism/python,exercism/xpython,smalley/python,jmluy/xpython,N-Parsons/exercism-python,smalley/python,exercism/python,behrtam/xpython
exercises/bracket-push/bracket_push_test.py
exercises/bracket-push/bracket_push_test.py
import unittest from bracket_push import check_brackets # test cases adapted from `x-common//canonical-data.json` @ version: 1.0.0 class BracketPushTests(unittest.TestCase): def test_paired_square_brackets(self): self.assertEqual(check_brackets("[]"), True) def test_empty_string(self): self...
import unittest from bracket_push import check_brackets class BracketPushTests(unittest.TestCase): def test_input_empty(self): self.assertEqual(check_brackets(""), True) def test_single(self): self.assertEqual(check_brackets("{}"), True) def test_unclosed(self): self.assertEqua...
mit
Python
2ac70dc87ae55c079e61111512489d81aad2130d
fix tables usage
CartoDB/cartoframes,CartoDB/cartoframes
cartoframes/data/clients/auth_api_client.py
cartoframes/data/clients/auth_api_client.py
from __future__ import absolute_import from carto.api_keys import APIKeyManager from ...auth import get_default_credentials class AuthAPIClient(object): """AuthAPIClient class is a client of the CARTO Auth API. More info: https://carto.com/developers/auth-api/ Args: credentials (:py:class:`Cred...
from __future__ import absolute_import from carto.api_keys import APIKeyManager from ...auth import get_default_credentials class AuthAPIClient(object): """AuthAPIClient class is a client of the CARTO Auth API. More info: https://carto.com/developers/auth-api/ Args: credentials (:py:class:`Cred...
bsd-3-clause
Python
2121ed05cb570c907300f966685dff07524357c5
update tests to v1.5.0 (#1609)
jmluy/xpython,exercism/python,jmluy/xpython,N-Parsons/exercism-python,exercism/xpython,smalley/python,smalley/python,exercism/python,N-Parsons/exercism-python,behrtam/xpython,exercism/xpython,behrtam/xpython
exercises/bracket-push/bracket_push_test.py
exercises/bracket-push/bracket_push_test.py
import unittest from bracket_push import is_paired # Tests adapted from `problem-specifications//canonical-data.json` @ v1.5.0 class BracketPushTest(unittest.TestCase): def test_paired_square_brackets(self): self.assertEqual(is_paired("[]"), True) def test_empty_string(self): self.assertEqu...
import unittest from bracket_push import is_paired # Tests adapted from `problem-specifications//canonical-data.json` @ v1.4.0 class BracketPushTest(unittest.TestCase): def test_paired_square_brackets(self): self.assertEqual(is_paired("[]"), True) def test_empty_string(self): self.assertEqu...
mit
Python
e2b0d2216a611ce296250b56f03d30645fa54652
Remove stubborn test
mwstobo/marshmallow,0xDCA/marshmallow,quxiaolong1504/marshmallow,VladimirPal/marshmallow,bartaelterman/marshmallow,0xDCA/marshmallow,Bachmann1234/marshmallow,dwieeb/marshmallow,maximkulkin/marshmallow,daniloakamine/marshmallow,marshmallow-code/marshmallow,Tim-Erwin/marshmallow,xLegoz/marshmallow,etataurov/marshmallow
tests/test_fields.py
tests/test_fields.py
# -*- coding: utf-8 -*- import pytest from marshmallow import fields from tests.base import ALL_FIELDS class TestFieldAliases: def test_enum_is_select(self): assert fields.Enum is fields.Select def test_int_is_integer(self): assert fields.Int is fields.Integer def test_str_is_string(se...
# -*- coding: utf-8 -*- import pytest from marshmallow import fields from tests.base import ALL_FIELDS class TestFieldAliases: def test_enum_is_select(self): assert fields.Enum is fields.Select def test_int_is_integer(self): assert fields.Int is fields.Integer def test_str_is_string(se...
mit
Python
66be994e1b780f77766030bb131fe8815d3a9eab
Fix typo
funkybob/django-classy-settings
tests/test_global.py
tests/test_global.py
import unittest import cbs class MySettings(cbs.GlobalSettings): PROJECT_NAME = 'tests' @property def INSTALLED_APPS(self): return super(MySettings, self).INSTALLED_APPS + ('test',) class GlobalSettingsTest(unittest.TestCase): def test_precedence(self): g = {} cbs.apply(My...
import unittest import cbs class MySettings(cbs.GlobalSettings): PROJECT_NAME = 'tests' @property def INSTALLED_APPS(self): return super(MySettings, self).INSTALLED_APPS + ('test',) class GlobalSettingsTest(unittest.TestCase): def test_precedence(self): g = {} cbs.apply(My...
bsd-2-clause
Python
26799e57edbf7bad21a81ad34e2ce90d57e87a00
Update version.py
uezo/minette-python
minette/version.py
minette/version.py
__version__ = "0.4.dev3"
__version__ = "0.4.dev2"
apache-2.0
Python
01649abbbdbf65a2e2902f656358a11c6dad0ca4
Improve eslint_styler robustness
stopthatcow/zazu,stopthatcow/zazu
zazu/plugins/eslint_styler.py
zazu/plugins/eslint_styler.py
# -*- coding: utf-8 -*- """ESLint plugin for zazu.""" import zazu.styler zazu.util.lazy_import(locals(), [ 'click', 'json', 'os', 'subprocess' ]) __author__ = "Patrick Moore" __copyright__ = "Copyright 2018" class ESLintStyler(zazu.styler.Styler): """ESLint plugin for code styling.""" def st...
# -*- coding: utf-8 -*- """ESLint plugin for zazu.""" import zazu.styler zazu.util.lazy_import(locals(), [ 'json', 'os', 'subprocess' ]) __author__ = "Patrick Moore" __copyright__ = "Copyright 2018" class ESLintStyler(zazu.styler.Styler): """ESLint plugin for code styling.""" def style_string(se...
mit
Python
708bccc975e693b37de8bfd94c191de5a6e82ac7
Add mapnik test.
Kotaimen/stonemason,Kotaimen/stonemason
tests/test_mapnik.py
tests/test_mapnik.py
# -*- encoding: utf-8 -*- __author__ = 'kotaimen' __date__ = '3/9/15' import unittest import os import io from PIL import Image from tests import skipUnlessHasMapnik, \ SAMPLE_THEME_DIRECTORY, TEST_DIRECTORY try: import mapnik except ImportError: pass @skipUnlessHasMapnik() class TestMapnikSetup(unitt...
# -*- encoding: utf-8 -*- __author__ = 'kotaimen' __date__ = '3/9/15' import unittest from tests import skipUnlessHasMapnik, mapnik @skipUnlessHasMapnik() class TestMapnik(unittest.TestCase): def test_mapnik_version(self): self.assertGreaterEqual(mapnik.mapnik_version(), 200300) if __name__ == '__mai...
mit
Python
a8d8ba7e756b4b40b56710c824e508461089fb99
Support F codes from pycodestyle
getsentry/zeus,getsentry/zeus,getsentry/zeus,getsentry/zeus
zeus/artifacts/pycodestyle.py
zeus/artifacts/pycodestyle.py
import re from zeus.config import db from zeus.constants import Severity from zeus.models import StyleViolation from .base import ArtifactHandler regexp = re.compile( r'^(?P<filename>[^\:]+)\:(?P<lineno>\d+)\:(?P<colno>\d+)\: (?P<source>[a-z]\d+) (?P<message>.+)$', re.I) SEVERITY_MAP = { 'W': Severity.warni...
import re from zeus.config import db from zeus.constants import Severity from zeus.models import StyleViolation from .base import ArtifactHandler regexp = re.compile( r'^(?P<filename>[^\:]+)\:(?P<lineno>\d+)\:(?P<colno>\d+)\: (?P<source>[a-z]\d+) (?P<message>.+)$', re.I) SEVERITY_MAP = { 'W': Severity.warni...
apache-2.0
Python
9491c96b2025858ee7f51beb1852becc8238836b
Move placement of ship item to accessibility
bitcraft/pyweek19
zort/levels/finderskeepers.py
zort/levels/finderskeepers.py
""" Going Down! This is the first level. Zort has been shot out of orbit and crashlanded here. This level should be relatively straight forward and take no more than 2 minutes to complete. There should be no monsters, an obvious path, one door and one switch to go through. """ # import your game entities here # imple...
""" Going Down! This is the first level. Zort has been shot out of orbit and crashlanded here. This level should be relatively straight forward and take no more than 2 minutes to complete. There should be no monsters, an obvious path, one door and one switch to go through. """ # import your game entities here # imple...
bsd-2-clause
Python
10bc6b5c7ab97a040de58a853bbb55008725e181
Add search capability
pyprism/Hiren-Disk,pyprism/Hiren-Disk,pyprism/Hiren-Disk
hiren/disk/models.py
hiren/disk/models.py
from django.db import models from djorm_pgfulltext.models import SearchManager from djorm_pgfulltext.fields import VectorField class Box(models.Model): box_no = models.IntegerField(unique=True) created_at = models.DateTimeField(auto_now_add=True) def __str__(self): return "%s %s" % (self.box_no, ...
from django.db import models class Box(models.Model): box_no = models.IntegerField(unique=True) created_at = models.DateTimeField(auto_now_add=True) def __str__(self): return "%s %s" % (self.box_no, self.created_at) class Disk(models.Model): disk_no = models.ForeignKey(Box) serial = mod...
mit
Python
b1e0194c68966e396d60e7d32690512de4763da6
fix mayavi import
mne-tools/mne-python,trachelr/mne-python,matthew-tucker/mne-python,kingjr/mne-python,trachelr/mne-python,adykstra/mne-python,rkmaddox/mne-python,pravsripad/mne-python,Eric89GXL/mne-python,andyh616/mne-python,leggitta/mne-python,wmvanvliet/mne-python,jaeilepp/mne-python,nicproulx/mne-python,cjayb/mne-python,kambysese/mn...
mne/viz/montage.py
mne/viz/montage.py
"""Functions to plot EEG sensor montages """ def plot_montage(montage, scale_factor=1.5): """Plot EEG sensor montage Parameters ---------- montage : instance of Montage The montage to visualize scale_factor : float Determines the size of the points. defaults to 1.5 Returns ...
"""Functions to plot EEG sensor montages """ from ..utils import requires_mayavi @requires_mayavi def plot_montage(montage, scale_factor=1.5): """Plot EEG sensor montage Parameters ---------- montage : instance of Montage The montage to visualize scale_factor : float Determines th...
bsd-3-clause
Python
fdcd0f8e4ea1c358712ff1d22ce7ea3f2ade73b7
rename model test case
byteweaver/django-forums,byteweaver/django-forums
tests/test_models.py
tests/test_models.py
from datetime import datetime from django.test import TestCase from forums.models import Category, Forum, Topic, Post from forums.factories import ( CategoryFactory, ForumFactory, TopicFactory, PostFactory ) class ModelCreationTests(TestCase): def test_category_creation(self): category = CategoryFact...
from datetime import datetime from django.test import TestCase from forums.models import Category, Forum, Topic, Post from forums.factories import ( CategoryFactory, ForumFactory, TopicFactory, PostFactory ) class CategoryModelTest(TestCase): def test_category_creation(self): category = CategoryFacto...
bsd-3-clause
Python
0d5bcb4fb89559deb8228aadba6c9eef27010098
Add tests for arguments
pypa/twine
tests/test_pep561.py
tests/test_pep561.py
import subprocess import textwrap import pytest @pytest.fixture def example_py(tmpdir, monkeypatch): monkeypatch.chdir(tmpdir) return tmpdir / "example.py" def test_no_missing_import(example_py): example_py.write("""import twine""") subprocess.run(["mypy", "--strict", example_py], check=True) de...
import subprocess def test_no_missing_import(tmpdir): src = tmpdir / "example.py" src.write("""import twine""") tmpdir.chdir() subprocess.run(["mypy", "--strict", src], check=True)
apache-2.0
Python
8b9d99199ac8cea385f49cfdddbafebb6b11f78e
Use a fixture to clean up the replay dir
ramiroluz/cookiecutter,christabor/cookiecutter,venumech/cookiecutter,luzfcb/cookiecutter,michaeljoseph/cookiecutter,ramiroluz/cookiecutter,luzfcb/cookiecutter,dajose/cookiecutter,benthomasson/cookiecutter,dajose/cookiecutter,Springerle/cookiecutter,agconti/cookiecutter,benthomasson/cookiecutter,agconti/cookiecutter,mic...
tests/test_replay.py
tests/test_replay.py
# -*- coding: utf-8 -*- """ test_replay ----------- """ import json import os import pytest from cookiecutter import replay, utils from cookiecutter.config import get_user_config @pytest.fixture def replay_dir(): return os.path.expanduser('~/.cookiecutter_replay/') def test_get_user_config(mocker, replay_di...
# -*- coding: utf-8 -*- """ test_replay ----------- """ import json import os import pytest from cookiecutter import replay from cookiecutter.config import get_user_config @pytest.fixture def replay_dir(): return os.path.expanduser('~/.cookiecutter_replay/') def test_get_user_config(mocker, replay_dir): ...
bsd-3-clause
Python
aa367de97de653ab7a44e314fdce14adc0d8b73b
test - Test auto resolve of ways
DinoTools/python-overpy,DinoTools/python-overpy
tests/test_result.py
tests/test_result.py
import pytest import overpy from tests import read_file, new_server_thread, BaseRequestHandler class HandleResponseJSON02(BaseRequestHandler): """ """ def handle(self): self.request.send(b"HTTP/1.0 200 OK\r\n") self.request.send(b"Content-Type: application/json\r\n") self.request...
import pytest import overpy from tests.base_class import read_file class TestResult(object): def test_expand_error(self): api = overpy.Overpass() result = api.parse_json(read_file("json/result-expand-01.json")) with pytest.raises(ValueError): result.expand(123) with p...
mit
Python
3999ee090b019308729edcede9a29878899bea10
fix test-result using different variance model
shapiromatron/bmds-server,shapiromatron/bmds-server,shapiromatron/bmds-server,shapiromatron/bmds-server
tests/test_runner.py
tests/test_runner.py
from copy import deepcopy from django.test import Client import json import time from .fixtures import * # noqa @pytest.mark.django_db(transaction=False) def test_d_success(complete_dichotomous): # BMDS execution is slow; we overload this test to check lots of things. data = deepcopy(complete_dichotomous) ...
from copy import deepcopy from django.test import Client import json import time from .fixtures import * # noqa @pytest.mark.django_db(transaction=False) def test_d_success(complete_dichotomous): # BMDS execution is slow; we overload this test to check lots of things. data = deepcopy(complete_dichotomous) ...
mit
Python
b6a7f93bfd19e55f61023f3106b79ac04d7a46d4
add test case for coverage
yoon-gu/Mozart
tests/test_sample.py
tests/test_sample.py
import unittest import numpy as np from numpy import linalg as LA class TestStocMethods(unittest.TestCase): def test_test(self): self.assertTrue(True) def test_import(self): import mozart as mz self.assertTrue(True) def test_authors(self): import mozart as mz authors = ('Yoon-gu Hwang <yz0624@gmail.com>...
import unittest class TestStocMethods(unittest.TestCase): def test_test(self): self.assertTrue(True) def test_import(self): import mozart as mz self.assertTrue(True) def test_authors(self): import mozart as mz authors = ('Yoon-gu Hwang <yz0624@gmail.com>', 'Dong-Wook Shin <dwshin.yonsei@gmail.com>', 'J...
mit
Python
480255fd6054a4c056b50d88d83675ce3b4ec5c0
Update test_simple.py
cmccomb/truss-me
tests/test_simple.py
tests/test_simple.py
import numpy from trussme import truss from trussme import old_truss import unittest class TestSequenceFunctions(unittest.TestCase): def setUp(self): self.T = truss.Truss() self.T2 = old_truss.Truss(12) def test_joints(self): self.T.add_support(numpy.array([-5.0, 0.0, 0.0]), d=2) ...
import numpy from trussme import truss from trussme import old_truss import unittest class TestSequenceFunctions(unittest.TestCase): def setUp(self): self.T = truss.Truss() self.T2 = old_truss.Truss(6) def test_joints(self): self.T.add_support(numpy.array([-5.0, 0.0, 0.0]), d=2) ...
mit
Python
797e9f3e4fad744e9211c07067992c245a344fb5
Remove schema validation unit tests frow whatcd
JorisDeRieck/Flexget,Danfocus/Flexget,qk4l/Flexget,Flexget/Flexget,JorisDeRieck/Flexget,qk4l/Flexget,ianstalk/Flexget,dsemi/Flexget,oxc/Flexget,crawln45/Flexget,qvazzler/Flexget,Flexget/Flexget,sean797/Flexget,oxc/Flexget,Flexget/Flexget,dsemi/Flexget,drwyrm/Flexget,OmgOhnoes/Flexget,drwyrm/Flexget,jacobmetrick/Flexget...
tests/test_whatcd.py
tests/test_whatcd.py
from __future__ import unicode_literals, division, absolute_import from tests import FlexGetBase, use_vcr class TestWhatCDOnline(FlexGetBase): __yaml__ = """ tasks: badlogin: whatcd: username: invalid password: invalid """ @use_vcr def test_...
from __future__ import unicode_literals, division, absolute_import from tests import FlexGetBase, use_vcr class TestInputWhatCD(FlexGetBase): __yaml__ = """ tasks: no_fields: whatcd: no_user: whatcd: password: test no_pass: ...
mit
Python
5da41fdbb8b7e9d08744df3e5187d12da277636e
refactor lunar dqn
kengz/openai_lab,kengz/openai_lab,kengz/openai_gym,kengz/openai_gym,kengz/openai_gym,kengz/openai_lab
rl/agent/lunar_dqn.py
rl/agent/lunar_dqn.py
from rl.agent.dqn import DQN class LunarDQN(DQN): def __init__(self, *args, **kwargs): super(LunarDQN, self).__init__(*args, **kwargs) def update_n_epoch(self, sys_vars): ''' Increase epochs at the beginning of each session, for training for later episodes, once it ha...
from rl.agent.dqn import DQN from rl.util import logger from keras.models import Sequential from keras.layers.core import Dense from keras.optimizers import SGD class LunarDQN(DQN): def __init__(self, *args, **kwargs): super(LunarDQN, self).__init__(*args, **kwargs) def build_model(self): mo...
mit
Python
7be8eded18810efb4fdff66829cd9f064f373f00
Improve coverage
gmr/consulate,gmr/consulate
tests/utils_tests.py
tests/utils_tests.py
# coding=utf-8 import unittest from consulate import exceptions, utils class QuoteTestCase(unittest.TestCase): def urlencode_test(self): self.assertEqual("%2Ffoo%40bar", utils.quote("/foo@bar", "")) class MaybeEncodeTestCase(unittest.TestCase): @unittest.skipUnless(utils.PYTHON3, 'Python3 Only') ...
# coding=utf-8 import unittest from consulate import utils class QuoteTestCase(unittest.TestCase): def urlencode_test(self): self.assertEqual("%2Ffoo%40bar", utils.quote("/foo@bar", "")) class MaybeEncodeTestCase(unittest.TestCase): @unittest.skipUnless(utils.PYTHON3, 'Python3 Only') def str_te...
bsd-3-clause
Python
1600785d2daa9be955d5dc24802aa7727f86aede
Add config.ceph_git_base_url
michaelsevilla/teuthology,zhouyuan/teuthology,dreamhost/teuthology,robbat2/teuthology,t-miyamae/teuthology,michaelsevilla/teuthology,ceph/teuthology,zhouyuan/teuthology,robbat2/teuthology,ktdreyer/teuthology,SUSE/teuthology,tchaikov/teuthology,SUSE/teuthology,t-miyamae/teuthology,dreamhost/teuthology,ivotron/teuthology...
teuthology/config.py
teuthology/config.py
import os import yaml import logging CONF_FILE = os.path.join(os.environ['HOME'], '.teuthology.yaml') log = logging.getLogger(__name__) class _Config(object): """ This class is intended to unify teuthology's many configuration files and objects. Currently it serves as a convenient interface to ~/.te...
import os import yaml import logging CONF_FILE = os.path.join(os.environ['HOME'], '.teuthology.yaml') log = logging.getLogger(__name__) class _Config(object): """ This class is intended to unify teuthology's many configuration files and objects. Currently it serves as a convenient interface to ~/.te...
mit
Python
f822ea625f2190e783c209dce7096deee407b226
Modify thermostat timing params.
michael-mao/titanium,michael-mao/titanium,michael-mao/titanium,michael-mao/titanium
thermostat/config.py
thermostat/config.py
# -*- coding: utf-8 -*- import os from decimal import Decimal ############################## # API ############################## # Open Weather Map OWM_API_KEY = 'bf301adce702f7ed7a91b92a0861a56e' # Pubnub SUBSCRIBE_KEY = 'sub-c-470a1dd4-e027-11e5-bd77-02ee2ddab7fe' PUBLISH_KEY = 'pub-c-5d83a3da-ce33-4b35-889e-8...
# -*- coding: utf-8 -*- import os from decimal import Decimal ############################## # API ############################## # Open Weather Map OWM_API_KEY = 'bf301adce702f7ed7a91b92a0861a56e' # Pubnub SUBSCRIBE_KEY = 'sub-c-470a1dd4-e027-11e5-bd77-02ee2ddab7fe' PUBLISH_KEY = 'pub-c-5d83a3da-ce33-4b35-889e-8...
mit
Python
abd7fc976c7eea55d1fcab2c4993ec46eb552737
Use generator when returning potential roots in rational root test
richardmillson/galois
is_irred.py
is_irred.py
# tests to determine whether a polynomial is irreducible over Q[x] # let poly = a_0 + a_1 x + ... + a_n x^n from fractions import Fraction import numpy def is_prime(num): """ return True if num is a prime :param num: int :return: Bool """ return True def divisors(num): """ returns a...
# tests to determine whether a polynomial is irreducible over Q[x] # let poly = a_0 + a_1 x + ... + a_n x^n from fractions import Fraction import numpy def is_prime(num): """ return True if num is a prime :param num: int :return: Bool """ return True def divisors(num): """ returns a...
mit
Python
a28a3e4a655ba9fcff47e70d4b23d26b7dd0fcc3
add constant property
rootpy/rootpy,rootpy/rootpy,ndawe/rootpy,rootpy/rootpy,kreczko/rootpy,kreczko/rootpy,ndawe/rootpy,kreczko/rootpy,ndawe/rootpy
rootpy/stats/value.py
rootpy/stats/value.py
# Copyright 2012 the rootpy developers # distributed under the terms of the GNU General Public License from __future__ import absolute_import import ROOT from . import log; log = log[__name__] from ..base import NamedObject from .. import QROOT, asrootpy __all__ = [ 'RealVar', ] class AbsArg(object): """ ...
# Copyright 2012 the rootpy developers # distributed under the terms of the GNU General Public License from __future__ import absolute_import import ROOT from . import log; log = log[__name__] from ..base import NamedObject from .. import QROOT, asrootpy __all__ = [ 'RealVar', ] class AbsArg(object): """ ...
bsd-3-clause
Python
fc75b4dada00ef96ca6b1a9eca3112a89665e4b7
Fix dtype issues with Cython code
janelia-flyem/gala
gala/sparselol.py
gala/sparselol.py
import numpy as np from numpy.lib import stride_tricks from scipy import sparse from .sparselol_cy import extents_count from .dtypes import label_dtype class SparseLOL: def __init__(self, csr): self.indptr = csr.indptr self.indices = csr.indices self.data = csr.data def __getitem__(sel...
import numpy as np from numpy.lib import stride_tricks from scipy import sparse from .sparselol_cy import extents_count from .dtypes import label_dtype class SparseLOL: def __init__(self, csr): self.indptr = csr.indptr self.indices = csr.indices self.data = csr.data def __getitem__(sel...
bsd-3-clause
Python
27f4da4ce19947fa8cfd9cbdcffc99589769603e
bump version
oinume/tomahawk,oinume/tomahawk
tomahawk/__init__.py
tomahawk/__init__.py
from tomahawk.constants import * __author__ = 'Kazuhiro Oinuma' __author_email__ = 'oinume@gmail.com' __copyright__ = '2011-2013' __license__ = 'LGPL', __version__ = '0.7.0-rc1' __maintainer__ = 'Kazuhiro Oinuma' __status__ = 'Production/Stable' __all__ = [ 'TimeoutError', 'CommandError', 'FatalError' ]
from tomahawk.constants import * __author__ = 'Kazuhiro Oinuma' __author_email__ = 'oinume@gmail.com' __copyright__ = '2011-2013' __license__ = 'LGPL', __version__ = '0.7.0-beta1' __maintainer__ = 'Kazuhiro Oinuma' __status__ = 'Production/Stable' __all__ = [ 'TimeoutError', 'CommandError', 'FatalError' ]
lgpl-2.1
Python
34224b2679f72ebd50dcede69b6a443da51eaebb
use self.db to set the version
fedora-conary/conary,fedora-conary/conary,fedora-conary/conary,fedora-conary/conary,fedora-conary/conary
conary/dbstore/migration.py
conary/dbstore/migration.py
# # Copyright (c) 2005 rPath, Inc. # # This program is distributed under the terms of the Common Public License, # version 1.0. A copy of this license should have been distributed with this # source file in a file called LICENSE. If it is not present, the license # is always available at http://www.opensource.org/licen...
# # Copyright (c) 2005 rPath, Inc. # # This program is distributed under the terms of the Common Public License, # version 1.0. A copy of this license should have been distributed with this # source file in a file called LICENSE. If it is not present, the license # is always available at http://www.opensource.org/licen...
apache-2.0
Python
24604c0aa521c1f3c830b66a1b7aaf8eaded8a75
Update moksha.widgets.all for the new widgetbrowser app
mokshaproject/moksha,lmacken/moksha,ralphbean/moksha,pombredanne/moksha,pombredanne/moksha,mokshaproject/moksha,pombredanne/moksha,mokshaproject/moksha,lmacken/moksha,ralphbean/moksha,lmacken/moksha,mokshaproject/moksha,ralphbean/moksha,pombredanne/moksha
moksha/widgets/all.py
moksha/widgets/all.py
# This file is part of Moksha. # Copyright (C) 2008-2009 Red Hat, Inc. # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the Free Software Foundation, either version 3 of the # License, or (at your option) any later...
# This file is part of Moksha. # Copyright (C) 2008-2009 Red Hat, Inc. # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the Free Software Foundation, either version 3 of the # License, or (at your option) any later...
apache-2.0
Python
5f6d3e3d3d79a61fb06e7e7493592ecd764d1365
Fix typo
jaedb/Iris,jaedb/Iris,jaedb/Iris,jaedb/Iris,jaedb/Iris,jaedb/Iris
mopidy_iris/system.py
mopidy_iris/system.py
from threading import Thread import os, logging, subprocess # import logger logger = logging.getLogger(__name__) class IrisSystemThread(Thread): def __init__(self, action, callback): Thread.__init__(self) self.action = action self.callback = callback self.path = os.pat...
from threading import Thread import os, logging, subprocess # import logger logger = logging.getLogger(__name__) class IrisSystemThread(Thread): def __init__(self, action, callback): Thread.__init__(self) self.action = action self.callback = callback self.path = os.pat...
apache-2.0
Python
648a2966d696072fcaf5dc5a041a4ae1ffcd4d44
add common util function make model
seongahjo/Mosaicer,seongahjo/Mosaicer
mosaicer/file_util.py
mosaicer/file_util.py
import os import unicodedata from keras.applications import InceptionV3, VGG16, MobileNet image_type = ['.jpg'] def check_img(file_name): """To check image Args: file_name : file name Returns: if this file is image """ file_name, file_ext = os.path.splitext(file_name) if fil...
import os import unicodedata image_type = ['.jpg'] def check_img(file_name): """To check image Args: file_name : file name Returns: if this file is image """ file_name, file_ext = os.path.splitext(file_name) if file_ext in image_type: return True return False def...
mit
Python
cdb9b1f6708fa9bab70216ce803a0494ae66e8d9
Update constants.py
robingall2910/RobTheBoat,robingall2910/RobTheBoat
musicbot/constants.py
musicbot/constants.py
import os.path VERSION = '2.8.6' MAIN_VERSION = '2' SUB_VERSION = '-rev 2 ' CODENAME = '"Twenty One Pilots"' #I WANNA BE KNOWN BY YOUUU VER = VERSION + SUB_VERSION BDATE = 'June 27, 2016 @ 2:35 PM EDT' MAINVER = VERSION + SUB_VERSION + CODENAME BUILD_USERNAME = "Wyndrik" AUDIO_CACHE_PATH = os.path.join(os.getcwd(), 'a...
import os.path VERSION = '2.8.5' MAIN_VERSION = '2' SUB_VERSION = '-rev 1 ' CODENAME = '"Twenty One Pilots"' #I WANNA BE KNOWN BY YOUUU VER = VERSION + SUB_VERSION BDATE = 'June 27, 2016 @ 2:35 PM EDT' MAINVER = VERSION + SUB_VERSION + CODENAME BUILD_USERNAME = "Wyndrik" AUDIO_CACHE_PATH = os.path.join(os.getcwd(), 'a...
mit
Python
3193dd7588b22cb33b1ff25114bea74fd2f1ccd6
Fix load_initial_data command for django>=1.11 (#104)
springload/madewithwagtail,springload/madewithwagtail,springload/madewithwagtail,springload/madewithwagtail
core/management/commands/load_initial_data.py
core/management/commands/load_initial_data.py
import os import shutil from django.conf import settings from django.core.management import call_command from django.core.management.base import BaseCommand class Command(BaseCommand): def handle(self, *args, **options): fixtures_dir = os.path.join(settings.PROJECT_ROOT, settings.SITE_NAME, 'core', 'fixt...
import os import shutil from django.conf import settings from django.core.management import call_command from django.core.management.base import NoArgsCommand class Command(NoArgsCommand): def handle_noargs(self, **options): fixtures_dir = os.path.join(settings.PROJECT_ROOT, settings.SITE_NAME, 'core', '...
mit
Python
db8c75fff673fb670e48e479bb1edeaefcb35507
add Decoder to pmlib __init__.py
jjffryan/pymtl,tj93/pymtl,12yujim/pymtl,jjffryan/pymtl,12yujim/pymtl,jck/pymtl,Glyfina-Fernando/pymtl,cfelton/pymtl,tj93/pymtl,jck/pymtl,cornell-brg/pymtl,cornell-brg/pymtl,tj93/pymtl,jjffryan/pymtl,Glyfina-Fernando/pymtl,Glyfina-Fernando/pymtl,jck/pymtl,cornell-brg/pymtl,cfelton/pymtl,12yujim/pymtl,cfelton/pymtl
new_pmlib/__init__.py
new_pmlib/__init__.py
#========================================================================= # Modular Python Build System __init__ file #========================================================================= # List of collection modules import regs import arith import valrdy import queues # List of single-class modules from Mux ...
#========================================================================= # Modular Python Build System __init__ file #========================================================================= # List of collection modules import regs import arith import valrdy import queues # List of single-class modules from Mux ...
bsd-3-clause
Python
e07e1468128d423bbb9f0dd0cb79d09620b69e48
Fix numerical printout in python script
openslide/openslide,openslide/openslide,openslide/openslide,openslide/openslide
misc/decode-mirax-tile-position.py
misc/decode-mirax-tile-position.py
#!/usr/bin/python import struct, sys, os f = open(sys.argv[1]) HEADER_OFFSET = 296 f.seek(HEADER_OFFSET) try: while True: x = int(struct.unpack("<i", f.read(4))[0]) / 256.0 y = int(struct.unpack("<i", f.read(4))[0]) / 256.0 zz = f.read(1) print '%10.100g %10.100g' % (x, y) exce...
#!/usr/bin/python import struct, sys, os f = open(sys.argv[1]) HEADER_OFFSET = 296 f.seek(HEADER_OFFSET) try: while True: x = int(struct.unpack("<i", f.read(4))[0]) / 256.0 y = int(struct.unpack("<i", f.read(4))[0]) / 256.0 zz = f.read(1) print '%10g %10g' % (x, y) except: ...
lgpl-2.1
Python
3f30254955d72a99e3b7ef74f65fac0badb4a531
update database notebook
gbrammer/grizli
grizli/version.py
grizli/version.py
# git describe --tags __version__ = "1.0-23-g03638ff"
# git describe --tags __version__ = "1.0-22-g93c27d5"
mit
Python
88c1e39dfcaffaa52a18390ecae6d9c46d5aeb2a
increment version
gbrammer/grizli
grizli/version.py
grizli/version.py
# git describe --tags __version__ = "0.6.0-18-ga8f078d"
# git describe --tags __version__ = "0.6.0-13-g7617e47"
mit
Python
d7bd04a99e2968c2f686e00468dcf731c446b77f
Fix Oron Account plugin `loadAccountInfo` signature
swayf/pyLoad,swayf/pyLoad,swayf/pyLoad
module/plugins/accounts/OronCom.py
module/plugins/accounts/OronCom.py
# -*- coding: utf-8 -*- """ This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. This program is distributed in...
# -*- coding: utf-8 -*- """ This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. This program is distributed in...
agpl-3.0
Python