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
40dd078b5e176ae5039bf20dcb50350e8f065808
Create python script to scroll error messages
jeffstephens/pi-resto,jeffstephens/pi-resto
recognition/scrollError.py
recognition/scrollError.py
from sense_hat import SenseHat import sys sense = SenseHat() sense.show_message(sys.stdin.read(), scroll_speed=.08, text_colour=[255, 0, 0])
mit
Python
d6a53b1b8acbddc16006c0c8752b44f176aecb12
add ntuple analyser
morgenst/PyAnalysisTools,morgenst/PyAnalysisTools,morgenst/PyAnalysisTools
PyAnalysisTools/AnalysisTools/NTupleAnalyser.py
PyAnalysisTools/AnalysisTools/NTupleAnalyser.py
import os from PyAnalysisTools.base import InvalidInputError from PyAnalysisTools.base.YAMLHandle import YAMLLoader from PyAnalysisTools.ROOTUtils.FileHandle import FileHandle import pathos.multiprocessing as mp try: import pyAMI.client except Exception as e: _logger.error("pyAMI not loaded") sys.exit(1) c...
mit
Python
67d1382c5c36e4476c56a9cd5c2e841131b07e6c
add classMulInherit.py
medifle/python_6.00.1x
classMulInherit.py
classMulInherit.py
class A(object): def __init__(self): self.a = 1 def x(self): print "A.x" def y(self): print "A.y" def z(self): print "A.z" class B(A): def __init__(self): A.__init__(self) self.a = 2 self.b = 3 def y(self): print "B.y" def z(se...
mit
Python
555dc74ad29b99fd4cf4c3ba97b7edfdaf8e485f
Create next-greater-element-i.py
yiwen-luo/LeetCode,yiwen-luo/LeetCode,tudennis/LeetCode---kamyu104-11-24-2015,kamyu104/LeetCode,tudennis/LeetCode---kamyu104-11-24-2015,tudennis/LeetCode---kamyu104-11-24-2015,kamyu104/LeetCode,jaredkoontz/leetcode,kamyu104/LeetCode,tudennis/LeetCode---kamyu104-11-24-2015,yiwen-luo/LeetCode,kamyu104/LeetCode,jaredkoont...
Python/next-greater-element-i.py
Python/next-greater-element-i.py
# Time: O(m + n) # Space: O(m + n) # You are given two arrays (without duplicates) nums1 and nums2 where nums1’s elements are subset of nums2. # Find all the next greater numbers for nums1's elements in the corresponding places of nums2. # # The Next Greater Number of a number x in nums1 is the first greater number t...
mit
Python
b0c03b86d606c85dd1cab1ad9e9678e1057d0ae1
Add pen which draws to TrueType glyphs.
googlefonts/fonttools,fonttools/fonttools
Lib/fontTools/pens/ttGlyphPen.py
Lib/fontTools/pens/ttGlyphPen.py
from __future__ import print_function, division, absolute_import from array import array from fontTools.misc.py23 import * from fontTools.pens.basePen import AbstractPen from fontTools.ttLib.tables import ttProgram from fontTools.ttLib.tables._g_l_y_f import Glyph from fontTools.ttLib.tables._g_l_y_f import GlyphCompo...
mit
Python
95e2e9af124595aae4801fc9813ee1c294d404cd
Change invalidtxrequest to use BitcoinTestFramework
kallewoof/bitcoin,jmcorgan/bitcoin,MeshCollider/bitcoin,bitcoin/bitcoin,h4x3rotab/BTCGPU,lbryio/lbrycrd,gjhiggins/vcoincore,wellenreiter01/Feathercoin,Kogser/bitcoin,achow101/bitcoin,rnicoll/bitcoin,tjps/bitcoin,JeremyRubin/bitcoin,wellenreiter01/Feathercoin,ElementsProject/elements,guncoin/guncoin,droark/bitcoin,globa...
test/functional/p2p_invalid_tx.py
test/functional/p2p_invalid_tx.py
#!/usr/bin/env python3 # Copyright (c) 2015-2017 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. """Test node responses to invalid transactions. In this test we connect to one node over p2p, and test tx...
#!/usr/bin/env python3 # Copyright (c) 2015-2017 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. """Test node responses to invalid transactions. In this test we connect to one node over p2p, and test tx...
mit
Python
08447fa344e21d6d704c6f195ad2b7405fa8f916
Add test for total property
UITools/saleor,car3oon/saleor,itbabu/saleor,tfroehlich82/saleor,tfroehlich82/saleor,maferelo/saleor,laosunhust/saleor,jreigel/saleor,itbabu/saleor,UITools/saleor,car3oon/saleor,KenMutemi/saleor,maferelo/saleor,HyperManTT/ECommerceSaleor,itbabu/saleor,spartonia/saleor,KenMutemi/saleor,laosunhust/saleor,jreigel/saleor,ro...
saleor/order/test_order.py
saleor/order/test_order.py
from .models import Order def test_total_property(): order = Order(total_net=20, total_tax=5) assert order.total.gross == 25 assert order.total.tax == 5 assert order.total.net == 20
bsd-3-clause
Python
2b09a8d75e0d59bba41467210b7d0588eb4a09d5
add migration for junebug channel type
tsotetsi/textily-web,pulilab/rapidpro,tsotetsi/textily-web,pulilab/rapidpro,pulilab/rapidpro,pulilab/rapidpro,tsotetsi/textily-web,tsotetsi/textily-web,tsotetsi/textily-web,pulilab/rapidpro
temba/channels/migrations/0050_add_junebug_channel_type.py
temba/channels/migrations/0050_add_junebug_channel_type.py
# -*- coding: utf-8 -*- # Generated by Django 1.9.12 on 2017-01-26 15:56 from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('channels', '0049_auto_20170106_0910'), ] operations = [ migrations.AlterFie...
agpl-3.0
Python
ace26ab5e713fabd02f4f481956c47640f50b166
Add unit test for volume limits client
vedujoshi/tempest,openstack/tempest,cisco-openstack/tempest,cisco-openstack/tempest,Juniper/tempest,masayukig/tempest,openstack/tempest,Juniper/tempest,masayukig/tempest,vedujoshi/tempest
tempest/tests/lib/services/volume/v2/test_limits_client.py
tempest/tests/lib/services/volume/v2/test_limits_client.py
# Copyright 2017 FiberHome Telecommunication Technologies CO.,LTD # 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/LI...
apache-2.0
Python
29c268db2cbb3b4787d3e925f925a49f0df68c46
add cache UT
maxwu/cistat,maxwu/cistat
test/test_cache.py
test/test_cache.py
#!/usr/bin/env python # -*- coding: utf-8 -*- """Logger Class Simple encapsulation on logging functions. - Console printing - File handler and the mapping for multithreading file handlers are under design yet. .. moduleauthor:: Max Wu <http://maxwu.me> .. References:: **ReadtheDocs**: https://pythonguidecn.re...
mit
Python
e4b9c43d53121d2b21c4b864fcc74674b0b6dfc1
Create class to interpolate values between indexes
thelonious/g2x,gizmo-cda/g2x,gizmo-cda/g2x,thelonious/g2x,gizmo-cda/g2x,gizmo-cda/g2x
scratchpad/Interpolator.py
scratchpad/Interpolator.py
class Interpolator: def __init__(self): self.data = [] def addIndexValue(self, index, value): self.data.append((index, value)) def valueAtIndex(self, target_index): if target_index < self.data[0][0]: return None elif self.data[-1][0] < target_index: ...
mit
Python
c3de9ebfa84fd93572d0a4ac991272609a593328
Create af_renameSG.py
aaronfang/personal_scripts
scripts/af_renameSG.py
scripts/af_renameSG.py
# rename shading group name to material name but with SG ended import pymel.core as pm import re selSG = pm.ls(sl=True,fl=True) for SG in selSG: curMat = pm.listConnections(SG,d=1) for mat in curMat: if pm.nodeType(mat) == 'blinn' or pm.nodeType(mat) == 'lambert': sgNM = re.split("_mat",str(...
mit
Python
b8777453cf03b212f2b06ca0afeef6c780e39f51
add face_classifier.py
wkentaro/keyopener,wkentaro/keyopener
scripts/face_classifier.py
scripts/face_classifier.py
#!/usr/bin/env python # -*- coding: utf-8 -*- # face_classifier.py # author: Kentaro Wada <www.kentaro.wada@gmail.com> import os import sys import collections from sklearn import svm import cv2 class FaceClassifier(object): def __init__(self, data_dir): self.data_dir = data_dir self.img_dict = c...
mit
Python
ef7abdab7681e496cebd1e4655a63cafcb9163db
add gafton's migration script to scripts/
sassoftware/conary,sassoftware/conary,sassoftware/conary,sassoftware/conary,sassoftware/conary
scripts/migrate-dbstore.py
scripts/migrate-dbstore.py
#!/usr/bin/python import sys import os if 'CONARY_PATH' in os.environ: sys.path.insert(0, os.environ['CONARY_PATH']) from conary import dbstore from conary.dbstore import sqlerrors from conary.repository.netrepos import schema if len(sys.argv) != 3: print "Usage: migrate <sqlite_path> <mysql_spec>" sqlite =...
apache-2.0
Python
36781fb1b04a3d2fd3162ea88969244faab22a60
Convert GML to EWKT, via PostGIS
Open511/open511-server,Open511/open511-server,Open511/open511-server
open511/utils/postgis.py
open511/utils/postgis.py
from django.db import connection def gml_to_ewkt(gml_string, force_2D=False): cursor = connection.cursor() if force_2D: sql = 'SELECT ST_AsEWKT(ST_Force_2D(ST_GeomFromGML(%s)))' else: sql = 'SELECT ST_AsEWKT(ST_GeomFromGML(%s))' cursor.execute(sql, [gml_string]) return cursor.fetcho...
mit
Python
aa320244cc03fe299aa33057c8b92a6c2352a5fd
Add tracer for sqlalchemy
openstack/osprofiler,stackforge/osprofiler,openstack/osprofiler,openstack/osprofiler,stackforge/osprofiler,stackforge/osprofiler
osprofiler/sqlalchemy.py
osprofiler/sqlalchemy.py
# Copyright 2013 OpenStack Foundation. # 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 req...
apache-2.0
Python
eefef8a5917243b75065441d46db19cbd65a7f1d
Create debounce decorator
qurben/mopidy-headless
mopidy_headless/decorator.py
mopidy_headless/decorator.py
import time def debounce(wait): """ Wait before calling a function again, discarding any calls in between """ def decorator(fn): def wrapped(*args, **kwargs): now = time.time() if wrapped.last is not None: delta = now - wrapped.last if del...
apache-2.0
Python
b2e059ce247de4b083c059d1ffe925983c262183
add test cases
catniplab/vLGP
tests/test_fast.py
tests/test_fast.py
from unittest import TestCase import numpy as np class TestFast(TestCase): def test_clip_grad(self): from vlgp import fast np.random.seed(0) n = 100 x = np.random.randn(n) x_clipped = fast.clip_grad(x, bound=1.0) self.assertTrue(np.all(np.logical_and(x_clipped >= ...
mit
Python
3fc118da6cdc29f4867dc33319ca56f4f3731346
add leetcode 121
weixsong/algorithm,weixsong/algorithm,weixsong/algorithm
leetcode/121.py
leetcode/121.py
#!/usr/bin/env python """ Say you have an array for which the ith element is the price of a given stock on day i. If you were only permitted to complete at most one transaction (ie, buy one and sell one share of the stock), design an algorithm to find the maximum profit. """ class Solution(object): def maxProfit...
mit
Python
16ad7991c22b4d9834a5db57912789d825a0cefb
Add unit tests
kemskems/otdet
tests/test_util.py
tests/test_util.py
import util from nose.tools import assert_equal class TestPick(): def check(self, filenames, expected, k, randomized): result = util.pick(filenames, k, randomized) assert_equal(result, expected) def test_all_sequential(self): filenames = ['a-4.txt', 'b-2.txt', 'c-3.txt', 'd-1.txt', '...
mit
Python
fcc92760db0d1dc56aca70aff69b34a29c9e8e6c
Add unit tests for the methods in util
shsmith/electrumx,thelazier/electrumx,Groestlcoin/electrumx-grs,erasmospunk/electrumx,shsmith/electrumx,bauerj/electrumx,thelazier/electrumx,erasmospunk/electrumx,Crowndev/electrumx,Groestlcoin/electrumx-grs,bauerj/electrumx,Crowndev/electrumx
tests/test_util.py
tests/test_util.py
from lib import util def test_cachedproperty(): class Target: def __init__(self): self.call_count = 0 @util.cachedproperty def prop(self): self.call_count += 1 return self.call_count t = Target() assert t.prop == t.prop == 1 def test_deep_get...
mit
Python
a1fc7311ddc50eb43f43fc51d3290f2c91fd4fa1
Update cheapest-flights-within-k-stops.py
kamyu104/LeetCode,kamyu104/LeetCode,kamyu104/LeetCode,tudennis/LeetCode---kamyu104-11-24-2015,tudennis/LeetCode---kamyu104-11-24-2015,kamyu104/LeetCode,tudennis/LeetCode---kamyu104-11-24-2015,tudennis/LeetCode---kamyu104-11-24-2015,tudennis/LeetCode---kamyu104-11-24-2015,kamyu104/LeetCode
Python/cheapest-flights-within-k-stops.py
Python/cheapest-flights-within-k-stops.py
# Time: O((|E| + |V|) * log|V|) = O(|E| * log|V|) # Space: O(|E| + |V|) = O(|E|) # There are n cities connected by m flights. Each fight starts from city u and arrives at v with a price w. # # Now given all the cities and fights, together with starting city src and the destination dst, # your task is to find the chea...
# Time: O((|E| + |V|) * log|V|) = O(|E| * log|V|) # Space: O(|E| + |V|) # There are n cities connected by m flights. Each fight starts from city u and arrives at v with a price w. # # Now given all the cities and fights, together with starting city src and the destination dst, # your task is to find the cheapest pric...
mit
Python
1c41bc4d06ad2209ddd6fe79621cabd210b94589
Add __init__
dshean/demcoreg,dshean/demcoreg
demcoreg/__init__.py
demcoreg/__init__.py
#! /usr/bin/env python
mit
Python
97671650987d74c6281e56f3f4e1950f2d996d5b
upgrade version...
citrix-openstack-build/glance,jumpstarter-io/glance,kfwang/Glance-OVA-OVF,redhat-openstack/glance,klmitch/glance,stevelle/glance,takeshineshiro/glance,SUSE-Cloud/glance,scripnichenko/glance,akash1808/glance,JioCloud/glance,klmitch/glance,tanglei528/glance,openstack/glance,sigmavirus24/glance,ntt-sic/glance,tanglei528/g...
setup.py
setup.py
#!/usr/bin/python # Copyright (c) 2010 OpenStack, LLC. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law ...
#!/usr/bin/python # Copyright (c) 2010 OpenStack, LLC. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law ...
apache-2.0
Python
e123f31a2a863491bb6353336038e7d324475bc9
Add setuptools for install
sc0tfree/netbyte
setup.py
setup.py
from setuptools import setup setup( name='netbyte', version='0.4', url='http://www.sc0tfree.com', license='MIT License', author='sc0tfree', author_email='henry@sc0tfree.com', description='Netbyte is a Netcat-style tool that facilitates probing proprietary TCP and UDP services. It is lightwe...
mit
Python
6e805995a165f923c1c4f71c163c64a245f9a3d5
Add simple distutils script for modules
epierson9/multiphenotype_methods
setup.py
setup.py
from distutils.core import setup setup(name='dimreducer', version='1.0', description='Dimension reduction methods', py_modules=['dimreducer'], ) setup(name='multiphenotype_utils', version='1.0', description='Utility functions for all methods', py_modules=['multiphenotype_utils...
mit
Python
914b7cd2c94bddd1a68eb2293364633a9325506f
add a unit test
sdpython/ensae_teaching_cs,sdpython/ensae_teaching_cs,sdpython/ensae_teaching_cs,sdpython/ensae_teaching_cs,sdpython/ensae_teaching_cs,sdpython/ensae_teaching_cs
_unittests/ut_td_1a/test_diff.py
_unittests/ut_td_1a/test_diff.py
""" @brief test log(time=1s) You should indicate a time in seconds. The program ``run_unittests.py`` will sort all test files by increasing time and run them. """ import sys import os import unittest from difflib import SequenceMatcher try: import src import pyquickhelper as skip_ except ImportError: ...
mit
Python
c03411020db80b703260314236d96cc409398545
Create variable.py
avsingh999/Learn_python
introduction/variable.py
introduction/variable.py
a = 10 A = 10 print(a) print(A)
mit
Python
3314f5d6ffb843a58e61856e726bd47e426538aa
Add spec_cleaner/__main__.py to allow running spec-cleaner without installing it.
plusky/spec-cleaner,plusky/spec-cleaner,plusky/spec-cleaner,plusky/spec-cleaner,plusky/spec-cleaner
spec_cleaner/__main__.py
spec_cleaner/__main__.py
from __future__ import absolute_import import os import sys # If we are running from a wheel, add the wheel to sys.path. if __package__ == '': # __file__ is spec-cleaner-*.whl/spec_cleaner/__main__.py. # First dirname call strips of '/__main__.py', second strips off '/spec_cleaner'. # Resulting path is th...
bsd-3-clause
Python
c54623d673d03d841d330e80d414a687770cc2a1
Add setup.py
sussman/zvm,sussman/zvm
setup.py
setup.py
import setuptools with open("README", "r", encoding="utf-8") as fh: long_description = fh.read() setuptools.setup( name="zvm", # Replace with your own username version="1.0.0", author="Ben Collins-Sussman", author_email="sussman@gmail.com", description="A pure-python implementation of a Z-mach...
bsd-3-clause
Python
ce5883c6a7a0c8c8f79c941f66288ce748b1b405
Add setup.py
timothyryanwalsh/brunnhilde
setup.py
setup.py
from setuptools import setup setup( name = 'brunnhilde', version = '1.4.0', url = 'https://github.com/timothyryanwalsh/brunnhilde', author = 'Tim Walsh', author_email = 'timothyryanwalsh@gmail.com', py_modules = ['brunnhilde'], scripts = ['brunnhilde.py'], description = 'A Siegfried-bas...
mit
Python
73e0bd62ac7a2d8b8322e21130ee7ec0659dc3cc
add setup.py
asseldonk/vispa-jsroot,asseldonk/vispa-jsroot,asseldonk/vispa-jsroot
setup.py
setup.py
#!/usr/bin/env python # -*- coding: utf-8 -*- from distutils.core import setup setup( name = "jsroot", version = "0.0.0", description = "VISPA ROOT Browser - Inspect contents of root files.", author = "VISPA Project", author_email = "vispa@lists.rwth-aachen...
mit
Python
8e8678c2bc915e671f50bb6ea91288662053c280
add setup file
laginha/yard,laginha/yard,laginha/yard
setup.py
setup.py
#!/usr/bin/env python # encoding: utf-8 from setuptools import setup, find_packages setup( name = 'yard', version = '0.1.0', author = "Diogo Laginha", url = 'https://github.com/laginha/yard', description = "Yet Another Resftul Django-app", packa...
mit
Python
dd1810ddf1f85312c7a8b5ec23d4844b5ca63a13
add data_filtering.py
cxmo/project-beta,berkeley-stat159/project-beta,rishizsinha/project-beta,yuchengdong/project-beta-1
code/data_filtering.py
code/data_filtering.py
import numpy as np import matplotlib.pyplot as plt import os import sys import nitime # Import the time-series objects: from nitime.timeseries import TimeSeries # Import the analysis objects: from nitime.analysis import SpectralAnalyzer, FilterAnalyzer, NormalizationAnalyzer os.getcwd() os.chdir('..') os.chdir('data...
bsd-3-clause
Python
e0fbd1d0e5e9b845ebfa6aa1739937a9974cbc87
Add setup.py
MizukiSonoko/iroha-cli,MizukiSonoko/iroha-cli
setup.py
setup.py
#!/usr/bin/env python from distutils.core import setup setup( name='iroha-ya-cli', version='0.7', description='Cli for hyperledger/iroha', author='Sonoko Mizuki', author_email='mizuki.sonoko@gmail.com', packages=['src'], entry_points={ 'console_scripts': 'ir...
apache-2.0
Python
2484c0f9415694c99e5b1ac15ee4b64f12e839b6
add migration to reflect schema updates to wagtailforms
torchbox/wagtaildemo,torchbox/wagtaildemo,torchbox/wagtaildemo,torchbox/wagtaildemo
demo/migrations/0005_auto_20160531_1736.py
demo/migrations/0005_auto_20160531_1736.py
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('demo', '0004_auto_20151019_1351'), ] operations = [ migrations.AlterField( model_name='formfield', n...
bsd-3-clause
Python
97d96097122ca50e84fcadd3a5c21ae51ccc8bf7
Create Polarity_classifier.py
HaythemSahbani/Web-mining-university-project
src/Polarity_classifier.py
src/Polarity_classifier.py
import pickle import itertools from nltk.collocations import BigramCollocationFinder from nltk.metrics import BigramAssocMeasures from nltk.corpus import stopwords class Polarity_classifier: def __init__(self): pass def bigram_word_feats(self, words, score_fn=BigramAssocMeasures.chi_sq, n=200): ...
mit
Python
2c39bc6e1586dcacc1d23d9be643d1f27f035eac
Add wsgi file
toulibre/agendadulibreshow
agendadulibre/agendadulibre.wsgi
agendadulibre/agendadulibre.wsgi
import sys sys.path.insert(0, '/var/www/agendadulibre/agendadulibre') #sys.path.insert(0, os.curdir) activate_this = '/home/numahell/.virtualenvs/flask/local/bin/activate_this.py' execfile(activate_this, dict(__file__=activate_this)) from app import app as application
mit
Python
f9c68d3c250e3a83ab1d0ed9e0760c0631dca869
add setup.py
sephii/fabliip,liip/fabliip,sephii/fabliip,liip/fabliip
setup.py
setup.py
#!/usr/bin/env python from setuptools import find_packages, setup from fabliip import __version__ setup( name='fabliip', version=__version__, packages=find_packages(), description='Set of Fabric functions to help deploying websites.', author='Sylvain Fankhauser', author_email='sylvain.fankhause...
mit
Python
054be2f9a06c0da3b7fcf5d40985ce8055f3f447
add setup.py
Battleroid/bark
setup.py
setup.py
from setuptools import setup, find_packages setup( name='bark', version='1.0', url='https://github.com/battleroid/bark', description='Single file static site generator.', license='MIT License', keywords='bark static site generator jinja blog python markdown', aut...
mit
Python
c6c6594cda35aaa15f1efb9f336548671b0028c5
Add generic serializer tool for plugins to use
sassoftware/rmake3,sassoftware/rmake3,sassoftware/rmake3
rmake/lib/twisted_extras/tools.py
rmake/lib/twisted_extras/tools.py
# # Copyright (c) rPath, Inc. # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This program is distributed in the h...
apache-2.0
Python
b4f5b5da5e7a7266e7f908b6ffc975ea3f1f0657
Add setup.py
jackromo/mathLibPy
setup.py
setup.py
from distutils.core import setup setup(name='MathLibPy', version='0.0.0', description='Math library for Python', author='Jack Romo', author_email='sharrackor@gmail.com', packages=['mathlibpy'], )
mit
Python
49178742953cc63b066d2142d9e2b3f0f2e20e17
Tweak setup.py so that it may run even when fired from different locations, as suggested by Maarten Damen.
sprymix/python-dateutil,sprymix/dateutil,pganssle/dateutil-test-codecov,jenshnielsen/dateutil,adamgreig/python-dateutil,mjschultz/dateutil,Bachmann1234/dateutil,emsoftware/python-dateutil,abalkin/dateutil,pganssle/dateutil-test-codecov,abalkin/dateutil
setup.py
setup.py
#!/usr/bin/python from os.path import isfile, join import glob import os import re from setuptools import setup if isfile("MANIFEST"): os.unlink("MANIFEST") TOPDIR = os.path.dirname(__file__) or "." VERSION = re.search('__version__ = "([^"]+)"', open(TOPDIR + "/dateutil/__init__.py").read()...
#!/usr/bin/python from os.path import isfile, join import glob import os import re from setuptools import setup if isfile("MANIFEST"): os.unlink("MANIFEST") VERSION = re.search('__version__ = "([^"]+)"', open("dateutil/__init__.py").read()).group(1) setup(name="python-dateutil", ver...
bsd-3-clause
Python
65c9335775688a15b344be4762ee7c75bd66bdb2
Add a setup.py file
arturfelipe/cities
setup.py
setup.py
import os import codecs from setuptools import setup, find_packages def read(fname): file_path = os.path.join(os.path.dirname(__file__), fname) return codecs.open(file_path, encoding='utf-8').read() setup( name='cities', version='0.0.1', description='Load data from cities and countries all over ...
mit
Python
f57605c4f37fb29a93f06d165b9eb69fee2771b9
Add fake setup.py (#1620)
encode/uvicorn,encode/uvicorn
setup.py
setup.py
import sys from setuptools import setup sys.stderr.write( """ =============================== Unsupported installation method =============================== httpx no longer supports installation with `python setup.py install`. Please use `python -m pip install .` instead. """ ) sys.exit(1) # The below code wil...
bsd-3-clause
Python
7c863017bd687a06c63a5c60c53c6efca80d6b0e
Add setup script
mdegreg/discord-toastlogger
setup.py
setup.py
from setuptools import setup setup( name='discord-toastlogger', version='0.1.0', scripts=['toastbot'], url='https://github.com/mdegreg/discord-toastlogger', license='MIT', install_requires=[ 'discord' ] )
mit
Python
1b0b91e9445e080e790571a00e767f31f5035fd1
Add setup.py
efficios/pytsdl
setup.py
setup.py
#!/usr/bin/env python3 # # The MIT License (MIT) # # Copyright (c) 2014 Philippe Proulx <eepp.ca> # # 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 limi...
mit
Python
c40a65c46b075881222f5c9ccebccfb0c627aa51
Create setup.py
Mester/demo-day-vikings,Mester/demo-day-vikings
setup.py
setup.py
unlicense
Python
e87d736c83d89129f4a152163993cb5c173dddd4
Add setup
TimeWz667/Kamanian
setup.py
setup.py
from setuptools import setup setup(name='Kamanian', version='1.00', packages=['dzdy'], install_requires=['pandas', 'numpy', 'scipy', 'pcore', 'matplotlib', 'networkx'])
mit
Python
05477b14e19d1e2d0483405bf3558f7d80fb9b60
Switch to setuptools.
misja/esmre,b-long/esmre,wharris/esmre,wharris/libesm,wharris/esmre,misja/esmre,b-long/esmre,wharris/libesm
setup.py
setup.py
# setup.py - distutils configuration for esm and esmre modules # Copyright (C) 2007 Tideway Systems Limited. # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public # License as published by the Free Software Foundation; either # version 2.1 of the...
# setup.py - distutils configuration for esm and esmre modules # Copyright (C) 2007 Tideway Systems Limited. # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public # License as published by the Free Software Foundation; either # version 2.1 of the...
lgpl-2.1
Python
a896d7f6b3886a73789f8aff079ab983af38e29f
Add lava server extension loader
OSSystems/lava-server,OSSystems/lava-server,Linaro/lava-server,Linaro/lava-server,Linaro/lava-server,Linaro/lava-server,OSSystems/lava-server
lava_server/extension.py
lava_server/extension.py
# Copyright (C) 2010, 2011 Linaro Limited # # Author: Zygmunt Krynicki <zygmunt.krynicki@linaro.org> # # This file is part of LAVA Server. # # LAVA Server is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License version 3 # as published by the Free Software F...
agpl-3.0
Python
44bdeb2d5bf8c7877eb1e92cda65f6c844a93642
add models.
fle-internal/content-pack-maker
contentpacks/models.py
contentpacks/models.py
from peewee import Model, SqliteDatabase, CharField, TextField, BooleanField,\ ForeignKeyField, PrimaryKeyField, Using, IntegerField, \ OperationalError class Item(Model): title = CharField() description = TextField() available = BooleanField() files_complete = IntegerField(default=0) tota...
bsd-2-clause
Python
d72f9f06afcf5d1c177afa418a7c4bf60af8fb75
Support mm:ss.
denarced/since
since.py
since.py
#!/usr/bin/env python3 import datetime import re import sys def main(strTime): now = datetime.datetime.now() pattern = r'(\d\d):(\d\d)' match = re.match(pattern, strTime) time = datetime.datetime( now.year, now.month, now.day, int(match.group(1)), int(match.gro...
mit
Python
1d25676049994db266129b1a1c98cec3acbba0ca
Add missing file on last merge
frictionlessdata/goodtables.io,frictionlessdata/goodtables.io,frictionlessdata/goodtables.io,frictionlessdata/goodtables.io
goodtablesio/models/subscription.py
goodtablesio/models/subscription.py
import logging import datetime from sqlalchemy import ( Column, Unicode, DateTime, Boolean, ForeignKey) from sqlalchemy.orm import relationship from goodtablesio.models.base import Base, BaseModelMixin, make_uuid log = logging.getLogger(__name__) class Subscription(Base, BaseModelMixin): __tablename__ = ...
agpl-3.0
Python
9b0278530c2c4f32dd2a751fb4f8b93c8c34a3ea
add arch tool for waf backend.
cournape/Bento,cournape/Bento,cournape/Bento,cournape/Bento
bento/backends/waf_tools/arch.py
bento/backends/waf_tools/arch.py
import re from waflib.Tools.c_config import SNIP_EMPTY_PROGRAM from waflib.Configure import conf ARCHS = ["i386", "x86_64", "ppc", "ppc64"] FILE_MACHO_RE = re.compile("Mach-O.*object ([a-zA-Z_0-9]+)") @conf def check_cc_arch(conf): env = conf.env archs = [] for arch in ARCHS: env.stash() ...
bsd-3-clause
Python
856f855e10588ddbe2ad5053cc5d7366c76459a8
Implement basic perception
joshleeb/PerceptronVis
percept/perceptron.py
percept/perceptron.py
import random def rand_w(): ''' Generate a random weight. ''' return round(random.uniform(-1, 1), 3) class Perceptron: def __init__( self, w0=rand_w(), w1=rand_w(), w2=rand_w(), learning_rate=0.1): self.w0, self.w1, self.w2 = w0, w1, w2 self.learning_rate = learning_rate ...
mit
Python
e5f82b794ee2e6054deb15433c7dc7261146f181
Add merge migration
Johnetordoff/osf.io,aaxelb/osf.io,baylee-d/osf.io,Johnetordoff/osf.io,saradbowman/osf.io,mfraezz/osf.io,adlius/osf.io,adlius/osf.io,caseyrollins/osf.io,Johnetordoff/osf.io,baylee-d/osf.io,mattclark/osf.io,HalcyonChimera/osf.io,HalcyonChimera/osf.io,caseyrollins/osf.io,adlius/osf.io,cslzchen/osf.io,Johnetordoff/osf.io,i...
osf/migrations/0112_merge_20180614_1454.py
osf/migrations/0112_merge_20180614_1454.py
# -*- coding: utf-8 -*- # Generated by Django 1.11.13 on 2018-06-14 19:54 from __future__ import unicode_literals from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('osf', '0107_merge_20180604_1232'), ('osf', '0111_auto_20180605_1240'), ] operation...
apache-2.0
Python
5f051f2ae1b105d6cc58d1cac760cb5d20908c3b
Support rudimentary translation service from IIT Bombay via web API.
Ezhil-Language-Foundation/open-tamil,Ezhil-Language-Foundation/open-tamil,Ezhil-Language-Foundation/open-tamil,arcturusannamalai/open-tamil,arcturusannamalai/open-tamil,arcturusannamalai/open-tamil,arcturusannamalai/open-tamil,Ezhil-Language-Foundation/open-tamil,arcturusannamalai/open-tamil,arcturusannamalai/open-tami...
valai/translate.py
valai/translate.py
# * coding: utf8 * # # (C) 2020 Muthiah Annamalai <ezhillang@gmail.com> # # Uses the IIT-Bombay service on the web. # import json import requests from urllib.parse import quote from functools import lru_cache @lru_cache(1024,str) def en2ta(text): """translate from English to Tamil""" return IITB_translator(...
mit
Python
25056e74093f01d68af14277da6089903b617ee6
Create Career.py
imreeciowy/wfrp-gen
Career.py
Career.py
class Career: def __init__(career_name, advances, skills_to_take, talents_to_take, career_trappings, race_dependent) self.career_name = career_name self.advances = advances self.skills_to_take = skills_to_take self.talents_to_take = talents_to_take self.career_trappings = car...
mit
Python
64ab32daba1ddbe7e8b56850188dab3f8ca42286
Add TCP check
NicolasLM/sauna,bewiwi/sauna,bewiwi/sauna,NicolasLM/sauna
sauna/plugins/ext/tcp.py
sauna/plugins/ext/tcp.py
import socket from sauna.plugins import (Plugin, PluginRegister) my_plugin = PluginRegister('TCP') @my_plugin.plugin() class Tcp(Plugin): @my_plugin.check() def request(self, check_config): try: with socket.create_connection((check_config['host'], ...
bsd-2-clause
Python
d95ce2570989e1b18c313efb1f95f611a9a2cc80
add color_histogram_matcher for objects
pazeshun/jsk_apc,pazeshun/jsk_apc,pazeshun/jsk_apc,pazeshun/jsk_apc,pazeshun/jsk_apc
jsk_2015_05_baxter_apc/node_scripts/color_histogram_matcher.py
jsk_2015_05_baxter_apc/node_scripts/color_histogram_matcher.py
#!/usr/bin/env python # -*- coding: utf-8 -*- # from __future__ import division import rospy import cv2 import numpy as np from sensor_msgs.msg import Image from jsk_2014_picking_challenge.srv import ObjectMatch, ObjectMatchResponse from jsk_recognition_msgs.msg import ColorHistogram query_features = None target_feat...
bsd-3-clause
Python
74197adab35815bc1168f661d6f5cf5c829afc99
Add example
mopemope/pykt,mopemope/pykt
example/serialize.py
example/serialize.py
from pykt import KyotoTycoon, set_serializer, set_deserializer from cPickle import dumps, loads set_serializer(dumps) set_deserializer(loads) key = "A" * 12 val = "B" * 1024 d = dict(name="John", no=1) db = KyotoTycoon() db.open() print db.set(key, d) ret = db.get(key) assert(d == ret) db.close()
bsd-3-clause
Python
9c0a74194e6546eac6dbaec000599a623d525909
Create drivers.py
ariegg/webiopi-drivers,ariegg/webiopi-drivers
chips/digital/pca9698/drivers.py
chips/digital/pca9698/drivers.py
DRIVERS["pca9698" ] = ["PCA9698"]
apache-2.0
Python
d6492629e3c837374082cac71034a7bad36291bc
Test of commit
BecquerelRecipe/Trunk
Parser.py
Parser.py
if __name__ == '__main__': main()
apache-2.0
Python
bef69c38103e8ef937fea41a0a58c934b34f4281
add yaml syntax checker script
bigswitch/bosi,bigswitch/bosi
bosi/rhosp_resources/yamls/yaml_syntax_check.py
bosi/rhosp_resources/yamls/yaml_syntax_check.py
#!/usr/bin/env python import os import sys import yaml EXIT_ERROR = -1 YAML_FILE_EXT = ".yaml" def help(): """ Print how to use the script """ print "Usage: %s <directory>" % sys.argv[0] def check_yaml_syntax(f): """ Check the syntax of the given YAML file. return: True if valid, False otherwi...
apache-2.0
Python
f09c45cde66dd8da07511e1105af14ffd41799b0
add a command to trigger a bulk sync
dstufft/jutils
crate_project/apps/crate/management/commands/trigger_bulk_sync.py
crate_project/apps/crate/management/commands/trigger_bulk_sync.py
from django.core.management.base import BaseCommand from pypi.tasks import bulk_synchronize class Command(BaseCommand): def handle(self, *args, **options): bulk_synchronize.delay() print "Bulk Synchronize Triggered"
bsd-2-clause
Python
27ed68923579c5afff0c70b025deb8b73d448aa8
Set calculation type of all indicators to Number
toladata/TolaActivity,toladata/TolaActivity,toladata/TolaActivity,toladata/TolaActivity
indicators/migrations/0013_set_all_calculation_type_to_numeric.py
indicators/migrations/0013_set_all_calculation_type_to_numeric.py
# -*- coding: utf-8 -*- # Generated by Django 1.11.3 on 2018-07-04 09:56 from __future__ import unicode_literals from django.db import migrations from ..models import Indicator def set_calculation_type(apps, schema_editor): Indicator.objects.all().update( calculation_type=Indicator.CALC_TYPE_NUMERIC) c...
apache-2.0
Python
834516acf7b5cfbbb0f728f8b725bea120b5f5b3
Add python version of the post-receive hook
Humbedooh/gitpubsub
post_receive.py
post_receive.py
import re import os import sys import os import json from subprocess import Popen, PIPE from httplib2 import Http postURL = "http://localhost:2069/json" pwd = os.getcwd() if len(sys.argv) <= 3: print("Usage: post-receive [old] [new] [ref]") exit() old, new, ref = sys.argv[1:4] m = re.match(r"^.*/([^/]+)$", p...
apache-2.0
Python
6e28da4e1a1d8ad794f12d9782b0e2dd54119dc4
add mysql module
lytofb/freemarker_doc_crawler
db_mysql_module.py
db_mysql_module.py
__author__ = 'root' import pymysql; import sqlalchemy; import threading; from time import clock; class SQLiteWraper(object): def __init__(self): # self.lock = threading.RLock() self.engine = sqlalchemy.create_engine('mysql+pymysql://developer:developer@172.28.217.66/xixiche?charset=utf8') def g...
mit
Python
35748678aaea24355d5207ae26d10dd455a47820
implement HostTestsSuite
oVirt/ovirt-engine-sdk-tests
src/test/hosttestssuite.py
src/test/hosttestssuite.py
from src.test.abstractovirttestssuite import AbstractOvirtTestsSuite from ovirtsdk.xml import params from src.infrastructure.annotations import conflicts from src.resource.hostresourcemanager import HostResourceManager class HostTestsSuite(AbstractOvirtTestsSuite): __hostResourceManager = HostResourceManager() ...
apache-2.0
Python
5f22ca2b9d6c9f0e55e208c25d410fe196ef619d
add closure report tool
moyogo/tachyfont,moyogo/tachyfont,googlei18n/TachyFont,googlefonts/TachyFont,googlefonts/TachyFont,moyogo/tachyfont,bstell/TachyFont,moyogo/tachyfont,googlefonts/TachyFont,bstell/TachyFont,googlefonts/TachyFont,bstell/TachyFont,moyogo/tachyfont,googlei18n/TachyFont,googlei18n/TachyFont,googlei18n/TachyFont,googlefonts/...
build_time/src/closure_report.py
build_time/src/closure_report.py
#!/usr/bin/python # -*- coding: UTF-8 -*- """ Copyright 2015 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....
apache-2.0
Python
e20c403ff196f18dd1416eaf811b427c37b113ba
Add a table editor demo featuring a checkbox column.
burnpanck/traits,burnpanck/traits
enthought/traits/ui/demo/Advanced/Table_editor_with_checkbox_column.py
enthought/traits/ui/demo/Advanced/Table_editor_with_checkbox_column.py
""" This shows a table editor which has a checkbox column in addition to normal data columns. """ # Imports: from random \ import randint from enthought.traits.api \ import HasStrictTraits, Str, Int, Float, List, Bool, Property from enthought.traits.ui.api \ import View, Item, Table...
bsd-3-clause
Python
d0ebf20c9f6bbcfbb55649092b7a35ed82b05dac
Add module show_source.py in gallery (used to show source code of examples)
kikocorreoso/brython,kikocorreoso/brython,brython-dev/brython,brython-dev/brython,brython-dev/brython,kikocorreoso/brython
www/gallery/show_source.py
www/gallery/show_source.py
from browser import ajax, document, html, bind, window, highlight btn = html.BUTTON("Show source code", Class="nice") height = window.innerHeight width = window.innerWidth css = """ /* colors for highlighted Python code */ span.python-string{ color: #27d; } span.python-comment{ color: #019; } span.python-ke...
bsd-3-clause
Python
0c24d31e08fe7e72745b3273eec0b5bfe7e9a07a
Add script to manage availability annotations
apple/swift-system,apple/swift-system,apple/swift-system
Utilities/expand-availability.py
Utilities/expand-availability.py
#!/usr/bin/env python3 # This script uses the file `availability-macros.def` to automatically # add/remove `@available` attributes to declarations in Swift sources # in this package. # # In order for this to work, ABI-impacting declarations need to be annotated # with special comments in the following format: # # ...
apache-2.0
Python
aad264f065bb07c5c811db7372f1ca981308ad45
Create start_azure_vm.py
azureautomation/runbooks
Utility/Python/start_azure_vm.py
Utility/Python/start_azure_vm.py
#!/usr/bin/env python2 """ Starts Azure resource manager virtual machines in a subscription. This Azure Automation runbook runs on Azure to start Azure vms in a subscription. If no arguments are specified, then all VMs that are currently stopped are started. If a resource group is specified, then all VMs in the resour...
mit
Python
264f4a827e39d55259aaa53bde967dae6befc606
Complete Programming Experience: polysum
Kunal57/MIT_6.00.1x
pset2/grader.py
pset2/grader.py
# Grader # 10.0 points possible (ungraded) # A regular polygon has n number of sides. Each side has length s. # The area of a regular polygon is: 0.25∗n∗s2tan(π/n) # The perimeter of a polygon is: length of the boundary of the polygon # Write a function called polysum that takes 2 arguments, n and s. This function sho...
mit
Python
e8170b2f446f23771bd746747493bebbd0dc9288
add velocity filter
OTL/otl_diff_drive
nodes/velocity_filter.py
nodes/velocity_filter.py
#! /usr/bin/env python import rospy import roslib roslib.load_manifest("otl_diff_drive") from otl_diff_drive import twist_velocities from geometry_msgs.msg import Twist def isStopVelocity(twist): VERY_SMALL = 0.0001 return abs(twist.linear.x) < VERY_SMALL and abs(twist.angular.z) < VERY_SMALL class Velocit...
bsd-3-clause
Python
18ed0900c22fa2ed646f08adf66e1917a6a04b43
add collect_impression
amimoto-ami/amimoto-amazon-alexa,amimoto-ami/amimoto-amazon-alexa
amimoto_alexa/collect_message.py
amimoto_alexa/collect_message.py
#!/usr/bin/env python # -*- coding: utf-8 -*- """ for amimoto_alexa """ import lamvery from helpers import * from debugger import * def collect_impression(intent, session): """Collect impression and finalize session """ session_attributes = build_session_attributes(session) card_title = "Impression...
mit
Python
aec48fe807e4589344a9f04e13b8f0b651110917
add package installer.
ISIFoundation/influenzanet-epidb-client
python/setup.py
python/setup.py
from setuptools import setup import epidb_client version = epidb_client.__version__ setup( name = "epidb-client", version = version, url = 'http://www.epiwork.eu/', description = 'EPIWork Database - Client Code', author = 'Fajran Iman Rusadi', packages = ['epidb_client'], install_requires ...
agpl-3.0
Python
437431289b25418c5acd9890b86350aa62ae0668
add updated script with changes from @fransua
sestaton/sesbio,sestaton/sesbio,sestaton/sesbio,sestaton/sesbio
transposon_annotation/transposon_annotation_ecolopy_scripts/ecolopy.py
transposon_annotation/transposon_annotation_ecolopy_scripts/ecolopy.py
import matplotlib matplotlib.use('Agg') from ecolopy_dev import Community from ecolopy_dev.utils import draw_shannon_distrib com = Community('test_log_abund.txt') print com com.fit_model('ewens') com.set_current_model('ewens') ewens_model = com.get_model('ewens') print ewens_model com.fit_model('lognormal') co...
mit
Python
c7c3ab0a4013df99b928351040f1156b07ba6767
Add some tests for the tokens
realityone/flaskbb,realityone/flaskbb,realityone/flaskbb
tests/unit/utils/test_tokens.py
tests/unit/utils/test_tokens.py
from flask import current_app from itsdangerous import TimedJSONWebSignatureSerializer from flaskbb.utils.tokens import make_token, get_token_status def test_make_token(user): token = make_token(user, "test") s = TimedJSONWebSignatureSerializer(current_app.config['SECRET_KEY']) unpacked_token = s.loads(to...
bsd-3-clause
Python
0848197b3c9ff8d09575b85b5e3a2ca1aac6f6c5
Put split and merge in own module too
glormph/msstitch
app/drivers/pycolator/splitmerge.py
app/drivers/pycolator/splitmerge.py
from app.drivers.basedrivers import PycolatorDriver from app.preparation import pycolator as preparation from app.readers import pycolator as readers class SplitDriver(PycolatorDriver): def __init__(self, **kwargs): super(SplitDriver, self).__init__(**kwargs) self.targetsuffix = kwargs.get('target...
mit
Python
4bf5d21402d5394f36eec006fd3ba03354bb8523
Add dashboard url route
ethanperez/t4k-rms,ethanperez/t4k-rms
dashboard/urls.py
dashboard/urls.py
from django.conf.urls import patterns, url from dashboard import views urlpatterns = patterns('dashboard.views', url(r'^$', views.dashboard, name = 'dashboard'), url(r'^login/$', views.enter_gate, name = 'login'), url(r'^logout/$', views.exit_gate, name = 'logout'), )
mit
Python
5dd9cc55368e9f5bd8c79f74f3c7c1fc84a6bd8b
Add common migration (unrelated to branch)
lutris/website,lutris/website,lutris/website,lutris/website
common/migrations/0010_auto_20200529_0514.py
common/migrations/0010_auto_20200529_0514.py
# Generated by Django 2.2.12 on 2020-05-29 05:14 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('common', '0009_upload_hosting'), ] operations = [ migrations.AlterField( model_name='upload', name='destination', ...
agpl-3.0
Python
f53488e3c797afb4f47f005e078d53a3bea14715
add solution for Combination Sum III
zhyu/leetcode,zhyu/leetcode
algorithms/combinationSumIII/combinationSumIII.py
algorithms/combinationSumIII/combinationSumIII.py
class Solution: # @param {integer} k # @param {integer} n # @return {integer[][]} def combinationSum3(self, k, n): return [arr for arr in ([j+1 for j in xrange(10) if i & (1 << j)] for i in xrange(1, 512) if bin(i).count('1') == k) if sum(arr) == ...
mit
Python
fedb80cf8ee5859e1d8f5caccc7a67ae979e743e
Remove unnecessary grit_out_dir variable from component_strings.gyp.
jaruba/chromium.src,patrickm/chromium.src,TheTypoMaster/chromium-crosswalk,Fireblend/chromium-crosswalk,dednal/chromium.src,M4sse/chromium.src,TheTypoMaster/chromium-crosswalk,bright-sparks/chromium-spacewalk,axinging/chromium-crosswalk,jaruba/chromium.src,Fireblend/chromium-crosswalk,PeterWangIntel/chromium-crosswalk,...
components/component_strings.gyp
components/component_strings.gyp
# Copyright (c) 2012 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. { 'targets': [ { 'target_name': 'component_strings', 'type': 'none', 'actions': [ { 'action_name': 'component_s...
# Copyright (c) 2012 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. { 'variables': { 'grit_out_dir': '<(SHARED_INTERMEDIATE_DIR)/components', }, 'targets': [ { 'target_name': 'component_strings', ...
bsd-3-clause
Python
6307a8a813062b3faad6b0f393d1886d4ad9bed8
add initial date for committees
dhosterman/hebrew_order_david,dhosterman/hebrew_order_david,dhosterman/hebrew_order_david
application/migrations/0019_auto_20150316_2009.py
application/migrations/0019_auto_20150316_2009.py
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations from application.models import Committee def add_committees(apps, schema_editor): committees = [ 'Fundraising and Social Action', 'Membership', 'Social Functions', 'Archivist an...
mit
Python
fa0afad07f34f350233ae2a4f1654faef9bc1814
Add a python version for the phonebook benchmark
SwiftAndroid/swift,ahoppen/swift,uasys/swift,karwa/swift,gottesmm/swift,ken0nek/swift,xwu/swift,huonw/swift,natecook1000/swift,jckarter/swift,ken0nek/swift,allevato/swift,hughbe/swift,tinysun212/swift-windows,gmilos/swift,MukeshKumarS/Swift,shahmishal/swift,sschiau/swift,austinzheng/swift,adrfer/swift,uasys/swift,shajr...
utils/benchmark/Strings/PySort.py
utils/benchmark/Strings/PySort.py
words=[ u"James", u"John", u"Robert", u"Michael", u"William", u"David", u"Richard", u"Joseph", u"Charles", u"Thomas", u"Christopher", u"Daniel", u"Matthew", u"Donald", u"Anthony", u"Paul", u"Mark", u"George", u"Steven", u"Kenneth", u"Andrew", u"Edward", u"Brian", u"Joshua", u"Kevin", u"Ronald", u"Timothy", u"Jason...
apache-2.0
Python
22e3933f6a9ff6c424d1a1f6d225f32c234359c5
add leetcode Pascal's Triangle II
Fity/2code,Fity/2code,Fity/2code,Fity/2code,Fity/2code,Fity/2code
leetcode/PascalTriangleII/solution.py
leetcode/PascalTriangleII/solution.py
# -*- coding:utf-8 -*- class Solution: # @return a list of integers def getRow(self, rowIndex): if rowIndex == 0: return [1] ret = [1] begin = 1 while rowIndex > 0: ret.append(ret[-1] * rowIndex / begin) rowIndex -= 1 begin += 1 ...
mit
Python
8deb311e6196c618f9ae3f18d18c1827407b8b96
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/pyside/pyside6/widget_QSqlTableModel_sqlite_from_file.py
python/pyside/pyside6/widget_QSqlTableModel_sqlite_from_file.py
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # Ref: http://doc.qt.io/qt-5/modelview.html#2-1-a-read-only-table import sys from PySide6 import QtCore, QtWidgets from PySide6.QtCore import Qt from PySide6.QtWidgets import QApplication, QTableView from PySide6.QtSql import QSqlDatabase, QSqlQuery, QSqlTableModel # ...
mit
Python
1fe2e3b2ed933f22ce128ca1ea8c728981009a44
Add squashed migration
ioO/billjobs
billjobs/migrations/0002_service_is_available_squashed_0005_bill_issuer_address_default.py
billjobs/migrations/0002_service_is_available_squashed_0005_bill_issuer_address_default.py
# -*- coding: utf-8 -*- # Generated by Django 1.9.4 on 2016-03-21 16:55 from __future__ import unicode_literals from django.db import migrations, models from billjobs.settings import BILLJOBS_BILL_ISSUER class Migration(migrations.Migration): replaces = [('billjobs', '0002_service_is_available'), ('billjobs', '...
mit
Python
fb41c5295d867dc9ac6ec64da3646246c897e109
add running time of algorithms
xbfool/hackerrank_xbfool
src/algorithms/arrays_and_sorting/running_time_of_algorithms.py
src/algorithms/arrays_and_sorting/running_time_of_algorithms.py
number = input() number_array = [(int)(x) for x in raw_input().split()] total = 0 for i in range(1, number): for j in range(i): ii = number_array[i] jj = number_array[j] if ii < jj: total += i - j number_array = number_array[:j] + [ii] + [jj] + number_array[j+1:i] + number_array[i+1:] break print tot...
mit
Python
1f062298a68aaf6a4161279c539caed07816f1a8
Add tests for influxdb/alarm_state_history_repository.py
stackforge/monasca-persister,openstack/monasca-persister,openstack/monasca-persister,openstack/monasca-persister,stackforge/monasca-persister,stackforge/monasca-persister
monasca_persister/tests/test_influxdb_alarm_state_history_repository.py
monasca_persister/tests/test_influxdb_alarm_state_history_repository.py
# (C) Copyright 2019 Fujitsu Limited # # 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 writi...
apache-2.0
Python
1cd457765727a0a65d02ddc9ea164af4913448c6
Create a python file
lesparza90/TheIoTLearningInitiative,lesparza90/TheIoTLearningInitiative
InternetOfThings101/main.py
InternetOfThings101/main.py
import time import sys import signal def interruptHandler(signal, frame): sys.exit(0) if __name__ == '__main__': signal.signal(signal.SIGINT, interruptHandler) while True: print "Hello Internet of Things 101" time.sleep(5) # End of File
apache-2.0
Python
2e9f43d1c1679355e2d7d452137ddf7fb2bbdedf
Test Basic.Publish -> Basic.Get message passing
Zephor5/pika,vrtsystems/pika,renshawbay/pika-python3,jstnlef/pika,hugoxia/pika,vitaly-krugl/pika,skftn/pika,fkarb/pika-python3,reddec/pika,shinji-s/pika,benjamin9999/pika,pika/pika,zixiliuyue/pika,knowsis/pika,Tarsbot/pika
tests/async-send-get-test.py
tests/async-send-get-test.py
#!/usr/bin/env python """ Send a message and confirm you can retrieve it with Basic.Get Test Steps: 1) Connect to broker - start_test 2) Open Channel - on_connected 3) Delcare Queue - on_channel_open 4) Send test message - on_queue_declared 5) Call basic get - on_queue_declared 6) Validate t...
bsd-3-clause
Python
2cb8f7b2df2583c9fdb545744adad2386b4ee7f3
Add test for issue #2465 - tuple subsclass subscript
adafruit/circuitpython,adafruit/circuitpython,adafruit/micropython,adafruit/circuitpython,adafruit/micropython,adafruit/circuitpython,adafruit/micropython,adafruit/circuitpython,adafruit/micropython,adafruit/micropython,adafruit/circuitpython
tests/basics/subscr_tuple.py
tests/basics/subscr_tuple.py
# subscripting a subclassed tuple class Foo(tuple): pass foo = Foo((1,2)) foo[0]
mit
Python
7d46f6e714be4b53a800c72f800d400ef6b280c4
add tests for core functions
keeprocking/pygelf,keeprocking/pygelf
tests/test_core_functions.py
tests/test_core_functions.py
from pygelf import gelf import json import zlib import struct import pytest @pytest.mark.parametrize('compress', [True, False]) def test_pack(compress): message = {'version': '1.1', 'short_message': 'test pack'} packed_message = gelf.pack(message, compress) unpacked_message = zlib.decompress(packed_messag...
mit
Python
2c665dbcb90785b9754f89cb6a0d3d9c3ffddc95
Add test
ronekko/deep_metric_learning
tests/test_proxy_nca_loss.py
tests/test_proxy_nca_loss.py
# -*- coding: utf-8 -*- """ Created on Tue Feb 07 19:23:18 2017 @author: sakurai """ import unittest import numpy as np import chainer from chainer import cuda from chainer import gradient_check from chainer import testing from chainer.testing import attr import chainer.functions as F from deep_metric_learning.li...
mit
Python
703a5556174706db330c8d2e426471e490a00cef
Switch rottentomatoes to xfail rather than skip test.
qk4l/Flexget,Danfocus/Flexget,Flexget/Flexget,drwyrm/Flexget,ianstalk/Flexget,dsemi/Flexget,crawln45/Flexget,jawilson/Flexget,sean797/Flexget,crawln45/Flexget,poulpito/Flexget,malkavi/Flexget,Flexget/Flexget,JorisDeRieck/Flexget,qk4l/Flexget,jacobmetrick/Flexget,dsemi/Flexget,tobinjt/Flexget,poulpito/Flexget,qvazzler/F...
tests/test_rottentomatoes.py
tests/test_rottentomatoes.py
from __future__ import unicode_literals, division, absolute_import import pytest class TestRottenTomatoesLookup(object): config = """ tasks: test: mock: # tests search - {title: 'Toy Story'} - {title: 'The Matrix'} - {title: '...
from __future__ import unicode_literals, division, absolute_import from nose.plugins.skip import SkipTest class TestRottenTomatoesLookup(object): config = """ tasks: test: mock: # tests search - {title: 'Toy Story'} - {title: 'The Matrix'}...
mit
Python
ecdda7cf81cb3feb353a1d62441eff92aed082af
Add aggregationtypes to routes
pwyf/IATI-Data-Quality,pwyf/IATI-Data-Quality,pwyf/IATI-Data-Quality,pwyf/IATI-Data-Quality
iatidataquality/aggregationtypes.py
iatidataquality/aggregationtypes.py
# IATI Data Quality, tools for Data QA on IATI-formatted publications # by Mark Brough, Martin Keegan, Ben Webb and Jennifer Smith # # Copyright (C) 2013 Publish What You Fund # # This programme is free software; you may redistribute and/or modify # it under the terms of the GNU Affero General Public License v3...
agpl-3.0
Python