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
0caeed31553dbc2a201cf5e2e50013ea946507c1
Add packagist.
sk89q/Plumeria,sk89q/Plumeria,sk89q/Plumeria
plumeria/plugins/packagist.py
plumeria/plugins/packagist.py
from plumeria import config from plumeria.command import commands, CommandError from plumeria.util import http from plumeria.util.ratelimit import rate_limit @commands.register("packagist", "composer", category="Development") @rate_limit() async def packagist(message): """ Search the Packagist repository for ...
mit
Python
7a3d41aea381ba914fb7a615ab6de1ff10d1cf89
Add initial tool dependencies generator.
bioarchive/aRchive_source_code,bioarchive/aRchive_source_code,bioarchive/aRchive_source_code,bioarchive/aRchive_source_code
get_galaxy_tool_dependencies.py
get_galaxy_tool_dependencies.py
#!/usr/bin/env python import sys import requests from string import Template try: import rpy2.robjects as robjects from rpy2.robjects.packages import importr from rpy2.robjects.vectors import StrVector import rpy2.robjects.packages as rpackages except ImportError: raise ImportError( "RPy2...
mit
Python
19f7538ec804916e2ba702669f1aa3e69de44592
add parallel_map
jobovy/galpy,followthesheep/galpy,followthesheep/galpy,followthesheep/galpy,jobovy/galpy,jobovy/galpy,jobovy/galpy,followthesheep/galpy
galpy/util/multi.py
galpy/util/multi.py
#Brian Refsdal's parallel_map, from astropython.org #Not sure what license this is released under, but until I know better: # #Copyright (c) 2010, Brian Refsdal #All rights reserved. # #Redistribution and use in source and binary forms, with or without #modification, are permitted provided that the following conditions...
bsd-3-clause
Python
3b4c1ec38e4725536bb11ec04ec0624282e166c0
Create proxy.py
ruoshuifuping/AdslProxyPool
proxy.py
proxy.py
import subprocess import time class ProxyClient(): def restart_client(self): while True: (status, output) = subprocess.getstatusoutput('systemctl restart tinyproxy.service') if status ==0: print("tinyproxy 重启成功") time.sleep(3600) else...
mit
Python
9a1cf12d2eab79abe313cc211b697e05d4a1d3c1
Solve 010
daveinnyc/various,daveinnyc/various,daveinnyc/various,daveinnyc/various,daveinnyc/various,daveinnyc/various,daveinnyc/various
programming_challenges/010.py
programming_challenges/010.py
''' Problem 010 Solutionum of the primes below 10 is 2 + 3 + 5 + 7 = 17. Find the sum of all the primes below two million. Copyright 2017 Dave Cuthbert, MIT License ''' import math def get_primes(number): while True: if is_prime(number): yield number number += 1 def is_prime(numbe...
mit
Python
fdcf6fe1792c462221e0c6c35c13cc23ad39a2e3
Create pythonhelloworld.py
KateKramer/classal3
pythonhelloworld.py
pythonhelloworld.py
print "hello world"
unlicense
Python
fafbb9e84a63f0de1f84ce94ba8766a8fdc23f8e
package for the item containers
rrpg/engine,rrpg/engine
models/item_container.py
models/item_container.py
# -*- coding: utf-8 -*- from models.Model import Model class item_container: """ Class to interact with the item containers, such as chests. """ @staticmethod def getAllFromIdArea(idArea): itemContainerTypes = model.getTypes() containers = model.loadBy({'id_area': idArea}) for k, c in enumerate(container...
mit
Python
3490b1172f8df77af3963c86ce3967a6d9b4af5e
Add gender choices factory
masschallenge/django-accelerator,masschallenge/django-accelerator
accelerator/tests/factories/gender_choices_factory.py
accelerator/tests/factories/gender_choices_factory.py
# MIT License # Copyright (c) 2017 MassChallenge, Inc. from __future__ import unicode_literals from factory import Sequence from factory.django import DjangoModelFactory GenderChoices = swapper.load_model('accelerator', 'GenderChoices') class GenderChoicesFactory(DjangoModelFactory): class Meta: model ...
mit
Python
44e6c6007a37dc4c9375303a6555c646618d4e38
add tf dadaset with generator with args
jeffzhengye/pylearn,jeffzhengye/pylearn,jeffzhengye/pylearn,jeffzhengye/pylearn
tensorflow_learning/tf2/tf_dataset_from_generator_args.py
tensorflow_learning/tf2/tf_dataset_from_generator_args.py
# -*- coding: utf-8 -*- ''' @author: jeffzhengye @contact: yezheng@scuec.edu.cn @file: tf_dataset_from_generator_args.py @time: 2021/1/5 16:27 @desc: ''' import tensorflow as tf import numpy as np import collections def movingWindow(data, window_size): print(type(window_size)) wind...
unlicense
Python
79637efbdda03cea88fa6a59b24a27f1d393c79f
Add tests for previous commit
dimagi/commcare-hq,dimagi/commcare-hq,dimagi/commcare-hq,dimagi/commcare-hq,dimagi/commcare-hq
corehq/util/tests/test_es_interface.py
corehq/util/tests/test_es_interface.py
from django.test import SimpleTestCase from mock import ANY, patch from corehq.apps.es.tests.utils import es_test from corehq.elastic import SerializationError, get_es_new from corehq.util.es.interface import ElasticsearchInterface @es_test class TestESInterface(SimpleTestCase): @classmethod def setUpClass(...
bsd-3-clause
Python
a9195264349b695daf02abb5cf17ced8a6a6110c
Add setup.py
AntagonistHQ/openprovider.py
setup.py
setup.py
# coding=utf-8 from distutils.core import setup setup( name='openprovider.py', version='0.0.1', author='Antagonist B.V.', author_email='info@antagonist.nl', packages=['openprovider'], url='http://pypi.python.org/pypi/openprovider.py/', license='LICENSE.rst', description='An unofficial ...
mit
Python
e8568c3fd621a37020de015fac59dfd15141b51f
Update praw to 3.5.0
michael-lazar/rtv,michael-lazar/rtv,michael-lazar/rtv,shaggytwodope/rtv,shaggytwodope/rtv,5225225/rtv,5225225/rtv
setup.py
setup.py
import sys import setuptools from version import __version__ as version requirements = ['tornado', 'praw==3.5.0', 'six', 'requests', 'kitchen'] # Python 2: add required concurrent.futures backport from Python 3.2 if sys.version_info.major <= 2: requirements.append('futures') setuptools.setup( name='rtv', ...
import sys import setuptools from version import __version__ as version requirements = ['tornado', 'praw==3.4.0', 'six', 'requests', 'kitchen'] # Python 2: add required concurrent.futures backport from Python 3.2 if sys.version_info.major <= 2: requirements.append('futures') setuptools.setup( name='rtv', ...
mit
Python
d2fd2a473747fa90183c78c0c12cd933bdc1a4b6
add solution for 2019 day 1 part 1
kmcginn/advent-of-code
2019/day01/rocket.py
2019/day01/rocket.py
#! python3 """ from: https://adventofcode.com/2019/day/1 --- Day 1: The Tyranny of the Rocket Equation --- Santa has become stranded at the edge of the Solar System while delivering presents to other planets! To accurately calculate his position in space, safely align his warp drive, and return to Earth in time to sav...
mit
Python
4f42bf42c6dcb44f7a0972bb9c00818d087c808f
Add file
mpsonntag/bulk-rename,mpsonntag/bulk-rename
setup.py
setup.py
try: from setuptools import setup except ImportError as ex: from distutils.core import setup packages = [ 'bren' ] with open('README.rst') as f: description_text = f.read() install_req = ["pyyaml"] setup( name='bulkrename', version='1.0.0', description='bulk file rename', author='Mic...
bsd-3-clause
Python
0954ec9e191f1a5280ea190ca025d005683db595
add an analyze script for kld
adrn/StreamMorphology,adrn/StreamMorphology,adrn/StreamMorphology
scripts/ensemble/analyze.py
scripts/ensemble/analyze.py
# coding: utf-8 """ Analyze the output from KLD mapping """ from __future__ import division, print_function __author__ = "adrn <adrn@astro.columbia.edu>" # Standard library import os # Third-party from astropy import log as logger import matplotlib.pyplot as plt import numpy as np # Project from streammorphology....
mit
Python
7e3a894796bb11eb77c0352d5104754086e70f8e
Add setup.py
airekans/recall
setup.py
setup.py
from setuptools import setup, find_packages import sys, os version = '0.1' setup(name='recall', version=version, description="Python High performance RPC framework based on protobuf", long_description="""\ """, classifiers=[], # Get strings from http://pypi.python.org/pypi?%3Aaction=list_class...
mit
Python
24bbb4fafa0732252c4d8561783826ed5eba6cff
add setup.py
youtalk/python-voicetext
setup.py
setup.py
# -*- coding: utf-8 -*- from setuptools import setup setup(name='python-voicetext', version='0.1', license='Apache License 2.0', description='Python library of VoiceText Web API', author='Yutaka Kondo', author_email='yutaka.kondo@youtalk.jp', url='https://github.com/youtalk/python-...
apache-2.0
Python
fd3eaa3810ce82db864b3fcafe61d16ab53d85e5
Add simple Python web server for performance testing
akisaarinen/ccf,akisaarinen/ccf
perftest/scripts/webserver.py
perftest/scripts/webserver.py
from BaseHTTPServer import BaseHTTPRequestHandler, HTTPServer class Handler(BaseHTTPRequestHandler): def do(self): self.send_response(200) self.wfile.write('{"headers":{"type":"type"},"content":{"b":2}}') def do_GET(self): self.do() def do_POST(self): self.do() def main(): try: server = ...
apache-2.0
Python
891737a86e8f7007ac6d040f3f01afc420cd8c99
Create 2-keys-keyboard.py
kamyu104/LeetCode,yiwen-luo/LeetCode,kamyu104/LeetCode,tudennis/LeetCode---kamyu104-11-24-2015,yiwen-luo/LeetCode,yiwen-luo/LeetCode,kamyu104/LeetCode,tudennis/LeetCode---kamyu104-11-24-2015,tudennis/LeetCode---kamyu104-11-24-2015,yiwen-luo/LeetCode,kamyu104/LeetCode,tudennis/LeetCode---kamyu104-11-24-2015,kamyu104/Lee...
Python/2-keys-keyboard.py
Python/2-keys-keyboard.py
# Time: O(sqrt(n)) # Space: O(1) # Initially on a notepad only one character 'A' is present. # You can perform two operations on this notepad for each step: # # Copy All: You can copy all the characters present on the notepad (partial copy is not allowed). # Paste: You can paste the characters which are copied last t...
mit
Python
293983d24467cbb224f29b4a6149b518fe966603
Add forest Predictor.
vincentadam87/gatsby-hackathon-seizure,vincentadam87/gatsby-hackathon-seizure
code/python/seizures/prediction/ForestPredictor.py
code/python/seizures/prediction/ForestPredictor.py
from abc import abstractmethod from sklearn.ensemble import RandomForestClassifier import numpy as np class ForestPredictor(object): """" A simple application of RandomForestClassifier @author: Shaun """ def __init__(self): self.clf = RandomForestClassifier() @abstractmethod def...
bsd-2-clause
Python
c2d2d086d336a48593cae6950584566fc40a68b0
添加498789867插件的源代码
ecator/anki-theme-baiduplay,ecator/anki-theme-baiduplay,ecator/anki-theme-baiduplay
Replay_buttons_on_card.py
Replay_buttons_on_card.py
# -*- mode: Python ; coding: utf-8 -*- # # Copyright © 2013–16 Roland Sieker <ospalh@gmail.com> # # License: GNU AGPL, version 3 or later; # http://www.gnu.org/copyleft/agpl.html """Add-on for Anki 2 to add AnkiDroid-style replay buttons.""" import os import re import shutil from BeautifulSoup import BeautifulSoup f...
mit
Python
c19bc112e7e13f9d63746dfd2b073edf369f8e82
add `setup.py`
lookup/lu-dj-utils,lookup/lu-dj-utils
setup.py
setup.py
#!/usr/bin/env python from __future__ import absolute_import, print_function, unicode_literals from setuptools import find_packages, setup import lu_dj_utils with open('README.rst') as f: readme = f.read() packages = find_packages() classifiers = ( 'Development Status :: 4 - Beta', 'Intended Audience ...
bsd-3-clause
Python
7255a3213418fe4bb3365bd60537f7e88af0c4cd
Add bare-bones setup.py and build file structure
CDIPS-AI-2017/pensieve
setup.py
setup.py
from setuptools import setup, find_packages setup(name='pensieve', version='0.0.1', description=u"A Python package to extract character mems from a corpus of text", author=u"CDIPS-AI 2017", author_email='sam.dixon@berkeley.edu', url='https://github.com/CDIPS-AI-2017/pensieve', licen...
apache-2.0
Python
73edec331031de644320927800375b9f84f6e143
Read requirements.txt for setup install_requires, keywords and classifiers added for PyPi
9p0le/simiki,tankywoo/simiki,tankywoo/simiki,tankywoo/simiki,9p0le/simiki,zhaochunqi/simiki,9p0le/simiki,zhaochunqi/simiki,zhaochunqi/simiki
setup.py
setup.py
#!/usr/bin/env python from setuptools import setup, find_packages import simiki entry_points = { "console_scripts": [ "simiki = simiki.cli:main", ] } requires = open("requirements.txt").readlines() setup( name = "simiki", version = simiki.__version__, url = "https://github.com/tankywoo/...
#!/usr/bin/env python from setuptools import setup, find_packages import simiki entry_points = { "console_scripts": [ "simiki = simiki.cli:main", ] } requires = [ "Markdown", "Pygments", "Jinja2", "PyYAML", "docopt", ] setup( name = "simiki", version = simiki.__version__...
mit
Python
88a617758eb869786d0703b2b53b5a030d7e7ac2
Add Python 3.4 to working environments
jazzband/django-mongonaut,lchsk/django-mongonaut,pydanny/django-mongonaut,pydanny/django-mongonaut,pydanny/django-mongonaut,lchsk/django-mongonaut,jazzband/django-mongonaut,jazzband/django-mongonaut,lchsk/django-mongonaut
setup.py
setup.py
import os, sys from setuptools import setup, find_packages import mongonaut LONG_DESCRIPTION = open('README.rst').read() + "\n\n" CHANGELOG = open('CHANGELOG.rst').read() LONG_DESCRIPTION += CHANGELOG version = mongonaut.__version__ if sys.argv[-1] == 'publish': os.system("python setup.py sdist upload") pr...
import os, sys from setuptools import setup, find_packages import mongonaut LONG_DESCRIPTION = open('README.rst').read() + "\n\n" CHANGELOG = open('CHANGELOG.rst').read() LONG_DESCRIPTION += CHANGELOG version = mongonaut.__version__ if sys.argv[-1] == 'publish': os.system("python setup.py sdist upload") pr...
mit
Python
2344a5e72d7a3a31d014ca31f42023740c56d060
add ndncache/fieldpercent.py
melon-li/tools,melon-li/tools,melon-li/tools
ndncache/fieldpercent.py
ndncache/fieldpercent.py
#!/usr/bin/python #coding:utf-8 '''Function:analyze bro conn logs and print specific field percent, @param: log directory @param: field list analyze author:melon li date: 2016.03.28 ''' import sys import os FIELDS=['ts', 'uid', 'id.orig_h', 'id.orig_p', 'id.resp_h', 'id.resp_p', 'proto', 'service duration', 'o...
apache-2.0
Python
4a6d45d102c76647bc7c4ff30f4b888108dd2d7c
Bump version to 2.6.0.2dev
prakashpp/nereid,riteshshrv/nereid,prakashpp/nereid,fulfilio/nereid,riteshshrv/nereid,fulfilio/nereid,usudaysingh/nereid,usudaysingh/nereid
setup.py
setup.py
''' Nereid Nereid - Tryton as a web framework :copyright: (c) 2010-2013 by Openlabs Technologies & Consulting (P) Ltd. :license: GPLv3, see LICENSE for more details ''' from setuptools import setup setup( name='Nereid', version='2.6.0.2dev', url='http://nereid.openlabs.co.in/docs/', l...
''' Nereid Nereid - Tryton as a web framework :copyright: (c) 2010-2013 by Openlabs Technologies & Consulting (P) Ltd. :license: GPLv3, see LICENSE for more details ''' from setuptools import setup setup( name='Nereid', version='2.6.0.1', url='http://nereid.openlabs.co.in/docs/', lice...
bsd-3-clause
Python
0907e4f32e4e0bb48f4f101b520ce8f28c731d6c
Add setup.py
allanburleson/python-adventure-game,disorientedperson/python-adventure-game
setup.py
setup.py
from os import path from setuptools import setup, find_packages here = path.abspath(path.dirname(__file__)) # TODO: change to rst with open(path.join(here, 'README.md'), encoding='utf-8') as f: long_description = f.read() setup( name='pag', version='0.1.0', description='A simple text-based adventure ...
mit
Python
7b0779a402070ec88d9afeab42388b6432391336
ADD AND CHANGE
wmtiger/dealsmp,wmtiger/dealsmp
zt.py
zt.py
#!/usr/bin/env python # -*- conding: utf-8 -*- ######################## #File Name:zt.py #Author:WmTiger #Mail:bfstiger@gmail.com #Created Time:2016-09-07 12:59:28 ######################## import picamera import time import io import zbar from PIL import Image def getQR(): stream = io.BytesIO() sc = zbar.Imag...
apache-2.0
Python
8812d487c33a8f0f1c96336cd27ad2fa942175f6
add setup.py
astex/sequential
setup.py
setup.py
from distutils.core import setup setup( name="sequential", packages=["sequential"], version="1.0.0", description="Sequential wrappers for python functions.", author="Phil Condreay", author_email="0astex@gmail.com", url="https://github.com/astex/sequential", keywords=["functions", "decor...
mit
Python
365540e17885cf41043358f14a04d0fa15ecb4ec
update 002 with python
liuyang1/euler,liuyang1/euler,liuyang1/euler
002.py
002.py
def func(thresh): a = 1 b = 1 ret = 0 while 1: a, b = a + b, a if a > thresh: return ret if a % 2 == 0: ret += a print func(4*1000*1000)
mit
Python
a675b289f7848a773ded80f943f60156a224fd17
Add a setup.py to allow use in pip requirements files.
adamfast/python-tweetar
setup.py
setup.py
#!/usr/bin/env python # -*- coding: utf-8 -*- from setuptools import setup, find_packages setup( name='tweetar', version='1.0.0', description='Script to post on Twitter METARs retrieved from NOAA.', author='Adam Fast', author_email='adamfast@gmail.com', url='https://github.com/adamfast/python-t...
bsd-3-clause
Python
62a405bf2574320a7fe1e941129056e8157121b5
Add setup.py
gisce/sii
setup.py
setup.py
# coding=utf-8 from setuptools import setup, find_packages PACKAGES_DATA = {'sii': ['data/*.xsd']} setup( name='sii', description='Librería de Suministro Inmediato de Información', author='GISCE-TI, S.L.', author_email='devel@gisce.net', url='http://www.gisce.net', version='0.1.0alpha', l...
mit
Python
6fc87957cff4e0ef1c95d604a8fb0630f2bcda38
Add initial setup.py to please buildout.
cidadania/e-cidadania,cidadania/e-cidadania
setup.py
setup.py
import os import re from setuptools import setup, find_packages setup( name = 'e-cidadania', description=("e-cidadania is a project to develop an open source " "application for citizen participation, usable by " "associations, companies and administrations."), version = '...
apache-2.0
Python
7f0eaa3974845b0e62c033fc4c3b0079c8e37465
Add setup.py
cgohlke/imagecodecs,cgohlke/imagecodecs,cgohlke/imagecodecs
setup.py
setup.py
# -*- coding: utf-8 -*- # imagecodecs/setup.py from setuptools import setup, Extension from Cython.Distutils import build_ext import sys import os import re import warnings import numpy buildnumber = '' # '.post0' with open('imagecodecs/_imagecodecs.pyx') as fh: code = fh.read() version = re.search("__versio...
bsd-3-clause
Python
c862150e8b9d015263f450483f7163e067df5b92
add setup.py
hph/drake
setup.py
setup.py
#/usr/bin/python #coding=utf8 import os import sys def authenticate(): '''Prompt the user for the superuser password if required.''' # The euid (effective user id) of the superuser is 0. euid = os.geteuid() if euid != 0: args = ['sudo', '-E', sys.executable] + sys.argv[:] + [os.environ] ...
mit
Python
5f410124e439ba5795335b3e0159eb1421e3ba52
Package setup definition
gzuidhof/plotta-python
setup.py
setup.py
from setuptools import setup setup( name='plotta', version='1.0.0a1', install_requires=['unirest'], description='Python wrapper for Plotta API', url='https://github.com/gzuidhof/plotta-python', license='MIT', keywords='plot plotting plotta', classifiers=[ 'Development Status ...
mit
Python
a03b9b0d219b54fce5bd3fcbef88b117d49115b1
Add files via upload
yumikohey/WaiterCar,yumikohey/WaiterCar,yumikohey/WaiterCar
self-driving-car-ai/mlp_training.py
self-driving-car-ai/mlp_training.py
__author__ = 'zhengwang' import cv2 import numpy as np import glob print 'Loading training data...' e0 = cv2.getTickCount() # load training data image_array = np.zeros((1, 38400)) label_array = np.zeros((1, 4), 'float') training_data = glob.glob('training_data/*.npz') # image_array, label_array = np.load('training_d...
mit
Python
27b7fe3c6ef33e2a810f0394e83b5f776e17a60b
add setup.py
LenxWei/MiSSH
setup.py
setup.py
#!/usr/bin/env python #-*- coding:utf-8 -*- from setuptools import setup, find_packages setup( name = "missh", version = "0.1.1rc7", # packages = find_packages(), #["mipass","missh-nox"], py_modules = ["mipass"], scripts = ['missh'], install_requires = ["npyscreen >=2.0pre47", "pycrypto...
bsd-2-clause
Python
34bb61bb7b634255a5828a0dbc695668bfe357cf
add setup.py for setuptools
bartekrutkowski/egniter
setup.py
setup.py
#!/usr/bin/env python from os.path import join from setuptools import setup, find_packages setup(name='egniter', version='1.0', description='Egniter is a command line tool for easy launching VMWare' + 'ESX virtual machines using ESX API', author='', author_email='', lic...
bsd-3-clause
Python
a00f47d66f87632fc28d49b97500132535c25d68
Create setup.py
NickSanzotta/WiFiSuite
setup.py
setup.py
from setuptools import setup, find_packages setup(name='WiFiSuite', version='v 1.05282017', description='Enterprise WPA Wireless Tool suite ', classifiers=[ 'Development Status :: 1 - Beta', 'License :: OSI Approved :: MIT License', 'Programming Language :: Python :: 2.7', '...
mit
Python
fb53445b97f6667f4773b7f4ec32e03e2e2019d6
Make setuptools optional for install.
Thhhza/XlsxWriter,jmcnamara/XlsxWriter,gechong/XlsxWriter,applicationdevm/XlsxWriter,mdeemer/XlsxWriter,seize-the-dave/XlsxWriter,seize-the-dave/XlsxWriter,jmcnamara/XlsxWriter,applicationdevm/XlsxWriter,liukaijv/XlsxWriter,gechong/XlsxWriter,liukaijv/XlsxWriter,Thhhza/XlsxWriter,gechong/XlsxWriter,yaojingwu1992/XlsxWr...
setup.py
setup.py
try: from setuptools import setup except ImportError: from distutils.core import setup setup( name='XlsxWriter', version='0.5.7', author='John McNamara', author_email='jmcnamara@cpan.org', url='https://github.com/jmcnamara/XlsxWriter', packages=['xlsxwriter'], license='BSD', des...
from setuptools import setup setup( name='XlsxWriter', version='0.5.7', author='John McNamara', author_email='jmcnamara@cpan.org', url='https://github.com/jmcnamara/XlsxWriter', packages=['xlsxwriter'], license='BSD', description='A Python module for creating Excel XLSX files.', lon...
bsd-2-clause
Python
118e6fdd95d16c69a9d887d327046eadc61853f1
Add setup.py
m110/grafcli,m110/grafcli
setup.py
setup.py
#!/usr/bin/python3 from setuptools import setup, find_packages setup(name='grafcli', version='0.1.0', description='Grafana CLI management tool', author='Milosz Smolka', author_email='m110@m110.pl', url='https://github.com/m110/grafcli', packages=find_packages(exclude=['tests']), ...
mit
Python
98ce14b1ed7fb8729f26e5705910b15ab4928275
Create rf_Table_Helpers.py
GLMeece/RF_Table_Helpers
rf_Table_Helpers.py
rf_Table_Helpers.py
#!/usr/bin/env python # -*- coding: utf-8 -*- """ .. module:: rf_Table_Helpers :platform: Unix, Windows :synopsis: Useful table introspection functions for Robot Framework's Selenium 2 Library. .. moduleauthor:: Greg Meece <glmeece@gmail.com> """ from lxml import html # ---------------------------------------...
mit
Python
bd724a63413ea3234d6f404ccac662febb2e1ccd
Complete exercise 9
sdarji/lpthw,sdarji/lpthw,sdarji/lpthw,sdarji/lpthw
ex/ex09.py
ex/ex09.py
# LPTHW Exercise 9 -- Printing, Printing, Printing # Here's some new strange stuff, remember type it exactly. days = "Mon Tue Wed Thu Fri Sat Sun" months = "Jan\nFeb\nMar\nApr\nMay\nJun\nJul\nAug" print "Here are the days: ", days print "Here are the months: ", months print """ There's something going on here. With...
unlicense
Python
64f79354695b24d99479f63c770887e6326b7102
Create app.py
milebag/pythons
app.py
app.py
print("hello")
apache-2.0
Python
dc391d441310cc27f92d8feff8e46dc05a5af7b3
Add unit tests for disabling orphaned workflow executions gc
nzlosh/st2,Plexxi/st2,StackStorm/st2,Plexxi/st2,StackStorm/st2,Plexxi/st2,nzlosh/st2,StackStorm/st2,Plexxi/st2,StackStorm/st2,nzlosh/st2,nzlosh/st2
st2reactor/tests/unit/test_garbage_collector.py
st2reactor/tests/unit/test_garbage_collector.py
# Copyright 2019 Extreme Networks, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to i...
apache-2.0
Python
989d8516e40890f3a75d040f6923cbe8bd9749ff
Create subprocess.py
diamontip/pract,diamontip/pract
subprocess.py
subprocess.py
#system information gather script. import subprocess def uname_func(): uname = 'uname' uname_arg='-a' print "collecting system information with %s command:\n" %uname subprocess.call([uname,uname_arg]) def disk_func(): diskspace = "df" diskspace_arg = "-h" print "collecting diskspace information %s command: ...
mit
Python
a7685738c9bd54a53858199b2225dbb4d1adce8e
Fix warning in plot_rank_mean
vighneshbirodkar/scikit-image,paalge/scikit-image,paalge/scikit-image,vighneshbirodkar/scikit-image,ofgulban/scikit-image,rjeli/scikit-image,rjeli/scikit-image,vighneshbirodkar/scikit-image,rjeli/scikit-image,paalge/scikit-image,ajaybhat/scikit-image,Hiyorimi/scikit-image,Hiyorimi/scikit-image,pratapvardhan/scikit-imag...
doc/examples/filters/plot_rank_mean.py
doc/examples/filters/plot_rank_mean.py
""" ============ Mean filters ============ This example compares the following mean filters of the rank filter package: * **local mean**: all pixels belonging to the structuring element to compute average gray level. * **percentile mean**: only use values between percentiles p0 and p1 (here 10% and 90%). * **bila...
""" ============ Mean filters ============ This example compares the following mean filters of the rank filter package: * **local mean**: all pixels belonging to the structuring element to compute average gray level. * **percentile mean**: only use values between percentiles p0 and p1 (here 10% and 90%). * **bila...
bsd-3-clause
Python
64cc611c8a13379f62151629585e3fec9e442f82
add timeout decorator
membase/membase-cli,membase/membase-cli,couchbaselabs/couchbase-cli,couchbase/couchbase-cli,membase/membase-cli,couchbaselabs/couchbase-cli,couchbase/couchbase-cli,couchbaselabs/couchbase-cli
timeout.py
timeout.py
# # Copyright 2012, Couchbase, 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 required by applicable l...
apache-2.0
Python
72be8a8fd8345542096ba31e3f1428ea25ea9498
Print with vs without a comma
nguyennam9696/Learn_Python_The_Hard_Way
ex6.py
ex6.py
end1 = "C" end2 = "H" end3 = "E" end4 = "E" end5 = "S" end6 = "E" end7 = "B" end8 = "U" end9 = "R" end10 = "G" end11 = "E" end12 = "R" # Printing without a comma print end1 + end2 + end3 + end4 + end5 + end6 print end7 + end8 + end9 + end10 + end11 + end12 # Printing with a comma print end1 + end2 + end3 + end4 + end5 ...
mit
Python
e58fe43d032a98849acc9c0ca041432bea0dbdba
Create brick-wall.py
jaredkoontz/leetcode,tudennis/LeetCode---kamyu104-11-24-2015,jaredkoontz/leetcode,kamyu104/LeetCode,jaredkoontz/leetcode,tudennis/LeetCode---kamyu104-11-24-2015,tudennis/LeetCode---kamyu104-11-24-2015,tudennis/LeetCode---kamyu104-11-24-2015,kamyu104/LeetCode,jaredkoontz/leetcode,yiwen-luo/LeetCode,yiwen-luo/LeetCode,ja...
Python/brick-wall.py
Python/brick-wall.py
# Time: O(n), n is the total number of the bricks # Space: O(m), m is the total number different widths # There is a brick wall in front of you. The wall is rectangular and has several rows of bricks. # The bricks have the same height but different width. You want to draw a vertical line from # the top to the bottom ...
mit
Python
96035f6bb2a298cea859b1e5e9812e2dd83982d2
Add script to upload files to shell applet
ENCODE-DCC/chip-seq-pipeline,ENCODE-DCC/chip-seq-pipeline,ENCODE-DCC/chip-seq-pipeline,ENCODE-DCC/chip-seq-pipeline
dnanexus/shell/resources/home/dnanexus/upload_file.py
dnanexus/shell/resources/home/dnanexus/upload_file.py
#!/usr/bin/env python # -*- coding: latin-1 -*- import os, sys, time, subprocess, json, requests HEADERS = { 'Content-type': 'application/json', 'Accept': 'application/json', } path = 'test.fastq' FILE_URL = 'http://test.encodedcc.org/TSTFF867178/upload/' ENCODED_KEY = '...' ENCODED_SECRET_KEY = '...' respo...
mit
Python
2737bd64cd33a592a4d50ec1596177e01d859e72
add point artist with draw and draw collection
compas-dev/compas
src/compas_rhino/artists/pointartist.py
src/compas_rhino/artists/pointartist.py
from __future__ import print_function from __future__ import absolute_import from __future__ import division import compas_rhino from compas_rhino.artists import PrimitiveArtist __all__ = ['PointArtist'] class PointArtist(PrimitiveArtist): """Artist for drawing ``Point`` objects. Parameters ---------...
mit
Python
85f6b2437b57c6e33ff56422b15aaab690704218
Add test to validate against schema
NaturalHistoryMuseum/ckanext-doi,NaturalHistoryMuseum/ckanext-doi,NaturalHistoryMuseum/ckanext-doi
ckanext/doi/tests/test_schema.py
ckanext/doi/tests/test_schema.py
#!/usr/bin/env python # encoding: utf-8 # # This file is part of ckanext-doi # Created by the Natural History Museum in London, UK import ckanext.doi.api as doi_api import ckanext.doi.lib as doi_lib import mock import requests from ckantest.factories import DataConstants from ckantest.models import TestBase from lxml ...
mit
Python
56e3ec2e0e788797b252cf28438d7ca6bede29ef
Correct comparison
alexm92/sentry,daevaorn/sentry,JackDanger/sentry,BuildingLink/sentry,zenefits/sentry,JackDanger/sentry,fotinakis/sentry,ifduyue/sentry,daevaorn/sentry,ifduyue/sentry,BuildingLink/sentry,looker/sentry,gencer/sentry,JackDanger/sentry,BuildingLink/sentry,daevaorn/sentry,looker/sentry,gencer/sentry,ifduyue/sentry,looker/se...
tests/sentry/api/endpoints/test_broadcast_index.py
tests/sentry/api/endpoints/test_broadcast_index.py
from __future__ import absolute_import from django.core.urlresolvers import reverse from sentry.models import Broadcast, BroadcastSeen from sentry.testutils import APITestCase class BroadcastListTest(APITestCase): def test_simple(self): broadcast1 = Broadcast.objects.create(message='bar', is_active=True...
from __future__ import absolute_import from django.core.urlresolvers import reverse from sentry.models import Broadcast, BroadcastSeen from sentry.testutils import APITestCase class BroadcastListTest(APITestCase): def test_simple(self): broadcast1 = Broadcast.objects.create(message='bar', is_active=True...
bsd-3-clause
Python
de5e7e3555788bb5e62d1ad2d20208d4289e5fe5
Add script for printing max accuracy across many networks
jonhoo/periscope,jonhoo/periscope
max.py
max.py
#!/usr/bin/env python3 import argparse import numpy import sys import re import os import os.path import tempfile parser = argparse.ArgumentParser() parser.add_argument('model', type=argparse.FileType('rb'), nargs='+', help='path to .mdl to extract plot data...
mit
Python
9f67de8a0823edf66212ed84116a1138a5fd0adb
add tests
shmilee/gdpy3,shmilee/gdpy3,shmilee/gdpy3,shmilee/gdpy3
tests/gdr-test1.py
tests/gdr-test1.py
# -*- coding: utf-8 -*- # Copyright (c) 2017 shmilee import os import logging import gdpy3.read as gdr log = logging.getLogger('gdr') if __name__ == '__main__': # log.setLevel(20) log.setLevel(10) datadir = '/home/IFTS_shmilee/phiobo-4-test' numpat = r'[-+]?\d+[\.]?\d*[eE]?[-+]?\d*' mypats = [r'...
mit
Python
4a9e2ac4a92fb67fd1f77605b5db6e6c3e5becc4
add CubicToQuadraticFilter
googlefonts/ufo2ft,googlei18n/ufo2ft,jamesgk/ufo2fdk,moyogo/ufo2ft,jamesgk/ufo2ft
Lib/ufo2ft/filters/cubicToQuadratic.py
Lib/ufo2ft/filters/cubicToQuadratic.py
from __future__ import ( print_function, division, absolute_import, unicode_literals) from ufo2ft.filters import BaseFilter from cu2qu.ufo import DEFAULT_MAX_ERR from cu2qu.pens import Cu2QuPointPen class CubicToQuadraticFilter(BaseFilter): _kwargs = { 'conversionError': None, 'unitsPerEm': ...
mit
Python
1811ddb9e49307f3473add8363c464946dffb0d8
Create jsonToExcel.py
miguelFLG13/JSONtoExcel
jsonToExcel.py
jsonToExcel.py
#! /usr/bin/python """ JSON to Excel v1.0 Python script to convert a JSON to a XLS file Created by: Miguel Jiménez Date: 22/10/2014 """ import json import xlwt import sys import os if sys.argv[1] == "help": print("Usage:\n\tjsonToExcel.py json_file.json") sys.exit(1) if not os.path.exists(sys.argv[1]): ...
apache-2.0
Python
41eeab76452cbbb92711c0a60bda4cfc28d8502f
Add network_training_tensorflow.py
tum-pbs/PhiFlow,tum-pbs/PhiFlow
demos/network_training_tensorflow.py
demos/network_training_tensorflow.py
""" TensorFlow Network Training Demo Trains a simple CNN to make velocity fields incompressible. This script runs for a certain number of steps before saving the trained network and halting. """ from phi.tf.flow import * math.seed(0) # Make the results reproducible net = u_net(2, 2) # for a fully connected network,...
mit
Python
ead3203a804e6397a00531d3b9e284edd87d0718
Add merge candidates cmd #72
california-civic-data-coalition/django-calaccess-processed-data,california-civic-data-coalition/django-calaccess-processed-data
calaccess_processed/management/commands/mergecandidates.py
calaccess_processed/management/commands/mergecandidates.py
#!/usr/bin/env python # -*- coding: utf-8 -*- """ Merge Persons that share the same CAL-ACCESS filer_id. """ from django.db.models import Count from calaccess_processed.management.commands import LoadOCDModelsCommand from opencivicdata.models import Person, PersonIdentifier from opencivicdata.models.merge import merge ...
mit
Python
a7629ef3acedaa688a455c01afb65c40a53c14b0
Add unit test for drawing routines
jmeyers314/jtrace,jmeyers314/batoid,jmeyers314/jtrace,jmeyers314/batoid,jmeyers314/jtrace
tests/test_draw.py
tests/test_draw.py
import batoid import time import os import yaml import numpy as np import pytest from test_helpers import timer # Use matplotlib with a non-interactive backend. import matplotlib as mpl mpl.use('Agg') import matplotlib.pyplot as plt from mpl_toolkits.mplot3d import Axes3D @timer def initialize(ngrid=25, theta_x=1.):...
bsd-2-clause
Python
d84ece5908afdfed7eabdb443714b7c8a615e4a4
Add Garden class - initial commit
bennuttall/rpi-greenhouse,RPi-Distro/python-rpi-greenhouse
garden/garden.py
garden/garden.py
from RPi import GPIO from time import sleep GPIO.setmode(GPIO.BCM) GPIO.setwarnings(False) class Greenhouse(object): leds = { 'red': [16, 11, 23], 'white': [13, 9, 27], 'green': [21, 12, 25], 'blue': [20, 6, 22], } def __init__(self): self._setup_gpio() def _s...
bsd-3-clause
Python
2ea675d3f719e6e309a47d6c0e9b98b407377267
Create get_mac.py
ellipsys/sonar
get_mac.py
get_mac.py
import re, uuid print ':'.join(re.findall('..', '%012x' % uuid.getnode()))
artistic-2.0
Python
a1294fc23c4875ef58676d14662e1628bb698065
Add the test structure
DataDog/uwsgi-dogstatsd,DataDog/uwsgi-dogstatsd,DataDog/uwsgi-dogstatsd
tests/test.py
tests/test.py
import select import socket import sys import urllib2 from time import time, sleep UDP_SOCKET_TIMEOUT = 5 class Test(object): def __init__(self, data): self.data = data def run(self): return class Data(object): """ The data aggregated from the uwsgi app """ def __init__(self...
bsd-3-clause
Python
703a94b1352d710ee4577dee0c5ad5c349d0c49e
Add SMTP returner
saltstack/salt,saltstack/salt,saltstack/salt,saltstack/salt,saltstack/salt
salt/returners/smtp_return.py
salt/returners/smtp_return.py
''' Return salt data via email The following fields can be set in the minion conf file: smtp.from (required) smtp.to (required) smtp.host (required) smtp.username (optional) smtp.password (optional) smtp.tls (optional, defaults to False) smtp.subject (optional, but helpful) smtp.fields...
apache-2.0
Python
ed9018fb5e234a60ea3affd0035cf562fea5fb05
add transient spiral
followthesheep/galpy,jobovy/galpy,jobovy/galpy,followthesheep/galpy,followthesheep/galpy,followthesheep/galpy,jobovy/galpy,jobovy/galpy
galpy/potential_src/TransientLogSpiralPotential.py
galpy/potential_src/TransientLogSpiralPotential.py
############################################################################### # TransientLogSpiralPotential: a transient spiral potential ############################################################################### import math as m from planarPotential import planarPotential _degtorad= m.pi/180. class TransientL...
bsd-3-clause
Python
dcc6ba3558696ba73d8e00f820eb8941b2d48b51
test Console-Logging
MiracleWong/PythonBasic,MiracleWong/PythonBasic
testConsoleLoggin.py
testConsoleLoggin.py
#!/usr/local/bin/python # -*- coding: utf-8 -*- from console_logging import console console.log("Hello World!") console.log("This is a log.") console.error("This is an error.") console.info("This is some neutral info.") console.success("This is a success message.")
mit
Python
537e243d15d1689e9e14535acb01bf65c9cbffcf
Add migration <ADDON>GuidFile -> StoredFileNode
samchrisinger/osf.io,haoyuchen1992/osf.io,zachjanicki/osf.io,aaxelb/osf.io,hmoco/osf.io,samchrisinger/osf.io,KAsante95/osf.io,doublebits/osf.io,icereval/osf.io,mluo613/osf.io,Johnetordoff/osf.io,TomBaxter/osf.io,GageGaskins/osf.io,brianjgeiger/osf.io,CenterForOpenScience/osf.io,acshi/osf.io,mluo613/osf.io,felliott/osf....
scripts/migrate_file_guids.py
scripts/migrate_file_guids.py
import sys import logging from website.app import init_app from scripts import utils as script_utils from framework.transactions.context import TokuTransaction from framework.guid.model import Guid from website.files import models from website.addons.box.model import BoxFile from website.addons.s3.model import S3Guid...
apache-2.0
Python
a06d614a119ae25c702b51a282adc8d3f2971f9e
Stop false matches with changelog->upgradeactions linking
asm0dey/Flexget,offbyone/Flexget,dsemi/Flexget,antivirtel/Flexget,lildadou/Flexget,oxc/Flexget,patsissons/Flexget,Pretagonist/Flexget,LynxyssCZ/Flexget,Danfocus/Flexget,offbyone/Flexget,ibrahimkarahan/Flexget,spencerjanssen/Flexget,tsnoam/Flexget,tsnoam/Flexget,poulpito/Flexget,ZefQ/Flexget,Pretagonist/Flexget,dsemi/Fl...
gen-changelog.py
gen-changelog.py
# Writes a changelog in trac WikiFormatting based on a git log from __future__ import unicode_literals, division, absolute_import import codecs from itertools import ifilter import os import re import subprocess import sys from bs4 import BeautifulSoup import dateutil.parser import requests out_path = 'ChangeLog' if...
# Writes a changelog in trac WikiFormatting based on a git log from __future__ import unicode_literals, division, absolute_import import codecs from itertools import ifilter import os import re import subprocess import sys from bs4 import BeautifulSoup import dateutil.parser import requests out_path = 'ChangeLog' if...
mit
Python
4ac7d4ec350e0f56d39c72c8aa33894ff28d3fb0
add replacement for pfSctl
opnsense/core,opnsense/core,opnsense/core,opnsense/core,opnsense/core,opnsense/core
src/opnsense/service/configd_ctl.py
src/opnsense/service/configd_ctl.py
#!/usr/local/bin/python2.7 """ Copyright (c) 2015 Ad Schellevis part of OPNsense (https://www.opnsense.org/) All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions ...
bsd-2-clause
Python
7a687d60a607dda79e14e9e8ba50e92a19e3e916
Add basic main() function
mrmarkgray/haldane
haldane.py
haldane.py
from sensor import * from display import * from timer import * from model import * import time def main(): sensor = Sensor.factory("MS5803-14B") model = Model.factory("Buhlmann") timer = Timer.factory("Sleep", 1) display = Display.factory("Stdio") print("- Starting Haldane -") temp = sensor.g...
apache-2.0
Python
80af3f92c08404a57cd660e84c1bf9d8f983920c
Create hangman.py
KeyboardFire/ascii-gallows-club
hangman.py
hangman.py
print 'This game is so fun right' print 'You won'
mit
Python
2cbeff222a7b3d0746d62c46566d463c95102fe6
Optimize the home page. #15
Minkov/site,Minkov/site,Phoenix1369/site,monouno/site,monouno/site,monouno/site,Minkov/site,monouno/site,Phoenix1369/site,monouno/site,DMOJ/site,Phoenix1369/site,Minkov/site,Phoenix1369/site,DMOJ/site,DMOJ/site,DMOJ/site
judge/views/blog.py
judge/views/blog.py
from django.core.urlresolvers import reverse from django.http import Http404 from django.utils import timezone from django.views.generic import ListView, DetailView from judge.comments import CommentedDetailView from judge.models import BlogPost, Comment, Problem from judge.utils.diggpaginator import DiggPaginator from...
from django.core.urlresolvers import reverse from django.http import Http404 from django.utils import timezone from django.views.generic import ListView, DetailView from judge.comments import CommentedDetailView from judge.models import BlogPost, Comment, Problem from judge.utils.diggpaginator import DiggPaginator from...
agpl-3.0
Python
41f0533edc9ebe788722711af95e040d4f06abb9
Add simple BIRD client class
fritz0705/lglass
lglass/bird.py
lglass/bird.py
# coding: utf-8 import subprocess import netaddr import lglass.route class BirdClient(object): def __init__(self, executable="birdc"): self.executable = executable def send(self, command, raw=False): argv = [self.executable] if raw: argv.append("-v") if isinstance(command, str): argv.extend(comman...
mit
Python
064386acbe509f872e40f3f577e7b6189ed91434
Test threading in app server rather than in serverTest.
babble/babble,babble/babble,babble/babble,babble/babble,babble/babble,babble/babble
src/test/ed/lang/python/thread2_test.py
src/test/ed/lang/python/thread2_test.py
import _10gen import ed.appserver.AppContext import ed.lang.python.Python import java.io.File # FIXME: this test produces a lot of output _10gen.__instance__ = ed.lang.python.Python.toPython(ed.appserver.AppContext(java.io.File('.'))) import test.test_thread import test.test_threading
apache-2.0
Python
3d90377b062862d9461d9d8cca59025130d344d8
Add first prototype for Aizek body
asydorchuk/robotics,asydorchuk/robotics
python/robotics/aizek_body.py
python/robotics/aizek_body.py
import math from RPi import GPIO as gpio from actors.redbot_motor_actor import RedbotMotorActor from controllers.pid_controller import PIDController from interfaces.spi.mcp3008_spi_interface import MCP3008SpiInterface from sensors.redbot_wheel_encoder_sensor import RedbotWheelEncoderSensor from sensors.sharp_ir_dista...
mit
Python
ab79e32552e1292feb75db52426d6fd4418c8262
Add a snippet.
jeremiedecock/snippets,jeremiedecock/snippets,jeremiedecock/snippets,jeremiedecock/snippets,jeremiedecock/snippets,jeremiedecock/snippets,jeremiedecock/snippets,jeremiedecock/snippets,jeremiedecock/snippets,jeremiedecock/snippets,jeremiedecock/snippets,jeremiedecock/snippets,jeremiedecock/snippets
python/wave/read_wav_file2.py
python/wave/read_wav_file2.py
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # Read the content of an audio wave file (.wav) # See: https://docs.python.org/3/library/wave.html import wave with wave.open("./test.wav", mode="rb") as wr: print(wr.readframes(20)) # Read the 20 first frames print("Num channels:", wr.getnchannels()) pr...
mit
Python
610f560c086320b42d83aab7644fe5d9a99d2cb7
Add channel invite test
DavidHHShao/slack
tests/unit/channels/test_invite.py
tests/unit/channels/test_invite.py
# Copyright (c) 2014 Katsuya Noguchi # # 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, dis...
mit
Python
9b4c716117966194d046eef56ea5f891ce3d40f9
Implement char CNN
Nizametdinov/cnn-pos-tagger
model.py
model.py
import tensorflow as tf def weight_variable(shape): initial = tf.truncated_normal(shape, stddev=0.1) return tf.Variable(initial) def bias_variable(shape): initial = tf.constant(0.1, shape=shape) return tf.Variable(initial) def conv2d(input_, output_dim, k_h, k_w): w = weight_variable([k_h, k_w...
mit
Python
cf31afad7752c3da5eba72613f89e7247a3eaed4
put actual file up
erichmatt/trainwreck-game
trainwreck.py
trainwreck.py
import pygame from time import sleep from pygame.locals import * import sys pygame.init() white = (255,255,255) black = (0,0,0) red = (255, 0, 0) green = (0, 255, 0) blue = (0,0, 255) gray = (100, 100, 100) train = pygame.image.load('pixel-train2.png') screen = pygame.display.set_mode((600, 600)) pygame.display.se...
mit
Python
3b5234a370db18fc51d8ad8573981c85544abb47
Add code to fix the python 2.6.6 auth failure issue.
edina/lockss-daemon,lockss/lockss-daemon,edina/lockss-daemon,edina/lockss-daemon,lockss/lockss-daemon,edina/lockss-daemon,edina/lockss-daemon,edina/lockss-daemon,edina/lockss-daemon,lockss/lockss-daemon,lockss/lockss-daemon,lockss/lockss-daemon,lockss/lockss-daemon,lockss/lockss-daemon
test/frameworks/lib/fix_auth_failure.py
test/frameworks/lib/fix_auth_failure.py
#!/usr/bin/env python # $Id: fix_auth_failure.py,v 1.1 2011-02-15 20:28:38 barry409 Exp $ # Copyright (c) 2011 Board of Trustees of Leland Stanford Jr. University, # all rights reserved. # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation fi...
bsd-3-clause
Python
670bd6e65721df376d8b3a5305a1fdb358d214d3
bump version in __init__.py
WillianPaiva/1flow,1flow/1flow,WillianPaiva/1flow,WillianPaiva/1flow,1flow/1flow,1flow/1flow,WillianPaiva/1flow,WillianPaiva/1flow,1flow/1flow,1flow/1flow
oneflow/__init__.py
oneflow/__init__.py
VERSION = '0.16.1.7'
VERSION = '0.16.1.6'
agpl-3.0
Python
ece1b5f163abb61d080b5e8d0fc8d57a311635d0
Fix changes in handler arguments
HelioGuilherme66/RIDE,robotframework/RIDE,robotframework/RIDE,caio2k/RIDE,caio2k/RIDE,robotframework/RIDE,fingeronthebutton/RIDE,fingeronthebutton/RIDE,robotframework/RIDE,HelioGuilherme66/RIDE,caio2k/RIDE,HelioGuilherme66/RIDE,HelioGuilherme66/RIDE,fingeronthebutton/RIDE
src/robotide/spec/libraryfetcher.py
src/robotide/spec/libraryfetcher.py
# Copyright 2008-2012 Nokia Siemens Networks Oyj # # 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...
# Copyright 2008-2012 Nokia Siemens Networks Oyj # # 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...
apache-2.0
Python
b7c54e6bf4c91587df0e74f04ba63b50d01977aa
Create test2.py
MsRisaMarie/CodeChallenges,MsRisaMarie/CodeChallenges
test2.py
test2.py
import sys with open(sys.argv[1]) as f: lines = f.readlines() for ln in lines: ln = ln.replace("\n", "") ln = ln.replace(" ", "") rev_ln = ''.join(sorted(ln, reverse=True)) result = True ln_len = len(ln) half_ln_len = ln_len/2 i = 0 while i < half_ln_len: if ln[i] != ln[ln_l...
mit
Python
0596076729b651e1042aa3bf2d5018620aa281af
Add async object list iterator
DataONEorg/d1_python,DataONEorg/d1_python,DataONEorg/d1_python,DataONEorg/d1_python
gmn/src/d1_gmn/app/management/commands/objectlist_async.py
gmn/src/d1_gmn/app/management/commands/objectlist_async.py
# -*- coding: utf-8 -*- # This work was created by participants in the DataONE project, and is # jointly copyrighted by participating institutions in DataONE. For # more information on DataONE, see our web site at http://dataone.org. # # Copyright 2009-2016 DataONE # # Licensed under the Apache License, Version 2.0 ...
apache-2.0
Python
a8bd9defcf3359296acf7633041b036213868075
Make getting started easier with a handy script
projectweekend/Pi-Camera-Time-Lapse,projectweekend/Pi-Camera-Time-Lapse
install.py
install.py
#!/usr/bin/env python import subprocess def sudo(command_text): parts = ['sudo'] parts.extend(command_text.split(command_text)) subprocess.call(parts) def apt_get_install(package_name): command_text = "apt-get -y install {0}".format(package_name) sudo(command_text) def main(): # Install s...
mit
Python
fd1fcead596844552a90980166b9f2a73aabc089
test cases for 3X3_2K1R scenario and to the fucntion that validates a individual configuration
matheuscas/chess-challenge
tests.py
tests.py
import naive def test_is_valid_configuration_3X3_2K1R(): all_configurations = [ (1,0,1,0,0,0,0,4,0), (1,0,0,0,0,4,1,0,0), (0,0,1,4,0,0,0,0,1), (0,4,0,0,0,0,1,0,1) ] M = N = 3 for conf in all_configurations: assert naive.is_valid_configuration(list(conf), M, N) ...
mit
Python
b372c34cf8bb111c0dcc25b391220f54bc22b36f
add functioning bundestag_reden_down.py
defgsus/sociopyth,defgsus/sociopyth,defgsus/sociopyth
bundestag_down/bundestag_reden_down.py
bundestag_down/bundestag_reden_down.py
# script to download all "Plenardebatten" from the Deutscher Bundestag # http://dipbt.bundestag.de/doc/btp/17/17140.pdf base_url = "http://dipbt.bundestag.de/doc/btp/" def get_name( period, docnum ): return base_url + '{:=02}'.format(period) + "/" + '{:=02}'.format(period) + '{:=03}'.format(docnum) + ".pdf" d...
lgpl-2.1
Python
deeeaba3070f3848c2ed85b85caa2291b5b42ae7
add script for cleaning up build env '.build' dirs after a successful build and backup.
ccpgames/mumble-releng,ccpgames/mumble-releng
tools/cleanup-buildenv-build-dir.py
tools/cleanup-buildenv-build-dir.py
#!/usr/bin/env python # -*- coding: utf-8 # Copyright 2014 The 'mumble-releng' Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that # can be found in the LICENSE file in the source tree or at # <http://mumble.info/mumble-releng/LICENSE>. # cleanup-buildenv-build-dir.py cleans...
bsd-3-clause
Python
ac636016d75f0f874973edf2a8fe1ab991b868c7
Fix #6: Added auto-setup script
stultus/PeARS,stultus/PeARS,stultus/PeARS
install.py
install.py
#!/usr/bin/env python # -*- coding: utf-8 -*- import os import platform import subprocess # Identify the type of operating system for install packages OS = platform.dist()[0].lower() if OS == "fedora" or OS == "redhat": install = "sudo yum install " elif OS == "ubuntu" or OS == "debian": install = "sudo apt...
mit
Python
d71eaed10b2c62fc5b5c6436d146a561479198a3
bump version in __init__.py
1flow/1flow,WillianPaiva/1flow,1flow/1flow,WillianPaiva/1flow,1flow/1flow,WillianPaiva/1flow,1flow/1flow,WillianPaiva/1flow,1flow/1flow,WillianPaiva/1flow
oneflow/__init__.py
oneflow/__init__.py
VERSION = '0.20.11.17'
VERSION = '0.20.11.16'
agpl-3.0
Python
135a8117b14817ba06932f5af4c827e183265079
bump version in __init__.py
WillianPaiva/1flow,WillianPaiva/1flow,1flow/1flow,1flow/1flow,1flow/1flow,WillianPaiva/1flow,WillianPaiva/1flow,1flow/1flow,WillianPaiva/1flow,1flow/1flow
oneflow/__init__.py
oneflow/__init__.py
VERSION = '0.18.2.4'
VERSION = '0.18.2.2'
agpl-3.0
Python
55b6134e9fbab02bbabb1a298f3bb2777608d9a1
Fix issue 106
PiRSquared17/django-page-cms,odyaka341/django-page-cms,Alwnikrotikz/django-page-cms,pombreda/django-page-cms,google-code-export/django-page-cms,odyaka341/django-page-cms,Alwnikrotikz/django-page-cms,PiRSquared17/django-page-cms,google-code-export/django-page-cms,pombreda/django-page-cms,PiRSquared17/django-page-cms,pom...
pages/views.py
pages/views.py
# -*- coding: utf-8 -*- from django.http import Http404, HttpResponsePermanentRedirect from django.shortcuts import get_object_or_404 from django.contrib.sites.models import SITE_CACHE from pages import settings from pages.models import Page, Content from pages.utils import auto_render, get_language_from_request, get_p...
# -*- coding: utf-8 -*- from django.http import Http404, HttpResponsePermanentRedirect from django.shortcuts import get_object_or_404 from django.contrib.sites.models import SITE_CACHE from pages import settings from pages.models import Page, Content from pages.utils import auto_render, get_language_from_request, get_p...
bsd-3-clause
Python
92d878f191b222316dcebb9e9b5492f871c00e06
Add instance class
zo7/deconvfaces
instance.py
instance.py
""" Instance class to hold data for each example. """ import os import numpy as np import scipy.misc as misc from tqdm import tqdm # ---- Enum classes for vector descriptions class Gender: female = [1., 0.] male = [0., 1.] class Emotion: angry = [1., 0., 0., 0., 0., 0., 0., 0.] contempt...
mit
Python
6f3579e6ac32211779481307f8e508469dde7605
Add example of how to read from a external GPS outputting NMEA messages.
waterlinked/examples
externalNMEA.py
externalNMEA.py
from __future__ import print_function import requests import argparse import time import logging import sys import serial import pynmea2 log = logging.getLogger() logging.basicConfig(format='%(asctime)s %(message)s', level=logging.INFO) def set_position_master(url, latitude, longitude, orientation): payload = di...
mit
Python
8117e10dc49f20a167d94ae278cd904a0e27188e
Add Class definitions for models for the products calls and variables
oldarmyc/pitchfork,rackerlabs/pitchfork,rackerlabs/pitchfork,rackerlabs/pitchfork,oldarmyc/pitchfork,oldarmyc/pitchfork
pitchfork/models.py
pitchfork/models.py
from pitchfork import db import re class Product: def __init__(self, product): self.app_url = product.get('app_url') self.title = product.get('title') self.us_api = product.get('us_api') self.uk_api = product.get('uk_api') self.require_dc = bool(product.get('require_dc')...
apache-2.0
Python
ac0d0b78b7b4eef913460894fca3af1ace222c7f
Test template for the Damage class
Enether/python_wow
tests/test_damage.py
tests/test_damage.py
import unittest from damage import Damage class DamageTests(unittest.TestCase): def test_init(self): dmg = Damage(phys_dmg=1.34, magic_dmg=1.49391) expected_phys_dmg = 1.3 expected_m_dmg = 1.5 expected_absorbed = 0 # it should round the magic/phys dmg to 1 point after the ...
mit
Python
dd5c0e1f66785089e4d996e40f1a8b93308ab42d
Add unittest
touilleMan/marshmallow-mongoengine
tests/test_params.py
tests/test_params.py
# -*- coding: utf-8 -*- from __future__ import absolute_import import datetime as dt import decimal from datetime import datetime import mongoengine as me import pytest from marshmallow_mongoengine import ModelSchema TEST_DB = 'marshmallow_mongoengine-test' db = me.connect(TEST_DB) class BaseTest(object): @cl...
mit
Python