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
df7374164a3e48e55e5154b4286472dc97b1dcde
update code
cnits/PyUtil
pyutil/cpy_lxml_parser.py
pyutil/cpy_lxml_parser.py
from lxml import etree, builder, html from io import StringIO, BytesIO import os ''' HTML Element Methods HTML elements have all the methods that come with ElementTree, but also include some extra methods: .drop_tree(): Drops the element and all its children. Unlike el.getparent().remove(el) this does not remove the ...
from lxml import etree, builder, html from io import StringIO, BytesIO import os ''' HTML Element Methods HTML elements have all the methods that come with ElementTree, but also include some extra methods: .drop_tree(): Drops the element and all its children. Unlike el.getparent().remove(el) this does not remove the ...
apache-2.0
Python
5f9feb6cb899906cc4248880c3f1319c17d2faed
disable shuffle test while I work on a fix (#9900)
hail-is/hail,hail-is/hail,hail-is/hail,hail-is/hail,hail-is/hail,hail-is/hail,hail-is/hail,hail-is/hail
query/test/test_query.py
query/test/test_query.py
import pytest import hail as hl from hailtop.hailctl.dev.query import cli def test_simple_table(): t = hl.utils.range_table(50, 3) t = t.filter((t.idx % 3 == 0) | ((t.idx / 7) % 3 == 0)) n = t.count() print(f'n {n}') assert n == 17 # FIXME(danking): disabled while I work on a fix # def test_simple...
import pytest import hail as hl from hailtop.hailctl.dev.query import cli def test_simple_table(): t = hl.utils.range_table(50, 3) t = t.filter((t.idx % 3 == 0) | ((t.idx / 7) % 3 == 0)) n = t.count() print(f'n {n}') assert n == 17 def test_simple_shuffle(): expected = [hl.Struct(idx=i) for i ...
mit
Python
e03d0a382a70060be9efe2c59d531a838e695622
make connector installable
leorochael/queue
queue_job/__openerp__.py
queue_job/__openerp__.py
# -*- coding: utf-8 -*- ############################################################################## # # Author: Guewen Baconnier # Copyright 2013-2014 Camptocamp SA # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # ...
# -*- coding: utf-8 -*- ############################################################################## # # Author: Guewen Baconnier # Copyright 2013-2014 Camptocamp SA # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # ...
agpl-3.0
Python
37ea38bbf54ad17b3413129df3ef081609d334ed
bump version
leorochael/queue
queue_job/__openerp__.py
queue_job/__openerp__.py
# -*- coding: utf-8 -*- ############################################################################## # # Author: Guewen Baconnier # Copyright 2013-2014 Camptocamp SA # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # ...
# -*- coding: utf-8 -*- ############################################################################## # # Author: Guewen Baconnier # Copyright 2013-2014 Camptocamp SA # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # ...
agpl-3.0
Python
44090e5f1108b8e0cd90ddd634469346578ebb27
Fix docstring.
alburnum/alburnum-maas-client,blakerouse/python-libmaas
maas/client/utils/connect.py
maas/client/utils/connect.py
"""Connect to a remote MAAS instance with an apikey.""" __all__ = [ "connect", "ConnectError", ] from urllib.parse import urlparse from . import ( api_url, fetch_api_description, ) from .creds import Credentials from .profiles import Profile class ConnectError(Exception): """An error with conne...
"""Logging-in to a remote MAAS instance with a user-name and password. Instead of copy-and-pasting API keys, this allows clients to log-in using their user-name and password, and automatically retrieve an API key. These credentials can then be saved with the profile manager. """ __all__ = [ "connect", "Connec...
agpl-3.0
Python
9dce9ff160a409a386e3f8c46821eb49caf8f146
Bump version to 0.17.2
thombashi/pathvalidate
pathvalidate/__version__.py
pathvalidate/__version__.py
# encoding: utf-8 from datetime import datetime __author__ = "Tsuyoshi Hombashi" __copyright__ = "Copyright 2016-{}, {}".format(datetime.now().year, __author__) __license__ = "MIT License" __version__ = "0.17.2" __maintainer__ = __author__ __email__ = "tsuyoshi.hombashi@gmail.com"
# encoding: utf-8 from datetime import datetime __author__ = "Tsuyoshi Hombashi" __copyright__ = "Copyright 2016-{}, {}".format(datetime.now().year, __author__) __license__ = "MIT License" __version__ = "0.17.1" __maintainer__ = __author__ __email__ = "tsuyoshi.hombashi@gmail.com"
mit
Python
d8599aedaabba461d1cc83fbdbfa57ed56bff048
Update stubbing_engine.py
sheltonpaul89/web-mocker
webmocker/stubbing_engine.py
webmocker/stubbing_engine.py
__author__ = 'admin' import json import os from glob import glob import logging import time import webmocker.mock_helper.pretender_defaults import webmocker.mock_helper.pretend_helpers from webmocker.mock_helper import HttpMock, pretender_defaults,MockRequest,MockResponse, pretend_helpers LOGGER = logging.getLogger...
__author__ = 'admin' import json import os from glob import glob import logging import time import webmocker.mock_helper.pretender_defaults import webmocker.mock_helper.pretend_helpers from webmocker.mock_helper import HttpMock, pretender_defaults,MockRequest,MockResponse, pretend_helpers LOGGER = logging.getLogger...
bsd-2-clause
Python
0c6809e8a0203060e4a22d8063b5f999fe925e1a
add path for adobe reader dc (thanks to Statixs for reporting)
cuckoobox/cuckoo,cuckoobox/cuckoo,cuckoobox/cuckoo,cuckoobox/cuckoo,cuckoobox/cuckoo
analyzer/windows/modules/packages/pdf.py
analyzer/windows/modules/packages/pdf.py
# Copyright (C) 2010-2015 Cuckoo Foundation. # This file is part of Cuckoo Sandbox - http://www.cuckoosandbox.org # See the file 'docs/LICENSE' for copying permission. from _winreg import HKEY_LOCAL_MACHINE, HKEY_CURRENT_USER from lib.common.abstracts import Package class PDF(Package): """PDF analysis package.""...
# Copyright (C) 2010-2015 Cuckoo Foundation. # This file is part of Cuckoo Sandbox - http://www.cuckoosandbox.org # See the file 'docs/LICENSE' for copying permission. from _winreg import HKEY_LOCAL_MACHINE, HKEY_CURRENT_USER from lib.common.abstracts import Package class PDF(Package): """PDF analysis package.""...
mit
Python
da08a9a75112e87bf84ddda00398a1580c7bda24
Add constants for tools required for tarball generation.
preed/quickrelease
quickrelease/constants.py
quickrelease/constants.py
QUICKRELEASE_CONSTANTS = { 'BZIP_PROG': 'bzip2', 'MAKE' : 'make', 'MD5SUM' : 'md5sum', 'MV' : 'mv', 'PERL' : 'perl', 'S3CURL' : 's3curl.pl', 'SVN' : 'svn', 'RSYNC' : 'rsync', 'TAR' : 'tar', 'UNZIP' : 'unzip', 'WGET' : 'wget', 'BUILD_PLATFORMS': ('windows-i686-msvc8', ...
QUICKRELEASE_CONSTANTS = { 'MAKE' : 'make', 'MV' : 'mv', 'PERL' : 'perl', 'S3CURL' : 's3curl.pl', 'SVN' : 'svn', 'RSYNC' : 'rsync', 'UNZIP' : 'unzip', 'WGET' : 'wget', 'BUILD_PLATFORMS': ('windows-i686-msvc8', 'macosx-i686', 'linux-i686', ...
mit
Python
e7bf377c1ae4fc279c4eb1af142df9a66974ba57
Remove whitespace
kdmurray91/scikit-bio,wdwvt1/scikit-bio,corburn/scikit-bio,demis001/scikit-bio,jairideout/scikit-bio,colinbrislawn/scikit-bio,gregcaporaso/scikit-bio,gregcaporaso/scikit-bio,SamStudio8/scikit-bio,Achuth17/scikit-bio,Kleptobismol/scikit-bio,colinbrislawn/scikit-bio,johnchase/scikit-bio,averagehat/scikit-bio,jdrudolph/sc...
bipy/util/tests/test_misc.py
bipy/util/tests/test_misc.py
#!/usr/bin/env python #----------------------------------------------------------------------------- # Copyright (c) 2013--, bipy development team. # # Distributed under the terms of the Modified BSD License. # # The full license is in the file COPYING.txt, distributed with this software. #----------------------------...
#!/usr/bin/env python #----------------------------------------------------------------------------- # Copyright (c) 2013--, bipy development team. # # Distributed under the terms of the Modified BSD License. # # The full license is in the file COPYING.txt, distributed with this software. #----------------------------...
bsd-3-clause
Python
c3b7f93e0284bf3337f32f3ec77fde4dbcc9c283
Add Mac OS to target platform list. (cherry picked from commit 2c307c775018e5b9680de8022ddf0ce3b6f560be)
jbarczak/glsl-optimizer,mapbox/glsl-optimizer,djreep81/glsl-optimizer,tokyovigilante/glsl-optimizer,KTXSoftware/glsl2agal,KTXSoftware/glsl2agal,bkaradzic/glsl-optimizer,mapbox/glsl-optimizer,dellis1972/glsl-optimizer,wolf96/glsl-optimizer,zeux/glsl-optimizer,benaadams/glsl-optimizer,KTXSoftware/glsl2agal,tokyovigilante...
common.py
common.py
####################################################################### # Common SCons code import os import os.path import sys import platform as _platform ####################################################################### # Defaults _platform_map = { 'linux2': 'linux', 'win32': 'winddk', } default_platfor...
####################################################################### # Common SCons code import os import os.path import sys import platform as _platform ####################################################################### # Defaults _platform_map = { 'linux2': 'linux', 'win32': 'winddk', } default_platfor...
mit
Python
6b6586081a533175c0d7f185a65940bd8c46eeca
add missing import
bboozzoo/mender-backend-cli
common.py
common.py
import logging def run_command(command, cmds, opts): '''Locate and call `command` handler in a map `cmds`. The handler is called with `opts` as its first argument. Will throw a SystemExit(1) if command is not found. :param command: command as string :param cmds: map of commands, command name bein...
def run_command(command, cmds, opts): '''Locate and call `command` handler in a map `cmds`. The handler is called with `opts` as its first argument. Will throw a SystemExit(1) if command is not found. :param command: command as string :param cmds: map of commands, command name being the key, a fun...
mit
Python
ed74c35b7a6c4559187fae878c325318fc02c6b1
create node app tables
w15971597/june,beni55/june,Denniskevin/june,jubel-han/june,fanne/june,fanne/june,fanne/june,Ricardo666666/june,w15971597/june,yuewolf/june,w15971597/june,xingkaixin/june,beni55/june,yuewolf/june,lepture/june,pythoncn/june,Ricardo666666/june,beni55/june,Denniskevin/june,jubel-han/june,xingkaixin/june,lepture/june,Dennis...
syncdb.py
syncdb.py
from june.app import app, prepare_app app.config.from_pyfile('_config/development.py') prepare_app() from june import account, node account.models.db.create_all() node.models.db.create_all()
from june.app import app, prepare_app app.config.from_pyfile('_config/development.py') prepare_app() from june.account import models models.db.create_all()
bsd-3-clause
Python
b290adf38cd97e2fa061efbddd18a1b81bf16ca4
Add edge case to bruteforce_nn: when data is not worth breaking up, process in single chunk.
jacoblevine/PhenoGraph
phenograph/bruteforce_nn.py
phenograph/bruteforce_nn.py
""" Compute k-nearest neighbors using brute force search in parallel via scipy.spatial.distance.cdist and multiprocessing.Pool psutil is used to evaluate available memory and minimize the number of parallel jobs for the available resources """ import numpy as np from scipy.spatial.distance import cdist from multiproc...
""" Compute k-nearest neighbors using brute force search in parallel via scipy.spatial.distance.cdist and multiprocessing.Pool psutil is used to evaluate available memory and minimize the number of parallel jobs for the available resources """ import numpy as np from scipy.spatial.distance import cdist from multiproc...
mit
Python
b7dc401403fb3dcfccb4f9dc96d737325cb3c98a
Use binary flag to determine if value should be bytes or utf8 (#24)
memsql/memsql-python
memsql/common/conversions.py
memsql/common/conversions.py
from MySQLdb.constants import FIELD_TYPE, FLAG from MySQLdb.converters import conversions, Bool2Str from MySQLdb import times, _mysql import datetime import inspect CONVERSIONS = conversions def _bytes_to_utf8(b): return b.decode('utf-8') CONVERSIONS[FIELD_TYPE.STRING] = ((FLAG.BINARY, bytes), (None, _bytes_to_u...
from MySQLdb.constants import FIELD_TYPE from MySQLdb.converters import conversions, Bool2Str from MySQLdb import times, _mysql import datetime import inspect CONVERSIONS = conversions def _bytes_to_utf8(b): return b.decode('utf-8') CONVERSIONS[FIELD_TYPE.STRING] = _bytes_to_utf8 CONVERSIONS[FIELD_TYPE.VAR_STRIN...
mit
Python
102a3740ac572a730216bc17dc1ceb8f76f84897
make this file safe for test collection
thomwiggers/onebot
getcookies.py
getcookies.py
import requests import pickle import json if __name__ == "__main__": with open('sites.json', 'r') as f: sites = json.load(f) for url, data in sites.items(): with requests.Session() as session: result = session.post(url, data=data) if result.ok: print("l...
import requests import pickle import json with open('sites.json', 'r') as f: sites = json.load(f) for url, data in sites.items(): with requests.Session() as session: result = session.post(url, data=data) if result.ok: print("logged in to {}".format(url)) with open('cookies.jar', '...
bsd-3-clause
Python
4345368363bf4dd1e0e80502418198eed61cd53b
secure api
zeckalpha/wx,zeckalpha/wx
wx/api.py
wx/api.py
from flask_peewee.rest import RestAPI, RestResource, UserAuthentication, \ AdminAuthentication from wx.app import app from wx.auth import auth from wx.models import User, Location, Station, Report, Value # See: http://flask-peewee.readthedocs.org/en/latest/rest-api.html # user_auth = UserAuthentication(auth) ad...
from flask_peewee.rest import RestAPI, RestResource, UserAuthentication, \ AdminAuthentication from wx.app import app from wx.auth import auth from wx.models import User, Location, Station, Report, Value user_auth = UserAuthentication(auth) admin_auth = AdminAuthentication(auth) api = RestAPI(app, default_auth=...
mit
Python
cee23192ee0a6bc1ef778b5145e54cca7d9c03f7
Bump app version to 2019.12.1
kernelci/kernelci-backend,kernelci/kernelci-backend
app/handlers/__init__.py
app/handlers/__init__.py
__version__ = "2019.12.1" __versionfull__ = __version__
__version__ = "2019.12.0" __versionfull__ = __version__
lgpl-2.1
Python
4240aca3bf96a505b252a3a4dcfc94b453d19c1f
Rename LwrWebApp.
ssorgatem/pulsar,galaxyproject/pulsar,ssorgatem/pulsar,natefoo/pulsar,jmchilton/pulsar,natefoo/pulsar,galaxyproject/pulsar,jmchilton/pulsar
pulsar/web/wsgi.py
pulsar/web/wsgi.py
import atexit import inspect from pulsar.core import PulsarApp from pulsar.web.framework import RoutingApp import pulsar.web.routes def app_factory(global_conf, **local_conf): """ Returns the LWR WSGI application. """ pulsar_app = PulsarApp(global_conf=global_conf, **local_conf) webapp = PulsarW...
import atexit import inspect from pulsar.core import PulsarApp from pulsar.web.framework import RoutingApp import pulsar.web.routes def app_factory(global_conf, **local_conf): """ Returns the LWR WSGI application. """ pulsar_app = PulsarApp(global_conf=global_conf, **local_conf) webapp = LwrWebA...
apache-2.0
Python
a8e55dfe00868e15df7ae097d5b7526e89d3b000
update tests to v1.2.0 (#1276)
behrtam/xpython,exercism/python,behrtam/xpython,jmluy/xpython,exercism/python,N-Parsons/exercism-python,exercism/xpython,smalley/python,jmluy/xpython,exercism/xpython,smalley/python,N-Parsons/exercism-python
exercises/rotational-cipher/rotational_cipher_test.py
exercises/rotational-cipher/rotational_cipher_test.py
import unittest import rotational_cipher # Tests adapted from `problem-specifications//canonical-data.json` @ v1.2.0 class RotationalCipher(unittest.TestCase): def test_rotate_a_by_0(self): self.assertEqual(rotational_cipher.rotate('a', 0), 'a') def test_rotate_a_by_1(self): self.assertEqua...
import unittest import rotational_cipher # Tests adapted from `problem-specifications//canonical-data.json` @ v1.1.0 class RotationalCipher(unittest.TestCase): def test_rotate_a_by_0(self): self.assertEqual(rotational_cipher.rotate('a', 0), 'a') def test_rotate_a_by_1(self): self.assertEqua...
mit
Python
79dee2c3d36f74a5eb508d9e9662d533a756f237
Add R, Julia, Matlab, and Stata to supported languages
fitzgen/pycco
pycco/languages.py
pycco/languages.py
""" A list of the languages that Pycco supports, mapping the file extension to the name of the Pygments lexer and the symbol that indicates a comment. To add another language to Pycco's repertoire, add it here. """ __all__ = ("supported_languages",) HASH = "#" SLASH_STAR = "/*" STAR_SLASH = "*/" SLASH_SLASH = "//" DA...
""" A list of the languages that Pycco supports, mapping the file extension to the name of the Pygments lexer and the symbol that indicates a comment. To add another language to Pycco's repertoire, add it here. """ __all__ = ("supported_languages",) HASH = "#" SLASH_STAR = "/*" STAR_SLASH = "*/" SLASH_SLASH = "//" DA...
mit
Python
d84ecb613f14f707fd5dd68796c034a3faa11f87
Fix bug in error reporting in browser/timer.py
brython-dev/brython,brython-dev/brython,kikocorreoso/brython,kikocorreoso/brython,kikocorreoso/brython,brython-dev/brython
www/src/Lib/browser/timer.py
www/src/Lib/browser/timer.py
from browser import console, window def wrap(func): # Transforms a function f into another function that prints a # traceback in case of exception def f(*args, **kw): try: return func(*args, **kw) except Exception as exc: msg = '' try: if ...
from browser import console, window def wrap(func): # Transforms a function f into another function that prints a # traceback in case of exception def f(*args, **kw): try: return func(*args, **kw) except Exception as exc: msg = '' try: if ...
bsd-3-clause
Python
e921e830b9ea0cf631695cb701caf979cd36da38
Fix exception type
borjaayerdi/pyjokes,martinohanlon/pyjokes,trojjer/pyjokes,gmarkall/pyjokes,ElectronicsGeek/pyjokes,bennuttall/pyjokes,pyjokes/pyjokes
pyjokes/pyjokes.py
pyjokes/pyjokes.py
from __future__ import absolute_import import random from .jokes_en import jokes_en from .jokes_de import jokes_de from .jokes_es import jokes_es all_jokes = { 'en': jokes_en, 'de': jokes_de, 'es': jokes_es, } class LanguageNotFoundError(Exception): pass class CategoryNotFoundError(Exception): ...
from __future__ import absolute_import import random from .jokes_en import jokes_en from .jokes_de import jokes_de from .jokes_es import jokes_es all_jokes = { 'en': jokes_en, 'de': jokes_de, 'es': jokes_es, } class LanguageNotFoundError(Exception): pass class CategoryNotFoundError(Exception): ...
bsd-3-clause
Python
222af52c4b48e0ecb478dcd567d8661b008d68b7
purge _connect_handlers()
ciappi/Yaranullin
yaranullin/network/server.py
yaranullin/network/server.py
# yaranullin/network/server.py # # Copyright (c) 2012 Marco Scopesi <marco.scopesi@gmail.com> # # Permission to use, copy, modify, and distribute this software for any # purpose with or without fee is hereby granted, provided that the above # copyright notice and this permission notice appear in all copies. # # THE SOF...
# yaranullin/network/server.py # # Copyright (c) 2012 Marco Scopesi <marco.scopesi@gmail.com> # # Permission to use, copy, modify, and distribute this software for any # purpose with or without fee is hereby granted, provided that the above # copyright notice and this permission notice appear in all copies. # # THE SOF...
isc
Python
6b2f016f8295e150c49f716764ad59a811d5b420
add a sample of prediction for precomputed kernel
Guokr1991/libsvm,cjlin1/libsvm,toothacher17/libsvm,cjlin1/libsvm,Maluuba/libsvm,DaveGeneral/libsvm,Guokr1991/libsvm,DaveGeneral/libsvm,mhdella/libsvm,mvtuong/Yelp-Challenge,Adoni/libsvm,Guokr1991/libsvm,DaveGeneral/libsvm,sdgdsffdsfff/libsvm,melissa-mccoy/libsvm,melissa-mccoy/libsvm,cjlin1/libsvm,mvtuong/Yelp-Challenge...
python/svm_test.py
python/svm_test.py
#!/usr/bin/env python from svm import * # a three-class problem labels = [0, 1, 1, 2] samples = [[0, 0], [0, 1], [1, 0], [1, 1]] problem = svm_problem(labels, samples); size = len(samples) kernels = [LINEAR, POLY, RBF] kname = ['linear','polynomial','rbf'] param = svm_parameter(C = 10,nr_weight = 2,weight_label = [...
#!/usr/bin/env python from svm import * # a three-class problem labels = [0, 1, 1, 2] samples = [[0, 0], [0, 1], [1, 0], [1, 1]] problem = svm_problem(labels, samples); size = len(samples) kernels = [LINEAR, POLY, RBF] kname = ['linear','polynomial','rbf'] param = svm_parameter(C = 10,nr_weight = 2,weight_label = [...
bsd-3-clause
Python
0ced7258fcee52222374ac35e47d206b8d9d311c
update release version 0.2.0
OGCMetOceanDWG/wmo-cmp-ts
pywcmp/__init__.py
pywcmp/__init__.py
# ================================================================= # # Terms and Conditions of Use # # Unless otherwise noted, computer program source code of this # distribution is covered under Crown Copyright, Government of # Canada, and is distributed under the MIT License. # # The Canada wordmark and related grap...
# ================================================================= # # Terms and Conditions of Use # # Unless otherwise noted, computer program source code of this # distribution is covered under Crown Copyright, Government of # Canada, and is distributed under the MIT License. # # The Canada wordmark and related grap...
mit
Python
c7107c2e822a780962326aa9f3eaeabd0644517a
implement serial command "alive": NAK, timeout and undefined cases
dmarku/raspibot,tuc-roboschool/raspibot
raspibot/Serial.py
raspibot/Serial.py
"""Implements the serial interface protocol of RaspiBot's Attiny firmware.""" from collections import namedtuple EncoderValues = namedtuple('EncoderValues', 'left right') # Named byte values for the protocol commands # Requests ALIVE = b'\x01' ENCODERS_RIGHT = b'\x02' ENCODERS_LEFT = b'\x03' ENCODERS_BOTH = b'\x04'...
"""Implements the serial interface protocol of RaspiBot's Attiny firmware.""" from collections import namedtuple EncoderValues = namedtuple('EncoderValues', 'left right') # Named byte values for the protocol commands # Requests ALIVE = b'\x01' ENCODERS_RIGHT = b'\x02' ENCODERS_LEFT = b'\x03' ENCODERS_BOTH = b'\x04'...
mit
Python
f52f2aafc204c3b19e04d05ac6fc1f10a4ea2463
Update comment to be more specific about stock fields
rcbuild-info/scrape,rcbuild-info/scrape
rcbi/rcbi/items.py
rcbi/rcbi/items.py
# -*- coding: utf-8 -*- # Define here the models for your scraped items # # See documentation in: # http://doc.scrapy.org/en/latest/topics/items.html import scrapy class Part(scrapy.Item): name = scrapy.Field() site = scrapy.Field() manufacturer = scrapy.Field() sku = scrapy.Field() weight = scr...
# -*- coding: utf-8 -*- # Define here the models for your scraped items # # See documentation in: # http://doc.scrapy.org/en/latest/topics/items.html import scrapy class Part(scrapy.Item): name = scrapy.Field() site = scrapy.Field() manufacturer = scrapy.Field() sku = scrapy.Field() weight = scr...
apache-2.0
Python
cbe543fa90646355fced953d52c0e12fc6328506
Bump version to 1.3.2
emory-libraries/readux,emory-libraries/readux,emory-libraries/readux
readux/__init__.py
readux/__init__.py
__version_info__ = (1, 3, 2, None) # Dot-connect all but the last. Last is dash-connected if not None. __version__ = '.'.join([str(i) for i in __version_info__[:-1]]) if __version_info__[-1] is not None: __version__ += ('-%s' % (__version_info__[-1],)) # context processor to add version to the template environm...
__version_info__ = (1, 3, 1, None) # Dot-connect all but the last. Last is dash-connected if not None. __version__ = '.'.join([str(i) for i in __version_info__[:-1]]) if __version_info__[-1] is not None: __version__ += ('-%s' % (__version_info__[-1],)) # context processor to add version to the template environm...
apache-2.0
Python
4bc036b9a7348946af852cfdabd5236620cab7b4
Update some imports
stefanseefeld/numba,pitrou/numba,gdementen/numba,pitrou/numba,numba/numba,ssarangi/numba,pombredanne/numba,sklam/numba,numba/numba,pombredanne/numba,stuartarchibald/numba,stuartarchibald/numba,stefanseefeld/numba,gmarkall/numba,numba/numba,sklam/numba,seibert/numba,gmarkall/numba,GaZ3ll3/numba,jriehl/numba,cpcloud/numb...
numba/typesystem/defaults.py
numba/typesystem/defaults.py
# -*- coding: utf-8 -*- """ Type defaults """ from __future__ import print_function, division, absolute_import from . itypesystem import TypeConverter, TypeSystem from . import promotion, constants, lowering from . import numbatypes as numba_domain from . import llvmtypes as llvm_domain from . import ctypestypes as ...
# -*- coding: utf-8 -*- """ Type defaults """ from __future__ import print_function, division, absolute_import from numba.typesystem import universe from numba.typesystem.itypesystem import TypeConverter, TypeSystem from numba.typesystem import promotion from numba.typesystem import constants from numba.typesystem i...
bsd-2-clause
Python
bdcc420420ffe4ba1e295dc22ea05fb033e061f2
Set Repour (devel) version to be 0.11.0
jsenko/repour,project-ncl/repour,project-ncl/repour,jsenko/repour
repour/__init__.py
repour/__init__.py
version = "0.11.0" __version__ = version
version = "0.1.0" __version__ = version
apache-2.0
Python
288508e0693da5dbfc467a01ac18b31c4f8cc16c
Clear command registry BEFORE each test.
cloudtools/nymms
nymms/tests/test_registry.py
nymms/tests/test_registry.py
import unittest from nymms import registry from nymms.resources import Command, MonitoringGroup from weakref import WeakValueDictionary class TestRegistry(unittest.TestCase): def setUp(self): # Ensure we have a fresh registry before every test Command.registry.clear() def test_empty_registry...
import unittest from nymms import registry from nymms.resources import Command, MonitoringGroup from weakref import WeakValueDictionary class TestRegistry(unittest.TestCase): def tearDown(self): # Ensure we have a fresh registry after every test Command.registry.clear() def test_empty_regist...
bsd-2-clause
Python
9d4ea794b63ebba5a72828ae3a74648dc1a91dae
bump version to 3.4.0
ndawe/root_numpy,ndawe/root_numpy,ibab/root_numpy,ibab/root_numpy,scikit-hep/root_numpy,rootpy/root_numpy,scikit-hep/root_numpy,rootpy/root_numpy,ibab/root_numpy,rootpy/root_numpy,ndawe/root_numpy,ibab/root_numpy,scikit-hep/root_numpy,scikit-hep/root_numpy,ndawe/root_numpy,rootpy/root_numpy
root_numpy/info.py
root_numpy/info.py
""" _ _ __ ___ ___ | |_ _ __ _ _ _ __ ___ _ __ _ _ | '__/ _ \ / _ \| __| | '_ \| | | | '_ ` _ \| '_ \| | | | | | | (_) | (_) | |_ | | | | |_| | | | | | | |_) | |_| | |_| \___/ \___/ \__|___|_| |_|\__,_|_| |_| |_| .__/ \__, | {0} |_____| |_| ...
""" _ _ __ ___ ___ | |_ _ __ _ _ _ __ ___ _ __ _ _ | '__/ _ \ / _ \| __| | '_ \| | | | '_ ` _ \| '_ \| | | | | | | (_) | (_) | |_ | | | | |_| | | | | | | |_) | |_| | |_| \___/ \___/ \__|___|_| |_|\__,_|_| |_| |_| .__/ \__, | {0} |_____| |_| ...
bsd-3-clause
Python
47107ab288463029da5e4cf91229420630c5c1f1
Add test for determinant of the inverse matrix expr
diofant/diofant,skirpichev/omg
diofant/matrices/expressions/tests/test_inverse.py
diofant/matrices/expressions/tests/test_inverse.py
import pytest from diofant.core import symbols from diofant.matrices.expressions import MatrixSymbol, Inverse from diofant.matrices import eye, Identity, ShapeError, det __all__ = () n, m, l = symbols('n m l', integer=True) A = MatrixSymbol('A', n, m) B = MatrixSymbol('B', m, l) C = MatrixSymbol('C', n, n) D = Matri...
import pytest from diofant.core import symbols from diofant.matrices.expressions import MatrixSymbol, Inverse from diofant.matrices import eye, Identity, ShapeError __all__ = () n, m, l = symbols('n m l', integer=True) A = MatrixSymbol('A', n, m) B = MatrixSymbol('B', m, l) C = MatrixSymbol('C', n, n) D = MatrixSymb...
bsd-3-clause
Python
06cada73289ef6d73bae14018bc2bcab4af25111
Revert back to memoize, deprecated but not yet removed.
thread/django-lightweight-queue,prophile/django-lightweight-queue,thread/django-lightweight-queue,prophile/django-lightweight-queue
django_lightweight_queue/utils.py
django_lightweight_queue/utils.py
import logging import importlib from django.apps import apps from django.core.exceptions import MiddlewareNotUsed from django.utils.functional import memoize from django.utils.module_loading import module_has_submodule from . import app_settings def configure_logging(level, format, filename): """ Like ``logg...
import logging import importlib from django.apps import apps from django.core.exceptions import MiddlewareNotUsed from django.utils.lru_cache import lru_cache from django.utils.module_loading import module_has_submodule from . import app_settings def configure_logging(level, format, filename): """ Like ``log...
bsd-3-clause
Python
9911dd4b662c3cd0c575952b91ff13348c82a56c
Fix typo
thread/django-lightweight-queue,thread/django-lightweight-queue
django_lightweight_queue/views.py
django_lightweight_queue/views.py
import io import json import logging from django import template from django.db import transaction from django.conf import settings from django.http import Http404, HttpResponse from .job import Job # Note: no authentication here -- ensure you only connect up this view in # development! def debug_run(request): ...
import io import json import logging from django import template from django.db import transaction from django.conf import settings from django.http import Http404, HttpResponse from .job import Job # Note: no authentication here -- ensure you only connect up this view in # development! def debug_run(request): ...
bsd-3-clause
Python
d08dead0f461953027ba9f094e00769f1f1ab71f
Fix unicode error when submitting jobs
ornl-ndav/django-remote-submission,ornl-ndav/django-remote-submission,ornl-ndav/django-remote-submission
django_remote_submission/tasks.py
django_remote_submission/tasks.py
from __future__ import absolute_import, unicode_literals, print_function import logging logger = logging.getLogger(__name__) import io import os.path import select import socket import six from paramiko.client import SSHClient, AutoAddPolicy from .models import Log, Job try: from celery import shared_task exce...
from __future__ import absolute_import, unicode_literals, print_function import logging logger = logging.getLogger(__name__) import io import os.path import select import socket import six from paramiko.client import SSHClient, AutoAddPolicy from .models import Log, Job try: from celery import shared_task exce...
isc
Python
1b519535f79db490069a242cc591cfd75d2e7394
Add endpoint handling to Token/Endpoint auth
varunarya10/keystonemiddleware
auth/test_token_endpoint.py
auth/test_token_endpoint.py
# Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under t...
# Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under t...
apache-2.0
Python
4aa3f5ef60bfeb6010b5d684faf3ee13859a4a32
exit on error
guoxuesong/deepstacks,guoxuesong/deepstacks
deepstacks/utils/async_iterate.py
deepstacks/utils/async_iterate.py
#!/usr/bin/env python # coding:utf-8 # vi:tabstop=4:shiftwidth=4:expandtab:sts=4 import os import sys import Queue import thread import traceback class AsyncIterate: def __init__(self,it): self.it=it self.instance=None self.quitflag=False self.q=Queue.Queue(2) def __copy__(se...
#!/usr/bin/env python # coding:utf-8 # vi:tabstop=4:shiftwidth=4:expandtab:sts=4 import Queue import thread class AsyncIterate: def __init__(self,it): self.it=it self.instance=None self.quitflag=False self.q=Queue.Queue(2) def __copy__(self): return AsyncIterate(self....
mit
Python
a8fb4a98b7a933d51eba53732f51f7086d63535e
Fix import path
pinax/metron,pinax/pinax-webanalytics,pinax/pinax-webanalytics,pinax/metron
pinax/webanalytics/templatetags/pinax_webanalytics_tags.py
pinax/webanalytics/templatetags/pinax_webanalytics_tags.py
from django import template from django.conf import settings from django.utils.safestring import mark_safe from .. import activity register = template.Library() @register.simple_tag(takes_context=True) def analytics(context): content = "" for kind, codes in getattr(settings, "PINAX_WEBANALYTICS_SETTINGS", ...
from django import template from django.conf import settings from django.utils.safestring import mark_safe from . import activity register = template.Library() @register.simple_tag(takes_context=True) def analytics(context): content = "" for kind, codes in getattr(settings, "PINAX_WEBANALYTICS_SETTINGS", {...
mit
Python
0056b2833e1dd1c702304e88b974c6421a7792b5
fix step_third.py
SeavantUUz/silence
prepare/step_third.py
prepare/step_third.py
#coding:utf-8 import curses import locale locale.setlocale(locale.LC_ALL,'') code = locale.getpreferredencoding() def covert(string): uni_str = string.decode('utf-8') lenth = len(uni_str) return uni_str.encode(code),lenth def line_resize(lines, width): count = len(lines) index = 0 while index ...
#coding:utf-8 import curses import locale locale.setlocale(locale.LC_ALL,'') code = locale.getpreferredencoding() def covert(string): uni_str = string.decode('utf-8') lenth = len(uni_str) return uni_str.encode(code),lenth def line_resize(lines, width): count = len(lines) index = 0 while index ...
mit
Python
8715e112a8299bc6db831c6b2df08901107a550a
Add --out option to generate graph at specific location instead of interactive display
justinccdev/opensimulator-tools,justinccdev/opensimulator-tools,justinccdev/opensimulator-tools,justinccdev/opensimulator-tools
analysis/opensimulator-stats-analyzer/src/ostagraph.py
analysis/opensimulator-stats-analyzer/src/ostagraph.py
#!/usr/bin/python import argparse import matplotlib.pyplot as plt from pylab import * from osta.osta import * ############ ### MAIN ### ############ parser = argparse.ArgumentParser(formatter_class = argparse.RawTextHelpFormatter) parser.add_argument( '--select', help = "Select the full name of a stat to gr...
#!/usr/bin/python import argparse import matplotlib.pyplot as plt from osta.osta import * ############ ### MAIN ### ############ parser = argparse.ArgumentParser(formatter_class = argparse.RawTextHelpFormatter) parser.add_argument( '--select', help = "Select the full name of a stat to graph (e.g. \"scene.Ke...
bsd-3-clause
Python
c1dc571faa9bf2ae0e0a580365943806826ced4a
Make flake8 happy for spd
liqd/adhocracy3.mercator,xs2maverick/adhocracy3.mercator,liqd/adhocracy3.mercator,fhartwig/adhocracy3.mercator,fhartwig/adhocracy3.mercator,fhartwig/adhocracy3.mercator,xs2maverick/adhocracy3.mercator,liqd/adhocracy3.mercator,liqd/adhocracy3.mercator,fhartwig/adhocracy3.mercator,liqd/adhocracy3.mercator,xs2maverick/adh...
src/adhocracy_spd/adhocracy_spd/workflows/digital_leben.py
src/adhocracy_spd/adhocracy_spd/workflows/digital_leben.py
"""Digital leben workflow.""" from adhocracy_core.workflows import add_workflow from adhocracy_core.workflows.standard import standard_meta digital_leben_meta = standard_meta \ .transform(('states', 'participate', 'acm'), {'principals': ['participan...
"""Digital leben workflow.""" from adhocracy_core.workflows import add_workflow from adhocracy_core.workflows.standard import standard_meta digital_leben_meta = standard_meta \ .transform(('states', 'participate', 'acm'), {'principals': [ 'parti...
agpl-3.0
Python
3be7444e8d3994f72172a47b231dc10ff6938867
Clean up quicktest to run under new layout.
dopplershift/Scattering
test/quicktest.py
test/quicktest.py
from scattering import _tmatrix as tmat from scattering import refractive_index m = refractive_index('water',3.0) ds = 5.0 qs,fmat,bmat= tmat.tmatrix(ds/2.0,1.0,30.0,m,1.0,-1) print qs print fmat print bmat
import numpy as N import tmatrix as tmat from scattering import refractive_index m = refractive_index('water',3.0) ds = 5.0 qs,fmat,bmat= tmat.tmatrix(ds/2.0,1.0,30.0,m,1.0,-1)
bsd-2-clause
Python
addefb6261f1bc066a9e35fd58534d027356eef8
add meminfo for linux
tehron/tehbot,spaceone/tehbot
plugins/meminfo/__init__.py
plugins/meminfo/__init__.py
import plugins import os from subprocess import Popen, PIPE def meminfo_win(): info = Popen('tasklist /fo list /fi "pid eq %d"' % os.getpid(), shell=True, stdout=PIPE).communicate()[0] info = info.strip() minfo = info.splitlines()[-1] return minfo.split(":", 1)[-1].strip() def meminfo(connection, chan...
import plugins import os from subprocess import Popen, PIPE def meminfo_win(): info = Popen('tasklist /fo list /fi "pid eq %d"' % os.getpid(), shell=True, stdout=PIPE).communicate()[0] info = info.strip() minfo = info.splitlines()[-1] return minfo.split(":", 1)[-1].strip() def meminfo(connection, chan...
mit
Python
b4923fd1f4e276281f66cfa7570080a87412b635
change couchdb server value to be fetched from settings
martindavid/amost-twitter-analytics,martindavid/amost-twitter-analytics,martindavid/amost-twitter-analytics,martindavid/amost-twitter-analytics
analytics/analytics.py
analytics/analytics.py
import datetime import couchdb from app.logger import LOGGER as log from app.tweet_analytics import TweetAnalytics from app.db import DB, AnalyticsLog import settings database = DB(settings.PG_DB_USER, settings.PG_DB_PASSWORD, settings.PG_DB_NAME) database.connect() server = couchdb.Server(url=settings....
import datetime import couchdb from app.logger import LOGGER as log from app.tweet_analytics import TweetAnalytics from app.db import DB, AnalyticsLog import settings database = DB(settings.PG_DB_USER, settings.PG_DB_PASSWORD, settings.PG_DB_NAME) database.connect() server = couchdb.Server(url='http://1...
mit
Python
d741a434047baa5b554f1d0b2f62feb79a2ec613
copy changes over to cms/envs/appsembler.py
gymnasium/edx-platform,appsembler/edx-platform,gymnasium/edx-platform,gymnasium/edx-platform,appsembler/edx-platform,appsembler/edx-platform,gymnasium/edx-platform,appsembler/edx-platform
cms/envs/appsembler.py
cms/envs/appsembler.py
import os import json from path import path SERVICE_VARIANT = os.environ.get('SERVICE_VARIANT', None) CONFIG_ROOT = path('/edx/app/edxapp/') #don't hardcode this in the future CONFIG_PREFIX = SERVICE_VARIANT + "." if SERVICE_VARIANT else "" with open(CONFIG_ROOT / CONFIG_PREFIX + 'env.json') as env_file: ENV_TOKE...
import os GOOGLE_TAG_MANAGER_ID = os.environ.get("GOOGLE_TAG_MANAGER_ID", None) #use server-vars.yml instead of `env` #include intercom stuff too
agpl-3.0
Python
41c17a88eabcac092592421a85c322132bf7e666
Update get_all_targeting_presets.py (#460)
googleads/googleads-python-lib
examples/ad_manager/v202002/targeting_preset_service/get_all_targeting_presets.py
examples/ad_manager/v202002/targeting_preset_service/get_all_targeting_presets.py
#!/usr/bin/env python # # Copyright 2019 Google Inc. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless requir...
#!/usr/bin/env python # # Copyright 2019 Google Inc. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless requir...
apache-2.0
Python
5776e16a93f804bbdb34bdcac5128ecac25f6e88
Fix a bunch of PEP8 warnings.
cfe-lab/MiCall,cfe-lab/MiCall,cfe-lab/MiCall
micall/core/filter_quality.py
micall/core/filter_quality.py
#! /usr/bin/env python import argparse import csv import itertools import logging import math import os import miseq_logging BAD_ERROR_RATE = 7.5 def parseArgs(): parser = argparse.ArgumentParser( description='Post-processing of short-read alignments.') parser.add_argument('quality_csv', ...
#! /usr/bin/env python import argparse import csv import itertools import logging import math import os import miseq_logging BAD_ERROR_RATE = 7.5 def parseArgs(): parser = argparse.ArgumentParser( description='Post-processing of short-read alignments.') parser.add_argument('quality_csv', ...
agpl-3.0
Python
dfe203151339f949b6190f3968844f7458f021c1
Remove local name sketch
googlefonts/fontdiffenator,googlefonts/fontdiffenator
Lib/diffenator/names.py
Lib/diffenator/names.py
"""Dump font's nametable""" from fontTools.ttLib import TTFont def dump_nametable(ttfont): table = [] name_table = ttfont['name'] for name in name_table.names: table.append({ 'string': name.toUnicode(), 'id': (name.nameID, name.platformID, name.platEncID, name.langID) ...
"""Dump font's nametable""" from fontTools.ttLib import TTFont def dump_nametable(ttfont): table = [] name_table = ttfont['name'] for name in name_table.names: table.append({ 'string': name.toUnicode(), 'id': (name.nameID, name.platformID, name.platEncID, name.langID) ...
apache-2.0
Python
f7ed442f8dca3e411943fd4c87b20a9128cb8e1f
Fix python 2 transition (unicode)
bbc2/porygon-ftp,bbc2/porygon-ftp,bbc2/porygon-ftp
indexer.py
indexer.py
#!/usr/bin/env python import ftplib import whoosh import whoosh.fields import whoosh.index import whoosh.qparser class Index(ftplib.FTP): def __init__(self, address, user, passwd): ftplib.FTP.__init__(self, address, timeout=5) self.login(user=user, passwd=passwd) schema = whoosh.fields.Sch...
#!/usr/bin/env python import ftplib import whoosh import whoosh.fields import whoosh.index import whoosh.qparser class Index(ftplib.FTP): def __init__(self, address, user, passwd): ftplib.FTP.__init__(self, address, timeout=5) self.login(user=user, passwd=passwd) schema = whoosh.fields.Sch...
mit
Python
8911a4d77c5ba4605aef982495ae1af819786ec7
remove comment
PnEcrins/GeoNature,PnEcrins/GeoNature,PnEcrins/GeoNature,PnEcrins/GeoNature
backend/geonature/migrations/versions/5f4c4b644844_delete_cascade_cor_dataset_territory.py
backend/geonature/migrations/versions/5f4c4b644844_delete_cascade_cor_dataset_territory.py
"""delete cascade on cor_dataset_territory and cor_dataset_protocol Revision ID: 5f4c4b644844 Revises: 2a2e5c519fd1 Create Date: 2021-10-07 15:27:06.364487 """ from alembic import op import sqlalchemy as sa # revision identifiers, used by Alembic. revision = '5f4c4b644844' down_revision = '2a2e5c519fd1' branch_lab...
"""delete cascade on cor_dataset_territory and cor_dataset_protocol Revision ID: 5f4c4b644844 Revises: 2a2e5c519fd1 Create Date: 2021-10-07 15:27:06.364487 """ from alembic import op import sqlalchemy as sa # revision identifiers, used by Alembic. revision = '5f4c4b644844' down_revision = '2a2e5c519fd1' branch_lab...
bsd-2-clause
Python
ef29e2dd9426d42312de6969b927b5315f3df115
Save images instead of paths in Catalog.
lamyj/redmill,lamyj/redmill,lamyj/redmill
src/redmill/catalog.py
src/redmill/catalog.py
# This file is part of Redmill. # # Redmill is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # Redmill is distributed in the ho...
# This file is part of Redmill. # # Redmill is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # Redmill is distributed in the ho...
agpl-3.0
Python
e32416430c16a51af673a78fb79d47c68464fa98
Update git (#819)
lgarren/spack,tmerrick1/spack,EmreAtes/spack,lgarren/spack,iulian787/spack,TheTimmy/spack,mfherbst/spack,iulian787/spack,skosukhin/spack,mfherbst/spack,TheTimmy/spack,skosukhin/spack,TheTimmy/spack,LLNL/spack,mfherbst/spack,iulian787/spack,TheTimmy/spack,mfherbst/spack,LLNL/spack,krafczyk/spack,EmreAtes/spack,iulian787...
var/spack/repos/builtin/packages/git/package.py
var/spack/repos/builtin/packages/git/package.py
from spack import * class Git(Package): """Git is a free and open source distributed version control system designed to handle everything from small to very large projects with speed and efficiency.""" homepage = "http://git-scm.com" url = "https://github.com/git/git/tarball/v2.7.1" ...
from spack import * class Git(Package): """Git is a free and open source distributed version control system designed to handle everything from small to very large projects with speed and efficiency.""" homepage = "http://git-scm.com" url = "https://github.com/git/git/tarball/v2.7.1" ...
lgpl-2.1
Python
ecda5277d06b94f6baeef5ad179133e6bb8e2ac1
Bump to 1.0.4 dev.
beol/reviewboard,bkochendorfer/reviewboard,brennie/reviewboard,KnowNo/reviewboard,Khan/reviewboard,atagar/ReviewBoard,asutherland/opc-reviewboard,atagar/ReviewBoard,1tush/reviewboard,bkochendorfer/reviewboard,Khan/reviewboard,KnowNo/reviewboard,Khan/reviewboard,reviewboard/reviewboard,sgallagher/reviewboard,brennie/rev...
reviewboard/__init__.py
reviewboard/__init__.py
# The version of Review Board. # # This is in the format of: # # (Major, Minor, Micro, alpha/beta/rc/final, Release Number, Released) # VERSION = (1, 0, 4, 'alpha', 0, False) def get_version_string(): version = '%s.%s' % (VERSION[0], VERSION[1]) if VERSION[2]: version += ".%s" % VERSION[2] if ...
# The version of Review Board. # # This is in the format of: # # (Major, Minor, Micro, alpha/beta/rc/final, Release Number, Released) # VERSION = (1, 0, 3, 'final', 0, True) def get_version_string(): version = '%s.%s' % (VERSION[0], VERSION[1]) if VERSION[2]: version += ".%s" % VERSION[2] if V...
mit
Python
1a1b75ee860aec2f590defecbe842551e771db65
add option for setting working directory
theascone/dckrmgr,theascone/dckrmgr
dckrmgr.py
dckrmgr.py
import os import sys import json import docker import argparse import importlib import jsonschema commands = {} def main(): cli = docker.Client('unix://var/run/docker.sock') p_src = os.path.dirname(os.path.abspath(__file__)) for file in os.listdir(os.path.join(p_src, 'commands')): ext_file = os....
import os import sys import json import docker import argparse import importlib import jsonschema commands = {} def main(): cli = docker.Client('unix://var/run/docker.sock') p_src = os.path.dirname(os.path.abspath(__file__)) for file in os.listdir(os.path.join(p_src, 'commands')): ext_file = os.p...
mit
Python
596c92d1e7af706bc60ccff79f311a8570f5b8d0
improve `run_check` compatibility
Wattpad/dd-agent,cberry777/dd-agent,takus/dd-agent,manolama/dd-agent,jyogi/purvar-agent,Wattpad/dd-agent,takus/dd-agent,manolama/dd-agent,takus/dd-agent,cberry777/dd-agent,Wattpad/dd-agent,jyogi/purvar-agent,cberry777/dd-agent,jyogi/purvar-agent,manolama/dd-agent,takus/dd-agent,Wattpad/dd-agent,manolama/dd-agent,cberry...
utils/debug.py
utils/debug.py
# (C) Datadog, Inc. 2010-2016 # All rights reserved # Licensed under Simplified BSD License (see LICENSE) # stdlib from pprint import pprint import inspect import os import sys # datadog from config import get_checksd_path, get_confd_path from util import get_os def run_check(name, path=None): """ Test cust...
# (C) Datadog, Inc. 2010-2016 # All rights reserved # Licensed under Simplified BSD License (see LICENSE) # stdlib from pprint import pprint import inspect import os import sys # datadog from config import get_checksd_path, get_confd_path from util import get_os def run_check(name, path=None): """ Test cust...
bsd-3-clause
Python
e3f885ea4642ba5372237b9c01ff978066ed0e84
create super user
henryyang42/NTHUOJ_web,drowsy810301/NTHUOJ_web,Changron/NTHUOJ_web,bbiiggppiigg/NTHUOJ_web,geniusgordon/NTHUOJ_web,Changron/NTHUOJ_web,bbiiggppiigg/NTHUOJ_web,drowsy810301/NTHUOJ_web,henryyang42/NTHUOJ_web,nthuoj/NTHUOJ_web,nthuoj/NTHUOJ_web,henryyang42/NTHUOJ_web,nthuoj/NTHUOJ_web,geniusgordon/NTHUOJ_web,Changron/NTHU...
install.py
install.py
''' The MIT License (MIT) Copyright (c) 2014 NTHUOJ team 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, ...
''' The MIT License (MIT) Copyright (c) 2014 NTHUOJ team 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, ...
mit
Python
66aed1d641083ed77879d2cd13bc55d2744f7605
Update graph_io.py (#11425)
gautam1858/tensorflow,benoitsteiner/tensorflow-xsmm,laszlocsomor/tensorflow,cxxgtxy/tensorflow,mixturemodel-flow/tensorflow,kevin-coder/tensorflow-fork,jostep/tensorflow,Intel-tensorflow/tensorflow,laszlocsomor/tensorflow,gojira/tensorflow,andrewcmyers/tensorflow,karllessard/tensorflow,girving/tensorflow,tensorflow/ten...
tensorflow/python/framework/graph_io.py
tensorflow/python/framework/graph_io.py
# Copyright 2015 The TensorFlow 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/licenses/LICENSE-2.0 # # Unless required by applica...
# Copyright 2015 The TensorFlow 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/licenses/LICENSE-2.0 # # Unless required by applica...
apache-2.0
Python
1d11f8d123709626ba3e41b7697a1511c034ab55
Add time serial test, buy or sell point.
toomore/goristock
timeser.py
timeser.py
#!/usr/bin/env python # -*- coding: utf-8 -*- from goristock import goristock a = goristock(2201) while len(a.raw_data) > 19: a.raw_data.pop() a.data_date.pop() a.stock_range.pop() a.stock_vol.pop() if a.MAC(3) == '↑' and a.MAC(6) == '↑' and a.MAC(18) == '↑': #if a.MAO(3,6)[0][1][-1] < 0 and a.MAO(3,6)[1]...
#!/usr/bin/env python # -*- coding: utf-8 -*- from goristock import goristock a = goristock(8261) for i in range(3): a.display(3,6,9) a.raw_data.pop() a.data_date.pop() a.stock_range.pop() a.stock_vol.pop() a.display(3,6,9)
mit
Python
e21be03d5b006f39ac66a37cb3b0df60fe3de715
Use floor division when calculating milliseconds
cdown/srt
tinysrt.py
tinysrt.py
#!/usr/bin/env python import re import datetime from collections import namedtuple SUBTITLE_PATTERN = '(\d+)\n(\d+:\d+:\d+,\d+) --> (\d+:\d+:\d+,\d+)\n(.+?)\n\n' SUBTITLE_REGEX = re.compile(SUBTITLE_PATTERN, re.MULTILINE | re.DOTALL) Subtitle = namedtuple('Subtitle', ['index', 'start', 'end', 'content']) def _timed...
#!/usr/bin/env python import re import datetime from collections import namedtuple SUBTITLE_PATTERN = '(\d+)\n(\d+:\d+:\d+,\d+) --> (\d+:\d+:\d+,\d+)\n(.+?)\n\n' SUBTITLE_REGEX = re.compile(SUBTITLE_PATTERN, re.MULTILINE | re.DOTALL) Subtitle = namedtuple('Subtitle', ['index', 'start', 'end', 'content']) def _timed...
mit
Python
d2a8b24d7647dd87195293a7c1876468748641d7
Extend constructor to allow parameters to be auto-populated.
jevonearth/rtpproxy,sippy/rtpproxy,dsanders11/rtpproxy,synety-jdebp/rtpproxy,sippy/rtpproxy,sippy/rtp_cluster,synety-jdebp/rtpproxy,sippy/rtp_cluster,jevonearth/rtpproxy,synety-jdebp/rtpproxy,jevonearth/rtpproxy,sippy/rtpproxy,jevonearth/rtpproxy,dsanders11/rtpproxy,dsanders11/rtpproxy,synety-jdebp/rtpproxy
SdpOrigin.py
SdpOrigin.py
# Copyright (c) 2003-2005 Maxim Sobolev. All rights reserved. # Copyright (c) 2006-2007 Sippy Software, Inc. All rights reserved. # # This file is part of SIPPY, a free RFC3261 SIP stack and B2BUA. # # SIPPY is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License a...
# Copyright (c) 2003-2005 Maxim Sobolev. All rights reserved. # Copyright (c) 2006-2007 Sippy Software, Inc. All rights reserved. # # This file is part of SIPPY, a free RFC3261 SIP stack and B2BUA. # # SIPPY is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License a...
bsd-2-clause
Python
ac9436553b3372b580ce28ac6f6c8fe889e7efea
add interface for the lefted data
jasonwbw/jason_putils
putils/random/randk.py
putils/random/randk.py
#!/usr/bin/env python # -*- coding: UTF-8 -*- ''' This is a tool for random select k element from an unknow length data set @Author : Jasonwbw@yahoo.com ''' import random def random_k(iterator, k, need_lefts=False): ''' Random select k element Args: iterator : iterator of data set k...
#!/usr/bin/env python # -*- coding: UTF-8 -*- ''' This is a tool for random select k element from an unknow length data set @Author : Jasonwbw@yahoo.com ''' import random def random_k(iterator, k): ''' Random select k element Args: iterator : iterator of data set k : top k to c...
apache-2.0
Python
8d4473e7d6043ae402a888980eb7fd71f419ee88
update dev version after 0.21.0 tag [skip ci]
desihub/desisim,desihub/desisim
py/desisim/_version.py
py/desisim/_version.py
__version__ = '0.21.0.dev1095'
__version__ = '0.21.0'
bsd-3-clause
Python
77434f7e071683fa554aae1eb7f762ccf57d8d76
Bump version number to 0.2.0
Saturn/pushbullet.py,randomchars/pushbullet.py,aerobit/pushbullet.py,kovacsbalu/pushbullet.py
pushbullet/__init__.py
pushbullet/__init__.py
from .pushbullet import PushBullet __version__ = "0.2.0"
from .pushbullet import PushBullet __version__ = "0.1.1"
mit
Python
e510f755628d2aa511a4bca63305afde8be0a1b8
Make the rop command work, add documentation
cebrusfs/217gdb,disconnect3d/pwndbg,anthraxx/pwndbg,cebrusfs/217gdb,pwndbg/pwndbg,0xddaa/pwndbg,pwndbg/pwndbg,0xddaa/pwndbg,anthraxx/pwndbg,anthraxx/pwndbg,cebrusfs/217gdb,anthraxx/pwndbg,pwndbg/pwndbg,zachriggle/pwndbg,zachriggle/pwndbg,disconnect3d/pwndbg,0xddaa/pwndbg,disconnect3d/pwndbg,chubbymaggie/pwndbg,pwndbg/p...
pwndbg/commands/rop.py
pwndbg/commands/rop.py
from __future__ import print_function import argparse import re import subprocess import tempfile import gdb import pwndbg.commands import pwndbg.vmmap parser = argparse.ArgumentParser(description="Dump ROP gadgets with Jon Salwan's ROPgadget tool.", epilog="Example: rop --grep 'pop rd...
from __future__ import print_function import os import gdb import pwndbg.commands import pwndbg.vmmap @pwndbg.commands.Command def rop(start=None, stop=None): """ Dump ROP gadgets. Optionally specify an address to dump all gadgets in that memory area, or also specify a stop address. Searches exe...
mit
Python
9b721442d88722995bb18f7b35a49266dc061608
Update __init__.py
huiyi1990/Pylsy,huiyi1990/Pylsy,bcho/Pylsy,bcho/Pylsy,muteness/Pylsy,muteness/Pylsy,gnithin/Pylsy,gnithin/Pylsy
pylsy/__init__.py
pylsy/__init__.py
from __future__ import absolute_import from pylsy.pylsy import PylsyTable __version__ = "1.003"
from __future__ import absolute_import from pylsy.pylsy import PylsyTable __version__="1.003"
mit
Python
8b1a1c8436826848008320ae420b23dc08f5984e
Fix import
jackfirth/pyramda
pamda/private/curry_spec/make_func_curry_spec.py
pamda/private/curry_spec/make_func_curry_spec.py
from inspect import getargspec from .curry_spec import CurrySpec from ..accepts_varargs import accepts_varargs class CurrySpecVarargError(ValueError): def __init__(self, f): name = f.__name__ message_template = "Cannot curry var-arg or var-kwarg function {0}" message = message_template.for...
from inspect import getargspec from .curry_spec import CurrySpec, CurrySpecVarargError from ..accepts_varargs import accepts_varargs class CurrySpecVarargError(ValueError): def __init__(self, f): name = f.__name__ message_template = "Cannot curry var-arg or var-kwarg function {0}" message ...
mit
Python
9d3506209cf618597977610c4534793a00644c86
update devices api
xiaocong/remote-task-http-server
devices.py
devices.py
#!/usr/bin/env python # -*- coding: utf-8 -*- from bottle import Bottle, request import adb app = Bottle() @app.get("/") def devices(): result = {'android': []} good_devices = adb.devices(status='good') for se, name in adb.devices(status=request.params.get("status", "all")).items(): device = {'a...
#!/usr/bin/env python # -*- coding: utf-8 -*- from bottle import Bottle, request import adb app = Bottle() @app.get("/") def devices(): result = {'android': []} good_devices = adb.devices(status='good') for se, name in adb.devices(status=request.params.get("status", "all")).items(): device = {'a...
mit
Python
4bf7c8f1522b433cbe7b9b9312a51942a9ea75c1
Add modules to pytac namespace.
willrogers/pytac,willrogers/pytac
pytac/__init__.py
pytac/__init__.py
"""Pytac: Python Toolkit for Accelerator Controls.""" # PV types SP = 'setpoint' RB = 'readback' # Unit systems ENG = 'engineering' PHYS = 'physics' # Model types. SIM = 'simulation' LIVE = 'live' from . import device, element, lattice, load_csv, lattice, utils
"""Pytac: Python Toolkit for Accelerator Controls.""" # PV types SP = 'setpoint' RB = 'readback' # Unit systems ENG = 'engineering' PHYS = 'physics' # Model types. SIM = 'simulation' LIVE = 'live'
apache-2.0
Python
b29cbd529bd3260f25d067ef48ad6a9980cc5202
Sort models by creation time by default.
bueda/django-comrade
comrade/core/models.py
comrade/core/models.py
from django.db import models class ComradeBaseModel(models.Model): created = models.DateTimeField(auto_now_add=True) modified = models.DateTimeField(auto_now=True) def __str__(self): return self.__unicode__() def __repr__(self): return self.__unicode__() class Meta: abstr...
from django.db import models class ComradeBaseModel(models.Model): created = models.DateTimeField(auto_now_add=True) modified = models.DateTimeField(auto_now=True) def __str__(self): return self.__unicode__() def __repr__(self): return self.__unicode__() class Meta: abstr...
mit
Python
41ea0be68b9e737291c34f433e841a5ea0f9654e
Update New_studies-microbes.py
OpenTreeOfLife/gcmdr
New_studies-microbes.py
New_studies-microbes.py
""" these are the studies that may go into the next round of synthesis """ studytreelist=[ "2862_6649", # Scuticociliatia (Ciliates). Gao et al. 2014. MPE ## currently unrooted "2863_6650", # Oligohymenophorea (Ciliates). Gao et al. 2013. MPE ## currently unrooted "2739_6601", # blue-green algae (Cyanobacteri...
""" these are the studies that may go into the next round of synthesis """ studytreelist=[ "2862_6649", # Scuticociliatia (Ciliates). Gao et al. 2014. MPE ## currently unrooted "2863_6650", # Oligohymenophorea (Ciliates). Gao et al. 2013. MPE ## currently unrooted "2739_6601", # blue-green algae (Cyanobacteri...
bsd-2-clause
Python
a9d6b8ff42fe6dae988f8157d1b814e2169ce941
fix for null source urls
fnp/redakcja,fnp/redakcja,fnp/redakcja,fnp/redakcja
apps/cover/management/commands/refresh_covers.py
apps/cover/management/commands/refresh_covers.py
# -*- coding: utf-8 -*- # # This file is part of FNP-Redakcja, licensed under GNU Affero GPLv3 or later. # Copyright © Fundacja Nowoczesna Polska. See NOTICE for more information. # import urllib2 as urllib from optparse import make_option from django.core.files.base import ContentFile from django.core.management impo...
# -*- coding: utf-8 -*- # # This file is part of FNP-Redakcja, licensed under GNU Affero GPLv3 or later. # Copyright © Fundacja Nowoczesna Polska. See NOTICE for more information. # import urllib2 as urllib from optparse import make_option from django.core.files.base import ContentFile from django.core.management impo...
agpl-3.0
Python
aff474911e21bccfa564c08712b13f4cd3ad75ba
Disable screenshot test on Mac
benschmaus/catapult,catapult-project/catapult-csm,catapult-project/catapult,catapult-project/catapult,benschmaus/catapult,benschmaus/catapult,catapult-project/catapult,catapult-project/catapult-csm,catapult-project/catapult-csm,benschmaus/catapult,catapult-project/catapult,catapult-project/catapult,benschmaus/catapult,...
telemetry/telemetry/internal/backends/chrome_inspector/inspector_page_unittest.py
telemetry/telemetry/internal/backends/chrome_inspector/inspector_page_unittest.py
# Copyright 2013 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. from telemetry import decorators from telemetry.testing import tab_test_case from telemetry.util import image_util class InspectorPageTest(tab_test_case.Ta...
# Copyright 2013 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. from telemetry import decorators from telemetry.testing import tab_test_case from telemetry.util import image_util class InspectorPageTest(tab_test_case.Ta...
bsd-3-clause
Python
9196779cdc2a6a556b13afaddf725041cce2c6ef
Update run_userfcn.py
praba230890/PYPOWER
pypower/run_userfcn.py
pypower/run_userfcn.py
# Copyright (c) 1996-2015 PSERC. All rights reserved. # Use of this source code is governed by a BSD-style # license that can be found in the LICENSE file. """Runs the userfcn callbacks for a given stage. """ from pypower.util import feval def run_userfcn(userfcn, stage, *args2): """Runs the userfcn callbacks f...
# Copyright 1996-2015 PSERC. All rights reserved. # Use of this source code is governed by a BSD-style # license that can be found in the LICENSE file. """Runs the userfcn callbacks for a given stage. """ from pypower.util import feval def run_userfcn(userfcn, stage, *args2): """Runs the userfcn callbacks for a...
bsd-3-clause
Python
30044f8272557dbd367eab3dbe7c1ba1076484e9
Enable video content for cms pages
emory-libraries/readux,emory-libraries/readux,emory-libraries/readux
readux/pages/models.py
readux/pages/models.py
from django.db import models # Create your models here. from django.utils.translation import ugettext_lazy as _ from feincms.module.page.models import Page from feincms.content.richtext.models import RichTextContent from feincms.content.medialibrary.models import MediaFileContent from feincms.content.video.models im...
from django.db import models # Create your models here. from django.utils.translation import ugettext_lazy as _ from feincms.module.page.models import Page from feincms.content.richtext.models import RichTextContent from feincms.content.medialibrary.models import MediaFileContent # Page.register_extensions('datepub...
apache-2.0
Python
697222bffd18f47a667d8a67a9f5ddeff8f0dde1
bump version
spinus/pytest-bdd,pytest-dev/pytest-bdd
pytest_bdd/__init__.py
pytest_bdd/__init__.py
"""pytest-bdd public API.""" __version__ = '2.9.1' try: from pytest_bdd.steps import given, when, then from pytest_bdd.scenario import scenario, scenarios __all__ = [given.__name__, when.__name__, then.__name__, scenario.__name__, scenarios.__name__] except ImportError: # avoid import errors when onl...
"""pytest-bdd public API.""" __version__ = '2.9.0' try: from pytest_bdd.steps import given, when, then from pytest_bdd.scenario import scenario, scenarios __all__ = [given.__name__, when.__name__, then.__name__, scenario.__name__, scenarios.__name__] except ImportError: # avoid import errors when onl...
mit
Python
279474994fd206b2a5dec975f6b1c216a7c5f6ab
Update __init__.py
alvations/pywsd,alvations/pywsd
pywsd/__init__.py
pywsd/__init__.py
#!/usr/bin/env python -*- coding: utf-8 -*- # # Python Word Sense Disambiguation (pyWSD) # # Copyright (C) 2014-2017 alvations # URL: # For license information, see LICENSE.md from __future__ import absolute_import import pywsd.lesk import pywsd.baseline import pywsd.similarity #import semcor #import semeval from p...
#!/usr/bin/env python -*- coding: utf-8 -*- # # Python Word Sense Disambiguation (pyWSD) # # Copyright (C) 2014-2017 alvations # URL: # For license information, see LICENSE.md import pywsd.lesk import pywsd.baseline import pywsd.similarity #import semcor #import semeval from pywsd.allwords_wsd import disambiguate
mit
Python
82db1b375b39b7e8819175a9af60170c154721be
Add option to manually set SERVER_SOFTWARE environment variable.
andialbrecht/django-gae2django,bubenkoff/bubenkoff-gae2django,bubenkoff/bubenkoff-gae2django,andialbrecht/django-gae2django
gae2django/__init__.py
gae2django/__init__.py
# # Copyright 2008 Andi Albrecht <albrecht.andi@gmail.com> # # 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...
# # Copyright 2008 Andi Albrecht <albrecht.andi@gmail.com> # # 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...
apache-2.0
Python
2b394f04401f06a357955e1442c8c86ebdd47f0c
Add channel_count and concatenate_channel to __init__
oysstu/pyxtf
pyxtf/__init__.py
pyxtf/__init__.py
from pyxtf.xtf_ctypes import * from pyxtf.xtf_io import xtf_read, channel_count, concatenate_channel
from pyxtf.xtf_ctypes import * from pyxtf.xtf_io import xtf_read
mit
Python
ad1dcdd3b0025f0ade265d6d9a97c9b58d6d6408
Update syndiotactic_PNB.py
polysimtools/pysimm,polysimtools/pysimm
Examples/12_ps_tacticities/syndiotactic_PNB/syndiotactic_PNB.py
Examples/12_ps_tacticities/syndiotactic_PNB/syndiotactic_PNB.py
from pysimm import system, lmps, forcefield from pysimm.apps.random_walk import random_walk_tacticity from pysimm.models.monomers.dreiding.NbTMS_H2_tacticity import monomer as NbTMS def run(test=False): # we'll make a polystyrene monomer from the pysimm models database A = NbTMS() # we'll instantiate ...
from pysimm import system, lmps, forcefield from pysimm.apps.random_walk_tacticity import random_walk_tacticity from pysimm.models.monomers.dreiding.NbTMS_H2_tacticity import monomer as NbTMS def run(test=False): # we'll make a polystyrene monomer from the pysimm models database A = NbTMS() # we'll in...
mit
Python
3933cbb2c36a3c0f63350220a3f3dfba8c04460c
change comparison
saltstack/salt,saltstack/salt,saltstack/salt,saltstack/salt,saltstack/salt
salt/modules/useradd.py
salt/modules/useradd.py
''' Manage users with the useradd command ''' import pwd def __virtual__(): ''' Set the user module if the kernel is Linux ''' return 'user' if __grains__['kernel'] == 'Linux' else False def add(name, uid=None, gid=None, groups=None, home=False, shell='/bin/fal...
''' Manage users with the useradd command ''' import pwd def __virtual__(): ''' Set the user module if the kernel is Linux ''' return 'user' if __grains__['kernel'] == 'Linux' else False def add(name, uid=None, gid=None, groups=None, home=False, shell='/bin/fal...
apache-2.0
Python
2ee1dab825038d1bbd982db5fa2fe35c1c579195
Refactor new win_ntp module
saltstack/salt,saltstack/salt,saltstack/salt,saltstack/salt,saltstack/salt
salt/modules/win_ntp.py
salt/modules/win_ntp.py
# -*- coding: utf-8 -*- ''' Management of NTP servers on Windows ''' # Import python libs import logging # Import salt libs import salt.utils log = logging.getLogger(__name__) def __virtual__(): ''' This only supports Windows ''' if not salt.utils.is_windows(): return False return 'ntp'...
# -*- coding: utf-8 -*- ''' Management of NTP servers on Windows ''' # Import python libs import logging # Import salt libs import salt.utils log = logging.getLogger(__name__) def __virtual__(): ''' This only supports Windows ''' if not salt.utils.is_windows(): return False return 'ntp'...
apache-2.0
Python
3e91871be8f59aa91f40156c72ade90451edbcda
Rename QueriesLimitsTest -> QueryLimitsTest
scylladb/scylla-cluster-tests,amoskong/scylla-cluster-tests,scylladb/scylla-cluster-tests,scylladb/scylla-cluster-tests,amoskong/scylla-cluster-tests,amoskong/scylla-cluster-tests,scylladb/scylla-cluster-tests,amoskong/scylla-cluster-tests,amoskong/scylla-cluster-tests,scylladb/scylla-longevity-tests,scylladb/scylla-lo...
queries-limits.py
queries-limits.py
#!/usr/bin/env python from avocado import main from sdcm.tester import ClusterTester from sdcm.tester import clean_aws_resources class QueryLimitsTest(ClusterTester): """ Test scylla cluster growth (adding nodes after an initial cluster size). :avocado: enable """ @clean_aws_resources def...
#!/usr/bin/env python from avocado import main from sdcm.tester import ClusterTester from sdcm.tester import clean_aws_resources class QueriesLimitsTest(ClusterTester): """ Test scylla cluster growth (adding nodes after an initial cluster size). :avocado: enable """ @clean_aws_resources d...
agpl-3.0
Python
eed84c785075ce33101b00faab7979031ba66118
Bump version
renalreg/radar,renalreg/radar,renalreg/radar,renalreg/radar
radar/__init__.py
radar/__init__.py
__version__ = '2.11.2'
__version__ = '2.11.1'
agpl-3.0
Python
32725adcaf4b534fdc7438bf7dce78534a94b3c2
add close database connection function.
constanthatz/learning-journal,constanthatz/learning-journal
journal.py
journal.py
# -*- coding: utf-8 -*- import os import logging from pyramid.config import Configurator from pyramid.session import SignedCookieSessionFactory from pyramid.view import view_config from waitress import serve import psycopg2 from contextlib import closing from pyramid.events import NewRequest, subscriber import transact...
# -*- coding: utf-8 -*- import os import logging from pyramid.config import Configurator from pyramid.session import SignedCookieSessionFactory from pyramid.view import view_config from waitress import serve import psycopg2 from contextlib import closing from pyramid.events import NewRequest, subscriber DB_SCHEMA = ""...
mit
Python
c81043ba428fae2b6c4d66da48fe8c6ac9a21002
Add unit testing for emails (#3281)
SchrodingersGat/InvenTree,SchrodingersGat/InvenTree,SchrodingersGat/InvenTree,SchrodingersGat/InvenTree,inventree/InvenTree,inventree/InvenTree,inventree/InvenTree,inventree/InvenTree
InvenTree/plugin/builtin/integration/test_core_notifications.py
InvenTree/plugin/builtin/integration/test_core_notifications.py
"""Tests for core_notifications.""" from django.core import mail from part.test_part import BaseNotificationIntegrationTest from plugin import registry from plugin.builtin.integration.core_notifications import \ CoreNotificationsPlugin from plugin.models import NotificationUserSetting class CoreNotificationTest...
"""Tests for core_notifications.""" from part.test_part import BaseNotificationIntegrationTest from plugin import registry from plugin.builtin.integration.core_notifications import \ CoreNotificationsPlugin from plugin.models import NotificationUserSetting class CoreNotificationTestTests(BaseNotificationIntegrat...
mit
Python
aa6e507e8911d5c8cb936a023a51684b9aee962e
fix typo in import
jantman/pydnstest
dnstest.py
dnstest.py
#!/usr/bin/env python """ Script to facilitate confirmation of DNS changes on a staging DNS server, comparing to prod. Requirements: - pydns from <http://pydns.sourceforge.net/> See example_dns_test.py for usage - this should be called as a module from that script. By Jason Antman <jason@jasonantman.com> ToDo: flag...
#!/usr/bin/env python """ Script to facilitate confirmation of DNS changes on a staging DNS server, comparing to prod. Requirements: - pydns from <http://pydns.sourceforge.net/> See example_dns_test.py for usage - this should be called as a module from that script. By Jason Antman <jason@jasonantman.com> ToDo: flag...
agpl-3.0
Python
2c7baf580631fc5a78b59560f65b5283b74f347b
Add /firefox/nightly/all/ to download link tests
mozilla/bedrock,alexgibson/bedrock,mkmelin/bedrock,TheoChevalier/bedrock,sgarrity/bedrock,pascalchevrel/bedrock,CSCI-462-01-2017/bedrock,CSCI-462-01-2017/bedrock,schalkneethling/bedrock,flodolo/bedrock,schalkneethling/bedrock,flodolo/bedrock,sylvestre/bedrock,pascalchevrel/bedrock,sylvestre/bedrock,gerv/bedrock,craigco...
tests/functional/test_download_l10n.py
tests/functional/test_download_l10n.py
# This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at http://mozilla.org/MPL/2.0/. from bs4 import BeautifulSoup import pytest import requests def pytest_generate_tests(metafunc): if 'not headless'...
# This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at http://mozilla.org/MPL/2.0/. from bs4 import BeautifulSoup import pytest import requests def pytest_generate_tests(metafunc): if 'not headless'...
mpl-2.0
Python
bcc2fbe6877f2b325c020d3a7c7ff1344ea777a0
add type conversion for batch_size
baidu/Paddle,jacquesqiao/Paddle,reyoung/Paddle,QiJune/Paddle,jacquesqiao/Paddle,QiJune/Paddle,jacquesqiao/Paddle,PaddlePaddle/Paddle,baidu/Paddle,chengduoZH/Paddle,jacquesqiao/Paddle,luotao1/Paddle,luotao1/Paddle,reyoung/Paddle,QiJune/Paddle,luotao1/Paddle,PaddlePaddle/Paddle,luotao1/Paddle,PaddlePaddle/Paddle,reyoung/...
python/paddle/batch.py
python/paddle/batch.py
# Copyright (c) 2016 PaddlePaddle 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/licenses/LICENSE-2.0 # # Unless required by applic...
# Copyright (c) 2016 PaddlePaddle 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/licenses/LICENSE-2.0 # # Unless required by applic...
apache-2.0
Python
c5b328a4067aa430cd36dca838f9902f49452ce6
Add tanh to generator
vanhuyz/CycleGAN-TensorFlow,vanhuyz/CycleGAN-TensorFlow
generator.py
generator.py
import tensorflow as tf import ops class Generator: def __init__(self, name): self.name = name self.reuse = False def __call__(self, input): """ Args: input: batch_size x 128 x 128 x 3 Returns: output: same size as input """ with tf.variable_scope(self.name): # convol...
import tensorflow as tf import ops class Generator: def __init__(self, name): self.name = name self.reuse = False def __call__(self, input): """ Args: input: batch_size x 128 x 128 x 3 Returns: output: same size as input """ with tf.variable_scope(self.name): # convol...
mit
Python
3fe750b0251ec8c83c4423a494fa852cf3429fab
reformat code
VarchukVladimir/gizer,VarchukVladimir/gizer,YaroslavLitvinov/gizer,YaroslavLitvinov/gizer,VarchukVladimir/gizer,YaroslavLitvinov/gizer
d_utils.py
d_utils.py
__author__ = 'Volodymyr Varchuk' __email__ = "vladimir.varchuk@rackspace.com" import string def get_field_name_without_underscore(field_name): for i in range(len(field_name)): if field_name[i].isalpha(): s = field_name[i:] break return s def isIdField(field_name): if fie...
__author__ = 'Volodymyr Varchuk' __email__ = "vladimir.varchuk@rackspace.com" import string def get_field_name_without_underscore(field_name): for i in range(len(field_name)): if field_name[i].isalpha(): s = field_name[i:] break return s def isIdField(field_name): if fie...
apache-2.0
Python
c0f12c2ff2c9734cda3f0e7c76faa4f3d67ffb2e
Refactor test case
kvesteri/sqlalchemy-i18n,rmoorman/sqlalchemy-i18n
tests/test_single_table_inheritance.py
tests/test_single_table_inheritance.py
import sqlalchemy as sa from sqlalchemy.ext.declarative import declarative_base from sqlalchemy_i18n import Translatable from tests import TestCase class TestPropertyCollisionWithSingleTableInheritance(TestCase): def create_models(self): class TextItem(self.Model, Translatable): __tablename__ ...
import sqlalchemy as sa from sqlalchemy.ext.declarative import declarative_base from sqlalchemy_i18n import Translatable from tests import TestCase class TestPropertyCollisionWithSingleTableInheritance(TestCase): def create_models(self): class TextItem(self.Model, Translatable): __tablename__ ...
bsd-3-clause
Python
15a7b1a1f9bc60aa4d9e5b79b41a3407e123fd26
Add extension for item_price
Kyria/LazyBlacksmith,Kyria/LazyBlacksmith,Kyria/LazyBlacksmith,Kyria/LazyBlacksmith
lazyblacksmith/models/crest/item_price.py
lazyblacksmith/models/crest/item_price.py
# -*- encoding: utf-8 -*- from . import db from datetime import datetime from lazyblacksmith.models.utcdatetime import UTCDateTime from sqlalchemy import func from sqlalchemy.orm import MapperExtension class ItemPriceExtension(MapperExtension): def before_insert(self, mapper, connection, instance): insta...
# -*- encoding: utf-8 -*- from . import db from lazyblacksmith.models.utcdatetime import UTCDateTime from sqlalchemy import func class ItemPrice(db.Model): item_id = db.Column(db.Integer, primary_key=True, autoincrement=False) region_id = db.Column(db.Integer) update_at = db.Column(UTCDateTime(timezone=T...
bsd-3-clause
Python
0ddbd8fb19e59bafc5700eaf48b5d99f4ce5acb3
add count for sequence
shengqh/ngsperl,shengqh/ngsperl,shengqh/ngsperl,shengqh/ngsperl
lib/Blast/DESeq2SignificantReadToFasta.py
lib/Blast/DESeq2SignificantReadToFasta.py
import subprocess import os.path import re import argparse import csv parser = argparse.ArgumentParser(description="Transfer DEseq2 significant read to fasta for blastn.", formatter_class=argparse.ArgumentDefaultsHelpFormatter) parser.add_argument('-i', '--input', action='store', narg...
import subprocess import os.path import re import argparse import csv parser = argparse.ArgumentParser(description="Transfer DEseq2 significant read to fasta for blastn.", formatter_class=argparse.ArgumentDefaultsHelpFormatter) parser.add_argument('-i', '--input', action='sto...
apache-2.0
Python
bce2b7c51c2b4616c2678b2ad5f5b979aa3245c4
disable echo callbacks .. there must be a better way todo this
melmothx/jsonbot,melmothx/jsonbot,melmothx/jsonbot
gozerlib/plugs/echo.py
gozerlib/plugs/echo.py
# commonplugs/echo.py # # """ echo typed sentences. """ ## gozerlib imports from gozerlib.commands import cmnds from gozerlib.examples import examples from gozerlib.callbacks import callbacks, first_callbacks ## basic imports import logging ## echo callback def echopre(bot, event): logging.warn("%s - echo pr...
# commonplugs/echo.py # # """ echo typed sentences. """ ## gozerlib imports from gozerlib.commands import cmnds from gozerlib.examples import examples from gozerlib.callbacks import callbacks, first_callbacks ## basic imports import logging ## echo callback def echopre(bot, event): logging.warn("%s - echo pr...
mit
Python
e23e73a39436cb4e0833c92c12397fa9ed335f85
fix the infinite redirects
parkourben99/PiPool,parkourben99/PiPool,parkourben99/PiController,parkourben99/PiController,parkourben99/PiController,parkourben99/PiController
PiControl/middleware.py
PiControl/middleware.py
from django.http import HttpResponseRedirect from django.conf import settings class LoginRequiredMiddleware: def __init__(self, get_response): self.get_response = get_response self.exempt_urls = [compile(settings.LOGIN_URL.lstrip('/'))] """ Middleware that requires a user to be authentic...
from django.http import HttpResponseRedirect from django.conf import settings class LoginRequiredMiddleware: def __init__(self, get_response): self.get_response = get_response """ Middleware that requires a user to be authenticated to view any page other than LOGIN_URL. Exemptions to this req...
mit
Python
e31a0d76236c27cfae733335bd13528e67f15fa4
Tag commit for v0.0.10-master generated by gitmake.py
ryansturmer/gitmake
version.py
version.py
major = 0 minor=0 patch=10 branch="master" timestamp=1376502388.26
major = 0 minor=0 patch=0 branch="dev" timestamp=1376425015.74
mit
Python
5906619d35a66fb283d613aa1a2db816a99f61a9
Bump version to 1.4.0.
elektito/finglish
version.py
version.py
__version__ = '1.4.0'
__version__ = '1.3.0'
mit
Python
59b47e5b4cc0574ea96717da9326034b84cd8414
Clean up warnings filter use in test_global by no longer having it be a module-level manipulation of the filter.
sk-/python2.7-type-annotator,sk-/python2.7-type-annotator,sk-/python2.7-type-annotator
Lib/test/test_global.py
Lib/test/test_global.py
"""Verify that warnings are issued for global statements following use.""" from test.support import run_unittest, check_syntax_error, check_warnings import unittest import warnings class GlobalTests(unittest.TestCase): def setUp(self): self._warnings_manager = check_warnings() self._warnings_ma...
"""Verify that warnings are issued for global statements following use.""" from test.support import run_unittest, check_syntax_error import unittest import warnings warnings.filterwarnings("error", module="<test string>") class GlobalTests(unittest.TestCase): def test1(self): prog_text_1 = """\ def wron...
mit
Python